public void Visit(JumpTableDecision decision)
        {
            PutLabel(decision);

            output
            .AppendFormat(
                "switch -{0} ({1})",
                decision.StartElement,
                string.Join(",", decision.ElementToAction.Select(GetLabelText)))
            .AppendLine();

            // default case:
            GenerateCodeOrJump(defaultDecision);

            foreach (var leaf in decision.LeafDecisions)
            {
                strategy.PlanCode(leaf);
            }

            strategy.IntermediateGenerateCode();
        }
        public void Visit(JumpTableDecision decision)
        {
            PutLabel(decision);

            output
                .AppendFormat(
                    "switch -{0} ({1})",
                    decision.StartElement,
                    string.Join(",", decision.ElementToAction.Select(GetLabelText)))
                .AppendLine();

            // default case:
            GenerateCodeOrJump(defaultDecision);

            foreach (var leaf in decision.LeafDecisions)
            {
                strategy.PlanCode(leaf);
            }

            strategy.IntermediateGenerateCode();
        }
        void IDecisionVisitor.Visit(JumpTableDecision decision)
        {
            emit
                .Label(GetNodeLabel(decision).Def)
                .Do(ldvalue)
                ;
            if (decision.StartElement != 0)
            {
                emit
                    .Ldc_I4(decision.StartElement)
                    .Sub();
            }

            emit
                .Switch(decision.ElementToAction.Select(GetNodeLabel).ToArray());
            // default case:
            GenerateCodeOrJump(builder.DefaultActionDecision);

            foreach (var leaf in decision.LeafDecisions)
            {
                strategy.PlanCode(leaf);
            }

            strategy.IntermediateGenerateCode();
        }
 private Decision GenSwitch(ArraySlice<DecisionTest> S)
 {
     var result = new JumpTableDecision(S, GetActionDecision);
     return result;
 }
        private Decision GenSwitch(ArraySlice <DecisionTest> S)
        {
            var result = new JumpTableDecision(S, GetActionDecision);

            return(result);
        }