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

Unified Diff: src/objects.cc

Issue 1675163003: Filter out invalid slots in store buffer eagerly during object transition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable WriteBarrierObjectShiftFieldsRight test and add comments Created 4 years, 10 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/heap/store-buffer.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('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 e6fc951513ce89e4fc91cfbfa1c400309c67a52b..f1882a143a743ef8216e449acc5fba671618be12 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2998,6 +2998,8 @@ void JSObject::MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map) {
// From here on we cannot fail and we shouldn't GC anymore.
DisallowHeapAllocation no_allocation;
+ Heap* heap = isolate->heap();
+
// Copy (real) inobject properties. If necessary, stop at number_of_fields to
// avoid overwriting |one_pointer_filler_map|.
int limit = Min(inobject, number_of_fields);
@@ -3010,12 +3012,16 @@ void JSObject::MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map) {
DCHECK(value->IsMutableHeapNumber());
object->RawFastDoublePropertyAtPut(index,
HeapNumber::cast(value)->value());
+ if (i < old_number_of_fields && !old_map->IsUnboxedDoubleField(index)) {
+ // Transition from tagged to untagged slot.
+ heap->ClearRecordedSlot(*object,
+ HeapObject::RawField(*object, index.offset()));
+ }
} else {
object->RawFastPropertyAtPut(index, value);
}
}
- Heap* heap = isolate->heap();
// If there are properties in the new backing store, trim it to the correct
// size and install the backing store into the object.
« no previous file with comments | « src/heap/store-buffer.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698