Stream: git-wasmtime

Topic: wasmtime / Issue #2449 Add FuncEnvironment hooks to gener...


view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 17:06):

alexcrichton commented on Issue #2449:

I'm not 100% familiar with our codegen, but for prologue generation does this also need to hook into Operator::Return?

view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 17:18):

cfallin commented on Issue #2449:

Yep, one needs to hook prior to returns to catch all exits (i.e. not just fallthroughs in void-returning functions), but for simplicity/orthogonality I opted to let the embedder handle that separately (e.g. in my Lucet patch here) -- these hooks are "before/after in the static layout sense". Actually I had originally been hoping the existing hooks would be enough, but the function-with-fallthrough-return case was what motivated this patch :-)

view this post on Zulip Wasmtime GitHub notifications bot (Nov 25 2020 at 17:21):

cfallin edited a comment on Issue #2449:

Yep, one needs to hook prior to returns to catch all exits (i.e. not just fallthroughs in void-returning functions), but for simplicity/orthogonality I opted to let the embedder handle that separately (e.g. in my Lucet patch here) -- these hooks are "before/after in the static layout sense". Actually I had originally been hoping the existing hooks would be enough, but the function-with-fallthrough-return case was what motivated this patch :-)


Last updated: Nov 22 2024 at 17:03 UTC