| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index 941c7fe4eac0e9f42a69a89241313b3e1211158e..9eb1fc763948379f10bb4442f55845ef7dab1c76 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -4279,6 +4279,31 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
|
| }
|
|
|
|
|
| +void MacroAssembler::LoadGlobalInitialConstructedArrayMap(
|
| + Register function_in, Register scratch, Register map_out) {
|
| + ASSERT(!function_in.is(map_out));
|
| + Label done;
|
| + lw(map_out, FieldMemOperand(function_in,
|
| + JSFunction::kPrototypeOrInitialMapOffset));
|
| + if (!FLAG_smi_only_arrays) {
|
| + // Load the global or builtins object from the current context.
|
| + lw(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
| + lw(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset));
|
| +
|
| + // Check that the function's map is same as the cached map.
|
| + lw(at, MemOperand(
|
| + scratch, Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX)));
|
| + Branch(&done, ne, map_out, Operand(at));
|
| +
|
| + // Use the cached transitioned map.
|
| + lw(map_out,
|
| + MemOperand(scratch,
|
| + Context::SlotOffset(Context::OBJECT_JS_ARRAY_MAP_INDEX)));
|
| + }
|
| + bind(&done);
|
| +}
|
| +
|
| +
|
| 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_INDEX)));
|
|
|