public override void SetRoot(FLProgram root) { base.SetRoot(root); for (int i = 0; i < Arguments.Count; i++) { Arguments[i].SetRoot(root); } }
public override void SetRoot(FLProgram root) { base.SetRoot(root); //HERE if (Type == FLInstructionArgumentType.Buffer || Type == FLInstructionArgumentType.Function) { ((FLParsedObject)Value.GetValue()).SetRoot(root); } }
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 override void SetRoot(FLProgram root) { base.SetRoot(root); Variables = root.Variables.AddScope(); if (Instructions == null) { return; } for (int i = 0; i < Instructions.Count; i++) { if (Instructions[i].Root == root) { continue; } Instructions[i].SetRoot(root); Instructions[i].SetParent(this); } }
public virtual void SetRoot(FLProgram root) { Root = root; }