Chromium Code Reviews| Index: src/arm/lithium-arm.cc |
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
| index b421f8a045204126c48babca9592b147b001f15f..642a0ab28f8f2932d1d13ecd5041daa60c5d3b09 100644 |
| --- a/src/arm/lithium-arm.cc |
| +++ b/src/arm/lithium-arm.cc |
| @@ -999,10 +999,12 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| LBranch* result = new(zone()) LBranch(UseRegister(value)); |
| // Tagged values that are not known smis or booleans require a |
| - // deoptimization environment. |
| + // deoptimization environment. Except in the Generic case. |
|
Toon Verwaest
2013/06/20 12:45:59
If the instruction is generic no environment is ne
|
| Representation rep = value->representation(); |
| HType type = value->type(); |
| - if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean()) { |
| + ToBooleanStub::Types expected = instr->expected_input_types(); |
| + if (rep.IsTagged() && !type.IsSmi() && !type.IsBoolean() && |
| + !expected.IsGeneric()) { |
| return AssignEnvironment(result); |
| } |
| return result; |