Chromium Code Reviews| Index: src/arm/macro-assembler-arm.cc |
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
| index 9894ff202e6d1b87e98b20ce60268ff336ae3273..e6ba7794797728cdfa5466793bf5ec4169f9adae 100644 |
| --- a/src/arm/macro-assembler-arm.cc |
| +++ b/src/arm/macro-assembler-arm.cc |
| @@ -2879,6 +2879,32 @@ 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; |
| + ldr(map_out, FieldMemOperand(function_in, |
| + JSFunction::kPrototypeOrInitialMapOffset)); |
| + if (!FLAG_smi_only_arrays) { |
| + // Load the global or builtins object from the current context. |
| + ldr(scratch, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| + ldr(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset)); |
| + |
| + // Check that the function's map is same as the cached map. |
| + ldr(ip, MemOperand( |
| + scratch, Context::SlotOffset(Context::SMI_JS_ARRAY_MAP_INDEX))); |
| + cmp(map_out, ip); |
| + b(ne, &done); |
| + |
| + // Use the transitioned cached |
|
Jakob Kummerow
2012/01/23 17:16:55
nit: += "map."
danno
2012/01/26 21:32:34
Done.
|
| + ldr(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. |
| ldr(function, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |