| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index c53bf9d0880b692593f47a8da8e45c08008e36ad..04a6d59c1726e79939f57664474dc85af458ec68 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -434,10 +434,7 @@ void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
|
| #endif
|
|
|
| // Load the native context of the current context.
|
| - int offset =
|
| - Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize;
|
| - lw(scratch, FieldMemOperand(scratch, offset));
|
| - lw(scratch, FieldMemOperand(scratch, JSGlobalObject::kNativeContextOffset));
|
| + lw(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX));
|
|
|
| // Check the context is a native context.
|
| if (emit_debug_code()) {
|
| @@ -4516,7 +4513,8 @@ void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag,
|
| // You can't call a builtin without a valid frame.
|
| DCHECK(flag == JUMP_FUNCTION || has_frame());
|
|
|
| - GetBuiltinEntry(t9, native_context_index);
|
| + LoadNativeContextSlot(native_context_index, a1);
|
| + lw(t9, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
|
| if (flag == CALL_FUNCTION) {
|
| call_wrapper.BeforeCall(CallSize(t9));
|
| Call(t9);
|
| @@ -4528,25 +4526,6 @@ void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag,
|
| }
|
|
|
|
|
| -void MacroAssembler::GetBuiltinFunction(Register target,
|
| - int native_context_index) {
|
| - // Load the builtins object into target register.
|
| - lw(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - lw(target, FieldMemOperand(target, JSGlobalObject::kNativeContextOffset));
|
| - // Load the JavaScript builtin function from the builtins object.
|
| - lw(target, ContextOperand(target, native_context_index));
|
| -}
|
| -
|
| -
|
| -void MacroAssembler::GetBuiltinEntry(Register target,
|
| - int native_context_index) {
|
| - DCHECK(!target.is(a1));
|
| - GetBuiltinFunction(a1, native_context_index);
|
| - // Load the code entry point from the builtins object.
|
| - lw(target, FieldMemOperand(a1, JSFunction::kCodeEntryOffset));
|
| -}
|
| -
|
| -
|
| void MacroAssembler::SetCounter(StatsCounter* counter, int value,
|
| Register scratch1, Register scratch2) {
|
| if (FLAG_native_code_counters && counter->Enabled()) {
|
| @@ -4680,27 +4659,14 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
|
| }
|
|
|
|
|
| -void MacroAssembler::LoadGlobalProxy(Register dst) {
|
| - lw(dst, GlobalObjectOperand());
|
| - lw(dst, FieldMemOperand(dst, JSGlobalObject::kGlobalProxyOffset));
|
| -}
|
| -
|
| -
|
| void MacroAssembler::LoadTransitionedArrayMapConditional(
|
| ElementsKind expected_kind,
|
| ElementsKind transitioned_kind,
|
| Register map_in_out,
|
| Register scratch,
|
| Label* no_map_match) {
|
| - // Load the global or builtins object from the current context.
|
| - lw(scratch,
|
| - MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - lw(scratch, FieldMemOperand(scratch, JSGlobalObject::kNativeContextOffset));
|
| -
|
| // Check that the function's map is the same as the expected cached map.
|
| - lw(scratch,
|
| - MemOperand(scratch,
|
| - Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
|
| + LoadNativeContextSlot(Context::JS_ARRAY_MAPS_INDEX, scratch);
|
| size_t offset = expected_kind * kPointerSize +
|
| FixedArrayBase::kHeaderSize;
|
| lw(at, FieldMemOperand(scratch, offset));
|
| @@ -4713,14 +4679,9 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
|
| }
|
|
|
|
|
| -void MacroAssembler::LoadGlobalFunction(int index, Register function) {
|
| - // Load the global or builtins object from the current context.
|
| - lw(function,
|
| - MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
|
| - // Load the native context from the global or builtins object.
|
| - lw(function, FieldMemOperand(function, JSGlobalObject::kNativeContextOffset));
|
| - // Load the function from the native context.
|
| - lw(function, MemOperand(function, Context::SlotOffset(index)));
|
| +void MacroAssembler::LoadNativeContextSlot(int index, Register dst) {
|
| + lw(dst, NativeContextMemOperand());
|
| + lw(dst, ContextMemOperand(dst, index));
|
| }
|
|
|
|
|
|
|