| Index: src/arm64/builtins-arm64.cc
|
| diff --git a/src/arm64/builtins-arm64.cc b/src/arm64/builtins-arm64.cc
|
| index 90014ffe0a43828b0d71ac24e9e423a40b83c4f4..219f6c86e7f662203a8acb3d8901d62c627f5bf7 100644
|
| --- a/src/arm64/builtins-arm64.cc
|
| +++ b/src/arm64/builtins-arm64.cc
|
| @@ -20,25 +20,16 @@ namespace internal {
|
|
|
| // Load the built-in Array function from the current context.
|
| static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) {
|
| - // Load the native context.
|
| - __ Ldr(result, GlobalObjectMemOperand());
|
| - __ Ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset));
|
| // Load the InternalArray function from the native context.
|
| - __ Ldr(result,
|
| - MemOperand(result,
|
| - Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
|
| + __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, result);
|
| }
|
|
|
|
|
| // Load the built-in InternalArray function from the current context.
|
| static void GenerateLoadInternalArrayFunction(MacroAssembler* masm,
|
| Register result) {
|
| - // Load the native context.
|
| - __ Ldr(result, GlobalObjectMemOperand());
|
| - __ Ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset));
|
| // Load the InternalArray function from the native context.
|
| - __ Ldr(result, ContextMemOperand(result,
|
| - Context::INTERNAL_ARRAY_FUNCTION_INDEX));
|
| + __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result);
|
| }
|
|
|
|
|
| @@ -1222,8 +1213,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
|
| __ Jump(x4);
|
|
|
| __ Bind(&set_global_proxy);
|
| - __ Ldr(x2, GlobalObjectMemOperand());
|
| - __ Ldr(x2, FieldMemOperand(x2, JSGlobalObject::kGlobalProxyOffset));
|
| + __ LoadGlobalProxy(x2);
|
| __ Str(x2, MemOperand(jssp, x0, LSL, kPointerSizeLog2));
|
| __ B(&valid_receiver);
|
|
|
| @@ -1720,7 +1710,7 @@ void Builtins::Generate_Call(MacroAssembler* masm, ConvertReceiverMode mode) {
|
| // Overwrite the original receiver with the (original) target.
|
| __ Poke(x1, Operand(x0, LSL, kXRegSizeLog2));
|
| // Let the "call_as_function_delegate" take care of the rest.
|
| - __ LoadGlobalFunction(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, x1);
|
| + __ LoadNativeContextSlot(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, x1);
|
| __ Jump(masm->isolate()->builtins()->CallFunction(
|
| ConvertReceiverMode::kNotNullOrUndefined),
|
| RelocInfo::CODE_TARGET);
|
| @@ -1802,7 +1792,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
|
| // Overwrite the original receiver with the (original) target.
|
| __ Poke(x1, Operand(x0, LSL, kXRegSizeLog2));
|
| // Let the "call_as_constructor_delegate" take care of the rest.
|
| - __ LoadGlobalFunction(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, x1);
|
| + __ LoadNativeContextSlot(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, x1);
|
| __ Jump(masm->isolate()->builtins()->CallFunction(),
|
| RelocInfo::CODE_TARGET);
|
| }
|
|
|