Make eval consider anything on the form eval(args...) a potential direct cal
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Oct 2011 09:38:52 +0000 (09:38 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Oct 2011 09:38:52 +0000 (09:38 +0000)
commit30465596e6123f15215f3fa1d527d5da945feae9
treee4fb7af5030e719262afb671ccef7b3d37df5164
parentfa8a71df9a3436f953ac951a8bf86b8fa00a9093
Make eval consider anything on the form eval(args...) a potential direct cal

Previously we omitted all cases where the global eval property was shadowed,
even if by a variable holding the same value. ES5 requires us to treat these
as direct calls.

We still throw if calling indirect eval with a detached global object.

BUG=v8:994
TEST=mjsunit/eval.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
14 files changed:
src/arm/full-codegen-arm.cc
src/full-codegen.h
src/ia32/full-codegen-ia32.cc
src/mips/full-codegen-mips.cc
src/parser.cc
src/runtime.cc
src/runtime.h
src/v8natives.js
src/variables.h
src/x64/full-codegen-x64.cc
test/cctest/test-api.cc
test/mjsunit/eval.js
test/mjsunit/regress/regress-221.js [deleted file]
test/mjsunit/strict-mode-implicit-receiver.js