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

Issue 1315673009: Sloppy-mode let parsing (Closed)

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

Description

Sloppy-mode let parsing This patch makes 'let' a contextual keyword in both strict and sloppy mode. It behaves as a keyword when used at the beginning of a StatementListItem or lexical declaration at the beginning of a for statement, if it is followed by an identifier, [ or {. Implementing this change requires an extra token look-ahead by the parser which is only invoked in certain cases (so as to avoid parsing RegExps as ECMAScript tokens). This might result in a slowdown of the scanner, but performance testing of this patch hasn't yet found much of a regression. BUG=v8:3305 LOG=Y R=adamk,vogelheim Committed: https://crrev.com/decc7b092ae90a378423df760690d58585e9ac71 Cr-Commit-Position: refs/heads/master@{#30451}

Patch Set 1 #

Patch Set 2 : mark conditional as unlikely #

Total comments: 1

Patch Set 3 : clarify comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -14 lines) Patch
M src/parser.cc View 3 chunks +2 lines, -5 lines 0 comments Download
M src/preparser.h View 3 chunks +28 lines, -0 lines 0 comments Download
M src/preparser.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/scanner.h View 1 2 5 chunks +18 lines, -6 lines 0 comments Download
M src/scanner.cc View 1 3 chunks +20 lines, -1 line 0 comments Download
M src/token.h View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 chunk +29 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/block-let-contextual-sloppy.js View 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
Dan Ehrenberg
This was previously reviewed at https://codereview.chromium.org/1295883002 ; uploaded here because I couldn't get Rietveldt to ...
5 years, 3 months ago (2015-08-27 22:24:22 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315673009/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315673009/1
5 years, 3 months ago (2015-08-27 22:24:34 UTC) #3
adamk
lgtm, but would like to see vogelheim's OK on the bookmark stuff (wonder if there's ...
5 years, 3 months ago (2015-08-28 00:13:22 UTC) #4
vogelheim
lgtm - bookmarks look fine. https://codereview.chromium.org/1315673009/diff/20001/src/scanner.h File src/scanner.h (right): https://codereview.chromium.org/1315673009/diff/20001/src/scanner.h#newcode714 src/scanner.h:714: TokenDesc next_next_; // desc ...
5 years, 3 months ago (2015-08-28 11:01:04 UTC) #5
vogelheim
On 2015/08/28 00:13:22, adamk wrote: > lgtm, but would like to see vogelheim's OK on ...
5 years, 3 months ago (2015-08-28 11:03:45 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1315673009/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1315673009/40001
5 years, 3 months ago (2015-08-28 17:40:03 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 3 months ago (2015-08-28 18:47:37 UTC) #10
commit-bot: I haz the power
5 years, 3 months ago (2015-08-28 18:47:51 UTC) #11
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/decc7b092ae90a378423df760690d58585e9ac71
Cr-Commit-Position: refs/heads/master@{#30451}

Powered by Google App Engine
This is Rietveld 408576698