You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@
28
28
}
29
29
```
30
30
31
+
* Constant folding for JavaScript inequality operators ([#3645](https://github.com/evanw/esbuild/issues/3645))
32
+
33
+
This release introduces constant folding for the `< > <= >=` operators. The minifier will now replace these operators with `true` or `false` when both sides are compile-time numeric or string constants:
34
+
35
+
```js
36
+
// Original code
37
+
console.log(1 < 2, '🍕' > '🧀')
38
+
39
+
// Old output (with --minify)
40
+
console.log(1<2,"🍕">"🧀");
41
+
42
+
// New output (with --minify)
43
+
console.log(!0,!1);
44
+
```
45
+
31
46
* Fix cross-platformnon-determinism with CSS color space transformations ([#3650](https://github.com/evanw/esbuild/issues/3650))
32
47
33
48
The Go compiler takes advantage of "fused multiply and add" (FMA) instructions on certain processors which do the operation `x*y + z` without intermediate rounding. This causes esbuild's CSS color space math to differ on different processors (currently `ppc64le` and `s390x`), which breaks esbuild's guarantee of deterministic output. To avoid this, esbuild's color space math now inserts a `float64()` cast around every single math operation. This tells the Go compiler not to use the FMA optimization.
0 commit comments