return reinterpret_cast<HUnaryOperation*>(value);
}
- HValue* value() { return OperandAt(0); }
+ HValue* value() const { return OperandAt(0); }
virtual void PrintDataTo(StringStream* stream);
};
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);
}
virtual bool DataEquals(HValue* other) { return true; }
private:
- virtual bool IsDeletable() const { return true; }
+ virtual bool IsDeletable() const {
+ return !from().IsTagged() || value()->type().IsSmi();
+ }
};