LibJS/Bytecode: Do basic compare-and-jump peephole optimization

We now fuse sequences like [LessThan, JumpIf] to JumpLessThan.
This is only allowed for temporaries (i.e VM registers) with no other
references to them.
This commit is contained in:
Andreas Kling 2024-05-09 15:13:31 +02:00 committed by Alexander Kalenik
commit 7654da3851
Notes: sideshowbarker 2024-07-18 00:41:35 +09:00
8 changed files with 166 additions and 28 deletions

View file

@ -70,8 +70,16 @@
O(IteratorToArray) \
O(Jump) \
O(JumpFalse) \
O(JumpGreaterThan) \
O(JumpGreaterThanEquals) \
O(JumpIf) \
O(JumpLessThan) \
O(JumpLessThanEquals) \
O(JumpLooselyEquals) \
O(JumpLooselyInequals) \
O(JumpNullish) \
O(JumpStrictlyEquals) \
O(JumpStrictlyInequals) \
O(JumpTrue) \
O(JumpUndefined) \
O(LeaveFinally) \