1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibJS/Bytecode: Don't fuse unrelated compare and jump in peephole pass

Fixes an issue where https://x.com/awesomekling crashed on load. :^)
This commit is contained in:
Andreas Kling 2024-03-05 12:47:48 +01:00
parent 0f8c6dc9ad
commit c1dbde72e9
2 changed files with 28 additions and 21 deletions

View file

@ -0,0 +1,10 @@
test("Don't fuse unrelated jump and compare", () => {
function go(a) {
a < 3;
a &&= 1;
a < 3;
a ||= 1;
}
go();
});