diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e2cb2c4e9bda..fef28dfe1b890 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -884,6 +884,7 @@ jobs: executor: linux-python environment: EMTEST_SKIP_NEW_CMAKE: "1" + EMTEST_SKIP_WASM64: "1" steps: - checkout - pip-install @@ -1389,9 +1390,9 @@ workflows: - test-core0: requires: - build-linux - #- test-core2: - # requires: - # - build-linux + - test-core2: + requires: + - build-linux - test-core3: requires: - build-linux @@ -1410,9 +1411,9 @@ workflows: - test-modularize-instance: requires: - build-linux - #- test-esm-integration: - # requires: - # - build-linux + - test-esm-integration: + requires: + - build-linux - test-stress: requires: - build-linux @@ -1434,14 +1435,14 @@ workflows: - test-sockets-chrome: requires: - build-linux - #- test-bun - #- test-deno - #- test-jsc + - test-bun + - test-deno + - test-jsc - test-spidermonkey - #- test-node-compat - #- test-windows - #- test-windows-browser-firefox + - test-node-compat + - test-windows + - test-windows-browser-firefox - build-windows-launcher - #- test-mac-arm64: - # requires: - # - build-linux + - test-mac-arm64: + requires: + - build-linux diff --git a/src/lib/libpthread.js b/src/lib/libpthread.js index e084c3c49dc4e..2707e1897a55f 100644 --- a/src/lib/libpthread.js +++ b/src/lib/libpthread.js @@ -30,17 +30,6 @@ const MAX_PTR = Number((2n ** 64n) - 1n); const MAX_PTR = (2 ** 32) - 1 #endif -// Message IDs used when communicating with workers via postMessage. -const CMD_LOAD = 1; -const CMD_RUN = 2; -const CMD_LOADED = 3; -const CMD_CHECK_MAILBOX = 4; -const CMD_SPAWN_THREAD = 5; -const CMD_CLEANUP_THREAD = 6; -const CMD_MARK_AS_FINISHED = 7; -const CMD_UNCAUGHT_EXN = 8; -const CMD_CALL_HANDLER = 9; - #if WASM_ESM_INTEGRATION const pthreadWorkerScript = TARGET_BASENAME + '.pthread.mjs'; #else diff --git a/src/lib/libwasm_worker.js b/src/lib/libwasm_worker.js index 89c569592e631..04e3fbe8190b0 100644 --- a/src/lib/libwasm_worker.js +++ b/src/lib/libwasm_worker.js @@ -22,10 +22,6 @@ #endif // ~WASM_WORKERS {{{ -#if !PTHREADS - // In pthread builds this gets defined in libpthread.js - const CMD_UNCAUGHT_EXN = 8; -#endif const workerSupportsFutexWait = () => AUDIO_WORKLET ? "!ENVIRONMENT_IS_AUDIO_WORKLET" : '1'; const wasmWorkerJs = ` #if MINIMAL_RUNTIME diff --git a/src/parseTools.mjs b/src/parseTools.mjs index 54c33952b2b90..6678b35e3cc5c 100644 --- a/src/parseTools.mjs +++ b/src/parseTools.mjs @@ -32,6 +32,17 @@ const FLOAT_TYPES = new Set(['float', 'double']); // Represents a browser version that is not supported at all. const TARGET_NOT_SUPPORTED = 0x7fffffff; +// Message IDs used when communicating with workers via postMessage. +export const CMD_LOAD = 1; +export const CMD_RUN = 2; +export const CMD_LOADED = 3; +export const CMD_CHECK_MAILBOX = 4; +export const CMD_SPAWN_THREAD = 5; +export const CMD_CLEANUP_THREAD = 6; +export const CMD_MARK_AS_FINISHED = 7; +export const CMD_UNCAUGHT_EXN = 8; +export const CMD_CALL_HANDLER = 9; + // Does simple 'macro' substitution, using Django-like syntax, // {{{ code }}} will be replaced with |eval(code)|. // NOTE: Be careful with that ret check. If ret is |0|, |ret ? ret.toString() : ''| would result in ''! @@ -1208,6 +1219,15 @@ addToCompileTimeContext({ TARGET_NOT_SUPPORTED, WASM_PAGE_SIZE, ENVIRONMENT_IS_MAIN_THREAD, + CMD_LOAD, + CMD_RUN, + CMD_LOADED, + CMD_CHECK_MAILBOX, + CMD_SPAWN_THREAD, + CMD_CLEANUP_THREAD, + CMD_MARK_AS_FINISHED, + CMD_UNCAUGHT_EXN, + CMD_CALL_HANDLER, ENVIRONMENT_IS_WORKER_THREAD, addAtExit, addAtPreRun, diff --git a/src/pthread_esm_startup.mjs b/src/pthread_esm_startup.mjs index 87d652e06ad02..57156eda5ff70 100644 --- a/src/pthread_esm_startup.mjs +++ b/src/pthread_esm_startup.mjs @@ -34,7 +34,7 @@ self.onmessage = async (msg) => { #if RUNTIME_DEBUG console.log('pthread_esm_startup', msg.data.cmd); #endif - if (msg.data.cmd == 'load') { + if (msg.data.cmd == {{{ CMD_LOAD }}}) { // Until we initialize the runtime, queue up any further incoming messages // that can arrive while the async import (await import below) is happening. // For examples the `run` message often arrives right away before the import diff --git a/test/common.py b/test/common.py index faf500209c2ec..266ce1defba25 100644 --- a/test/common.py +++ b/test/common.py @@ -524,7 +524,12 @@ def require_wasm64(self): self.require_engine(v8) return - self.fail('either d8 or node >= 24 required to run wasm64 tests. Use EMTEST_SKIP_WASM64 to skip') + deno = get_deno() + if deno: + self.require_engine(deno) + return + + self.fail('either d8, node >= 24 or deno required to run wasm64 tests. Use EMTEST_SKIP_WASM64 to skip') def try_require_node_version(self, major, minor=0, revision=0): nodejs = get_nodejs()