Index: src/crankshaft/ia32/lithium-ia32.cc |
diff --git a/src/crankshaft/ia32/lithium-ia32.cc b/src/crankshaft/ia32/lithium-ia32.cc |
index a2a35a599ac46f20625b4f597b9f3bf09d4142c3..77e64bf021d821c8844074261a87cc2bf9145dd0 100644 |
--- a/src/crankshaft/ia32/lithium-ia32.cc |
+++ b/src/crankshaft/ia32/lithium-ia32.cc |
@@ -900,16 +900,18 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
HValue* value = instr->value(); |
Representation r = value->representation(); |
HType type = value->type(); |
- ToBooleanICStub::Types expected = instr->expected_input_types(); |
- if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic(); |
+ ToBooleanHints expected = instr->expected_input_types(); |
+ if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny; |
bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() || |
type.IsJSArray() || type.IsHeapNumber() || type.IsString(); |
- LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL; |
+ LOperand* temp = !easy_case && (expected & ToBooleanHint::kNeedsMap) |
+ ? TempRegister() |
+ : NULL; |
LInstruction* branch = new(zone()) LBranch(UseRegister(value), temp); |
- if (!easy_case && |
- ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) || |
- !expected.IsGeneric())) { |
+ if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) && |
+ (expected & ToBooleanHint::kNeedsMap)) || |
+ expected != ToBooleanHint::kAny)) { |
branch = AssignEnvironment(branch); |
} |
return branch; |