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

Issue 2278153004: Refactor object/class literal property name parsing (Closed)

Created:
4 years, 3 months ago by bakkot
Modified:
4 years, 3 months ago
Reviewers:
Dan Ehrenberg, marja
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Refactor object/class literal property name parsing This patch arranges that property names are parsed in a single pass, reporting the name as well as the type of the property, instead of parsing qualifiers like 'static' or 'get' initially as names and then re-parsing. This change is easier to reason about, very slightly (4%) faster in some cases (although slower in other, less common ones, though this slowdown will be fixed in an upcoming patch), and is a prerequisite for separating the parsing of object and class literal properties, which will become increasingly important as ECMAScript adds more class features. Committed: https://crrev.com/6dd26c729584024e17a05a2a76b319d4aecdc138 Cr-Commit-Position: refs/heads/master@{#39027}

Patch Set 1 #

Patch Set 2 : fix dchecks #

Patch Set 3 : make compilers happy #

Total comments: 6

Patch Set 4 : rebase #

Patch Set 5 : address comments #

Total comments: 2

Patch Set 6 : more SetPropertyKind #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -142 lines) Patch
M src/parsing/parser.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 12 chunks +232 lines, -138 lines 0 comments Download
M src/parsing/preparser.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (23 generated)
bakkot
PTAL
4 years, 3 months ago (2016-08-26 17:47:00 UTC) #15
Dan Ehrenberg
I like this new logic. A couple minor points. https://codereview.chromium.org/2278153004/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2278153004/diff/40001/src/parsing/parser-base.h#newcode1095 src/parsing/parser-base.h:1095: ...
4 years, 3 months ago (2016-08-27 00:09:00 UTC) #18
bakkot
https://codereview.chromium.org/2278153004/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2278153004/diff/40001/src/parsing/parser-base.h#newcode1095 src/parsing/parser-base.h:1095: enum PropertyKind { On 2016/08/27 at 00:09:00, Dan Ehrenberg ...
4 years, 3 months ago (2016-08-27 01:51:54 UTC) #19
marja
lgtm % comment, but pls wait for littledan@'s review before landing. https://codereview.chromium.org/2278153004/diff/80001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): ...
4 years, 3 months ago (2016-08-29 08:07:46 UTC) #20
bakkot
https://codereview.chromium.org/2278153004/diff/80001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2278153004/diff/80001/src/parsing/parser-base.h#newcode1994 src/parsing/parser-base.h:1994: if (peek() != Token::COLON && *kind == PropertyKind::kValueProperty) { ...
4 years, 3 months ago (2016-08-29 19:54:50 UTC) #21
Dan Ehrenberg
lgtm
4 years, 3 months ago (2016-08-30 22:31:20 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2278153004/120001
4 years, 3 months ago (2016-08-30 23:55:16 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-08-30 23:57:00 UTC) #30
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/6dd26c729584024e17a05a2a76b319d4aecdc138 Cr-Commit-Position: refs/heads/master@{#39027}
4 years, 3 months ago (2016-08-30 23:58:04 UTC) #32
adamk
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2295743003/ by adamk@chromium.org. ...
4 years, 3 months ago (2016-08-31 00:38:35 UTC) #33
bakkot
4 years, 3 months ago (2016-08-31 01:20:31 UTC) #34
Message was sent while issue was closed.
On 2016/08/31 at 00:38:35, adamk wrote:
> A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/2295743003/ by adamk@chromium.org.
> 
> The reason for reverting is: Fails to reject "{*foo: 1}" as an object literal,
found
> by the fuzzer:
> 
>
https://build.chromium.org/p/client.v8/builders/V8%20Fuzzer/builds/12315/step....

Relanding at https://codereview.chromium.org/2300503002

Powered by Google App Engine
This is Rietveld 408576698