package com.quirkygaming.othniel;

public class CachedCall {
	private Pipe[] defIns;
	private Pipe[] defOuts;
	Pipe[] ins;
	Pipe[] outs;
	private Callable call;
	private int line;
	
	public CachedCall(Pipe[] ins, Callable call, Pipe[] outs, int line) {
		this.defIns = ins;
		this.defOuts = outs;
		this.call = call;
		this.line = line;
		this.ins = ins;
		this.outs = outs; // TODO might not work... errrrg
	}

	public void call() {
		call.call(ins, outs, this);
	}
	
	public void resetRuntime() { // Must be called by structure before run
		ins = defIns.clone();
		outs = defOuts.clone();
	}
	
	public int getLine() {return line;}
}

@@ -171,16 +171,17 @@
 int line
+N
 ;%0A%09%0A%09pub
@@ -243,16 +243,17 @@
 int line
+N
 ) %7B%0A%09%09th
@@ -327,15 +327,17 @@
 line
+N
  = line
+N
 ;%0A%09%09
@@ -627,13 +627,14 @@
 urn line
+N
 ;%7D%0A%7D%0A

Renamed line to lineN