Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index d3f1a9e09024c8f1643eb53bddc3b595b3953d3e..e3bee986b5a6edf2a3447862315f51fb795955e2 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3068,6 +3068,19 @@ HType HUnaryMathOperation::CalculateInferredType() { |
} |
+Representation HUnaryMathOperation::RepresentationFromInputs() { |
+ // Determine the worst case of observed input representations and |
+ // the currently assumed output representation. |
+ Representation rep = representation(); |
+ rep = rep.generalize(observed_input_representation(1)); |
Jakob Kummerow
2013/06/07 08:44:45
HUnaryMathOperation doesn't have observed input re
Toon Verwaest
2013/06/07 09:09:52
Done.
|
+ // If any of the actual input representation is more general than what we |
+ // have so far but not Tagged, use that representation instead. |
+ Representation input_rep = value()->representation(); |
+ if (!input_rep.IsTagged()) rep = rep.generalize(input_rep); |
+ return rep; |
+} |
+ |
+ |
HType HStringCharFromCode::CalculateInferredType() { |
return HType::String(); |
} |