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

Sign extension instructions

Added new numeric instructions for performing sign extension within integer representations 1.

  • New numeric instructions: \(\mathsf{i}\mathit{nn}\mathsf{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{extend}}\mathit{N}\mathsf{\_s}\)

Non-trapping float-to-int conversions

Added new conversion instructions that avoid trapping when converting a floating-point number to an integer 2.

  • New numeric instructions: \(\mathsf{i}\mathit{nn}\mathsf{.}\href{../syntax/instructions.html#syntax-instr-numeric}{\mathsf{trunc}}\mathsf{\_sat\_f}\mathit{mm}\mathsf{\_}\href{../syntax/instructions.html#syntax-sx}{\mathit{sx}}\)

Multiple values

Generalized the result type of blocks and functions to allow for multiple values; in addition, introduced the ability to have block parameters 3.

Reference types

Added \(\href{../syntax/types.html#syntax-reftype}{\mathsf{funcref}}\) and \(\href{../syntax/types.html#syntax-reftype}{\mathsf{externref}}\) as new value types and respective instructions 4.

  • New value types: reference types \(\href{../syntax/types.html#syntax-reftype}{\mathsf{funcref}}\) and \(\href{../syntax/types.html#syntax-reftype}{\mathsf{externref}}\)

  • New reference instructions: \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref{.}null}}\), \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref{.}func}}\), \(\href{../syntax/instructions.html#syntax-instr-ref}{\mathsf{ref{.}is\_null}}\)

  • Enrich parametric instruction: \(\href{../syntax/instructions.html#syntax-instr-parametric}{\mathsf{select}}\) with optional type immediate

  • New declarative form of element segment

Table instructions

Added instructions to directly access and modify tables 4.

  • Table types allow any reference type as element type

  • New table instructions: \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.size}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.grow}}\)

Multiple tables

Added the ability to use multiple tables per module 4.

  • Modules may define, import, and export multiple tables

  • Table instructions take a table index immediate: \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.get}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.set}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.size}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.grow}}\), \(\href{../syntax/instructions.html#syntax-instr-control}{\mathsf{call\_indirect}}\)

  • Element segments take a table index

Bulk memory and table instructions

Added instructions that modify ranges of memory or table entries 4 5

  • New memory instructions: \(\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.fill}}\), \(\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.init}}\), \(\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{memory.copy}}\), \(\href{../syntax/instructions.html#syntax-instr-memory}{\mathsf{data.drop}}\)

  • New table instructions: \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.fill}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.init}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{table.copy}}\), \(\href{../syntax/instructions.html#syntax-instr-table}{\mathsf{elem.drop}}\)

  • New passive form of data segment

  • New passive form of element segment

  • New data count section in binary format

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

1

https://github.com/WebAssembly/spec/tree/master/proposals/sign-extension-ops/

2

https://github.com/WebAssembly/spec/tree/master/proposals/nontrapping-float-to-int-conversion/

3

https://github.com/WebAssembly/spec/tree/master/proposals/multi-value/

4(1,2,3,4)

https://github.com/WebAssembly/spec/tree/master/proposals/reference-types/

5

https://github.com/WebAssembly/spec/tree/master/proposals/bulk-memory-operations/