Beispiel #1
0
 public void PushStack(IGeneratorEnumerator other)
 {
     other.Init(context);
     if (other is GeneratorDelegateEnumerator e)
     {
         e.stack = stack;
     }
     stack.Insert(0, other);
 }
Beispiel #2
0
 internal GeneratorBase(RuntimeFunctionInvocation invocation, IGeneratorEnumerator iterator, WellKnownObject proto)
     : base(proto)
 {
     this.invocation             = invocation;
     this.iterator               = iterator;
     invocation.Generator        = this;
     invocation.SuspendOnDispose = true;
     SetPrototypeOf(invocation.FunctionObject.Get(WellKnownProperty.Prototype).ToObject());
     iterator.Init(this);
 }