public override ZingMethod Clone(Z.StateImpl myState, Z.Process myProcess, bool shallowCopy) { ClassMethod clone = new ClassMethod((Application) myState); clone.locals = new LocalVars(clone); clone.locals.CopyContents(locals); clone.inputs = new InputVars(clone); clone.inputs.CopyContents(inputs); clone.outputs = new OutputVars(clone); clone.outputs.CopyContents(outputs); clone.nextBlock = this.nextBlock; clone.handlerBlock = this.handlerBlock; // clone.application = (Application) myState; clone.SavedAtomicityLevel = this.SavedAtomicityLevel; clone.privThis = this.privThis; if (this.Caller != null) { if(shallowCopy) { clone.Caller = null; } else { // Recursively clone the next frame in the stack clone.Caller = this.Caller.Clone(myState, myProcess, false); } } else { // When we reach the entry point, patch our process appropriately if (myProcess != null) myProcess.EntryPoint = this; } return clone; }
public void B0(Z.Process p) { }
public override void Dispatch(Z.Process p) { switch (nextBlock) { case Blocks.Enter: Enter(p); break; // For each additional block: // emit an additional case as above... default: throw new ApplicationException(); } }