Index: src/arm64/full-codegen-arm64.cc |
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc |
index 8ccf4a1011dc0613a6ded13b05d1e9ca6cf50c7f..3e8026f3248a35ff1737e67dcfa89972ee308ec6 100644 |
--- a/src/arm64/full-codegen-arm64.cc |
+++ b/src/arm64/full-codegen-arm64.cc |
@@ -4708,9 +4708,11 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ B(&stub_call); |
__ Bind(&slow); |
} |
- ToNumberStub convert_stub(isolate()); |
- __ CallStub(&convert_stub); |
- PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
+ if (!is_strong(language_mode())) { |
+ ToNumberStub convert_stub(isolate()); |
+ __ CallStub(&convert_stub); |
+ PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
+ } |
// Save result for postfix expressions. |
if (expr->is_postfix()) { |
@@ -4755,6 +4757,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
} |
__ Bind(&done); |
+ if (is_strong(language_mode())) { |
+ PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
+ } |
// Store the value returned in x0. |
switch (assign_type) { |
case VARIABLE: |