Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index ad3b854ce5a73efa3a700209d66822cec0def589..a7319aeb5e70b3477d1903f4f905a0f612d37044 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -2125,8 +2125,6 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
- ElementsKind elements_kind = instr->elements_kind(); |
- |
if (!instr->is_external()) { |
ASSERT(instr->elements()->representation().IsTagged()); |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |
@@ -2137,14 +2135,18 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
if (instr->value()->representation().IsDouble()) { |
object = UseRegisterAtStart(instr->elements()); |
key = UseRegisterOrConstantAtStart(instr->key()); |
- val = UseTempRegister(instr->value()); |
+ val = UseRegister(instr->value()); |
} else { |
ASSERT(instr->value()->representation().IsSmiOrTagged()); |
- object = UseTempRegister(instr->elements()); |
- val = needs_write_barrier ? UseTempRegister(instr->value()) |
- : UseRegisterAtStart(instr->value()); |
- key = needs_write_barrier ? UseTempRegister(instr->key()) |
- : UseRegisterOrConstantAtStart(instr->key()); |
+ if (needs_write_barrier) { |
+ object = UseTempRegister(instr->elements()); |
+ val = UseTempRegister(instr->value()); |
+ key = UseTempRegister(instr->key()); |
+ } else { |
+ object = UseRegisterAtStart(instr->elements()); |
+ val = UseRegisterAtStart(instr->value()); |
+ key = UseRegisterOrConstantAtStart(instr->key()); |
+ } |
} |
return new(zone()) LStoreKeyed(object, key, val); |
@@ -2152,17 +2154,13 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
ASSERT( |
(instr->value()->representation().IsInteger32() && |
- (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
- (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
+ (instr->elements_kind() != EXTERNAL_FLOAT_ELEMENTS) && |
+ (instr->elements_kind() != EXTERNAL_DOUBLE_ELEMENTS)) || |
(instr->value()->representation().IsDouble() && |
- ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
- (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
+ ((instr->elements_kind() == EXTERNAL_FLOAT_ELEMENTS) || |
+ (instr->elements_kind() == EXTERNAL_DOUBLE_ELEMENTS)))); |
ASSERT(instr->elements()->representation().IsExternal()); |
- bool val_is_temp_register = |
- elements_kind == EXTERNAL_PIXEL_ELEMENTS || |
- elements_kind == EXTERNAL_FLOAT_ELEMENTS; |
- LOperand* val = val_is_temp_register ? UseTempRegister(instr->value()) |
- : UseRegister(instr->value()); |
+ LOperand* val = UseRegister(instr->value()); |
LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
LOperand* external_pointer = UseRegister(instr->elements()); |