Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index d3e58e8a000da26a8c20b52cd1b54a3582db701c..f6a74da18b8b490314fc641e890829533bef8c7c 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -6622,8 +6622,7 @@ Handle<Map> Map::RawCopy(Handle<Map> map, int instance_size) { |
if (!map->is_dictionary_map()) { |
new_bit_field3 = IsUnstable::update(new_bit_field3, false); |
} |
- new_bit_field3 = ConstructionCount::update(new_bit_field3, |
- JSFunction::kNoSlackTracking); |
+ new_bit_field3 = Counter::update(new_bit_field3, kRetainingCounterStart); |
result->set_bit_field3(new_bit_field3); |
return result; |
} |
@@ -10262,17 +10261,13 @@ void JSFunction::StartInobjectSlackTracking() { |
Map* map = initial_map(); |
- // Only initiate the tracking the first time. |
- if (map->done_inobject_slack_tracking()) return; |
- map->set_done_inobject_slack_tracking(true); |
- |
// No tracking during the snapshot construction phase. |
Isolate* isolate = GetIsolate(); |
if (isolate->serializer_enabled()) return; |
if (map->unused_property_fields() == 0) return; |
- map->set_construction_count(kGenerousAllocationCount); |
+ map->set_counter(Map::kSlackTrackingCounterStart); |
} |
@@ -10319,8 +10314,8 @@ void JSFunction::CompleteInobjectSlackTracking() { |
DCHECK(has_initial_map()); |
Map* map = initial_map(); |
- DCHECK(map->done_inobject_slack_tracking()); |
- map->set_construction_count(kNoSlackTracking); |
+ DCHECK(map->counter() >= Map::kSlackTrackingCounterEnd - 1); |
+ map->set_counter(Map::kRetainingCounterStart); |
int slack = map->unused_property_fields(); |
map->TraverseTransitionTree(&GetMinInobjectSlack, &slack); |