-
Notifications
You must be signed in to change notification settings - Fork 36
Add prose for typing rule of try-catch-catch_all. #222
Conversation
e172a0c
to
06cb90a
Compare
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.
Sorry, being a bit late.
* Under context :math:`C'`, | ||
the instruction sequence :math:`\instr_1^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\ast] \to [t_2^\ast]`. | ||
|
||
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`label <exec-label>` :math:`\LCATCH~[t_2^\ast]` prepended to the |CLABELS| vector. |
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.
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`label <exec-label>` :math:`\LCATCH~[t_2^\ast]` prepended to the |CLABELS| vector. | |
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`label type <syntax-labeltype>` :math:`\LCATCH~[t_2^\ast]` prepended to the |CLABELS| vector. |
|
||
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`label <exec-label>` :math:`\LCATCH~[t_2^\ast]` prepended to the |CLABELS| vector. | ||
|
||
* For every :math:`(\CATCH~x~\instr_2^\ast)`: |
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.
* For every :math:`(\CATCH~x~\instr_2^\ast)`: | |
* For every :math:`x_i` and :math:`\instr_{2i}^\ast` in :math:`(\CATCH~x~\instr_2^\ast)^\ast`: |
|
||
* The tag :math:`C.\CTAGS[x]` must be defined in the context :math:`C`. | ||
|
||
* Let :math:`[t^\ast] \to []` be its :ref:`tag type <syntax-tagtype>`. |
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.
This should actually check that the return type is []
.
* Let :math:`[t^\ast] \to []` be its :ref:`tag type <syntax-tagtype>`. | |
* Let :math:`[t_{3i}^\ast] \to [t_{4i}^\ast]` be the :ref:`tag type <syntax-tagtype>` :math:`C.\tags[x]`. | |
* The :ref:`result type <syntax-resulttype>` :math:`[t_{4i}^\ast]` must be empty. |
* Let :math:`[t^\ast] \to []` be its :ref:`tag type <syntax-tagtype>`. | ||
|
||
* Under context :math:`C''`, | ||
the instruction sequence :math:`\instr_2^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t^\ast] \to [t_2^\ast]`. |
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.
the instruction sequence :math:`\instr_2^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t^\ast] \to [t_2^\ast]`. | |
the instruction sequence :math:`\instr_{2i}^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_{3i}^\ast] \to [t_2^\ast]`. |
* Under context :math:`C''`, | ||
the instruction sequence :math:`\instr_2^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t^\ast] \to [t_2^\ast]`. | ||
|
||
* If there is a :math:`(\CATCHALL~\instr_3^\ast)`, then: |
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.
* If there is a :math:`(\CATCHALL~\instr_3^\ast)`, then: | |
* If :math:`(\CATCHALL~\instr_3^\ast)^?` is not empty, then: |
@rossberg Thanks for the review! Just in case you'd like to do final check, there also have been several recently landed PRs. |
@aheejin, yes, I saw. I'll comment on the ones I find issues with. |
Btw, with the introduction of label type, I think all places that say something like "add result type [t*] to C.labels" need to change to say "label type" instead. |
… everywhere. This addresses additional review comments to PR WebAssembly#222, that were made after it was merged. The last review comment in the discussion suggests to adjust all validation labels to use label types instead of just result types. Should address all occurrences of validation labels. Additionally adds a boolean catch_label to control frames in the validation algorithm, and some related functionality, fixing the cases for opcodes `catch` and `catch_all`.
@rossberg created PR #241 with the additional changes requested here, also changing to "label type" I think in all appropriate places, including |
#241) This addresses additional review comments to PR #222, that were made after it was merged. The last review comment in the discussion suggests to adjust all validation labels to use label types instead of just result types. Should address all occurrences of validation labels. Additionally adds a boolean catch_label to control frames in the validation algorithm, and some related functionality, fixing the cases for opcodes `catch` and `catch_all`. * Apply suggestions from code review Co-authored-by: Andreas Rossberg <[email protected]> Co-authored-by: Heejin Ahn <[email protected]> * Reverting changes to typing of CAUGHTadm. Changes to this rule are now done in PR #244
Fixes related .. todo:: section.
Also changed notation to match the formal overview document.