[es6] Make assignment to new.target an early ReferenceError
authoradamk <adamk@chromium.org>
Thu, 13 Aug 2015 18:06:04 +0000 (11:06 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 13 Aug 2015 18:06:13 +0000 (18:06 +0000)
commitef52836cd8c1340cf0c5054560fc936d6de1d25e
tree8765a3ee61decdb88914b0f2bd760c607d714b1e
parent316b1e758b82cc2d06db96a4ef1105ecd50e77b9
[es6] Make assignment to new.target an early ReferenceError

In doing so, fix calls CheckAndRewriteReferenceExpression to take proper
start and end positions (instead of just pointing at the first token in
the LHS expression).

BUG=v8:4370
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30166}
13 files changed:
src/ast.h
src/parser.cc
src/preparser.cc
src/preparser.h
test/message/new-target-assignment.js [new file with mode: 0644]
test/message/new-target-assignment.out [new file with mode: 0644]
test/message/new-target-for-loop.js [new file with mode: 0644]
test/message/new-target-for-loop.out [new file with mode: 0644]
test/message/new-target-postfix-op.js [new file with mode: 0644]
test/message/new-target-postfix-op.out [new file with mode: 0644]
test/message/new-target-prefix-op.js [new file with mode: 0644]
test/message/new-target-prefix-op.out [new file with mode: 0644]
test/mjsunit/harmony/new-target.js