Mercurial > hg > graal-compiler
changeset 6301:4535a87e8bf8
Fix for sameSign check and javadoc
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 29 Aug 2012 13:05:43 +0200 |
parents | 6a51bc216306 |
children | 5d7d9a6953bd 2a819543cc45 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java Tue Aug 28 14:58:55 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/type/IntegerStamp.java Wed Aug 29 13:05:43 2012 +0200 @@ -200,8 +200,13 @@ } } + /** + * Checks if the 2 stamps represent values of the same sign. + * Returns true if the two stamps are both positive of null or if they are both strictly negative + * @return true if the two stamps are both positive of null or if they are both strictly negative + */ public static boolean sameSign(IntegerStamp s1, IntegerStamp s2) { - return s1.isPositive() && s2.isPositive() || s1.isNegative() && s2.isNegative(); + return s1.isPositive() && s2.isPositive() || s1.isStrictlyNegative() && s2.isStrictlyNegative(); } }