| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 19989b1c626dd3ea85f6cb9c3c44d7bfab8dffa9..82b107f07fcb9bead38f739da75fc8f53d854885 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -3972,8 +3972,14 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| VisitForAccumulatorValue(expr->expression());
|
| Label no_conversion;
|
| __ JumpIfSmi(result_register(), &no_conversion);
|
| - ToNumberStub convert_stub;
|
| - __ CallStub(&convert_stub);
|
| + __ mov(edx, Immediate(Smi::FromInt(1)));
|
| + OverwriteMode mode = expr->expression()->ResultOverwriteAllowed()
|
| + ? OVERWRITE_RIGHT : NO_OVERWRITE;
|
| + BinaryOpStub stub(Token::MUL, mode);
|
| + JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
|
| + CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET,
|
| + expr->UnaryOperationFeedbackId());
|
| + patch_site.EmitPatchInfo();
|
| __ bind(&no_conversion);
|
| context()->Plug(result_register());
|
| break;
|
|
|