mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibJS: Work-in-progress JIT compiler :^)
This commit is contained in:
parent
f52e4fa5c2
commit
babdc0a25b
11 changed files with 634 additions and 4 deletions
30
Userland/Libraries/LibJS/JIT/NativeExecutable.h
Normal file
30
Userland/Libraries/LibJS/JIT/NativeExecutable.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
|
||||
namespace JS::JIT {
|
||||
|
||||
class NativeExecutable {
|
||||
AK_MAKE_NONCOPYABLE(NativeExecutable);
|
||||
AK_MAKE_NONMOVABLE(NativeExecutable);
|
||||
|
||||
public:
|
||||
NativeExecutable(void* code, size_t size);
|
||||
~NativeExecutable();
|
||||
|
||||
void run(VM&);
|
||||
|
||||
private:
|
||||
void* m_code { nullptr };
|
||||
size_t m_size { 0 };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue