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%2Felaboration%2Fjava%2FBuiltins.java;h=4d48d1e9cb1442ec5854728b2b83518e985b859b;hp=14808c820f3b4c91f5ac305645ff9b9ffc1d3260;hb=35e73f300e2101c436dcc23c9a0f9e12ecc81d59;hpb=66ced93f835205135a84fea73b2fbb8e9d610f7e diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/Builtins.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/Builtins.java index 14808c820..4d48d1e9c 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/Builtins.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/elaboration/java/Builtins.java @@ -47,14 +47,15 @@ import org.simantics.scl.compiler.types.Type; import org.simantics.scl.compiler.types.Types; import org.simantics.scl.compiler.types.kinds.Kind; import org.simantics.scl.compiler.types.kinds.Kinds; +import org.simantics.scl.runtime.chr.CHRContext; import org.simantics.scl.runtime.profiling.BranchPoint; public class Builtins extends ConcreteModule { - public static SCLValue[] TUPLE_CONSTRUCTORS = new SCLValue[Constants.MAX_TUPLE_LENGTH+1]; - public static SCLValue[] LIST_CONSTRUCTORS = new SCLValue[Constants.MAX_LIST_LITERAL_LENGTH+1]; + public static final SCLValue[] TUPLE_CONSTRUCTORS = new SCLValue[Constants.MAX_TUPLE_LENGTH+1]; + public static final SCLValue[] LIST_CONSTRUCTORS = new SCLValue[Constants.MAX_LIST_LITERAL_LENGTH+1]; - public static final Builtins INSTANCE = new Builtins(); + public static Builtins INSTANCE = new Builtins(); public static SCLValue Nothing; public static SCLValue Just; @@ -350,6 +351,10 @@ public class Builtins extends ConcreteModule { } setParentClassLoader(getClass().getClassLoader()); + + // CHR + + addTypeDescriptor("CHRContext", new StandardTypeConstructor(Types.CHRContext, Kinds.STAR, TypeDesc.forClass(CHRContext.class))); } @Override @@ -357,4 +362,8 @@ public class Builtins extends ConcreteModule { return documentation; } + public static void flush() { + INSTANCE = new Builtins(); + } + }