| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index fb0cb33aaafdfcd03d8238d516284299163f7075..dcb6bdfa3ff9ddb518984e662fc06636bfbc8cb5 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2056,8 +2056,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());
|
| @@ -2066,26 +2065,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, GlobalObjectOperand());
|
| + 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));
|
| }
|
|
|