Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index 5d0347c56332328ff67e0041ffac372a58df1da4..b832607eeee8963eb0fdbd7165b2f1cc8bbeac7a 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -2507,13 +2507,12 @@ void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { |
} |
-void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, |
- InvokeFlag flag, |
+void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, |
const CallWrapper& call_wrapper) { |
// You can't call a builtin without a valid frame. |
DCHECK(flag == JUMP_FUNCTION || has_frame()); |
- GetBuiltinEntry(r2, id); |
+ GetBuiltinEntry(r2, native_context_index); |
if (flag == CALL_FUNCTION) { |
call_wrapper.BeforeCall(CallSize(r2)); |
Call(r2); |
@@ -2526,20 +2525,20 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, |
void MacroAssembler::GetBuiltinFunction(Register target, |
- Builtins::JavaScript id) { |
+ int native_context_index) { |
// Load the builtins object into target register. |
ldr(target, |
MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- 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, ContextOperand(target, native_context_index)); |
} |
-void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
+void MacroAssembler::GetBuiltinEntry(Register target, |
+ int native_context_index) { |
DCHECK(!target.is(r1)); |
- GetBuiltinFunction(r1, id); |
+ GetBuiltinFunction(r1, native_context_index); |
// Load the code entry point from the builtins object. |
ldr(target, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); |
} |