mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 20:42:11 +02:00
Logical expressions like `true || false` are now constant folded. This also allows for dead code elimination if we know the right-hand side of the expression will never be evaluated (such as `false && f()` or `true || f()`). In the test suites, the values are now being constant folded at compile time. To ensure that the actual evaluation logic is being called properly, I had to duplicate the tests and call them via a function so the compiler would not optimize the evaluation logic away. This also demotes `NaN` and `Infinity` identifiers to `nan` and `inf` double literals, which will further help with const folding.
76 KiB
76 KiB