X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fconstants%2FFunctionValue.java;h=60f54ea3c2b440fa06dd705e9682262de090c6e9;hp=dcef289f02763d9521532f30bc02bd7242714e52;hb=0861b325fcbbfa8c5985f1e11cfc39154a3808d1;hpb=edb5c89575392565d23dbfc7083617c981048c1e diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/FunctionValue.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/FunctionValue.java index dcef289f0..60f54ea3c 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/FunctionValue.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/FunctionValue.java @@ -21,11 +21,15 @@ import org.simantics.scl.compiler.types.TVar; import org.simantics.scl.compiler.types.Type; import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.exceptions.MatchException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import gnu.trove.map.hash.THashMap; public abstract class FunctionValue extends Constant { + private static final Logger LOGGER = LoggerFactory.getLogger(FunctionValue.class); + TVar[] typeParameters; Type returnType; protected Type[] parameterTypes; @@ -66,10 +70,10 @@ public abstract class FunctionValue extends Constant { public Type apply(MethodBuilder mb, Type[] typeParameters, Val... parameters) { int arity = getArity(); - /*System.out.println("MONADIC APPLICATION " + this); - System.out.println(" call arity: " + parameters.length); - System.out.println(" func arity: " + arity); - System.out.println(" func monadic: " + isMonadic()); + /*LOGGER.info("MONADIC APPLICATION " + this); + LOGGER.info(" call arity: " + parameters.length); + LOGGER.info(" func arity: " + arity); + LOGGER.info(" func monadic: " + isMonadic()); */ if(parameters.length < arity) { ModuleBuilder moduleBuilder = mb.getModuleBuilder(); @@ -127,7 +131,7 @@ public abstract class FunctionValue extends Constant { ClassBuilder classFile; if(arity <= Constants.MAX_FUNCTION_PARAMETER_COUNT) { if(SCLCompilerConfiguration.TRACE_METHOD_CREATION) - System.out.println("Create class " + policy.getModuleClassName()); + LOGGER.info("Create class " + policy.getModuleClassName()); classFile = new ClassBuilder(moduleBuilder, Opcodes.ACC_PUBLIC, policy.getModuleClassName(), MethodBuilderBase.getClassName(Constants.FUNCTION_IMPL[arity])); classFile.setSourceFile("_SCL_FunctionValue"); @@ -144,7 +148,7 @@ public abstract class FunctionValue extends Constant { } else { if(SCLCompilerConfiguration.TRACE_METHOD_CREATION) - System.out.println("Create class " + policy.getModuleClassName()); + LOGGER.info("Create class " + policy.getModuleClassName()); classFile = new ClassBuilder(moduleBuilder, Opcodes.ACC_PUBLIC, policy.getModuleClassName(), MethodBuilderBase.getClassName(Constants.FUNCTION_N_IMPL)); classFile.setSourceFile("_SCL_FunctionValue"); @@ -187,7 +191,7 @@ public abstract class FunctionValue extends Constant { if(valueCache != null) { valueCache.put(this, result); if(TRACE_REALIZATION) - System.out.println("/REALIZED/ " + this + " " + getClass().getSimpleName()); + LOGGER.info("/REALIZED/ " + this + " " + getClass().getSimpleName()); } return result; } catch (InstantiationException e) {