pchickey opened PR #10616 from bytecodealliance:pch/component_instancetyped_owned to bytecodealliance:main:
Having refs to a pair of arcs made it less expensive to create an InstanceType, but tied its to a borrow of the ComponentInstance (transitively the Store) which makes some new typechecking operations which have an AsContextMut impossible.
This has no direct benefit in this PR, but it split out of #10610 because it is more easily reviewed in isolation.
<!--
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
-->
pchickey requested alexcrichton for a review on PR #10616.
pchickey requested wasmtime-core-reviewers for a review on PR #10616.
pchickey updated PR #10616.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
We talked briefly about this on Zulip, but this is the call that I'm worried about perf-wise. This is used during lifting/lowering of
ResourceAny(transitively through theresource_typehelper method which delegates to this one). I'd prefer to keep theArc-cloning off the hot path there if possible, but I need to read up more on the other PR for better understanding the motivation behind this one.
pchickey created PR review comment:
Agreed, thanks for finding where it was in the hot path, I missed that. If for some reason the approach you outlined in #10610 doesn't cash out I will at very least make sure we can amortize the clone to only happen once per store, so it doesn't hurt resource lifting/lowering.
pchickey submitted PR review.
pchickey commented on PR #10616:
Replaced by #10621
pchickey closed without merge PR #10616.
Last updated: Dec 06 2025 at 06:05 UTC