| Index: src/x64/full-codegen-x64.cc
|
| ===================================================================
|
| --- src/x64/full-codegen-x64.cc (revision 6621)
|
| +++ src/x64/full-codegen-x64.cc (working copy)
|
| @@ -1529,14 +1529,9 @@
|
| __ j(smi, &smi_case);
|
|
|
| __ bind(&stub_call);
|
| - GenericBinaryOpStub stub(op, mode, NO_SMI_CODE_IN_STUB, TypeInfo::Unknown());
|
| - if (stub.ArgsInRegistersSupported()) {
|
| - stub.GenerateCall(masm_, rdx, rcx);
|
| - } else {
|
| - __ push(rdx);
|
| - __ push(rcx);
|
| - __ CallStub(&stub);
|
| - }
|
| + TypeRecordingBinaryOpStub stub(op, mode);
|
| + __ movq(rax, rcx);
|
| + __ CallStub(&stub);
|
| __ jmp(&done);
|
|
|
| __ bind(&smi_case);
|
| @@ -1580,14 +1575,9 @@
|
|
|
| void FullCodeGenerator::EmitBinaryOp(Token::Value op,
|
| OverwriteMode mode) {
|
| - GenericBinaryOpStub stub(op, mode, NO_GENERIC_BINARY_FLAGS);
|
| - if (stub.ArgsInRegistersSupported()) {
|
| - __ pop(rdx);
|
| - stub.GenerateCall(masm_, rdx, rax);
|
| - } else {
|
| - __ push(result_register());
|
| - __ CallStub(&stub);
|
| - }
|
| + TypeRecordingBinaryOpStub stub(op, mode);
|
| + __ pop(rdx);
|
| + __ CallStub(&stub);
|
| context()->Plug(rax);
|
| }
|
|
|
| @@ -3217,6 +3207,7 @@
|
| // the first smi check before calling ToNumber.
|
| is_smi = masm_->CheckSmi(rax);
|
| __ j(is_smi, &done);
|
| +
|
| __ bind(&stub_call);
|
| // Call stub. Undo operation first.
|
| if (expr->op() == Token::INC) {
|
| @@ -3230,12 +3221,16 @@
|
| SetSourcePosition(expr->position());
|
|
|
| // Call stub for +1/-1.
|
| - GenericBinaryOpStub stub(expr->binary_op(),
|
| - NO_OVERWRITE,
|
| - NO_GENERIC_BINARY_FLAGS);
|
| - stub.GenerateCall(masm_, rax, Smi::FromInt(1));
|
| - __ bind(&done);
|
| + TypeRecordingBinaryOpStub stub(expr->binary_op(), NO_OVERWRITE);
|
| + if (expr->op() == Token::INC) {
|
| + __ Move(rdx, Smi::FromInt(1));
|
| + } else {
|
| + __ movq(rdx, rax);
|
| + __ Move(rax, Smi::FromInt(1));
|
| + }
|
| + __ CallStub(&stub);
|
|
|
| + __ bind(&done);
|
| // Store the value returned in rax.
|
| switch (assign_type) {
|
| case VARIABLE:
|
|
|