Commit d00c96f
Add round() → f64.nearest support in WAT code generator
The WAT generator was silently emitting `f64.const 0` for calls to
round()/arrondir(), causing incorrect results (always 0) in WASM
modules that use rounding. Add _ROUND_NAMES to the builtin alias set
and lower round(x) to the f64.nearest instruction.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 74f6e0a commit d00c96f
2 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
1133 | 1134 | | |
1134 | 1135 | | |
1135 | 1136 | | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1136 | 1141 | | |
1137 | 1142 | | |
1138 | 1143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments