1 package org.simantics.scl.compiler.internal.codegen.continuations;
\r
3 import org.simantics.scl.compiler.internal.codegen.references.Val;
\r
4 import org.simantics.scl.compiler.internal.codegen.references.ValRef;
\r
5 import org.simantics.scl.compiler.internal.codegen.ssa.SSAExit;
\r
8 public final class ContRef {
\r
9 public static final ValRef[] EMPTY_ARRAY = new ValRef[0];
\r
12 ContRef prev; // FreeVars with the same binding form a linked list
\r
16 ContRef(Cont binding) {
\r
17 this.binding = binding;
\r
19 ContRef head = binding.occurrence;
\r
20 binding.occurrence = this;
\r
26 public void remove() {
\r
28 binding.occurrence = next;
\r
35 public Cont getBinding() {
\r
39 public ContRef getNext() {
\r
43 public void setParent(SSAExit parent) {
\r
44 this.parent = parent;
\r
47 public Cont addParametersInFront(Val[] newParameters, Val[] oldParameters, Cont proxy) {
\r
48 return parent.addParametersInFrontOf(this, newParameters, oldParameters, proxy);
\r
51 public SSAExit getParent() {
\r