Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg committed Apr 8, 2021
2 parents dc315db + 03c0770 commit c30b3d6
Show file tree
Hide file tree
Showing 19 changed files with 246 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install:
- opam --version
- ocaml --version
- opam install --yes ocamlbuild.0.14.0
- pip install Sphinx==2.4.4
- pip install Sphinx==3.5.2
- git clone https://github.com/tabatkins/bikeshed.git
- pip install --editable $PWD/bikeshed
- bikeshed update
Expand Down
4 changes: 2 additions & 2 deletions document/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pipenv shell
Install Python dependencies:

```
pip install Sphinx==2.4.4
pipenv install Sphinx==3.5.2
```

### Checking out the repository
Expand Down Expand Up @@ -80,7 +80,7 @@ To build the [single-page W3C version](https://webassembly.github.io/spec/core/b
```
# cd back to root of git directory
git clone https://github.com/tabatkins/bikeshed.git
pip install --editable bikeshed
pipenv install -e bikeshed
bikeshed update
```

Expand Down
120 changes: 120 additions & 0 deletions document/core/appendix/changes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
.. index:: ! changes
.. _changes:

Change History
--------------

Since the original release 1.0 of the WebAssembly specification, a number of proposals for extensions have been integrated.
The following sections provide an overview of what has changed.

Release 1.1
~~~~~~~~~~~

.. index:: instruction, integer

Sign extension instructions
...........................

Added new numeric instructions for performing sign extension within integer representations [#proposal-signext]_.

* New :ref:`numeric instructions <syntax-instr-numeric>`: :math:`\K{i}\X{nn}\K{.}\EXTEND\X{N}\K{\_s}`


.. index:: instruction, trap, floating-point, integer

Non-trapping float-to-int conversions
.....................................

Added new conversion instructions that avoid trapping when converting a floating-point number to an integer [#proposal-cvtsat]_.

* New :ref:`numeric instructions <syntax-instr-numeric>`: :math:`\K{i}\X{nn}\K{.}\TRUNC\K{\_sat\_f}\X{mm}\K{\_}\sx`


.. index:: block, function, value type, result type

Multiple values
...............

Generalized the result type of blocks and functions to allow for multiple values; in addition, introduced the ability to have block parameters [#proposal-multivalue]_.

* :ref:`Function types <syntax-functype>` allow more than one result

* :ref:`Block types <syntax-blocktype>` can be arbitrary function types


.. index:: value type, reference, reference type, instruction, element segment

Reference types
...............

Added |FUNCREF| and |EXTERNREF| as new value types and respective instructions [#proposal-reftype]_.

* New :ref:`value types <syntax-valtype>`: :ref:`reference types <syntax-reftype>` |FUNCREF| and |EXTERNREF|

* New :ref:`reference instructions <syntax-instr-ref>`: |REFNULL|, |REFFUNC|, |REFISNULL|

* Enrich :ref:`parametric instruction <syntax-instr-parametric>`: |SELECT| with optional type immediate

* New :ref:`declarative <syntax-elemmode>` form of :ref:`element segment <syntax-elem>`


.. index:: reference, instruction, table, table type

Table instructions
..................

Added instructions to directly access and modify tables [#proposal-reftype]_.

* :ref:`Table types <syntax-tabletype>` allow any :ref:`reference type <syntax-reftype>` as element type

* New :ref:`table instructions <syntax-instr-table>`: |TABLEGET|, |TABLESET|, |TABLESIZE|, |TABLEGROW|


.. index:: table, instruction, table index, element segment

Multiple tables
...............

Added the ability to use multiple tables per module [#proposal-reftype]_.

* :ref:`Modules <syntax-module>` may :ref:`define <syntax-table>`, :ref:`import <syntax-import>`, and :ref:`export <syntax-export>` multiple tables

* :ref:`Table instructions <syntax-instr-table>` take a :ref:`table index <syntax-tableidx>` immediate: |TABLEGET|, |TABLESET|, |TABLESIZE|, |TABLEGROW|, |CALLINDIRECT|

* :ref:`Element segments <syntax-elem>` take a :ref:`table index <syntax-tableidx>`


.. index:: instruction, table, memory, data segment, element segment

Bulk memory and table instructions
..................................

Added instructions that modify ranges of memory or table entries [#proposal-reftype]_ [#proposal-bulk]_

* New :ref:`memory instructions <syntax-instr-memory>`: |MEMORYFILL|, |MEMORYINIT|, |MEMORYCOPY|, |DATADROP|

* New :ref:`table instructions <syntax-instr-table>`: |TABLEFILL|, |TABLEINIT|, |TABLECOPY|, |ELEMDROP|

* New :ref:`passive <syntax-datamode>` form of :ref:`data segment <syntax-data>`

* New :ref:`passive <syntax-elemmode>` form of :ref:`element segment <syntax-elem>`

* New :ref:`data count section <binary-datacountsec>` in binary format

* Active data and element segments boundaries are no longer checked at compile time but may trap instead


.. [#proposal-signext]
https://github.com/WebAssembly/spec/tree/master/proposals/sign-extension-ops/
.. [#proposal-cvtsat]
https://github.com/WebAssembly/spec/tree/master/proposals/nontrapping-float-to-int-conversion/
.. [#proposal-multivalue]
https://github.com/WebAssembly/spec/tree/master/proposals/multi-value/
.. [#proposal-reftype]
https://github.com/WebAssembly/spec/tree/master/proposals/reference-types/
.. [#proposal-bulk]
https://github.com/WebAssembly/spec/tree/master/proposals/bulk-memory-operations/
1 change: 1 addition & 0 deletions document/core/appendix/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Appendix
algorithm
custom
properties
changes

.. only:: singlehtml

Expand Down
3 changes: 2 additions & 1 deletion document/core/appendix/properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ Module instances are classified by *module contexts*, which are regular :ref:`co

* Let :math:`\globaltype^\ast` be the concatenation of all :math:`\globaltype_i` in order.

* Then the module instance is valid with :ref:`context <context>` :math:`\{\CTYPES~\functype^\ast, \CFUNCS~{\functype'}^\ast, \CTABLES~\tabletype^\ast, \CMEMS~\memtype^\ast, \CGLOBALS~\globaltype^\ast\}`.
* | Then the module instance is valid with :ref:`context <context>`
| :math:`\{\CTYPES~\functype^\ast, \CFUNCS~{\functype'}^\ast, \CTABLES~\tabletype^\ast, \CMEMS~\memtype^\ast, \CGLOBALS~\globaltype^\ast\}`.
.. math::
~\\[-1ex]
Expand Down
24 changes: 16 additions & 8 deletions document/core/binary/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,29 @@ It decodes into a vector of :ref:`element segments <syntax-elem>` that represent
\X{seg}^\ast{:}\Bsection_9(\Bvec(\Belem)) &\Rightarrow& \X{seg} \\
\production{element segment} & \Belem &::=&
\hex{00}~~e{:}\Bexpr~~y^\ast{:}\Bvec(\Bfuncidx)
&\Rightarrow& \{ \ETYPE~\FUNCREF, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EACTIVE~\{ \ETABLE~0, \EOFFSET~e \} \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~\FUNCREF, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EACTIVE~\{ \ETABLE~0, \EOFFSET~e \} \} \\ &&|&
\hex{01}~~\X{et}:\Belemkind~~y^\ast{:}\Bvec(\Bfuncidx)
&\Rightarrow& \{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EPASSIVE \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EPASSIVE \} \\ &&|&
\hex{02}~~x{:}\Btableidx~~e{:}\Bexpr~~\X{et}:\Belemkind~~y^\ast{:}\Bvec(\Bfuncidx)
&\Rightarrow& \{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EACTIVE~\{ \ETABLE~x, \EOFFSET~e \} \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EACTIVE~\{ \ETABLE~x, \EOFFSET~e \} \} \\ &&|&
\hex{03}~~\X{et}:\Belemkind~~y^\ast{:}\Bvec(\Bfuncidx)
&\Rightarrow& \{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EDECLARATIVE \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~\X{et}, \EINIT~((\REFFUNC~y)~\END)^\ast, \EMODE~\EDECLARATIVE \} \\ &&|&
\hex{04}~~e{:}\Bexpr~~\X{el}^\ast{:}\Bvec(\Bexpr)
&\Rightarrow& \{ \ETYPE~\FUNCREF, \EINIT~\X{el}^\ast, \EMODE~\EACTIVE~\{ \ETABLE~0, \EOFFSET~e \} \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~\FUNCREF, \EINIT~\X{el}^\ast, \EMODE~\EACTIVE~\{ \ETABLE~0, \EOFFSET~e \} \} \\ &&|&
\hex{05}~~\X{et}:\Breftype~~\X{el}^\ast{:}\Bvec(\Bexpr)
&\Rightarrow& \{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EPASSIVE \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EPASSIVE \} \\ &&|&
\hex{06}~~x{:}\Btableidx~~e{:}\Bexpr~~\X{et}:\Breftype~~\X{el}^\ast{:}\Bvec(\Bexpr)
&\Rightarrow& \{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EACTIVE~\{ \ETABLE~x, \EOFFSET~e \} \} \\ &&|&
&\Rightarrow& \\&&&\quad
\{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EACTIVE~\{ \ETABLE~x, \EOFFSET~e \} \} \\ &&|&
\hex{07}~~\X{et}:\Breftype~~\X{el}^\ast{:}\Bvec(\Bexpr)
&\Rightarrow& \{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EDECLARATIVE \} \\
&\Rightarrow& \\&&&\quad
\{ \ETYPE~et, \EINIT~\X{el}^\ast, \EMODE~\EDECLARATIVE \} \\
\production{element kind} & \Belemkind &::=&
\hex{00} &\Rightarrow& \FUNCREF \\
\end{array}
Expand Down
16 changes: 14 additions & 2 deletions document/core/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
import os
import sys
from datetime import date
pwd = os.path.abspath('.')
sys.path.insert(0, pwd + '/util')

Expand Down Expand Up @@ -63,14 +64,23 @@
editor = u'Andreas Rossberg (editor)'
logo = 'static/webassembly.png'

# The name of the GitHub repository this resides in
repo = 'multi-memory'

# The name of the proposal it represents, if any
proposal = 'multi-memory'

# The draft version string (clear out for release cuts)
draft = ' (Draft ' + date.today().strftime("%Y-%m-%d") + ')'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.1'
# The full version, including alpha/beta/rc tags.
release = version + ''
release = version + ('' if proposal == '' else ' + ') + proposal + draft

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -186,7 +196,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static', 'static/custom.css']
html_static_path = ['static/custom.css']

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
Expand Down Expand Up @@ -476,6 +486,8 @@

# Macros
rst_prolog = """
.. |issuelink| replace:: https://github.com/webassembly/""" + repo + """/issues/
.. |pagelink| replace:: https://webassembly.github.io/""" + repo + """/core/
.. include:: /""" + pwd + """/util/macros.def
"""

Expand Down
Loading

0 comments on commit c30b3d6

Please sign in to comment.