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:
parent
0f8c6dc9ad
commit
c1dbde72e9
2 changed files with 28 additions and 21 deletions
10
Userland/Libraries/LibJS/Tests/optimizer-bugs.js
Normal file
10
Userland/Libraries/LibJS/Tests/optimizer-bugs.js
Normal 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();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue