Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index 0268f589e6cfafcb818124ce55f892cfd1a20780..0590ab8f5928c488d418530ab954a6eaefcfb9c0 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -1896,12 +1896,13 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) { |
__ push(ecx); |
__ TailCallRuntime(Runtime::kStrictEquals, 2, 1); |
} else { |
- Builtins::JavaScript builtin; |
+ int native_context_index; |
if (cc == equal) { |
- builtin = Builtins::EQUALS; |
+ native_context_index = Context::EQUALS_BUILTIN_INDEX; |
} else { |
- builtin = |
- is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; |
+ native_context_index = is_strong(strength()) |
+ ? Context::COMPARE_STRONG_BUILTIN_INDEX |
+ : Context::COMPARE_BUILTIN_INDEX; |
__ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); |
} |
@@ -1910,7 +1911,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) { |
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
// tagged as a small integer. |
- __ InvokeBuiltin(builtin, JUMP_FUNCTION); |
+ __ InvokeBuiltin(native_context_index, JUMP_FUNCTION); |
} |
__ bind(&miss); |
@@ -2075,7 +2076,7 @@ static void EmitSlowCase(Isolate* isolate, |
__ push(ecx); |
__ Move(eax, Immediate(argc + 1)); |
__ Move(ebx, Immediate(0)); |
- __ GetBuiltinEntry(edx, Builtins::CALL_FUNCTION_PROXY); |
+ __ GetBuiltinEntry(edx, Context::CALL_FUNCTION_PROXY_BUILTIN_INDEX); |
{ |
Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline(); |
__ jmp(adaptor, RelocInfo::CODE_TARGET); |
@@ -2087,7 +2088,7 @@ static void EmitSlowCase(Isolate* isolate, |
__ mov(Operand(esp, (argc + 1) * kPointerSize), edi); |
__ Move(eax, Immediate(argc)); |
__ Move(ebx, Immediate(0)); |
- __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION); |
+ __ GetBuiltinEntry(edx, Context::CALL_NON_FUNCTION_BUILTIN_INDEX); |
Handle<Code> adaptor = isolate->builtins()->ArgumentsAdaptorTrampoline(); |
__ jmp(adaptor, RelocInfo::CODE_TARGET); |
} |
@@ -2231,11 +2232,13 @@ void CallConstructStub::Generate(MacroAssembler* masm) { |
__ bind(&slow); |
__ CmpInstanceType(ecx, JS_FUNCTION_PROXY_TYPE); |
__ j(not_equal, &non_function_call); |
- __ GetBuiltinEntry(edx, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR); |
+ __ GetBuiltinEntry(edx, |
+ Context::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR_BUILTIN_INDEX); |
__ jmp(&do_call); |
__ bind(&non_function_call); |
- __ GetBuiltinEntry(edx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR); |
+ __ GetBuiltinEntry(edx, |
+ Context::CALL_NON_FUNCTION_AS_CONSTRUCTOR_BUILTIN_INDEX); |
__ bind(&do_call); |
if (IsSuperConstructorCall()) { |
__ Drop(1); |
@@ -3268,7 +3271,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) { |
__ pop(ecx); // Pop return address. |
__ push(eax); // Push argument. |
__ push(ecx); // Push return address. |
- __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION); |
+ __ InvokeBuiltin(Context::TO_NUMBER_BUILTIN_INDEX, JUMP_FUNCTION); |
} |