Skip to content

v0.1.44

Choose a tag to compare

@gmpassos gmpassos released this 27 Jun 07:38
· 280 commits to master since this release
2215a20

Wasm backend: rich-enum field/method reads in a print context

Fixes garbage values when a rich-enum instance field or method result was passed through print(...) / string interpolation (e.g. print(p.gravity), print('${p.mult(2)}')).

The lazily-generated enum-entry initializer baked its constructor call index during an early discovery pass, before the print/double_to_str host imports were registered; those imports then shifted every function index, so the cached call landed on a host import instead of the enum constructor. Enum-entry initializer bodies are now generated lazily (after the import count is final), so the call indices resolve correctly.

Validated on the native wasm_run runtime and on Chrome (WasmGC).

Full changes: https://github.com/ApolloVM/apollovm_dart/blob/master/CHANGELOG.md