Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ jobs:
executor: linux-python
environment:
EMTEST_SKIP_NEW_CMAKE: "1"
EMTEST_SKIP_WASM64: "1"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does bun not support wasm64?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably does, but trying it out quickly it was failing. wasm64 tests use to be skipped on bun, so this really just restores the old behavior. I think we should enable in another PR.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How were they skipped before? In general I try not to ever implicitly skip any tests. But maybe this case was one that I fixed recently ? (i.e. did I remove the implicit skipping?)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same reason as the deno commit in this PR. This commit changed how it worked. We use always skip deno and bun before that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see yes, fair enough. They we being auto-skipped before.

steps:
- checkout
- pip-install
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
11 changes: 0 additions & 11 deletions src/lib/libpthread.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/lib/libwasm_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/parseTools.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''!
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/pthread_esm_startup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading