Reviewers: Kevin Millikin,

Description:
Provisional implementation of stack allocated catch variables.

PTAL. This is not commit ready yet.

Overview of the CL:
- Scopes and ScopeInfos have an additional property num_stack_allocs that
  represents the number of stack allocated variables from the current scope
  and nested catch scopes.
- In FullCodeGenerator::VisitTryCatchStatement checks the scope information to see if the catch variable must be heap allocated. Only in that case a context
  is pushed onto the context chain.
- New ExitScopedBlockStatement. Removes the last context from the context chain
  iff the corresponding scope has heap allocated variables.
- Unfortunately there's a new WITH_SCOPE type.
- The SerializedScopeInfos are now used for with and catch scopes as well. For
  each function scope the SerializedScopeInfo stores the local scope tree of
  the function, i.e. it stores links to with and catch scopes, but not to
  inner function scopes.
- SerializedScopeInfo contains start and end source positions for scopes.
- The statement position information stored in the serialized scope tree is
  used to recreate the original scope chain.


Please review this at http://codereview.chromium.org/7523027/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/ast-inl.h
  M src/ast.h
  M src/ast.cc
  M src/frames.cc
  M src/full-codegen.cc
  M src/hydrogen.cc
  M src/ia32/full-codegen-ia32.cc
  M src/parser.cc
  M src/prettyprinter.cc
  M src/rewriter.cc
  M src/runtime.cc
  M src/scopeinfo.h
  M src/scopeinfo.cc
  M src/scopes.h
  M src/scopes.cc
  M src/v8globals.h
  A test/mjsunit/scope-calls-eval.js


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to