Mercurial > hg > truffle
comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/java/InstanceOfNode.java @ 5831:ed08c40d67de
Add a alwaysNull property to ObjectStamp (Phi(null, a! A) get a "a A" stamp and not just "a -")
Add inferstamp to Pi and CheckCast to propage nonNull/alwaysNull
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 13 Jul 2012 14:10:02 +0200 |
parents | b4c406861c33 |
children | fd8832ae511d |
comparison
equal
deleted
inserted
replaced
5830:f28115ee6108 | 5831:ed08c40d67de |
---|---|
101 } | 101 } |
102 } else { | 102 } else { |
103 // since the subtype comparison was only performed on a declared type we don't really know if it might be true at run time... | 103 // since the subtype comparison was only performed on a declared type we don't really know if it might be true at run time... |
104 } | 104 } |
105 } | 105 } |
106 | 106 if (object().objectStamp().alwaysNull()) { |
107 Constant constant = object().asConstant(); | 107 return ConstantNode.forBoolean(false, graph()); |
108 if (constant != null) { | |
109 assert constant.kind == Kind.Object; | |
110 if (constant.isNull()) { | |
111 return ConstantNode.forBoolean(false, graph()); | |
112 } else { | |
113 assert false : "non-null constants are always expected to provide an exact type"; | |
114 } | |
115 } | 108 } |
116 return this; | 109 return this; |
117 } | 110 } |
118 | 111 |
119 @Override | 112 @Override |