/// <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(); } }
/// <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(); }