Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index 676cb2c60e0db6c1069f65427181ed6f3169f9cc..8148818cd39f0b6d7387fe710c15f4a83dc9dcdd 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -2312,12 +2312,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(ip, id); |
+ GetBuiltinEntry(ip, native_context_index); |
if (flag == CALL_FUNCTION) { |
call_wrapper.BeforeCall(CallSize(ip)); |
CallJSEntry(ip); |
@@ -2330,21 +2330,20 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag, |
void MacroAssembler::GetBuiltinFunction(Register target, |
- Builtins::JavaScript id) { |
+ int native_context_index) { |
// Load the builtins object into target register. |
LoadP(target, |
MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
- LoadP(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset)); |
+ LoadP(target, FieldMemOperand(target, GlobalObject::kNativeContextOffset)); |
// Load the JavaScript builtin function from the builtins object. |
- LoadP(target, |
- FieldMemOperand(target, JSBuiltinsObject::OffsetOfFunctionWithId(id)), |
- r0); |
+ LoadP(target, ContextOperand(target, native_context_index), r0); |
} |
-void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { |
+void MacroAssembler::GetBuiltinEntry(Register target, |
+ int native_context_index) { |
DCHECK(!target.is(r4)); |
- GetBuiltinFunction(r4, id); |
+ GetBuiltinFunction(r4, native_context_index); |
// Load the code entry point from the builtins object. |
LoadP(target, FieldMemOperand(r4, JSFunction::kCodeEntryOffset)); |
} |