I put the IdGen class inside AstNode, since the name AstNode::IdGen makes
sense.. it's the "ast node id generator".


https://codereview.chromium.org/490173002/diff/40001/src/ast.h
File src/ast.h (right):

https://codereview.chromium.org/490173002/diff/40001/src/ast.h#newcode220
src/ast.h:220: static int GetNextId(int* id) { return ReserveIdRange(id,
1); }
On 2014/08/21 11:32:01, rossberg wrote:
Instead of passing raw int pointers around everywhere, can we
encapsulate that
into a small IdGen class? This and the below method could then
naturally move
there, and the class would prevent the rest of the code from messing
up the
underlying counter variable.

Done.

https://codereview.chromium.org/490173002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to