AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>(
reinterpret_cast<Address>(result) + map->instance_size());
alloc_memento->set_map_no_write_barrier(allocation_memento_map());
+
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks
+ CHECK(allocation_site->map() == allocation_site_map());
+
alloc_memento->set_allocation_site(*allocation_site, SKIP_WRITE_BARRIER);
return result;
}
AllocationMemento* alloc_memento;
if (maybe_alloc_memento->To(&alloc_memento)) {
alloc_memento->set_map_no_write_barrier(allocation_memento_map());
+
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks
+ CHECK(site->map() == allocation_site_map());
+
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER);
}
}
AllocationMemento* alloc_memento = reinterpret_cast<AllocationMemento*>(
reinterpret_cast<Address>(clone) + object_size);
alloc_memento->set_map_no_write_barrier(allocation_memento_map());
+
+ // TODO(mvstanton): To diagnose bug 284577, some extra checks
+ CHECK(site->map() == allocation_site_map());
+
alloc_memento->set_allocation_site(site, SKIP_WRITE_BARRIER);
}
Handle<Map> alloc_memento_map(
isolate()->heap()->allocation_memento_map());
AddStoreMapConstant(alloc_memento, alloc_memento_map);
+
+ // TODO(mvstanton): the code below is turned on to diagnose chromium bug
+ // 284577.
+ Handle<Map> alloc_site_map(isolate()->heap()->allocation_site_map());
+ IfBuilder builder(this);
+ // Read the map
+ HValue* map_field = Add<HLoadNamedField>(alloc_site,
+ HObjectAccess::ForMap());
+ HValue* alloc_site_map_value = Add<HConstant>(alloc_site_map);
+ builder.IfNot<HCompareObjectEqAndBranch>(map_field, alloc_site_map_value);
+ builder.Then();
+ AddInstruction(new(zone()) HDebugBreak());
+ builder.End();
+
HObjectAccess access = HObjectAccess::ForAllocationMementoSite();
Add<HStoreNamedField>(alloc_memento, access, alloc_site);
return alloc_memento;