Reviewers: Mads Ager,
Message:
The old behavior assumed that the previous context had the appropriate
closure.
This would not be the case, for example, if a with/catch context was nested
inside a function that didn't have its own local context. In that case, the
previous context is some outer one with the wrong closure.
Special care has to be taken for the global scope to ensure that all such
contexts have the same empty function (to match the current behavior).
Special
care has to be taken for eval code to ensure that the anonymous closure for
the
eval code doesn't show up in a context's closure field where we don't
currently
expect it.
I'm not a huge fan of the complicated protocol to the runtime functions,
but it
seemed simple to implement.
Description:
Explicitly pass the closure when allocating a catch or with context.
Before: allocation of a catch or with context fetched the closure to store
in the context from the previous context in the context chain. Now: the
closure is passed explicitly.
[email protected]
BUG=
TEST=
Please review this at http://codereview.chromium.org/7275022/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/full-codegen-arm.cc
M src/factory.h
M src/factory.cc
M src/full-codegen.h
M src/full-codegen.cc
M src/heap.h
M src/heap.cc
M src/ia32/full-codegen-ia32.cc
M src/runtime.h
M src/runtime.cc
M src/x64/full-codegen-x64.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev