LGTM, with a few comments below and a suggestion for a simple cleanup as a separate change.
http://codereview.chromium.org/7792100/diff/1/src/full-codegen.h File src/full-codegen.h (right): http://codereview.chromium.org/7792100/diff/1/src/full-codegen.h#newcode197 src/full-codegen.h:197: explicit NestedBlock(FullCodeGenerator* codegen, Block* block) No need for explicit for two argument constructors. http://codereview.chromium.org/7792100/diff/1/src/full-codegen.h#newcode209 src/full-codegen.h:209: Block* block_; This class doesn't need to store the block since the base class does. You probably will just need a cast: virtual NestedStatement* Exit(int* stack_depth, int* context_length) { if (statement()->AsBlock()->block_scope() != NULL) ... http://codereview.chromium.org/7792100/diff/1/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/7792100/diff/1/src/parser.cc#newcode1593 src/parser.cc:1593: exit->AddStatement(new(zone()) ExitContextStatement()); Now we're no longer making essential use of ExitContextStatement (it's completely predictable where it will occur). As a next change, can you get rid of it? 'With' already makes do without it by compiling the code implicitly at the end of the body. Catch and blocks with scopes could do the same. http://codereview.chromium.org/7792100/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
