Mercurial > hg > graal-compiler
changeset 19699:50b6f616b3c7
Use ILLEGAL.equals(value) in ValueUtil.isIllegal
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 03 Mar 2015 18:02:00 -0800 |
parents | 898686c10193 |
children | 2cca53fbf38f |
files | graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ValueUtil.java graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ValueUtil.java Tue Mar 03 18:00:00 2015 -0800 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ValueUtil.java Tue Mar 03 18:02:00 2015 -0800 @@ -33,7 +33,7 @@ public static boolean isIllegal(Value value) { assert value != null; - return value.equals(Value.ILLEGAL); + return Value.ILLEGAL.equals(value); } public static boolean isLegal(Value value) {
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java Tue Mar 03 18:00:00 2015 -0800 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/Value.java Tue Mar 03 18:02:00 2015 -0800 @@ -34,6 +34,11 @@ public String toString() { return "-"; } + + @Override + public boolean equals(Object other) { + return this == other; + } }; LIRKind getLIRKind();