Use a new lexical context for sloppy-mode eval
authorlittledan <littledan@chromium.org>
Tue, 11 Aug 2015 21:30:26 +0000 (14:30 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 11 Aug 2015 21:30:40 +0000 (21:30 +0000)
commitd03191beb1888b272e51912ebc45c4e8794f2060
treebb8b3415ce86e719badf8debfa77e665d649dc73
parent6c743b2b39ae4333e9451f99f3edb3e17e7ad2a5
Use a new lexical context for sloppy-mode eval

In ES6, direct eval() in sloppy mode uses the enclosing function-level
("var") scope for var-style bindings and a new lexical scope for lexical
bindings like let and class. This patch implements that feature by making
lexical bindings that are directly within an EVAL_SCOPE be on the local
scope rather than the enclosing one.

BUG=v8:4288
LOG=Y
R=adamk

Review URL: https://codereview.chromium.org/1274193004

Cr-Commit-Position: refs/heads/master@{#30120}
src/parser.cc
src/scopes.h
test/mjsunit/harmony/block-conflicts-sloppy.js
test/webkit/class-syntax-name-expected.txt
test/webkit/class-syntax-name.js