mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
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:
parent
9bcb0feb4d
commit
7654da3851
Notes:
sideshowbarker
2024-07-18 00:41:35 +09:00
Author: https://github.com/awesomekling
Commit: 7654da3851
Pull-request: https://github.com/SerenityOS/serenity/pull/24276
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/shannonbooth
8 changed files with 166 additions and 28 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue