| Index: src/arm/macro-assembler-arm.cc
|
| ===================================================================
|
| --- src/arm/macro-assembler-arm.cc (revision 5890)
|
| +++ src/arm/macro-assembler-arm.cc (working copy)
|
| @@ -1693,6 +1693,33 @@
|
| }
|
|
|
|
|
| +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)));
|
| + // Load the global context from the global or builtins object.
|
| + ldr(function, FieldMemOperand(function,
|
| + GlobalObject::kGlobalContextOffset));
|
| + // Load the function from the global context.
|
| + ldr(function, MemOperand(function, Context::SlotOffset(index)));
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
|
| + Register map,
|
| + Register scratch) {
|
| + // Load the initial map. The global functions all have initial maps.
|
| + ldr(map, FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
|
| + if (FLAG_debug_code) {
|
| + Label ok, fail;
|
| + CheckMap(map, scratch, Heap::kMetaMapRootIndex, &fail, false);
|
| + b(&ok);
|
| + bind(&fail);
|
| + Abort("Global functions must have initial map");
|
| + bind(&ok);
|
| + }
|
| +}
|
| +
|
| +
|
| void MacroAssembler::JumpIfNotBothSmi(Register reg1,
|
| Register reg2,
|
| Label* on_not_both_smi) {
|
|
|