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

LibJS/JIT: Add fast path for Increment with Int32 value

This uses a new branch_if_int32() mechanism that takes a code generating
lambda whose code will run if the input register is an Int32 JS::Value.
This commit is contained in:
Andreas Kling 2023-10-23 10:20:35 +02:00
parent aeb9bd3bf1
commit ea65214c57
3 changed files with 99 additions and 0 deletions

View file

@ -89,6 +89,9 @@ private:
void push_unwind_context(bool valid, Optional<Bytecode::Label> const& handler, Optional<Bytecode::Label> const& finalizer);
void pop_unwind_context();
template<typename Codegen>
void branch_if_int32(Assembler::Reg, Codegen);
explicit Compiler(Bytecode::Executable& bytecode_executable)
: m_bytecode_executable(bytecode_executable)
{