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%2FConstant.java;fp=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fconstants%2FConstant.java;h=6f6d3daf3af28d4d74597c40c2ce7554ff6faa0d;hp=b019c74705bc9c1a668496f49a4012cc5f444594;hb=0861b325fcbbfa8c5985f1e11cfc39154a3808d1;hpb=edb5c89575392565d23dbfc7083617c981048c1e diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/Constant.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/Constant.java index b019c7470..6f6d3daf3 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/Constant.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/Constant.java @@ -18,6 +18,8 @@ import org.simantics.scl.compiler.runtime.MutableClassLoader; import org.simantics.scl.compiler.top.SCLCompilerConfiguration; import org.simantics.scl.compiler.types.TVar; import org.simantics.scl.compiler.types.Type; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import gnu.trove.map.hash.THashMap; @@ -29,6 +31,8 @@ import gnu.trove.map.hash.THashMap; */ public abstract class Constant extends Val { + private static final Logger LOGGER = LoggerFactory.getLogger(Constant.class); + public static boolean TRACE_REALIZATION = false; protected Type type; @@ -102,7 +106,7 @@ public abstract class Constant extends Val { ModuleBuilder moduleBuilder = new ModuleBuilder(policy, builder.javaTypeTranslator); if(SCLCompilerConfiguration.TRACE_METHOD_CREATION) - System.out.println("Create class " + policy.getModuleClassName()); + LOGGER.info("Create class " + policy.getModuleClassName()); ClassBuilder classFile = new ClassBuilder(moduleBuilder, Opcodes.ACC_PUBLIC, policy.getModuleClassName(), "java/lang/Object"); classFile.setSourceFile("_SCL_RealizedValue"); @@ -124,7 +128,7 @@ public abstract class Constant extends Val { 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 (IllegalAccessException e) {