Skip to content

Inline {enter,exit}_sync_call trampolines into sync-to-sync fused adapters#13695

Open
fitzgen wants to merge 7 commits into
bytecodealliance:mainfrom
fitzgen:inline-enter-exit-sync-call-in-sync-to-sync-adapters
Open

Inline {enter,exit}_sync_call trampolines into sync-to-sync fused adapters#13695
fitzgen wants to merge 7 commits into
bytecodealliance:mainfrom
fitzgen:inline-enter-exit-sync-call-in-sync-to-sync-adapters

Conversation

@fitzgen

@fitzgen fitzgen commented Jun 19, 2026

Copy link
Copy Markdown
Member

See each commit for details.

fitzgen added 6 commits June 18, 2026 15:56
This commit inlines fast paths for the `{enter,exit}_sync_call` component
trampolines in sync-to-sync fused adapters. For cross-component calls of trivial
functions, after inlining, we should avoid all calls in the fused adapter (other
than the `trap` libcall when `may_leave` is set).

The inlining happens during translation, rather than via the regular inliner,
since the lazy thread is stack-allocated within the fused adapter; there would
otherwise be no easy way to reference it.

Fixes bytecodealliance#12311
@fitzgen fitzgen requested a review from alexcrichton June 19, 2026 00:08
@fitzgen fitzgen requested review from a team as code owners June 19, 2026 00:08
@github-actions github-actions Bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant