Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 8a6ccbc9e2cbe364fb7e973372e478437c45a73d..7075e80faa1740676c07d84c3cefa908286e0fca 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -1276,20 +1276,29 @@ void HReturn::PrintDataTo(StringStream* stream) { |
Representation HBranch::observed_input_representation(int index) { |
static const ToBooleanStub::Types tagged_types( |
- ToBooleanStub::UNDEFINED | |
ToBooleanStub::NULL_TYPE | |
ToBooleanStub::SPEC_OBJECT | |
ToBooleanStub::STRING | |
ToBooleanStub::SYMBOL); |
+ static const ToBooleanStub::Types number_types( |
+ ToBooleanStub::HEAP_NUMBER | |
+ ToBooleanStub::SMI); |
if (expected_input_types_.ContainsAnyOf(tagged_types)) { |
return Representation::Tagged(); |
- } else if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { |
+ } |
+ if (expected_input_types_.Contains(ToBooleanStub::UNDEFINED)) { |
+ if (expected_input_types_.ContainsAnyOf(number_types)) { |
Toon Verwaest
2013/06/18 17:01:52
Are you sure you want to make smi+undefined double
|
+ return Representation::Double(); |
+ } |
+ return Representation::Tagged(); |
+ } |
+ if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) { |
return Representation::Double(); |
- } else if (expected_input_types_.Contains(ToBooleanStub::SMI)) { |
+ } |
+ if (expected_input_types_.Contains(ToBooleanStub::SMI)) { |
return Representation::Smi(); |
- } else { |
- return Representation::None(); |
} |
+ return Representation::None(); |
} |