diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b682a85fc6..30acbf5e9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,22 +29,24 @@ jobs: fail-fast: false matrix: include: - - name: test-unit-asyncify (1/8) + - name: test-unit-asyncify (1/9) target: test - - name: test-unit-asyncify (2/8) + - name: test-unit-asyncify (2/9) target: test-asyncify - - name: test-unit-asyncify (3/8) + - name: test-unit-asyncify (3/9) target: test-php-file-get-contents-asyncify - - name: test-unit-asyncify (4/8) + - name: test-unit-asyncify (4/9) target: test-php-fopen-asyncify - - name: test-unit-asyncify (5/8) + - name: test-unit-asyncify (5/9) target: test-php-fsockopen-asyncify - - name: test-unit-asyncify (6/8) + - name: test-unit-asyncify (6/9) target: test-php-gethostbyname-asyncify - - name: test-unit-asyncify (7/8) + - name: test-unit-asyncify (7/9) target: test-php-mysqli-asyncify - - name: test-unit-asyncify (8/8) + - name: test-unit-asyncify (8/9) target: test-php-sqlite3-asyncify + - name: test-unit-asyncify (9/9) + target: test-php-file-locking-asyncify name: ${{ matrix.name }} services: mysql: @@ -79,20 +81,22 @@ jobs: fail-fast: false matrix: include: - - name: test-unit-jspi (1/7) + - name: test-unit-jspi (1/8) target: test-jspi - - name: test-unit-jspi (2/7) + - name: test-unit-jspi (2/8) target: test-php-file-get-contents-jspi - - name: test-unit-jspi (3/7) + - name: test-unit-jspi (3/8) target: test-php-fopen-jspi - - name: test-unit-jspi (4/7) + - name: test-unit-jspi (4/8) target: test-php-fsockopen-jspi - - name: test-unit-jspi (5/7) + - name: test-unit-jspi (5/8) target: test-php-gethostbyname-jspi - - name: test-unit-jspi (6/7) + - name: test-unit-jspi (6/8) target: test-php-mysqli-jspi - - name: test-unit-jspi (7/7) + - name: test-unit-jspi (7/8) target: test-php-sqlite3-jspi + - name: test-unit-jspi (8/8) + target: test-php-file-locking-jspi name: ${{ matrix.name }} services: mysql: diff --git a/package-lock.json b/package-lock.json index fa5f2b4e92..0ac6cfe731 100644 --- a/package-lock.json +++ b/package-lock.json @@ -125,7 +125,7 @@ "lerna": "6.6.2", "nx": "19.8.4", "ora": "6.3.0", - "prettier": "^2.6.2", + "prettier": "^3.6.2", "prism-react-renderer": "^1.3.5", "raw-loader": "^4.0.2", "react-markdown": "^8.0.7", @@ -41104,16 +41104,16 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index 8c96c06f67..a0907231bc 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "lerna": "6.6.2", "nx": "19.8.4", "ora": "6.3.0", - "prettier": "^2.6.2", + "prettier": "^3.6.2", "prism-react-renderer": "^1.3.5", "raw-loader": "^4.0.2", "react-markdown": "^8.0.7", diff --git a/packages/php-wasm/compile/php/phpwasm-emscripten-library-file-locking-for-node.js b/packages/php-wasm/compile/php/phpwasm-emscripten-library-file-locking-for-node.js index 4c10569291..ae6bea706a 100644 --- a/packages/php-wasm/compile/php/phpwasm-emscripten-library-file-locking-for-node.js +++ b/packages/php-wasm/compile/php/phpwasm-emscripten-library-file-locking-for-node.js @@ -731,7 +731,12 @@ const LibraryForFileLocking = { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace('js_flock(%d, %d) lockWholeFile error %s', fd, op, e); return -ERRNO_CODES.EINVAL; diff --git a/packages/php-wasm/node/asyncify/7_2_34/php_7_2.wasm b/packages/php-wasm/node/asyncify/7_2_34/php_7_2.wasm index ab80cb76c5..14ac7624c2 100755 Binary files a/packages/php-wasm/node/asyncify/7_2_34/php_7_2.wasm and b/packages/php-wasm/node/asyncify/7_2_34/php_7_2.wasm differ diff --git a/packages/php-wasm/node/asyncify/7_3_33/php_7_3.wasm b/packages/php-wasm/node/asyncify/7_3_33/php_7_3.wasm index acd0fff6c2..bd31acc11f 100755 Binary files a/packages/php-wasm/node/asyncify/7_3_33/php_7_3.wasm and b/packages/php-wasm/node/asyncify/7_3_33/php_7_3.wasm differ diff --git a/packages/php-wasm/node/asyncify/7_4_33/php_7_4.wasm b/packages/php-wasm/node/asyncify/7_4_33/php_7_4.wasm index ebd6003026..b730824aac 100755 Binary files a/packages/php-wasm/node/asyncify/7_4_33/php_7_4.wasm and b/packages/php-wasm/node/asyncify/7_4_33/php_7_4.wasm differ diff --git a/packages/php-wasm/node/asyncify/8_0_30/php_8_0.wasm b/packages/php-wasm/node/asyncify/8_0_30/php_8_0.wasm index c19c42c9d4..acb501af35 100755 Binary files a/packages/php-wasm/node/asyncify/8_0_30/php_8_0.wasm and b/packages/php-wasm/node/asyncify/8_0_30/php_8_0.wasm differ diff --git a/packages/php-wasm/node/asyncify/8_1_33/php_8_1.wasm b/packages/php-wasm/node/asyncify/8_1_33/php_8_1.wasm index 89fe00759a..bc9de669cf 100755 Binary files a/packages/php-wasm/node/asyncify/8_1_33/php_8_1.wasm and b/packages/php-wasm/node/asyncify/8_1_33/php_8_1.wasm differ diff --git a/packages/php-wasm/node/asyncify/8_2_29/php_8_2.wasm b/packages/php-wasm/node/asyncify/8_2_29/php_8_2.wasm index 538d0b43cf..56ded75c22 100755 Binary files a/packages/php-wasm/node/asyncify/8_2_29/php_8_2.wasm and b/packages/php-wasm/node/asyncify/8_2_29/php_8_2.wasm differ diff --git a/packages/php-wasm/node/asyncify/8_3_27/php_8_3.wasm b/packages/php-wasm/node/asyncify/8_3_27/php_8_3.wasm index e2271c00a9..158ce18f1c 100755 Binary files a/packages/php-wasm/node/asyncify/8_3_27/php_8_3.wasm and b/packages/php-wasm/node/asyncify/8_3_27/php_8_3.wasm differ diff --git a/packages/php-wasm/node/asyncify/8_4_14/php_8_4.wasm b/packages/php-wasm/node/asyncify/8_4_14/php_8_4.wasm index 7fc4c97faf..9dd6541bd5 100755 Binary files a/packages/php-wasm/node/asyncify/8_4_14/php_8_4.wasm and b/packages/php-wasm/node/asyncify/8_4_14/php_8_4.wasm differ diff --git a/packages/php-wasm/node/asyncify/php_7_2.js b/packages/php-wasm/node/asyncify/php_7_2.js index ede8591d67..d8d0ba90e6 100644 --- a/packages/php-wasm/node/asyncify/php_7_2.js +++ b/packages/php-wasm/node/asyncify/php_7_2.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_2_34', 'php_7_2.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 27844089; +export const dependenciesTotalSize = 27844057; const phpVersionString = '7.2.34'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -831,7 +831,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 11852096; + var ___heap_base = 11852032; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -1890,13 +1892,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 11852096; + var ___stack_high = 11852032; - var ___stack_low = 10803520; + var ___stack_low = 10803456; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 11852096 + 11852032 ); var PATH = { @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17557,7 +17565,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18117,10 +18130,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18885,7 +18898,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19178,11 +19191,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19546,8 +19559,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20133,8 +20149,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20252,8 +20272,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20467,8 +20491,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20549,8 +20577,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20624,8 +20656,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20741,8 +20777,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20825,8 +20865,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20936,8 +20980,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21070,8 +21118,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21235,8 +21287,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21342,8 +21398,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21445,8 +21505,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21545,8 +21609,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21559,8 +21627,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21628,8 +21700,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21719,8 +21795,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21920,8 +22000,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22041,8 +22125,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22180,8 +22268,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22283,8 +22375,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22355,8 +22451,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22446,8 +22546,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22459,8 +22562,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22685,8 +22791,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22703,8 +22811,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22721,8 +22831,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22738,8 +22850,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22763,8 +22878,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22779,8 +22896,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22813,7 +22932,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22825,8 +22944,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22847,8 +22968,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22861,8 +22984,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22896,8 +23021,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23787,15 +23916,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23829,16 +23962,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24111,10 +24249,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24158,8 +24296,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24169,8 +24311,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24227,8 +24371,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24236,8 +24384,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24250,8 +24402,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24266,8 +24422,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24324,8 +24484,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24346,8 +24511,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24368,8 +24538,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24489,16 +24664,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24964,8 +25147,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25184,15 +25371,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25353,8 +25546,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25364,8 +25561,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25380,8 +25581,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25391,8 +25596,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25456,10 +25665,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25474,10 +25686,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25495,8 +25710,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25506,8 +25721,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25550,8 +25770,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25594,8 +25817,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25708,8 +25934,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25869,8 +26097,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26932,15 +27163,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26972,14 +27209,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -26994,14 +27235,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27018,14 +27263,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27041,14 +27291,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27205,8 +27459,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27267,8 +27524,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -27991,8 +28250,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28280,8 +28539,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29914,9 +30176,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30374,8 +30639,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30444,8 +30711,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30818,9 +31087,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31193,8 +31460,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; @@ -31854,13 +32140,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 10568013: ($0) => { + 10567981: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 10568061: ($0) => { + 10568029: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/asyncify/php_7_3.js b/packages/php-wasm/node/asyncify/php_7_3.js index 7054ad1539..d72d0dcc36 100644 --- a/packages/php-wasm/node/asyncify/php_7_3.js +++ b/packages/php-wasm/node/asyncify/php_7_3.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_3_33', 'php_7_3.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 28158983; +export const dependenciesTotalSize = 28158951; const phpVersionString = '7.3.33'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -831,7 +831,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 12187392; + var ___heap_base = 12187328; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -1890,13 +1892,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 12187392; + var ___stack_high = 12187328; - var ___stack_low = 11138816; + var ___stack_low = 11138752; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 12187392 + 12187328 ); var PATH = { @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17557,7 +17565,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18117,10 +18130,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18885,7 +18898,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19178,11 +19191,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19546,8 +19559,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20133,8 +20149,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20252,8 +20272,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20467,8 +20491,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20549,8 +20577,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20624,8 +20656,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20741,8 +20777,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20825,8 +20865,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20936,8 +20980,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21070,8 +21118,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21235,8 +21287,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21342,8 +21398,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21445,8 +21505,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21545,8 +21609,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21559,8 +21627,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21628,8 +21700,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21719,8 +21795,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21920,8 +22000,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22041,8 +22125,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22180,8 +22268,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22283,8 +22375,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22355,8 +22451,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22446,8 +22546,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22459,8 +22562,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22685,8 +22791,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22703,8 +22811,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22721,8 +22831,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22738,8 +22850,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22763,8 +22878,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22779,8 +22896,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22813,7 +22932,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22825,8 +22944,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22847,8 +22968,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22861,8 +22984,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22896,8 +23021,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23787,15 +23916,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23829,16 +23962,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24111,10 +24249,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24158,8 +24296,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24169,8 +24311,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24227,8 +24371,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24236,8 +24384,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24250,8 +24402,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24266,8 +24422,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24324,8 +24484,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24346,8 +24511,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24368,8 +24538,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24489,16 +24664,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24964,8 +25147,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25184,15 +25371,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25353,8 +25546,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25364,8 +25561,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25380,8 +25581,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25391,8 +25596,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25456,10 +25665,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25474,10 +25686,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25495,8 +25710,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25506,8 +25721,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25550,8 +25770,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25594,8 +25817,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25708,8 +25934,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25869,8 +26097,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26932,15 +27163,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26972,14 +27209,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -26994,14 +27235,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27018,14 +27263,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27041,14 +27291,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27205,8 +27459,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27267,8 +27524,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -27991,8 +28250,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28280,8 +28539,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29914,9 +30176,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30374,8 +30639,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30444,8 +30711,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30818,9 +31087,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31193,8 +31460,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; @@ -31854,13 +32140,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 10973133: ($0) => { + 10973101: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 10973181: ($0) => { + 10973149: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/asyncify/php_7_4.js b/packages/php-wasm/node/asyncify/php_7_4.js index 6733f511a8..952cb011e1 100644 --- a/packages/php-wasm/node/asyncify/php_7_4.js +++ b/packages/php-wasm/node/asyncify/php_7_4.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_4_33', 'php_7_4.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 28639984; +export const dependenciesTotalSize = 28639968; const phpVersionString = '7.4.33'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -831,7 +831,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 12511936; + var ___heap_base = 12511872; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -1890,13 +1892,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 12511936; + var ___stack_high = 12511872; - var ___stack_low = 11463360; + var ___stack_low = 11463296; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 12511936 + 12511872 ); var PATH = { @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17557,7 +17565,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18117,10 +18130,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18889,7 +18902,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19182,11 +19195,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19550,8 +19563,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20137,8 +20153,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20256,8 +20276,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20471,8 +20495,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20553,8 +20581,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20628,8 +20660,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20745,8 +20781,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20829,8 +20869,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20940,8 +20984,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21074,8 +21122,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21239,8 +21291,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21346,8 +21402,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21449,8 +21509,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21549,8 +21613,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21563,8 +21631,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21632,8 +21704,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21723,8 +21799,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21924,8 +22004,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22045,8 +22129,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22184,8 +22272,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22287,8 +22379,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22359,8 +22455,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22450,8 +22550,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22463,8 +22566,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22689,8 +22795,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22707,8 +22815,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22725,8 +22835,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22742,8 +22854,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22767,8 +22882,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22783,8 +22900,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22817,7 +22936,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22829,8 +22948,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22851,8 +22972,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22865,8 +22988,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22900,8 +23025,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23791,15 +23920,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23833,16 +23966,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24115,10 +24253,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24162,8 +24300,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24173,8 +24315,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24231,8 +24375,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24240,8 +24388,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24254,8 +24406,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24270,8 +24426,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24328,8 +24488,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24350,8 +24515,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24372,8 +24542,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24493,16 +24668,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24968,8 +25151,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25188,15 +25375,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25357,8 +25550,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25368,8 +25565,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25384,8 +25585,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25395,8 +25600,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25460,10 +25669,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25478,10 +25690,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25499,8 +25714,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25510,8 +25725,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25554,8 +25774,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25598,8 +25821,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25712,8 +25938,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25873,8 +26101,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26936,15 +27167,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26976,14 +27213,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -26998,14 +27239,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27022,14 +27267,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27045,14 +27295,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27209,8 +27463,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27271,8 +27528,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -27995,8 +28254,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28284,8 +28543,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29918,9 +30180,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30378,8 +30643,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30448,8 +30715,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30822,9 +31091,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31197,8 +31464,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; @@ -31854,13 +32140,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 11297021: ($0) => { + 11297005: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 11297069: ($0) => { + 11297053: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/asyncify/php_8_0.js b/packages/php-wasm/node/asyncify/php_8_0.js index 1219665774..bbbdd1dd72 100644 --- a/packages/php-wasm/node/asyncify/php_8_0.js +++ b/packages/php-wasm/node/asyncify/php_8_0.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '8_0_30', 'php_8_0.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 29860135; +export const dependenciesTotalSize = 29860103; const phpVersionString = '8.0.30'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17557,7 +17565,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18117,10 +18130,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18889,7 +18902,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19182,11 +19195,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19550,8 +19563,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20137,8 +20153,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20256,8 +20276,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20471,8 +20495,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20553,8 +20581,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20628,8 +20660,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20745,8 +20781,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20829,8 +20869,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20940,8 +20984,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21074,8 +21122,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21239,8 +21291,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21346,8 +21402,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21449,8 +21509,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21549,8 +21613,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21563,8 +21631,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21632,8 +21704,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21723,8 +21799,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21924,8 +22004,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22045,8 +22129,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22184,8 +22272,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22287,8 +22379,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22359,8 +22455,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22450,8 +22550,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22463,8 +22566,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22689,8 +22795,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22707,8 +22815,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22725,8 +22835,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22742,8 +22854,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22767,8 +22882,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22783,8 +22900,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22817,7 +22936,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22829,8 +22948,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22851,8 +22972,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22865,8 +22988,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22900,8 +23025,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23791,15 +23920,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23833,16 +23966,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24115,10 +24253,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24162,8 +24300,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24173,8 +24315,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24231,8 +24375,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24240,8 +24388,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24254,8 +24406,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24270,8 +24426,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24328,8 +24488,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24350,8 +24515,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24372,8 +24542,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24493,16 +24668,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24968,8 +25151,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25188,15 +25375,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25357,8 +25550,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25368,8 +25565,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25384,8 +25585,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25395,8 +25600,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25460,10 +25669,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25478,10 +25690,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25499,8 +25714,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25510,8 +25725,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25554,8 +25774,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25598,8 +25821,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25712,8 +25938,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25873,8 +26101,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26936,15 +27167,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26976,14 +27213,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -26998,14 +27239,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27022,14 +27267,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27045,14 +27295,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27209,8 +27463,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27271,8 +27528,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -27995,8 +28254,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28284,8 +28543,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29918,9 +30180,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30378,8 +30643,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30448,8 +30715,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30822,9 +31091,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31197,8 +31464,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; @@ -31854,13 +32140,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 12328285: ($0) => { + 12328253: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 12328333: ($0) => { + 12328301: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/asyncify/php_8_1.js b/packages/php-wasm/node/asyncify/php_8_1.js index 4f7a792d05..32a084932d 100644 --- a/packages/php-wasm/node/asyncify/php_8_1.js +++ b/packages/php-wasm/node/asyncify/php_8_1.js @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17559,7 +17567,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18121,10 +18134,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18895,7 +18908,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19188,11 +19201,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19556,8 +19569,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20143,8 +20159,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20262,8 +20282,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20477,8 +20501,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20559,8 +20587,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20634,8 +20666,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20751,8 +20787,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20835,8 +20875,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20946,8 +20990,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21080,8 +21128,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21245,8 +21297,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21352,8 +21408,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21455,8 +21515,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21555,8 +21619,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21569,8 +21637,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21638,8 +21710,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21729,8 +21805,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21930,8 +22010,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22051,8 +22135,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22190,8 +22278,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22293,8 +22385,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22365,8 +22461,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22456,8 +22556,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22469,8 +22572,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22695,8 +22801,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22713,8 +22821,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22731,8 +22841,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22748,8 +22860,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22773,8 +22888,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22789,8 +22906,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22823,7 +22942,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22835,8 +22954,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22857,8 +22978,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22871,8 +22994,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22906,8 +23031,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23797,15 +23926,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23839,16 +23972,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24121,10 +24259,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24168,8 +24306,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24179,8 +24321,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24237,8 +24381,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24246,8 +24394,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24260,8 +24412,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24276,8 +24432,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24334,8 +24494,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24356,8 +24521,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24378,8 +24548,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24499,16 +24674,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24974,8 +25157,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25194,15 +25381,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25363,8 +25556,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25374,8 +25571,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25390,8 +25591,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25401,8 +25606,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25466,10 +25675,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25484,10 +25696,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25505,8 +25720,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25516,8 +25731,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25560,8 +25780,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25604,8 +25827,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25718,8 +25944,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25879,8 +26107,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26942,15 +27173,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26982,14 +27219,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -27004,14 +27245,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27028,14 +27273,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27051,14 +27301,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27215,8 +27469,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27277,8 +27534,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -28001,8 +28260,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28290,8 +28549,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29924,9 +30186,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30384,8 +30649,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30454,8 +30721,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30828,9 +31097,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31203,8 +31470,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/asyncify/php_8_2.js b/packages/php-wasm/node/asyncify/php_8_2.js index aa5d61225e..3d8d95e936 100644 --- a/packages/php-wasm/node/asyncify/php_8_2.js +++ b/packages/php-wasm/node/asyncify/php_8_2.js @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17561,7 +17569,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18123,10 +18136,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18897,7 +18910,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19190,11 +19203,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19558,8 +19571,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20145,8 +20161,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20264,8 +20284,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20479,8 +20503,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20561,8 +20589,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20636,8 +20668,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20753,8 +20789,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20837,8 +20877,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20948,8 +20992,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21082,8 +21130,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21247,8 +21299,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21354,8 +21410,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21457,8 +21517,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21557,8 +21621,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21571,8 +21639,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21640,8 +21712,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21731,8 +21807,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21932,8 +22012,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22053,8 +22137,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22192,8 +22280,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22295,8 +22387,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22367,8 +22463,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22458,8 +22558,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22471,8 +22574,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22697,8 +22803,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22715,8 +22823,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22733,8 +22843,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22750,8 +22862,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22775,8 +22890,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22791,8 +22908,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22825,7 +22944,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22837,8 +22956,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22859,8 +22980,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22873,8 +22996,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22908,8 +23033,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23799,15 +23928,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23841,16 +23974,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24123,10 +24261,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24170,8 +24308,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24181,8 +24323,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24239,8 +24383,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24248,8 +24396,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24262,8 +24414,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24278,8 +24434,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24336,8 +24496,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24358,8 +24523,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24380,8 +24550,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24501,16 +24676,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24976,8 +25159,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25196,15 +25383,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25365,8 +25558,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25376,8 +25573,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25392,8 +25593,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25403,8 +25608,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25468,10 +25677,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25486,10 +25698,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25507,8 +25722,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25518,8 +25733,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25562,8 +25782,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25606,8 +25829,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25720,8 +25946,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25881,8 +26109,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26944,15 +27175,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26984,14 +27221,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -27006,14 +27247,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27030,14 +27275,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27053,14 +27303,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27217,8 +27471,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27279,8 +27536,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -28003,8 +28262,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28292,8 +28551,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29926,9 +30188,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30386,8 +30651,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30456,8 +30723,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30830,9 +31099,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31205,8 +31472,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/asyncify/php_8_3.js b/packages/php-wasm/node/asyncify/php_8_3.js index c43896ed75..157eb94dfe 100644 --- a/packages/php-wasm/node/asyncify/php_8_3.js +++ b/packages/php-wasm/node/asyncify/php_8_3.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '8_3_27', 'php_8_3.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 35600067; +export const dependenciesTotalSize = 35599811; const phpVersionString = '8.3.27'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -831,7 +831,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 15604096; + var ___heap_base = 15603840; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -1890,13 +1892,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 15604096; + var ___stack_high = 15603840; - var ___stack_low = 14555520; + var ___stack_low = 14555264; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 15604096 + 15603840 ); var PATH = { @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17561,7 +17569,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18123,10 +18136,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18897,7 +18910,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19190,11 +19203,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19558,8 +19571,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20145,8 +20161,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20264,8 +20284,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20479,8 +20503,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20561,8 +20589,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20636,8 +20668,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20753,8 +20789,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20837,8 +20877,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20948,8 +20992,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21082,8 +21130,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21247,8 +21299,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21354,8 +21410,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21457,8 +21517,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21557,8 +21621,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21571,8 +21639,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21640,8 +21712,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21731,8 +21807,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21932,8 +22012,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22053,8 +22137,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22192,8 +22280,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22295,8 +22387,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22367,8 +22463,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22458,8 +22558,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22471,8 +22574,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22697,8 +22803,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22715,8 +22823,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22733,8 +22843,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22750,8 +22862,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22775,8 +22890,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22791,8 +22908,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22825,7 +22944,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22837,8 +22956,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22859,8 +22980,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22873,8 +22996,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22908,8 +23033,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23799,15 +23928,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23841,16 +23974,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24123,10 +24261,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24170,8 +24308,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24181,8 +24323,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24239,8 +24383,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24248,8 +24396,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24262,8 +24414,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24278,8 +24434,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24336,8 +24496,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24358,8 +24523,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24380,8 +24550,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24501,16 +24676,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24976,8 +25159,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25196,15 +25383,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25365,8 +25558,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25376,8 +25573,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25392,8 +25593,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25403,8 +25608,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25468,10 +25677,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25486,10 +25698,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25507,8 +25722,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25518,8 +25733,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25562,8 +25782,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25606,8 +25829,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25720,8 +25946,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25881,8 +26109,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26944,15 +27175,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26984,14 +27221,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -27006,14 +27247,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27030,14 +27275,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27053,14 +27303,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27217,8 +27471,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27279,8 +27536,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -28003,8 +28262,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28292,8 +28551,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29926,9 +30188,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30386,8 +30651,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30456,8 +30723,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30830,9 +31099,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31205,8 +31472,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; @@ -31854,13 +32140,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 14052445: ($0) => { + 14052189: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 14052493: ($0) => { + 14052237: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/asyncify/php_8_4.js b/packages/php-wasm/node/asyncify/php_8_4.js index ec304cbae8..86e22f7971 100644 --- a/packages/php-wasm/node/asyncify/php_8_4.js +++ b/packages/php-wasm/node/asyncify/php_8_4.js @@ -1247,7 +1247,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1774,8 +1774,10 @@ export function init(RuntimeName, PHPLoader) { ); var ___call_sighandler = (fp, sig) => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ sig + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + sig ); ___call_sighandler.sig = 'vpi'; @@ -5778,7 +5780,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6860,7 +6862,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7801,10 +7803,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -8874,8 +8876,11 @@ export function init(RuntimeName, PHPLoader) { dlSetError(`'Could not load dynamic lib: ${filename}\n${e}`); runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -8883,8 +8888,11 @@ export function init(RuntimeName, PHPLoader) { function successCallback() { runtimeKeepalivePop(); callUserCallback(() => - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, user_data ) ); @@ -13955,10 +13963,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16211,7 +16219,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16279,7 +16287,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -17024,10 +17032,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17561,7 +17569,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -18123,10 +18136,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18897,7 +18910,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -19190,11 +19203,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -19558,8 +19571,11 @@ export function init(RuntimeName, PHPLoader) { var trace = getCallstack(); var parts = trace.split('\n'); for (var i = 0; i < parts.length; i++) { - var ret = ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0, + var ret = (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0, arg ); if (ret !== 0) return; @@ -20145,8 +20161,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(e.locale || '', keyEventData + 128, 32); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, keyEventData, userData ) @@ -20264,8 +20284,12 @@ export function init(RuntimeName, PHPLoader) { fillMouseEventData(JSEvents.mouseEvent, e, target); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.mouseEvent, userData ) @@ -20479,8 +20503,12 @@ export function init(RuntimeName, PHPLoader) { HEAPF64[(wheelEvent + 80) >> 3] = e['deltaZ']; HEAP32[(wheelEvent + 88) >> 2] = e['deltaMode']; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, wheelEvent, userData ) @@ -20561,8 +20589,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(uiEvent + 28) >> 2] = pageXOffset | 0; // scroll offsets are float HEAP32[(uiEvent + 32) >> 2] = pageYOffset | 0; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, uiEvent, userData ) @@ -20636,8 +20668,12 @@ export function init(RuntimeName, PHPLoader) { stringToUTF8(id, focusEvent + 128, 128); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, focusEvent, userData ) @@ -20753,8 +20789,12 @@ export function init(RuntimeName, PHPLoader) { ); // TODO: Thread-safety with respect to emscripten_get_deviceorientation_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceOrientationEvent, userData ) @@ -20837,8 +20877,12 @@ export function init(RuntimeName, PHPLoader) { fillDeviceMotionEventData(JSEvents.deviceMotionEvent, e, target); // TODO: Thread-safety with respect to emscripten_get_devicemotion_status() if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, JSEvents.deviceMotionEvent, userData ) @@ -20948,8 +20992,12 @@ export function init(RuntimeName, PHPLoader) { fillOrientationChangeEventData(orientationChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, orientationChangeEvent, userData ) @@ -21082,8 +21130,12 @@ export function init(RuntimeName, PHPLoader) { fillFullscreenChangeEventData(fullscreenChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, fullscreenChangeEvent, userData ) @@ -21247,8 +21299,12 @@ export function init(RuntimeName, PHPLoader) { ); if (currentFullscreenStrategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21354,8 +21410,12 @@ export function init(RuntimeName, PHPLoader) { currentFullscreenStrategy = strategy; if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21457,8 +21517,12 @@ export function init(RuntimeName, PHPLoader) { !inCenteredWithoutScalingFullscreenMode && currentFullscreenStrategy.canvasResizedCallback ) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, currentFullscreenStrategy.canvasResizedCallbackUserData ); @@ -21557,8 +21621,12 @@ export function init(RuntimeName, PHPLoader) { softFullscreenResizeWebGLRenderTarget ); if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21571,8 +21639,12 @@ export function init(RuntimeName, PHPLoader) { // Inform the caller that the canvas size has changed. if (strategy.canvasResizedCallback) { - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 37, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 37, 0, strategy.canvasResizedCallbackUserData ); @@ -21640,8 +21712,12 @@ export function init(RuntimeName, PHPLoader) { fillPointerlockChangeEventData(pointerlockChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, pointerlockChangeEvent, userData ) @@ -21731,8 +21807,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var pointerlockErrorEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -21932,8 +22012,12 @@ export function init(RuntimeName, PHPLoader) { fillVisibilityChangeEventData(visibilityChangeEvent); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, visibilityChangeEvent, userData ) @@ -22053,8 +22137,12 @@ export function init(RuntimeName, PHPLoader) { HEAP32[(touchEvent + 8) >> 2] = numTouches; if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, touchEvent, userData ) @@ -22192,8 +22280,12 @@ export function init(RuntimeName, PHPLoader) { fillGamepadEventData(gamepadEvent, e['gamepad']); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, gamepadEvent, userData ) @@ -22295,8 +22387,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var beforeUnloadEventHandlerFunc = (e = event) => { // Note: This is always called on the main browser thread, since it needs synchronously return a value! - var confirmationMessage = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + var confirmationMessage = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ); @@ -22367,8 +22463,12 @@ export function init(RuntimeName, PHPLoader) { fillBatteryEventData(batteryEvent, battery()); if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, batteryEvent, userData ) @@ -22458,8 +22558,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame = (cb, userData) => requestAnimationFrame((timeStamp) => - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ); @@ -22471,8 +22574,11 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_request_animation_frame_loop = (cb, userData) => { function tick(timeStamp) { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ timeStamp, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + timeStamp, userData ) ) { @@ -22697,8 +22803,10 @@ export function init(RuntimeName, PHPLoader) { return emSetImmediate(() => { runtimeKeepalivePop(); callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }); @@ -22715,8 +22823,10 @@ export function init(RuntimeName, PHPLoader) { function tick() { callUserCallback(() => { if ( - ((a1) => {})( - /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature ii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ) { emSetImmediate(tick); @@ -22733,8 +22843,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_timeout = (cb, msecs, userData) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ), msecs ); @@ -22750,8 +22862,11 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { if ( - ((a1, a2) => {})( - /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ t, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature idi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + t, userData ) ) { @@ -22775,8 +22890,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePush(); return setInterval(() => { callUserCallback(() => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ) ); }, msecs); @@ -22791,8 +22908,10 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_async_call = (func, arg, millis) => { var wrapper = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); if ( @@ -22825,7 +22944,7 @@ export function init(RuntimeName, PHPLoader) { var _emscripten_set_main_loop = (func, fps, simulateInfiniteLoop) => { var iterFunc = - () => {}; /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ + () => {} /* a dynamic function call to signature v, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */; setMainLoop(iterFunc, fps, simulateInfiniteLoop); }; _emscripten_set_main_loop.sig = 'vpii'; @@ -22837,8 +22956,10 @@ export function init(RuntimeName, PHPLoader) { simulateInfiniteLoop ) => { var iterFunc = () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); setMainLoop(iterFunc, fps, simulateInfiniteLoop, arg); }; @@ -22859,8 +22980,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22873,8 +22996,10 @@ export function init(RuntimeName, PHPLoader) { var __emscripten_push_uncounted_main_loop_blocker = (func, arg, name) => { MainLoop.queue.push({ func: () => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, name: UTF8ToString(name), @@ -22908,8 +23033,12 @@ export function init(RuntimeName, PHPLoader) { var resultPtr = stackAlloc(POINTER_SIZE); HEAPU32[resultPtr >> 2] = 0; try { - var result = ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ resultPtr, + var result = (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + resultPtr, userData, value ); @@ -23799,15 +23928,19 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ file + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + file ); }, true // don'tCreateFile - it's already there @@ -23841,16 +23974,21 @@ export function init(RuntimeName, PHPLoader) { () => { runtimeKeepalivePop(); if (onload) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, cname ); }, () => { runtimeKeepalivePop(); if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }, true // don'tCreateFile - it's already there @@ -24123,10 +24261,10 @@ export function init(RuntimeName, PHPLoader) { runtimeKeepalivePop(); callUserCallback(() => { var sp = stackSave(); - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stringToUTF8OnStack( - _file - ) + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stringToUTF8OnStack(_file) ); stackRestore(sp); }); @@ -24170,8 +24308,12 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata, buffer, byteArray.length ); @@ -24181,8 +24323,10 @@ export function init(RuntimeName, PHPLoader) { if (onerror) { runtimeKeepalivePop(); callUserCallback(() => { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userdata + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userdata ); }); } @@ -24239,8 +24383,12 @@ export function init(RuntimeName, PHPLoader) { ); if (onload) { var sp = stackSave(); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, stringToUTF8OnStack(_file) ); @@ -24248,8 +24396,12 @@ export function init(RuntimeName, PHPLoader) { } } else { if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24262,8 +24414,12 @@ export function init(RuntimeName, PHPLoader) { http.onerror = (e) => { runtimeKeepalivePop(); if (onerror) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status ); @@ -24278,8 +24434,12 @@ export function init(RuntimeName, PHPLoader) { ) { var percentComplete = (e.loaded / e.total) * 100; if (onprogress) - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, percentComplete ); @@ -24336,8 +24496,13 @@ export function init(RuntimeName, PHPLoader) { if (http.statusText) { statusText = stringToUTF8OnStack(http.statusText); } - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, http.status, statusText @@ -24358,8 +24523,13 @@ export function init(RuntimeName, PHPLoader) { var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); if (onload) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, buffer, byteArray.length @@ -24380,8 +24550,13 @@ export function init(RuntimeName, PHPLoader) { // PROGRESS http.onprogress = (e) => { if (onprogress) - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ handle, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + handle, userdata, e.loaded, e.lengthComputable || e.lengthComputable === undefined @@ -24501,16 +24676,24 @@ export function init(RuntimeName, PHPLoader) { if (event === 'error') { withStackSave(() => { var msg = stringToUTF8OnStack(data[2]); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data[0], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data[0], data[1], msg, userData ); }); } else { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ data, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + data, userData ); } @@ -24976,8 +25159,12 @@ export function init(RuntimeName, PHPLoader) { ) => { var webGlEventHandlerFunc = (e = event) => { if ( - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ eventTypeId, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + eventTypeId, 0, userData ) @@ -25196,15 +25383,21 @@ export function init(RuntimeName, PHPLoader) { ) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } else if (GLUT.buttons != 0 && GLUT.motionFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ lastX, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + lastX, lastY ); } @@ -25365,8 +25558,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25376,8 +25573,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25392,8 +25593,12 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.specialUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25403,8 +25608,12 @@ export function init(RuntimeName, PHPLoader) { if (key !== null && GLUT.keyboardUpFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ key, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + key, Browser.mouseX, Browser.mouseY ); @@ -25468,10 +25677,13 @@ export function init(RuntimeName, PHPLoader) { } catch (e) {} event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25486,10 +25698,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ event[ - 'button' - ], + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + event['button'], 1 /*GLUT_UP*/, Browser.mouseX, Browser.mouseY @@ -25507,8 +25722,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -25518,8 +25733,13 @@ export function init(RuntimeName, PHPLoader) { if (GLUT.mouseFunc) { event.preventDefault(); GLUT.saveModifiers(event); - ((a1, a2, a3, a4) => {})( - /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ button, + (( + a1, + a2, + a3, + a4 + ) => {}) /* a dynamic function call to signature viiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + button, 0 /*GLUT_DOWN*/, Browser.mouseX, Browser.mouseY @@ -25562,8 +25782,11 @@ export function init(RuntimeName, PHPLoader) { /* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */ if (GLUT.reshapeFunc) { // out("GLUT.reshapeFunc (from FS): " + width + ", " + height); - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25606,8 +25829,11 @@ export function init(RuntimeName, PHPLoader) { Browser.resizeListeners.push((width, height) => { if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -25720,8 +25946,10 @@ export function init(RuntimeName, PHPLoader) { var _glutTimerFunc = (msec, func, value) => safeSetTimeout( () => - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ value + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + value ), msec ); @@ -25881,8 +26109,11 @@ export function init(RuntimeName, PHPLoader) { Browser.setCanvasSize(width, height, true); // N.B. GLUT.reshapeFunc is also registered as a canvas resize callback. // Just call it once here. if (GLUT.reshapeFunc) { - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ width, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + width, height ); } @@ -26944,15 +27175,21 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } var buffer = _malloc(byteArray.length); HEAPU8.set(byteArray, buffer); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, buffer, byteArray.length ); @@ -26984,14 +27221,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onstore) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); } @@ -27006,14 +27247,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (ondelete) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27030,14 +27275,19 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (oncheck) - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg, exists ); }); @@ -27053,14 +27303,18 @@ export function init(RuntimeName, PHPLoader) { callUserCallback(() => { if (error) { if (onerror) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); return; } if (onclear) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ arg + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + arg ); }); }); @@ -27217,8 +27471,11 @@ export function init(RuntimeName, PHPLoader) { safeSetTimeout(() => { var stackBegin = Asyncify.currData + 12; var stackEnd = HEAPU32[Asyncify.currData >> 2]; - ((a1, a2) => {})( - /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ stackBegin, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature vii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + stackBegin, stackEnd ); wakeUp(); @@ -27279,8 +27536,10 @@ export function init(RuntimeName, PHPLoader) { HEAPU32[(newFiber + 12) >> 2] = 0; var userData = HEAPU32[(newFiber + 16) >> 2]; - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ userData + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + userData ); } else { var asyncifyData = newFiber + 20; @@ -28003,8 +28262,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -28292,8 +28551,11 @@ export function init(RuntimeName, PHPLoader) { if (!SDL.eventHandler) return; while (SDL.pollEvent(SDL.eventHandlerTemp)) { - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL.eventHandlerContext, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.eventHandlerContext, SDL.eventHandlerTemp ); } @@ -29926,9 +30188,12 @@ export function init(RuntimeName, PHPLoader) { return; // Ask SDL audio data from the user code. - ((a1, a2, a3) => {})( - /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ SDL - .audio.userdata, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature viii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + SDL.audio.userdata, SDL.audio.buffer, SDL.audio.bufferSize ); @@ -30386,8 +30651,10 @@ export function init(RuntimeName, PHPLoader) { info.audio = null; } if (SDL.channelFinished) { - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); } } @@ -30456,8 +30723,10 @@ export function init(RuntimeName, PHPLoader) { channelInfo.audio = null; } if (SDL.channelFinished) - ((a1) => {})( - /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ channel + (( + a1 + ) => {}) /* a dynamic function call to signature vi, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + channel ); }; if (channelInfo.audio) { @@ -30830,9 +31099,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31205,8 +31472,11 @@ export function init(RuntimeName, PHPLoader) { var _SDL_AddTimer = (interval, callback, param) => safeSetTimeout( () => - ((a1, a2) => {})( - /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ interval, + (( + a1, + a2 + ) => {}) /* a dynamic function call to signature iii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + interval, param ), interval @@ -31572,8 +31842,12 @@ export function init(RuntimeName, PHPLoader) { socket.onopen = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31595,8 +31869,12 @@ export function init(RuntimeName, PHPLoader) { socket.onerror = function (e) { var eventPtr = WS.getSocketEvent(socketId); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31618,11 +31896,15 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + stringToUTF8(e.reason, eventPtr + 8, 512)); + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData ); @@ -31653,14 +31935,18 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - ((a1, a2, a3) => {})( - /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */ 0 /*TODO*/, + (( + a1, + a2, + a3 + ) => {}) /* a dynamic function call to signature iiii, but there are no exported function pointers with that signature, so this path should never be taken. Build with ASSERTIONS enabled to validate. */( + 0 /*TODO*/, eventPtr, userData - ); + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/jspi/7_2_34/php_7_2.wasm b/packages/php-wasm/node/jspi/7_2_34/php_7_2.wasm index 0d07f06843..45caefca75 100755 Binary files a/packages/php-wasm/node/jspi/7_2_34/php_7_2.wasm and b/packages/php-wasm/node/jspi/7_2_34/php_7_2.wasm differ diff --git a/packages/php-wasm/node/jspi/7_3_33/php_7_3.wasm b/packages/php-wasm/node/jspi/7_3_33/php_7_3.wasm index 669c2771dc..af287e2f15 100755 Binary files a/packages/php-wasm/node/jspi/7_3_33/php_7_3.wasm and b/packages/php-wasm/node/jspi/7_3_33/php_7_3.wasm differ diff --git a/packages/php-wasm/node/jspi/7_4_33/php_7_4.wasm b/packages/php-wasm/node/jspi/7_4_33/php_7_4.wasm index 366206db30..1e10748322 100755 Binary files a/packages/php-wasm/node/jspi/7_4_33/php_7_4.wasm and b/packages/php-wasm/node/jspi/7_4_33/php_7_4.wasm differ diff --git a/packages/php-wasm/node/jspi/8_0_30/php_8_0.wasm b/packages/php-wasm/node/jspi/8_0_30/php_8_0.wasm index cc3b7b9920..10a2b7972a 100755 Binary files a/packages/php-wasm/node/jspi/8_0_30/php_8_0.wasm and b/packages/php-wasm/node/jspi/8_0_30/php_8_0.wasm differ diff --git a/packages/php-wasm/node/jspi/8_1_33/php_8_1.wasm b/packages/php-wasm/node/jspi/8_1_33/php_8_1.wasm index 24876c9166..f38af2851a 100755 Binary files a/packages/php-wasm/node/jspi/8_1_33/php_8_1.wasm and b/packages/php-wasm/node/jspi/8_1_33/php_8_1.wasm differ diff --git a/packages/php-wasm/node/jspi/8_2_29/php_8_2.wasm b/packages/php-wasm/node/jspi/8_2_29/php_8_2.wasm index eb6d1df710..068777000e 100755 Binary files a/packages/php-wasm/node/jspi/8_2_29/php_8_2.wasm and b/packages/php-wasm/node/jspi/8_2_29/php_8_2.wasm differ diff --git a/packages/php-wasm/node/jspi/8_3_27/php_8_3.wasm b/packages/php-wasm/node/jspi/8_3_27/php_8_3.wasm index c45146c82a..151afbeb47 100755 Binary files a/packages/php-wasm/node/jspi/8_3_27/php_8_3.wasm and b/packages/php-wasm/node/jspi/8_3_27/php_8_3.wasm differ diff --git a/packages/php-wasm/node/jspi/8_4_14/php_8_4.wasm b/packages/php-wasm/node/jspi/8_4_14/php_8_4.wasm index 08fc166ccc..343ab7459b 100755 Binary files a/packages/php-wasm/node/jspi/8_4_14/php_8_4.wasm and b/packages/php-wasm/node/jspi/8_4_14/php_8_4.wasm differ diff --git a/packages/php-wasm/node/jspi/php_7_2.js b/packages/php-wasm/node/jspi/php_7_2.js index 4f4b209267..1852743991 100644 --- a/packages/php-wasm/node/jspi/php_7_2.js +++ b/packages/php-wasm/node/jspi/php_7_2.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_2_34', 'php_7_2.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 27475009; +export const dependenciesTotalSize = 27474977; const phpVersionString = '7.2.34'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17420,7 +17420,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17987,10 +17992,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18573,7 +18578,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18866,11 +18871,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25016,8 +25021,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27460,8 +27465,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30282,9 +30287,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; @@ -31298,13 +31305,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 10553262: ($0) => { + 10553230: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 10553310: ($0) => { + 10553278: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/jspi/php_7_3.js b/packages/php-wasm/node/jspi/php_7_3.js index 377035a983..3cf4b15d4c 100644 --- a/packages/php-wasm/node/jspi/php_7_3.js +++ b/packages/php-wasm/node/jspi/php_7_3.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_3_33', 'php_7_3.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 27803641; +export const dependenciesTotalSize = 27803609; const phpVersionString = '7.3.33'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17420,7 +17420,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17987,10 +17992,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18573,7 +18578,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18866,11 +18871,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25016,8 +25021,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27460,8 +27465,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30282,9 +30287,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; @@ -31298,13 +31305,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 10958382: ($0) => { + 10958350: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 10958430: ($0) => { + 10958398: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/jspi/php_7_4.js b/packages/php-wasm/node/jspi/php_7_4.js index 7a9a90098e..26c4de71b8 100644 --- a/packages/php-wasm/node/jspi/php_7_4.js +++ b/packages/php-wasm/node/jspi/php_7_4.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '7_4_33', 'php_7_4.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 28280911; +export const dependenciesTotalSize = 28280879; const phpVersionString = '7.4.33'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17420,7 +17420,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17987,10 +17992,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18577,7 +18582,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18870,11 +18875,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25020,8 +25025,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27464,8 +27469,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30286,9 +30291,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; @@ -31298,13 +31305,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 11282270: ($0) => { + 11282238: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 11282318: ($0) => { + 11282286: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/jspi/php_8_0.js b/packages/php-wasm/node/jspi/php_8_0.js index a752929c8d..9b2ee85c5f 100644 --- a/packages/php-wasm/node/jspi/php_8_0.js +++ b/packages/php-wasm/node/jspi/php_8_0.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '8_0_30', 'php_8_0.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 29493342; +export const dependenciesTotalSize = 29493310; const phpVersionString = '8.0.30'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -848,7 +848,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 13599584; + var ___heap_base = 13599520; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1743,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 13599584; + var ___stack_high = 13599520; - var ___stack_low = 12551008; + var ___stack_low = 12550944; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 13599584 + 13599520 ); var PATH = { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17420,7 +17420,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17987,10 +17992,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18577,7 +18582,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18870,11 +18875,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25020,8 +25025,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27464,8 +27469,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30286,9 +30291,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; @@ -31298,13 +31305,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 12313534: ($0) => { + 12313502: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 12313582: ($0) => { + 12313550: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/jspi/php_8_1.js b/packages/php-wasm/node/jspi/php_8_1.js index 5160d88082..00ff1b23dd 100644 --- a/packages/php-wasm/node/jspi/php_8_1.js +++ b/packages/php-wasm/node/jspi/php_8_1.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17422,7 +17422,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17991,10 +17996,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18583,7 +18588,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18876,11 +18881,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25026,8 +25031,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27470,8 +27475,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30292,9 +30297,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/jspi/php_8_2.js b/packages/php-wasm/node/jspi/php_8_2.js index 3e1a8f270c..494bf96ee6 100644 --- a/packages/php-wasm/node/jspi/php_8_2.js +++ b/packages/php-wasm/node/jspi/php_8_2.js @@ -8,7 +8,7 @@ import path from 'path'; const dependencyFilename = path.join(__dirname, '8_2_29', 'php_8_2.wasm'); export { dependencyFilename }; -export const dependenciesTotalSize = 34065711; +export const dependenciesTotalSize = 34065455; const phpVersionString = '8.2.29'; export function init(RuntimeName, PHPLoader) { // The rest of the code comes from the built php.js file and esm-suffix.js @@ -848,7 +848,7 @@ export function init(RuntimeName, PHPLoader) { }, }; - var ___heap_base = 14671264; + var ___heap_base = 14671008; var alignMemory = (size, alignment) => { return Math.ceil(size / alignment) * alignment; @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -1743,13 +1743,13 @@ export function init(RuntimeName, PHPLoader) { 1024 ); - var ___stack_high = 14671264; + var ___stack_high = 14671008; - var ___stack_low = 13622688; + var ___stack_low = 13622432; var ___stack_pointer = new WebAssembly.Global( { value: 'i32', mutable: true }, - 14671264 + 14671008 ); var PATH = { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17424,7 +17424,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17993,10 +17998,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18585,7 +18590,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18878,11 +18883,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25028,8 +25033,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27472,8 +27477,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30294,9 +30299,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; @@ -31298,13 +31305,13 @@ export function init(RuntimeName, PHPLoader) { // End JS library code var ASM_CONSTS = { - 13086542: ($0) => { + 13086286: ($0) => { if (!$0) { AL.alcErr = 0xa004; return 1; } }, - 13086590: ($0) => { + 13086334: ($0) => { if (!AL.currentCtx) { err('alGetProcAddress() called without a valid context'); return 1; diff --git a/packages/php-wasm/node/jspi/php_8_3.js b/packages/php-wasm/node/jspi/php_8_3.js index 2c7be390b5..c229b66b2d 100644 --- a/packages/php-wasm/node/jspi/php_8_3.js +++ b/packages/php-wasm/node/jspi/php_8_3.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17424,7 +17424,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17993,10 +17998,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18585,7 +18590,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18878,11 +18883,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25028,8 +25033,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27472,8 +27477,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30294,9 +30299,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/jspi/php_8_4.js b/packages/php-wasm/node/jspi/php_8_4.js index 06b0af6e08..c87d472e6f 100644 --- a/packages/php-wasm/node/jspi/php_8_4.js +++ b/packages/php-wasm/node/jspi/php_8_4.js @@ -1226,7 +1226,7 @@ export function init(RuntimeName, PHPLoader) { ? alignMemory( getMemory(metadata.memorySize + memAlign), memAlign - ) + ) : 0; // TODO: add to cleanups var tableBase = metadata.tableSize ? wasmTable.length : 0; if (handle) { @@ -5631,7 +5631,7 @@ export function init(RuntimeName, PHPLoader) { sock, sock.daddr, sock.dport - ) + ) : null; if ( @@ -6713,7 +6713,7 @@ export function init(RuntimeName, PHPLoader) { } } } - }; + }; PHPWASM.processTable = {}; @@ -7671,10 +7671,10 @@ export function init(RuntimeName, PHPLoader) { type = FS.isChrdev(child.mode) ? 2 // DT_CHR, character device. : FS.isDir(child.mode) - ? 4 // DT_DIR, directory. - : FS.isLink(child.mode) - ? 10 // DT_LNK, symbolic link. - : 8; // DT_REG, regular file. + ? 4 // DT_DIR, directory. + : FS.isLink(child.mode) + ? 10 // DT_LNK, symbolic link. + : 8; // DT_REG, regular file. } HEAP64[(dirp + pos) >> 3] = BigInt(id); HEAP64[(dirp + pos + 8) >> 3] = BigInt((idx + 1) * struct_size); @@ -13817,10 +13817,10 @@ export function init(RuntimeName, PHPLoader) { ch == 112 ? HEAPU32[buf >> 2] : ch == 106 - ? HEAP64[buf >> 3] - : ch == 105 - ? HEAP32[buf >> 2] - : HEAPF64[buf >> 3] + ? HEAP64[buf >> 3] + : ch == 105 + ? HEAP32[buf >> 2] + : HEAPF64[buf >> 3] ); buf += wide ? 8 : 4; } @@ -16073,7 +16073,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, internalFormat - ) + ) : null; GLctx.texImage2D( target, @@ -16141,7 +16141,7 @@ export function init(RuntimeName, PHPLoader) { height, pixels, 0 - ) + ) : null; GLctx.texSubImage2D( target, @@ -16886,10 +16886,10 @@ export function init(RuntimeName, PHPLoader) { var type = stream.tty ? 2 : FS.isDir(stream.mode) - ? 3 - : FS.isLink(stream.mode) - ? 7 - : 4; + ? 3 + : FS.isLink(stream.mode) + ? 7 + : 4; } HEAP8[pbuf] = type; HEAP16[(pbuf + 2) >> 1] = flags; @@ -17424,7 +17424,12 @@ export function init(RuntimeName, PHPLoader) { vfsPath, obtainedLock ); - return obtainedLock ? 0 : -ERRNO_CODES.EWOULDBLOCK; + if (obtainedLock) { + locking.maybeLockedFds.add(fd); + return 0; + } else { + return -ERRNO_CODES.EWOULDBLOCK; + } } catch (e) { _js_wasm_trace( 'js_flock(%d, %d) lockWholeFile error %s', @@ -17993,10 +17998,10 @@ export function init(RuntimeName, PHPLoader) { return typeof value != 'number' || isNaN(value) ? min : value >= min - ? value <= max - ? value - : max - : min; + ? value <= max + ? value + : max + : min; } return { year: fixup(HEAP32[(tm + 20) >> 2] + 1900, 1970, 9999), @@ -18585,7 +18590,7 @@ export function init(RuntimeName, PHPLoader) { var firefoxRe = new RegExp('\\s*(.*?)@(.*?):([0-9]+):([0-9]+)'); // Extract components of form: // ' at Object._main (http://server.com/file.html:4324:12)' - var chromeRe = new RegExp('\\s*at (.*?) \\((.*):(.*):(.*)\\)'); + var chromeRe = new RegExp('\\s*at (.*?) \\\((.*):(.*):(.*)\\\)'); for (var line of lines) { var symbolName = ''; @@ -18878,11 +18883,11 @@ export function init(RuntimeName, PHPLoader) { ? convertU32PairToI53( currArg[0], currArg[1] - ) + ) : convertI32PairToI53( currArg[0], currArg[1] - ); + ); } // Truncate to requested size. if (argSize <= 4) { @@ -25028,8 +25033,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. + ? Math.max(delta, 1) + : Math.min(delta, -1); // Quantize to integer so that minimum scroll is at least +/- 1. var button = 3; // wheel up if (delta < 0) { @@ -27472,8 +27477,8 @@ export function init(RuntimeName, PHPLoader) { delta == 0 ? 0 : delta > 0 - ? Math.max(delta, 1) - : Math.min(delta, -1); + ? Math.max(delta, 1) + : Math.min(delta, -1); // Simulate old-style SDL events representing mouse wheel input as buttons // Subtract one since JS->C marshalling is defined to add one back. @@ -30294,9 +30299,7 @@ export function init(RuntimeName, PHPLoader) { surfData.ctx.restore(); }, translateColorToCSSRGBA: (rgba) => - `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${ - rgba & 0xff - })`, + `rgba(${rgba >>> 24},${(rgba >> 16) & 0xff},${(rgba >> 8) & 0xff},${rgba & 0xff})`, }; var _boxColor = (surf, x1, y1, x2, y2, color) => @@ -31070,9 +31073,9 @@ export function init(RuntimeName, PHPLoader) { socket.onclose = function (e) { var eventPtr = WS.getSocketEvent(socketId); - (HEAP8[eventPtr + 4] = e.wasClean), + ((HEAP8[eventPtr + 4] = e.wasClean), (HEAP16[(eventPtr + 6) >> 1] = e.code), - stringToUTF8(e.reason, eventPtr + 8, 512); + stringToUTF8(e.reason, eventPtr + 8, 512)); getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); }; return 0; @@ -31101,10 +31104,14 @@ export function init(RuntimeName, PHPLoader) { HEAP8.set(new Uint8Array(e.data), buf); } var eventPtr = WS.getSocketEvent(socketId); - (HEAPU32[(eventPtr + 4) >> 2] = buf), + ((HEAPU32[(eventPtr + 4) >> 2] = buf), (HEAP32[(eventPtr + 8) >> 2] = len), (HEAP8[eventPtr + 12] = isText), - getWasmTableEntry(callbackFunc)(0 /*TODO*/, eventPtr, userData); + getWasmTableEntry(callbackFunc)( + 0 /*TODO*/, + eventPtr, + userData + )); _free(buf); }; return 0; diff --git a/packages/php-wasm/node/project.json b/packages/php-wasm/node/project.json index 4a211bd351..e570139259 100644 --- a/packages/php-wasm/node/project.json +++ b/packages/php-wasm/node/project.json @@ -165,7 +165,6 @@ "php-dynamic-loading.spec.ts", "php-request-handler.spec.ts", "php.spec.ts", - "file-lock-manager-for-node.spec.ts", "php-worker.spec.ts", "php-soap.spec.ts", "php-image-extensions.spec.ts", @@ -193,7 +192,6 @@ "php-dynamic-loading.spec.ts", "php-request-handler.spec.ts", "php.spec.ts", - "file-lock-manager-for-node.spec.ts", "php-worker.spec.ts", "php-soap.spec.ts", "php-image-extensions.spec.ts", @@ -303,6 +301,29 @@ "testFiles": ["php-sqlite3.spec.ts"] } }, + "test-php-file-locking-asyncify": { + "executor": "@nx/vite:test", + "outputs": ["{workspaceRoot}/coverage/packages/php-wasm/node"], + "options": { + "reportsDirectory": "../../../coverage/packages/php-wasm/node", + "testFiles": [ + "php-file-locking.spec.ts", + "file-lock-manager-for-node.spec.ts" + ] + } + }, + "test-php-file-locking-jspi": { + "executor": "@nx/vite:test", + "outputs": ["{workspaceRoot}/coverage/packages/php-wasm/node"], + "options": { + "configFile": "packages/php-wasm/node/vite.jspi.config.ts", + "reportsDirectory": "../../../coverage/packages/php-wasm/node", + "testFiles": [ + "php-file-locking.spec.ts", + "file-lock-manager-for-node.spec.ts" + ] + } + }, "test-php-image-extensions-asyncify": { "executor": "@nx/vite:test", "outputs": ["{workspaceRoot}/coverage/packages/php-wasm/node"], diff --git a/packages/php-wasm/node/src/lib/load-runtime.ts b/packages/php-wasm/node/src/lib/load-runtime.ts index 0b49ffba38..b7db4273d4 100644 --- a/packages/php-wasm/node/src/lib/load-runtime.ts +++ b/packages/php-wasm/node/src/lib/load-runtime.ts @@ -84,6 +84,8 @@ export async function loadNodeRuntime( phpVersion: SupportedPHPVersion, options: PHPLoaderOptionsForNode = {} ) { + // TODO: Throw an error if a file lock manager is provided but not a process ID. + let emscriptenOptions: EmscriptenOptions = { /** * Emscripten default behavior is to kill the process when diff --git a/packages/php-wasm/node/src/test/file-lock-manager-for-node.spec.ts b/packages/php-wasm/node/src/test/file-lock-manager-for-node.spec.ts index a24640f0df..ea1fe556a1 100644 --- a/packages/php-wasm/node/src/test/file-lock-manager-for-node.spec.ts +++ b/packages/php-wasm/node/src/test/file-lock-manager-for-node.spec.ts @@ -3,20 +3,7 @@ import { FileLockManagerForNode } from '../lib/file-lock-manager-for-node'; import { fork } from 'child_process'; import type { ChildProcess } from 'child_process'; import { join } from 'path'; -import type { - FileLockManager, - WholeFileLockOp, -} from '../lib/file-lock-manager'; -import { createNodeFsMountHandler, loadNodeRuntime } from '../lib'; -import { - getLoadedRuntime, - PHP, - proxyFileSystem, - SupportedPHPVersions, -} from '@php-wasm/universal'; -import type { SupportedPHPVersion } from '@php-wasm/universal'; -import { joinPaths } from '@php-wasm/util'; -import { jspi } from 'wasm-feature-detect'; +import type { WholeFileLockOp } from '../lib/file-lock-manager'; import { flockSync as nativeFlockSync } from 'fs-ext'; const TEST_FILE1 = new URL('test1.txt', import.meta.url).pathname; @@ -1495,182 +1482,4 @@ describe('FileLockManagerForNode', () => { }); } }); - - const phpVersionsToTest = - 'PHP' in process.env - ? [process.env['PHP'] as SupportedPHPVersion] - : SupportedPHPVersions; - - phpVersionsToTest.forEach((phpVersion) => { - describe(`PHP ${phpVersion}: integration with primary and secondary runtimes`, async () => { - const mockFnWithResult = (await jspi()) - ? // Use async mocks for JSPI to match the async FileLockManager - // used by JSPI PHP builds. - (value: any) => vi.fn().mockResolvedValue(value) - : (value: any) => vi.fn().mockReturnValue(value); - - function createMockFileLockManager(): FileLockManager { - return { - lockWholeFile: mockFnWithResult(true), - lockFileByteRange: mockFnWithResult(true), - findFirstConflictingByteRangeLock: - mockFnWithResult(undefined), - releaseLocksForProcessFd: mockFnWithResult(undefined), - releaseLocksForProcess: mockFnWithResult(undefined), - }; - } - - // TODO: Add tests for fcntl() - - test(`should attempt to lock a NODEFS file and a PROXYFS node that wraps a NODEFS file`, async () => { - // NOTE: Normally, we would use a single file lock manager across all runtimes, - // but to keep state clearer within this test, we use a separate manager per runtime. - const fileLockManagerForRuntime1 = createMockFileLockManager(); - const ENV = { DOCROOT: '/wordpress' }; - const php1 = new PHP( - await loadNodeRuntime(phpVersion, { - emscriptenOptions: { - ENV, - fileLockManager: fileLockManagerForRuntime1, - }, - }) - ); - const realPathToMount = joinPaths( - import.meta.dirname, - 'test-data', - 'file-lock-test' - ); - php1.mount( - '/wordpress', - createNodeFsMountHandler(realPathToMount) - ); - const realPathToLock = joinPaths( - realPathToMount, - 'wp-content', - 'lock-this.txt' - ); - const vfsPathToLock = '/wordpress/wp-content/lock-this.txt'; - const phpThatAttemptsToLock = ` console.error(...args), - }, - }) - ); - proxyFileSystem(php1, php2, ['/wordpress']); - const result2 = await php2.runStream({ - code: phpThatAttemptsToLock, - }); - expect(await result2.exitCode).toBe(0); - expect( - fileLockManagerForRuntime2.lockWholeFile, - 'locking NODEFS file via PROXYFS' - ).toHaveBeenCalledWith( - realPathToLock, - expect.objectContaining({ type: 'exclusive' }) - ); - }); - - test(`should not attempt to lock a MEMFS file or a PROXYFS node that wraps a MEMFS file`, async () => { - // NOTE: Normally, we would use a single file lock manager across all runtimes, - // but to keep state clearer within this test, we use a separate manager per runtime. - const fileLockManagerForRuntime1 = createMockFileLockManager(); - const ENV = { DOCROOT: '/wordpress' }; - const php1 = new PHP( - await loadNodeRuntime(phpVersion, { - emscriptenOptions: { - ENV, - fileLockManager: fileLockManagerForRuntime1, - }, - }) - ); - php1.mkdir('/wordpress/wp-content'); - const pathNotToLock = - '/wordpress/wp-content/do-not-lock-this.txt'; - php1.writeFile(pathNotToLock, new Uint8Array(0)); - const phpThatAttemptsToLock = ` { - const opts = { - emscriptenOptions: { ENV: { DOCROOT: '/wordpress' } }, - }; - const runtime1 = getLoadedRuntime( - await loadNodeRuntime('8.3', opts) - ); - runtime1.FS.mkdir('/wordpress'); - - const runtime2 = getLoadedRuntime( - await loadNodeRuntime('8.3', opts) - ); - runtime2.FS.mkdir('/wordpress'); - - runtime2.FS.mount( - runtime2.PROXYFS, - { root: '/wordpress', fs: runtime1.FS }, - '/wordpress' - ); - - // This worked: - // runtime1.FS.mkdir('/wordpress/wp-content'); - - // Prior to a fix, this did not: - expect(() => - runtime2.FS.mkdir('/wordpress/wp-content') - ).not.toThrow(); - }); - }); - }); }); diff --git a/packages/php-wasm/node/src/test/php-file-locking.spec.ts b/packages/php-wasm/node/src/test/php-file-locking.spec.ts new file mode 100644 index 0000000000..85be099855 --- /dev/null +++ b/packages/php-wasm/node/src/test/php-file-locking.spec.ts @@ -0,0 +1,1572 @@ +import { mkdtempSync, rmSync, writeFileSync } from 'fs'; +import { join } from 'path'; +import { tmpdir } from 'os'; +import { + getLoadedRuntime, + PHP, + proxyFileSystem, + type SupportedPHPVersion, +} from '@php-wasm/universal'; +import { SupportedPHPVersions } from '@php-wasm/universal'; +import { + createNodeFsMountHandler, + FileLockManagerForNode, + loadNodeRuntime, +} from '../lib'; +import { + joinPaths, + wrapSynchronousInterfaceAsPromised, + type Promised, +} from '@php-wasm/util'; +import { jspi } from 'wasm-feature-detect'; +import type { FileLockManager } from '../lib/file-lock-manager'; + +const phpVersionsToTest = + 'PHP' in process.env + ? [process.env['PHP']! as SupportedPHPVersion] + : SupportedPHPVersions; + +describe.each(phpVersionsToTest)('PHP %s: File locking', (phpVersion) => { + const vfsMountPoint = '/test'; + + let tempDir: string; + // TODO: Use one file lock manager per test + let fileLockManager: + | FileLockManagerForNode + | Promised; + let nextProcessId: number; + + beforeEach(async () => { + tempDir = mkdtempSync(join(tmpdir(), 'php-wasm-file-locking-')); + fileLockManager = (await jspi()) + ? wrapSynchronousInterfaceAsPromised(new FileLockManagerForNode()) + : new FileLockManagerForNode(); + nextProcessId = 1; + }); + afterEach(async () => { + rmSync(tempDir, { recursive: true, force: true }); + }); + + async function createPhpRuntimeWithFileLockingAndTestMount(): Promise { + const runtimeId = await loadNodeRuntime(phpVersion, { + emscriptenOptions: { + processId: nextProcessId++, + fileLockManager: fileLockManager!, + }, + }); + const php = new PHP(runtimeId); + const errorLogPath = `${vfsMountPoint}/error.log`; + // Set php.ini to disable display_errors and log errors to a file. + php.writeFile( + '/internal/shared/php.ini', + `memory_limit = 128M +max_execution_time = 30 ; seconds +error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT +display_errors = Off +log_errors = On +error_log = ${errorLogPath} +` + ); + php.mount(vfsMountPoint, createNodeFsMountHandler(tempDir)); + return php; + } + + describe('SQLite DB locking (relying upon fcntl())', () => { + const dbFileName = 'test.db'; + const vfsDbFilePath = `${vfsMountPoint}/${dbFileName}`; + + beforeEach(async () => { + using php = await createPhpRuntimeWithFileLockingAndTestMount(); + const result = await php.runStream({ + code: `exec('CREATE TABLE test (id INTEGER PRIMARY KEY, name TEXT)'); + if ($result === false) { + echo json_encode($db->lastErrorMsg()); + exit(1); + } + $db->close(); + `, + }); + // TODO: Why does this DB file check fail for PHP 8.0 and under? The tests pass. The DB must exist. + // This is only a problem in JSPI builds. Sleeping for 500ms avoids the issue. + // const dbFilePath = join(tempDir, dbFileName); + // if (!existsSync(dbFilePath)) { + // throw new Error(`Database file not created: ${dbFilePath}`); + // } + if ((await result.exitCode) !== 0) { + throw new Error( + `Failed to create table: ${(await result.stderrText) || 'Unknown error'}` + ); + } + }); + + it('cannot write to DB while another process has an exclusive lock', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN EXCLUSIVE;'); + + // Wait until php2 notifies us by deleting the sleep file + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Locked}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ReadyForUnlock}' + ) { + usleep(100 * 1000); + } + + $db->exec('INSERT INTO test (name) VALUES ("test1")'); + $db->exec('COMMIT;'); + $db->close(); + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Unlocked}'); + `, + }); + const promisedPhp2Result = php2.run({ + code: `exec('INSERT INTO test (name) VALUES ("test-while-locked")'); + $attempt_while_exclusively_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $result = $db->exec('INSERT INTO test (name) VALUES ("test-while-unlocked")'); + $attempt_while_unlocked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + echo json_encode([ + 'attempt_while_exclusively_locked' => $attempt_while_exclusively_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + $db->close(); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_exclusively_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_while_unlocked).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('cannot read from DB while another process has an exclusive lock', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN EXCLUSIVE;'); + $db->exec('INSERT INTO test (name) VALUES ("test1")'); + + // Wait until php2 notifies us by updating the coordination file + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1WaitingForPhp2ToTry}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ReadyForUnlock}' + ) { + usleep(100 * 1000); + } + + $db->exec('COMMIT;'); + $db->close(); + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Unlocked}'); + `, + }); + const promisedPhp2Result = php2.run({ + code: `querySingle('SELECT COUNT(*) FROM test'); + $attempt_while_exclusively_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $result = $db->querySingle('SELECT COUNT(*) FROM test'); + $attempt_while_unlocked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + echo json_encode([ + 'attempt_while_exclusively_locked' => $attempt_while_exclusively_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + $db->close(); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_exclusively_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_while_unlocked).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('cannot write to DB while another process has a shared lock', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN;'); // Shared lock (read transaction) + $db->querySingle('SELECT COUNT(*) FROM test'); + + // Wait until php2 notifies us by updating the coordination file + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1WaitingForPhp2ToTry}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ReadyForUnlock}' + ) { + usleep(100 * 1000); + } + + $db->exec('COMMIT;'); + $db->close(); + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Unlocked}'); + `, + }); + const promisedPhp2Result = php2.run({ + code: `exec('INSERT INTO test (name) VALUES ("test-while-shared-locked")'); + $attempt_while_shared_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $result = $db->exec('INSERT INTO test (name) VALUES ("test-while-unlocked")'); + $attempt_while_unlocked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + echo json_encode([ + 'attempt_while_shared_locked' => $attempt_while_shared_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + $db->close(); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_shared_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_while_unlocked).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('can read from DB while another process has a shared lock', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN;'); // Shared lock (read transaction) + $db->querySingle('SELECT COUNT(*) FROM test'); + + // Wait until php2 notifies us by updating the coordination file + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1WaitingForPhp2ToTry}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ReadyForUnlock}' + ) { + usleep(100 * 1000); + } + + $db->exec('COMMIT;'); + $db->close(); + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Unlocked}'); + `, + }); + const promisedPhp2Result = php2.run({ + code: `querySingle('SELECT COUNT(*) FROM test'); + $attempt_while_shared_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + 'result' => $result, + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $result = $db->querySingle('SELECT COUNT(*) FROM test'); + $attempt_while_unlocked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + 'result' => $result, + ]; + + echo json_encode([ + 'attempt_while_shared_locked' => $attempt_while_shared_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + $db->close(); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + // Both reads should succeed with shared locks + expect(result2Data.attempt_while_shared_locked).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + expect(result2Data.attempt_while_unlocked).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('should release a shared lock when its associated process exits', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2ConfirmedDbLocked: 'php2-confirmed-db-locked', + php1EndOfScript: 'php1-end-of-script', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN;'); // Shared lock (read transaction) + $db->querySingle('SELECT COUNT(*) FROM test'); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Locked}'); + + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ConfirmedDbLocked}' + ) { + usleep(100 * 1000); + } + + // NOTE: We intentionally skip closing the database connection. + `, + }); + + const promisedPhp2Result = php2.run({ + code: `exec('INSERT INTO test (name) VALUES ("test-after-termination")'); + $attempt_while_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ConfirmedDbLocked}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1EndOfScript}' + ) { + usleep(100 * 1000); + } + + $result = $db->exec('INSERT INTO test (name) VALUES ("test-after-termination")'); + $attempt_after_exit = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + $db->close(); + + echo json_encode([ + 'attempt_while_locked' => $attempt_while_locked, + 'attempt_after_exit' => $attempt_after_exit, + ]); + `, + }); + + // Wait for php1 to exit before notifying php2. + await promisedPhp1Result; + writeFileSync(phpCoordinationFile, stages.php1EndOfScript); + + const php2Result = await promisedPhp2Result; + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_after_exit).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('should release an exclusive lock when its associated process exits', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2ConfirmedDbLocked: 'php2-confirmed-db-locked', + php1EndOfScript: 'php1-end-of-script', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN EXCLUSIVE;'); // Exclusive lock (write transaction) + $db->querySingle('SELECT COUNT(*) FROM test'); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1Locked}'); + + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ConfirmedDbLocked}' + ) { + usleep(100 * 1000); + } + + // NOTE: We intentionally skip closing the database connection. + `, + }); + + const promisedPhp2Result = php2.run({ + code: `exec('INSERT INTO test (name) VALUES ("test-after-termination")'); + $attempt_while_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ConfirmedDbLocked}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1EndOfScript}' + ) { + usleep(100 * 1000); + } + + $result = $db->exec('INSERT INTO test (name) VALUES ("test-after-termination")'); + $attempt_after_exit = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + $db->close(); + + echo json_encode([ + 'attempt_while_locked' => $attempt_while_locked, + 'attempt_after_exit' => $attempt_after_exit, + ]); + `, + }); + + // Wait for php1 to exit before notifying php2. + await promisedPhp1Result; + writeFileSync(phpCoordinationFile, stages.php1EndOfScript); + + const php2Result = await promisedPhp2Result; + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_after_exit).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + it('should release a lock when its database connection is closed', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1ClosedDbConnection: 'php1-closed-db-connection', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + const promisedPhp1Result = php1.run({ + code: `exec('BEGIN EXCLUSIVE;'); + $db->exec('INSERT INTO test (name) VALUES ("test1")'); + + // Wait until php2 notifies us by updating the coordination file + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1WaitingForPhp2ToTry}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php2ReadyForUnlock}' + ) { + usleep(100 * 1000); + } + + // Skip committing the transaction and just close the connection. + $db->close(); + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php1ClosedDbConnection}'); + + // Keep the process alive to ensure lock is released by closing fd, not process termination + while ( + file_get_contents('${vfsPhpCoordinationFile}') === '${stages.php1ClosedDbConnection}' + ) { + usleep(100 * 1000); + } + `, + }); + const promisedPhp2Result = php2.run({ + code: `exec('INSERT INTO test (name) VALUES ("test-while-locked")'); + $attempt_while_locked = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1ClosedDbConnection}' + ) { + usleep(100 * 1000); + } + + $result = $db->exec('INSERT INTO test (name) VALUES ("test-after-fd-closed")'); + $attempt_after_fd_closed = [ + 'lastErrorCode' => $db->lastErrorCode(), + 'lastErrorMsg' => $db->lastErrorMsg(), + ]; + + echo json_encode([ + 'attempt_while_locked' => $attempt_while_locked, + 'attempt_after_fd_closed' => $attempt_after_fd_closed, + ]); + $db->close(); + + // Signal php1 to exit + file_put_contents('${vfsPhpCoordinationFile}', 'done'); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked).toMatchObject({ + lastErrorCode: 5, // SQLITE_BUSY + lastErrorMsg: 'database is locked', + }); + expect(result2Data.attempt_after_fd_closed).toMatchObject({ + lastErrorCode: 0, + lastErrorMsg: 'not an error', + }); + }); + }, 5000); + + describe('PHP flock()', () => { + it('should be able to acquire an exclusive lock on a file', async () => { + using php = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const result = await php.run({ + code: ` $lockResult, + 'file_contents' => file_get_contents('${testFilePath}'), + ]); + `, + }); + + expect(result.exitCode).toBe(0); + const resultData = JSON.parse(result.text || '{}'); + expect(resultData.lock_acquired).toBe(true); + expect(resultData.file_contents).toBe('test content'); + }); + it('should be able to acquire a shared lock on a file', async () => { + using php = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const result = await php.run({ + code: ` 'Failed to open file']); + exit(1); + } + $lockResult = flock($fp, LOCK_SH | LOCK_NB); + fseek($fp, 0); + $file_contents = fread($fp, 1024); + flock($fp, LOCK_UN); + fclose($fp); + + echo json_encode([ + 'lock_acquired' => $lockResult, + 'file_contents' => $file_contents, + ]); + `, + }); + + expect(result.exitCode).toBe(0); + const resultData = JSON.parse(result.text || '{}'); + expect(resultData.lock_acquired).toBe(true); + expect(resultData.file_contents).toBe('test content'); + }); + it('should deny an exclusive lock when another process has a shared lock on a file', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $fp = fopen('${testFilePath}', 'r+'); + $lockResult = flock($fp, LOCK_EX | LOCK_NB); + $attempt_while_unlocked = [ + 'lock_acquired' => $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + echo json_encode([ + 'attempt_while_shared_locked' => $attempt_while_shared_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_shared_locked.lock_acquired).toBe( + false + ); + expect(result2Data.attempt_while_unlocked.lock_acquired).toBe(true); + }); + it('should deny a shared lock when another process has an exclusive lock on a file', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $fp = fopen('${testFilePath}', 'r+'); + $lockResult = flock($fp, LOCK_SH | LOCK_NB); + $attempt_while_unlocked = [ + 'lock_acquired' => $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + echo json_encode([ + 'attempt_while_exclusively_locked' => $attempt_while_exclusively_locked, + 'attempt_while_unlocked' => $attempt_while_unlocked, + ]); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect( + result2Data.attempt_while_exclusively_locked.lock_acquired + ).toBe(false); + expect(result2Data.attempt_while_unlocked.lock_acquired).toBe(true); + }); + it('should grant multiple shared locks on a file', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php3 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2Locked: 'php2-locked', + php3CanUnlock: 'php3-can-unlock', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $lockResult]); + `, + }); + const promisedPhp2Result = php2.run({ + code: ` $lockResult]); + `, + }); + const promisedPhp3Result = php3.run({ + code: ` $lockResult]); + `, + }); + + const [php1Result, php2Result, php3Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + promisedPhp3Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + expect(php3Result.exitCode).toBe(0); + const result1Data = JSON.parse(php1Result.text || '{}'); + const result2Data = JSON.parse(php2Result.text || '{}'); + const result3Data = JSON.parse(php3Result.text || '{}'); + // All three should be able to acquire shared locks + expect(result1Data.lock_acquired).toBe(true); + expect(result2Data.lock_acquired).toBe(true); + expect(result3Data.lock_acquired).toBe(true); + }); + it('should release a shared lock when its associated file descriptor is closed', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const vfsTestFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $fp = fopen('${vfsTestFilePath}', 'r+'); + $lockResult = flock($fp, LOCK_EX | LOCK_NB); + $attempt_after_fd_closed = [ + 'lock_acquired' => $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + echo json_encode([ + 'attempt_while_locked' => $attempt_while_locked, + 'attempt_after_fd_closed' => $attempt_after_fd_closed, + ]); + + // Signal php1 to exit + file_put_contents('${vfsPhpCoordinationFile}', 'done'); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked.lock_acquired).toBe(false); + expect(result2Data.attempt_after_fd_closed.lock_acquired).toBe( + true + ); + }); + it('should release an exclusive lock when its associated file descriptor is closed', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1WaitingForPhp2ToTry: 'php1-waiting-for-php2-to-try', + php2ReadyForUnlock: 'php2-ready-for-unlock', + php1Unlocked: 'php1-unlocked', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + file_put_contents('${vfsPhpCoordinationFile}', '${stages.php2ReadyForUnlock}'); + while ( + file_get_contents('${vfsPhpCoordinationFile}') !== '${stages.php1Unlocked}' + ) { + usleep(100 * 1000); + } + + $fp = fopen('${testFilePath}', 'r+'); + $lockResult = flock($fp, LOCK_SH | LOCK_NB); + $attempt_after_fd_closed = [ + 'lock_acquired' => $lockResult, + ]; + if ($lockResult) { + flock($fp, LOCK_UN); + } + fclose($fp); + + echo json_encode([ + 'attempt_while_locked' => $attempt_while_locked, + 'attempt_after_fd_closed' => $attempt_after_fd_closed, + ]); + + // Signal php1 to exit + file_put_contents('${vfsPhpCoordinationFile}', 'done'); + `, + }); + + const [php1Result, php2Result] = await Promise.all([ + promisedPhp1Result, + promisedPhp2Result, + ]); + expect(php1Result.exitCode).toBe(0); + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked.lock_acquired).toBe(false); + expect(result2Data.attempt_after_fd_closed.lock_acquired).toBe( + true + ); + }); + it('should release a shared lock when the owning process exits', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2ConfirmedFileLocked: 'php2-confirmed-file-locked', + php1EndOfScript: 'php1-end-of-script', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $attempt_while_locked, + 'attempt_after_exit' => $attempt_after_exit, + ]); + `, + }); + + // Wait for php1 to exit before notifying php2. + await promisedPhp1Result; + writeFileSync(phpCoordinationFile, stages.php1EndOfScript); + + const php2Result = await promisedPhp2Result; + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked).toBe(false); + expect(result2Data.attempt_after_exit).toBe(true); + }); + it('should release an exclusive lock when the owning process exits', async () => { + using php1 = await createPhpRuntimeWithFileLockingAndTestMount(); + using php2 = await createPhpRuntimeWithFileLockingAndTestMount(); + + const testFilePath = `${vfsMountPoint}/test.txt`; + const phpCoordinationFile = join( + tempDir, + 'php-instance-coordination' + ); + const vfsPhpCoordinationFile = `${vfsMountPoint}/php-instance-coordination`; + const stages = { + php1Locking: 'php1-locking', + php1Locked: 'php1-locked', + php2ConfirmedFileLocked: 'php2-confirmed-file-locked', + php1EndOfScript: 'php1-end-of-script', + } as const; + + writeFileSync(phpCoordinationFile, stages.php1Locking); + writeFileSync(join(tempDir, 'test.txt'), 'test content'); + + const promisedPhp1Result = php1.run({ + code: ` $attempt_while_locked, + 'attempt_after_exit' => $attempt_after_exit, + ]); + `, + }); + + // Wait for php1 to exit before notifying php2. + await promisedPhp1Result; + writeFileSync(phpCoordinationFile, stages.php1EndOfScript); + + const php2Result = await promisedPhp2Result; + expect(php2Result.exitCode).toBe(0); + const result2Data = JSON.parse(php2Result.text || '{}'); + expect(result2Data.attempt_while_locked).toBe(false); + expect(result2Data.attempt_after_exit).toBe(true); + }); + }, 5000); + + describe(`Additional tests with multiple php-wasm instances`, async () => { + const mockFnWithResult = (await jspi()) + ? // Use async mocks for JSPI to match the async FileLockManager + // used by JSPI PHP builds. + (value: any) => vi.fn().mockResolvedValue(value) + : (value: any) => vi.fn().mockReturnValue(value); + + function createMockFileLockManager(): FileLockManager { + return { + lockWholeFile: mockFnWithResult(true), + lockFileByteRange: mockFnWithResult(true), + findFirstConflictingByteRangeLock: mockFnWithResult(undefined), + releaseLocksForProcessFd: mockFnWithResult(undefined), + releaseLocksForProcess: mockFnWithResult(undefined), + }; + } + + // TODO: Add tests for fcntl() + + test(`should attempt to lock a NODEFS file and a PROXYFS node that wraps a NODEFS file`, async () => { + // NOTE: Normally, we would use a single file lock manager across all runtimes, + // but to keep state clearer within this test, we use a separate manager per runtime. + const fileLockManagerForRuntime1 = createMockFileLockManager(); + const ENV = { DOCROOT: '/wordpress' }; + const php1 = new PHP( + await loadNodeRuntime(phpVersion, { + emscriptenOptions: { + ENV, + fileLockManager: fileLockManagerForRuntime1, + }, + }) + ); + const realPathToMount = joinPaths( + import.meta.dirname, + 'test-data', + 'file-lock-test' + ); + php1.mount('/wordpress', createNodeFsMountHandler(realPathToMount)); + const realPathToLock = joinPaths( + realPathToMount, + 'wp-content', + 'lock-this.txt' + ); + const vfsPathToLock = '/wordpress/wp-content/lock-this.txt'; + const phpThatAttemptsToLock = ` { + // NOTE: Normally, we would use a single file lock manager across all runtimes, + // but to keep state clearer within this test, we use a separate manager per runtime. + const fileLockManagerForRuntime1 = createMockFileLockManager(); + const ENV = { DOCROOT: '/wordpress' }; + const php1 = new PHP( + await loadNodeRuntime(phpVersion, { + emscriptenOptions: { + ENV, + fileLockManager: fileLockManagerForRuntime1, + }, + }) + ); + php1.mkdir('/wordpress/wp-content'); + const pathNotToLock = '/wordpress/wp-content/do-not-lock-this.txt'; + php1.writeFile(pathNotToLock, new Uint8Array(0)); + const phpThatAttemptsToLock = ` { + const opts = { + emscriptenOptions: { ENV: { DOCROOT: '/wordpress' } }, + }; + const runtime1 = getLoadedRuntime( + await loadNodeRuntime('8.3', opts) + ); + runtime1.FS.mkdir('/wordpress'); + + const runtime2 = getLoadedRuntime( + await loadNodeRuntime('8.3', opts) + ); + runtime2.FS.mkdir('/wordpress'); + + runtime2.FS.mount( + runtime2.PROXYFS, + { root: '/wordpress', fs: runtime1.FS }, + '/wordpress' + ); + + // This worked: + // runtime1.FS.mkdir('/wordpress/wp-content'); + + // Prior to a fix, this did not: + expect(() => + runtime2.FS.mkdir('/wordpress/wp-content') + ).not.toThrow(); + }); + }); +}); diff --git a/packages/php-wasm/supported-php-versions.mjs b/packages/php-wasm/supported-php-versions.mjs index 273626eaaa..d9b2d139b0 100644 --- a/packages/php-wasm/supported-php-versions.mjs +++ b/packages/php-wasm/supported-php-versions.mjs @@ -6,7 +6,7 @@ * @property {string} lastRelease */ -export const lastRefreshed = '2025-10-30T23:23:11.157Z'; +export const lastRefreshed = '2025-11-17T21:11:03.969Z'; /** * @type {PhpVersion[]} diff --git a/packages/php-wasm/util/src/lib/index.ts b/packages/php-wasm/util/src/lib/index.ts index 6567c0bbfa..cef1d75061 100644 --- a/packages/php-wasm/util/src/lib/index.ts +++ b/packages/php-wasm/util/src/lib/index.ts @@ -36,4 +36,4 @@ export function concatArrayBuffers(buffers: ArrayBuffer[]): ArrayBuffer { .buffer as ArrayBuffer; } -export * from './types'; +export * from './promised'; diff --git a/packages/php-wasm/util/src/lib/promised.ts b/packages/php-wasm/util/src/lib/promised.ts new file mode 100644 index 0000000000..5a821e717c --- /dev/null +++ b/packages/php-wasm/util/src/lib/promised.ts @@ -0,0 +1,67 @@ +// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type +type PromisedMethod any> = ( + ...args: Parameters +) => Promise>; + +export type Promised = { + [P in keyof T]: T[P] extends (...args: any[]) => any + ? PromisedMethod + : T[P]; +}; + +/** + * Wraps a synchronous interface as a promised interface. + * + * This function tries to avoid wrapping methods inherited from + * built-in JS object types (e.g., `Object`, `Array`, `Function`, etc.). + * + * The initial use case for this function is for unit testing + * file locking in php-wasm. Php-wasm for JSPI expects the file lock manager + * to be a promised interface used via comlink, + * but the interface itself is synchronous. + * + * @param obj + * @returns A promised interface that wraps the synchronous interface. + */ +export function wrapSynchronousInterfaceAsPromised( + obj: T +): Promised { + const keysAlreadySeen = new Set(); + const keysToMakePromised = new Set(); + const looksLikeBuiltInObject = + // NOTE: We don't generally add custom things to the global scope, + // so let's use this as a heuristic to determine if an object is a built-in object type. + (obj: object) => + (globalThis as any)[obj.constructor.name] !== obj.constructor; + + let proto: object = obj; + while (proto !== null && !looksLikeBuiltInObject(proto)) { + const allKeys = [ + ...Object.getOwnPropertyNames(proto), + ...Object.getOwnPropertySymbols(proto), + ]; + for (const key of allKeys) { + if ( + // Track keys already seen so an inherited method property + // masked by a descendant property of the same name is not considered. + !keysAlreadySeen.has(key) && + !keysToMakePromised.has(key) && + typeof (proto as any)[key] === 'function' + ) { + keysToMakePromised.add(key); + } + keysAlreadySeen.add(key); + } + proto = Object.getPrototypeOf(proto); + } + + // NOTE: We could use Proxy here instead, + // but providing a regular object is ultimately simpler. + const promisifiedObj = Object.create(obj); + for (const key of keysToMakePromised) { + promisifiedObj[key] = function (...args: any[]) { + return Promise.resolve((obj as any)[key](...args)); + }; + } + return promisifiedObj; +} diff --git a/packages/php-wasm/util/src/lib/types.ts b/packages/php-wasm/util/src/lib/types.ts deleted file mode 100644 index 4467eb3a99..0000000000 --- a/packages/php-wasm/util/src/lib/types.ts +++ /dev/null @@ -1,10 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -type PromisedMethod any> = ( - ...args: Parameters -) => Promise>; - -export type Promised = { - [P in keyof T]: T[P] extends (...args: any[]) => any - ? PromisedMethod - : T[P]; -}; diff --git a/packages/playground/blueprints/bin/generate-schema.js b/packages/playground/blueprints/bin/generate-schema.js index 8a2700edda..c7fd4e18cd 100644 --- a/packages/playground/blueprints/bin/generate-schema.js +++ b/packages/playground/blueprints/bin/generate-schema.js @@ -67,7 +67,7 @@ const rawSchemaString = JSON.stringify(schema, null, 2) // Use prettier to make the generated text more readable // and to avoid differing with the files formatted by pre-commit hook. const prettierConfig = JSON.parse(fs.readFileSync('.prettierrc', 'utf8')); -const formattedSchemaString = prettier.format(rawSchemaString, { +const formattedSchemaString = await prettier.format(rawSchemaString, { ...prettierConfig, parser: 'json', }); @@ -84,8 +84,8 @@ const ajv = new Ajv({ const validate = ajv.compile(schema); const rawValidationCode = ajvStandaloneCode(ajv, validate); -const formattedValidationCode = prettier.format( - rawValidationCode, - prettierConfig -); +const formattedValidationCode = await prettier.format(rawValidationCode, { + ...prettierConfig, + parser: 'babel', +}); fs.writeFileSync(validator_output_path, formattedValidationCode); diff --git a/packages/playground/blueprints/public/blueprint-schema-validator.js b/packages/playground/blueprints/public/blueprint-schema-validator.js index 65f1ac0c79..a3c79ce5e6 100644 --- a/packages/playground/blueprints/public/blueprint-schema-validator.js +++ b/packages/playground/blueprints/public/blueprint-schema-validator.js @@ -10340,7 +10340,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } var valid21 = @@ -11019,7 +11019,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } var valid27 = @@ -11435,7 +11435,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -11467,7 +11467,7 @@ function validate14( ? validate18.errors : vErrors.concat( validate18.errors - ); + ); errors = vErrors.length; } @@ -11553,7 +11553,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -12101,7 +12101,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -12133,7 +12133,7 @@ function validate14( ? validate18.errors : vErrors.concat( validate18.errors - ); + ); errors = vErrors.length; } @@ -12219,7 +12219,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -13969,7 +13969,7 @@ function validate14( ? validate30.errors : vErrors.concat( validate30.errors - ); + ); errors = vErrors.length; } var valid54 = @@ -15456,7 +15456,7 @@ function validate14( ? validate32.errors : vErrors.concat( validate32.errors - ); + ); errors = vErrors.length; } var valid68 = @@ -16180,7 +16180,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } var valid76 = @@ -16810,7 +16810,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } var valid83 = @@ -17589,7 +17589,7 @@ function validate14( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -18636,7 +18636,7 @@ function validate14( ? validate18.errors : vErrors.concat( validate18.errors - ); + ); errors = vErrors.length; } @@ -20513,7 +20513,7 @@ function validate11( ? validate12.errors : vErrors.concat( validate12.errors - ); + ); errors = vErrors.length; } @@ -21127,7 +21127,7 @@ function validate11( ? validate14.errors : vErrors.concat( validate14.errors - ); + ); errors = vErrors.length; }