Commit a448d424 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Removed recording of Target Slot in transition arrays since they only contain maps.

Review URL: https://chromiumcodereview.appspot.com/10802048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cf6d80e1
...@@ -7218,6 +7218,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) { ...@@ -7218,6 +7218,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (!HasTransitionArray()) return; if (!HasTransitionArray()) return;
TransitionArray* t = transitions(); TransitionArray* t = transitions();
MarkCompactCollector* collector = heap->mark_compact_collector();
int transition_index = 0; int transition_index = 0;
...@@ -7226,14 +7227,11 @@ void Map::ClearNonLiveTransitions(Heap* heap) { ...@@ -7226,14 +7227,11 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (!ClearBackPointer(heap, t->GetTarget(i))) { if (!ClearBackPointer(heap, t->GetTarget(i))) {
if (i != transition_index) { if (i != transition_index) {
String* key = t->GetKey(i); String* key = t->GetKey(i);
Map* target = t->GetTarget(i);
t->SetKey(transition_index, key); t->SetKey(transition_index, key);
t->SetTarget(transition_index, target);
MarkCompactCollector* collector = heap->mark_compact_collector();
Object** key_slot = t->GetKeySlot(transition_index); Object** key_slot = t->GetKeySlot(transition_index);
collector->RecordSlot(key_slot, key_slot, key); collector->RecordSlot(key_slot, key_slot, key);
Object** target_slot = t->GetTargetSlot(transition_index); // Target slots do not need to be recorded since maps are not compacted.
collector->RecordSlot(target_slot, target_slot, target); t->SetTarget(transition_index, t->GetTarget(i));
} }
transition_index++; transition_index++;
} }
......
...@@ -144,14 +144,6 @@ Map* TransitionArray::GetTarget(int transition_number) { ...@@ -144,14 +144,6 @@ Map* TransitionArray::GetTarget(int transition_number) {
} }
Object** TransitionArray::GetTargetSlot(int transition_number) {
ASSERT(transition_number < number_of_transitions());
return HeapObject::RawField(
reinterpret_cast<HeapObject*>(this),
OffsetOfElementAt(ToTargetIndex(transition_number)));
}
void TransitionArray::SetTarget(int transition_number, Map* value) { void TransitionArray::SetTarget(int transition_number, Map* value) {
ASSERT(transition_number < number_of_transitions()); ASSERT(transition_number < number_of_transitions());
set(ToTargetIndex(transition_number), value); set(ToTargetIndex(transition_number), value);
......
...@@ -53,7 +53,6 @@ class TransitionArray: public FixedArray { ...@@ -53,7 +53,6 @@ class TransitionArray: public FixedArray {
inline Map* GetTarget(int transition_number); inline Map* GetTarget(int transition_number);
inline void SetTarget(int transition_number, Map* target); inline void SetTarget(int transition_number, Map* target);
inline Object** GetTargetSlot(int transition_number);
inline PropertyDetails GetTargetDetails(int transition_number); inline PropertyDetails GetTargetDetails(int transition_number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment