Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java @ 13527:25ecb47a6d0e
Truffle-DSL: Added support for references to child arrays in @ShortCircuit;
Introduced new layer NodeExecutionData to the implementation model which is in between NodeChildData and the actual parameters..
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Tue, 07 Jan 2014 12:22:47 +0100 |
parents | 2b9fcffd6f36 |
children | 5a0c694ef735 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java Thu Dec 26 12:37:28 2013 -0800 +++ b/graal/com.oracle.truffle.dsl.processor/src/com/oracle/truffle/dsl/processor/node/SpecializationData.java Tue Jan 07 12:22:47 2014 +0100 @@ -99,20 +99,12 @@ return false; } - for (ActualParameter parameter : getParameters()) { - if (!parameter.getSpecification().isSignature()) { - continue; - } - NodeChildData child = getNode().findChild(parameter.getSpecification().getName()); - if (child == null) { - continue; - } + for (ActualParameter parameter : getSignatureParameters()) { ActualParameter genericParameter = getNode().getGenericSpecialization().findParameter(parameter.getLocalName()); if (!parameter.getTypeSystemType().equals(genericParameter.getTypeSystemType())) { return false; } } - return true; } @@ -126,12 +118,8 @@ if (!getAssumptions().isEmpty()) { return true; } - for (ActualParameter parameter : getParameters()) { - NodeChildData child = getNode().findChild(parameter.getSpecification().getName()); - if (child == null) { - continue; - } - ExecutableTypeData type = child.findExecutableType(context, parameter.getTypeSystemType()); + for (ActualParameter parameter : getSignatureParameters()) { + ExecutableTypeData type = parameter.getSpecification().getExecution().getChild().findExecutableType(context, parameter.getTypeSystemType()); if (type.hasUnexpectedValue(context)) { return true; } @@ -254,7 +242,7 @@ @Override public String toString() { - return String.format("%s [id = %s, method = %s, guards = %s, signature = %s]", getClass().getSimpleName(), getId(), getMethod(), getGuards(), getSignature()); + return String.format("%s [id = %s, method = %s, guards = %s, signature = %s]", getClass().getSimpleName(), getId(), getMethod(), getGuards(), getTypeSignature()); } public void forceFrame(TypeMirror frameType) { @@ -267,7 +255,7 @@ } public boolean equalsGuards(SpecializationData specialization) { - if (assumptions.equals(specialization.getAssumptions()) && guards.equals(specialization.getGuards()) && getSignature().equalsParameters(specialization.getSignature())) { + if (assumptions.equals(specialization.getAssumptions()) && guards.equals(specialization.getGuards()) && getTypeSignature().equalsParameters(specialization.getTypeSignature())) { return true; } return false; @@ -281,4 +269,5 @@ } return false; } + }