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

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

Issue 1316943002: Move (uppercase) JS builtins from js builtins object to native context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove Isolate::js_builtins_object Created 5 years, 4 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/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('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 0ffcc4723aeba05f574d3e289fe89daa113ed02e..b34cbf1d85dadc24e3b4894b514b3fa8432fbaa3 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -729,12 +729,13 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
if (cc == eq && strict()) {
__ TailCallRuntime(Runtime::kStrictEquals, 2, 1);
} else {
- Builtins::JavaScript native;
+ int context_index;
if (cc == eq) {
- native = Builtins::EQUALS;
+ context_index = Context::EQUALS_BUILTIN_INDEX;
} else {
- native =
- is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE;
+ context_index = is_strong(strength())
+ ? Context::COMPARE_STRONG_BUILTIN_INDEX
+ : Context::COMPARE_BUILTIN_INDEX;
int ncr; // NaN compare result.
if (cc == lt || cc == le) {
ncr = GREATER;
@@ -748,7 +749,7 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
// tagged as a small integer.
- __ InvokeBuiltin(native, JUMP_FUNCTION);
+ __ InvokeBuiltin(context_index, JUMP_FUNCTION);
}
__ bind(&miss);
@@ -2558,7 +2559,7 @@ static void EmitSlowCase(MacroAssembler* masm,
__ push(a1); // put proxy as additional argument
__ li(a0, Operand(argc + 1, RelocInfo::NONE32));
__ mov(a2, zero_reg);
- __ GetBuiltinFunction(a1, Builtins::CALL_FUNCTION_PROXY);
+ __ GetBuiltinFunction(a1, Context::CALL_FUNCTION_PROXY_BUILTIN_INDEX);
{
Handle<Code> adaptor =
masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
@@ -2571,7 +2572,7 @@ static void EmitSlowCase(MacroAssembler* masm,
__ sw(a1, MemOperand(sp, argc * kPointerSize));
__ li(a0, Operand(argc)); // Set up the number of arguments.
__ mov(a2, zero_reg);
- __ GetBuiltinFunction(a1, Builtins::CALL_NON_FUNCTION);
+ __ GetBuiltinFunction(a1, Context::CALL_NON_FUNCTION_BUILTIN_INDEX);
__ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
RelocInfo::CODE_TARGET);
}
@@ -2710,11 +2711,13 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
Label do_call;
__ bind(&slow);
__ Branch(&non_function_call, ne, t1, Operand(JS_FUNCTION_PROXY_TYPE));
- __ GetBuiltinFunction(a1, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
+ __ GetBuiltinFunction(
+ a1, Context::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR_BUILTIN_INDEX);
__ jmp(&do_call);
__ bind(&non_function_call);
- __ GetBuiltinFunction(a1, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
+ __ GetBuiltinFunction(
+ a1, Context::CALL_NON_FUNCTION_AS_CONSTRUCTOR_BUILTIN_INDEX);
__ bind(&do_call);
// Set expected number of arguments to zero (not changing r0).
__ li(a2, Operand(0, RelocInfo::NONE32));
@@ -3410,7 +3413,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ bind(&not_oddball);
__ push(a0); // Push argument.
- __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION);
+ __ InvokeBuiltin(Context::TO_NUMBER_BUILTIN_INDEX, JUMP_FUNCTION);
}
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698