Improve loader function table handling

This commit is contained in:
dcodeIO
2018-10-20 15:40:23 +02:00
parent c4d7764851
commit 4683599a82
5 changed files with 33 additions and 20 deletions

View File

@ -57,5 +57,5 @@ assert.strictEqual(fn(2, 3), 5);
assert.strictEqual(fn(2), 4);
// should be able to create a new function and call it from WASM
ptr = module.newFunction(module.varadd.constructor); // must be an actual exported wasm function
ptr = module.newFunction(module.varadd);
assert.strictEqual(module.calladd(ptr, 2, 3), 5);