Optimize loads from variables that might be shadowed by variables
authorager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 18 Feb 2009 13:04:28 +0000 (13:04 +0000)
committerager@chromium.org <ager@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 18 Feb 2009 13:04:28 +0000 (13:04 +0000)
commita09832ab7611cfd7bb03f46120be5e90274752a9
tree4cf45b98cc1fb4fb9f15bfab2a12129f9bd2d962
parent98208125cb946da4bff996a4e9e849d3291eee7b
Optimize loads from variables that might be shadowed by variables
introduced by eval.

In the cases where calls to eval have not introduced any variables, we
do not need to perform a runtime call.  Instead, we verify that the
context extension objects have not been created and perform a direct
load.

Not implemented for ARM yet and the scope resolution code could use
some better abstractions.  I'd like to do that in a separate
changelist.
Review URL: http://codereview.chromium.org/20419

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/codegen-arm.cc
src/codegen-ia32.cc
src/codegen-ia32.h
src/contexts.cc
src/scopes.cc
src/scopes.h
src/variables.cc
src/variables.h
test/mjsunit/global-load-from-eval-in-with.js [new file with mode: 0644]
test/mjsunit/local-load-from-eval.js [new file with mode: 0644]
test/mjsunit/property-load-across-eval.js [new file with mode: 0644]