internal KeyValuePair <uint, StateTransition> NewTransition(IDictionary <uint, StateTransition> table) { var guardedStmt = FindStatement <GuardedStatement>(); stateId += 1; var transition = new StateTransition(Expression.Label("state_" + stateId), guardedStmt?.FaultLabel); var pair = new KeyValuePair <uint, StateTransition>(stateId, transition); table.Add(pair); return(pair); }
internal TryCatchFinallyStatement(TryExpression expression, IDictionary <uint, StateTransition> transitionTable, uint previousState, ref uint stateId) : base(expression, Label("fault_" + (++stateId))) { prologue.AddFirst(new EnterGuardedCodeExpression(stateId)); this.previousState = previousState; transitionTable[stateId] = new StateTransition(null, FaultLabel); if (expression.Handlers.Count > 0) { recoveryStateId = ++stateId; finallyLabel = Label("finally_" + stateId); transitionTable[recoveryStateId] = new StateTransition(null, finallyLabel); } }