Skip to content

v2.14.0

Choose a tag to compare

@gmpassos gmpassos released this 18 Jul 21:33
· 127 commits to master since this release
d81bbb6

Wasm: String == / String != content equality

String == String and String != String now compile to content equality via the __streq synth helper (the same byte comparison already used for switch cases and Map<String, …> key lookups), instead of letting the two String handles flow into a numeric comparison — which tested pointer identity and, once the handles reached an i64.eq, produced invalid Wasm.

The result is a proper bool, so it can be returned directly, used as an if / && / || condition, or otherwise combined logically. != inverts the helper's result with i32.eqz.

Adds a dual-harness test (AST interpreter + compiled Wasm parity) covering literal/variable operands, the empty string, if-conditions and logical AND.