Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 925a71e5ee1f87133a72f49d393bbf63edc33cbc..5c7fedcf6c7bb07db73b0ae235c2ca41d953ebc0 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -2021,8 +2021,7 @@ void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
} |
-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()); |
@@ -2031,26 +2030,26 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, |
// arguments match the expected number of arguments. Fake a |
// parameter count to avoid emitting code to do the check. |
ParameterCount expected(0); |
- GetBuiltinFunction(edi, id); |
+ GetBuiltinFunction(edi, native_context_index); |
InvokeCode(FieldOperand(edi, JSFunction::kCodeEntryOffset), |
expected, expected, flag, call_wrapper); |
} |
void MacroAssembler::GetBuiltinFunction(Register target, |
- Builtins::JavaScript id) { |
+ int native_context_index) { |
// Load the JavaScript builtin function from the builtins object. |
mov(target, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- mov(target, FieldOperand(target, GlobalObject::kBuiltinsOffset)); |
- mov(target, FieldOperand(target, |
- JSBuiltinsObject::OffsetOfFunctionWithId(id))); |
+ mov(target, FieldOperand(target, GlobalObject::kNativeContextOffset)); |
+ mov(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(edi)); |
// Load the JavaScript builtin function from the builtins object. |
- GetBuiltinFunction(edi, id); |
+ GetBuiltinFunction(edi, native_context_index); |
// Load the code entry point from the function into the target register. |
mov(target, FieldOperand(edi, JSFunction::kCodeEntryOffset)); |
} |