Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 7278c95e92b30bd572f177a5fb195229af4b98dd..cf6ed1bbf9e8076228457dd5b99dbb766bfdc550 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -426,11 +426,7 @@ Register LCodeGen::EmitLoadRegister(LOperand* op, Register scratch) { |
Abort("EmitLoadRegister: Unsupported double immediate."); |
} else { |
ASSERT(r.IsTagged()); |
- if (literal->IsSmi()) { |
- __ mov(scratch, Operand(literal)); |
- } else { |
- __ LoadHeapObject(scratch, Handle<HeapObject>::cast(literal)); |
- } |
+ __ LoadObject(scratch, literal); |
} |
return scratch; |
} else if (op->IsStackSlot() || op->IsArgument()) { |
@@ -1806,12 +1802,7 @@ void LCodeGen::DoConstantD(LConstantD* instr) { |
void LCodeGen::DoConstantT(LConstantT* instr) { |
Handle<Object> value = instr->value(); |
AllowDeferredHandleDereference smi_check; |
- if (value->IsSmi()) { |
- __ mov(ToRegister(instr->result()), Operand(value)); |
- } else { |
- __ LoadHeapObject(ToRegister(instr->result()), |
- Handle<HeapObject>::cast(value)); |
- } |
+ __ LoadObject(ToRegister(instr->result()), value); |
} |
@@ -3032,9 +3023,9 @@ void LCodeGen::EmitLoadFieldOrConstantFunction(Register result, |
__ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
__ ldr(result, FieldMemOperand(result, offset + FixedArray::kHeaderSize)); |
} |
- } else if (lookup.IsConstantFunction()) { |
- Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*type)); |
- __ LoadHeapObject(result, function); |
+ } else if (lookup.IsConstant()) { |
+ Handle<Object> constant(lookup.GetConstantFromMap(*type), isolate()); |
+ __ LoadObject(result, constant); |
} else { |
// Negative lookup. |
// Check prototypes. |