Skip to content

Conversation

@dicej
Copy link
Collaborator

@dicej dicej commented Jan 13, 2026

Recent discussions 1 regarding optimizing reentrance checks in fused adapters have resulted in a plan to disallow lowering a lift where the lowering instance is an ancestor of the lifting instance or vice-versa. A bunch of tests in fused.wast were doing that, so I've updated them to not do that.

In addition, I'm about to open a Wasmtime PR to enforce the new rule and subsume existing code that created "degenerate adapter" functions for self-to-self lift/lower pairs. Consequently, I've updated adapter.wast to expect a "cannot enter component instance" trap instead of a "degenerate component adapter" one.

Footnotes

  1. https://bytecodealliance.zulipchat.com/#narrow/channel/217126-wasmtime/topic/Wasmtime.20sync.3C-.3Esync.20adapter.20optimizability

Recent discussions [^1] regarding optimizing reentrance checks in fused adapters
have resulted in a plan to disallow lowering a lift where the lowering instance
is an ancestor of the lifting instance or vice-versa.  A bunch of tests in
`fused.wast` were doing that, so I've updated them to not do that.

In addition, I'm about to open a Wasmtime PR to enforce the new rule and subsume
existing code that created "degenerate adapter" functions for self-to-self
lift/lower pairs.  Consequently, I've updated `adapter.wast` to expect a "cannot
enter component instance" trap instead of a "degenerate component adapter" one.

[^1]: https://bytecodealliance.zulipchat.com/#narrow/channel/217126-wasmtime/topic/Wasmtime.20sync.3C-.3Esync.20adapter.20optimizability
Copy link
Member

@lukewagner lukewagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! (I plan to update #589 soon to match.)

@lukewagner lukewagner merged commit ac37fe9 into WebAssembly:main Jan 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants