Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index b9728ed04fa14aab43229acbaba69d3181165c49..a56744bf597a245a0afed0b4b1a64b38d1a4cd0c 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -375,16 +375,13 @@ void MacroAssembler::LoadRoot(Register destination, |
Heap::RootListIndex index, |
Condition cond) { |
if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) && |
- !Heap::RootCanBeWrittenAfterInitialization(index) && |
+ isolate()->heap()->RootCanBeTreatedAsConstant(index) && |
!predictable_code_size()) { |
- Handle<Object> root(isolate()->heap()->roots_array_start()[index], |
- isolate()); |
- if (!isolate()->heap()->InNewSpace(*root)) { |
- // The CPU supports fast immediate values, and this root will never |
- // change. We will load it as a relocatable immediate value. |
- mov(destination, Operand(root), LeaveCC, cond); |
- return; |
- } |
+ // The CPU supports fast immediate values, and this root will never |
+ // change. We will load it as a relocatable immediate value. |
+ Handle<Object> root(&isolate()->heap()->roots_array_start()[index]); |
+ mov(destination, Operand(root), LeaveCC, cond); |
+ return; |
} |
ldr(destination, MemOperand(kRootRegister, index << kPointerSizeLog2), cond); |
} |