Skip to content

Commit

Permalink
[Spec] Fix bounds check prose for array.fill and array.copy
Browse files Browse the repository at this point in the history
The prose incorrectly used "larger than or equal to" when it should have used
just "larger than." The formalism was already correct.

Fixes #536.
  • Loading branch information
tlively committed Apr 14, 2024
1 parent e19c032 commit c84a3c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions document/core/exec/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ Reference Instructions

12. Assert: due to :ref:`validation <valid-array.fill>`, the :ref:`array instance <syntax-arrayinst>` :math:`S.\SARRAYS[a]` exists.

13. If :math:`d + n` is larger than or equal to the length of :math:`S.\SARRAYS[a].\AIFIELDS`, then:
13. If :math:`d + n` is larger than the length of :math:`S.\SARRAYS[a].\AIFIELDS`, then:

a. Trap.

Expand Down Expand Up @@ -1175,11 +1175,11 @@ Reference Instructions

23. Assert: due to :ref:`validation <valid-array.copy>`, the :ref:`array instance <syntax-arrayinst>` :math:`S.\SARRAYS[a_2]` exists.

24. If :math:`d + n` is larger than or equal to the length of :math:`S.\SARRAYS[a_1].\AIFIELDS`, then:
24. If :math:`d + n` is larger than the length of :math:`S.\SARRAYS[a_1].\AIFIELDS`, then:

a. Trap.

25. If :math:`s + n` is larger than or equal to the length of :math:`S.\SARRAYS[a_2].\AIFIELDS`, then:
25. If :math:`s + n` is larger than the length of :math:`S.\SARRAYS[a_2].\AIFIELDS`, then:

a. Trap.

Expand Down

0 comments on commit c84a3c6

Please sign in to comment.