public virtual void Process() { //FLProgram.Debugger?.ProcessEvent(this); FLDebuggerHelper.OnFunctionStepInto(Root, new FLDebuggerEvents.FunctionRunEventArgs(Root, this)); for (int i = 0; i < Instructions.Count; i++) { FLDebuggerHelper.OnInstructionStepInto( Root, new FLDebuggerEvents.InstructionRunEventArgs( Root, this, Instructions[i] ) ); //FLProgram.Debugger?.ProcessEvent(Instructions[i]); Instructions[i].Process(); FLDebuggerHelper.AfterInstruction( Root, new FLDebuggerEvents.InstructionRunEventArgs( Root, this, Instructions[i] ) ); } FLDebuggerHelper.AfterFunction(Root, new FLDebuggerEvents.FunctionRunEventArgs(Root, this)); }
public void Process() { FLBuffer input = Root.ActiveBuffer; FLProgram externalFunction = ExternalFunctionBlueprint.Initialize(Root.Instance, InstructionSet); input.SetRoot(externalFunction); externalFunction.ActiveChannels = Root.ActiveChannels; externalFunction.SetCLVariables(input, false); //Not making it internal to the subscript because that would dispose the buffer later in the method //FLProgram.Debugger?.SubProgramStarted(Root, this, externalFunction); FLDebuggerHelper.OnSubProgramStart( Root, new FLDebuggerEvents.SubProgramStartEventArgs( externalFunction, this, externalFunction .EntryPoint, false ) ); //FLDebuggerHelper.OnProgramStart(externalFunction, new FLDebuggerEvents.ProgramStartEventArgs(externalFunction, externalFunction.EntryPoint, false, false)); externalFunction.EntryPoint.Process(); //FLProgram.Debugger?.SubProgramEnded(Root, externalFunction); FLDebuggerHelper.OnSubProgramExit( Root, new FLDebuggerEvents.SubProgramExitEventArgs(externalFunction, this) ); //FLDebuggerHelper.OnProgramExit(externalFunction, new FLDebuggerEvents.ProgramExitEventArgs(externalFunction, false)); //Fire On Program Exit as External Function as well FLBuffer buf = externalFunction.ActiveBuffer; buf.SetRoot(Root); input.SetRoot(Root); externalFunction.RemoveFromSystem(buf); externalFunction.RemoveFromSystem(input); Root.ActiveChannels = externalFunction.ActiveChannels; Root.ActiveBuffer = buf; externalFunction.FreeResources(); }
public static void Start(CLAPI instance, FLProgram program, int width, int height, int depth) { FLDebuggerHelper.Register(program); program.Run(new FLBuffer(instance, width, height, depth, "DebugInput"), true); program.FreeResources(); }
public static void Initialize(CreateDebugger debuggerCreator) { FLDebuggerHelper.AttachDebugger(new FLDebugger(debuggerCreator)); }