Revision: 12702
Author:   [email protected]
Date:     Thu Oct 11 07:14:03 2012
Log:      HChange is only deletable under certain circumstances.

[email protected]

Review URL: https://codereview.chromium.org/11092075
http://code.google.com/p/v8/source/detail?r=12702

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

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Thu Oct 11 03:52:58 2012 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Oct 11 07:14:03 2012
@@ -1194,7 +1194,7 @@
     return reinterpret_cast<HUnaryOperation*>(value);
   }

-  HValue* value() { return OperandAt(0); }
+  HValue* value() const { return OperandAt(0); }
   virtual void PrintDataTo(StringStream* stream);
 };

@@ -1270,8 +1270,8 @@
   virtual HType CalculateInferredType();
   virtual HValue* Canonicalize();

-  Representation from() { return value()->representation(); }
-  Representation to() { return representation(); }
+  Representation from() const { return value()->representation(); }
+  Representation to() const { return representation(); }
   bool deoptimize_on_undefined() const {
     return CheckFlag(kDeoptimizeOnUndefined);
   }
@@ -1292,7 +1292,9 @@
   virtual bool DataEquals(HValue* other) { return true; }

  private:
-  virtual bool IsDeletable() const { return true; }
+  virtual bool IsDeletable() const {
+    return !from().IsTagged() || value()->type().IsSmi();
+  }
 };


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to