Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 6d622b855d587c6691d34d9d82ae0a9d16a625d1..30c1a51ac6d12e71af47a6d79b1a5848ce405b9d 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -1238,7 +1238,7 @@ void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { |
Label generic_array_code; |
// Get the InternalArray function. |
- __ LoadGlobalFunction(Context::INTERNAL_ARRAY_FUNCTION_INDEX, rdi); |
+ __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, rdi); |
if (FLAG_debug_code) { |
// Initial map for the builtin InternalArray functions should be maps. |
@@ -1268,7 +1268,7 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) { |
Label generic_array_code; |
// Get the Array function. |
- __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, rdi); |
+ __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, rdi); |
if (FLAG_debug_code) { |
// Initial map for the builtin Array functions should be maps. |
@@ -1785,7 +1785,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) { |
// Overwrite the original receiver with the (original) target. |
__ movp(args.GetReceiverOperand(), rdi); |
// Let the "call_as_function_delegate" take care of the rest. |
- __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, rdi); |
+ __ LoadNativeContextSlot(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, rdi); |
__ Jump(masm->isolate()->builtins()->CallFunction( |
ConvertReceiverMode::kNotNullOrUndefined), |
RelocInfo::CODE_TARGET); |
@@ -1869,7 +1869,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) { |
// Overwrite the original receiver with the (original) target. |
__ movp(args.GetReceiverOperand(), rdi); |
// Let the "call_as_constructor_delegate" take care of the rest. |
- __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, rdi); |
+ __ LoadNativeContextSlot(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, rdi); |
__ Jump(masm->isolate()->builtins()->CallFunction(), |
RelocInfo::CODE_TARGET); |
} |
@@ -1991,8 +1991,8 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { |
__ jmp(rdx); |
__ bind(&set_global_proxy); |
- __ movp(rcx, GlobalObjectOperand()); |
- __ movp(rcx, FieldOperand(rcx, JSGlobalObject::kGlobalProxyOffset)); |
+ __ movp(rcx, NativeContextOperand()); |
+ __ movp(rcx, ContextOperand(rcx, Context::GLOBAL_PROXY_INDEX)); |
__ movp(args.GetReceiverOperand(), rcx); |
__ jmp(&valid_receiver, Label::kNear); |