[es6] Initial support for let/const bindings in sloppy mode
authorarv <arv@chromium.org>
Wed, 8 Jul 2015 15:04:04 +0000 (08:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 8 Jul 2015 15:04:13 +0000 (15:04 +0000)
commit3b1aabc960ea7a1107c8b6ebb8f2b4ce48e9b610
tree1d7cdb7d6767acde7baa1fbae1d9a7dc76096f6d
parent7fc183af06d48fb1e034e296e5006b1f02bb81a3
[es6] Initial support for let/const bindings in sloppy mode

Allow let in sloppy mode with --harmony-sloppy

Allow ES'15 const in sloppy mode with --harmony-sloppy --no-legacy-const

Functions in block are not done yet. They are only let bound in the block
at this point.

BUG=v8:3305, v8:2198
LOG=N
R=littledan@chromium.org, rossberg@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29536}
13 files changed:
src/parser.cc
src/preparser.cc
src/preparser.h
test/cctest/test-parsing.cc
test/mjsunit/es6/block-leave.js
test/mjsunit/harmony/block-const-assign-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-for-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-leave-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-let-crankshaft-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-let-declaration-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-let-semantics-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-scoping-sloppy.js [new file with mode: 0644]
test/mjsunit/harmony/block-scoping-top-level-sloppy.js [new file with mode: 0644]