use of claw.tatsu.xcodeml.xnode.fortran.FfunctionType in project claw-compiler by C2SM-RCM.
the class ArrayToFctCall method transform.
@Override
public void transform(XcodeProgram xcodeml, Translator translator, Transformation other) {
FfunctionType fctType = xcodeml.getTypeTable().getFunctionType(_replaceFct);
// Prepare the function call
FunctionCall fctCall = xcodeml.createFctCall(fctType.getReturnType(), _claw.value(ClawClause.FCT_NAME), _replaceFct.getType());
for (String arg : _claw.values(ClawClause.FCT_PARAMETERS)) {
fctCall.addArguments(xcodeml.createVar(FortranType.INTEGER, arg, Xscope.LOCAL));
}
List<Xnode> refs = XnodeUtil.getAllArrayReferencesInSiblings(_claw.getPragma(), _claw.value(ClawClause.ARRAY_NAME));
for (Xnode ref : refs) {
ref.insertAfter(fctCall.cloneNode());
ref.delete();
}
fctCall.delete();
removePragma();
transformed();
}
Aggregations