mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibJS: Work-in-progress JIT compiler :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/babdc0a25b Pull-request: https://github.com/SerenityOS/serenity/pull/21619 Reviewed-by: https://github.com/Hendiadyoin1
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 };
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user