Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index f6183c064eb25c72dba7777ac0955ab710c40ea4..bb92e89d34fa5cd6491fff93818819e788b32949 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1559,8 +1559,9 @@ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) { |
LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) { |
- return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()), |
- UseAtStart(instr->length()))); |
+ return AssignEnvironment(new LBoundsCheck( |
+ UseRegisterOrConstantAtStart(instr->index()), |
+ UseAtStart(instr->length()))); |
} |
@@ -1881,9 +1882,9 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
ASSERT(instr->representation().IsTagged()); |
ASSERT(instr->key()->representation().IsInteger32()); |
LOperand* obj = UseRegisterAtStart(instr->object()); |
- LOperand* key = UseRegisterAtStart(instr->key()); |
+ LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); |
- return AssignEnvironment(DefineSameAsFirst(result)); |
+ return AssignEnvironment(DefineAsRegister(result)); |
} |