| Index: src/x64/code-stubs-x64.cc | 
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc | 
| index dfa74e0afdb5f0ac21cb73cdc9ab67a21eff5f97..a2b172f5e94f10bba3a5042c2b8d4f552c976e03 100644 | 
| --- a/src/x64/code-stubs-x64.cc | 
| +++ b/src/x64/code-stubs-x64.cc | 
| @@ -10,6 +10,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" | 
| @@ -1389,14 +1390,12 @@ static int NegativeComparisonResult(Condition cc) { | 
| } | 
|  | 
|  | 
| -static void CheckInputType(MacroAssembler* masm, | 
| -                           Register input, | 
| -                           CompareIC::State expected, | 
| -                           Label* fail) { | 
| +static void CheckInputType(MacroAssembler* masm, Register input, | 
| +                           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); | 
| __ CompareMap(input, masm->isolate()->factory()->heap_number_map()); | 
| __ j(not_equal, fail); | 
| @@ -2010,7 +2009,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, | 
| @@ -2091,7 +2090,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); | 
| @@ -2107,7 +2106,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. | 
| __ movp(rcx, Operand(rsp, (arg_count() + 1) * kPointerSize)); | 
|  | 
| @@ -2122,6 +2121,9 @@ void CallICStub::GenerateMiss(MacroAssembler* masm, IC::UtilityId id) { | 
| __ Push(rdx); | 
|  | 
| // 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); | 
| @@ -3257,7 +3259,7 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { | 
|  | 
|  | 
| void CompareICStub::GenerateSmis(MacroAssembler* masm) { | 
| -  DCHECK(state() == CompareIC::SMI); | 
| +  DCHECK(state() == CompareICState::SMI); | 
| Label miss; | 
| __ JumpIfNotBothSmi(rdx, rax, &miss, Label::kNear); | 
|  | 
| @@ -3281,16 +3283,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(rdx, &miss); | 
| } | 
| -  if (right() == CompareIC::SMI) { | 
| +  if (right() == CompareICState::SMI) { | 
| __ JumpIfNotSmi(rax, &miss); | 
| } | 
|  | 
| @@ -3332,8 +3334,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); | 
| __ jmp(stub.GetCode(), RelocInfo::CODE_TARGET); | 
|  | 
| __ bind(&maybe_undefined1); | 
| @@ -3358,7 +3360,7 @@ void CompareICStub::GenerateNumbers(MacroAssembler* masm) { | 
|  | 
|  | 
| void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) { | 
| -  DCHECK(state() == CompareIC::INTERNALIZED_STRING); | 
| +  DCHECK(state() == CompareICState::INTERNALIZED_STRING); | 
| DCHECK(GetCondition() == equal); | 
|  | 
| // Registers containing left and right operands respectively. | 
| @@ -3401,7 +3403,7 @@ void CompareICStub::GenerateInternalizedStrings(MacroAssembler* masm) { | 
|  | 
|  | 
| void CompareICStub::GenerateUniqueNames(MacroAssembler* masm) { | 
| -  DCHECK(state() == CompareIC::UNIQUE_NAME); | 
| +  DCHECK(state() == CompareICState::UNIQUE_NAME); | 
| DCHECK(GetCondition() == equal); | 
|  | 
| // Registers containing left and right operands respectively. | 
| @@ -3444,7 +3446,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()); | 
| @@ -3531,7 +3533,7 @@ void CompareICStub::GenerateStrings(MacroAssembler* masm) { | 
|  | 
|  | 
| void CompareICStub::GenerateObjects(MacroAssembler* masm) { | 
| -  DCHECK(state() == CompareIC::OBJECT); | 
| +  DCHECK(state() == CompareICState::OBJECT); | 
| Label miss; | 
| Condition either_smi = masm->CheckEitherSmi(rdx, rax); | 
| __ j(either_smi, &miss, Label::kNear); | 
|  |