You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-25Lines changed: 3 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,13 @@
1
+
[](https://github.com/WebAssembly/stack-switching/actions/workflows/ci-spec.yml)
2
+
[](https://github.com/WebAssembly/stack-switching/actions/workflows/ci-interpreter.yml)
3
+
1
4
# Stack-Switching Proposal for WebAssembly
2
5
3
6
This repository is a clone of [`WebAssembly/spec`](https://github.com/WebAssembly/spec/). It is meant for discussion, prototype specification, and implementation of a proposal to add
4
7
support for stack-switching.
5
8
6
9
See the [explainer](proposals/stack-switching/Explainer.md) for a high-level summary of the proposal.
7
10
8
-
## Previous proposals
9
-
10
-
The current explainer represents the unification of two previous proposals: Typed Continuations (wasmfx) and Bag of Stacks (bos). (The explainers have now been unified. Once the reference interpreter and examples are adapted for the unified proposal this section will be removed from the README.)
11
-
12
-
#### Typed Continuations
13
-
14
-
* See the [explainer](proposals/continuations/Explainer.md) for a high-level summary of the proposal.
15
-
16
-
* See the [overview](proposals/continuations/Overview.md) for a more formal description of the proposal.
17
-
18
-
* An [implementation](https://github.com/WebAssembly/stack-switching/tree/wasmfx) is available as an extension to the reference interpreter. It is accesible from the `wasmfx` branch of this repository.
19
-
20
-
* See the [examples](proposals/continuations/examples) for Wasm code for implementing various different features including lightweight threads, actors, and async/await.
21
-
22
-
#### Bag of Stacks Proposal
23
-
24
-
* See the [explainer](proposals/bag-o-stacks/Explainer.md) for a high-level summary of the proposal.
[](https://github.com/WebAssembly/stack-switching/actions/workflows/ci-spec.yml)
31
-
[](https://github.com/WebAssembly/stack-switching/actions/workflows/ci-interpreter.yml)
32
-
33
11
# spec
34
12
35
13
This repository holds the sources for the WebAssembly specification,
- |GLOBALGET| for any previously declared immutable :ref:`global <syntax-global>`
309
309
310
310
.. note::
311
-
The :ref:`garbage collection <extension-gc>` added further constant instructions.
311
+
The :ref:`garbage collection <extension-gc>` extension added further constant instructions.
312
312
313
313
314
314
.. index:: instruction, function, call
@@ -389,6 +389,44 @@ Added the ability to use multiple memories per module. [#proposal-multimem]_
389
389
* :ref:`Data segments <syntax-elem>` take a :ref:`memory index <syntax-memidx>`
390
390
391
391
392
+
.. index:: address type, number type, table, memory, instruction
393
+
394
+
64-bit Address Space
395
+
....................
396
+
397
+
Added the ability to declare an :math:`\I64` :ref:`address type <syntax-addrtype>` for :ref:`tables <syntax-tabletype>` and :ref:`memories <syntax-memtype>`. [#proposal-addr64]_
398
+
399
+
* :ref:`Address types <syntax-addrtype>` denote a subset of the integral :ref:`number types <syntax-numtype>`
400
+
401
+
* :ref:`Table types <syntax-tabletype>` include an :ref:`address type <syntax-addrtype>`
402
+
403
+
* :ref:`Memory types <syntax-memtype>` include an :ref:`address type <syntax-addrtype>`
404
+
405
+
* Operand types of :ref:`table <syntax-instr-table>` and :ref:`memory <syntax-instr-memory>` instructions now depend on the subject's declared address type:
406
+
407
+
- |TABLEGET|
408
+
- |TABLESET|
409
+
- |TABLESIZE|
410
+
- |TABLEGROW|
411
+
- |TABLEFILL|
412
+
- |TABLECOPY|
413
+
- |TABLEINIT|
414
+
- |MEMORYSIZE|
415
+
- |MEMORYGROW|
416
+
- |MEMORYFILL|
417
+
- |MEMORYCOPY|
418
+
- |MEMORYINIT|
419
+
- :math:`t\K{.load}`
420
+
- :math:`t\K{.store}`
421
+
- :math:`t\K{.load}\!N\!\K{\_}\sx`
422
+
- :math:`t\K{.store}\!N`
423
+
- :math:`\K{v128.load}\!N\!\K{x}\!M\!\K{\_}\sx`
424
+
- :math:`\K{v128.load}\!N\!\K{\_zero}`
425
+
- :math:`\K{v128.load}\!N\!\K{\_splat}`
426
+
- :math:`\K{v128.load}\!N\!\K{\_lane}`
427
+
- :math:`\K{v128.store}\!N\!\K{\_lane}`
428
+
429
+
392
430
.. index:: reference, reference type, heap type, value type, local, local type, instruction, instruction type, table, function, function type, matching, subtyping
393
431
394
432
Typeful References
@@ -584,7 +622,7 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_
Copy file name to clipboardExpand all lines: document/core/appendix/embedding.rst
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Types
21
21
In the description of the embedder interface, syntactic classes from the :ref:`abstract syntax <syntax>` and the :ref:`runtime's abstract machine <syntax-runtime>` are used as names for variables that range over the possible objects from that class.
22
22
Hence, these syntactic classes can also be interpreted as types.
23
23
24
-
For numeric parameters, notation like :math:`n:\u32` is used to specify a symbolic name in addition to the respective value range.
24
+
For numeric parameters, notation like :math:`i:\u64` is used to specify a symbolic name in addition to the respective value range.
1. Try :ref:`instantiating <exec-instantiation>` :math:`\module` in :math:`\store` with :ref:`external values <syntax-externval>` :math:`\externval^\ast` as imports:
1. Try :ref:`growing <grow-table>` the :ref:`table instance <syntax-tableinst>` :math:`\store.\STABLES[\tableaddr]` by :math:`n` elements with initialization value :math:`\reff`:
* The :ref:`table type <syntax-tabletype>` :math:`\limits~t` must be :ref:`valid <valid-tabletype>` under the empty :ref:`context <context>`.
519
+
* The :ref:`table type <syntax-tabletype>` :math:`\addrtype~\limits~t` must be :ref:`valid <valid-tabletype>` under the empty :ref:`context <context>`.
520
520
521
521
* The length of :math:`\reff^\ast` must equal :math:`\limits.\LMIN`.
522
522
@@ -526,49 +526,49 @@ where :math:`\val_1 \gg^+_S \val_2` denotes the transitive closure of the follow
526
526
527
527
* The :ref:`reference type <syntax-reftype>` :math:`t'_i` must :ref:`match <match-reftype>` the :ref:`reference type <syntax-reftype>` :math:`t`.
528
528
529
-
* Then the table instance is valid with :ref:`table type <syntax-tabletype>` :math:`\limits~t`.
529
+
* Then the table instance is valid with :ref:`table type <syntax-tabletype>` :math:`\addrtype~\limits~t`.
530
530
531
531
.. math::
532
532
\frac{
533
-
\vdashtabletype\limits~t \ok
533
+
\vdashtabletype\addrtype~\limits~t \ok
534
534
\qquad
535
535
n = \limits.\LMIN
536
536
\qquad
537
537
(S \vdash\reff : t')^n
538
538
\qquad
539
539
(\vdashreftypematch t' \matchesvaltype t)^n
540
540
}{
541
-
S \vdashtableinst \{ \TITYPE~(\limits~t), \TIELEM~\reff^n \} : \limits~t
541
+
S \vdashtableinst \{ \TITYPE~\addrtype~\limits~t, \TIELEM~\reff^n \} : \addrtype~\limits~t
Copy file name to clipboardExpand all lines: document/core/binary/types.rst
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,13 +251,15 @@ Additional shorthands are recognized for unary recursions and sub types without
251
251
Limits
252
252
~~~~~~
253
253
254
-
:ref:`Limits <syntax-limits>` are encoded with a preceding flag indicating whether a maximum is present.
254
+
:ref:`Limits <syntax-limits>` are encoded with a preceding flag indicating whether a maximum is present, and a flag for the :ref:`address type <syntax-addrtype>`.
0 commit comments