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

Issue 1891453005: [parser] Relex restriction on reserved words (Closed)

Created:
4 years, 8 months ago by mike3
Modified:
4 years, 7 months ago
Reviewers:
Dan Ehrenberg, 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

[parser] Relex restriction on reserved words Some IdentifierNames are only included in the set of FutureReservedWords for strict mode code. Outside of strict mode, these IdentifierNames may be used as Identifiers. Notably, this includes their use as BindingIdentifiers in LexicalBindings. From ES2015 12.1.1 Static Semantics: Early Errors (Identifiers): > It is a Syntax Error if this phrase is contained in strict mode code > and the StringValue of IdentifierName is: "implements", "interface", > "let", "package", "private", "protected", "public", "static", or > "yield". http://www.ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors Due to a error in its heuristic for disambiguating the `let` token, V8 does not currently allow any of the strict-mode-only FutureReservedWords to be used as a BindingIdentifier outside of strict mode. Update V8's heuristic for disambiguating the `let` keyword to account for strict mode, enabling these IdentifierNames to be used BUG=v8:4918 LOG=N R=adamk@chromium.org Committed: https://crrev.com/d0c65f93bf950987e6cdefc1a07b7121edb76583 Cr-Commit-Position: refs/heads/master@{#36296}

Patch Set 1 #

Total comments: 7

Patch Set 2 : incorporate review feedback #

Patch Set 3 : Restoring 'let let' case (with explanation) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -16 lines) Patch
M src/parsing/parser-base.h View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 chunks +48 lines, -15 lines 0 comments Download

Messages

Total messages: 25 (9 generated)
mike3
4 years, 8 months ago (2016-04-14 20:26:40 UTC) #1
adamk
lgtm, but +littledan who came up with IsNextLetKeyword() in the first place to confirm this ...
4 years, 8 months ago (2016-04-20 20:42:32 UTC) #3
Dan Ehrenberg
lgtm lgtm % testing suggestions This isn't new from your patch, so it doesn't have ...
4 years, 8 months ago (2016-04-20 20:59:56 UTC) #4
Dan Ehrenberg
https://codereview.chromium.org/1891453005/diff/1/test/cctest/test-parsing.cc File test/cctest/test-parsing.cc (right): https://codereview.chromium.org/1891453005/diff/1/test/cctest/test-parsing.cc#newcode2020 test/cctest/test-parsing.cc:2020: V(yield) On 2016/04/20 at 20:59:56, Dan Ehrenberg wrote: > ...
4 years, 8 months ago (2016-04-20 21:02:32 UTC) #5
mike3
https://codereview.chromium.org/1891453005/diff/1/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/1891453005/diff/1/src/parsing/parser-base.h#newcode2774 src/parsing/parser-base.h:2774: case Token::LET: // Yes, you can do let let ...
4 years, 8 months ago (2016-04-21 19:51:20 UTC) #6
mike3
Hello Adam and Dan. I've uploaded a patch that incorporates Dan's feedback.
4 years, 8 months ago (2016-04-22 20:42:53 UTC) #7
Dan Ehrenberg
lgtm
4 years, 8 months ago (2016-04-25 21:16:17 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891453005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891453005/20001
4 years, 8 months ago (2016-04-26 16:45:39 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_win_nosnap_shared_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_nosnap_shared_rel_ng/builds/829) v8_win_nosnap_shared_rel_ng_triggered on tryserver.v8 (JOB_FAILED, ...
4 years, 8 months ago (2016-04-26 17:03:19 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891453005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891453005/40001
4 years, 7 months ago (2016-05-17 20:37:38 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 21:09:39 UTC) #17
Dan Ehrenberg
lgtm
4 years, 7 months ago (2016-05-17 21:10:34 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1891453005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1891453005/40001
4 years, 7 months ago (2016-05-17 21:10:38 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-17 21:12:25 UTC) #22
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/d0c65f93bf950987e6cdefc1a07b7121edb76583 Cr-Commit-Position: refs/heads/master@{#36296}
4 years, 7 months ago (2016-05-17 21:14:09 UTC) #24
mike3
4 years, 7 months ago (2016-05-17 21:30:43 UTC) #25
Message was sent while issue was closed.
On 2016/05/17 21:14:09, commit-bot: I haz the power wrote:
> Patchset 3 (id:??) landed as
> https://crrev.com/d0c65f93bf950987e6cdefc1a07b7121edb76583
> Cr-Commit-Position: refs/heads/master@{#36296}

Great! Thanks Dan and Adam!

Powered by Google App Engine
This is Rietveld 408576698