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

LibJS/JIT: Don't keep trying to JIT unsupported bytecode executables

We now only try jitting each Bytecode::Executable once, and then cache
the resulting NativeExecutable.
This commit is contained in:
Andreas Kling 2023-10-20 12:21:30 +02:00
parent 6a6ef6670c
commit 310bcd4717
5 changed files with 21 additions and 3 deletions

View file

@ -22,7 +22,7 @@ NativeExecutable::~NativeExecutable()
munmap(m_code, m_size);
}
void NativeExecutable::run(VM& vm)
void NativeExecutable::run(VM& vm) const
{
typedef void (*JITCode)(VM&, Value* registers, Value* locals);
((JITCode)m_code)(vm,

View file

@ -20,7 +20,7 @@ public:
NativeExecutable(void* code, size_t size);
~NativeExecutable();
void run(VM&);
void run(VM&) const;
private:
void* m_code { nullptr };