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

Unified Diff: src/objects.cc

Issue 10802048: Removed recording of Target Slot in transition arrays since they only contain maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment. 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
« no previous file with comments | « no previous file | src/transitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 7ce612d83b1c79dfd49adabbe7b694ba3fbcd122..517d590f9784d362336b41670b7f2213819e02b7 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -7144,6 +7144,7 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (!HasTransitionArray()) return;
TransitionArray* t = transitions();
+ MarkCompactCollector* collector = heap->mark_compact_collector();
int transition_index = 0;
@@ -7152,14 +7153,11 @@ void Map::ClearNonLiveTransitions(Heap* heap) {
if (!ClearBackPointer(heap, t->GetTarget(i))) {
if (i != transition_index) {
String* key = t->GetKey(i);
- Map* target = t->GetTarget(i);
t->SetKey(transition_index, key);
- t->SetTarget(transition_index, target);
- MarkCompactCollector* collector = heap->mark_compact_collector();
Object** key_slot = t->GetKeySlot(transition_index);
collector->RecordSlot(key_slot, key_slot, key);
- Object** target_slot = t->GetTargetSlot(transition_index);
- collector->RecordSlot(target_slot, target_slot, target);
+ // Target slots do not need to be recorded since maps are not compacted.
+ t->SetTarget(transition_index, t->GetTarget(i));
}
transition_index++;
}
« no previous file with comments | « no previous file | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698