Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: src/arm/code-stubs-arm.cc

Issue 23537038: Remove override mode from BinaryOpStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 39b2dc507d5f81c97f0a6bb7825b4b41b7f1eb52..33ef6eeb37ffb4b95a8588ed7fa96feed88a48e9 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -1562,8 +1562,7 @@ void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm,
Register heap_number_map,
Register scratch1,
Register scratch2,
- Label* gc_required,
- OverwriteMode mode);
+ Label* gc_required);
void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
@@ -1573,8 +1572,7 @@ void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
Label* not_numbers,
Label* gc_required,
Label* miss,
- Token::Value op,
- OverwriteMode mode) {
+ Token::Value op) {
Register left = r1;
Register right = r0;
Register scratch1 = r6;
@@ -1604,7 +1602,7 @@ void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
// Allocate new heap number for result.
Register result = r5;
BinaryOpStub_GenerateHeapResultAllocation(
- masm, result, heap_number_map, scratch1, scratch2, gc_required, mode);
+ masm, result, heap_number_map, scratch1, scratch2, gc_required);
// Load left and right operands into d0 and d1.
if (smi_operands) {
@@ -1727,8 +1725,7 @@ void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
result, scratch1, scratch2, heap_number_map, gc_required);
} else {
BinaryOpStub_GenerateHeapResultAllocation(
- masm, result, heap_number_map, scratch1, scratch2, gc_required,
- mode);
+ masm, result, heap_number_map, scratch1, scratch2, gc_required);
}
// r2: Answer as signed int32.
@@ -1766,8 +1763,7 @@ void BinaryOpStub_GenerateSmiCode(
Label* use_runtime,
Label* gc_required,
Token::Value op,
- BinaryOpStub::SmiCodeGenerateHeapNumberResults allow_heapnumber_results,
- OverwriteMode mode) {
+ BinaryOpStub::SmiCodeGenerateHeapNumberResults allow_heapnumber_results) {
Label not_smis;
Register left = r1;
@@ -1786,7 +1782,7 @@ void BinaryOpStub_GenerateSmiCode(
if (allow_heapnumber_results == BinaryOpStub::ALLOW_HEAPNUMBER_RESULTS) {
BinaryOpStub_GenerateFPOperation(
masm, BinaryOpIC::UNINITIALIZED, BinaryOpIC::UNINITIALIZED, true,
- use_runtime, gc_required, &not_smis, op, mode);
+ use_runtime, gc_required, &not_smis, op);
}
__ bind(&not_smis);
}
@@ -1806,13 +1802,12 @@ void BinaryOpStub::GenerateSmiStub(MacroAssembler* masm) {
result_type_ == BinaryOpIC::SMI) {
// Only allow smi results.
BinaryOpStub_GenerateSmiCode(
- masm, &call_runtime, NULL, op_, NO_HEAPNUMBER_RESULTS, mode_);
+ masm, &call_runtime, NULL, op_, NO_HEAPNUMBER_RESULTS);
} else {
// Allow heap number result and don't make a transition if a heap number
// cannot be allocated.
BinaryOpStub_GenerateSmiCode(
- masm, &call_runtime, &call_runtime, op_, ALLOW_HEAPNUMBER_RESULTS,
- mode_);
+ masm, &call_runtime, &call_runtime, op_, ALLOW_HEAPNUMBER_RESULTS);
}
// Code falls through if the result is not returned as either a smi or heap
@@ -1961,8 +1956,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
heap_number_map,
scratch1,
scratch2,
- &call_runtime,
- mode_);
+ &call_runtime);
__ sub(r0, heap_number_result, Operand(kHeapObjectTag));
__ vstr(d5, r0, HeapNumber::kValueOffset);
__ mov(r0, heap_number_result);
@@ -1991,8 +1985,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
heap_number_map,
scratch1,
scratch2,
- &pop_and_call_runtime,
- mode_);
+ &pop_and_call_runtime);
// Load the left value from the value saved on the stack.
__ Pop(r1, r0);
@@ -2073,8 +2066,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
heap_number_map,
scratch1,
scratch2,
- &call_runtime,
- mode_);
+ &call_runtime);
if (op_ != Token::SHR) {
// Convert the result to a floating point value.
@@ -2155,7 +2147,7 @@ void BinaryOpStub::GenerateNumberStub(MacroAssembler* masm) {
Label call_runtime, transition;
BinaryOpStub_GenerateFPOperation(
masm, left_type_, right_type_, false,
- &transition, &call_runtime, &transition, op_, mode_);
+ &transition, &call_runtime, &transition, op_);
__ bind(&transition);
GenerateTypeTransition(masm);
@@ -2174,11 +2166,11 @@ void BinaryOpStub::GenerateGeneric(MacroAssembler* masm) {
Label call_runtime, call_string_add_or_runtime, transition;
BinaryOpStub_GenerateSmiCode(
- masm, &call_runtime, &call_runtime, op_, ALLOW_HEAPNUMBER_RESULTS, mode_);
+ masm, &call_runtime, &call_runtime, op_, ALLOW_HEAPNUMBER_RESULTS);
BinaryOpStub_GenerateFPOperation(
masm, left_type_, right_type_, false,
- &call_string_add_or_runtime, &call_runtime, &transition, op_, mode_);
+ &call_string_add_or_runtime, &call_runtime, &transition, op_);
__ bind(&transition);
GenerateTypeTransition(masm);
@@ -2236,31 +2228,13 @@ void BinaryOpStub_GenerateHeapResultAllocation(MacroAssembler* masm,
Register heap_number_map,
Register scratch1,
Register scratch2,
- Label* gc_required,
- OverwriteMode mode) {
+ Label* gc_required) {
// Code below will scratch result if allocation fails. To keep both arguments
// intact for the runtime call result cannot be one of these.
ASSERT(!result.is(r0) && !result.is(r1));
- if (mode == OVERWRITE_LEFT || mode == OVERWRITE_RIGHT) {
- Label skip_allocation, allocated;
- Register overwritable_operand = mode == OVERWRITE_LEFT ? r1 : r0;
- // If the overwritable operand is already an object, we skip the
- // allocation of a heap number.
- __ JumpIfNotSmi(overwritable_operand, &skip_allocation);
- // Allocate a heap number for the result.
- __ AllocateHeapNumber(
- result, scratch1, scratch2, heap_number_map, gc_required);
- __ b(&allocated);
- __ bind(&skip_allocation);
- // Use object holding the overwritable operand for result.
- __ mov(result, Operand(overwritable_operand));
- __ bind(&allocated);
- } else {
- ASSERT(mode == NO_OVERWRITE);
- __ AllocateHeapNumber(
- result, scratch1, scratch2, heap_number_map, gc_required);
- }
+ __ AllocateHeapNumber(
+ result, scratch1, scratch2, heap_number_map, gc_required);
}
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698