internal void Else() { IfState state = this.PopIfState(); this.Br(state.EndIf); this.MarkLabel(state.ElseBegin); state.ElseBegin = state.EndIf; this.blockStack.Push(state); }
internal void EndIf() { IfState ifState = PopIfState(); if (!ifState.ElseBegin.Equals(ifState.EndIf)) { MarkLabel(ifState.ElseBegin); } MarkLabel(ifState.EndIf); }
internal void Else() { IfState ifState = PopIfState(); Br(ifState.EndIf); MarkLabel(ifState.ElseBegin); ifState.ElseBegin = ifState.EndIf; blockStack.Push(ifState); }
internal void EndIf() { IfState state = this.PopIfState(); if (!state.ElseBegin.Equals(state.EndIf)) { this.MarkLabel(state.ElseBegin); } this.MarkLabel(state.EndIf); }
IfState PopIfState() { object stackTop = blockStack.Pop(); IfState ifState = stackTop as IfState; if (ifState == null) { ThrowMismatchException(stackTop); } return(ifState); }
private IfState PopIfState() { object expected = this.blockStack.Pop(); IfState state = expected as IfState; if (state == null) { this.ThrowMismatchException(expected); } return(state); }
void InternalIf(bool negate) { IfState ifState = new IfState(); ifState.EndIf = DefineLabel(); ifState.ElseBegin = DefineLabel(); if (negate) { Brtrue(ifState.ElseBegin); } else { Brfalse(ifState.ElseBegin); } blockStack.Push(ifState); }
private void InternalIf(bool negate) { IfState state = new IfState { EndIf = this.DefineLabel(), ElseBegin = this.DefineLabel() }; if (negate) { this.Brtrue(state.ElseBegin); } else { this.Brfalse(state.ElseBegin); } this.blockStack.Push(state); }