| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index 41a331a07d6e663462ddf107c50b31ed2aee81b5..63888638680226214eb6cf8554b333c343c94914 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -508,6 +508,13 @@ LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
|
| }
|
|
|
|
|
| +LOperand* LChunkBuilder::UseTempRegisterOrConstant(HValue* value) {
|
| + return value->IsConstant()
|
| + ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| + : UseTempRegister(value);
|
| +}
|
| +
|
| +
|
| LOperand* LChunkBuilder::Use(HValue* value) {
|
| return Use(value, new(zone()) LUnallocated(LUnallocated::NONE));
|
| }
|
| @@ -2177,17 +2184,20 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| LOperand* key = NULL;
|
| LOperand* val = NULL;
|
|
|
| - if (instr->value()->representation().IsDouble()) {
|
| + Representation value_representation = instr->value()->representation();
|
| + if (value_representation.IsDouble()) {
|
| object = UseRegisterAtStart(instr->elements());
|
| val = UseTempRegister(instr->value());
|
| key = UseRegisterOrConstantAtStart(instr->key());
|
| } else {
|
| - ASSERT(instr->value()->representation().IsSmiOrTagged());
|
| - object = UseTempRegister(instr->elements());
|
| + ASSERT(value_representation.IsSmiOrTagged() ||
|
| + value_representation.IsInteger32());
|
| if (needs_write_barrier) {
|
| + object = UseTempRegister(instr->elements());
|
| val = UseTempRegister(instr->value());
|
| key = UseTempRegister(instr->key());
|
| } else {
|
| + object = UseRegisterAtStart(instr->elements());
|
| val = UseRegisterOrConstantAtStart(instr->value());
|
| key = UseRegisterOrConstantAtStart(instr->key());
|
| }
|
|
|