Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Issue 1290013002: [es6] Make assignment to new.target an early ReferenceError (Closed)

Created:
5 years, 4 months ago by adamk
Modified:
5 years, 4 months ago
Reviewers:
rossberg
CC:
v8-dev, Dan Ehrenberg
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[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 Committed: https://crrev.com/ef52836cd8c1340cf0c5054560fc936d6de1d25e Cr-Commit-Position: refs/heads/master@{#30166}

Patch Set 1 #

Patch Set 2 : Added a TODO in PreParser::ParseForStatement for missing check #

Total comments: 2

Patch Set 3 : Add a few more tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -33 lines) Patch
M src/ast.h View 3 chunks +9 lines, -1 line 0 comments Download
M src/parser.cc View 4 chunks +8 lines, -6 lines 0 comments Download
M src/preparser.h View 8 chunks +14 lines, -13 lines 0 comments Download
M src/preparser.cc View 1 1 chunk +2 lines, -0 lines 0 comments Download
A + test/message/new-target-assignment.js View 1 chunk +2 lines, -3 lines 0 comments Download
A test/message/new-target-assignment.out View 1 chunk +4 lines, -0 lines 0 comments Download
A + test/message/new-target-for-loop.js View 1 chunk +2 lines, -4 lines 0 comments Download
A test/message/new-target-for-loop.out View 1 chunk +4 lines, -0 lines 0 comments Download
A + test/message/new-target-postfix-op.js View 1 chunk +2 lines, -3 lines 0 comments Download
A test/message/new-target-postfix-op.out View 1 chunk +4 lines, -0 lines 0 comments Download
A + test/message/new-target-prefix-op.js View 1 chunk +2 lines, -3 lines 0 comments Download
A test/message/new-target-prefix-op.out View 1 chunk +4 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/new-target.js View 1 2 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (3 generated)
adamk
5 years, 4 months ago (2015-08-12 23:36:48 UTC) #2
adamk
Note that the preparser already (accidentally) seems to throw an error here, because its implementation ...
5 years, 4 months ago (2015-08-12 23:39:29 UTC) #3
caitp (gmail)
On 2015/08/12 23:39:29, adamk wrote: > Note that the preparser already (accidentally) seems to throw ...
5 years, 4 months ago (2015-08-12 23:51:42 UTC) #4
adamk
On 2015/08/12 23:51:42, caitp wrote: > On 2015/08/12 23:39:29, adamk wrote: > > Note that ...
5 years, 4 months ago (2015-08-12 23:58:04 UTC) #5
adamk
On 2015/08/12 23:58:04, adamk wrote: > On 2015/08/12 23:51:42, caitp wrote: > > On 2015/08/12 ...
5 years, 4 months ago (2015-08-13 00:29:51 UTC) #6
caitp (gmail)
On 2015/08/13 00:29:51, adamk wrote: > On 2015/08/12 23:58:04, adamk wrote: > > On 2015/08/12 ...
5 years, 4 months ago (2015-08-13 00:35:33 UTC) #7
adamk
On 2015/08/13 00:35:33, caitp wrote: > On 2015/08/13 00:29:51, adamk wrote: > > On 2015/08/12 ...
5 years, 4 months ago (2015-08-13 00:45:56 UTC) #8
caitp (gmail)
On 2015/08/13 00:45:56, adamk wrote: > On 2015/08/13 00:35:33, caitp wrote: > > On 2015/08/13 ...
5 years, 4 months ago (2015-08-13 01:59:49 UTC) #9
rossberg
lgtm https://codereview.chromium.org/1290013002/diff/20001/test/mjsunit/harmony/new-target.js File test/mjsunit/harmony/new-target.js (right): https://codereview.chromium.org/1290013002/diff/20001/test/mjsunit/harmony/new-target.js#newcode390 test/mjsunit/harmony/new-target.js:390: assertThrows(function() { Function("new.target = 42"); }, ReferenceError); Could ...
5 years, 4 months ago (2015-08-13 11:13:54 UTC) #10
adamk
https://codereview.chromium.org/1290013002/diff/20001/test/mjsunit/harmony/new-target.js File test/mjsunit/harmony/new-target.js (right): https://codereview.chromium.org/1290013002/diff/20001/test/mjsunit/harmony/new-target.js#newcode390 test/mjsunit/harmony/new-target.js:390: assertThrows(function() { Function("new.target = 42"); }, ReferenceError); On 2015/08/13 ...
5 years, 4 months ago (2015-08-13 17:05:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1290013002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1290013002/40001
5 years, 4 months ago (2015-08-13 17:06:04 UTC) #14
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 4 months ago (2015-08-13 18:06:09 UTC) #15
commit-bot: I haz the power
5 years, 4 months ago (2015-08-13 18:06:26 UTC) #16
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/ef52836cd8c1340cf0c5054560fc936d6de1d25e
Cr-Commit-Position: refs/heads/master@{#30166}

Powered by Google App Engine
This is Rietveld 408576698