This repository was archived by the owner on Apr 25, 2025. It is now read-only.
File tree 1 file changed +18
-5
lines changed
1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -2643,15 +2643,28 @@ Control Instructions
2643
2643
:math: `\TRY ~\blocktype ~\instr ^\ast ~\DELEGATE ~l`
2644
2644
...............................................
2645
2645
2646
- .. todo ::
2647
- Add prose for the |TRY | - |DELEGATE | execution step.
2646
+ 1. Assert: due to :ref: `validation <valid-blocktype >`, :math: `\expand _F(\blocktype )` is defined.
2647
+
2648
+ 2. Let :math: `[t_1 ^m] \to [t_2 ^n]` be the :ref: `function type <syntax-functype >` :math: `\expand _F(\blocktype )`.
2649
+
2650
+ 3. Let :math: `L` be the label whose arity is :math: `n` and whose continuation is the end of the |TRY | instruction.
2651
+
2652
+ 4. Let :math: `H` be the :ref: `delegating exception handler <syntax-handler >` :math: `\DELEGATEadm\{ l\}`, targeting the :math: `l` surrounding block.
2653
+
2654
+ 5. Assert: due to :ref: `validation <valid-try-delegate >`, there are at least :math: `m` values on the top of the stack.
2655
+
2656
+ 6. Pop the values :math: `\val ^m` from the stack.
2657
+
2658
+ 7. :ref: `Enter <exec-instr-seq-enter >` the block :math: `H~(\val ^n~\instr ^\ast )~\END ` with label :math: `L`.
2659
+
2660
+ 8. :ref: `Install <exec-handler-enter >` the exception handler `H ` containing :math: `\val ^m~\instr ^\ast `.
2648
2661
2649
2662
.. math ::
2650
2663
~\\[-1 ex]
2651
2664
\begin {array}{lcl}
2652
- F; \val ^n ~(\TRY ~\X {bt}~\instr ^\ast ~\DELEGATE ~l) &\stepto &
2653
- F; \LABEL _m \{\}~(\DELEGATEadm\{ l\}~\val ^n ~\instr ^\ast ~\END )~\END \\
2654
- && (\iff \expand _F(\X {bt}) = [t_1 ^n ] \to [t_2 ^m ])
2665
+ F; \val ^m ~(\TRY ~\X {bt}~\instr ^\ast ~\DELEGATE ~l) &\stepto &
2666
+ F; \LABEL _n \{\}~(\DELEGATEadm\{ l\}~\val ^m ~\instr ^\ast ~\END )~\END \\
2667
+ && (\iff \expand _F(\X {bt}) = [t_1 ^m ] \to [t_2 ^n ])
2655
2668
\end {array}
2656
2669
2657
2670
You can’t perform that action at this time.
0 commit comments