Skip to content

Make use externref + multivalue to speed up emscripten_atomic_wait_suspending - #26964

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:emscripten_promise_await_unchecked_asm
Open

Make use externref + multivalue to speed up emscripten_atomic_wait_suspending#26964
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:emscripten_promise_await_unchecked_asm

Conversation

@sbc100

@sbc100 sbc100 commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Currently blocked on WebAssembly/binaryen#3739.

Mostly uploading as an example of how its possible to use externref (in both C and asm code) and multi-value (in JS and asm code) today.

@sbc100
sbc100 requested review from dschuff, kripken, tlively and trybka May 15, 2026 20:21

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you gate this change on JSPI being enabled? I'd say it's unlikely that we will update Asyncify to support reference types.

Comment thread src/lib/libatomic.js Outdated
@sbc100

sbc100 commented May 15, 2026

Copy link
Copy Markdown
Collaborator Author

Can you gate this change on JSPI being enabled? I'd say it's unlikely that we will update Asyncify to support reference types.

We would need to have a custom version of libc (or some other support library) in that case. Right now we don't have an ASYNCIFY build of or libc or a JSPI one.. its all the same.

@sbc100
sbc100 force-pushed the emscripten_promise_await_unchecked_asm branch from aad737e to 18e7297 Compare August 10, 2026 22:32
@sbc100
sbc100 force-pushed the emscripten_promise_await_unchecked_asm branch 2 times, most recently from d16a4dc to 85244b7 Compare August 24, 2026 15:35
Comment thread tools/maint/gen_sig_info.py Outdated
@sbc100
sbc100 force-pushed the emscripten_promise_await_unchecked_asm branch from 85244b7 to 80db48e Compare August 24, 2026 20:38

@tlively tlively left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense in general, but it would be worth checking to make sure Binaryen doesn't butcher the codegen around this too badly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants