@@ -2587,37 +2587,27 @@ Control Instructions
2587
2587
:math: `\IF ~\blocktype ~\instr _1 ^\ast ~\ELSE ~\instr _2 ^\ast ~\END `
2588
2588
.............................................................
2589
2589
2590
- 1. Assert: due to :ref: `validation <valid-blocktype >`, :math: `\expand _F(\blocktype )` is defined.
2591
-
2592
- 2. Let :math: `[t_1 ^m] \to [t_2 ^n]` be the :ref: `function type <syntax-functype >` :math: `\expand _F(\blocktype )`.
2593
-
2594
- 3. Let :math: `L` be the label whose arity is :math: `n` and whose continuation is the end of the |IF | instruction.
2595
-
2596
- 4. Assert: due to :ref: `validation <valid-if >`, a value of :ref: `value type <syntax-valtype >` |I32 | is on the top of the stack.
2597
-
2598
- 5. Pop the value :math: `\I32 .\CONST ~c` from the stack.
2599
-
2600
- 6. Assert: due to :ref: `validation <valid-if >`, there are at least :math: `m` values on the top of the stack.
2590
+ 1. Assert: due to :ref: `validation <valid-if >`, a value of :ref: `value type <syntax-valtype >` |I32 | is on the top of the stack.
2601
2591
2602
- 7 . Pop the values :math: `\val ^m ` from the stack.
2592
+ 2 . Pop the value :math: `\I 32 . \CONST ~c ` from the stack.
2603
2593
2604
- 8 . If :math: `c` is non-zero, then:
2594
+ 3 . If :math: `c` is non-zero, then:
2605
2595
2606
- a. :ref: ` Enter < exec-instr-seq-enter >` the block :math: `\val ^m~ \ instr _1 ^\ast ` with label :math: `L `.
2596
+ a. Execute the block instruction :math: `\BLOCK ~ \X {bt}~ \ instr _1 ^\ast ~ \END `.
2607
2597
2608
- 9 . Else:
2598
+ 4 . Else:
2609
2599
2610
- a. :ref: ` Enter < exec-instr-seq-enter >` the block :math: `\val ^m~ \ instr _2 ^\ast ` with label :math: `L `.
2600
+ a. Execute the block instruction :math: `\BLOCK ~ \X {bt}~ \ instr _2 ^\ast ~ \END `.
2611
2601
2612
2602
.. math ::
2613
2603
~\\[-1 ex]
2614
2604
\begin {array}{lcl}
2615
- F; \val ^m~ (\I32 .\CONST ~c)~\IF ~\X {bt}~\instr _1 ^\ast ~\ELSE ~\instr _2 ^\ast ~\END &\stepto &
2616
- F; \LABEL _n\{ \epsilon \}~ \val ^m ~\instr _1 ^\ast ~\END
2617
- \\&&\quad (\iff c \neq 0 \wedge \expand _F( \X {bt}) = [t_ 1 ^m] \to [t_ 2 ^n] ) \\
2618
- F; \val ^m~ (\I32 .\CONST ~c)~\IF ~\X {bt}~\instr _1 ^\ast ~\ELSE ~\instr _2 ^\ast ~\END &\stepto &
2619
- F; \LABEL _n\{ \epsilon \}~ \val ^m ~\instr _2 ^\ast ~\END
2620
- \\&&\quad (\iff c = 0 \wedge \expand _F( \X {bt}) = [t_ 1 ^m] \to [t_ 2 ^n] ) \\
2605
+ F; (\I32 .\CONST ~c)~\IF ~\X {bt}~\instr _1 ^\ast ~\ELSE ~\instr _2 ^\ast ~\END &\stepto &
2606
+ F; \BLOCK ~ \X {bt} ~\instr _1 ^\ast ~\END
2607
+ \\&&\quad (\iff c \neq 0 ) \\
2608
+ F; (\I32 .\CONST ~c)~\IF ~\X {bt}~\instr _1 ^\ast ~\ELSE ~\instr _2 ^\ast ~\END &\stepto &
2609
+ F; \BLOCK ~ \X {bt} ~\instr _2 ^\ast ~\END
2610
+ \\&&\quad (\iff c = 0 ) \\
2621
2611
\end {array}
2622
2612
2623
2613
0 commit comments