I like it slightly better, but admittedly it's ugly either way. I leave it up to
you. If you go back to the other version then indeed, make copy & assignment
private.


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

https://codereview.chromium.org/490173002/diff/80001/src/ast.h#newcode190
src/ast.h:190: IdGen& operator=(const IdGen& other) {
I don't think copy and assignment operators need explicit definitions,
they should be generated by default.

https://codereview.chromium.org/490173002/diff/80001/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/490173002/diff/80001/src/parser.cc#newcode751
src/parser.cc:751: *(info->ast_node_id_gen()) = AstNode::IdGen(0);
Isn't this default constructed in the CompilationInfo class? Are we
reusing comp infos in weird ways?

https://codereview.chromium.org/490173002/diff/80001/src/parser.h
File src/parser.h (right):

https://codereview.chromium.org/490173002/diff/80001/src/parser.h#newcode383
src/parser.h:383: function_state->saved_id_gen_ =
*(function_state->ast_node_id_gen_);
Nit: redundant (and IMO confusing) parens here and in all the other
places.

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