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

Issue 1371263003: Prohibit let in lexical bindings (Closed)

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

Description

Prohibit let in lexical bindings This patch prohibits lexical bindings from being called 'let', even in sloppy mode, following the ES2015 specification. The change affects multiple cases of lexical bindings, including simple let/const declarations and both kinds of for loops. var and legacy const bindings still permit the name to be let, including in destructuring cases. Tests are added to verify, though some cases are commented out since they led to (pre-existing) crashes. BUG=v8:4403 R=adamk LOG=Y Committed: https://crrev.com/7e113c47b7da741761a5e813017f9a738769b41c Cr-Commit-Position: refs/heads/master@{#31115}

Patch Set 1 #

Patch Set 2 : More plumbing and tests #

Patch Set 3 : fix broken, incorrect test #

Total comments: 1

Patch Set 4 : Fix let let in test #

Patch Set 5 : messages test #

Total comments: 1

Patch Set 6 : better tests #

Total comments: 1

Patch Set 7 : remove messages.js test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -31 lines) Patch
M src/expression-classifier.h View 1 5 chunks +18 lines, -2 lines 0 comments Download
M src/messages.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/parser.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/preparser.h View 1 2 chunks +11 lines, -0 lines 0 comments Download
M src/preparser.cc View 3 chunks +6 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 1 chunk +48 lines, -7 lines 0 comments Download
A + test/message/let-lexical-name-prohibited.js View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download
A test/message/let-lexical-name-prohibited.out View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/block-let-contextual-sloppy.js View 1 2 3 2 chunks +17 lines, -15 lines 0 comments Download
M test/test262/test262.status View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 25 (11 generated)
Dan Ehrenberg
5 years, 2 months ago (2015-10-03 01:49:56 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371263003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371263003/20001
5 years, 2 months ago (2015-10-03 01:50:13 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/10347)
5 years, 2 months ago (2015-10-03 02:01:22 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371263003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371263003/40001
5 years, 2 months ago (2015-10-03 02:14:40 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel/builds/10218)
5 years, 2 months ago (2015-10-03 02:23:35 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371263003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371263003/60001
5 years, 2 months ago (2015-10-05 15:59:40 UTC) #12
adamk
lgtm modulo tests. Can you also add a test in test/message/ before landing? https://codereview.chromium.org/1371263003/diff/40001/test/mjsunit/harmony/block-let-contextual-sloppy.js File ...
5 years, 2 months ago (2015-10-05 16:04:10 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371263003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371263003/80001
5 years, 2 months ago (2015-10-05 16:24:39 UTC) #16
adamk
https://codereview.chromium.org/1371263003/diff/80001/test/mjsunit/messages.js File test/mjsunit/messages.js (right): https://codereview.chromium.org/1371263003/diff/80001/test/mjsunit/messages.js#newcode474 test/mjsunit/messages.js:474: // kLetInLexicalBinding Sorry, this isn't quite what I meant. ...
5 years, 2 months ago (2015-10-05 16:30:48 UTC) #18
Dan Ehrenberg
On 2015/10/05 at 16:30:48, adamk wrote: > https://codereview.chromium.org/1371263003/diff/80001/test/mjsunit/messages.js > File test/mjsunit/messages.js (right): > > https://codereview.chromium.org/1371263003/diff/80001/test/mjsunit/messages.js#newcode474 ...
5 years, 2 months ago (2015-10-05 18:21:01 UTC) #19
adamk
lgtm, but please remove the test you added in messages.js (I don't see any other ...
5 years, 2 months ago (2015-10-05 18:29:26 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1371263003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1371263003/120001
5 years, 2 months ago (2015-10-05 20:04:05 UTC) #23
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 2 months ago (2015-10-05 20:29:21 UTC) #24
commit-bot: I haz the power
5 years, 2 months ago (2015-10-05 20:29:34 UTC) #25
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/7e113c47b7da741761a5e813017f9a738769b41c
Cr-Commit-Position: refs/heads/master@{#31115}

Powered by Google App Engine
This is Rietveld 408576698