Stream: git-wasmtime

Topic: wasmtime / PR #5419 Decouple `MachBufferFinalized<Stencil...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 12 2022 at 18:12):

saulecabrera opened PR #5419 from refactor-apply-params to main:

This commit allows retrieving a MachBufferFinalized<Final> from a MachBufferFinalized<Stencil> without relying on
ir::FunctionParameters. Instead it uses the function's base source location, which is the only piece used by the previous apply_params definition.

This change allows other uses cases (e.g. Winch) to use an opaque, common concept, exposed outside of cranelift-codegen to get the finalized state of the machine buffer. This change implies that Winch will transitively know about the Stencil compilation phase, but the Stencil phase is not exposed to Winch.

Other alternatives considered:

Parametrizing MachBufferFinzalized in a way such that it allows specifying which compilation phase the caller is targetting. Such approach would require also parametrizing the MachSrcLoc definition. One of the main drawbacks of this approach is that it also requires changing how the MachBuffer's start_srcloc works: for caller requesting a Final MachBufferFinalized, the MachBuffer will need to work in terms of SourceLoc rather than in RelSourceLoc terms. This approach doesn't necessarily present more advantages than the approach presented in this change, in which there's no need to make any fundamental changes and in which all the cranelift-codegen primitives are already exposed.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Dec 12 2022 at 18:12):

saulecabrera requested cfallin for a review on PR #5419.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 12 2022 at 20:28):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 12 2022 at 20:38):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 13 2022 at 11:37):

bnjbvr submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 13 2022 at 12:13):

saulecabrera merged PR #5419.


Last updated: Dec 23 2024 at 12:05 UTC