Revision: 14997
Author:   verwa...@chromium.org
Date:     Fri Jun  7 02:11:33 2013
Log: Don't ignore the actual input representation in UnaryMathOperations

R=jkumme...@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16035014
http://code.google.com/p/v8/source/detail?r=14997

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Fri Jun 7 02:07:53 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Fri Jun 7 02:11:33 2013
@@ -3090,6 +3090,16 @@
 HType HUnaryMathOperation::CalculateInferredType() {
   return HType::TaggedNumber();
 }
+
+
+Representation HUnaryMathOperation::RepresentationFromInputs() {
+  Representation rep = representation();
+  // 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() {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Fri Jun 7 02:07:53 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Fri Jun 7 02:11:33 2013
@@ -2651,6 +2651,7 @@
   virtual Range* InferRange(Zone* zone);

   virtual HValue* Canonicalize();
+  virtual Representation RepresentationFromInputs();

   BuiltinFunctionId op() const { return op_; }
   const char* OpName() const;

--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to