[v8] r12702 committed - HChange is only deletable under certain circumstances....

4 views
Skip to first unread message

codesite...@google.com

unread,
Oct 11, 2012, 10:14:25 AM10/11/12
to v8-...@googlegroups.com
Revision: 12702
Author: sven...@chromium.org
Date: Thu Oct 11 07:14:03 2012
Log: HChange is only deletable under certain circumstances.

R=mstar...@chromium.org

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();
+ }
};


Reply all
Reply to author
Forward
0 new messages