Reviewers: fschneider, Mads Ager,
Message:
This is only implemented on IA32. It would be simple to port. I left the
classic code generator unchanged.
Since we don't care about the performance of "const", it would arguably be
better to give const initializers inside "with" a slot type "LOOKUP" not
"CONTEXT". (The issue is that "CONTEXT" claims they can be resolved
statically
by following N links of the runtime context chain where N is computed from
the
static scope chain. "With" contexts are not accounted for in the scope
chain,
so using it is pointless if safe.)
Description:
Remove the redundant load on every context lookup.
There was an unnecessary load on every statically-resolved context lookup.
Remove it.
This revealed a hidden bug in const initializers inside 'with'. They claim
to be statically resolved (having slot type CONTEXT) but they occur in a
spot where the runtime context chain and the static scope chain do not
agree. This is fixed by special casing const initializers in the backend.
Please review this at http://codereview.chromium.org/6384020/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Affected files:
M src/ia32/full-codegen-ia32.cc
M src/ia32/lithium-codegen-ia32.cc
M src/ia32/lithium-ia32.cc
M src/ia32/macro-assembler-ia32.cc
M src/prettyprinter.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev