import org.simantics.scl.compiler.types.util.ProcedureType;
import org.simantics.scl.runtime.function.FunctionImpl1;
import org.simantics.scl.runtime.tuple.Tuple0;
import org.simantics.scl.compiler.types.util.ProcedureType;
import org.simantics.scl.runtime.function.FunctionImpl1;
import org.simantics.scl.runtime.tuple.Tuple0;
public static final boolean TRACE_INTERPRETATION_VS_COMPILATION = false;
private static final String COMPUTATION_METHOD_NAME = "main";
public static final boolean TRACE_INTERPRETATION_VS_COMPILATION = false;
private static final String COMPUTATION_METHOD_NAME = "main";
}
} catch(SCLSyntaxErrorException e) {
errorLog.log(e.location, e.getMessage());
}
} catch(SCLSyntaxErrorException e) {
errorLog.log(e.location, e.getMessage());
throw new SCLExpressionCompilationException(errorLog.getErrors());
if(SCLCompilerConfiguration.SHOW_EXPRESSION_BEFORE_EVALUATION)
throw new SCLExpressionCompilationException(errorLog.getErrors());
if(SCLCompilerConfiguration.SHOW_EXPRESSION_BEFORE_EVALUATION)
new TransientClassBuilder(classLoader, javaTypeTranslator));
IExpression iexp = expression.toIExpression(expressionInterpretationContext);
if(TRACE_INTERPRETATION_VS_COMPILATION)
new TransientClassBuilder(classLoader, javaTypeTranslator));
IExpression iexp = expression.toIExpression(expressionInterpretationContext);
if(TRACE_INTERPRETATION_VS_COMPILATION)
return iexp.execute(new Object[expressionInterpretationContext.getMaxVariableId()]);
} catch(UnsupportedOperationException e) {
// This is normal when expression cannot be interpreted. We compile it instead.
return iexp.execute(new Object[expressionInterpretationContext.getMaxVariableId()]);
} catch(UnsupportedOperationException e) {
// This is normal when expression cannot be interpreted. We compile it instead.
- System.out.println("=== SSA before optimization ==================================");
- System.out.println(ssaModule);
+ LOGGER.info("=== SSA before optimization ==================================");
+ LOGGER.info("{}", ssaModule);
for(int phase=0;phase<CodeGeneration.OPTIMIZATION_PHASES;++phase) {
int optCount = 0;
while(optCount++ < 4 && ssaModule.simplify(environment, phase)) {
for(int phase=0;phase<CodeGeneration.OPTIMIZATION_PHASES;++phase) {
int optCount = 0;
while(optCount++ < 4 && ssaModule.simplify(environment, phase)) {
- System.out.println("=== SSA before lambda lifting ==================================");
- System.out.println(ssaModule);
+ LOGGER.info("=== SSA before lambda lifting ==================================");
+ LOGGER.info("{}", ssaModule);