1
- # Feature to add after the MVP
1
+ # Features to add after the MVP
2
2
3
3
These are features that make sense in the context of the
4
4
[ high-level goals] ( HighLevelGoals.md ) of WebAssembly but are not considered part
@@ -14,6 +14,7 @@ This is covered in the [tooling](Tooling.md) section.
14
14
## Finer-grained control over memory
15
15
16
16
Provide access to safe OS-provided functionality including:
17
+
17
18
* ` map_file(addr, length, Blob, file-offset) ` : semantically, this operator
18
19
copies the specified range from ` Blob ` into the range ` [addr, addr+length) `
19
20
(where ` addr+length <= memory_size ` ) but implementations are encouraged
@@ -51,19 +52,21 @@ can allocate noncontiguous virtual address ranges. See the
51
52
52
53
Some platforms offer support for memory pages as large as 16GiB, which
53
54
can improve the efficiency of memory management in some situations. WebAssembly
54
- may offer programs the option to specify a larger page size than the [ default] (Semantics.md#resizing).
55
+ may offer programs the option to specify a larger page size than the [ default] ( Semantics.md#resizing ) .
55
56
56
57
## More expressive control flow
57
58
58
59
Some types of control flow (especially irreducible and indirect) cannot be
59
60
expressed with maximum efficiency in WebAssembly without patterned output by the
60
61
relooper and [ jump-threading] ( https://en.wikipedia.org/wiki/Jump_threading )
61
62
optimizations in the engine. Target uses for more expressive control flow are:
63
+
62
64
* Language interpreters, which often use computed-` goto ` .
63
65
* Functional language support, where guaranteed tail call optimization is
64
66
expected for correctness and performance.
65
67
66
68
Options under consideration:
69
+
67
70
* No action, ` while ` and ` switch ` combined with jump-threading are enough.
68
71
* Just add ` goto ` (direct and indirect).
69
72
* Add new control-flow primitives that address common patterns.
@@ -403,6 +406,7 @@ can begin.
403
406
404
407
There are two future features that would allow streaming compilation
405
408
of WebAssembly in browsers:
409
+
406
410
* [ ES6 Module integration] ( Modules.md#integration-with-es6-modules ) would allow
407
411
the browser's network layer to feed a stream directly into the engine.
408
412
* The asynchronous [ ` WebAssembly.compile ` ] ( JS.md#wasmcompile ) function could be
@@ -444,6 +448,7 @@ it was possible to write a WebAssembly dynamic loader in WebAssembly. As a
444
448
prerequisite, WebAssembly would need first-class support for
445
449
[ GC references] ( GC.md ) on the stack and in locals. Given that, the following
446
450
could be added:
451
+
447
452
* ` get_table ` /` set_table ` : get or set the table element at a given dynamic
448
453
index; the got/set value would have a GC reference type
449
454
* ` grow_table ` : grow the current table (up to the optional maximum), similar to
@@ -453,6 +458,7 @@ could be added:
453
458
Additionally, in the MVP, the only allowed element type of tables is a generic
454
459
"anyfunc" type which simply means the element can be called but there is no
455
460
static signature validation check. This could be improved by allowing:
461
+
456
462
* functions with a particular signature, allowing wasm generators to use
457
463
multiple homogeneously-typed function tables (instead of a single
458
464
heterogeneous function table) which eliminates the implied dynamic signature
0 commit comments