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

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)

Created:
4 years, 3 months ago by bakkot
Modified:
4 years, 3 months ago
CC:
Benedikt Meurer, Michael Hablich, rmcilroy, v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Class fields, part 1 (parsing and infrastructure) This is one part of a WIP implementation of the stage-2 proposal to add fields to classes: https://github.com/tc39/proposal-class-public-fields See design doc: https://docs.google.com/document/d/1WRtNm3ZLNJT1WVr8aq4RJuByYgfuAFAhj20LwTW6JVE/ This adds support for parsing fields in classes, including infrastructure. In particular, it adds: * Two booleans on function literal AST nodes * Two compiler hints on SharedFunctionInfos representing said bools * A new type of ClassLiteralProperty, FIELD * Parser support for the syntax * Syntax tests * A flag to enable it. Currently the fields are parsed and then droppped. Subsequent patches will add semantics, mostly by desugaring in the parser and the remainder in the non-crankshaft backends. BUG=v8:5367 Committed: https://crrev.com/fe6b76d4911f6934359a5ca368c0a75f74110179 Cr-Commit-Position: refs/heads/master@{#39459}

Patch Set 1 #

Total comments: 8

Patch Set 2 : address dan's comments #

Patch Set 3 : dan's comments pt2: tests #

Total comments: 2

Patch Set 4 : dan nit #

Patch Set 5 : bmeurer nit #

Patch Set 6 : whitespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -41 lines) Patch
M src/ast/ast.h View 1 6 chunks +38 lines, -12 lines 0 comments Download
M src/ast/prettyprinter.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/ast/scopes.h View 1 2 3 4 5 1 chunk +8 lines, -1 line 0 comments Download
M src/bootstrapper.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/s390/full-codegen-s390.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.h View 2 chunks +8 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/parsing/parse-info.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/parsing/parse-info.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/parsing/parser.h View 2 chunks +4 lines, -2 lines 0 comments Download
M src/parsing/parser.cc View 9 chunks +42 lines, -15 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 10 chunks +74 lines, -9 lines 0 comments Download
M src/parsing/preparser.h View 2 chunks +5 lines, -0 lines 0 comments Download
M test/cctest/test-parsing.cc View 1 2 3 chunks +157 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 32 (23 generated)
bakkot
PTAL. Not all of the changes make sense without context, but the next patch will ...
4 years, 3 months ago (2016-09-06 23:12:43 UTC) #4
Dan Ehrenberg
Looks mostly good, a couple comments. https://codereview.chromium.org/2315733003/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/2315733003/diff/1/src/ast/ast.h#newcode2698 src/ast/ast.h:2698: bool is_class_field_initializer_; // ...
4 years, 3 months ago (2016-09-06 23:55:59 UTC) #7
bakkot
Addressed Dan's comments. cc bmeurer@ for the AST change. https://codereview.chromium.org/2315733003/diff/1/src/ast/ast.h File src/ast/ast.h (right): https://codereview.chromium.org/2315733003/diff/1/src/ast/ast.h#newcode2698 src/ast/ast.h:2698: ...
4 years, 3 months ago (2016-09-07 19:30:12 UTC) #8
Benedikt Meurer
LGTM on ast with nit. https://codereview.chromium.org/2315733003/diff/40001/src/ast/scopes.h File src/ast/scopes.h (right): https://codereview.chromium.org/2315733003/diff/40001/src/ast/scopes.h#newcode682 src/ast/scopes.h:682: // property to store ...
4 years, 3 months ago (2016-09-08 03:51:02 UTC) #10
Dan Ehrenberg
lgtm Looks good, just a nit remaining. https://codereview.chromium.org/2315733003/diff/40001/src/parsing/parser-base.h File src/parsing/parser-base.h (right): https://codereview.chromium.org/2315733003/diff/40001/src/parsing/parser-base.h#newcode2163 src/parsing/parser-base.h:2163: scope()->SetLanguageMode(static_cast<LanguageMode>(language_mode() | ...
4 years, 3 months ago (2016-09-09 20:58:15 UTC) #12
Dan Ehrenberg
lgtm
4 years, 3 months ago (2016-09-13 18:00:52 UTC) #17
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/2315733003/100001
4 years, 3 months ago (2016-09-16 00:39:49 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 3 months ago (2016-09-16 00:42:37 UTC) #30
commit-bot: I haz the power
4 years, 3 months ago (2016-09-16 00:42:59 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/fe6b76d4911f6934359a5ca368c0a75f74110179
Cr-Commit-Position: refs/heads/master@{#39459}

Powered by Google App Engine
This is Rietveld 408576698