| Index: src/arm/macro-assembler-arm.cc
|
| ===================================================================
|
| --- src/arm/macro-assembler-arm.cc (revision 5040)
|
| +++ src/arm/macro-assembler-arm.cc (working copy)
|
| @@ -873,88 +873,6 @@
|
| }
|
|
|
|
|
| -Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
|
| - JSObject* holder, Register holder_reg,
|
| - Register scratch,
|
| - int save_at_depth,
|
| - Label* miss) {
|
| - // Make sure there's no overlap between scratch and the other
|
| - // registers.
|
| - ASSERT(!scratch.is(object_reg) && !scratch.is(holder_reg));
|
| -
|
| - // Keep track of the current object in register reg.
|
| - Register reg = object_reg;
|
| - int depth = 0;
|
| -
|
| - if (save_at_depth == depth) {
|
| - str(reg, MemOperand(sp));
|
| - }
|
| -
|
| - // Check the maps in the prototype chain.
|
| - // Traverse the prototype chain from the object and do map checks.
|
| - while (object != holder) {
|
| - depth++;
|
| -
|
| - // Only global objects and objects that do not require access
|
| - // checks are allowed in stubs.
|
| - ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
|
| -
|
| - // Get the map of the current object.
|
| - ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
|
| - cmp(scratch, Operand(Handle<Map>(object->map())));
|
| -
|
| - // Branch on the result of the map check.
|
| - b(ne, miss);
|
| -
|
| - // Check access rights to the global object. This has to happen
|
| - // after the map check so that we know that the object is
|
| - // actually a global object.
|
| - if (object->IsJSGlobalProxy()) {
|
| - CheckAccessGlobalProxy(reg, scratch, miss);
|
| - // Restore scratch register to be the map of the object. In the
|
| - // new space case below, we load the prototype from the map in
|
| - // the scratch register.
|
| - ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
|
| - }
|
| -
|
| - reg = holder_reg; // from now the object is in holder_reg
|
| - JSObject* prototype = JSObject::cast(object->GetPrototype());
|
| - if (Heap::InNewSpace(prototype)) {
|
| - // The prototype is in new space; we cannot store a reference
|
| - // to it in the code. Load it from the map.
|
| - ldr(reg, FieldMemOperand(scratch, Map::kPrototypeOffset));
|
| - } else {
|
| - // The prototype is in old space; load it directly.
|
| - mov(reg, Operand(Handle<JSObject>(prototype)));
|
| - }
|
| -
|
| - if (save_at_depth == depth) {
|
| - str(reg, MemOperand(sp));
|
| - }
|
| -
|
| - // Go to the next object in the prototype chain.
|
| - object = prototype;
|
| - }
|
| -
|
| - // Check the holder map.
|
| - ldr(scratch, FieldMemOperand(reg, HeapObject::kMapOffset));
|
| - cmp(scratch, Operand(Handle<Map>(object->map())));
|
| - b(ne, miss);
|
| -
|
| - // Log the check depth.
|
| - LOG(IntEvent("check-maps-depth", depth + 1));
|
| -
|
| - // Perform security check for access to the global object and return
|
| - // the holder register.
|
| - ASSERT(object == holder);
|
| - ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
|
| - if (object->IsJSGlobalProxy()) {
|
| - CheckAccessGlobalProxy(reg, scratch, miss);
|
| - }
|
| - return reg;
|
| -}
|
| -
|
| -
|
| void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
|
| Register scratch,
|
| Label* miss) {
|
|
|