Let's go with the copying version. wingo@'s stuff might change this slightly
anyway...


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) {
On 2014/08/21 13:43:35, rossberg wrote:
I don't think copy and assignment operators need explicit definitions,
they
should be generated by default.

Done.

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);
On 2014/08/21 13:43:35, rossberg wrote:
Isn't this default constructed in the CompilationInfo class? Are we
reusing comp
infos in weird ways?

This would only change things if we parse with the same CompilationInfo
twice. That shouldn't happen in the current state. I was trying to be
overly defensive (in case somebody wants to parse the same
compilationinfo again in the future) and not change the behavior in that
case. Removed this line.

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_);
On 2014/08/21 13:43:35, rossberg wrote:
Nit: redundant (and IMO confusing) parens here and in all the other
places.

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