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

Issue 1655833002: Remove the template magic from types.(h|cc), remove types-inl.h. (Closed)

Created:
4 years, 10 months ago by Jarin
Modified:
4 years, 10 months ago
CC:
v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com, Yang, v8-ppc-ports_googlegroups.com, v8-mips-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Remove the template magic from types.(h|cc), remove types-inl.h. This CL removes the Config templatization from the types. It is not necessary anymore, after the HeapTypes have been removed. The CL also changes the type hierarchy - the specific type kinds are not inner classes of the Type class and they do not inherit from Type. This is partly because it seems impossible to make this work without templates. Instead, a new TypeBase class is introduced and all the structural (i.e., non-bitset) types inherit from it. The bitset type still requires the bit-munging hack and some nasty reinterpret-casts to pretend bitsets are of type Type*. Additionally, there is now the same hack for TypeBase - all pointers to the sub-types of TypeBase are reinterpret-casted to Type*. This is to keep the type constructors in inline method definitions (although it is unclear how much that actually buys us). In future, we would like to move to a model where we encapsulate Type* into a class (or possibly use Type where we used to use Type*). This would loosen the coupling between bitset size and pointer size, and eventually we would be able to have more bits. TBR=bradnelson@chromium.org Committed: https://crrev.com/ef35f11c430264f80885bc6825bc4fe1f0ee5e8d Cr-Commit-Position: refs/heads/master@{#33656}

Patch Set 1 #

Patch Set 2 : Undo whitespace changes #

Patch Set 3 : Remove whitespace changes #

Patch Set 4 : Attempt to fix win build #

Patch Set 5 : Another attempt #

Patch Set 6 : Rebase #

Patch Set 7 : Undo whitespace change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1553 lines, -2336 lines) Patch
M BUILD.gn View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M src/ast/ast.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/ast/ast.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/bootstrapper.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 8 chunks +10 lines, -13 lines 0 comments Download
M src/code-stubs.cc View 2 chunks +6 lines, -8 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 3 chunks +7 lines, -9 lines 0 comments Download
M src/compiler/access-builder.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/access-info.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/common-operator.h View 1 chunk +1 line, -5 lines 0 comments Download
M src/compiler/node-properties.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/simplified-operator.h View 1 chunk +1 line, -4 lines 0 comments Download
M src/compiler/simplified-operator.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/typer.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/compiler/typer.cc View 18 chunks +72 lines, -134 lines 0 comments Download
M src/compiler/verifier.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 8 chunks +14 lines, -13 lines 0 comments Download
M src/crankshaft/hydrogen-types.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/crankshaft/typing.cc View 14 chunks +28 lines, -27 lines 0 comments Download
M src/ic/ic-state.cc View 1 chunk +10 lines, -10 lines 0 comments Download
M src/interface-descriptors.h View 6 chunks +10 lines, -15 lines 0 comments Download
M src/interface-descriptors.cc View 17 chunks +80 lines, -109 lines 0 comments Download
M src/messages.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 2 chunks +1 line, -1 line 0 comments Download
M src/property-details.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/type-cache.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/type-info.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M src/types.h View 1 2 3 3 chunks +515 lines, -691 lines 0 comments Download
M src/types.cc View 47 chunks +208 lines, -288 lines 0 comments Download
D src/types-inl.h View 1 chunk +0 lines, -286 lines 0 comments Download
M src/typing-asm.cc View 34 chunks +47 lines, -50 lines 0 comments Download
M src/wasm/asm-wasm-builder.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M test/cctest/test-asm-validator.cc View 13 chunks +23 lines, -25 lines 0 comments Download
M test/cctest/test-types.cc View 1 2 3 4 94 chunks +380 lines, -470 lines 0 comments Download
M test/cctest/types-fuzz.h View 11 chunks +102 lines, -127 lines 0 comments Download
M test/unittests/compiler/escape-analysis-unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/unittests/compiler/js-intrinsic-lowering-unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 chunk +1 line, -4 lines 0 comments Download
M test/unittests/compiler/simplified-operator-unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/unittests/compiler/typer-unittest.cc View 5 chunks +14 lines, -14 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 23 (11 generated)
Jarin
Could you take a look, please?
4 years, 10 months ago (2016-02-01 11:48:48 UTC) #3
Benedikt Meurer
Wow... C++... but good to see this template hell going away. I'd actually prefer to ...
4 years, 10 months ago (2016-02-01 18:24:26 UTC) #4
rossberg
> The CL also changes the type hierarchy - the specific type kinds are > ...
4 years, 10 months ago (2016-02-01 18:35:02 UTC) #5
Jarin
On 2016/02/01 18:35:02, rossberg wrote: > > The CL also changes the type hierarchy - ...
4 years, 10 months ago (2016-02-02 05:39:35 UTC) #6
Jarin
On 2016/02/01 18:35:02, rossberg wrote: > > The CL also changes the type hierarchy - ...
4 years, 10 months ago (2016-02-02 05:39:38 UTC) #7
Jarin
On 2016/02/02 05:39:38, Jarin wrote: > On 2016/02/01 18:35:02, rossberg wrote: > > > The ...
4 years, 10 months ago (2016-02-02 06:17:30 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655833002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655833002/100001
4 years, 10 months ago (2016-02-02 06:46:04 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/10398)
4 years, 10 months ago (2016-02-02 06:51:29 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1655833002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1655833002/120001
4 years, 10 months ago (2016-02-02 06:53:53 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 10 months ago (2016-02-02 07:25:41 UTC) #19
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/ef35f11c430264f80885bc6825bc4fe1f0ee5e8d Cr-Commit-Position: refs/heads/master@{#33656}
4 years, 10 months ago (2016-02-02 07:26:19 UTC) #21
bradnelson
4 years, 10 months ago (2016-02-02 22:01:20 UTC) #23
Message was sent while issue was closed.
Wow, missed this until I hit a merge.
But glad to see the split go away!
lgtm

Powered by Google App Engine
This is Rietveld 408576698