internal void Else()
        {
            IfState state = this.PopIfState();

            this.Br(state.EndIf);
            this.MarkLabel(state.ElseBegin);
            state.ElseBegin = state.EndIf;
            this.blockStack.Push(state);
        }
Пример #2
0
        internal void EndIf()
        {
            IfState ifState = PopIfState();

            if (!ifState.ElseBegin.Equals(ifState.EndIf))
            {
                MarkLabel(ifState.ElseBegin);
            }
            MarkLabel(ifState.EndIf);
        }
Пример #3
0
        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);
        }
Пример #5
0
        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);
        }
Пример #7
0
        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);
        }