1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17:35 +00:00

LibJS/JIT: Add fast path for number comparisons

So far only less_than was using a fast path. This commits uses the same
path for less_than_equals, greater_than and greater_than_equals.
This commit is contained in:
Sebastian Bernauer 2023-11-07 22:31:00 +01:00 committed by Andreas Kling
parent ff81513634
commit 8eb9c2dc54
2 changed files with 53 additions and 49 deletions

View file

@ -48,14 +48,17 @@ private:
O(Mod, mod) \
O(In, in) \
O(InstanceOf, instance_of) \
O(GreaterThan, greater_than) \
O(GreaterThanEquals, greater_than_equals) \
O(LessThanEquals, less_than_equals) \
O(LooselyInequals, abstract_inequals) \
O(LooselyEquals, abstract_equals) \
O(StrictlyInequals, typed_inequals) \
O(StrictlyEquals, typed_equals)
# define JS_ENUMERATE_COMPARISON_OPS(O) \
O(LessThan, less_than, SignedLessThan) \
O(LessThanEquals, less_than_equals, SignedLessThanOrEqualTo) \
O(GreaterThan, greater_than, SignedGreaterThan) \
O(GreaterThanEquals, greater_than_equals, SignedGreaterThanOrEqualTo)
# define JS_ENUMERATE_NEW_BUILTIN_ERROR_BYTECODE_OPS(O) \
O(NewTypeError, new_type_error, TypeError)