| Index: src/arm64/macro-assembler-arm64.cc
|
| diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
|
| index a74021f96bbcfcbe97cdb180bc26bd813ae4c884..b582b56969fe9ee7586e8316a50c462381155eb9 100644
|
| --- a/src/arm64/macro-assembler-arm64.cc
|
| +++ b/src/arm64/macro-assembler-arm64.cc
|
| @@ -1687,35 +1687,32 @@ void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
|
|
|
|
|
| void MacroAssembler::GetBuiltinFunction(Register target,
|
| - Builtins::JavaScript id) {
|
| + int native_context_index) {
|
| // Load the builtins object into target register.
|
| Ldr(target, GlobalObjectMemOperand());
|
| - Ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
|
| + Ldr(target, FieldMemOperand(target, GlobalObject::kNativeContextOffset));
|
| // Load the JavaScript builtin function from the builtins object.
|
| - Ldr(target, FieldMemOperand(target,
|
| - JSBuiltinsObject::OffsetOfFunctionWithId(id)));
|
| + Ldr(target, ContextMemOperand(target, native_context_index));
|
| }
|
|
|
|
|
| -void MacroAssembler::GetBuiltinEntry(Register target,
|
| - Register function,
|
| - Builtins::JavaScript id) {
|
| +void MacroAssembler::GetBuiltinEntry(Register target, Register function,
|
| + int native_context_index) {
|
| DCHECK(!AreAliased(target, function));
|
| - GetBuiltinFunction(function, id);
|
| + GetBuiltinFunction(function, native_context_index);
|
| // Load the code entry point from the builtins object.
|
| Ldr(target, FieldMemOperand(function, JSFunction::kCodeEntryOffset));
|
| }
|
|
|
|
|
| -void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
| - InvokeFlag flag,
|
| +void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag,
|
| const CallWrapper& call_wrapper) {
|
| ASM_LOCATION("MacroAssembler::InvokeBuiltin");
|
| // You can't call a builtin without a valid frame.
|
| DCHECK(flag == JUMP_FUNCTION || has_frame());
|
|
|
| // Get the builtin entry in x2 and setup the function object in x1.
|
| - GetBuiltinEntry(x2, x1, id);
|
| + GetBuiltinEntry(x2, x1, native_context_index);
|
| if (flag == CALL_FUNCTION) {
|
| call_wrapper.BeforeCall(CallSize(x2));
|
| Call(x2);
|
|
|