Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 08a39a1400b2a872c8fb6ef9818d6b38cdcade48..1e87a589f8fb5ba6a3e3d7ba20518f7cb1b525da 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -5039,9 +5039,11 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ jmp(&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()) { |
@@ -5082,6 +5084,9 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
patch_site.EmitPatchInfo(); |
__ bind(&done); |
+ if (is_strong(language_mode())) { |
+ PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
+ } |
// Store the value returned in v0. |
switch (assign_type) { |
case VARIABLE: |