-package org.simantics.scl.compiler.internal.codegen.continuations;\r
-\r
-import org.simantics.scl.compiler.internal.codegen.ssa.SSAFunction;\r
-import org.simantics.scl.compiler.internal.codegen.utils.CopyContext;\r
-import org.simantics.scl.compiler.types.TVar;\r
-import org.simantics.scl.compiler.types.Type;\r
-import org.simantics.scl.compiler.types.util.Typed;\r
-\r
-\r
-public final class ReturnCont extends Cont implements Typed {\r
- Type returnType;\r
- transient SSAFunction parent;\r
- \r
- public ReturnCont(Type returnType) {\r
- this.returnType = returnType;\r
- }\r
- \r
- public void setParent(SSAFunction parent) {\r
- this.parent = parent;\r
- }\r
- \r
- @Override\r
- public Type getType() {\r
- return returnType;\r
- }\r
- \r
- @Override\r
- public int getArity() {\r
- return 1;\r
- }\r
- \r
- @Override\r
- public Type getParameterType(int parameterId) {\r
- if(parameterId != 0)\r
- throw new IllegalArgumentException();\r
- return returnType;\r
- }\r
-\r
- public ReturnCont copy(CopyContext context) {\r
- return new ReturnCont(context.copyType(returnType));\r
- }\r
- \r
- @Override\r
- public void replace(TVar[] vars, Type[] replacements) {\r
- returnType = returnType.replace(vars, replacements); \r
- }\r
-\r
- public void setType(Type type) {\r
- this.returnType = type; \r
- }\r
-}\r
+package org.simantics.scl.compiler.internal.codegen.continuations;
+
+import org.simantics.scl.compiler.internal.codegen.ssa.SSAFunction;
+import org.simantics.scl.compiler.internal.codegen.utils.CopyContext;
+import org.simantics.scl.compiler.types.TVar;
+import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.util.Typed;
+
+
+public final class ReturnCont extends Cont implements Typed {
+ Type returnType;
+ transient SSAFunction parent;
+
+ public ReturnCont(Type returnType) {
+ this.returnType = returnType;
+ }
+
+ public void setParent(SSAFunction parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public Type getType() {
+ return returnType;
+ }
+
+ @Override
+ public int getArity() {
+ return 1;
+ }
+
+ @Override
+ public Type getParameterType(int parameterId) {
+ if(parameterId != 0)
+ throw new IllegalArgumentException();
+ return returnType;
+ }
+
+ public ReturnCont copy(CopyContext context) {
+ return new ReturnCont(context.copyType(returnType));
+ }
+
+ @Override
+ public void replace(TVar[] vars, Type[] replacements) {
+ returnType = returnType.replace(vars, replacements);
+ }
+
+ public void setType(Type type) {
+ this.returnType = type;
+ }
+}