next up previous contents
Next: DoWhileStatement Up: High Level Control Flow Previous: IfStatement   Contents

WhileStatement

A while statement in Standard SUIF corresponds directly to a ``while'' statement in C.

    concrete WhileStatement : Statement
      {
        Expression * owner condition in source_ops;
        Statement * owner body in child_statements;
        CodeLabelSymbol * reference break_label in defined_labels build {0};
        CodeLabelSymbol * reference continue_label in defined_labels build {0};
      };

condition Condition that governs the iterations. The type of the condition expression must be a BooleanType.
body Contains the code executed while the condition is true. The condition is evaluted before every execution. Jumps or branches to the break label or continue label are allowed only from somewhere within the body and result in skipping out of the loop or skipping to the next evaluation of the condition respectively, just as if a ``break'' or ``continue'' for that loop were executed in C. NULL is a valid value for this field.
break_label Label marking the target of the break statement.
continue_label Label marking the target of the continue statement.


next up previous contents
Next: DoWhileStatement Up: High Level Control Flow Previous: IfStatement   Contents
SUIF Nightly Build
2000-08-14