[runtime] Do not update visitor id on completion of slack tracking.
Visitor id for JSObjects does not depend on the instance size. BUG=chromium:694255 Change-Id: I6b4b559207609f4a4c19373572be6692a55c5187 Reviewed-on: https://chromium-review.googlesource.com/520763 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#45650}
This commit is contained in:
parent
93ae3a3624
commit
9ad14ba15a
@ -12128,14 +12128,15 @@ static void GetMinInobjectSlack(Map* map, void* data) {
|
||||
|
||||
|
||||
static void ShrinkInstanceSize(Map* map, void* data) {
|
||||
#ifdef DEBUG
|
||||
int old_visitor_id = Heap::GetStaticVisitorIdForMap(map);
|
||||
#endif
|
||||
int slack = *reinterpret_cast<int*>(data);
|
||||
map->SetInObjectProperties(map->GetInObjectProperties() - slack);
|
||||
map->set_unused_property_fields(map->unused_property_fields() - slack);
|
||||
map->set_instance_size(map->instance_size() - slack * kPointerSize);
|
||||
map->set_construction_counter(Map::kNoSlackTracking);
|
||||
|
||||
// Visitor id might depend on the instance size, recalculate it.
|
||||
map->set_visitor_id(Heap::GetStaticVisitorIdForMap(map));
|
||||
DCHECK_EQ(old_visitor_id, Heap::GetStaticVisitorIdForMap(map));
|
||||
}
|
||||
|
||||
static void StopSlackTracking(Map* map, void* data) {
|
||||
|
Loading…
Reference in New Issue
Block a user