Speed up access to global variables from eval scopes. Traverse the
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Feb 2009 13:11:53 +0000 (13:11 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 24 Feb 2009 13:11:53 +0000 (13:11 +0000)
commit0c7af39737d551d6b01c8a095eff9b81fd0e3f2b
tree1326ae16737ddb5e3d6d509b0deb5ec72648aed3
parent6ea0862592529d73173a010bd7c8da393bcc7dac
Speed up access to global variables from eval scopes.  Traverse the
surrounding context to figure out if the variable could be global.  If
the variable could be global we check context extension objects at
runtime and use a global LoadIC if no variables have been introduced
by eval.

Fix crash bug when loading function arguments from inside eval.  The
shadowed variable in the DYNAMIC_LOCAL case does not rewrite to a slot in
that case.

Review URL: http://codereview.chromium.org/28027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
17 files changed:
src/codegen-arm.cc
src/codegen-ia32.cc
src/compilation-cache.cc
src/compilation-cache.h
src/compiler.cc
src/compiler.h
src/contexts.cc
src/contexts.h
src/objects.cc
src/objects.h
src/runtime.cc
src/scopeinfo.cc
src/scopeinfo.h
src/scopes.cc
src/scopes.h
test/mjsunit/global-load-from-eval.js [new file with mode: 0644]
test/mjsunit/global-load-from-nested-eval.js [new file with mode: 0644]