Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 38acd48f3c7b89f3d6d3c819689531a745fc7097..97722ccfa24876d8671978cbabfc49f5ce8fab64 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -623,6 +623,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; |
@@ -1895,10 +1897,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
LOperand* temp2 = FixedTemp(d11); |
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; |
} |
} |
@@ -1993,11 +1992,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; |
} |