| Index: src/x64/code-stubs-x64.cc
|
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
|
| index d1130aded0148c620860d490e9e36c3bce911d5f..16745ea679864781bf772750f3d7d6fa3e153695 100644
|
| --- a/src/x64/code-stubs-x64.cc
|
| +++ b/src/x64/code-stubs-x64.cc
|
| @@ -735,15 +735,13 @@ static void BinaryOpStub_GenerateSmiCode(
|
|
|
|
|
| static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm,
|
| - Label* alloc_failure,
|
| - OverwriteMode mode);
|
| + Label* alloc_failure);
|
|
|
|
|
| static void BinaryOpStub_GenerateFloatingPointCode(MacroAssembler* masm,
|
| Label* allocation_failure,
|
| Label* non_numeric_failure,
|
| - Token::Value op,
|
| - OverwriteMode mode) {
|
| + Token::Value op) {
|
| switch (op) {
|
| case Token::ADD:
|
| case Token::SUB:
|
| @@ -759,7 +757,7 @@ static void BinaryOpStub_GenerateFloatingPointCode(MacroAssembler* masm,
|
| default: UNREACHABLE();
|
| }
|
| BinaryOpStub_GenerateHeapResultAllocation(
|
| - masm, allocation_failure, mode);
|
| + masm, allocation_failure);
|
| __ movsd(FieldOperand(rax, HeapNumber::kValueOffset), xmm0);
|
| __ ret(0);
|
| break;
|
| @@ -1032,7 +1030,7 @@ void BinaryOpStub::GenerateNumberStub(MacroAssembler* masm) {
|
| }
|
|
|
| BinaryOpStub_GenerateFloatingPointCode(
|
| - masm, &gc_required, ¬_number, op_, mode_);
|
| + masm, &gc_required, ¬_number, op_);
|
|
|
| __ bind(¬_number);
|
| GenerateTypeTransition(masm);
|
| @@ -1054,7 +1052,7 @@ void BinaryOpStub::GenerateGeneric(MacroAssembler* masm) {
|
| masm, &call_runtime, ALLOW_HEAPNUMBER_RESULTS, op_);
|
|
|
| BinaryOpStub_GenerateFloatingPointCode(
|
| - masm, &call_runtime, &call_string_add_or_runtime, op_, mode_);
|
| + masm, &call_runtime, &call_string_add_or_runtime, op_);
|
|
|
| __ bind(&call_string_add_or_runtime);
|
| if (op_ == Token::ADD) {
|
| @@ -1072,41 +1070,15 @@ void BinaryOpStub::GenerateGeneric(MacroAssembler* masm) {
|
|
|
|
|
| static void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm,
|
| - Label* alloc_failure,
|
| - OverwriteMode mode) {
|
| + Label* alloc_failure) {
|
| Label skip_allocation;
|
| - switch (mode) {
|
| - case OVERWRITE_LEFT: {
|
| - // If the argument in rdx is already an object, we skip the
|
| - // allocation of a heap number.
|
| - __ JumpIfNotSmi(rdx, &skip_allocation);
|
| - // Allocate a heap number for the result. Keep rax and rdx intact
|
| - // for the possible runtime call.
|
| - __ AllocateHeapNumber(rbx, rcx, alloc_failure);
|
| - // Now rdx can be overwritten losing one of the arguments as we are
|
| - // now done and will not need it any more.
|
| - __ movq(rdx, rbx);
|
| - __ bind(&skip_allocation);
|
| - // Use object in rdx as a result holder
|
| - __ movq(rax, rdx);
|
| - break;
|
| - }
|
| - case OVERWRITE_RIGHT:
|
| - // If the argument in rax is already an object, we skip the
|
| - // allocation of a heap number.
|
| - __ JumpIfNotSmi(rax, &skip_allocation);
|
| - // Fall through!
|
| - case NO_OVERWRITE:
|
| - // Allocate a heap number for the result. Keep rax and rdx intact
|
| - // for the possible runtime call.
|
| - __ AllocateHeapNumber(rbx, rcx, alloc_failure);
|
| - // Now rax can be overwritten losing one of the arguments as we are
|
| - // now done and will not need it any more.
|
| - __ movq(rax, rbx);
|
| - __ bind(&skip_allocation);
|
| - break;
|
| - default: UNREACHABLE();
|
| - }
|
| + // Allocate a heap number for the result. Keep rax and rdx intact
|
| + // for the possible runtime call.
|
| + __ AllocateHeapNumber(rbx, rcx, alloc_failure);
|
| + // Now rax can be overwritten losing one of the arguments as we are
|
| + // now done and will not need it any more.
|
| + __ movq(rax, rbx);
|
| + __ bind(&skip_allocation);
|
| }
|
|
|
|
|
|
|