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
***Layer 0** is a simple binary encoding of the bytecode instructions and related data structures.
12
14
The encoding is dense and trivial to interact with, making it suitable for
13
15
scenarios like JIT, instrumentation tools, and debugging.
14
-
***Layer 1** provides structural compression on top of layer 0, exploiting
16
+
***Layer 1**[:unicorn:][future compression]provides structural compression on top of layer 0, exploiting
15
17
specific knowledge about the nature of the syntax tree and its nodes.
16
18
The structural compression introduces more efficient encoding of values,
17
19
rearranges values within the module, and prunes structurally identical
18
20
tree nodes.
19
-
***Layer 2** Layer 2 applies generic compression algorithms, like [gzip](http://www.gzip.org/) and [Brotli](https://datatracker.ietf.org/doc/draft-alakuijala-brotli/), that are already available in browsers and other tooling.
21
+
***Layer 2**[:unicorn:][future compression]Layer 2 applies generic compression algorithms, like [gzip](http://www.gzip.org/) and [Brotli](https://datatracker.ietf.org/doc/draft-alakuijala-brotli/), that are already available in browsers and other tooling.
20
22
21
23
Most importantly, the layering approach allows development and standardization to
22
24
occur incrementally. For example, Layer 1 and Layer 2 encoding techniques can be
@@ -25,7 +27,7 @@ compression techniques stabilize, they can be standardized and moved into nativ
for a proposal for layer 1 structural compression.
30
32
31
33
@@ -67,7 +69,7 @@ All types are distinguished by a negative `varint7` values that is the first byt
67
69
68
70
Some of these will be followed by additional fields, see below.
69
71
70
-
Note: Gaps are reserved for future extensions. The use of a signed scheme is so that types can coexist in a single space with (positive) indices into the type section, which may be relevant for future extensions of the type system.
72
+
Note: Gaps are reserved for [future:unicorn:][future general] extensions. The use of a signed scheme is so that types can coexist in a single space with (positive) indices into the type section, which may be relevant for future extensions of the type system.
71
73
72
74
### `value_type`
73
75
A `varint7` indicating a [value type](Semantics.md#types). One of:
@@ -92,7 +94,7 @@ In the MVP, only one type is available:
92
94
93
95
*[`anyfunc`](AstSemantics.md#table)
94
96
95
-
Note: In the future, other element types may be allowed.
97
+
Note: In the [future:unicorn:][future general], other element types may be allowed.
96
98
97
99
### `func_type`
98
100
The description of a function signature. Its type constructor is followed by an additional description:
@@ -105,7 +107,7 @@ The description of a function signature. Its type constructor is followed by an
105
107
| return_count |`varuint1`| the number of results from the function |
106
108
| return_type |`value_type?`| the result type of the function (if return_count is 1) |
107
109
108
-
Note: In the future, `return_count` and `return_type` might be generalised to allow multiple values.
110
+
Note: In the [future:unicorn:][future multiple return], `return_count` and `return_type` might be generalised to allow multiple values.
109
111
110
112
## Other Types
111
113
@@ -150,7 +152,7 @@ A packed tuple that describes the limits of a
150
152
| initial |`varuint32`| initial length (in units of table elements or wasm pages) |
151
153
| maximum |`varuint32`? | only present if specified by `flags`|
152
154
153
-
Note: In the future, the "flags" field may be extended, e.g., to include a flag for sharing between threads.
155
+
Note: In the [future:unicorn:][future threads], the "flags" field may be extended, e.g., to include a flag for sharing between threads.
154
156
155
157
### `init_expr`
156
158
The encoding of an [initializer expression](Modules.md#initializer-expression)
@@ -221,7 +223,8 @@ The type section declares all function signatures that will be used in the modul
221
223
| count |`varuint32`| count of type entries to follow |
222
224
| entries |`func_type*`| repeated type entries as described below |
223
225
224
-
Note: In the future, this section may contain other forms of type entries as well, which can be distinguished by the `form` field of the type encoding.
226
+
Note: In the [future :unicorn:][future types],
227
+
this section may contain other forms of type entries as well, which can be distinguished by the `form` field of the type encoding.
225
228
226
229
### Import section
227
230
@@ -503,7 +506,8 @@ The `br_table` operator implements an indirect branch. It accepts an optional va
503
506
branches to the block or loop at the given offset within the `target_table`. If the input value is
504
507
out of range, `br_table` branches to the default target.
505
508
506
-
Note: Gaps in the opcode space, here and elsewhere, are reserved for future extensions.
509
+
Note: Gaps in the opcode space, here and elsewhere, are reserved for
@@ -512,7 +516,9 @@ Note: Gaps in the opcode space, here and elsewhere, are reserved for future exte
512
516
|`call`|`0x10`| function_index : `varuint32`| call a function by its [index](Modules.md#function-index-space)|
513
517
|`call_indirect`|`0x11`| type_index : `varuint32`, reserved : `varuint1`| call a function indirect with an expected signature |
514
518
515
-
The `call_indirect` operator takes a list of function arguments and as the last operand the index into the table. Its `reserved` immediate is for future use and must be `0` in the MVP.
519
+
The `call_indirect` operator takes a list of function arguments and as the last
520
+
operand the index into the table. Its `reserved` immediate is for
521
+
[future :unicorn:][future multiple tables] use and must be `0` in the MVP.
0 commit comments