+
diff --git a/hello.js b/hello.js
index 14d945c..bc0a731 100644
--- a/hello.js
+++ b/hello.js
@@ -1,8 +1,4 @@
-/**
- * @license
- * Copyright 2010 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
@@ -19,13 +15,11 @@
// can continue to use Module afterwards as well.
var Module = typeof Module !== 'undefined' ? Module : {};
+
+
// --pre-jses are emitted after the Module integration code, so that they can
// refer to Module (if they choose; they can also define Module)
-/**
- * @license
- * Copyright 2013 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// Route URL GET parameters to argc+argv
if (typeof window === "object") {
@@ -103,11 +97,7 @@ if (ENVIRONMENT_IS_NODE) {
}
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
read_ = function shell_read(filename, binary) {
if (!nodeFS) nodeFS = require('fs');
@@ -222,11 +212,7 @@ if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) {
{
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
read_ = function shell_read(url) {
var xhr = new XMLHttpRequest();
@@ -291,9 +277,9 @@ moduleOverrides = null;
// to the proper local x. This has two benefits: first, we only emit it if it is
// expected to arrive, and second, by using a local everywhere else that can be
// minified.
-if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { configurable: true, get: function() { abort('Module.arguments has been replaced with plain arguments_') } });
-if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { configurable: true, get: function() { abort('Module.thisProgram has been replaced with plain thisProgram') } });
-if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { configurable: true, get: function() { abort('Module.quit has been replaced with plain quit_') } });
+if (Module['arguments']) arguments_ = Module['arguments'];if (!Object.getOwnPropertyDescriptor(Module, 'arguments')) Object.defineProperty(Module, 'arguments', { configurable: true, get: function() { abort('Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+if (Module['thisProgram']) thisProgram = Module['thisProgram'];if (!Object.getOwnPropertyDescriptor(Module, 'thisProgram')) Object.defineProperty(Module, 'thisProgram', { configurable: true, get: function() { abort('Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+if (Module['quit']) quit_ = Module['quit'];if (!Object.getOwnPropertyDescriptor(Module, 'quit')) Object.defineProperty(Module, 'quit', { configurable: true, get: function() { abort('Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message
// Assertions on removed incoming Module JS APIs.
@@ -306,10 +292,10 @@ assert(typeof Module['readAsync'] === 'undefined', 'Module.readAsync option was
assert(typeof Module['readBinary'] === 'undefined', 'Module.readBinary option was removed (modify readBinary in JS)');
assert(typeof Module['setWindowTitle'] === 'undefined', 'Module.setWindowTitle option was removed (modify setWindowTitle in JS)');
assert(typeof Module['TOTAL_MEMORY'] === 'undefined', 'Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY');
-if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { configurable: true, get: function() { abort('Module.read has been replaced with plain read_') } });
-if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { configurable: true, get: function() { abort('Module.readAsync has been replaced with plain readAsync') } });
-if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { configurable: true, get: function() { abort('Module.readBinary has been replaced with plain readBinary') } });
-if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { configurable: true, get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle') } });
+if (!Object.getOwnPropertyDescriptor(Module, 'read')) Object.defineProperty(Module, 'read', { configurable: true, get: function() { abort('Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+if (!Object.getOwnPropertyDescriptor(Module, 'readAsync')) Object.defineProperty(Module, 'readAsync', { configurable: true, get: function() { abort('Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+if (!Object.getOwnPropertyDescriptor(Module, 'readBinary')) Object.defineProperty(Module, 'readBinary', { configurable: true, get: function() { abort('Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+if (!Object.getOwnPropertyDescriptor(Module, 'setWindowTitle')) Object.defineProperty(Module, 'setWindowTitle', { configurable: true, get: function() { abort('Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
var IDBFS = 'IDBFS is no longer included by default; build with -lidbfs.js';
var PROXYFS = 'PROXYFS is no longer included by default; build with -lproxyfs.js';
var WORKERFS = 'WORKERFS is no longer included by default; build with -lworkerfs.js';
@@ -318,34 +304,12 @@ var NODEFS = 'NODEFS is no longer included by default; build with -lnodefs.js';
-/**
- * @license
- * Copyright 2017 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// {{PREAMBLE_ADDITIONS}}
var STACK_ALIGN = 16;
-// stack management, and other functionality that is provided by the compiled code,
-// should not be used before it is ready
-
-/** @suppress{duplicate} */
-var stackSave;
-/** @suppress{duplicate} */
-var stackRestore;
-/** @suppress{duplicate} */
-var stackAlloc;
-
-stackSave = stackRestore = stackAlloc = function() {
- abort('cannot use the stack before compiled code is ready to run, and has provided stack access');
-};
-
-function staticAlloc(size) {
- abort('staticAlloc is no longer available at runtime; instead, perform static allocations at compile time (using makeStaticAlloc)');
-}
-
function dynamicAlloc(size) {
assert(DYNAMICTOP_PTR);
var ret = HEAP32[DYNAMICTOP_PTR>>2];
@@ -394,13 +358,6 @@ function warnOnce(text) {
-/**
- * @license
- * Copyright 2020 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
-
-
// Wraps a JS function as a wasm function with a given signature.
function convertJsFunctionToWasm(func, sig) {
@@ -567,42 +524,9 @@ function removeFunction(index) {
-var funcWrappers = {};
-function getFuncWrapper(func, sig) {
- if (!func) return; // on null pointer, return undefined
- assert(sig);
- if (!funcWrappers[sig]) {
- funcWrappers[sig] = {};
- }
- var sigCache = funcWrappers[sig];
- if (!sigCache[func]) {
- // optimize away arguments usage in common cases
- if (sig.length === 1) {
- sigCache[func] = function dynCall_wrapper() {
- return dynCall(sig, func);
- };
- } else if (sig.length === 2) {
- sigCache[func] = function dynCall_wrapper(arg) {
- return dynCall(sig, func, [arg]);
- };
- } else {
- // general case
- sigCache[func] = function dynCall_wrapper() {
- return dynCall(sig, func, Array.prototype.slice.call(arguments));
- };
- }
- }
- return sigCache[func];
-}
-/**
- * @license
- * Copyright 2020 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
-
@@ -610,20 +534,6 @@ function makeBigInt(low, high, unsigned) {
return unsigned ? ((+((low>>>0)))+((+((high>>>0)))*4294967296.0)) : ((+((low>>>0)))+((+((high|0)))*4294967296.0));
}
-/** @param {Array=} args */
-function dynCall(sig, ptr, args) {
- if (args && args.length) {
- // j (64-bit integer) must be passed in as two numbers [low 32, high 32].
- assert(args.length === sig.substring(1).replace(/j/g, '--').length);
- assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
- return Module['dynCall_' + sig].apply(null, [ptr].concat(args));
- } else {
- assert(sig.length == 1);
- assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
- return Module['dynCall_' + sig].call(null, ptr);
- }
-}
-
var tempRet0 = 0;
var setTempRet0 = function(value) {
@@ -646,11 +556,7 @@ var GLOBAL_BASE = 1024;
-/**
- * @license
- * Copyright 2010 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// === Preamble library stuff ===
@@ -663,20 +569,16 @@ var GLOBAL_BASE = 1024;
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
-var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { configurable: true, get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary') } });
-var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { configurable: true, get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime') } });
+var wasmBinary;if (Module['wasmBinary']) wasmBinary = Module['wasmBinary'];if (!Object.getOwnPropertyDescriptor(Module, 'wasmBinary')) Object.defineProperty(Module, 'wasmBinary', { configurable: true, get: function() { abort('Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
+var noExitRuntime;if (Module['noExitRuntime']) noExitRuntime = Module['noExitRuntime'];if (!Object.getOwnPropertyDescriptor(Module, 'noExitRuntime')) Object.defineProperty(Module, 'noExitRuntime', { configurable: true, get: function() { abort('Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
if (typeof WebAssembly !== 'object') {
- abort('No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead.');
+ abort('no native wasm support detected');
}
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// In MINIMAL_RUNTIME, setValue() and getValue() are only available when building with safe heap enabled, for heap safety checking.
// In traditional runtime, setValue() and getValue() are always available (although their use is highly discouraged due to perf penalties)
@@ -723,6 +625,7 @@ function getValue(ptr, type, noSafe) {
+
// Wasm globals
var wasmMemory;
@@ -730,13 +633,16 @@ var wasmMemory;
// In fastcomp asm.js, we don't need a wasm Table at all.
// In the wasm backend, we polyfill the WebAssembly object,
// so this creates a (non-native-wasm) table for us.
+
var wasmTable = new WebAssembly.Table({
- 'initial': 626,
- 'maximum': 626 + 0,
+ 'initial': 634,
+ 'maximum': 634,
'element': 'anyfunc'
});
+
+
//========================================
// Runtime essentials
//========================================
@@ -923,11 +829,7 @@ function getMemory(size) {
}
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// runtime_strings.js: Strings related runtime functions that are part of both MINIMAL_RUNTIME and regular runtime.
@@ -1083,11 +985,7 @@ function lengthBytesUTF8(str) {
-/**
- * @license
- * Copyright 2020 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// runtime_strings_extra.js: Strings related runtime functions that are available only in regular runtime.
@@ -1115,13 +1013,16 @@ function stringToAscii(str, outPtr) {
var UTF16Decoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-16le') : undefined;
-function UTF16ToString(ptr) {
+function UTF16ToString(ptr, maxBytesToRead) {
assert(ptr % 2 == 0, 'Pointer passed to UTF16ToString must be aligned to two bytes!');
var endPtr = ptr;
// TextDecoder needs to know the byte length in advance, it doesn't stop on null terminator by itself.
// Also, use the length info to avoid running tiny strings through TextDecoder, since .subarray() allocates garbage.
var idx = endPtr >> 1;
- while (HEAP16[idx]) ++idx;
+ var maxIdx = idx + maxBytesToRead / 2;
+ // If maxBytesToRead is not passed explicitly, it will be undefined, and this
+ // will always evaluate to true. This saves on code size.
+ while (!(idx >= maxIdx) && HEAPU16[idx]) ++idx;
endPtr = idx << 1;
if (endPtr - ptr > 32 && UTF16Decoder) {
@@ -1132,7 +1033,7 @@ function UTF16ToString(ptr) {
var str = '';
while (1) {
var codeUnit = HEAP16[(((ptr)+(i*2))>>1)];
- if (codeUnit == 0) return str;
+ if (codeUnit == 0 || i == maxBytesToRead / 2) return str;
++i;
// fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.
str += String.fromCharCode(codeUnit);
@@ -1179,14 +1080,16 @@ function lengthBytesUTF16(str) {
return str.length*2;
}
-function UTF32ToString(ptr) {
+function UTF32ToString(ptr, maxBytesToRead) {
assert(ptr % 4 == 0, 'Pointer passed to UTF32ToString must be aligned to four bytes!');
var i = 0;
var str = '';
- while (1) {
+ // If maxBytesToRead is not passed explicitly, it will be undefined, and this
+ // will always evaluate to true. This saves on code size.
+ while (!(i >= maxBytesToRead / 4)) {
var utf32 = HEAP32[(((ptr)+(i*4))>>2)];
- if (utf32 == 0) return str;
+ if (utf32 == 0) break;
++i;
// Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.
// See http://unicode.org/faq/utf_bom.html#utf16-3
@@ -1197,6 +1100,7 @@ function UTF32ToString(ptr) {
str += String.fromCharCode(utf32);
}
}
+ return str;
}
// Copies the given Javascript String object 'str' to the emscripten HEAP at address 'outPtr',
@@ -1311,7 +1215,6 @@ function writeAsciiToMemory(str, buffer, dontAddNull) {
var PAGE_SIZE = 16384;
var WASM_PAGE_SIZE = 65536;
-var ASMJS_PAGE_SIZE = 16777216;
function alignUp(x, multiple) {
if (x % multiple > 0) {
@@ -1353,21 +1256,20 @@ function updateGlobalBufferAndViews(buf) {
}
var STATIC_BASE = 1024,
- STACK_BASE = 5270112,
+ STACK_BASE = 5270432,
STACKTOP = STACK_BASE,
- STACK_MAX = 27232,
- DYNAMIC_BASE = 5270112,
- DYNAMICTOP_PTR = 27056;
+ STACK_MAX = 27552,
+ DYNAMIC_BASE = 5270432,
+ DYNAMICTOP_PTR = 27536;
assert(STACK_BASE % 16 === 0, 'stack must start aligned');
assert(DYNAMIC_BASE % 16 === 0, 'heap must start aligned');
-
var TOTAL_STACK = 5242880;
if (Module['TOTAL_STACK']) assert(TOTAL_STACK === Module['TOTAL_STACK'], 'the stack size can no longer be determined at runtime')
-var INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;if (!Object.getOwnPropertyDescriptor(Module, 'INITIAL_MEMORY')) Object.defineProperty(Module, 'INITIAL_MEMORY', { configurable: true, get: function() { abort('Module.INITIAL_MEMORY has been replaced with plain INITIAL_INITIAL_MEMORY') } });
+var INITIAL_INITIAL_MEMORY = Module['INITIAL_MEMORY'] || 16777216;if (!Object.getOwnPropertyDescriptor(Module, 'INITIAL_MEMORY')) Object.defineProperty(Module, 'INITIAL_MEMORY', { configurable: true, get: function() { abort('Module.INITIAL_MEMORY has been replaced with plain INITIAL_INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)') } });
assert(INITIAL_INITIAL_MEMORY >= TOTAL_STACK, 'INITIAL_MEMORY should be larger than TOTAL_STACK, was ' + INITIAL_INITIAL_MEMORY + '! (TOTAL_STACK=' + TOTAL_STACK + ')');
@@ -1377,23 +1279,14 @@ assert(typeof Int32Array !== 'undefined' && typeof Float64Array !== 'undefined'
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
-// In standalone mode, the wasm creates the memory, and the user can't provide it.
+
// In non-standalone/normal mode, we create the memory here.
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// Create the main memory. (Note: this isn't used in STANDALONE_WASM mode since the wasm
// memory is created in the wasm, not in JS.)
@@ -1425,11 +1318,7 @@ HEAP32[DYNAMICTOP_PTR>>2] = DYNAMIC_BASE;
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
// Initializes the stack cookie. Called at the startup of main and at the startup of each thread in pthreads mode.
function writeStackCookie() {
@@ -1453,18 +1342,9 @@ function checkStackCookie() {
if (HEAP32[0] !== 0x63736d65 /* 'emsc' */) abort('Runtime error: The application has corrupted its heap memory area (address zero)!');
}
-function abortStackOverflow(allocSize) {
- abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!');
-}
-
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
// Endianness check (note: assumes compiler arch was little-endian)
(function() {
@@ -1480,26 +1360,6 @@ function abortFnPtrError(ptr, sig) {
-function callRuntimeCallbacks(callbacks) {
- while(callbacks.length > 0) {
- var callback = callbacks.shift();
- if (typeof callback == 'function') {
- callback(Module); // Pass the module as the first argument.
- continue;
- }
- var func = callback.func;
- if (typeof func === 'number') {
- if (callback.arg === undefined) {
- Module['dynCall_v'](func);
- } else {
- Module['dynCall_vi'](func, callback.arg);
- }
- } else {
- func(callback.arg === undefined ? null : callback.arg);
- }
- }
-}
-
var __ATPRERUN__ = []; // functions called before the runtime is initialized
var __ATINIT__ = []; // functions called during startup
var __ATMAIN__ = []; // functions called when main() is to be run
@@ -1574,35 +1434,8 @@ function addOnPostRun(cb) {
__ATPOSTRUN__.unshift(cb);
}
-/** @param {number|boolean=} ignore */
-function unSign(value, bits, ignore) {
- if (value >= 0) {
- return value;
- }
- return bits <= 32 ? 2*Math.abs(1 << (bits-1)) + value // Need some trickery, since if bits == 32, we are right at the limit of the bits JS uses in bitshifts
- : Math.pow(2, bits) + value;
-}
-/** @param {number|boolean=} ignore */
-function reSign(value, bits, ignore) {
- if (value <= 0) {
- return value;
- }
- var half = bits <= 32 ? Math.abs(1 << (bits-1)) // abs is needed if bits == 32
- : Math.pow(2, bits-1);
- if (value >= half && (bits <= 32 || value > half)) { // for huge values, we can hit the precision limit and always get true here. so don't do that
- // but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors
- // TODO: In i64 mode 1, resign the two parts separately and safely
- value = -2*half + value; // Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts
- }
- return value;
-}
-/**
- * @license
- * Copyright 2019 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
@@ -1726,7 +1559,6 @@ function removeRunDependency(id) {
Module["preloadedImages"] = {}; // maps url to image data
Module["preloadedAudios"] = {}; // maps url to audio data
-
/** @param {string|number=} what */
function abort(what) {
if (Module['onAbort']) {
@@ -1734,7 +1566,6 @@ function abort(what) {
}
what += '';
- out(what);
err(what);
ABORT = true;
@@ -1743,21 +1574,21 @@ function abort(what) {
var output = 'abort(' + what + ') at ' + stackTrace();
what = output;
- // Throw a wasm runtime error, because a JS error might be seen as a foreign
+ // Use a wasm runtime error, because a JS error might be seen as a foreign
// exception, which means we'd run destructors on it. We need the error to
// simply make the program stop.
- throw new WebAssembly.RuntimeError(what);
+ var e = new WebAssembly.RuntimeError(what);
+
+ // Throw the error whether or not MODULARIZE is set because abort is used
+ // in code paths apart from instantiation where an exception is expected
+ // to be thrown when abort is called.
+ throw e;
}
var memoryInitializer = null;
-/**
- * @license
- * Copyright 2015 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
@@ -1765,11 +1596,7 @@ var memoryInitializer = null;
-/**
- * @license
- * Copyright 2017 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
function hasPrefix(str, prefix) {
return String.prototype.startsWith ?
@@ -1794,6 +1621,22 @@ function isFileURI(filename) {
+function createExportWrapper(name, fixedasm) {
+ return function() {
+ var displayName = name;
+ var asm = fixedasm;
+ if (!fixedasm) {
+ asm = Module['asm'];
+ }
+ assert(runtimeInitialized, 'native function `' + displayName + '` called before runtime initialization');
+ assert(!runtimeExited, 'native function `' + displayName + '` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
+ if (!asm[name]) {
+ assert(asm[name], 'exported native function `' + displayName + '` not found');
+ }
+ return asm[name].apply(null, arguments);
+ };
+}
+
var wasmBinaryFile = 'hello.wasm';
if (!isDataURI(wasmBinaryFile)) {
wasmBinaryFile = locateFile(wasmBinaryFile);
@@ -1833,9 +1676,7 @@ function getBinaryPromise() {
});
}
// Otherwise, getBinary should be able to get it synchronously
- return new Promise(function(resolve, reject) {
- resolve(getBinary());
- });
+ return Promise.resolve().then(getBinary);
}
@@ -1881,6 +1722,8 @@ function createWasm() {
return WebAssembly.instantiate(binary, info);
}).then(receiver, function(reason) {
err('failed to asynchronously prepare wasm: ' + reason);
+
+
abort(reason);
});
}
@@ -1900,7 +1743,7 @@ function createWasm() {
// in which case falling back to ArrayBuffer instantiation should work.
err('wasm streaming compile failed: ' + reason);
err('falling back to ArrayBuffer instantiation');
- instantiateArrayBuffer(receiveInstantiatedSource);
+ return instantiateArrayBuffer(receiveInstantiatedSource);
});
});
} else {
@@ -1924,7 +1767,6 @@ function createWasm() {
return {}; // no exports yet; we'll fill them in later
}
-
// Globals used by JS i64 conversions
var tempDouble;
var tempI64;
@@ -1932,20 +1774,17 @@ var tempI64;
// === Body ===
var ASM_CONSTS = {
- 1029: function($0, $1, $2) {try { return cjs.string_pass(document.querySelectorAll(cjs.receive($1))[$2].getAttribute(cjs.receive($0))); } catch (e) { return 0; }},
- 1211: function($0, $1, $2, $3) {document.querySelectorAll(cjs.receive($2))[$3].setAttribute(cjs.receive($0), cjs.receive($1));},
- 1310: function($0, $1, $2, $3) {document.querySelectorAll(cjs.receive($2))[$3].addEventListener(cjs.receive($0), () => cjs.fire_event_bus(cjs.receive($1)));},
- 1527: function() {InitWrappers()}
+ 1025: function($0, $1, $2) {try { return cjs.string_pass(document.querySelectorAll(cjs.receive($1))[$2][cjs.receive($0)]); } catch (e) { return 0; }},
+ 1192: function($0, $1, $2) {try { return cjs.string_pass(document.querySelectorAll(cjs.receive($1))[$2].getAttribute(cjs.receive($0))); } catch (e) { return 0; }},
+ 1369: function($0, $1, $2, $3) {document.querySelectorAll(cjs.receive($2))[$3][cjs.receive($0)] = cjs.receive($1);},
+ 1461: function($0, $1, $2, $3) {document.querySelectorAll(cjs.receive($2))[$3].setAttribute(cjs.receive($0), cjs.receive($1));},
+ 1625: function() {InitWrappers()}
};
-function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
- var args = readAsmConstArgs(sigPtr, argbuf);
- return ASM_CONSTS[code].apply(null, args);
-}
-// STATICTOP = STATIC_BASE + 26208;
+// STATICTOP = STATIC_BASE + 26528;
/* global initializers */ __ATINIT__.push({ func: function() { ___wasm_call_ctors() } });
@@ -1955,6 +1794,30 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
// {{PRE_LIBRARY}}
+ function abortStackOverflow(allocSize) {
+ abort('Stack overflow! Attempted to allocate ' + allocSize + ' bytes on the stack, but stack has only ' + (STACK_MAX - stackSave() + allocSize) + ' bytes available!');
+ }
+
+ function callRuntimeCallbacks(callbacks) {
+ while(callbacks.length > 0) {
+ var callback = callbacks.shift();
+ if (typeof callback == 'function') {
+ callback(Module); // Pass the module as the first argument.
+ continue;
+ }
+ var func = callback.func;
+ if (typeof func === 'number') {
+ if (callback.arg === undefined) {
+ wasmTable.get(func)();
+ } else {
+ wasmTable.get(func)(callback.arg);
+ }
+ } else {
+ func(callback.arg === undefined ? null : callback.arg);
+ }
+ }
+ }
+
function demangle(func) {
warnOnce('warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling');
return func;
@@ -1970,21 +1833,45 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
});
}
+
+ function dynCallLegacy(sig, ptr, args) {
+ assert(('dynCall_' + sig) in Module, 'bad function pointer type - no table for sig \'' + sig + '\'');
+ if (args && args.length) {
+ // j (64-bit integer) must be passed in as two numbers [low 32, high 32].
+ assert(args.length === sig.substring(1).replace(/j/g, '--').length);
+ } else {
+ assert(sig.length == 1);
+ }
+ if (args && args.length) {
+ return Module['dynCall_' + sig].apply(null, [ptr].concat(args));
+ }
+ return Module['dynCall_' + sig].call(null, ptr);
+ }function dynCall(sig, ptr, args) {
+ // Without WASM_BIGINT support we cannot directly call function with i64 as
+ // part of thier signature, so we rely the dynCall functions generated by
+ // wasm-emscripten-finalize
+ if (sig.indexOf('j') != -1) {
+ return dynCallLegacy(sig, ptr, args);
+ }
+
+ return wasmTable.get(ptr).apply(null, args)
+ }
+
function jsStackTrace() {
- var err = new Error();
- if (!err.stack) {
+ var error = new Error();
+ if (!error.stack) {
// IE10+ special cases: It does have callstack info, but it is only populated if an Error object is thrown,
// so try that as a special-case.
try {
throw new Error();
} catch(e) {
- err = e;
+ error = e;
}
- if (!err.stack) {
+ if (!error.stack) {
return '(no stack trace available)';
}
}
- return err.stack.toString();
+ return error.stack.toString();
}
function stackTrace() {
@@ -1993,190 +1880,303 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
return demangleAll(js);
}
- function ___cxa_allocate_exception(size) {
- return _malloc(size);
+
+ var ExceptionInfoAttrs={DESTRUCTOR_OFFSET:0,REFCOUNT_OFFSET:4,TYPE_OFFSET:8,CAUGHT_OFFSET:12,RETHROWN_OFFSET:13,SIZE:16};function ___cxa_allocate_exception(size) {
+ // Thrown object is prepended by exception metadata block
+ return _malloc(size + ExceptionInfoAttrs.SIZE) + ExceptionInfoAttrs.SIZE;
}
function _atexit(func, arg) {
- warnOnce('atexit() called, but EXIT_RUNTIME is not set, so atexits() will not be called. set EXIT_RUNTIME to 1 (see the FAQ)');
- __ATEXIT__.unshift({ func: func, arg: arg });
}function ___cxa_atexit(a0,a1
) {
return _atexit(a0,a1);
}
- var ___exception_infos={};
- var ___exception_caught= [];
+ function ExceptionInfo(excPtr) {
+ this.excPtr = excPtr;
+ this.ptr = excPtr - ExceptionInfoAttrs.SIZE;
- function ___exception_addRef(ptr) {
- if (!ptr) return;
- var info = ___exception_infos[ptr];
- info.refcount++;
- }
+ this.set_type = function(type) {
+ HEAP32[(((this.ptr)+(ExceptionInfoAttrs.TYPE_OFFSET))>>2)]=type;
+ };
- function ___exception_deAdjust(adjusted) {
- if (!adjusted || ___exception_infos[adjusted]) return adjusted;
- for (var key in ___exception_infos) {
- var ptr = +key; // the iteration key is a string, and if we throw this, it must be an integer as that is what we look for
- var adj = ___exception_infos[ptr].adjusted;
- var len = adj.length;
- for (var i = 0; i < len; i++) {
- if (adj[i] === adjusted) {
- return ptr;
- }
- }
+ this.get_type = function() {
+ return HEAP32[(((this.ptr)+(ExceptionInfoAttrs.TYPE_OFFSET))>>2)];
+ };
+
+ this.set_destructor = function(destructor) {
+ HEAP32[(((this.ptr)+(ExceptionInfoAttrs.DESTRUCTOR_OFFSET))>>2)]=destructor;
+ };
+
+ this.get_destructor = function() {
+ return HEAP32[(((this.ptr)+(ExceptionInfoAttrs.DESTRUCTOR_OFFSET))>>2)];
+ };
+
+ this.set_refcount = function(refcount) {
+ HEAP32[(((this.ptr)+(ExceptionInfoAttrs.REFCOUNT_OFFSET))>>2)]=refcount;
+ };
+
+ this.set_caught = function (caught) {
+ caught = caught ? 1 : 0;
+ HEAP8[(((this.ptr)+(ExceptionInfoAttrs.CAUGHT_OFFSET))>>0)]=caught;
+ };
+
+ this.get_caught = function () {
+ return HEAP8[(((this.ptr)+(ExceptionInfoAttrs.CAUGHT_OFFSET))>>0)] != 0;
+ };
+
+ this.set_rethrown = function (rethrown) {
+ rethrown = rethrown ? 1 : 0;
+ HEAP8[(((this.ptr)+(ExceptionInfoAttrs.RETHROWN_OFFSET))>>0)]=rethrown;
+ };
+
+ this.get_rethrown = function () {
+ return HEAP8[(((this.ptr)+(ExceptionInfoAttrs.RETHROWN_OFFSET))>>0)] != 0;
+ };
+
+ // Initialize native structure fields. Should be called once after allocated.
+ this.init = function(type, destructor) {
+ this.set_type(type);
+ this.set_destructor(destructor);
+ this.set_refcount(0);
+ this.set_caught(false);
+ this.set_rethrown(false);
}
- return adjusted;
+
+ this.add_ref = function() {
+ var value = HEAP32[(((this.ptr)+(ExceptionInfoAttrs.REFCOUNT_OFFSET))>>2)];
+ HEAP32[(((this.ptr)+(ExceptionInfoAttrs.REFCOUNT_OFFSET))>>2)]=value + 1;
+ };
+
+ // Returns true if last reference released.
+ this.release_ref = function() {
+ var prev = HEAP32[(((this.ptr)+(ExceptionInfoAttrs.REFCOUNT_OFFSET))>>2)];
+ HEAP32[(((this.ptr)+(ExceptionInfoAttrs.REFCOUNT_OFFSET))>>2)]=prev - 1;
+ assert(prev > 0);
+ return prev === 1;
+ };
+ }function CatchInfo(ptr) {
+
+ this.free = function() {
+ _free(this.ptr);
+ this.ptr = 0;
+ };
+
+ this.set_base_ptr = function(basePtr) {
+ HEAP32[((this.ptr)>>2)]=basePtr;
+ };
+
+ this.get_base_ptr = function() {
+ return HEAP32[((this.ptr)>>2)];
+ };
+
+ this.set_adjusted_ptr = function(adjustedPtr) {
+ var ptrSize = 4;
+ HEAP32[(((this.ptr)+(ptrSize))>>2)]=adjustedPtr;
+ };
+
+ this.get_adjusted_ptr = function() {
+ var ptrSize = 4;
+ return HEAP32[(((this.ptr)+(ptrSize))>>2)];
+ };
+
+ // Get pointer which is expected to be received by catch clause in C++ code. It may be adjusted
+ // when the pointer is casted to some of the exception object base classes (e.g. when virtual
+ // inheritance is used). When a pointer is thrown this method should return the thrown pointer
+ // itself.
+ this.get_exception_ptr = function() {
+ // Work around a fastcomp bug, this code is still included for some reason in a build without
+ // exceptions support.
+ var isPointer = ___cxa_is_pointer_type(
+ this.get_exception_info().get_type());
+ if (isPointer) {
+ return HEAP32[((this.get_base_ptr())>>2)];
+ }
+ var adjusted = this.get_adjusted_ptr();
+ if (adjusted !== 0) return adjusted;
+ return this.get_base_ptr();
+ };
+
+ this.get_exception_info = function() {
+ return new ExceptionInfo(this.get_base_ptr());
+ };
+
+ if (ptr === undefined) {
+ this.ptr = _malloc(8);
+ this.set_adjusted_ptr(0);
+ } else {
+ this.ptr = ptr;
+ }
+ }
+
+ var exceptionCaught= [];
+
+ function exception_addRef(info) {
+ info.add_ref();
}function ___cxa_begin_catch(ptr) {
- var info = ___exception_infos[ptr];
- if (info && !info.caught) {
- info.caught = true;
+ var catchInfo = new CatchInfo(ptr);
+ var info = catchInfo.get_exception_info();
+ if (!info.get_caught()) {
+ info.set_caught(true);
__ZSt18uncaught_exceptionv.uncaught_exceptions--;
}
- if (info) info.rethrown = false;
- ___exception_caught.push(ptr);
- ___exception_addRef(___exception_deAdjust(ptr));
- return ptr;
+ info.set_rethrown(false);
+ exceptionCaught.push(catchInfo);
+ exception_addRef(info);
+ return catchInfo.get_exception_ptr();
}
- var ___exception_last=0;
+ var exceptionLast=0;
function ___cxa_free_exception(ptr) {
try {
- return _free(ptr);
+ return _free(new ExceptionInfo(ptr).ptr);
} catch(e) {
err('exception during cxa_free_exception: ' + e);
}
- }function ___exception_decRef(ptr) {
- if (!ptr) return;
- var info = ___exception_infos[ptr];
- assert(info.refcount > 0);
- info.refcount--;
+ }function exception_decRef(info) {
// A rethrown exception can reach refcount 0; it must not be discarded
// Its next handler will clear the rethrown flag and addRef it, prior to
// final decRef and destruction here
- if (info.refcount === 0 && !info.rethrown) {
- if (info.destructor) {
+ if (info.release_ref() && !info.get_rethrown()) {
+ var destructor = info.get_destructor();
+ if (destructor) {
// In Wasm, destructors return 'this' as in ARM
- Module['dynCall_ii'](info.destructor, ptr);
+ wasmTable.get(destructor)(info.excPtr);
}
- delete ___exception_infos[ptr];
- ___cxa_free_exception(ptr);
+ ___cxa_free_exception(info.excPtr);
}
}function ___cxa_end_catch() {
// Clear state flag.
_setThrew(0);
+ assert(exceptionCaught.length > 0);
// Call destructor if one is registered then clear it.
- var ptr = ___exception_caught.pop();
- if (ptr) {
- ___exception_decRef(___exception_deAdjust(ptr));
- ___exception_last = 0; // XXX in decRef?
- }
+ var catchInfo = exceptionCaught.pop();
+
+ exception_decRef(catchInfo.get_exception_info());
+ catchInfo.free();
+ exceptionLast = 0; // XXX in decRef?
}
- function ___cxa_find_matching_catch_2() {
- var thrown = ___exception_last;
+
+ function ___resumeException(catchInfoPtr) {
+ var catchInfo = new CatchInfo(catchInfoPtr);
+ var ptr = catchInfo.get_base_ptr();
+ if (!exceptionLast) { exceptionLast = ptr; }
+ catchInfo.free();
+ throw ptr;
+ }
+
+ var exceptionThrowBuf=0;function ___cxa_find_matching_catch_2() {
+ var thrown = exceptionLast;
if (!thrown) {
// just pass through the null ptr
return ((setTempRet0(0),0)|0);
}
- var info = ___exception_infos[thrown];
- var throwntype = info.type;
- if (!throwntype) {
+ var info = new ExceptionInfo(thrown);
+ var thrownType = info.get_type();
+ var catchInfo = new CatchInfo();
+ catchInfo.set_base_ptr(thrown);
+ if (!thrownType) {
// just pass through the thrown ptr
- return ((setTempRet0(0),thrown)|0);
+ return ((setTempRet0(0),catchInfo.ptr)|0);
}
var typeArray = Array.prototype.slice.call(arguments);
- var pointer = ___cxa_is_pointer_type(throwntype);
// can_catch receives a **, add indirection
- var buffer = 27216;
- HEAP32[((buffer)>>2)]=thrown;
- thrown = buffer;
+ if (!exceptionThrowBuf) {
+ exceptionThrowBuf = _malloc(4);
+ }
+ HEAP32[((exceptionThrowBuf)>>2)]=thrown;
// The different catch blocks are denoted by different types.
// Due to inheritance, those types may not precisely match the
// type of the thrown object. Find one which matches, and
// return the type of the catch block which should be called.
for (var i = 0; i < typeArray.length; i++) {
- if (typeArray[i] && ___cxa_can_catch(typeArray[i], throwntype, thrown)) {
- thrown = HEAP32[((thrown)>>2)]; // undo indirection
- info.adjusted.push(thrown);
- return ((setTempRet0(typeArray[i]),thrown)|0);
+ var caughtType = typeArray[i];
+ if (caughtType === 0 || caughtType === thrownType) {
+ // Catch all clause matched or exactly the same type is caught
+ break;
+ }
+ if (___cxa_can_catch(caughtType, thrownType, exceptionThrowBuf)) {
+ var adjusted = HEAP32[((exceptionThrowBuf)>>2)];
+ if (thrown !== adjusted) {
+ catchInfo.set_adjusted_ptr(adjusted);
+ }
+ return ((setTempRet0(caughtType),catchInfo.ptr)|0);
}
}
- // Shouldn't happen unless we have bogus data in typeArray
- // or encounter a type for which emscripten doesn't have suitable
- // typeinfo defined. Best-efforts match just in case.
- thrown = HEAP32[((thrown)>>2)]; // undo indirection
- return ((setTempRet0(throwntype),thrown)|0);
+ return ((setTempRet0(thrownType),catchInfo.ptr)|0);
}
function ___cxa_find_matching_catch_3() {
- var thrown = ___exception_last;
+ var thrown = exceptionLast;
if (!thrown) {
// just pass through the null ptr
return ((setTempRet0(0),0)|0);
}
- var info = ___exception_infos[thrown];
- var throwntype = info.type;
- if (!throwntype) {
+ var info = new ExceptionInfo(thrown);
+ var thrownType = info.get_type();
+ var catchInfo = new CatchInfo();
+ catchInfo.set_base_ptr(thrown);
+ if (!thrownType) {
// just pass through the thrown ptr
- return ((setTempRet0(0),thrown)|0);
+ return ((setTempRet0(0),catchInfo.ptr)|0);
}
var typeArray = Array.prototype.slice.call(arguments);
- var pointer = ___cxa_is_pointer_type(throwntype);
// can_catch receives a **, add indirection
- var buffer = 27216;
- HEAP32[((buffer)>>2)]=thrown;
- thrown = buffer;
+ if (!exceptionThrowBuf) {
+ exceptionThrowBuf = _malloc(4);
+ }
+ HEAP32[((exceptionThrowBuf)>>2)]=thrown;
// The different catch blocks are denoted by different types.
// Due to inheritance, those types may not precisely match the
// type of the thrown object. Find one which matches, and
// return the type of the catch block which should be called.
for (var i = 0; i < typeArray.length; i++) {
- if (typeArray[i] && ___cxa_can_catch(typeArray[i], throwntype, thrown)) {
- thrown = HEAP32[((thrown)>>2)]; // undo indirection
- info.adjusted.push(thrown);
- return ((setTempRet0(typeArray[i]),thrown)|0);
+ var caughtType = typeArray[i];
+ if (caughtType === 0 || caughtType === thrownType) {
+ // Catch all clause matched or exactly the same type is caught
+ break;
+ }
+ if (___cxa_can_catch(caughtType, thrownType, exceptionThrowBuf)) {
+ var adjusted = HEAP32[((exceptionThrowBuf)>>2)];
+ if (thrown !== adjusted) {
+ catchInfo.set_adjusted_ptr(adjusted);
+ }
+ return ((setTempRet0(caughtType),catchInfo.ptr)|0);
}
}
- // Shouldn't happen unless we have bogus data in typeArray
- // or encounter a type for which emscripten doesn't have suitable
- // typeinfo defined. Best-efforts match just in case.
- thrown = HEAP32[((thrown)>>2)]; // undo indirection
- return ((setTempRet0(throwntype),thrown)|0);
+ return ((setTempRet0(thrownType),catchInfo.ptr)|0);
}
function ___cxa_rethrow() {
- var ptr = ___exception_caught.pop();
- ptr = ___exception_deAdjust(ptr);
- if (!___exception_infos[ptr].rethrown) {
+ var catchInfo = exceptionCaught.pop();
+ var info = catchInfo.get_exception_info();
+ var ptr = catchInfo.get_base_ptr();
+ if (!info.get_rethrown()) {
// Only pop if the corresponding push was through rethrow_primary_exception
- ___exception_caught.push(ptr);
- ___exception_infos[ptr].rethrown = true;
+ exceptionCaught.push(catchInfo);
+ info.set_rethrown(true);
+ } else {
+ catchInfo.free();
}
- ___exception_last = ptr;
+ exceptionLast = ptr;
throw ptr;
}
function ___cxa_throw(ptr, type, destructor) {
- ___exception_infos[ptr] = {
- ptr: ptr,
- adjusted: [ptr],
- type: type,
- destructor: destructor,
- refcount: 0,
- caught: false,
- rethrown: false
- };
- ___exception_last = ptr;
+ var info = new ExceptionInfo(ptr);
+ // Initialize ExceptionInfo content after it was allocated in __cxa_allocate_exception.
+ info.init(type, destructor);
+ exceptionLast = ptr;
if (!("uncaught_exception" in __ZSt18uncaught_exceptionv)) {
__ZSt18uncaught_exceptionv.uncaught_exceptions = 1;
} else {
@@ -2189,10 +2189,6 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
return __ZSt18uncaught_exceptionv.uncaught_exceptions;
}
- function ___handle_stack_overflow() {
- abort('stack overflow')
- }
-
function setErrNo(value) {
HEAP32[((___errno_location())>>2)]=value;
@@ -2202,10 +2198,6 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
return -1;
}
- function ___resumeException(ptr) {
- if (!___exception_last) { ___exception_last = ptr; }
- throw ptr;
- }
@@ -2265,6 +2257,8 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
},basename:function(path) {
// EMSCRIPTEN return '/'' for '/', not an empty string
if (path === '/') return '/';
+ path = PATH.normalize(path);
+ path = path.replace(/\/$/, "");
var lastSlash = path.lastIndexOf('/');
if (lastSlash === -1) return path;
return path.substr(lastSlash+1);
@@ -2723,8 +2717,10 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
// Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
MEMFS.expandFileStorage(node, position+length);
- if (node.contents.subarray && buffer.subarray) node.contents.set(buffer.subarray(offset, offset + length), position); // Use typed array write if available.
- else {
+ if (node.contents.subarray && buffer.subarray) {
+ // Use typed array write which is available.
+ node.contents.set(buffer.subarray(offset, offset + length), position);
+ } else {
for (var i = 0; i < length; i++) {
node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not.
}
@@ -2747,9 +2743,10 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
},allocate:function(stream, offset, length) {
MEMFS.expandFileStorage(stream.node, offset + length);
stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length);
- },mmap:function(stream, buffer, offset, length, position, prot, flags) {
- // The data buffer should be a typed array view
- assert(!(buffer instanceof ArrayBuffer));
+ },mmap:function(stream, address, length, position, prot, flags) {
+ // We don't currently support location hints for the address of the mapping
+ assert(address === 0);
+
if (!FS.isFile(stream.node.mode)) {
throw new FS.ErrnoError(43);
}
@@ -2757,8 +2754,7 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
var allocated;
var contents = stream.node.contents;
// Only make a new copy when MAP_PRIVATE is specified.
- if ( !(flags & 2) &&
- contents.buffer === buffer.buffer ) {
+ if (!(flags & 2) && contents.buffer === buffer) {
// We can't emulate MAP_SHARED when the file is not backed by the buffer
// we're mapping to (e.g. the HEAP buffer).
allocated = false;
@@ -2773,14 +2769,11 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
}
}
allocated = true;
- // malloc() can lead to growing the heap. If targeting the heap, we need to
- // re-acquire the heap buffer object in case growth had occurred.
- var fromHeap = (buffer.buffer == HEAP8.buffer);
- ptr = _malloc(length);
+ ptr = FS.mmapAlloc(length);
if (!ptr) {
throw new FS.ErrnoError(48);
}
- (fromHeap ? HEAP8 : buffer).set(contents, ptr);
+ HEAP8.set(contents, ptr);
}
return { ptr: ptr, allocated: allocated };
},msync:function(stream, buffer, offset, length, mmapFlags) {
@@ -3290,14 +3283,13 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
var new_name = PATH.basename(new_path);
// parents must exist
var lookup, old_dir, new_dir;
- try {
- lookup = FS.lookupPath(old_path, { parent: true });
- old_dir = lookup.node;
- lookup = FS.lookupPath(new_path, { parent: true });
- new_dir = lookup.node;
- } catch (e) {
- throw new FS.ErrnoError(10);
- }
+
+ // let the errors from non existant directories percolate up
+ lookup = FS.lookupPath(old_path, { parent: true });
+ old_dir = lookup.node;
+ lookup = FS.lookupPath(new_path, { parent: true });
+ new_dir = lookup.node;
+
if (!old_dir || !new_dir) throw new FS.ErrnoError(44);
// need to be part of the same mount
if (old_dir.mount !== new_dir.mount) {
@@ -3766,7 +3758,7 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
throw new FS.ErrnoError(138);
}
stream.stream_ops.allocate(stream, offset, length);
- },mmap:function(stream, buffer, offset, length, position, prot, flags) {
+ },mmap:function(stream, address, length, position, prot, flags) {
// User requests writing to file (prot & PROT_WRITE != 0).
// Checking if we have permissions to write to the file unless
// MAP_PRIVATE flag is set. According to POSIX spec it is possible
@@ -3784,7 +3776,7 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
if (!stream.stream_ops.mmap) {
throw new FS.ErrnoError(43);
}
- return stream.stream_ops.mmap(stream, buffer, offset, length, position, prot, flags);
+ return stream.stream_ops.mmap(stream, address, length, position, prot, flags);
},msync:function(stream, buffer, offset, length, mmapFlags) {
if (!stream || !stream.stream_ops.msync) {
return 0;
@@ -4453,6 +4445,11 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
transaction.onerror = onerror;
};
openRequest.onerror = onerror;
+ },mmapAlloc:function(size) {
+ var alignedSize = alignMemory(size, 16384);
+ var ptr = _malloc(alignedSize);
+ while (size < alignedSize) HEAP8[ptr + size++] = 0;
+ return ptr;
}};var SYSCALLS={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(dirfd, path) {
if (path[0] !== '/') {
// relative path
@@ -5061,20 +5058,13 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
var str;
if (stdStringIsUTF8) {
- //ensure null termination at one-past-end byte if not present yet
- var endChar = HEAPU8[value + 4 + length];
- var endCharSwap = 0;
- if (endChar != 0) {
- endCharSwap = endChar;
- HEAPU8[value + 4 + length] = 0;
- }
-
var decodeStartPtr = value + 4;
// Looping here to support possible embedded '0' bytes
for (var i = 0; i <= length; ++i) {
var currentBytePtr = value + 4 + i;
- if (HEAPU8[currentBytePtr] == 0) {
- var stringSegment = UTF8ToString(decodeStartPtr);
+ if (i == length || HEAPU8[currentBytePtr] == 0) {
+ var maxRead = currentBytePtr - decodeStartPtr;
+ var stringSegment = UTF8ToString(decodeStartPtr, maxRead);
if (str === undefined) {
str = stringSegment;
} else {
@@ -5084,10 +5074,6 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
decodeStartPtr = currentBytePtr + 1;
}
}
-
- if (endCharSwap != 0) {
- HEAPU8[value + 4 + length] = endCharSwap;
- }
} else {
var a = new Array(length);
for (var i = 0; i < length; ++i) {
@@ -5174,20 +5160,14 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
var length = HEAPU32[value >> 2];
var HEAP = getHeap();
var str;
- // Ensure null termination at one-past-end byte if not present yet
- var endChar = HEAP[(value + 4 + length * charSize) >> shift];
- var endCharSwap = 0;
- if (endChar != 0) {
- endCharSwap = endChar;
- HEAP[(value + 4 + length * charSize) >> shift] = 0;
- }
var decodeStartPtr = value + 4;
// Looping here to support possible embedded '0' bytes
for (var i = 0; i <= length; ++i) {
var currentBytePtr = value + 4 + i * charSize;
- if (HEAP[currentBytePtr >> shift] == 0) {
- var stringSegment = decodeString(decodeStartPtr);
+ if (i == length || HEAP[currentBytePtr >> shift] == 0) {
+ var maxReadBytes = currentBytePtr - decodeStartPtr;
+ var stringSegment = decodeString(decodeStartPtr, maxReadBytes);
if (str === undefined) {
str = stringSegment;
} else {
@@ -5198,10 +5178,6 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
}
}
- if (endCharSwap != 0) {
- HEAP[(value + 4 + length * charSize) >> shift] = endCharSwap;
- }
-
_free(value);
return str;
@@ -5249,8 +5225,13 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
abort();
}
+ function _emscripten_asm_const_int(code, sigPtr, argbuf) {
+ var args = readAsmConstArgs(sigPtr, argbuf);
+ return ASM_CONSTS[code].apply(null, args);
+ }
+
function _emscripten_get_sbrk_ptr() {
- return 27056;
+ return 27536;
}
function _emscripten_memcpy_big(dest, src, num) {
@@ -5273,20 +5254,21 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
var ENV={};
- function __getExecutableName() {
+ function getExecutableName() {
return thisProgram || './this.program';
}function getEnvStrings() {
if (!getEnvStrings.strings) {
// Default values.
+ // Browser language detection #8751
+ var lang = ((typeof navigator === 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8';
var env = {
'USER': 'web_user',
'LOGNAME': 'web_user',
'PATH': '/',
'PWD': '/',
'HOME': '/home/web_user',
- // Browser language detection #8751
- 'LANG': ((typeof navigator === 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8',
- '_': __getExecutableName()
+ 'LANG': lang,
+ '_': getExecutableName()
};
// Apply the user-provided values, if any.
for (var x in ENV) {
@@ -5332,30 +5314,6 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
}
}
- function _fd_seek(fd, offset_low, offset_high, whence, newOffset) {try {
-
-
- var stream = SYSCALLS.getStreamFromFD(fd);
- var HIGH_OFFSET = 0x100000000; // 2^32
- // use an unsigned operator on low and shift high by 32-bits
- var offset = offset_high * HIGH_OFFSET + (offset_low >>> 0);
-
- var DOUBLE_LIMIT = 0x20000000000000; // 2^53
- // we also check for equality since DOUBLE_LIMIT + 1 == DOUBLE_LIMIT
- if (offset <= -DOUBLE_LIMIT || offset >= DOUBLE_LIMIT) {
- return -61;
- }
-
- FS.llseek(stream, offset, whence);
- (tempI64 = [stream.position>>>0,(tempDouble=stream.position,(+(Math_abs(tempDouble))) >= 1.0 ? (tempDouble > 0.0 ? ((Math_min((+(Math_floor((tempDouble)/4294967296.0))), 4294967295.0))|0)>>>0 : (~~((+(Math_ceil((tempDouble - +(((~~(tempDouble)))>>>0))/4294967296.0)))))>>>0) : 0)],HEAP32[((newOffset)>>2)]=tempI64[0],HEAP32[(((newOffset)+(4))>>2)]=tempI64[1]);
- if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state
- return 0;
- } catch (e) {
- if (typeof FS === 'undefined' || !(e instanceof FS.ErrnoError)) abort(e);
- return e.errno;
- }
- }
-
function _fd_write(fd, iov, iovcnt, pnum) {try {
var stream = SYSCALLS.getStreamFromFD(fd);
@@ -5742,28 +5700,27 @@ function _emscripten_asm_const_iii(code, sigPtr, argbuf) {
return _strftime(s, maxsize, format, tm); // no locale support yet
}
- function readAsmConstArgs(sigPtr, buf) {
- if (!readAsmConstArgs.array) {
- readAsmConstArgs.array = [];
- }
- var args = readAsmConstArgs.array;
- args.length = 0;
+
+ var readAsmConstArgsArray=[];function readAsmConstArgs(sigPtr, buf) {
+ // Nobody should have mutated _readAsmConstArgsArray underneath us to be something else than an array.
+ assert(Array.isArray(readAsmConstArgsArray));
+ // The input buffer is allocated on the stack, so it must be stack-aligned.
+ assert(buf % 16 == 0);
+ readAsmConstArgsArray.length = 0;
var ch;
+ // Most arguments are i32s, so shift the buffer pointer so it is a plain
+ // index into HEAP32.
+ buf >>= 2;
while (ch = HEAPU8[sigPtr++]) {
- if (ch === 100/*'d'*/ || ch === 102/*'f'*/) {
- buf = (buf + 7) & ~7;
- args.push(HEAPF64[(buf >> 3)]);
- buf += 8;
- } else
- if (ch === 105 /*'i'*/)
- {
- buf = (buf + 3) & ~3;
- args.push(HEAP32[(buf >> 2)]);
- buf += 4;
- }
- else abort("unexpected char in asm const signature " + ch);
+ assert(ch === 100/*'d'*/ || ch === 102/*'f'*/ || ch === 105 /*'i'*/);
+ // A double takes two 32-bit slots, and must also be aligned - the backend
+ // will emit padding to avoid that.
+ var double = ch < 105;
+ if (double && (buf & 1)) buf++;
+ readAsmConstArgsArray.push(double ? HEAPF64[buf++ >> 1] : HEAP32[buf]);
+ ++buf;
}
- return args;
+ return readAsmConstArgsArray;
}
var FSNode = /** @constructor */ function(parent, name, mode, rdev) {
if (!parent) {
@@ -5817,11 +5774,7 @@ InternalError = Module['InternalError'] = extendError(Error, 'InternalError');;
init_emval();;
var ASSERTIONS = true;
-/**
- * @license
- * Copyright 2017 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
/** @type {function(string, boolean=, number=)} */
function intArrayFromString(stringy, dontAddNull, length) {
@@ -5848,379 +5801,85 @@ function intArrayToString(array) {
}
-var asmGlobalArg = {};
-var asmLibraryArg = { "__cxa_allocate_exception": ___cxa_allocate_exception, "__cxa_atexit": ___cxa_atexit, "__cxa_begin_catch": ___cxa_begin_catch, "__cxa_end_catch": ___cxa_end_catch, "__cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, "__cxa_find_matching_catch_3": ___cxa_find_matching_catch_3, "__cxa_free_exception": ___cxa_free_exception, "__cxa_rethrow": ___cxa_rethrow, "__cxa_throw": ___cxa_throw, "__cxa_uncaught_exceptions": ___cxa_uncaught_exceptions, "__handle_stack_overflow": ___handle_stack_overflow, "__map_file": ___map_file, "__resumeException": ___resumeException, "__sys_munmap": ___sys_munmap, "__sys_open": ___sys_open, "__sys_read": ___sys_read, "_embind_register_bool": __embind_register_bool, "_embind_register_emval": __embind_register_emval, "_embind_register_float": __embind_register_float, "_embind_register_integer": __embind_register_integer, "_embind_register_memory_view": __embind_register_memory_view, "_embind_register_std_string": __embind_register_std_string, "_embind_register_std_wstring": __embind_register_std_wstring, "_embind_register_void": __embind_register_void, "abort": _abort, "emscripten_asm_const_iii": _emscripten_asm_const_iii, "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "fd_close": _fd_close, "fd_seek": _fd_seek, "fd_write": _fd_write, "getTempRet0": _getTempRet0, "invoke_diii": invoke_diii, "invoke_fiii": invoke_fiii, "invoke_i": invoke_i, "invoke_ii": invoke_ii, "invoke_iii": invoke_iii, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_iiiiii": invoke_iiiiii, "invoke_iiiiiii": invoke_iiiiiii, "invoke_iiiiiiii": invoke_iiiiiiii, "invoke_iiiiiiiiiii": invoke_iiiiiiiiiii, "invoke_iiiiiiiiiiii": invoke_iiiiiiiiiiii, "invoke_iiiiiiiiiiiii": invoke_iiiiiiiiiiiii, "invoke_jiiii": invoke_jiiii, "invoke_v": invoke_v, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viii": invoke_viii, "invoke_viiii": invoke_viiii, "invoke_viiiii": invoke_viiiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiiii": invoke_viiiiiiiiii, "invoke_viiiiiiiiiiiiiii": invoke_viiiiiiiiiiiiiii, "llvm_eh_typeid_for": _llvm_eh_typeid_for, "memory": wasmMemory, "setTempRet0": _setTempRet0, "strftime_l": _strftime_l, "table": wasmTable };
+var asmLibraryArg = { "__cxa_allocate_exception": ___cxa_allocate_exception, "__cxa_atexit": ___cxa_atexit, "__cxa_begin_catch": ___cxa_begin_catch, "__cxa_end_catch": ___cxa_end_catch, "__cxa_find_matching_catch_2": ___cxa_find_matching_catch_2, "__cxa_find_matching_catch_3": ___cxa_find_matching_catch_3, "__cxa_free_exception": ___cxa_free_exception, "__cxa_rethrow": ___cxa_rethrow, "__cxa_throw": ___cxa_throw, "__cxa_uncaught_exceptions": ___cxa_uncaught_exceptions, "__map_file": ___map_file, "__resumeException": ___resumeException, "__sys_munmap": ___sys_munmap, "__sys_open": ___sys_open, "__sys_read": ___sys_read, "_embind_register_bool": __embind_register_bool, "_embind_register_emval": __embind_register_emval, "_embind_register_float": __embind_register_float, "_embind_register_integer": __embind_register_integer, "_embind_register_memory_view": __embind_register_memory_view, "_embind_register_std_string": __embind_register_std_string, "_embind_register_std_wstring": __embind_register_std_wstring, "_embind_register_void": __embind_register_void, "abort": _abort, "emscripten_asm_const_int": _emscripten_asm_const_int, "emscripten_get_sbrk_ptr": _emscripten_get_sbrk_ptr, "emscripten_memcpy_big": _emscripten_memcpy_big, "emscripten_resize_heap": _emscripten_resize_heap, "environ_get": _environ_get, "environ_sizes_get": _environ_sizes_get, "fd_close": _fd_close, "fd_write": _fd_write, "getTempRet0": _getTempRet0, "invoke_diii": invoke_diii, "invoke_fiii": invoke_fiii, "invoke_i": invoke_i, "invoke_ii": invoke_ii, "invoke_iii": invoke_iii, "invoke_iiii": invoke_iiii, "invoke_iiiii": invoke_iiiii, "invoke_iiiiii": invoke_iiiiii, "invoke_iiiiiii": invoke_iiiiiii, "invoke_iiiiiiii": invoke_iiiiiiii, "invoke_iiiiiiiiiii": invoke_iiiiiiiiiii, "invoke_iiiiiiiiiiii": invoke_iiiiiiiiiiii, "invoke_iiiiiiiiiiiii": invoke_iiiiiiiiiiiii, "invoke_jiiii": invoke_jiiii, "invoke_v": invoke_v, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_viii": invoke_viii, "invoke_viiii": invoke_viiii, "invoke_viiiii": invoke_viiiii, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiiii": invoke_viiiiiiiiii, "invoke_viiiiiiiiiiiiiii": invoke_viiiiiiiiiiiiiii, "llvm_eh_typeid_for": _llvm_eh_typeid_for, "memory": wasmMemory, "setTempRet0": _setTempRet0, "strftime_l": _strftime_l, "table": wasmTable };
var asm = createWasm();
-Module["asm"] = asm;
-/** @type {function(...*):?} */
-var ___wasm_call_ctors = Module["___wasm_call_ctors"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__wasm_call_ctors"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _free = Module["_free"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["free"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _itest = Module["_itest"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["itest"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _str_pass_size = Module["_str_pass_size"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["str_pass_size"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _fire_event_bus = Module["_fire_event_bus"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["fire_event_bus"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _main = Module["_main"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["main"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var ___errno_location = Module["___errno_location"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__errno_location"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _fflush = Module["_fflush"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["fflush"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _setThrew = Module["_setThrew"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["setThrew"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var __ZSt18uncaught_exceptionv = Module["__ZSt18uncaught_exceptionv"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["_ZSt18uncaught_exceptionv"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var _malloc = Module["_malloc"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["malloc"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var ___cxa_can_catch = Module["___cxa_can_catch"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__cxa_can_catch"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__cxa_is_pointer_type"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var ___getTypeName = Module["___getTypeName"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__getTypeName"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var ___embind_register_native_and_builtin_types = Module["___embind_register_native_and_builtin_types"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__embind_register_native_and_builtin_types"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_v = Module["dynCall_v"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_v"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_vi = Module["dynCall_vi"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_vi"].apply(null, arguments)
-};
-
/** @type {function(...*):?} */
-var dynCall_vii = Module["dynCall_vii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_vii"].apply(null, arguments)
-};
+var ___wasm_call_ctors = Module["___wasm_call_ctors"] = createExportWrapper("__wasm_call_ctors");
/** @type {function(...*):?} */
-var dynCall_viii = Module["dynCall_viii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viii"].apply(null, arguments)
-};
+var _free = Module["_free"] = createExportWrapper("free");
/** @type {function(...*):?} */
-var dynCall_viiii = Module["dynCall_viiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiii"].apply(null, arguments)
-};
+var _str_pass_size = Module["_str_pass_size"] = createExportWrapper("str_pass_size");
/** @type {function(...*):?} */
-var dynCall_viiiii = Module["dynCall_viiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiiii"].apply(null, arguments)
-};
+var _fire_event_bus = Module["_fire_event_bus"] = createExportWrapper("fire_event_bus");
/** @type {function(...*):?} */
-var dynCall_viiiiiii = Module["dynCall_viiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiiiiii"].apply(null, arguments)
-};
+var _main = Module["_main"] = createExportWrapper("main");
/** @type {function(...*):?} */
-var dynCall_viiiiiiiiii = Module["dynCall_viiiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiiiiiiiii"].apply(null, arguments)
-};
+var ___getTypeName = Module["___getTypeName"] = createExportWrapper("__getTypeName");
/** @type {function(...*):?} */
-var dynCall_viiiiiiiiiiiiiii = Module["dynCall_viiiiiiiiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiiiiiiiiiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_i = Module["dynCall_i"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_i"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_ii = Module["dynCall_ii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_ii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iii = Module["dynCall_iii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiii = Module["dynCall_iiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiii"].apply(null, arguments)
-};
+var ___embind_register_native_and_builtin_types = Module["___embind_register_native_and_builtin_types"] = createExportWrapper("__embind_register_native_and_builtin_types");
/** @type {function(...*):?} */
-var dynCall_iiiii = Module["dynCall_iiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiii = Module["dynCall_iiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiiii = Module["dynCall_iiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiiiii = Module["dynCall_iiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiiiiiiii = Module["dynCall_iiiiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiiiiiiiii = Module["dynCall_iiiiiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiiiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_iiiiiiiiiiiii = Module["dynCall_iiiiiiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiiiiiiiii"].apply(null, arguments)
-};
-
-/** @type {function(...*):?} */
-var dynCall_jiiii = Module["dynCall_jiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_jiiii"].apply(null, arguments)
-};
+var ___errno_location = Module["___errno_location"] = createExportWrapper("__errno_location");
/** @type {function(...*):?} */
-var dynCall_fiii = Module["dynCall_fiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_fiii"].apply(null, arguments)
-};
+var _malloc = Module["_malloc"] = createExportWrapper("malloc");
/** @type {function(...*):?} */
-var dynCall_diii = Module["dynCall_diii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_diii"].apply(null, arguments)
-};
+var _fflush = Module["_fflush"] = createExportWrapper("fflush");
/** @type {function(...*):?} */
-var ___set_stack_limit = Module["___set_stack_limit"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__set_stack_limit"].apply(null, arguments)
-};
+var _setThrew = Module["_setThrew"] = createExportWrapper("setThrew");
/** @type {function(...*):?} */
-var stackSave = Module["stackSave"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["stackSave"].apply(null, arguments)
-};
+var stackSave = Module["stackSave"] = createExportWrapper("stackSave");
/** @type {function(...*):?} */
-var stackAlloc = Module["stackAlloc"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["stackAlloc"].apply(null, arguments)
-};
+var stackRestore = Module["stackRestore"] = createExportWrapper("stackRestore");
/** @type {function(...*):?} */
-var stackRestore = Module["stackRestore"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["stackRestore"].apply(null, arguments)
-};
+var stackAlloc = Module["stackAlloc"] = createExportWrapper("stackAlloc");
/** @type {function(...*):?} */
-var __growWasmMemory = Module["__growWasmMemory"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["__growWasmMemory"].apply(null, arguments)
-};
+var __ZSt18uncaught_exceptionv = Module["__ZSt18uncaught_exceptionv"] = createExportWrapper("_ZSt18uncaught_exceptionv");
/** @type {function(...*):?} */
-var dynCall_viijii = Module["dynCall_viijii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viijii"].apply(null, arguments)
-};
+var ___cxa_can_catch = Module["___cxa_can_catch"] = createExportWrapper("__cxa_can_catch");
/** @type {function(...*):?} */
-var dynCall_iidiiii = Module["dynCall_iidiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iidiiii"].apply(null, arguments)
-};
+var ___cxa_is_pointer_type = Module["___cxa_is_pointer_type"] = createExportWrapper("__cxa_is_pointer_type");
/** @type {function(...*):?} */
-var dynCall_iiiiiiiii = Module["dynCall_iiiiiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiiiii"].apply(null, arguments)
-};
+var dynCall_jiiii = Module["dynCall_jiiii"] = createExportWrapper("dynCall_jiiii");
/** @type {function(...*):?} */
-var dynCall_iiiiij = Module["dynCall_iiiiij"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiij"].apply(null, arguments)
-};
+var dynCall_viijii = Module["dynCall_viijii"] = createExportWrapper("dynCall_viijii");
/** @type {function(...*):?} */
-var dynCall_iiiiid = Module["dynCall_iiiiid"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiid"].apply(null, arguments)
-};
+var dynCall_iiiiij = Module["dynCall_iiiiij"] = createExportWrapper("dynCall_iiiiij");
/** @type {function(...*):?} */
-var dynCall_iiiiijj = Module["dynCall_iiiiijj"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiijj"].apply(null, arguments)
-};
+var dynCall_iiiiijj = Module["dynCall_iiiiijj"] = createExportWrapper("dynCall_iiiiijj");
/** @type {function(...*):?} */
-var dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_iiiiiijj"].apply(null, arguments)
-};
+var dynCall_iiiiiijj = Module["dynCall_iiiiiijj"] = createExportWrapper("dynCall_iiiiiijj");
/** @type {function(...*):?} */
-var dynCall_viiiiii = Module["dynCall_viiiiii"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_viiiiii"].apply(null, arguments)
-};
+var dynCall_jiji = Module["dynCall_jiji"] = createExportWrapper("dynCall_jiji");
/** @type {function(...*):?} */
-var dynCall_jiji = Module["dynCall_jiji"] = function() {
- assert(runtimeInitialized, 'you need to wait for the runtime to be ready (e.g. wait for main() to be called)');
- assert(!runtimeExited, 'the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)');
- return Module["asm"]["dynCall_jiji"].apply(null, arguments)
-};
+var __growWasmMemory = Module["__growWasmMemory"] = createExportWrapper("__growWasmMemory");
-function invoke_vii(index,a1,a2) {
+function invoke_iii(index,a1,a2) {
var sp = stackSave();
try {
- dynCall_vii(index,a1,a2);
+ return wasmTable.get(index)(a1,a2);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6228,10 +5887,10 @@ function invoke_vii(index,a1,a2) {
}
}
-function invoke_iiii(index,a1,a2,a3) {
+function invoke_vii(index,a1,a2) {
var sp = stackSave();
try {
- return dynCall_iiii(index,a1,a2,a3);
+ wasmTable.get(index)(a1,a2);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6239,10 +5898,10 @@ function invoke_iiii(index,a1,a2,a3) {
}
}
-function invoke_iii(index,a1,a2) {
+function invoke_iiii(index,a1,a2,a3) {
var sp = stackSave();
try {
- return dynCall_iii(index,a1,a2);
+ return wasmTable.get(index)(a1,a2,a3);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6253,7 +5912,7 @@ function invoke_iii(index,a1,a2) {
function invoke_ii(index,a1) {
var sp = stackSave();
try {
- return dynCall_ii(index,a1);
+ return wasmTable.get(index)(a1);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6264,7 +5923,7 @@ function invoke_ii(index,a1) {
function invoke_viiii(index,a1,a2,a3,a4) {
var sp = stackSave();
try {
- dynCall_viiii(index,a1,a2,a3,a4);
+ wasmTable.get(index)(a1,a2,a3,a4);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6272,10 +5931,10 @@ function invoke_viiii(index,a1,a2,a3,a4) {
}
}
-function invoke_v(index) {
+function invoke_viii(index,a1,a2,a3) {
var sp = stackSave();
try {
- dynCall_v(index);
+ wasmTable.get(index)(a1,a2,a3);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6283,10 +5942,10 @@ function invoke_v(index) {
}
}
-function invoke_viii(index,a1,a2,a3) {
+function invoke_vi(index,a1) {
var sp = stackSave();
try {
- dynCall_viii(index,a1,a2,a3);
+ wasmTable.get(index)(a1);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6294,10 +5953,10 @@ function invoke_viii(index,a1,a2,a3) {
}
}
-function invoke_vi(index,a1) {
+function invoke_v(index) {
var sp = stackSave();
try {
- dynCall_vi(index,a1);
+ wasmTable.get(index)();
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6305,10 +5964,10 @@ function invoke_vi(index,a1) {
}
}
-function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
+function invoke_iiiiii(index,a1,a2,a3,a4,a5) {
var sp = stackSave();
try {
- return dynCall_iiiiiii(index,a1,a2,a3,a4,a5,a6);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6319,7 +5978,7 @@ function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
function invoke_viiiii(index,a1,a2,a3,a4,a5) {
var sp = stackSave();
try {
- dynCall_viiiii(index,a1,a2,a3,a4,a5);
+ wasmTable.get(index)(a1,a2,a3,a4,a5);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6327,10 +5986,10 @@ function invoke_viiiii(index,a1,a2,a3,a4,a5) {
}
}
-function invoke_iiiiii(index,a1,a2,a3,a4,a5) {
+function invoke_iiiiiii(index,a1,a2,a3,a4,a5,a6) {
var sp = stackSave();
try {
- return dynCall_iiiiii(index,a1,a2,a3,a4,a5);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5,a6);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6341,7 +6000,7 @@ function invoke_iiiiii(index,a1,a2,a3,a4,a5) {
function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
var sp = stackSave();
try {
- return dynCall_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6352,7 +6011,7 @@ function invoke_iiiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
function invoke_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
var sp = stackSave();
try {
- return dynCall_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6363,7 +6022,7 @@ function invoke_iiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
function invoke_iiiii(index,a1,a2,a3,a4) {
var sp = stackSave();
try {
- return dynCall_iiiii(index,a1,a2,a3,a4);
+ return wasmTable.get(index)(a1,a2,a3,a4);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6374,7 +6033,7 @@ function invoke_iiiii(index,a1,a2,a3,a4) {
function invoke_iiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) {
var sp = stackSave();
try {
- return dynCall_iiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6385,7 +6044,7 @@ function invoke_iiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12) {
function invoke_fiii(index,a1,a2,a3) {
var sp = stackSave();
try {
- return dynCall_fiii(index,a1,a2,a3);
+ return wasmTable.get(index)(a1,a2,a3);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6396,7 +6055,7 @@ function invoke_fiii(index,a1,a2,a3) {
function invoke_diii(index,a1,a2,a3) {
var sp = stackSave();
try {
- return dynCall_diii(index,a1,a2,a3);
+ return wasmTable.get(index)(a1,a2,a3);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6407,7 +6066,7 @@ function invoke_diii(index,a1,a2,a3) {
function invoke_i(index) {
var sp = stackSave();
try {
- return dynCall_i(index);
+ return wasmTable.get(index)();
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6418,7 +6077,7 @@ function invoke_i(index) {
function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
var sp = stackSave();
try {
- dynCall_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7);
+ wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6429,7 +6088,7 @@ function invoke_viiiiiii(index,a1,a2,a3,a4,a5,a6,a7) {
function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
var sp = stackSave();
try {
- return dynCall_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
+ return wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6440,7 +6099,7 @@ function invoke_iiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11) {
function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
var sp = stackSave();
try {
- dynCall_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
+ wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6451,7 +6110,7 @@ function invoke_viiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) {
function invoke_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15) {
var sp = stackSave();
try {
- dynCall_viiiiiiiiiiiiiii(index,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15);
+ wasmTable.get(index)(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15);
} catch(e) {
stackRestore(sp);
if (e !== e+0 && e !== 'longjmp') throw e;
@@ -6471,15 +6130,9 @@ function invoke_jiiii(index,a1,a2,a3,a4) {
}
-/**
- * @license
- * Copyright 2010 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
-// === Auto-generated postamble setup entry stuff ===
-Module['asm'] = asm;
+// === Auto-generated postamble setup entry stuff ===
if (!Object.getOwnPropertyDescriptor(Module, "intArrayFromString")) Module["intArrayFromString"] = function() { abort("'intArrayFromString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "intArrayToString")) Module["intArrayToString"] = function() { abort("'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
@@ -6537,7 +6190,6 @@ if (!Object.getOwnPropertyDescriptor(Module, "stringToNewUTF8")) Module["stringT
if (!Object.getOwnPropertyDescriptor(Module, "abortOnCannotGrowMemory")) Module["abortOnCannotGrowMemory"] = function() { abort("'abortOnCannotGrowMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "emscripten_realloc_buffer")) Module["emscripten_realloc_buffer"] = function() { abort("'emscripten_realloc_buffer' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "ENV")) Module["ENV"] = function() { abort("'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
-if (!Object.getOwnPropertyDescriptor(Module, "setjmpId")) Module["setjmpId"] = function() { abort("'setjmpId' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_CODES")) Module["ERRNO_CODES"] = function() { abort("'ERRNO_CODES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "ERRNO_MESSAGES")) Module["ERRNO_MESSAGES"] = function() { abort("'ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "setErrNo")) Module["setErrNo"] = function() { abort("'setErrNo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
@@ -6545,11 +6197,25 @@ if (!Object.getOwnPropertyDescriptor(Module, "DNS")) Module["DNS"] = function()
if (!Object.getOwnPropertyDescriptor(Module, "GAI_ERRNO_MESSAGES")) Module["GAI_ERRNO_MESSAGES"] = function() { abort("'GAI_ERRNO_MESSAGES' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "Protocols")) Module["Protocols"] = function() { abort("'Protocols' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "Sockets")) Module["Sockets"] = function() { abort("'Sockets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "traverseStack")) Module["traverseStack"] = function() { abort("'traverseStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "UNWIND_CACHE")) Module["UNWIND_CACHE"] = function() { abort("'UNWIND_CACHE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "withBuiltinMalloc")) Module["withBuiltinMalloc"] = function() { abort("'withBuiltinMalloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgsArray")) Module["readAsmConstArgsArray"] = function() { abort("'readAsmConstArgsArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "readAsmConstArgs")) Module["readAsmConstArgs"] = function() { abort("'readAsmConstArgs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "mainThreadEM_ASM")) Module["mainThreadEM_ASM"] = function() { abort("'mainThreadEM_ASM' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "jstoi_q")) Module["jstoi_q"] = function() { abort("'jstoi_q' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "jstoi_s")) Module["jstoi_s"] = function() { abort("'jstoi_s' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "getExecutableName")) Module["getExecutableName"] = function() { abort("'getExecutableName' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "listenOnce")) Module["listenOnce"] = function() { abort("'listenOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "autoResumeAudioContext")) Module["autoResumeAudioContext"] = function() { abort("'autoResumeAudioContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "dynCallLegacy")) Module["dynCallLegacy"] = function() { abort("'dynCallLegacy' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "getDynCaller")) Module["getDynCaller"] = function() { abort("'getDynCaller' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "dynCall")) Module["dynCall"] = function() { abort("'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "callRuntimeCallbacks")) Module["callRuntimeCallbacks"] = function() { abort("'callRuntimeCallbacks' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "abortStackOverflow")) Module["abortStackOverflow"] = function() { abort("'abortStackOverflow' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "reallyNegative")) Module["reallyNegative"] = function() { abort("'reallyNegative' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "unSign")) Module["unSign"] = function() { abort("'unSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "reSign")) Module["reSign"] = function() { abort("'reSign' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "formatString")) Module["formatString"] = function() { abort("'formatString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "PATH")) Module["PATH"] = function() { abort("'PATH' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "PATH_FS")) Module["PATH_FS"] = function() { abort("'PATH_FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
@@ -6558,11 +6224,16 @@ if (!Object.getOwnPropertyDescriptor(Module, "syscallMmap2")) Module["syscallMma
if (!Object.getOwnPropertyDescriptor(Module, "syscallMunmap")) Module["syscallMunmap"] = function() { abort("'syscallMunmap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "JSEvents")) Module["JSEvents"] = function() { abort("'JSEvents' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "specialHTMLTargets")) Module["specialHTMLTargets"] = function() { abort("'specialHTMLTargets' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "maybeCStringToJsString")) Module["maybeCStringToJsString"] = function() { abort("'maybeCStringToJsString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "findEventTarget")) Module["findEventTarget"] = function() { abort("'findEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "findCanvasEventTarget")) Module["findCanvasEventTarget"] = function() { abort("'findCanvasEventTarget' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "polyfillSetImmediate")) Module["polyfillSetImmediate"] = function() { abort("'polyfillSetImmediate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "demangle")) Module["demangle"] = function() { abort("'demangle' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "demangleAll")) Module["demangleAll"] = function() { abort("'demangleAll' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "jsStackTrace")) Module["jsStackTrace"] = function() { abort("'jsStackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "stackTrace")) Module["stackTrace"] = function() { abort("'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "getEnvStrings")) Module["getEnvStrings"] = function() { abort("'getEnvStrings' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "checkWasiClock")) Module["checkWasiClock"] = function() { abort("'checkWasiClock' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64")) Module["writeI53ToI64"] = function() { abort("'writeI53ToI64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Clamped")) Module["writeI53ToI64Clamped"] = function() { abort("'writeI53ToI64Clamped' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "writeI53ToI64Signaling")) Module["writeI53ToI64Signaling"] = function() { abort("'writeI53ToI64Signaling' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
@@ -6572,17 +6243,34 @@ if (!Object.getOwnPropertyDescriptor(Module, "readI53FromI64")) Module["readI53F
if (!Object.getOwnPropertyDescriptor(Module, "readI53FromU64")) Module["readI53FromU64"] = function() { abort("'readI53FromU64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "convertI32PairToI53")) Module["convertI32PairToI53"] = function() { abort("'convertI32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "convertU32PairToI53")) Module["convertU32PairToI53"] = function() { abort("'convertU32PairToI53' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "exceptionLast")) Module["exceptionLast"] = function() { abort("'exceptionLast' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "exceptionCaught")) Module["exceptionCaught"] = function() { abort("'exceptionCaught' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "exceptionThrowBuf")) Module["exceptionThrowBuf"] = function() { abort("'exceptionThrowBuf' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfoAttrs")) Module["ExceptionInfoAttrs"] = function() { abort("'ExceptionInfoAttrs' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "ExceptionInfo")) Module["ExceptionInfo"] = function() { abort("'ExceptionInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "CatchInfo")) Module["CatchInfo"] = function() { abort("'CatchInfo' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "exception_addRef")) Module["exception_addRef"] = function() { abort("'exception_addRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "exception_decRef")) Module["exception_decRef"] = function() { abort("'exception_decRef' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "Browser")) Module["Browser"] = function() { abort("'Browser' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "funcWrappers")) Module["funcWrappers"] = function() { abort("'funcWrappers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "getFuncWrapper")) Module["getFuncWrapper"] = function() { abort("'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "setMainLoop")) Module["setMainLoop"] = function() { abort("'setMainLoop' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "FS")) Module["FS"] = function() { abort("'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "MEMFS")) Module["MEMFS"] = function() { abort("'MEMFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "TTY")) Module["TTY"] = function() { abort("'TTY' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "PIPEFS")) Module["PIPEFS"] = function() { abort("'PIPEFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "SOCKFS")) Module["SOCKFS"] = function() { abort("'SOCKFS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "tempFixedLengthArray")) Module["tempFixedLengthArray"] = function() { abort("'tempFixedLengthArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "miniTempWebGLFloatBuffers")) Module["miniTempWebGLFloatBuffers"] = function() { abort("'miniTempWebGLFloatBuffers' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "heapObjectForWebGLType")) Module["heapObjectForWebGLType"] = function() { abort("'heapObjectForWebGLType' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "heapAccessShiftForWebGLHeap")) Module["heapAccessShiftForWebGLHeap"] = function() { abort("'heapAccessShiftForWebGLHeap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "GL")) Module["GL"] = function() { abort("'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGet")) Module["emscriptenWebGLGet"] = function() { abort("'emscriptenWebGLGet' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "computeUnpackAlignedImageSize")) Module["computeUnpackAlignedImageSize"] = function() { abort("'computeUnpackAlignedImageSize' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetTexPixelData")) Module["emscriptenWebGLGetTexPixelData"] = function() { abort("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetUniform")) Module["emscriptenWebGLGetUniform"] = function() { abort("'emscriptenWebGLGetUniform' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "emscriptenWebGLGetVertexAttrib")) Module["emscriptenWebGLGetVertexAttrib"] = function() { abort("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
+if (!Object.getOwnPropertyDescriptor(Module, "writeGLArray")) Module["writeGLArray"] = function() { abort("'writeGLArray' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "AL")) Module["AL"] = function() { abort("'AL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "SDL_unicode")) Module["SDL_unicode"] = function() { abort("'SDL_unicode' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "SDL_ttfContext")) Module["SDL_ttfContext"] = function() { abort("'SDL_ttfContext' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
@@ -6702,17 +6390,14 @@ if (!Object.getOwnPropertyDescriptor(Module, "lengthBytesUTF32")) Module["length
if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8")) Module["allocateUTF8"] = function() { abort("'allocateUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
if (!Object.getOwnPropertyDescriptor(Module, "allocateUTF8OnStack")) Module["allocateUTF8OnStack"] = function() { abort("'allocateUTF8OnStack' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") };
Module["writeStackCookie"] = writeStackCookie;
-Module["checkStackCookie"] = checkStackCookie;
-Module["abortStackOverflow"] = abortStackOverflow;if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { configurable: true, get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } });
+Module["checkStackCookie"] = checkStackCookie;if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NORMAL")) Object.defineProperty(Module, "ALLOC_NORMAL", { configurable: true, get: function() { abort("'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } });
if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_STACK")) Object.defineProperty(Module, "ALLOC_STACK", { configurable: true, get: function() { abort("'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } });
if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_DYNAMIC")) Object.defineProperty(Module, "ALLOC_DYNAMIC", { configurable: true, get: function() { abort("'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } });
if (!Object.getOwnPropertyDescriptor(Module, "ALLOC_NONE")) Object.defineProperty(Module, "ALLOC_NONE", { configurable: true, get: function() { abort("'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)") } });
-
var calledRun;
-
/**
* @constructor
* @this {ExitStatus}
@@ -6749,10 +6434,8 @@ function callMain(args) {
}
HEAP32[(argv >> 2) + argc] = 0;
-
try {
- Module['___set_stack_limit'](STACK_MAX);
var ret = entryFunction(argc, argv);
@@ -6892,7 +6575,8 @@ function exit(status, implicit) {
if (noExitRuntime) {
// if exit() was called, we may warn the user if the runtime isn't actually being shut down
if (!implicit) {
- err('program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)');
+ var msg = 'program exited (with status: ' + status + '), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)';
+ err(msg);
}
} else {
@@ -6928,15 +6612,12 @@ run();
+
// {{MODULE_ADDITIONS}}
-/**
- * @license
- * Copyright 2013 The Emscripten Authors
- * SPDX-License-Identifier: MIT
- */
+
if (typeof window === "object" && (typeof ENVIRONMENT_IS_PTHREAD === 'undefined' || !ENVIRONMENT_IS_PTHREAD)) {
var emrun_register_handlers = function() {
diff --git a/hello.wasm b/hello.wasm
index 2822b92..10d405f 100644
Binary files a/hello.wasm and b/hello.wasm differ
diff --git a/init.js b/init.js
index 646b48c..56eee6c 100644
--- a/init.js
+++ b/init.js
@@ -2,12 +2,12 @@ var itest;
function InitWrappers() {
// itest = Module.cwrap('itest', 'string');
- itest = (str) => {
- const buffer = Module._malloc(str.length + 1)
- console.log({buffer})
- Module.stringToUTF8(str, buffer, str.length + 1)
- return Module.ccall('itest', 'string', ['number'], [buffer])
- }
+ // itest = (str) => {
+ // const buffer = Module._malloc(str.length + 1)
+ // console.log({buffer})
+ // Module.stringToUTF8(str, buffer, str.length + 1)
+ // return Module.ccall('itest', 'string', ['number'], [buffer])
+ // }
window.read_str_pass = Module.cwrap('read_str_pass', 'void', ['number'])
}
diff --git a/main.cpp b/main.cpp
index 3891ba3..6b729c8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,28 +1,18 @@
#include
#include
#include
+#include