| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index fdddef3f479a6eb3af46d21f3b98bb9e2d8877c0..3390aa6127275e35a96ed90452b6688f1331840f 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -580,6 +580,14 @@ LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
|
| }
|
|
|
|
|
| +LOperand* LChunkBuilder::UseFixedOrConstant(HValue* value,
|
| + Register fixed_register) {
|
| + return CanBeImmediateConstant(value)
|
| + ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| + : UseFixed(value, fixed_register);
|
| +}
|
| +
|
| +
|
| LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
|
| return CanBeImmediateConstant(value)
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| @@ -1866,13 +1874,12 @@ LInstruction* LChunkBuilder::DoDateField(HDateField* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
| - LOperand* string = UseRegister(instr->string());
|
| - LOperand* index = UseRegister(instr->index());
|
| - ASSERT(ecx.is_byte_register());
|
| - LOperand* value = UseFixed(instr->value(), ecx);
|
| - LSeqStringSetChar* result =
|
| - new(zone()) LSeqStringSetChar(instr->encoding(), string, index, value);
|
| - return DefineSameAsFirst(result);
|
| + LOperand* string = UseRegisterAtStart(instr->string());
|
| + LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| + LOperand* value = (instr->encoding() == String::ONE_BYTE_ENCODING)
|
| + ? UseFixedOrConstant(instr->value(), eax)
|
| + : UseRegisterOrConstantAtStart(instr->value());
|
| + return new(zone()) LSeqStringSetChar(string, index, value);
|
| }
|
|
|
|
|
|
|