Skip to content

Improve roundtrip test to go through waffle machinery#11

Merged
cfallin merged 1 commit intobytecodealliance:mainfrom
daxhuiberts:improve-roundtrip-test
Feb 26, 2026
Merged

Improve roundtrip test to go through waffle machinery#11
cfallin merged 1 commit intobytecodealliance:mainfrom
daxhuiberts:improve-roundtrip-test

Conversation

@daxhuiberts
Copy link
Contributor

When creating a Module with from_wasm_bytes and then outputting again with to_wasm_bytes never touches the waffle machinery.
That is because from_wasm_bytes creates unexpanded FuncDecl::Lazy variants and those are outputted as is when calling to_wasm_bytes.
This change ensures that all function bodies are expanded and gone through the optimization step.

When creating a `Module` with `from_wasm_bytes` and then outputting again with `to_wasm_bytes` never touches the waffle machinery.
That is because `from_wasm_bytes` creates unexpanded `FuncDecl::Lazy` variants and those are outputted as is when calling `to_wasm_bytes`.
This change ensures that all function bodies are expanded and gone through the optimization step.
@daxhuiberts daxhuiberts force-pushed the improve-roundtrip-test branch from dfaf8b5 to 80a25a9 Compare February 26, 2026 06:56
@cfallin
Copy link
Member

cfallin commented Feb 26, 2026

Ah, thank you for catching this! I failed to update the test after implementing lazy function expansion...

@cfallin cfallin merged commit d7e6b0c into bytecodealliance:main Feb 26, 2026
3 checks 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