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

Issue 10575032: In-place shrinking of descriptor arrays with non-live transitions. (Closed)

Created:
8 years, 6 months ago by Toon Verwaest
Modified:
8 years, 6 months ago
Reviewers:
Michael Starzinger
CC:
v8-dev
Visibility:
Public.

Description

In-place shrinking of descriptor arrays with non-live transitions. Instead of overwriting non-live transitions with NULL_DESCRIPTORs, we remove them from the array by compacting the array (shifting live values to the left) and in-place trimming the array. If the final descriptor array contains no live values (only contained transitions which are now all cleared), we move bit_field3 back from the descriptor array to the map. The descriptor array itself will be collected in the next GC. BUG= TEST= Committed: https://code.google.com/p/v8/source/detail?r=11922

Patch Set 1 #

Total comments: 22

Patch Set 2 : Addressing comments #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -143 lines) Patch
M src/ast.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/bootstrapper.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/factory.cc View 2 chunks +7 lines, -18 lines 0 comments Download
M src/ic.cc View 1 5 chunks +6 lines, -7 lines 1 comment Download
M src/mark-compact.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M src/objects.h View 1 3 chunks +9 lines, -2 lines 1 comment Download
M src/objects.cc View 1 17 chunks +159 lines, -86 lines 3 comments Download
M src/objects-debug.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/objects-inl.h View 1 5 chunks +43 lines, -10 lines 0 comments Download
M src/objects-printer.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/profile-generator.cc View 1 chunk +3 lines, -1 line 0 comments Download
M src/property.h View 1 chunk +3 lines, -1 line 0 comments Download
M src/property.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M src/property-details.h View 1 chunk +2 lines, -5 lines 0 comments Download
M src/runtime.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Toon Verwaest
PTAL.
8 years, 6 months ago (2012-06-20 11:48:13 UTC) #1
Michael Starzinger
First round. https://chromiumcodereview.appspot.com/10575032/diff/1/src/ic.cc File src/ic.cc (left): https://chromiumcodereview.appspot.com/10575032/diff/1/src/ic.cc#oldcode1443 src/ic.cc:1443: ASSERT(lookup->type() != NULL_DESCRIPTOR); We should actually keep ...
8 years, 6 months ago (2012-06-25 11:21:57 UTC) #2
Toon Verwaest
Addressed comments, PTAL. https://chromiumcodereview.appspot.com/10575032/diff/1/src/ic.cc File src/ic.cc (left): https://chromiumcodereview.appspot.com/10575032/diff/1/src/ic.cc#oldcode1443 src/ic.cc:1443: ASSERT(lookup->type() != NULL_DESCRIPTOR); As discussed offline, ...
8 years, 6 months ago (2012-06-25 12:20:48 UTC) #3
Michael Starzinger
8 years, 6 months ago (2012-06-25 12:48:37 UTC) #4
LGTM (with a few final nits).

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/ic.cc
File src/ic.cc (right):

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/ic.cc#newcode1942
src/ic.cc:1942: ASSERT(lookup->IsFound());
Add an empty line so that it looks consistent with StoreIC::UpdateCaches.

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.cc
File src/objects.cc (right):

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.cc#newc...
src/objects.cc:7364: !heap->InNewSpace(elms)) {
Since it's debug code now, I think we should just unconditionally zap, no matter
how much we trim or in which space we trim.

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.cc#newc...
src/objects.cc:7367: zap++;  // Header of filler must be at least one word so
skip that.
Using the same reasoning, I think we should also just zap the first word.

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.cc#newc...
src/objects.cc:7390: static bool ClearNonLiveTransitionsFromDescriptor(Heap*
heap,
Add a comment describing the semantics of the return value.

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.h
File src/objects.h (right):

https://chromiumcodereview.appspot.com/10575032/diff/6001/src/objects.h#newco...
src/objects.h:4776: // store transitions, which does not contain any live
transitions anymore.
"[...] store transitions and does not [...]"

Powered by Google App Engine
This is Rietveld 408576698