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

LibJS: Add an inline JIT fast path when ToNumeric has nothing to do

In most cases, this op will do nothing, as it is running on an the
accumulator while it already contains a number. Let's avoid doing that
native call.
This commit is contained in:
Zaggy1024 2023-10-29 07:36:39 -05:00 committed by Andreas Kling
parent a2b0154661
commit dfaf645302
2 changed files with 21 additions and 0 deletions

View file

@ -166,6 +166,8 @@ private:
void native_call(void* function_address, Vector<Assembler::Operand> const& stack_arguments = {});
void jump_if_int32(Assembler::Reg, Assembler::Label&);
template<typename Codegen>
void branch_if_int32(Assembler::Reg, Codegen);