next up previous contents
Next: JumpStatement Up: Simple Control Flow Statements Previous: BranchStatement   Contents


MultiWayBranchStatement

A MultiWayBranchStatement causes control to jump to one of a number of different labels.

    concrete MultiWayBranchStatement : Statement
      {
        Expression * owner decision_operand in source_ops;
        CodeLabelSymbol * reference default_target;
        indexed_list<IInteger,CodeLabelSymbol * reference> case;
      };

decision_operand The decision_operand is first evaluated when the statement is executed.
case This is an indexed_list, with each pair being a constant and a label. If the result matches one of the constants in the case list, then control jumps to the code specified by the corresponding label. It is illegal for more than one item in the constants in the case list to match.
default_target If the value of the decision_operand does not match any constants in the case list, then control jumps to the point specified by the default_target label.



SUIF Nightly Build
2000-08-14