Skip to content

Commit 5159bc4

Browse files
committed
Merge exception handling
1 parent 70dc1cd commit 5159bc4

File tree

4 files changed

+57
-115
lines changed

4 files changed

+57
-115
lines changed

README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33

44
# spec
55

6-
This repository holds a prototypical reference implementation for WebAssembly,
7-
which is currently serving as the official specification. Eventually, we expect
8-
to produce a specification either written in human-readable prose or in a formal
9-
specification language.
6+
This repository holds the sources for the WebAssembly specification,
7+
a reference implementation, and the official test suite.
108

11-
It also holds the WebAssembly testsuite, which tests numerous aspects of
12-
conformance to the spec.
13-
14-
View the work-in-progress spec at [webassembly.github.io/spec](https://webassembly.github.io/spec/).
15-
16-
At this time, the contents of this repository are under development and known
17-
to be "incomplet and inkorrect".
9+
A formatted version of the spec is available here:
10+
[webassembly.github.io/spec](https://webassembly.github.io/spec/),
1811

1912
Participation is welcome. Discussions about new features, significant semantic
2013
changes, or any specification change likely to generate substantial discussion

deploy_key

Lines changed: 0 additions & 49 deletions
This file was deleted.

deploy_key.pub

Lines changed: 0 additions & 1 deletion
This file was deleted.

document/core/appendix/changes.rst

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Release 2.0
1212

1313
.. index:: instruction, integer
1414

15-
Sign extension instructions
15+
Sign Extension Instructions
1616
...........................
1717

1818
Added new numeric instructions for performing sign extension within integer representations. [#proposal-signext]_
@@ -22,7 +22,7 @@ Added new numeric instructions for performing sign extension within integer repr
2222

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

25-
Non-trapping float-to-int conversions
25+
Non-trapping Float-to-Int Conversions
2626
.....................................
2727

2828
Added new conversion instructions that avoid trapping when converting a floating-point number to an integer. [#proposal-cvtsat]_
@@ -32,7 +32,7 @@ Added new conversion instructions that avoid trapping when converting a floating
3232

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

35-
Multiple values
35+
Multiple Values
3636
...............
3737

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

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

47-
Reference types
47+
Reference Types
4848
...............
4949

5050
Added |FUNCREF| and |EXTERNREF| as new value types and respective instructions. [#proposal-reftype]_
@@ -60,7 +60,7 @@ Added |FUNCREF| and |EXTERNREF| as new value types and respective instructions.
6060

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

63-
Table instructions
63+
Table Instructions
6464
..................
6565

6666
Added instructions to directly access and modify tables. [#proposal-reftype]_
@@ -72,7 +72,7 @@ Added instructions to directly access and modify tables. [#proposal-reftype]_
7272

7373
.. index:: table, instruction, table index, element segment, import, export
7474

75-
Multiple tables
75+
Multiple Tables
7676
...............
7777

7878
Added the ability to use multiple tables per module. [#proposal-reftype]_
@@ -86,7 +86,7 @@ Added the ability to use multiple tables per module. [#proposal-reftype]_
8686

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

89-
Bulk memory and table instructions
89+
Bulk Memory and Table Instructions
9090
..................................
9191

9292
Added instructions that modify ranges of memory or table entries. [#proposal-reftype]_ [#proposal-bulk]_
@@ -106,7 +106,7 @@ Added instructions that modify ranges of memory or table entries. [#proposal-ref
106106

107107
.. index:: instructions, SIMD, value type, vector type
108108

109-
Vector instructions
109+
Vector Instructions
110110
...................
111111

112112
Added vector type and instructions that manipulate multiple numeric values in parallel (also known as *SIMD*, single instruction multiple data) [#proposal-vectype]_
@@ -160,90 +160,89 @@ Added vector type and instructions that manipulate multiple numeric values in pa
160160
Release 3.0
161161
~~~~~~~~~~~
162162

163-
.. index: instruction, function, call
163+
.. index: instruction, expression, constant
164164
165-
Tail Calls
166-
..........
165+
Extended Constant Expressions
166+
.............................
167167

168-
Added instructions to perform tail calls [#proposal-tailcall]_.
168+
Allowed basic numeric computations in constant expressions. [#proposal-extconst]_
169169

170-
* New :ref:`control instructions <syntax-instr-control>`: :math:`RETURNCALL` and :math:`RETURNCALLINDIRECT`
170+
* Extended set of :ref:`constant instructions <valid-const>` with :math:`\K{i}\X{nn}\K{.add}`, :math:`\K{i}\X{nn}\K{.sub}`, and :math:`\K{i}\X{nn}\K{.mul}`, and |GLOBALGET| for any previously declared immutable :ref:`global <syntax-global>`
171171

172+
.. note::
173+
The :ref:`garbage collection <extension-gc>` added further constant instructions.
172174

173-
.. index:: reference, reference type, heap type, value type, local, local type, instruction, instruction type, table, function, function type, matching, subtyping
174175

175-
Typeful References
176-
..................
177-
178-
Added more precise types for references [#proposal-typedref]_.
176+
.. index: instruction, function, call
179177
180-
* New generalised form of :ref:`reference types <syntax-reftype>`: :math:`(\REF~\NULL^?~\heaptype)`
178+
Tail Calls
179+
..........
181180

182-
* New class of :ref:`heap types <syntax-heaptype>`: |FUNC|, |EXTERN|, :math:`\typeidx`
181+
Added instructions to perform tail calls. [#proposal-tailcall]_
183182

184-
* Basic :ref:`subtyping <match>` on :ref:`reference <match-reftype>` and :ref:`value <match-valtype>` types
183+
* New :ref:`control instructions <syntax-instr-control>`: |RETURNCALL| and |RETURNCALLINDIRECT|
185184

186-
* New :ref:`reference instructions <syntax-instr-ref>`: |REFASNONNULL|, |BRONNULL|, |BRONNONNULL|
187185

188-
* New :ref:`control instruction <syntax-instr-control>`: |CALLREF|
186+
.. index:: instruction, exception, reference type, tag type, tag, handler
189187

190-
* Refined typing of :ref:`reference instruction <syntax-instr-ref>` |REFFUNC| with more precise result type
188+
Exception Handling
189+
..................
191190

192-
* Refined typing of :ref:`local instructions <valid-instr-variable>` and :ref:`instruction sequences <valid-instr-seq>` to track the :ref:`initialization status <syntax-init>` of :ref:`locals <syntax-local>` with non-:ref:`defaultable <valid-defaultable>` type
191+
Added tag definitions, imports, and exports, and instructions to throw and catch exceptions [#proposal-exn]_
193192

194-
* Extended :ref:`table definitions <syntax-table>` with optional initializer expression
193+
* Modules may :ref:`define <syntax-tagtype>`, :ref:`import <syntax-import>`, and :ref:`export <syntax-export>` tags.
195194

195+
* New :ref:`heap types <syntax-heaptype>`: |EXN|, |NOEXN|
196196

197-
.. index:: reference, reference type, heap type, field type, storage type, structure type, array type, composite type, sub type, recursive type
197+
* New :ref:`reference type <syntax-reftype>` short-hands: |EXNREF|, |NULLEXNREF|
198198

199-
Garbage Collection
200-
..................
199+
* New :ref:`control instructions <syntax-instr-control>`: |THROW|, |THROWREF|, and |TRYTABLE|.
201200

202-
Added managed reference types [#proposal-gc]_.
201+
* New :ref:`tag section <binary-tagsec>` in binary format.
203202

204-
* New forms of :ref:`heap types <syntax-heaptype>`: |ANY|, |EQT|, |I31|, |STRUCT|, |ARRAY|, |NONE|, |NOFUNC|, |NOEXTERN|
205203

206-
* New :ref:`reference type <syntax-reftype>` short-hands: |ANYREF|, |EQREF|, |I31REF|, |STRUCTREF|, |ARRAYREF|, |NULLREF|, |NULLFUNCREF|, |NULLEXTERNREF|
204+
.. index: instruction, memory, memory index, data segment, import, export
207205
208-
* New forms of type definitions: :ref:`structure <syntax-structtype>` and :ref:`array types <syntax-arraytype>`, :ref:`sub types <syntax-subtype>`, and :ref:`recursive types <syntax-rectype>`
206+
Multiple Memories
207+
.................
209208

210-
* Enriched :ref:`subtyping <match>` based on explicitly declared :ref:`sub types <syntax-subtype>` and the new heap types
209+
Added the ability to use multiple memories per module. [#proposal-multimem]_
211210

212-
* New generic :ref:`reference instructions <syntax-instr-ref>`: |REFEQ|, |REFTEST|, |REFCAST|, |BRONCAST|, |BRONCASTFAIL|
211+
* :ref:`Modules <syntax-module>` may :ref:`define <syntax-mem>`, :ref:`import <syntax-import>`, and :ref:`export <syntax-export>` multiple memories
213212

214-
* New :ref:`reference instructions <syntax-instr-ref>` for :ref:`unboxed scalars <syntax-i31>`: |REFI31|, :math:`\I31GET\K{\_}\sx`
213+
* :ref:`Memory instructions <syntax-instr-memory>` take a :ref:`memory index <syntax-memidx>` immediate: |MEMORYSIZE|, |MEMORYGROW|, |MEMORYFILL|, |MEMORYCOPY|, |MEMORYINIT|, :math:`t\K{.load}`, :math:`t\K{.store}`, :math:`t\K{.load}\!N\!\K{\_}\sx`, :math:`t\K{.store}\!N`, :math:`\K{v128.load}\!N\!\K{x}\!M\!\K{\_}\sx`, :math:`\K{v128.load}\!N\!\K{\_zero}`, :math:`\K{v128.load}\!N\!\K{\_splat}`, :math:`\K{v128.load}\!N\!\K{\_lane}`, :math:`\K{v128.store}\!N\!\K{\_lane}`
215214

216-
* New :ref:`reference instructions <syntax-instr-ref>` for :ref:`structure types <syntax-structtype>`: |STRUCTNEW|, |STRUCTNEWDEFAULT|, :math:`\STRUCTGET\K{\_}\sx^?`, |STRUCTSET|
215+
* :ref:`Data segments <syntax-elem>` take a :ref:`memory index <syntax-memidx>`
217216

218-
* New :ref:`reference instructions <syntax-instr-ref>` for :ref:`array types <syntax-structtype>`: |ARRAYNEW|, |ARRAYNEWDEFAULT|, |ARRAYNEWFIXED|, |ARRAYNEWDATA|, |ARRAYNEWELEM|, :math:`\ARRAYGET\K{\_}\sx^?`, |ARRAYSET|, |ARRAYLEN|, |ARRAYFILL|, |ARRAYCOPY|, |ARRAYINITDATA|, |ARRAYINITELEM|
219217

220-
* New :ref:`reference instructions <syntax-instr-ref>` for converting :ref:`host types <syntax-externtype>`: |ANYCONVERTEXTERN|, |EXTERNCONVERTANY|
218+
.. index:: reference, reference type, heap type, value type, local, local type, instruction, instruction type, table, function, function type, matching, subtyping
221219

222-
* Extended set of :ref:`constant instructions <valid-const>` with |REFI31|, |STRUCTNEW|, |STRUCTNEWDEFAULT|, |ARRAYNEW|, |ARRAYNEWDEFAULT|, |ARRAYNEWFIXED|, |ANYCONVERTEXTERN|, |EXTERNCONVERTANY|, and |GLOBALGET| for any previously declared immutable :ref:`global <syntax-global>`
220+
Typeful References
221+
..................
223222

223+
Added more precise types for references. [#proposal-typedref]_
224224

225-
.. index:: instruction, exception, reference type, tag type, tag, handler
225+
* New generalised form of :ref:`reference types <syntax-reftype>`: :math:`(\REF~\NULL^?~\heaptype)`
226226

227-
Exception Handling
228-
..................
227+
* New class of :ref:`heap types <syntax-heaptype>`: |FUNC|, |EXTERN|, :math:`\typeidx`
229228

230-
Added tag definitions, imports, and exports, and instructions to throw and catch exceptions [#proposal-exn]_
229+
* Basic :ref:`subtyping <match>` on :ref:`reference <match-reftype>` and :ref:`value <match-valtype>` types
231230

232-
* Modules may :ref:`define <syntax-tagtype>`, :ref:`import <syntax-import>`, and :ref:`export <syntax-export>` tags.
231+
* New :ref:`reference instructions <syntax-instr-ref>`: |REFASNONNULL|, |BRONNULL|, |BRONNONNULL|
233232

234-
* New :ref:`heap types <syntax-heaptype>`: |EXN|, |NOEXN|
233+
* New :ref:`control instruction <syntax-instr-control>`: |CALLREF|
235234

236-
* New :ref:`reference type <syntax-reftype>` short-hands: |EXNREF|, |NULLEXNREF|
235+
* Refined typing of :ref:`reference instruction <syntax-instr-ref>` |REFFUNC| with more precise result type
237236

238-
* New :ref:`control instructions <syntax-instr-control>`: |THROW|, |THROWREF|, and |TRYTABLE|.
237+
* Refined typing of :ref:`local instructions <valid-instr-variable>` and :ref:`instruction sequences <valid-instr-seq>` to track the :ref:`initialization status <syntax-init>` of :ref:`locals <syntax-local>` with non-:ref:`defaultable <valid-defaultable>` type
239238

240-
* New :ref:`tag section <binary-tagsec>` in binary format.
239+
* Extended :ref:`table definitions <syntax-table>` with optional initializer expression
241240

242241

243242
.. index:: reference, reference type, heap type, field type, storage type, structure type, array type, composite type, sub type, recursive type
244243
.. _extension-gc:
245244

246-
Garbage collection
245+
Garbage Collection
247246
..................
248247

249248
Added managed reference types. [#proposal-gc]_
@@ -271,7 +270,7 @@ Added managed reference types. [#proposal-gc]_
271270

272271
.. index: text format, annotation, custom section, identifier, module, type, function, local, structure field
273272
274-
Custom annotations
273+
Custom Annotations
275274
..................
276275

277276
Added generic syntax for custom annotations in the text format,
@@ -292,15 +291,15 @@ mirroring the role of custom sections in the binary format. [#proposal-annot]_
292291
.. [#proposal-tailcall]
293292
https://github.com/WebAssembly/spec/tree/main/proposals/tail-call/
294293
294+
.. [#proposal-exn]
295+
https://github.com/WebAssembly/spec/tree/main/proposals/exception-handling/
296+
295297
.. [#proposal-multimem]
296298
https://github.com/WebAssembly/multi-memory/blob/main/proposals/multi-memory/
297299
298300
.. [#proposal-typedref]
299301
https://github.com/WebAssembly/spec/tree/main/proposals/function-references/
300302
301-
.. [#proposal-exn]
302-
https://github.com/WebAssembly/spec/tree/main/proposals/exception-handling/
303-
304303
.. [#proposal-gc]
305304
https://github.com/WebAssembly/spec/tree/main/proposals/gc/
306305

0 commit comments

Comments
 (0)