Chromium Code Reviews| Index: src/x64/full-codegen-x64.cc |
| =================================================================== |
| --- src/x64/full-codegen-x64.cc (revision 6575) |
| +++ 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); |
| + 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); |
|
Søren Thygesen Gjesse
2011/02/03 08:00:43
Remove empty line?
William Hesse
2011/02/04 14:37:25
I like an empty line before a new section of gener
|
| + |
| __ 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: |