Index: src/arm64/builtins-arm64.cc |
diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc |
index 74535ba61598d93cfc88e252ecde53e68b23d86e..9f140c2f7de72999c2167702f37fbd26342fed15 100644 |
--- a/src/arm64/builtins-arm64.cc |
+++ b/src/arm64/builtins-arm64.cc |
@@ -367,13 +367,13 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
FieldMemOperand(init_map, Map::kBitField3Offset); |
// Check if slack tracking is enabled. |
__ Ldr(x4, bit_field3); |
- __ DecodeField<Map::ConstructionCount>(constructon_count, x4); |
- __ Cmp(constructon_count, Operand(JSFunction::kNoSlackTracking)); |
- __ B(eq, &allocate); |
+ __ DecodeField<Map::Counter>(constructon_count, x4); |
+ __ Cmp(constructon_count, Operand(Map::kSlackTrackingCounterEnd)); |
+ __ B(lt, &allocate); |
// Decrease generous allocation count. |
- __ Subs(x4, x4, Operand(1 << Map::ConstructionCount::kShift)); |
+ __ Subs(x4, x4, Operand(1 << Map::Counter::kShift)); |
__ Str(x4, bit_field3); |
- __ Cmp(constructon_count, Operand(JSFunction::kFinishSlackTracking)); |
+ __ Cmp(constructon_count, Operand(Map::kSlackTrackingCounterEnd)); |
__ B(ne, &allocate); |
// Push the constructor and map to the stack, and the constructor again |
@@ -381,7 +381,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ Push(constructor, init_map, constructor); |
__ CallRuntime(Runtime::kFinalizeInstanceSize, 1); |
__ Pop(init_map, constructor); |
- __ Mov(constructon_count, Operand(JSFunction::kNoSlackTracking)); |
+ __ Mov(constructon_count, Operand(Map::kSlackTrackingCounterEnd - 1)); |
__ Bind(&allocate); |
} |
@@ -434,8 +434,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
Label no_inobject_slack_tracking; |
// Check if slack tracking is enabled. |
- __ Cmp(constructon_count, Operand(JSFunction::kNoSlackTracking)); |
- __ B(eq, &no_inobject_slack_tracking); |
+ __ Cmp(constructon_count, Operand(Map::kSlackTrackingCounterEnd)); |
+ __ B(lt, &no_inobject_slack_tracking); |
constructon_count = NoReg; |
// Fill the pre-allocated fields with undef. |