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

Issue 798873006: First simple implementation of class literals in TurboFan. (Closed)

Created:
5 years, 11 months ago by Michael Starzinger
Modified:
5 years, 11 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

First simple implementation of class literals in TurboFan. R=rossberg@chromium.org,jarin@chromium.org TEST=cctest/test-run-jsops/ClassLiteral Committed: https://crrev.com/0f418385d066c724b264e3f500f46e82b60acd61 Cr-Commit-Position: refs/heads/master@{#26101}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Further simplify block context creation. #

Patch Set 3 : Split cleanup into separate CL. #

Total comments: 8

Patch Set 4 : Addressed some comments. #

Patch Set 5 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -12 lines) Patch
M src/ast.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M src/ast-numbering.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.h View 1 3 chunks +6 lines, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 4 chunks +121 lines, -6 lines 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M src/full-codegen.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M src/types.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/compiler/test-run-jsops.cc View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (3 generated)
Michael Starzinger
Jarin: Please take a look at the new bailout ids. Andreas: PTAL at the rest.
5 years, 11 months ago (2015-01-14 15:16:35 UTC) #1
arv (Not doing code reviews)
https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc#newcode343 src/compiler/ast-graph-builder.cc:343: return environment()->Push(jsgraph()->TheHoleConstant()); I could also have the parser use ...
5 years, 11 months ago (2015-01-14 15:49:10 UTC) #3
Michael Starzinger
https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc#newcode343 src/compiler/ast-graph-builder.cc:343: return environment()->Push(jsgraph()->TheHoleConstant()); On 2015/01/14 15:49:10, arv wrote: > I ...
5 years, 11 months ago (2015-01-14 16:02:20 UTC) #4
Michael Starzinger
I uploaded a small simplification of the block context creation in patch set #2.
5 years, 11 months ago (2015-01-15 09:31:11 UTC) #6
Jarin
On 2015/01/15 09:31:11, Michael Starzinger wrote: > I uploaded a small simplification of the block ...
5 years, 11 months ago (2015-01-15 10:43:59 UTC) #7
Michael Starzinger
On 2015/01/15 10:43:59, jarin wrote: > On 2015/01/15 09:31:11, Michael Starzinger wrote: > > I ...
5 years, 11 months ago (2015-01-15 10:49:59 UTC) #8
Michael Starzinger
https://codereview.chromium.org/798873006/diff/1/test/mjsunit/mjsunit.status File test/mjsunit/mjsunit.status (left): https://codereview.chromium.org/798873006/diff/1/test/mjsunit/mjsunit.status#oldcode196 test/mjsunit/mjsunit.status:196: # Skip endain dependent test for mips due to ...
5 years, 11 months ago (2015-01-15 12:48:45 UTC) #9
Michael Starzinger
On 2015/01/15 10:49:59, Michael Starzinger wrote: > On 2015/01/15 10:43:59, jarin wrote: > > On ...
5 years, 11 months ago (2015-01-15 15:12:35 UTC) #10
rossberg
LGTM with nits https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc#newcode343 src/compiler/ast-graph-builder.cc:343: return environment()->Push(jsgraph()->TheHoleConstant()); On 2015/01/14 16:02:19, Michael ...
5 years, 11 months ago (2015-01-15 15:31:19 UTC) #11
arv (Not doing code reviews)
LGTM https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc#newcode898 src/compiler/ast-graph-builder.cc:898: case ObjectLiteral::Property::PROTOTYPE: { On 2015/01/15 15:31:19, rossberg wrote: ...
5 years, 11 months ago (2015-01-15 16:12:24 UTC) #12
rossberg
https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc#newcode898 src/compiler/ast-graph-builder.cc:898: case ObjectLiteral::Property::PROTOTYPE: { On 2015/01/15 16:12:24, arv wrote: > ...
5 years, 11 months ago (2015-01-15 16:35:11 UTC) #13
arv (Not doing code reviews)
https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-builder.cc#newcode898 src/compiler/ast-graph-builder.cc:898: case ObjectLiteral::Property::PROTOTYPE: { On 2015/01/15 16:35:11, rossberg wrote: > ...
5 years, 11 months ago (2015-01-15 16:51:02 UTC) #14
Michael Starzinger
Comments addressed. https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/798873006/diff/1/src/compiler/ast-graph-builder.cc#newcode343 src/compiler/ast-graph-builder.cc:343: return environment()->Push(jsgraph()->TheHoleConstant()); On 2015/01/15 15:31:19, rossberg wrote: ...
5 years, 11 months ago (2015-01-16 09:43:55 UTC) #15
rossberg
Still lgtm
5 years, 11 months ago (2015-01-16 10:43:30 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/798873006/100001
5 years, 11 months ago (2015-01-16 12:11:05 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 11 months ago (2015-01-16 12:38:20 UTC) #19
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/0f418385d066c724b264e3f500f46e82b60acd61 Cr-Commit-Position: refs/heads/master@{#26101}
5 years, 11 months ago (2015-01-16 12:38:35 UTC) #20
arv (Not doing code reviews)
5 years, 11 months ago (2015-01-16 14:42:07 UTC) #21
Message was sent while issue was closed.
LGTM

https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-b...
File src/compiler/ast-graph-builder.cc (right):

https://codereview.chromium.org/798873006/diff/60001/src/compiler/ast-graph-b...
src/compiler/ast-graph-builder.cc:898: case ObjectLiteral::Property::PROTOTYPE:
{
On 2015/01/16 09:43:54, Michael Starzinger wrote:
> On 2015/01/15 16:51:02, arv wrote:
> > On 2015/01/15 16:35:11, rossberg wrote:
> > > On 2015/01/15 16:12:24, arv wrote:
> > > > On 2015/01/15 15:31:19, rossberg wrote:
> > > > > It seems to me that none but MATERIALIZED_LITERAL should possibly
appear
> > > here,
> > > > > so we might want to mark the others unreachable (similarly, in
> > > full-codegens).
> > > > 
> > > > I believe PROTOTYPE can happen too
> > > > 
> > > > class C {
> > > >   __proto__() {}
> > > > }
> > > 
> > > That is just considered a regular method definition, isn't it? As such, it
> > > shouldn't have PROTOTYPE kind AFAICT.
> > 
> > The AST only checks the value of the property name and since that matches
> > __proto__ it uses PROTOTYPE as the kind.
> > 
> > Let me refactor that in a different CL.
> 
> Done. Made CONSTANT and MATERIALIZED_LITERAL unreachable. Normally all
> FunctionLiterals should be COMPUTED, still need PROTOTYPE as per Arv's
> explanation. I left the full-codegens untouched.

I'll take care of this in a follow up CL

Powered by Google App Engine
This is Rietveld 408576698