Skip to content

Commit 92fbea7

Browse files
authored
[spec] Cleaner definition of frames (#1697)
1 parent 43d405f commit 92fbea7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

document/core/exec/runtime.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ It filters out entries of a specific kind in an order-preserving fashion:
419419
pair: abstract syntax; frame
420420
pair: abstract syntax; label
421421
.. _syntax-frame:
422+
.. _syntax-framestate:
422423
.. _syntax-label:
423424
.. _frame:
424425
.. _label:
@@ -486,6 +487,8 @@ and a reference to the function's own :ref:`module instance <syntax-moduleinst>`
486487
.. math::
487488
\begin{array}{llll}
488489
\production{frame} & \frame &::=&
490+
\FRAME_n\{ \framestate \} \\
491+
\production{frame state} & \framestate &::=&
489492
\{ \ALOCALS~\val^\ast, \AMODULE~\moduleinst \} \\
490493
\end{array}
491494
@@ -499,7 +502,7 @@ Conventions
499502

500503
* The meta variable :math:`L` ranges over labels where clear from context.
501504

502-
* The meta variable :math:`F` ranges over frames where clear from context.
505+
* The meta variable :math:`F` ranges over frame states where clear from context.
503506

504507
* The following auxiliary definition takes a :ref:`block type <syntax-blocktype>` and looks up the :ref:`function type <syntax-functype>` that it denotes in the current frame:
505508

@@ -534,7 +537,7 @@ In order to express the reduction of :ref:`traps <trap>`, :ref:`calls <syntax-ca
534537
\REFEXTERNADDR~\externaddr \\ &&|&
535538
\INVOKE~\funcaddr \\ &&|&
536539
\LABEL_n\{\instr^\ast\}~\instr^\ast~\END \\ &&|&
537-
\FRAME_n\{\frame\}~\instr^\ast~\END \\
540+
\FRAME_n\{\framestate\}~\instr^\ast~\END \\
538541
\end{array}
539542
540543
The |TRAP| instruction represents the occurrence of a trap.
@@ -618,14 +621,14 @@ Configurations
618621
A *configuration* consists of the current :ref:`store <syntax-store>` and an executing *thread*.
619622

620623
A thread is a computation over :ref:`instructions <syntax-instr>`
621-
that operates relative to a current :ref:`frame <syntax-frame>` referring to the :ref:`module instance <syntax-moduleinst>` in which the computation runs, i.e., where the current function originates from.
624+
that operates relative to the state of a current :ref:`frame <syntax-framestate>` referring to the :ref:`module instance <syntax-moduleinst>` in which the computation runs, i.e., where the current function originates from.
622625

623626
.. math::
624627
\begin{array}{llcl}
625628
\production{configuration} & \config &::=&
626629
\store; \thread \\
627630
\production{thread} & \thread &::=&
628-
\frame; \instr^\ast \\
631+
\framestate; \instr^\ast \\
629632
\end{array}
630633
631634
.. note::

document/core/util/macros.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,7 @@
10561056

10571057
.. |label| mathdef:: \xref{exec/runtime}{syntax-label}{\X{label}}
10581058
.. |frame| mathdef:: \xref{exec/runtime}{syntax-frame}{\X{frame}}
1059+
.. |framestate| mathdef:: \xref{exec/runtime}{syntax-framestate}{\X{framestate}}
10591060

10601061

10611062
.. Stack, meta functions

0 commit comments

Comments
 (0)