LGTM with comments.
https://codereview.chromium.org/1161623002/diff/50001/src/ast.cc
File src/ast.cc (right):
https://codereview.chromium.org/1161623002/diff/50001/src/ast.cc#newcode316
src/ast.cc:316:
As discussed, this is kind of brittle, but hard to avoid. Two
suggestions:
(1) Add a comment here stating that the logic must mirror
FullCodeGenerator::VisitObjectLiteral (so readers of the code know where
to look).
(2) Add a (D)CHECK that FullCodeGenerator::VisitObjectLiteral consumed
exactly as many slots as were allocated here. This would also be the
natural place for a comment clarifying that the number of slots is
computed here.
https://codereview.chromium.org/1161623002/diff/50001/src/ast.cc#newcode347
src/ast.cc:347: return GetNthSlot(*slot_index++);
I'm pretty sure this moves the pointer instead of incrementing the value
it points to... either way, I prefer explicit parentheses, i.e.:
return GetNthSlot((*slot_index)++);
https://codereview.chromium.org/1161623002/diff/50001/src/ast.h
File src/ast.h (right):
https://codereview.chromium.org/1161623002/diff/50001/src/ast.h#newcode799
src/ast.h:799: // Object literals need one feedback slot for each
non-trivial value, as well
Object literals? Huh?
https://codereview.chromium.org/1161623002/
--
--
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.