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 12254036: Minor cleanup of CompareIC state (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Actually address all comments Created 7 years, 10 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/code-stubs.h » ('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 62fcc9a981ccd5946ed7946d006d7e6d5224d4d1..86d136e73a137cec122c9f354f71519679ea026d 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -1741,7 +1741,7 @@ static void ICCompareStub_CheckInputType(MacroAssembler* masm,
Label ok;
if (expected == CompareIC::SMI) {
__ JumpIfNotSmi(input, fail);
- } else if (expected == CompareIC::HEAP_NUMBER) {
+ } else if (expected == CompareIC::NUMBER) {
__ JumpIfSmi(input, &ok);
__ CheckMap(input, scratch, Heap::kHeapNumberMapRootIndex, fail,
DONT_DO_SMI_CHECK);
@@ -2141,8 +2141,8 @@ void UnaryOpStub::Generate(MacroAssembler* masm) {
case UnaryOpIC::SMI:
GenerateSmiStub(masm);
break;
- case UnaryOpIC::HEAP_NUMBER:
- GenerateHeapNumberStub(masm);
+ case UnaryOpIC::NUMBER:
+ GenerateNumberStub(masm);
break;
case UnaryOpIC::GENERIC:
GenerateGenericStub(masm);
@@ -2222,13 +2222,13 @@ void UnaryOpStub::GenerateSmiCodeBitNot(MacroAssembler* masm,
// TODO(svenpanne): Use virtual functions instead of switch.
-void UnaryOpStub::GenerateHeapNumberStub(MacroAssembler* masm) {
+void UnaryOpStub::GenerateNumberStub(MacroAssembler* masm) {
switch (op_) {
case Token::SUB:
- GenerateHeapNumberStubSub(masm);
+ GenerateNumberStubSub(masm);
break;
case Token::BIT_NOT:
- GenerateHeapNumberStubBitNot(masm);
+ GenerateNumberStubBitNot(masm);
break;
default:
UNREACHABLE();
@@ -2236,7 +2236,7 @@ void UnaryOpStub::GenerateHeapNumberStub(MacroAssembler* masm) {
}
-void UnaryOpStub::GenerateHeapNumberStubSub(MacroAssembler* masm) {
+void UnaryOpStub::GenerateNumberStubSub(MacroAssembler* masm) {
Label non_smi, slow, call_builtin;
GenerateSmiCodeSub(masm, &non_smi, &call_builtin);
__ bind(&non_smi);
@@ -2248,7 +2248,7 @@ void UnaryOpStub::GenerateHeapNumberStubSub(MacroAssembler* masm) {
}
-void UnaryOpStub::GenerateHeapNumberStubBitNot(MacroAssembler* masm) {
+void UnaryOpStub::GenerateNumberStubBitNot(MacroAssembler* masm) {
Label non_smi, slow;
GenerateSmiCodeBitNot(masm, &non_smi);
__ bind(&non_smi);
@@ -2710,8 +2710,7 @@ void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
masm, right, destination, d7, d8, r2, r3, heap_number_map,
scratch1, scratch2, s0, miss);
} else {
- Label* fail = (right_type == BinaryOpIC::HEAP_NUMBER) ? miss
- : not_numbers;
+ Label* fail = (right_type == BinaryOpIC::NUMBER) ? miss : not_numbers;
FloatingPointHelper::LoadNumber(
masm, destination, right, d7, r2, r3, heap_number_map,
scratch1, scratch2, fail);
@@ -2723,8 +2722,7 @@ void BinaryOpStub_GenerateFPOperation(MacroAssembler* masm,
masm, left, destination, d6, d8, r0, r1, heap_number_map,
scratch1, scratch2, s0, miss);
} else {
- Label* fail = (left_type == BinaryOpIC::HEAP_NUMBER) ? miss
- : not_numbers;
+ Label* fail = (left_type == BinaryOpIC::NUMBER) ? miss : not_numbers;
FloatingPointHelper::LoadNumber(
masm, destination, left, d6, r0, r1, heap_number_map,
scratch1, scratch2, fail);
@@ -3120,7 +3118,7 @@ void BinaryOpStub::GenerateInt32Stub(MacroAssembler* masm) {
__ bind(&return_heap_number);
// Return a heap number, or fall through to type transition or runtime
// call if we can't.
- if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::HEAP_NUMBER
+ if (result_type_ >= ((op_ == Token::DIV) ? BinaryOpIC::NUMBER
: BinaryOpIC::INT32)) {
// We are using vfp registers so r5 is available.
heap_number_result = r5;
@@ -3344,11 +3342,11 @@ void BinaryOpStub::GenerateOddballStub(MacroAssembler* masm) {
}
__ bind(&done);
- GenerateHeapNumberStub(masm);
+ GenerateNumberStub(masm);
}
-void BinaryOpStub::GenerateHeapNumberStub(MacroAssembler* masm) {
+void BinaryOpStub::GenerateNumberStub(MacroAssembler* masm) {
Label call_runtime, transition;
BinaryOpStub_GenerateFPOperation(
masm, left_type_, right_type_, false,
@@ -6971,8 +6969,8 @@ void ICCompareStub::GenerateSmis(MacroAssembler* masm) {
}
-void ICCompareStub::GenerateHeapNumbers(MacroAssembler* masm) {
- ASSERT(state_ == CompareIC::HEAP_NUMBER);
+void ICCompareStub::GenerateNumbers(MacroAssembler* masm) {
+ ASSERT(state_ == CompareIC::NUMBER);
Label generic_stub;
Label unordered, maybe_undefined1, maybe_undefined2;
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698