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

Issue 2126233002: Devirtualize AstNode and subclasses, except for visiting-related methods. (Closed)

Created:
4 years, 5 months ago by Toon Verwaest
Modified:
4 years, 5 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Devirtualize AstNode and subclasses, except for visiting-related methods. This is a requirement to replace AstNode vtable with a NodeType tag. In a second CL (https://codereview.chromium.org/2142233003/) I switch over that tag rather than double dispatch. With additional packing in a third CL there's roughly 8 byte reduction for almost all AstNode types, and for some even more. BUG= Committed: https://crrev.com/157008add027193b9b4fc21b55ff0bec7d0901c5 Cr-Commit-Position: refs/heads/master@{#37770}

Patch Set 1 #

Patch Set 2 : Use switches #

Patch Set 3 : cleanup #

Total comments: 2

Patch Set 4 : Addressed comment #5 #

Patch Set 5 : Apply same to crankshaft #

Patch Set 6 : Restore IsMonomorphic #

Patch Set 7 : And call again #

Total comments: 9

Patch Set 8 : Addressed comments #

Patch Set 9 : Added STATIC_ASSERTs #

Patch Set 10 : remove static assert again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -145 lines) Patch
M src/ast/ast.h View 1 2 3 4 5 6 7 8 9 39 chunks +92 lines, -112 lines 0 comments Download
M src/ast/ast.cc View 1 2 3 4 5 6 7 8 9 4 chunks +157 lines, -1 line 0 comments Download
M src/compiler/ast-graph-builder.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 7 8 9 6 chunks +8 lines, -8 lines 0 comments Download
M src/crankshaft/hydrogen.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 5 6 7 8 9 11 chunks +17 lines, -21 lines 0 comments Download

Messages

Total messages: 24 (9 generated)
Toon Verwaest
PTAL This is a requirement to replace AstNode vtable with a NodeType tag. In a ...
4 years, 5 months ago (2016-07-13 16:38:40 UTC) #2
Michael Starzinger
https://codereview.chromium.org/2126233002/diff/40001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/2126233002/diff/40001/src/compiler/ast-graph-builder.cc#newcode2975 src/compiler/ast-graph-builder.cc:2975: PrepareFrameState(node, stmt->StackCheckId()); I think if we were to devirtualize ...
4 years, 5 months ago (2016-07-14 08:38:51 UTC) #4
Michael Starzinger
https://codereview.chromium.org/2126233002/diff/40001/src/compiler/ast-graph-builder.cc File src/compiler/ast-graph-builder.cc (right): https://codereview.chromium.org/2126233002/diff/40001/src/compiler/ast-graph-builder.cc#newcode2975 src/compiler/ast-graph-builder.cc:2975: PrepareFrameState(node, stmt->StackCheckId()); On 2016/07/14 08:38:51, Michael Starzinger wrote: > ...
4 years, 5 months ago (2016-07-14 08:47:01 UTC) #5
Toon Verwaest
Addressed comment
4 years, 5 months ago (2016-07-14 09:01:17 UTC) #6
Michael Starzinger
LGTM. Thanks.
4 years, 5 months ago (2016-07-14 09:02:57 UTC) #7
Igor Sheludko
https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc#newcode84 src/ast/ast.cc:84: case k##Node: \ How about adding something like STATIC_ASSERT(&Expression::initialization ...
4 years, 5 months ago (2016-07-14 14:02:33 UTC) #8
Toon Verwaest
Addressed comments. https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc#newcode84 src/ast/ast.cc:84: case k##Node: \ On 2016/07/14 14:02:33, Igor ...
4 years, 5 months ago (2016-07-14 14:19:39 UTC) #9
Igor Sheludko
https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc File src/ast/ast.cc (right): https://codereview.chromium.org/2126233002/diff/120001/src/ast/ast.cc#newcode84 src/ast/ast.cc:84: case k##Node: \ On 2016/07/14 14:19:39, Toon Verwaest wrote: ...
4 years, 5 months ago (2016-07-14 14:49:31 UTC) #10
Igor Sheludko
lgtm
4 years, 5 months ago (2016-07-14 14:52:26 UTC) #11
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/2126233002/160001
4 years, 5 months ago (2016-07-14 14:53:09 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: v8_win_nosnap_shared_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win_nosnap_shared_rel_ng/builds/5085)
4 years, 5 months ago (2016-07-14 14:56:19 UTC) #16
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/2126233002/180001
4 years, 5 months ago (2016-07-14 14:59:09 UTC) #19
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 5 months ago (2016-07-14 15:27:03 UTC) #21
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 15:27:06 UTC) #22
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 15:28:55 UTC) #24
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/157008add027193b9b4fc21b55ff0bec7d0901c5
Cr-Commit-Position: refs/heads/master@{#37770}

Powered by Google App Engine
This is Rietveld 408576698