Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 3dbe24e

Browse files
authored
Fix catching in throw_ref (#299)
The address `a` is a tag address, not an exception address.
1 parent 25632dd commit 3dbe24e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

document/core/exec/instructions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,13 +2803,13 @@ Control Instructions
28032803

28042804
a. Let :math:`\catch_1` be the first :ref:`catch clause <syntax-catch>` in :math:`\catch^\ast` and :math:`{\catch'}^\ast` the remaining clauses.
28052805

2806-
b. If :math:`\catch_1` is of the form :math:`\CATCH~x~l` and the :ref:`exception address <syntax-exnaddr>` :math:`a` equals :math:`F.\AMODULE.\MITAGS[x]`, then:
2806+
b. If :math:`\catch_1` is of the form :math:`\CATCH~x~l` and the :ref:`tag address <syntax-tagaddr>` :math:`a` equals :math:`F.\AMODULE.\MITAGS[x]`, then:
28072807

28082808
i. Push the values :math:`\X{exn}.\EIFIELDS` to the stack.
28092809

28102810
ii. Execute the instruction :math:`\BR~l`.
28112811

2812-
c. Else if :math:`\catch_1` is of the form :math:`\CATCHREF~x~l` and the :ref:`exception address <syntax-exnaddr>` :math:`a` equals :math:`F.\AMODULE.\MITAGS[x]`, then:
2812+
c. Else if :math:`\catch_1` is of the form :math:`\CATCHREF~x~l` and the :ref:`tag address <syntax-tagaddr>` :math:`a` equals :math:`F.\AMODULE.\MITAGS[x]`, then:
28132813

28142814
i. Push the values :math:`\X{exn}.\EIFIELDS` to the stack.
28152815

0 commit comments

Comments
 (0)