public EarleStackFrameExecutor(EarleFunction function, EarleStackFrame parentFrame, int callerIp, EarleValue target, IEarleRuntimeScope superScope, EarleDictionary locals) : base(target) { Frame = parentFrame.SpawnChild(function, this, callerIp); Scopes.Push(new EarleRuntimeScope(superScope, locals)); }
public WaitFrameExecutor(EarleStackFrame parentFrame, float seconds) : base(EarleValue.Undefined) { if (parentFrame == null) throw new ArgumentNullException(nameof(parentFrame)); Frame = parentFrame.SpawnChild(null, this, EarleStackFrame.SleepCallIP); _stopwatch = new Stopwatch(); _stopwatch.Start(); _miliseconds = (long) (seconds*1000); }