Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java @ 11195:4f52b08bd2f9
Truffle-DSL: Implemented specialization grouping for generic cases.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 01 Aug 2013 20:53:54 +0200 |
parents | 4eb23800c907 |
children | efe58aa92f86 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java Thu Aug 01 20:53:05 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/typesystem/GuardData.java Thu Aug 01 20:53:54 2013 +0200 @@ -40,6 +40,20 @@ return negated; } + @Override + public boolean equals(Object obj) { + if (obj instanceof GuardData) { + GuardData other = (GuardData) obj; + return getMethod().equals(other.getMethod()) && negated == other.negated; + } + return false; + } + + @Override + public int hashCode() { + return getMethod().hashCode(); + } + public SpecializationData getSpecialization() { return specialization; }