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

Issue 378303003: Make `let` usable as an identifier in ES6 sloppy mode. (Closed)

Created:
6 years, 5 months ago by rossberg
Modified:
6 years, 5 months ago
Reviewers:
ulan, marja
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Make `let` usable as an identifier in ES6 sloppy mode. All of our mjsunit suite now runs through with --harmony-scoping enabled, up to expected failures (tests checking syntax errors for const/function in strict mode). R=marja@chromium.org, ulan@chromium.org BUG=v8:2198 LOG=Y Committed: https://code.google.com/p/v8/source/detail?r=22323

Patch Set 1 #

Total comments: 6

Patch Set 2 : Comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -53 lines) Patch
M src/messages.js View 1 chunk +0 lines, -1 line 0 comments Download
M src/parser.cc View 1 8 chunks +30 lines, -26 lines 2 comments Download
M src/preparser.h View 10 chunks +15 lines, -0 lines 0 comments Download
M src/preparser.cc View 1 6 chunks +21 lines, -23 lines 0 comments Download
M test/mjsunit/harmony/block-early-errors.js View 2 chunks +1 line, -2 lines 0 comments Download
M test/mjsunit/harmony/iteration-syntax.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
rossberg
6 years, 5 months ago (2014-07-09 14:07:15 UTC) #1
marja
https://codereview.chromium.org/378303003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/378303003/diff/1/src/parser.cc#newcode1168 src/parser.cc:1168: if (allow_harmony_scoping() && strict_mode() == STRICT) { (See below; ...
6 years, 5 months ago (2014-07-09 14:24:46 UTC) #2
rossberg
https://codereview.chromium.org/378303003/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/378303003/diff/1/src/parser.cc#newcode1672 src/parser.cc:1672: if (allow_harmony_scoping() && strict_mode() == STRICT) { On 2014/07/09 ...
6 years, 5 months ago (2014-07-09 14:28:50 UTC) #3
marja
On 2014/07/09 14:28:50, rossberg wrote: > https://codereview.chromium.org/378303003/diff/1/src/parser.cc > File src/parser.cc (right): > > https://codereview.chromium.org/378303003/diff/1/src/parser.cc#newcode1672 > ...
6 years, 5 months ago (2014-07-09 14:43:11 UTC) #4
marja
On 2014/07/09 14:43:11, marja wrote: > On 2014/07/09 14:28:50, rossberg wrote: > > https://codereview.chromium.org/378303003/diff/1/src/parser.cc > ...
6 years, 5 months ago (2014-07-09 14:43:28 UTC) #5
marja
Actually, how about you add ASSERT(allow_harmony_scoping()) instead? That'll have both good sides: 1) you can ...
6 years, 5 months ago (2014-07-09 17:26:05 UTC) #6
ulan
lgtm > Actually, how about you add ASSERT(allow_harmony_scoping()) instead? +1
6 years, 5 months ago (2014-07-10 07:10:04 UTC) #7
rossberg
On 2014/07/09 17:26:05, marja wrote: > Actually, how about you add ASSERT(allow_harmony_scoping()) instead? That'll > ...
6 years, 5 months ago (2014-07-10 14:02:18 UTC) #8
marja
LGTM modulo comments: 1) it would be good to add test-parsing tests which use let ...
6 years, 5 months ago (2014-07-10 14:05:28 UTC) #9
rossberg
Committed patchset #2 manually as r22323 (presubmit successful).
6 years, 5 months ago (2014-07-10 14:06:47 UTC) #10
rossberg
6 years, 5 months ago (2014-07-10 14:08:24 UTC) #11
Message was sent while issue was closed.
On 2014/07/10 14:05:28, marja wrote:
> LGTM modulo comments:

Oops, already committed before your reply. Will do that in a follow-up CL.

> 1) it would be good to add test-parsing tests which use let as an identifier
(so
> we can make sure that Parser and PreParser agree -- no other tests are testing
> that)
> 
> 2) see below
> 
> https://codereview.chromium.org/378303003/diff/20001/src/parser.cc
> File src/parser.cc (right):
> 
> https://codereview.chromium.org/378303003/diff/20001/src/parser.cc#newcode2082
> src/parser.cc:2082: } else if (peek() == Token::LET && strict_mode() ==
STRICT)
> {
> Here you probably also want to ASSERT(allow_harmony_scoping()) too.
> 
> https://codereview.chromium.org/378303003/diff/20001/src/parser.cc#newcode3121
> src/parser.cc:3121: } else if (peek() == Token::LET && strict_mode() ==
STRICT)
> {
> Ditto

Powered by Google App Engine
This is Rietveld 408576698