alexcrichton opened PR #11939 from alexcrichton:more-trampoline-compiler-refactors to bytecodealliance:main:
This is a follow-up to #11932 where the
TrampolineCompilertype is further specialized to just working with the wasm ABI instead of trying to multiplex two ABIs now that the array ABI is handled by calling the wasm ABI. This involved purging theself.abifield and updating all callers as appropriate.This then performed some small refactoring to use
TrampolineCompilerfor compiler intrinsics. Unsafe intrinsics also now have the same strategy of calling the wasm ABI trampoline when compiling for the array ABI. This should ensure that all entry trampolines are going through the same function.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested cfallin for a review on PR #11939.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11939.
alexcrichton requested dicej for a review on PR #11939.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11939.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
cc @fitzgen on this. One reason is that cranelift inlining doesn't support
get_exception_handler_addressbut even if it did we couldn't properly inline in entry trampolines because we wouldn't have the right handler recorded at all call points. To handle that I disabled inlining into these callers no matter what.My thinking is that these aren't perf-sensitive and if they are we need to figure something else out other than inlining.
alexcrichton updated PR #11939.
github-actions[bot] commented on PR #11939:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "wasmtime:api", "winch"Thus the following users have been cc'd because of the following labels:
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
dicej submitted PR review:
LGTM, and should make adding new trampolines easier to do correctly. Thanks for doing this!
dicej created PR review comment:
// get inlined or if the `try_call` goes away. Prevent all inlining
dicej submitted PR review.
alexcrichton updated PR #11939.
alexcrichton has enabled auto merge for PR #11939.
alexcrichton merged PR #11939.
Last updated: Dec 06 2025 at 06:05 UTC