X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fconstants%2Fsingletons%2FUnsafeCoerce.java;h=c3111c77b199f278a7bd07c58036062d5d5365cf;hb=refs%2Fchanges%2F38%2F238%2F2;hp=173076ea5398e676dbc38624afa0deddd963c289;hpb=cb5fc8d606d8b322563e9345c441eecfa7f01753;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/singletons/UnsafeCoerce.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/singletons/UnsafeCoerce.java index 173076ea5..c3111c77b 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/singletons/UnsafeCoerce.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/constants/singletons/UnsafeCoerce.java @@ -1,30 +1,30 @@ -package org.simantics.scl.compiler.constants.singletons; - -import org.simantics.scl.compiler.constants.FunctionValue; -import org.simantics.scl.compiler.internal.codegen.references.Val; -import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder; -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.kinds.Kinds; - -public class UnsafeCoerce extends FunctionValue { - private static TVar A = Types.var(Kinds.STAR); - private static TVar B = Types.var(Kinds.STAR); - public static final UnsafeCoerce INSTANCE = new UnsafeCoerce(); - - private UnsafeCoerce() { - super(new TVar[] {A, B}, Types.NO_EFFECTS, B, A); - } - - @Override - public Type applyExact(MethodBuilder mb, Val[] parameters) { - mb.pushBoxed(parameters[0]); - return getReturnType(); - } - - @Override - public String toString() { - return "unsafeCoerce"; - } -} +package org.simantics.scl.compiler.constants.singletons; + +import org.simantics.scl.compiler.constants.FunctionValue; +import org.simantics.scl.compiler.internal.codegen.references.Val; +import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder; +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.kinds.Kinds; + +public class UnsafeCoerce extends FunctionValue { + private static TVar A = Types.var(Kinds.STAR); + private static TVar B = Types.var(Kinds.STAR); + public static final UnsafeCoerce INSTANCE = new UnsafeCoerce(); + + private UnsafeCoerce() { + super(new TVar[] {A, B}, Types.NO_EFFECTS, B, A); + } + + @Override + public Type applyExact(MethodBuilder mb, Val[] parameters) { + mb.pushBoxed(parameters[0]); + return getReturnType(); + } + + @Override + public String toString() { + return "unsafeCoerce"; + } +}