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 7987002: Disallow strict mode FutureReservedWords as break/continue labels in strict mode (Closed)

Created:
9 years, 3 months ago by Steven
Modified:
9 years, 3 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Disallow strict mode FutureReservedWords as break/continue labels in strict mode TEST=preparser/strict-identifiers.pyt Committed: http://code.google.com/p/v8/source/detail?r=9404

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -3 lines) Patch
M src/preparser.cc View 2 chunks +11 lines, -3 lines 0 comments Download
M test/preparser/strict-identifiers.pyt View 4 chunks +53 lines, -0 lines 4 comments Download

Messages

Total messages: 3 (0 generated)
Steven
PTAL.
9 years, 3 months ago (2011-09-22 08:58:16 UTC) #1
Lasse Reichstein
GLTM http://codereview.chromium.org/7987002/diff/1/test/preparser/strict-identifiers.pyt File test/preparser/strict-identifiers.pyt (right): http://codereview.chromium.org/7987002/diff/1/test/preparser/strict-identifiers.pyt#newcode162 test/preparser/strict-identifiers.pyt:162: continue $id; IIRC, you can't have break and ...
9 years, 3 months ago (2011-09-22 12:50:19 UTC) #2
Steven
9 years, 3 months ago (2011-09-22 16:48:32 UTC) #3
http://codereview.chromium.org/7987002/diff/1/test/preparser/strict-identifie...
File test/preparser/strict-identifiers.pyt (right):

http://codereview.chromium.org/7987002/diff/1/test/preparser/strict-identifie...
test/preparser/strict-identifiers.pyt:162: continue $id;
On 2011/09/22 12:50:19, Lasse Reichstein wrote:
> IIRC, you can't have break and continue outside of a loop. We should check
that
> in the preparser too, so wrap these in a loop to ensure that it's only the
label
> that can cause a failure.

Done.

http://codereview.chromium.org/7987002/diff/1/test/preparser/strict-identifie...
test/preparser/strict-identifiers.pyt:238: message = "strict_reserved_word"
On 2011/09/22 12:50:19, Lasse Reichstein wrote:
> Make a label_message = message here and in case three, but make them different
> for reserved_word == "const". Then use that as message for the label_strict
> test, and avoid duplicating lines unnecessarily.

Done.

Powered by Google App Engine
This is Rietveld 408576698