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

Issue 509343002: Better typing and type verification (Closed)

Created:
6 years, 3 months ago by rossberg
Modified:
6 years, 2 months ago
CC:
v8-dev
Project:
v8
Visibility:
Public.

Description

Better typing and type verification - Extend verifier to check types of JS and Simplified nodes. - Untyped nodes now contain NULL as types, enforcing hard failure. - Typer immediately installs itself as a decorator; remove explicit decorator installation. - Decorator eagerly types all nodes that have typed inputs. - Cut down typer interface to prevent inconsistently typed graphs. - Decorators are also used by the constant cache, removing its typing   side-channel and various spurious dependencies on the typer. - Fix a couple of bugs on the way that got uncovered. To do: typing and verifying machine operators. R=titzer@chromium.org, jarin@chromium.org BUG=

Patch Set 1 #

Total comments: 11

Patch Set 2 : Drop typedness from graph #

Total comments: 1

Patch Set 3 : Eagerly type nodes where possible #

Patch Set 4 : Small refactoring #

Total comments: 4

Patch Set 5 : Addressed comments #

Patch Set 6 : Rebased and new issues fixed #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+854 lines, -377 lines) Patch
M src/compiler/change-lowering.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 2 comments Download
M src/compiler/generic-node-inl.h View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/graph.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M src/compiler/graph.cc View 1 2 3 4 5 1 chunk +11 lines, -5 lines 0 comments Download
M src/compiler/graph-builder.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler/graph-visualizer.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/js-graph.h View 1 2 3 4 5 3 chunks +1 line, -5 lines 0 comments Download
M src/compiler/js-graph.cc View 1 2 3 4 5 7 chunks +8 lines, -15 lines 0 comments Download
M src/compiler/js-inlining.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler/node.h View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M src/compiler/node-properties.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/node-properties-inl.h View 1 2 3 4 5 1 chunk +19 lines, -1 line 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 2 comments Download
M src/compiler/pipeline.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 3 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 10 chunks +16 lines, -13 lines 0 comments Download
M src/compiler/schedule.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/typer.h View 1 2 3 4 5 1 chunk +13 lines, -10 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 24 chunks +139 lines, -138 lines 0 comments Download
M src/compiler/verifier.h View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 3 chunks +532 lines, -121 lines 1 comment Download
M src/types.h View 1 2 3 4 5 6 chunks +15 lines, -3 lines 0 comments Download
M src/types.cc View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M src/types-inl.h View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M test/cctest/compiler/test-changes-lowering.cc View 1 2 3 4 5 3 chunks +3 lines, -6 lines 0 comments Download
M test/cctest/compiler/test-js-constant-cache.cc View 1 2 3 4 5 2 chunks +7 lines, -3 lines 0 comments Download
M test/cctest/compiler/test-js-context-specialization.cc View 1 2 3 4 5 3 chunks +1 line, -4 lines 0 comments Download
M test/cctest/compiler/test-js-typed-lowering.cc View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M test/cctest/compiler/test-machine-operator-reducer.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 1 2 3 4 5 2 chunks +1 line, -5 lines 0 comments Download
M test/cctest/compiler/test-simplified-lowering.cc View 1 2 3 4 5 6 chunks +10 lines, -9 lines 0 comments Download
M test/unittests/compiler/change-lowering-unittest.cc View 1 2 3 4 5 2 chunks +1 line, -3 lines 0 comments Download
M test/unittests/compiler/graph-unittest.h View 1 2 3 4 5 2 chunks +15 lines, -0 lines 0 comments Download
M test/unittests/compiler/js-builtin-reducer-unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M test/unittests/compiler/js-typed-lowering-unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M test/unittests/compiler/machine-operator-reducer-unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -4 lines 0 comments Download
M test/unittests/compiler/simplified-operator-reducer-unittest.cc View 1 2 3 4 5 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 24 (4 generated)
rossberg
6 years, 3 months ago (2014-08-28 12:36:25 UTC) #1
titzer
https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h File src/compiler/generic-node-inl.h (right): https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h#newcode26 src/compiler/generic-node-inl.h:26: inputs_.static_ = reinterpret_cast<Input*>(this + 1); That's a nice little ...
6 years, 3 months ago (2014-08-28 13:12:31 UTC) #2
rossberg
https://codereview.chromium.org/509343002/diff/1/src/compiler/graph.h File src/compiler/graph.h (right): https://codereview.chromium.org/509343002/diff/1/src/compiler/graph.h#newcode83 src/compiler/graph.h:83: bool is_typed() const { return is_typed_; } On 2014/08/28 ...
6 years, 3 months ago (2014-08-28 15:35:50 UTC) #3
Benedikt Meurer
bmeurer@chromium.org changed reviewers: + bmeurer@chromium.org
6 years, 3 months ago (2014-08-29 07:00:58 UTC) #4
Benedikt Meurer
https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h File src/compiler/generic-node-inl.h (right): https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h#newcode26 src/compiler/generic-node-inl.h:26: inputs_.static_ = reinterpret_cast<Input*>(this + 1); Ahem, can we please ...
6 years, 3 months ago (2014-08-29 07:00:58 UTC) #5
rossberg
https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h File src/compiler/generic-node-inl.h (right): https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h#newcode26 src/compiler/generic-node-inl.h:26: inputs_.static_ = reinterpret_cast<Input*>(this + 1); On 2014/08/29 07:00:58, Benedikt ...
6 years, 3 months ago (2014-08-29 07:23:42 UTC) #6
titzer
On 2014/08/29 07:23:42, rossberg wrote: > https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h > File src/compiler/generic-node-inl.h (right): > > https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h#newcode26 > ...
6 years, 2 months ago (2014-09-26 10:43:41 UTC) #7
rossberg
On 2014/09/26 10:43:41, titzer wrote: > On 2014/08/29 07:23:42, rossberg wrote: > > > https://codereview.chromium.org/509343002/diff/1/src/compiler/generic-node-inl.h ...
6 years, 2 months ago (2014-09-30 14:54:11 UTC) #8
titzer
https://codereview.chromium.org/509343002/diff/20001/src/compiler/js-graph.cc File src/compiler/js-graph.cc (right): https://codereview.chromium.org/509343002/diff/20001/src/compiler/js-graph.cc#newcode34 src/compiler/js-graph.cc:34: return c_entry_stub_constant_.is_set() This decorates the node every time you ...
6 years, 2 months ago (2014-10-01 08:18:11 UTC) #9
titzer
https://codereview.chromium.org/509343002/diff/1/src/compiler/graph.h File src/compiler/graph.h (right): https://codereview.chromium.org/509343002/diff/1/src/compiler/graph.h#newcode83 src/compiler/graph.h:83: bool is_typed() const { return is_typed_; } On 2014/08/28 ...
6 years, 2 months ago (2014-10-01 08:30:24 UTC) #10
rossberg
Changed the CL to consistently do eager typing of nodes where possible -- handling of ...
6 years, 2 months ago (2014-10-07 16:27:09 UTC) #11
titzer
Looks good other than two comments. https://codereview.chromium.org/509343002/diff/60001/src/compiler/js-graph.cc File src/compiler/js-graph.cc (right): https://codereview.chromium.org/509343002/diff/60001/src/compiler/js-graph.cc#newcode20 src/compiler/js-graph.cc:20: Node* JSGraph::CacheNode(SetOncePointer<Node>* cache, ...
6 years, 2 months ago (2014-10-08 10:39:43 UTC) #12
rossberg
https://codereview.chromium.org/509343002/diff/60001/src/compiler/js-graph.cc File src/compiler/js-graph.cc (right): https://codereview.chromium.org/509343002/diff/60001/src/compiler/js-graph.cc#newcode20 src/compiler/js-graph.cc:20: Node* JSGraph::CacheNode(SetOncePointer<Node>* cache, Node* node) { On 2014/10/08 10:39:43, ...
6 years, 2 months ago (2014-10-08 11:30:19 UTC) #13
titzer
lgtm
6 years, 2 months ago (2014-10-08 11:33:17 UTC) #14
rossberg
Rebased, necessitating various changes and non-trivial conflict resolutions, which unfortunately weren't easily separable; patch set ...
6 years, 2 months ago (2014-10-14 14:58:37 UTC) #19
titzer
lgtm with small comments. https://codereview.chromium.org/509343002/diff/160001/src/compiler/change-lowering.cc File src/compiler/change-lowering.cc (right): https://codereview.chromium.org/509343002/diff/160001/src/compiler/change-lowering.cc#newcode10 src/compiler/change-lowering.cc:10: #include "src/compiler/node-properties-inl.h" Do we need ...
6 years, 2 months ago (2014-10-14 16:13:23 UTC) #20
Michael Starzinger
One issue that I feel pretty strongly about. Please address it before landing. https://codereview.chromium.org/509343002/diff/160001/src/compiler/pipeline.h File ...
6 years, 2 months ago (2014-10-14 18:28:27 UTC) #21
rossberg
https://codereview.chromium.org/509343002/diff/160001/src/compiler/pipeline.h File src/compiler/pipeline.h (right): https://codereview.chromium.org/509343002/diff/160001/src/compiler/pipeline.h#newcode13 src/compiler/pipeline.h:13: #include "src/compiler/verifier.h" On 2014/10/14 18:28:27, Michael Starzinger wrote: > ...
6 years, 2 months ago (2014-10-15 06:47:58 UTC) #22
rossberg
https://codereview.chromium.org/509343002/diff/160001/src/compiler/change-lowering.cc File src/compiler/change-lowering.cc (right): https://codereview.chromium.org/509343002/diff/160001/src/compiler/change-lowering.cc#newcode10 src/compiler/change-lowering.cc:10: #include "src/compiler/node-properties-inl.h" On 2014/10/14 16:13:22, titzer wrote: > Do ...
6 years, 2 months ago (2014-10-15 08:59:08 UTC) #23
rossberg
6 years, 2 months ago (2014-10-15 12:15:43 UTC) #24
Accidentally committed from wrong branch as
https://codereview.chromium.org/658543002, closing this one.

Powered by Google App Engine
This is Rietveld 408576698