-
Notifications
You must be signed in to change notification settings - Fork 36
Add prose for typing rule of try-delegate. #237
Add prose for typing rule of try-delegate. #237
Conversation
Also slightly adjusted notation to match the formal overview. Why WIP: The prose is finished, but while trying to add explanatory notes, I couldn't find a reference in the spec to the validation label that the frame pushes to the context.
document/core/valid/instructions.rst
Outdated
The :ref:`label index <syntax-labelidx>` after |DELEGATE| refers to a label surrounding the :ref:`try-delegate <syntax-try-delegate>` instruction. The furthest label it can refer to is the label inserted by the frame. For example, :math:`\TRY~\dots~\DELEGATE~0` may appear without any explicitly surrounding block, in which case the label 0 refers to the label of the frame. | ||
|
||
.. todo:: | ||
Add references/links to "the label of the frame": Where is this label introduced? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frames represent calls and are unrelated to labels. A function body implicitly is a block, that's why it has an outermost label.
But in fact, I'd remove this entire note. It basically just explains again how labels and functions work, which is not specific to delegate. If we did that here, then we would have to do that for every br instruction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
document/core/valid/instructions.rst
Outdated
}{ | ||
C \vdashinstrseq \TRY~\blocktype~\instr^\ast~\DELEGATE~l : [t_1^\ast]\to[t_2^\ast] | ||
} | ||
|
||
.. note:: | ||
The :ref:`notation <notation-extend>` :math:`C,\CLABELS\, [t^\ast]` inserts the new label type at index :math:`0`, shifting all others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reuse the wording used for br and friends?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, switching to the wording of br.
FWIW I had copy pasted this from the note under if-else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
Addresses review comments - WebAssembly#237 (comment) - WebAssembly#237 (comment)
This should be now ready for merging, pending approval. |
Also slightly adjusted notation to match the formal overview.
Why WIP:The prose is finished, but while trying to add explanatory notes, I couldn't find a reference in the spec to the validation label that the frame pushes to the context.EDIT:
WIP is no longer necessary after addressing review comments.