Exemple #1
0
 /// <summary>
 /// Discard the current item if it is pushed onto the stack.
 /// </summary>
 public void DiscardStack()
 {
     if (_storage.Location == ItemLocation.Stack)
     {
         _helper.Emit(OpCodes.Pop);
         _storage = StorageDescriptor.None();
     }
 }
Exemple #2
0
        /// <summary>
        /// Continue iteration until it is complete.  Branch to "lblOnEnd" when iteration is complete.
        /// </summary>
        /// <remarks>
        /// goto LabelNextCtxt;
        /// LabelOnEnd:
        /// </remarks>
        public void LoopToEnd(Label lblOnEnd)
        {
            if (_hasNext)
            {
                _helper.BranchAndMark(_lblNext, lblOnEnd);
                _hasNext = false;
            }

            // After looping is finished, storage is N/A
            _storage = StorageDescriptor.None();
        }