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=7935257ace56ba7db959cb6b2d985225a42f74d8;hb=35e73f300e2101c436dcc23c9a0f9e12ecc81d59;hpb=a8758de5bc19e5adb3f618d3038743a164f09912 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 old mode 100755 new mode 100644 index 7935257ac..4d48d1e9c --- 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; @@ -348,6 +349,12 @@ public class Builtins extends ConcreteModule { addValue("visitBranchPoint", VisitBranchPoint.INSTANCE); } + + setParentClassLoader(getClass().getClassLoader()); + + // CHR + + addTypeDescriptor("CHRContext", new StandardTypeConstructor(Types.CHRContext, Kinds.STAR, TypeDesc.forClass(CHRContext.class))); } @Override @@ -355,4 +362,8 @@ public class Builtins extends ConcreteModule { return documentation; } + public static void flush() { + INSTANCE = new Builtins(); + } + }