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

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

Issue 565873002: Removing ic.h from code-stubs.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and mips. Created 6 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/ic/x64/ic-compiler-x64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 963a83e087424215b76ab60ac25f8742664eb7db..85234601f5c039ce9cb524dd2e9adddc1c11f139 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -11,6 +11,7 @@
#include "src/code-stubs.h"
#include "src/codegen.h"
#include "src/ic/handler-compiler.h"
+#include "src/ic/ic.h"
#include "src/isolate.h"
#include "src/jsregexp.h"
#include "src/regexp-macro-assembler.h"
@@ -597,12 +598,12 @@ static void EmitCheckForInternalizedStringsOrObjects(MacroAssembler* masm,
static void CompareICStub_CheckInputType(MacroAssembler* masm, Register input,
Register scratch,
- CompareIC::State expected,
+ CompareICState::State expected,
Label* fail) {
Label ok;
- if (expected == CompareIC::SMI) {
+ if (expected == CompareICState::SMI) {
__ JumpIfNotSmi(input, fail);
- } else if (expected == CompareIC::NUMBER) {
+ } else if (expected == CompareICState::NUMBER) {
__ JumpIfSmi(input, &ok);
__ CheckMap(input, scratch, Heap::kHeapNumberMapRootIndex, fail,
DONT_DO_SMI_CHECK);
@@ -2749,7 +2750,7 @@ void CallIC_ArrayStub::Generate(MacroAssembler* masm) {
__ TailCallStub(&stub);
__ bind(&miss);
- GenerateMiss(masm, IC::kCallIC_Customization_Miss);
+ GenerateMiss(masm);
// The slow case, we need this no matter what to complete a call after a miss.
CallFunctionNoFeedback(masm,
@@ -2825,7 +2826,7 @@ void CallICStub::Generate(MacroAssembler* masm) {
// We are here because tracing is on or we are going monomorphic.
__ bind(&miss);
- GenerateMiss(masm, IC::kCallIC_Miss);
+ GenerateMiss(masm);
// the slow case
__ bind(&slow_start);
@@ -2840,7 +2841,7 @@ void CallICStub::Generate(MacroAssembler* masm) {
}
-void CallICStub::GenerateMiss(MacroAssembler* masm, IC::UtilityId id) {
+void CallICStub::GenerateMiss(MacroAssembler* masm) {
// Get the receiver of the function from the stack; 1 ~ return address.
__ lw(t0, MemOperand(sp, (arg_count() + 1) * kPointerSize));
@@ -2851,6 +2852,9 @@ void CallICStub::GenerateMiss(MacroAssembler* masm, IC::UtilityId id) {
__ Push(t0, a1, a2, a3);
// Call the entry.
+ IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss
+ : IC::kCallIC_Customization_Miss;
+
ExternalReference miss = ExternalReference(IC_Utility(id),
masm->isolate());
__ CallExternalReference(miss, 4);
@@ -3438,7 +3442,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
void CompareICStub::GenerateSmis(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::SMI);
+ DCHECK(state() == CompareICState::SMI);
Label miss;
__ Or(a2, a1, a0);
__ JumpIfNotSmi(a2, &miss);
@@ -3461,16 +3465,16 @@ void CompareICStub::GenerateSmis(MacroAssembler* masm) {
void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::NUMBER);
+ DCHECK(state() == CompareICState::NUMBER);
Label generic_stub;
Label unordered, maybe_undefined1, maybe_undefined2;
Label miss;
- if (left() == CompareIC::SMI) {
+ if (left() == CompareICState::SMI) {
__ JumpIfNotSmi(a1, &miss);
}
- if (right() == CompareIC::SMI) {
+ if (right() == CompareICState::SMI) {
__ JumpIfNotSmi(a0, &miss);
}
@@ -3528,8 +3532,8 @@ void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
__ bind(&unordered);
__ bind(&generic_stub);
- CompareICStub stub(isolate(), op(), CompareIC::GENERIC, CompareIC::GENERIC,
- CompareIC::GENERIC);
+ CompareICStub stub(isolate(), op(), CompareICState::GENERIC,
+ CompareICState::GENERIC, CompareICState::GENERIC);
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
__ bind(&maybe_undefined1);
@@ -3554,7 +3558,7 @@ void CompareICStub::GenerateNumbers(MacroAssembler* masm) {
void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::INTERNALIZED_STRING);
+ DCHECK(state() == CompareICState::INTERNALIZED_STRING);
Label miss;
// Registers containing left and right operands respectively.
@@ -3594,7 +3598,7 @@ void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) {
void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::UNIQUE_NAME);
+ DCHECK(state() == CompareICState::UNIQUE_NAME);
DCHECK(GetCondition() == eq);
Label miss;
@@ -3638,7 +3642,7 @@ void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) {
void CompareICStub::GenerateStrings(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::STRING);
+ DCHECK(state() == CompareICState::STRING);
Label miss;
bool equality = Token::IsEqualityOp(op());
@@ -3724,7 +3728,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) {
void CompareICStub::GenerateObjects(MacroAssembler* masm) {
- DCHECK(state() == CompareIC::OBJECT);
+ DCHECK(state() == CompareICState::OBJECT);
Label miss;
__ And(a2, a1, Operand(a0));
__ JumpIfSmi(a2, &miss);
« no previous file with comments | « src/ic/x64/ic-compiler-x64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698