ArrayList<Type> lvTypes = new ArrayList<Type>();
if(expression instanceof EBlock) {
EBlock block = (EBlock)expression;
- if(localStorage != null && !(block.getStatements().getLast() instanceof GuardStatement)) {
+ if(localStorage != null && !(block.getLast() instanceof GuardStatement)) {
THashSet<String> localVariables = new THashSet<String>();
ListIterator<Statement> it = block.getStatements().listIterator();
while(it.hasNext()) {
localStorage.store(variableName, null, type);
}
}
- if(!(block.getStatements().getLast() instanceof GuardStatement))
+ if(!(block.getLast() instanceof GuardStatement))
block.addStatement(new GuardStatement(new EConstant(Builtins.TUPLE_CONSTRUCTORS[0])));
}
// Convert to SSA
ModuleWriter mw = new ModuleWriter(namingPolicy.getModuleClassName());
DecomposedExpression decomposed =
- DecomposedExpression.decompose(expression);
+ DecomposedExpression.decompose(errorLog, expression);
SCLConstant constant = new SCLConstant(
Name.create(moduleName, COMPUTATION_METHOD_NAME),
IVal[] parameterVals = w.getParameters();
for(int i=0;i<decomposed.parameters.length;++i)
decomposed.parameters[i].setVal(parameterVals[i]);
- w.return_(decomposed.body.toVal(environment, w));
+ w.return_(decomposed.body.toVal(compilationContext, w));
} catch(RuntimeException e) {
errorLog.setExceptionPosition(expression.location);
throw new SCLExpressionCompilationException(errorLog.getErrors());