Chromium Code Reviews
Help | Chromium Project | Sign in
(508)

Issue 11031045: Reject uses of lexical for-loop variable on the RHS. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 6 months ago by rossberg
Modified:
1 year, 6 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev_googlegroups.com
Visibility:
Public.

Description

Reject uses of lexical for-loop variable on the RHS.

R=mstarzinger@chromium.org
BUG=v8:2322
Committed: https://code.google.com/p/v8/source/detail?r=12664

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -6 lines) Lint Patch
M src/parser.cc View 1 chunk +5 lines, -2 lines 4 comments ? errors Download
A + test/mjsunit/regress/regress-2322.js View 1 chunk +4 lines, -4 lines 2 comments ? errors Download
Trybot results:
Commit:

Messages

Total messages: 3
rossberg
1 year, 6 months ago #1
Michael Starzinger
LGTM (with nits). https://codereview.chromium.org/11031045/diff/1/src/parser.cc File src/parser.cc (right): https://codereview.chromium.org/11031045/diff/1/src/parser.cc#newcode2794 src/parser.cc:2794: top_scope_->NewUnresolved(factory(), name, interface); For consistency we ...
1 year, 6 months ago #2
rossberg
1 year, 6 months ago #3
https://codereview.chromium.org/11031045/diff/1/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/11031045/diff/1/src/parser.cc#newcode2794
src/parser.cc:2794: top_scope_->NewUnresolved(factory(), name, interface);
On 2012/10/05 08:42:36, Michael Starzinger wrote:
> For consistency we could also move this loop variable and interface down.

Done.

https://codereview.chromium.org/11031045/diff/1/src/parser.cc#newcode2841
src/parser.cc:2841: Interface* interface = Interface::NewValue();
On 2012/10/05 08:42:36, Michael Starzinger wrote:
> Can we also move the interface down right before the loop variable is created?

Inlined instead.

https://codereview.chromium.org/11031045/diff/1/test/mjsunit/regress/regress-...
File test/mjsunit/regress/regress-2322.js (right):

https://codereview.chromium.org/11031045/diff/1/test/mjsunit/regress/regress-...
test/mjsunit/regress/regress-2322.js:30: assertThrows("for (let x in x);",
SyntaxError);
On 2012/10/05 08:42:36, Michael Starzinger wrote:
> You probably want to add 'use strict' to this test case, to make sure that the
> original problem repros.

Indeed.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6