LibJS: Work-in-progress JIT compiler :^)

This commit is contained in:
Andreas Kling
2023-10-14 14:37:48 +02:00
parent f52e4fa5c2
commit babdc0a25b
Notes: sideshowbarker 2024-07-17 18:46:57 +09:00
11 changed files with 634 additions and 4 deletions

View 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 };
};
}