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

Unified Diff: src/mark-compact.cc

Issue 10444055: Promoting elements transitions to their own field. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: renaming SearchMode fields and moving it into descriptor array class Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 8e149fee09f4f4fc31ab5a2c25d13a42079e9a19..878c97413bb79e6160ee3fa50e367db398c18f91 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1883,6 +1883,17 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) {
enum_cache);
}
+ // TODO(verwaest) Make sure we free unused transitions.
+ if (descriptors->elements_transition_map() != NULL) {
+ Object** transitions_slot = descriptors->GetTransitionsSlot();
+ Object* transitions = *transitions_slot;
+ base_marker()->MarkObjectAndPush(
+ reinterpret_cast<HeapObject*>(transitions));
+ mark_compact_collector()->RecordSlot(descriptor_start,
+ transitions_slot,
+ transitions);
+ }
+
// If the descriptor contains a transition (value is a Map), we don't mark the
// value as live. It might be set to the NULL_DESCRIPTOR in
// ClearNonLiveTransitions later.
@@ -1921,12 +1932,6 @@ void Marker<T>::MarkDescriptorArray(DescriptorArray* descriptors) {
MarkAccessorPairSlot(accessors, AccessorPair::kSetterOffset);
}
break;
- case ELEMENTS_TRANSITION:
- // For maps with multiple elements transitions, the transition maps are
- // stored in a FixedArray. Keep the fixed array alive but not the maps
- // that it refers to.
- if (value->IsFixedArray()) base_marker()->MarkObjectWithoutPush(value);
- break;
case MAP_TRANSITION:
case CONSTANT_TRANSITION:
case NULL_DESCRIPTOR:
« no previous file with comments | « src/ic.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698