validator/operators.rs: refine some handling of control stack + comments by keithw · Pull Request #2427 · bytecodealliance/wasm-tools
This PR consolidates some of the validator's manipulation of the control stack into the push_ctrl/push_bare_ctrl functions, so that individual operator validator functions no longer need to directly manipulate the control stack. (It also fixes a confusing comment.)
This is preparation for an "atomic" validator feature to come in a subsequent PR (https://github.com/keithw/wasm-tools/tree/atomic). This would provide the ability to validate an operator atomically, i.e. the validator state is unchanged if the operator is invalid.