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

Issue 150103004: Unify paren handling in (Pre)Parser::ParseExpressionOrLabelledStatement. (Closed)

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

Description

Unify paren handling in Parser and PreParser. It is only needed in (Pre)Parser::ParseExpressionOrLabelledStatement for not recognizing parenthesized identifiers as labels and in (Pre)Parser::ParseSourceElements for not recognizing a parenthesized string as directive prologue. Parser Expressions don't keep track of whether they're parenthesized, so PreParser Expressions shouldn't either. In addition, add helper funcs for checking if an Expression is identifier or a given identifier. (PreParser Expressions can do this.) BUG=3126 LOG=N R=ulan@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=19140

Patch Set 1 #

Patch Set 2 : . #

Total comments: 7

Patch Set 3 : Code review (ulan@) #

Patch Set 4 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -65 lines) Patch
M src/ast.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/ast.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M src/parser.cc View 1 2 3 5 chunks +9 lines, -14 lines 0 comments Download
M src/preparser.h View 1 2 5 chunks +5 lines, -42 lines 0 comments Download
M src/preparser.cc View 1 2 3 3 chunks +15 lines, -9 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ulan
lgtm https://codereview.chromium.org/150103004/diff/30001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/150103004/diff/30001/src/ast.h#newcode356 src/ast.h:356: bool IsIdentifierCalled(String* name); Nit: I first understood "IsIdentifierCalled" ...
6 years, 10 months ago (2014-02-06 09:38:05 UTC) #1
marja
Thx for review! https://codereview.chromium.org/150103004/diff/30001/src/ast.h File src/ast.h (right): https://codereview.chromium.org/150103004/diff/30001/src/ast.h#newcode356 src/ast.h:356: bool IsIdentifierCalled(String* name); On 2014/02/06 09:38:05, ...
6 years, 10 months ago (2014-02-06 10:27:53 UTC) #2
marja
https://codereview.chromium.org/150103004/diff/30001/src/preparser.cc File src/preparser.cc (right): https://codereview.chromium.org/150103004/diff/30001/src/preparser.cc#newcode476 src/preparser.cc:476: if (peek() == Token::COLON && starts_with_idenfifier && expr.IsIdentifier()) { ...
6 years, 10 months ago (2014-02-06 10:28:26 UTC) #3
marja
6 years, 10 months ago (2014-02-06 10:30:11 UTC) #4
Message was sent while issue was closed.
Committed patchset #4 manually as r19140 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698