summaryrefslogtreecommitdiff
path: root/src/js/post.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/post.js')
-rw-r--r--src/js/post.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/js/post.js b/src/js/post.js
index 596831595..72cd836ba 100644
--- a/src/js/post.js
+++ b/src/js/post.js
@@ -84,6 +84,7 @@ function integrateWasmJS(Module) {
// Generate a module instance of the asm.js converted into wasm.
var code = Module['read'](Module['asmjsCodeFile']);
+ // TODO: support wasm s-expression loading here
// wasm code would create its own buffer, at this time. But static init code might have
// written to the buffer already, and we must copy it over. We could just avoid
@@ -106,9 +107,11 @@ function integrateWasmJS(Module) {
var temp = wasmJS['_malloc'](code.length + 1);
wasmJS['writeAsciiToMemory'](code, temp);
- wasmJS['_load_asm'](temp);
+ wasmJS['_load_asm2wasm'](temp);
wasmJS['_free'](temp);
+ wasmJS['_instantiate'](temp);
+
// write the provided data to a location the wasm instance can get at it.
info.global = global;
info.env = env;