Wasm backend: collection-to-String + dynamic arithmetic on boxed values
Map/List→Stringcoercion inprint(...)/ string interpolation (e.g.print('Map: $m'),'$list'), rendering Dart's{k: v, …}/[e, …]form.- Arithmetic and comparison on boxed
Object/dynamicoperands (e.g. values read from aList<Object>:args[1] + 5,args[2] ~/ 2,c > 120) — unboxed to a concrete number (runtime box-tag dispatch:int→i64,double→f64) before the operation. - A boxed
Objectvalue flowing into a typed numericMap/Listslot is unboxed to match thei64/f64slot width.
Wasm backend: anonymous functions assigned to a var and called directly
- Lambdas stored in a
varand invoked by name now compile (var twice = (int n) => n * 2; … twice(x)). The return type is inferred from the body when no typed call context provides it, and the variable adopts the closure's concrete signature. - Fixed anonymous functions being exported with an empty name (two closures collided on the same
""export name → invalid module). They are internal/table-dispatched and no longer exported. - Optimization: a capture-free closure assigned to a
varthat is only ever called (never used as a value, reassigned, or captured) is lowered to a directcall— no environment heap allocation, nocall_indirect, and the function-table / element sections are omitted. Closures used as first-class values or that capture variables keep the environment + table path.
Validated on the native wasm_run runtime and on Chrome (WasmGC).
Full changes: https://github.com/ApolloVM/apollovm_dart/blob/master/CHANGELOG.md