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

Unified Diff: src/objects.cc

Issue 10692130: Swap bitfield3 and backpointer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: u Created 8 years, 5 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 56e8ada4afd3b1c172ce9b6d59b079154912b418..368123e5e68b54d0ed77b92ea0bbcf097485caa2 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3399,9 +3399,7 @@ MaybeObject* JSObject::NormalizeProperties(PropertyNormalizationMode mode,
-instance_size_delta);
}
-
set_map(new_map);
- new_map->clear_instance_descriptors();
set_properties(dictionary);
@@ -4915,12 +4913,7 @@ MaybeObject* Map::CopyDropDescriptors() {
}
Map::cast(result)->set_prototype(prototype());
Map::cast(result)->set_constructor(constructor());
- // Don't copy descriptors, so map transitions always remain a forest.
- // If we retained the same descriptors we would have two maps
- // pointing to the same transition which is bad because the garbage
- // collector relies on being able to reverse pointers from transitions
- // to maps. If properties need to be retained use CopyDropTransitions.
- Map::cast(result)->clear_instance_descriptors();
+
// Please note instance_type and instance_size are set when allocated.
Map::cast(result)->set_inobject_properties(inobject_properties());
Map::cast(result)->set_unused_property_fields(unused_property_fields());
@@ -5812,7 +5805,6 @@ MaybeObject* DescriptorArray::Allocate(int number_of_descriptors,
if (!maybe_array->To(&result)) return maybe_array;
}
- result->set(kBitField3StorageIndex, Smi::FromInt(0));
result->set(kEnumerationIndexIndex,
Smi::FromInt(PropertyDetails::kInitialIndex));
result->set(kTransitionsIndex, Smi::FromInt(0));
@@ -7400,7 +7392,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (transition_index == 0 &&
!t->HasElementsTransition() &&
!t->HasPrototypeTransitions()) {
- return ClearTransitions();
+ return ClearTransitions(heap);
}
int trim = t->number_of_transitions() - transition_index;

Powered by Google App Engine
This is Rietveld 408576698