aboutsummaryrefslogtreecommitdiff
path: root/Web.md
diff options
context:
space:
mode:
Diffstat (limited to 'Web.md')
-rw-r--r--Web.md21
1 files changed, 17 insertions, 4 deletions
diff --git a/Web.md b/Web.md
index ac24b21..e1f2513 100644
--- a/Web.md
+++ b/Web.md
@@ -20,20 +20,33 @@ that the design, especially that of the [MVP](MVP.md), are sensible:
* A [module](MVP.md#Modules) can be loaded in the same way as an ES6 module
(`import` statements, `Reflect` API, `Worker` constructor, etc) and the result
is reflected to JS as an ES6 module object.
- * Exports are the ES6 module object exports.
- * An import first passes the module name to the [module loader pipeline][] and
+ - Exports are the ES6 module object exports.
+ - An import first passes the module name to the [module loader pipeline][] and
resulting ES6 module (which could be implemented in JS or WebAssembly) is
queried for the export name.
- * There is no special case for when one WebAssembly module imports another:
+ - There is no special case for when one WebAssembly module imports another:
they have separate [heaps](MVP.md#heap) and pointers cannot be passed
between the two. Module imports encapsulate the importer and
importee. [Dynamic linking](FutureFeatures.md#dynamic-linking) should be
used to share heaps and pointers across modules.
- * To synchronously call into JavaScript from C++, the C++ code would declare
+ - To synchronously call into JavaScript from C++, the C++ code would declare
and call an undefined `extern` function and the target JavaScript function
would be given the (mangled) name of the `extern` and put inside the
imported ES6 module.
+* Once [threads are supported](EssentialPostMVPFeatures.md#Threads), a
+ WebAssembly module would initially be distributed between workers via
+ `postMessage()`.
+ - This also has the effect of explicitly sharing code so that engines don't
+ perform N fetches and compile N copies.
+ - May later standardize a more direct way to create a thread from WebAssembly.
+* Once [SIMD is supported](EssentialPostMVPFeatures.md#Fixed-width-SIMD), a Web
+ implementation of WebAssembly would:
+ - Be statically typed analogous to [SIMD.js-in-asm.js][];
+ - Reuse specification of operation semantics (with TC39);
+ - Reuse backend implementation (same IR nodes).
[CORS]: http://www.w3.org/TR/cors/
[subresource integrity]: http://www.w3.org/TR/SRI/
[module loader pipeline]: http://whatwg.github.io/loader
+ [SIMD.js-in-asm.js]: http://discourse.specifiction.org/t/request-for-comments-simd-js-in-asm-js
+