Stream: git-wasmtime

Topic: wasmtime / PR #4202 Refactor some internals of wasmtime-c...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 17:55):

alexcrichton opened PR #4202 from refactor-cranelift-obj-builder to main:

In an effort to make future PRs for component-model functionality smaller I'm splitting off pieces into smaller PRs to get independently reviewed ahead of time. This round of refactorings for wasmtime-cranelift is targeted at splitting out pieces which will be used for the component model. Specifically the wasm-to-host trampoline function was split into components (hah) and the ObjectBuilder type was refactored to remove unwind information and additionally split out dwarf processing into the main Compiler type.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 17:55):

alexcrichton requested fitzgen for a review on PR #4202.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 18:15):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 18:15):

bjorn3 created PR review comment:

       // Write all debug data relocations.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 18:24):

alexcrichton updated PR #4202 from refactor-cranelift-obj-builder to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 19:47):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 19:47):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 19:47):

fitzgen created PR review comment:

Pre-existing, but why do we pass host_fn as a usize rather than a function pointer with the appropriate signature that we then cast to an integer here?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 20:39):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 20:39):

alexcrichton created PR review comment:

That's a good question...

Looking into it it appears that it's because the compiler type is defined in the wasmtime-environ crate but the types for the function pointer signature (e.g. VMContext and ValRaw) are located in the wasmtime-runtime crate which wasmtime-cranelift doesn't depend on, so I think the dependency tree is thwarting that plumbing of information.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2022 at 20:39):

alexcrichton merged PR #4202.


Last updated: Oct 23 2024 at 20:03 UTC