Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index bcb90ca802677f0420aa5f0956f7292a5daa09fe..18ef79a629c2d5420569a333c6ffbe9af1d041eb 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -4289,6 +4289,9 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
Register object = ToRegister(instr->object()); |
Handle<Map> transition = instr->transition(); |
+ SmiCheck check_needed = |
+ instr->hydrogen()->value()->IsHeapObject() |
+ ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
if (FLAG_track_fields && representation.IsSmi()) { |
if (instr->value()->IsConstantOperand()) { |
@@ -4308,6 +4311,9 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
Register value = ToRegister(instr->value()); |
__ test(value, Immediate(kSmiTagMask)); |
DeoptimizeIf(zero, instr->environment()); |
+ |
+ // We know that value is a smi now, so we can omit the check below. |
+ check_needed = OMIT_SMI_CHECK; |
} |
} |
} else if (representation.IsDouble()) { |
@@ -4345,10 +4351,6 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
} |
// Do the store. |
- SmiCheck check_needed = |
- instr->hydrogen()->value()->IsHeapObject() |
- ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
- |
Register write_register = object; |
if (!access.IsInobject()) { |
write_register = ToRegister(instr->temp()); |