use of com.oracle.truffle.dsl.processor.model.Parameter in project graal by oracle.
the class FlatNodeGenFactory method initializeCasts.
private List<IfTriple> initializeCasts(FrameState frameState, SpecializationGroup group, DSLExpression expression, NodeExecutionMode specializationExecution) {
Set<VariableElement> boundElements = expression.findBoundVariableElements();
if (boundElements.isEmpty()) {
return Collections.emptyList();
}
List<IfTriple> triples = new ArrayList<>();
for (VariableElement variable : boundElements) {
Parameter p = group.getSpecialization().findByVariable(variable);
if (p != null) {
NodeExecutionData execution = p.getSpecification().getExecution();
if (execution != null) {
LocalVariable var = frameState.getValue(execution);
if (var == null) {
throw new AssertionError();
}
IfTriple triple = createTypeCheckOrCast(frameState, group, new TypeGuard(p.getType(), execution.getIndex()), specializationExecution, true, false);
if (triple != null) {
triples.add(triple);
}
}
}
}
return triples;
}
Aggregations