diff --git a/demo/AngryBots/AngryBots-0xc.wast.gz b/demo/AngryBots/AngryBots-0xc.wast.gz new file mode 100644 index 00000000..b0e6810f Binary files /dev/null and b/demo/AngryBots/AngryBots-0xc.wast.gz differ diff --git a/demo/AngryBots/AngryBots12.wasm b/demo/AngryBots/AngryBots12.wasm new file mode 100644 index 00000000..9161c0ab Binary files /dev/null and b/demo/AngryBots/AngryBots12.wasm differ diff --git a/demo/AngryBots/Release/AngryBots.js b/demo/AngryBots/Release/AngryBots.js index 78aaaae2..36db318c 100644 --- a/demo/AngryBots/Release/AngryBots.js +++ b/demo/AngryBots/Release/AngryBots.js @@ -97,11 +97,16 @@ function integrateWasmJS(Module) { }; info["global.Math"] = global.Math; info["env"] = env; - var instance; - instance = Wasm.instantiateModule(binary, info).exports; - mergeMemory(instance.memory); + if (Wasm.experimentalVersion < 0xc || typeof WebAssembly == "undefined") { + var exports = Wasm.instantiateModule(binary, info).exports; + mergeMemory(exports.memory); + applyMappedGlobals(); + return exports; + } + var exports = new WebAssembly.Instance(new WebAssembly.Module(binary), info).exports; + mergeMemory(exports.memory.buffer); applyMappedGlobals(); - return instance; + return exports; }); } Module["preRun"].push((function() {