Index: src/x87/full-codegen-x87.cc |
diff --git a/src/x87/full-codegen-x87.cc b/src/x87/full-codegen-x87.cc |
index 4ee27490a9bf03024839ca3bf9794791eb3e83bb..ace06972b4ce82b748384317a644928e515af643 100644 |
--- a/src/x87/full-codegen-x87.cc |
+++ b/src/x87/full-codegen-x87.cc |
@@ -4939,9 +4939,11 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
__ jmp(&stub_call, Label::kNear); |
__ 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()) { |
@@ -4982,6 +4984,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 eax. |
switch (assign_type) { |
case VARIABLE: |