Mercurial > hg > truffle
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java @ 11193:6879565ee10b
Truffle-DSL: Fixed the second specialization is unreachable if two specializations have the exactly same signature (also guards) and are ordered next to each other.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 01 Aug 2013 20:52:03 +0200 |
parents | b8fe1fe004ec |
children | b77721210bd6 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java Thu Aug 01 20:48:56 2013 +0200 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java Thu Aug 01 20:52:03 2013 +0200 @@ -259,4 +259,11 @@ getParameters().add(0, new ActualParameter(frameSpec, frameType, -1, false)); } } + + public boolean equalsGuards(SpecializationData specialization) { + if (assumptions.equals(specialization.getAssumptions()) && guards.equals(specialization.getGuards()) && getSignature().equalsParameters(specialization.getSignature())) { + return true; + } + return false; + } }