Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index d0421e3199c1474bf739562d0d4f2fa08ae57211..6ce4ba345535f5aef9839459bf4613e8910f0d8e 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -628,6 +628,8 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, |
!hinstr->HasObservableSideEffects(); |
if (needs_environment && !instr->HasEnvironment()) { |
instr = AssignEnvironment(instr); |
+ // We can't really figure out if the environment is needed or not. |
+ instr->environment()->set_has_been_used(); |
} |
return instr; |
@@ -1845,10 +1847,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
LOperand* temp2 = FixedTemp(f22); |
LInstruction* result = |
DefineSameAsFirst(new(zone()) LTaggedToI(value, temp1, temp2)); |
- if (!val->representation().IsSmi()) { |
- // Note: Only deopts in deferred code. |
- result = AssignEnvironment(result); |
- } |
+ if (!val->representation().IsSmi()) result = AssignEnvironment(result); |
return result; |
} |
} |
@@ -1943,11 +1942,10 @@ LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
value = UseRegisterAtStart(instr->value()); |
if (instr->has_migration_target()) info()->MarkAsDeferredCalling(); |
} |
- LCheckMaps* result = new(zone()) LCheckMaps(value); |
+ LInstruction* result = new(zone()) LCheckMaps(value); |
if (!instr->CanOmitMapChecks()) { |
- // Note: Only deopts in deferred code. |
- AssignEnvironment(result); |
- if (instr->has_migration_target()) return AssignPointerMap(result); |
+ result = AssignEnvironment(result); |
+ if (instr->has_migration_target()) result = AssignPointerMap(result); |
} |
return result; |
} |