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

Unified Diff: src/x64/code-stubs-x64.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/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index d4e64865a68192ef3d605d33624d0605e73fac82..a3db777404a1208d3d6d0f264a056f360e6d8bbc 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -1765,12 +1765,13 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ PushReturnAddressFrom(rcx);
__ TailCallRuntime(Runtime::kStrictEquals, 2, 1);
} else {
- Builtins::JavaScript builtin;
+ int context_index;
if (cc == equal) {
- builtin = Builtins::EQUALS;
+ context_index = Context::EQUALS_BUILTIN_INDEX;
} else {
- builtin =
- is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE;
+ context_index = is_strong(strength())
+ ? Context::COMPARE_STRONG_BUILTIN_INDEX
+ : Context::COMPARE_BUILTIN_INDEX;
__ Push(Smi::FromInt(NegativeComparisonResult(cc)));
}
@@ -1778,7 +1779,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(context_index, JUMP_FUNCTION);
}
__ bind(&miss);
@@ -1941,7 +1942,7 @@ static void EmitSlowCase(Isolate* isolate,
__ PushReturnAddressFrom(rcx);
__ Set(rax, argc + 1);
__ Set(rbx, 0);
- __ GetBuiltinEntry(rdx, Builtins::CALL_FUNCTION_PROXY);
+ __ GetBuiltinEntry(rdx, Context::CALL_FUNCTION_PROXY_BUILTIN_INDEX);
{
Handle<Code> adaptor =
masm->isolate()->builtins()->ArgumentsAdaptorTrampoline();
@@ -1954,7 +1955,7 @@ static void EmitSlowCase(Isolate* isolate,
__ movp(args->GetReceiverOperand(), rdi);
__ Set(rax, argc);
__ Set(rbx, 0);
- __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION);
+ __ GetBuiltinEntry(rdx, Context::CALL_NON_FUNCTION_BUILTIN_INDEX);
Handle<Code> adaptor =
isolate->builtins()->ArgumentsAdaptorTrampoline();
__ Jump(adaptor, RelocInfo::CODE_TARGET);
@@ -2098,11 +2099,13 @@ void CallConstructStub::Generate(MacroAssembler* masm) {
__ bind(&slow);
__ CmpInstanceType(r11, JS_FUNCTION_PROXY_TYPE);
__ j(not_equal, &non_function_call);
- __ GetBuiltinEntry(rdx, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
+ __ GetBuiltinEntry(rdx,
+ Context::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR_BUILTIN_INDEX);
__ jmp(&do_call);
__ bind(&non_function_call);
- __ GetBuiltinEntry(rdx, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
+ __ GetBuiltinEntry(rdx,
+ Context::CALL_NON_FUNCTION_AS_CONSTRUCTOR_BUILTIN_INDEX);
__ bind(&do_call);
// Set expected number of arguments to zero (not changing rax).
__ Set(rbx, 0);
@@ -3221,7 +3224,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) {
__ PopReturnAddressTo(rcx); // Pop return address.
__ Push(rax); // Push argument.
__ PushReturnAddressFrom(rcx); // Push return address.
- __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION);
+ __ InvokeBuiltin(Context::TO_NUMBER_BUILTIN_INDEX, JUMP_FUNCTION);
}
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698