Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 89451524076a19e5a7356515e00db8c9e2304bb7..1cff6fe6ebb8860091c5687a44aa3b3e3e0ca4e9 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -6599,8 +6599,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; |
} |
@@ -10239,17 +10238,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); |
} |
@@ -10296,8 +10291,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); |
+ map->set_counter(Map::kRetainingCounterStart); |
int slack = map->unused_property_fields(); |
map->TraverseTransitionTree(&GetMinInobjectSlack, &slack); |