コード例 #1
0
 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));
 }
コード例 #2
0
            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);
            }