Index: src/arm/macro-assembler-arm.cc |
=================================================================== |
--- src/arm/macro-assembler-arm.cc (revision 2701) |
+++ src/arm/macro-assembler-arm.cc (working copy) |
@@ -174,13 +174,6 @@ |
} |
-void MacroAssembler::LoadRoot(Register destination, |
- Heap::RootListIndex index, |
- Condition cond) { |
- ldr(destination, MemOperand(r10, index << kPointerSizeLog2), cond); |
-} |
- |
- |
// Will clobber 4 registers: object, offset, scratch, ip. The |
// register 'object' contains a heap object pointer. The heap object |
// tag is shifted away. |
@@ -721,8 +714,7 @@ |
push(holder_reg); // Temporarily save holder on the stack. |
// Read the first word and compare to the global_context_map. |
ldr(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset)); |
- LoadRoot(ip, Heap::kGlobalContextMapRootIndex); |
- cmp(holder_reg, ip); |
+ cmp(holder_reg, Operand(Factory::global_context_map())); |
Check(eq, "JSGlobalObject::global_context should be a global context."); |
pop(holder_reg); // Restore holder. |
} |
@@ -739,13 +731,11 @@ |
// that ip is clobbered as part of cmp with an object Operand. |
push(holder_reg); // Temporarily save holder on the stack. |
mov(holder_reg, ip); // Move ip to its holding place. |
- LoadRoot(ip, Heap::kNullValueRootIndex); |
- cmp(holder_reg, ip); |
+ cmp(holder_reg, Operand(Factory::null_value())); |
Check(ne, "JSGlobalProxy::context() should not be null."); |
ldr(holder_reg, FieldMemOperand(holder_reg, HeapObject::kMapOffset)); |
- LoadRoot(ip, Heap::kGlobalContextMapRootIndex); |
- cmp(holder_reg, ip); |
+ cmp(holder_reg, Operand(Factory::global_context_map())); |
Check(eq, "JSGlobalObject::global_context should be a global context."); |
// Restore ip is not needed. ip is reloaded below. |
pop(holder_reg); // Restore holder. |
@@ -802,8 +792,7 @@ |
// If the prototype or initial map is the hole, don't return it and |
// simply miss the cache instead. This will allow us to allocate a |
// prototype object on-demand in the runtime system. |
- LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
- cmp(result, ip); |
+ cmp(result, Operand(Factory::the_hole_value())); |
b(eq, miss); |
// If the function does not have an initial map, we're done. |
@@ -843,7 +832,7 @@ |
if (num_arguments > 0) { |
add(sp, sp, Operand(num_arguments * kPointerSize)); |
} |
- LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
+ mov(r0, Operand(Factory::undefined_value())); |
} |