Chromium Code Reviews| Index: src/ia32/lithium-ia32.cc |
| =================================================================== |
| --- src/ia32/lithium-ia32.cc (revision 6255) |
| +++ src/ia32/lithium-ia32.cc (working copy) |
| @@ -1674,8 +1674,9 @@ |
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| - return DefineAsRegister( |
| - new LLoadNamedField(UseRegisterAtStart(instr->object()))); |
| + ASSERT(instr->representation().IsTagged()); |
| + LOperand* obj = UseRegisterAtStart(instr->object()); |
| + return DefineAsRegister(new LLoadNamedField(obj)); |
| } |
| @@ -1702,21 +1703,12 @@ |
| LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
| HLoadKeyedFastElement* instr) { |
| - Representation r = instr->representation(); |
| + ASSERT(instr->representation().IsTagged()); |
| LOperand* obj = UseRegisterAtStart(instr->object()); |
| ASSERT(instr->key()->representation().IsInteger32()); |
|
Kevin Millikin (Chromium)
2011/01/11 11:31:56
Move this assert up by the other one?
fschneider
2011/01/11 11:41:49
Done.
|
| LOperand* key = UseRegisterAtStart(instr->key()); |
| - LOperand* load_result = NULL; |
| - // Double needs an extra temp, because the result is converted from heap |
| - // number to a double register. |
| - if (r.IsDouble()) load_result = TempRegister(); |
| - LLoadKeyedFastElement* load = new LLoadKeyedFastElement(obj, |
| - key, |
| - load_result); |
| - LInstruction* result = r.IsDouble() |
| - ? DefineAsRegister(load) |
| - : DefineSameAsFirst(load); |
| - return AssignEnvironment(result); |
| + LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
| + return AssignEnvironment(DefineSameAsFirst(result)); |
| } |
| @@ -1777,14 +1769,7 @@ |
| LOperand* temp = (!instr->is_in_object() || needs_write_barrier) |
| ? TempRegister() : NULL; |
| - return new LStoreNamedField(obj, |
| - instr->name(), |
| - val, |
| - instr->is_in_object(), |
| - instr->offset(), |
| - temp, |
| - needs_write_barrier, |
| - instr->transition()); |
| + return new LStoreNamedField(obj, val, temp); |
| } |
| @@ -1792,7 +1777,7 @@ |
| LOperand* obj = UseFixed(instr->object(), edx); |
| LOperand* val = UseFixed(instr->value(), eax); |
| - LStoreNamedGeneric* result = new LStoreNamedGeneric(obj, instr->name(), val); |
| + LStoreNamedGeneric* result = new LStoreNamedGeneric(obj, val); |
| return MarkAsCall(result, instr); |
| } |