alexcrichton requested fitzgen for a review on PR #9743.
alexcrichton opened PR #9743 from alexcrichton:pulley-enumerate-host-calls
to bytecodealliance:main
:
This commit is a continuation of the plan of implementing host calls in Pulley through #9665, #9675, and #9693. Here the
Compiler::call_indirect_host
method is updated to take a new type,HostCall
, which indicates what type of host call is being performed. This is then serialized to a 32-bit integer which will be present in the pulley instruction being generated. This 32-bit integer will then be used to perform a dispatch (the dispatch is left for a future PR with more Pulley integration).This new
HostCall
structure is defined withBuiltinFunctionIndex
internally. Additionally a newComponentBuiltinFunctionIndex
is added to enumerate the same set of indexes for components as well. Along the way the split between component transcoders/builtins were removed and they're now all lumped together in one macro for builtins. (no need to have two separate macros).This new
HostCall
is used to implement thecall_indirect_host
instruction for Pulley to fill out an unimplemented piece of code.<!--
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 wasmtime-core-reviewers for a review on PR #9743.
fitzgen commented on PR #9743:
Along the way the split between component transcoders/builtins were removed and they're now all lumped together in one macro for builtins. (no need to have two separate macros).
Yessssss
fitzgen submitted PR review:
LGTM modulo a nitpick around naming
fitzgen created PR review comment:
Yeah let's call this
count
orlen
or something instead ofmax
.
fitzgen created PR review comment:
Nitpick: If
max
returns the maximum index then this should bemax + 1
. Ifmax
returns the number of builtins then we should rename it tolen
orcount
or something.Ditto just above.
fitzgen submitted PR review.
alexcrichton updated PR #9743.
alexcrichton has enabled auto merge for PR #9743.
alexcrichton merged PR #9743.
Last updated: Dec 23 2024 at 12:05 UTC