1 package org.simantics.scl.compiler.internal.codegen.continuations;
3 import org.simantics.scl.compiler.internal.codegen.ssa.SSAFunction;
4 import org.simantics.scl.compiler.internal.codegen.utils.CopyContext;
5 import org.simantics.scl.compiler.types.TVar;
6 import org.simantics.scl.compiler.types.Type;
7 import org.simantics.scl.compiler.types.util.Typed;
10 public final class ReturnCont extends Cont implements Typed {
12 transient SSAFunction parent;
14 public ReturnCont(Type returnType) {
15 this.returnType = returnType;
18 public void setParent(SSAFunction parent) {
23 public Type getType() {
28 public int getArity() {
33 public Type getParameterType(int parameterId) {
35 throw new IllegalArgumentException();
39 public ReturnCont copy(CopyContext context) {
40 return new ReturnCont(context.copyType(returnType));
44 public void replace(TVar[] vars, Type[] replacements) {
45 returnType = returnType.replace(vars, replacements);
48 public void setType(Type type) {
49 this.returnType = type;