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

Issue 6246064: Issue 117 - strict mode and future reserved words (Closed)

Created:
9 years, 10 months ago by Peter Hallam
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein, Rico
CC:
v8-dev
Visibility:
Public.

Description

Issue 117 - strict mode and future reserved words Adds a new token value for all future reserved words. The scanner is not strict mode aware and always returns the new IDENTIFIER_OR_FUTURE_RESERVED_WORD token. The parser and preparser check for the new token type based on the strict mode context. BUG= TEST=

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -65 lines) Patch
M src/messages.js View 1 2 chunks +2 lines, -0 lines 0 comments Download
M src/parser.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M src/parser.cc View 1 19 chunks +79 lines, -16 lines 0 comments Download
M src/preparser.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/preparser.cc View 1 8 chunks +21 lines, -10 lines 0 comments Download
M src/scanner-base.h View 2 chunks +8 lines, -1 line 0 comments Download
M src/scanner-base.cc View 1 6 chunks +55 lines, -6 lines 0 comments Download
M src/token.h View 1 2 chunks +5 lines, -32 lines 0 comments Download
M test/mjsunit/strict-mode.js View 1 1 chunk +65 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Peter Hallam
Issue 117 - strict mode and future reserved words Adds a new token value for ...
9 years, 10 months ago (2011-02-03 03:39:30 UTC) #1
Martin Maly
Adding Lasse.
9 years, 10 months ago (2011-02-03 03:50:08 UTC) #2
Lasse Reichstein
LGTM http://codereview.chromium.org/6246064/diff/1/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/6246064/diff/1/src/parser.cc#newcode753 src/parser.cc:753: result = ParseFunctionLiteral(name, false, // strict mode identifier ...
9 years, 10 months ago (2011-02-03 11:42:47 UTC) #3
Lasse Reichstein
But remember to add some tests! We don't want any non-strict code to be affected ...
9 years, 10 months ago (2011-02-03 11:43:28 UTC) #4
Lasse Reichstein
Ignore previous comment, the tests are fine (and this is just suggesting an extra level ...
9 years, 10 months ago (2011-02-03 11:55:07 UTC) #5
Peter Hallam
http://codereview.chromium.org/6246064/diff/1/src/parser.cc File src/parser.cc (right): http://codereview.chromium.org/6246064/diff/1/src/parser.cc#newcode753 src/parser.cc:753: result = ParseFunctionLiteral(name, false, // strict mode identifier already ...
9 years, 10 months ago (2011-02-04 18:32:41 UTC) #6
Lasse Reichstein
9 years, 10 months ago (2011-02-07 08:05:36 UTC) #7
http://codereview.chromium.org/6246064/diff/1/src/parser.cc
File src/parser.cc (right):

http://codereview.chromium.org/6246064/diff/1/src/parser.cc#newcode753
src/parser.cc:753: result = ParseFunctionLiteral(name, false, // strict mode
identifier already checked???
True. Maybe at some point add an ASSERT that the name isn't reserved, and give
the false value a name (e.g., is_reserved_name).

Powered by Google App Engine
This is Rietveld 408576698