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

Issue 10697015: Separating transitions from descriptors. (Closed)

Created:
8 years, 5 months ago by Toon Verwaest
Modified:
8 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Separating transitions from descriptors. In this design maps contain descriptor arrays, which in turn can contain transition arrays. If transitions are needed when no descriptor array is present, a descriptor array without real descriptors is inserted just so it can point at the transition array. The transition array does not contain details about the field it transitions to. In order to weed out transitions to FIELDs from CONSTANT_FUNCTION (what used to be MAP_TRANSITION vs CONSTANT_TRANSITION), the transition needs to be followed and the details need to be looked up in the target map. CALLBACKS transitions are still easy to recognize since the transition targets are stored as an AccessorPair containing the maps, rather than the maps directly. Currently AccessorPairs containing a transition and an accessor are shared between the descriptor array and the transition array. This simplifies lookup since we only have to look in one of both arrays. This will change in subsequent revisions, when descriptor arrays will become shared between multiple maps, since transitions cannot be shared. Committed: https://code.google.com/p/v8/source/detail?r=11994

Patch Set 1 #

Total comments: 114

Patch Set 2 : Addressing Michaels comments. #

Total comments: 2

Patch Set 3 : Addessing Jakobs comments #

Patch Set 4 : Using WhitenessWitness in TransitionArray code. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1503 lines, -996 lines) Patch
M src/SConscript View 4 chunks +14 lines, -13 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ast.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +1 line, -4 lines 0 comments Download
M src/factory.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/handles.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen.cc View 1 2 3 chunks +7 lines, -6 lines 0 comments Download
M src/hydrogen-instructions.cc View 3 chunks +12 lines, -5 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/ic.cc View 4 chunks +43 lines, -18 lines 0 comments Download
M src/mark-compact.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/mark-compact.cc View 1 4 chunks +40 lines, -5 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mirror-debugger.js View 1 chunk +2 lines, -4 lines 0 comments Download
M src/objects.h View 1 2 3 21 chunks +68 lines, -58 lines 0 comments Download
M src/objects.cc View 1 2 3 57 chunks +404 lines, -518 lines 0 comments Download
M src/objects-debug.cc View 1 3 chunks +42 lines, -40 lines 0 comments Download
M src/objects-inl.h View 1 2 3 13 chunks +173 lines, -116 lines 0 comments Download
M src/objects-printer.cc View 1 5 chunks +69 lines, -9 lines 0 comments Download
M src/profile-generator.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/property.h View 10 chunks +60 lines, -75 lines 0 comments Download
M src/property.cc View 1 2 3 chunks +23 lines, -37 lines 0 comments Download
M src/property-details.h View 2 chunks +14 lines, -13 lines 0 comments Download
M src/runtime.cc View 7 chunks +7 lines, -8 lines 0 comments Download
A src/transitions.h View 1 2 3 1 chunk +156 lines, -0 lines 0 comments Download
A src/transitions.cc View 1 2 3 1 chunk +127 lines, -0 lines 0 comments Download
A src/transitions-inl.h View 1 2 3 1 chunk +182 lines, -0 lines 0 comments Download
M src/v8globals.h View 2 chunks +1 line, -8 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M test/cctest/test-debug.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M test/cctest/test-heap.cc View 1 chunk +1 line, -8 lines 0 comments Download
M tools/grokdump.py View 1 chunk +7 lines, -1 line 0 comments Download
M tools/gyp/v8.gyp View 10 chunks +33 lines, -30 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Toon Verwaest
PTAL. Michael: please have a look at transition array zapping and trimming (clear non-live transitions).
8 years, 5 months ago (2012-06-28 10:03:41 UTC) #1
Michael Starzinger
First round of drive-by comments. https://chromiumcodereview.appspot.com/10697015/diff/1/src/mark-compact.cc File src/mark-compact.cc (right): https://chromiumcodereview.appspot.com/10697015/diff/1/src/mark-compact.cc#newcode1910 src/mark-compact.cc:1910: base_marker()->MarkObjectAndPush(reinterpret_cast<HeapObject*>(key)); We can also ...
8 years, 5 months ago (2012-06-28 16:02:12 UTC) #2
Toon Verwaest
Addressed Michaels comments. - Renamed elements to elements_transition. - Never return NULL for elements_transition and ...
8 years, 5 months ago (2012-06-29 08:14:55 UTC) #3
Jakob Kummerow
I have some comments. These are for patch set 1; haven't looked at patch set ...
8 years, 5 months ago (2012-06-29 16:31:36 UTC) #4
Michael Starzinger
Another round of drive-by comments. https://chromiumcodereview.appspot.com/10697015/diff/8001/src/transitions-inl.h File src/transitions-inl.h (right): https://chromiumcodereview.appspot.com/10697015/diff/8001/src/transitions-inl.h#newcode175 src/transitions-inl.h:175: void TransitionArray::Set(int transition_number, String* ...
8 years, 5 months ago (2012-07-05 12:55:51 UTC) #5
Toon Verwaest
Addressed comments. PTAL. https://chromiumcodereview.appspot.com/10697015/diff/1/src/hydrogen.cc File src/hydrogen.cc (right): https://chromiumcodereview.appspot.com/10697015/diff/1/src/hydrogen.cc#newcode4994 src/hydrogen.cc:4994: // ASSERT(lookup->IsMapTransition()); On 2012/06/29 16:31:36, Jakob ...
8 years, 5 months ago (2012-07-05 12:56:11 UTC) #6
Toon Verwaest
Moved the WhitnessWitness class to FixedArray, and used it in the TransitionArray code as well.
8 years, 5 months ago (2012-07-05 13:32:36 UTC) #7
Jakob Kummerow
LGTM if you fix the comment we discussed offline.
8 years, 5 months ago (2012-07-05 13:41:45 UTC) #8
Michael Starzinger
8 years, 5 months ago (2012-07-05 13:46:56 UTC) #9
Looks OK (but I just looked at the GC related stuff, I'll leave the final
decision up to Jakob).

Powered by Google App Engine
This is Rietveld 408576698