| Index: src/ia32/lithium-gap-resolver-ia32.cc
|
| diff --git a/src/ia32/lithium-gap-resolver-ia32.cc b/src/ia32/lithium-gap-resolver-ia32.cc
|
| index 3da8f320d0b897e4fe66efe6fed9f8d45839384c..299e6d4eddb022ea66edcf378904192ee517701c 100644
|
| --- a/src/ia32/lithium-gap-resolver-ia32.cc
|
| +++ b/src/ia32/lithium-gap-resolver-ia32.cc
|
| @@ -306,20 +306,20 @@ void LGapResolver::EmitMove(int index) {
|
| LConstantOperand* constant_source = LConstantOperand::cast(source);
|
| if (destination->IsRegister()) {
|
| Register dst = cgen_->ToRegister(destination);
|
| - if (cgen_->IsSmi(constant_source)) {
|
| - __ Set(dst, cgen_->ToSmiImmediate(constant_source));
|
| - } else if (cgen_->IsInteger32(constant_source)) {
|
| - __ Set(dst, cgen_->ToInteger32Immediate(constant_source));
|
| + Representation r = cgen_->IsSmi(constant_source)
|
| + ? Representation::Smi() : Representation::Integer32();
|
| + if (cgen_->IsInteger32(constant_source)) {
|
| + __ Set(dst, cgen_->ToImmediate(constant_source, r));
|
| } else {
|
| __ LoadObject(dst, cgen_->ToHandle(constant_source));
|
| }
|
| } else {
|
| ASSERT(destination->IsStackSlot());
|
| Operand dst = cgen_->ToOperand(destination);
|
| - if (cgen_->IsSmi(constant_source)) {
|
| - __ Set(dst, cgen_->ToSmiImmediate(constant_source));
|
| - } else if (cgen_->IsInteger32(constant_source)) {
|
| - __ Set(dst, cgen_->ToInteger32Immediate(constant_source));
|
| + Representation r = cgen_->IsSmi(constant_source)
|
| + ? Representation::Smi() : Representation::Integer32();
|
| + if (cgen_->IsInteger32(constant_source)) {
|
| + __ Set(dst, cgen_->ToImmediate(constant_source, r));
|
| } else {
|
| Register tmp = EnsureTempRegister();
|
| __ LoadObject(tmp, cgen_->ToHandle(constant_source));
|
|
|