Reviewers: Rodolph Perfetta, danno,
Message:
PTAL
Description:
Fix arm port of tracking field representations. Based on Rodolph Perfetta's
comments
BUG=
Please review this at
https://chromiumcodereview.appspot.com/14522003/
SVN Base:
https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/lithium-arm.h
M src/arm/lithium-arm.cc
M src/arm/lithium-codegen-arm.cc
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index
16b2f095f2b62b1b3068d3e99f3333baa88afb6b..7e81ca60e8cd3d4465385d0a8cdee13da80ecce2
100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -2120,9 +2120,7 @@ LInstruction*
LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
LOperand* obj = UseRegisterAtStart(instr->object());
- LOperand* temp = instr->representation().IsDouble() ? TempRegister() :
NULL;
- ASSERT(temp == NULL || FLAG_track_double_fields);
- return DefineAsRegister(new(zone()) LLoadNamedField(obj, temp));
+ return DefineAsRegister(new(zone()) LLoadNamedField(obj));
}
Index: src/arm/lithium-arm.h
diff --git a/src/arm/lithium-arm.h b/src/arm/lithium-arm.h
index
5029c1db7aaa89716a4302fa30d3cf523f2576f4..11675e9dbf6486a73cbad09eaf614e2c6bf9487f
100644
--- a/src/arm/lithium-arm.h
+++ b/src/arm/lithium-arm.h
@@ -1520,15 +1520,13 @@ class LReturn: public LTemplateInstruction<0, 2, 0>
{
};
-class LLoadNamedField: public LTemplateInstruction<1, 1, 1> {
+class LLoadNamedField: public LTemplateInstruction<1, 1, 0> {
public:
- explicit LLoadNamedField(LOperand* object, LOperand* temp) {
+ explicit LLoadNamedField(LOperand* object) {
inputs_[0] = object;
- temps_[0] = temp;
}
LOperand* object() { return inputs_[0]; }
- LOperand* temp() { return temps_[0]; }
DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load-named-field")
DECLARE_HYDROGEN_ACCESSOR(LoadNamedField)
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index
49277757e1af526147ad77c79421c54fff69cea1..4f55f8c61ae8a1f33df8cd8b718d830369674f6d
100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -3085,7 +3085,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField*
instr) {
ASSERT(!instr->hydrogen()->representation().IsDouble());
}
Register temp = instr->hydrogen()->representation().IsDouble()
- ? ToRegister(instr->temp()) : ToRegister(instr->result());
+ ? scratch0() : ToRegister(instr->result());
if (instr->hydrogen()->is_in_object()) {
__ ldr(temp, FieldMemOperand(object, instr->hydrogen()->offset()));
} else {
@@ -3102,8 +3102,8 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField*
instr) {
__ vmov(flt_scratch, temp);
__ vcvt_f64_s32(result, flt_scratch);
__ b(&done);
- __ sub(ip, temp, Operand(kHeapObjectTag));
- __ vldr(result, ip, HeapNumber::kValueOffset);
+ __ bind(&load_from_heap_number);
+ __ vldr(result, FieldMemOperand(temp, HeapNumber::kValueOffset));
__ bind(&done);
}
}