Stream: git-wasmtime

Topic: wasmtime / PR #9743 Enumerate all host calls in `wasmtime...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 18:51):

alexcrichton requested fitzgen for a review on PR #9743.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 18:51):

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 with BuiltinFunctionIndex internally. Additionally a new ComponentBuiltinFunctionIndex 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 the call_indirect_host instruction for Pulley to fill out an unimplemented piece of code.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 18:51):

alexcrichton requested wasmtime-core-reviewers for a review on PR #9743.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 19:21):

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

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:04):

fitzgen submitted PR review:

LGTM modulo a nitpick around naming

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:04):

fitzgen created PR review comment:

Yeah let's call this count or len or something instead of max.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:04):

fitzgen created PR review comment:

Nitpick: If max returns the maximum index then this should be max + 1. If max returns the number of builtins then we should rename it to len or count or something.

Ditto just above.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:04):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:09):

alexcrichton updated PR #9743.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:10):

alexcrichton has enabled auto merge for PR #9743.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 05 2024 at 20:42):

alexcrichton merged PR #9743.


Last updated: Dec 23 2024 at 12:05 UTC