mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibJIT+LibJS: Move JIT::Assembler into a new LibJIT library
This will allow other parts of the system to generate machine code at runtime. :^)
This commit is contained in:
parent
bfb527e614
commit
5b87d26027
Notes:
sideshowbarker
2024-07-17 07:48:42 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5b87d26027 Pull-request: https://github.com/SerenityOS/serenity/pull/21619 Reviewed-by: https://github.com/Hendiadyoin1
7 changed files with 15 additions and 6 deletions
|
@ -421,6 +421,7 @@ if (BUILD_LAGOM)
|
||||||
IMAP
|
IMAP
|
||||||
ImageDecoderClient
|
ImageDecoderClient
|
||||||
IPC
|
IPC
|
||||||
|
JIT
|
||||||
JS
|
JS
|
||||||
Line
|
Line
|
||||||
Locale
|
Locale
|
||||||
|
|
|
@ -33,6 +33,7 @@ add_subdirectory(LibIDL)
|
||||||
add_subdirectory(LibIMAP)
|
add_subdirectory(LibIMAP)
|
||||||
add_subdirectory(LibImageDecoderClient)
|
add_subdirectory(LibImageDecoderClient)
|
||||||
add_subdirectory(LibIPC)
|
add_subdirectory(LibIPC)
|
||||||
|
add_subdirectory(LibJIT)
|
||||||
add_subdirectory(LibJS)
|
add_subdirectory(LibJS)
|
||||||
add_subdirectory(LibKeyboard)
|
add_subdirectory(LibKeyboard)
|
||||||
add_subdirectory(LibLine)
|
add_subdirectory(LibLine)
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <LibJS/JIT/Assembler.h>
|
#include <LibJIT/Assembler.h>
|
||||||
|
|
||||||
namespace JS::JIT {
|
namespace JIT {
|
||||||
|
|
||||||
}
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
|
||||||
namespace JS::JIT {
|
namespace JIT {
|
||||||
|
|
||||||
struct Assembler {
|
struct Assembler {
|
||||||
Assembler(Vector<u8>& output)
|
Assembler(Vector<u8>& output)
|
6
Userland/Libraries/LibJIT/CMakeLists.txt
Normal file
6
Userland/Libraries/LibJIT/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
set(SOURCES
|
||||||
|
Assembler.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
serenity_lib(LibJIT jit)
|
||||||
|
target_link_libraries(LibJIT PRIVATE LibCore)
|
|
@ -24,7 +24,6 @@ set(SOURCES
|
||||||
Heap/Heap.cpp
|
Heap/Heap.cpp
|
||||||
Heap/HeapBlock.cpp
|
Heap/HeapBlock.cpp
|
||||||
Heap/MarkedVector.cpp
|
Heap/MarkedVector.cpp
|
||||||
JIT/Assembler.cpp
|
|
||||||
JIT/Compiler.cpp
|
JIT/Compiler.cpp
|
||||||
JIT/NativeExecutable.cpp
|
JIT/NativeExecutable.cpp
|
||||||
Lexer.cpp
|
Lexer.cpp
|
||||||
|
@ -268,4 +267,4 @@ set(SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
serenity_lib(LibJS js)
|
serenity_lib(LibJS js)
|
||||||
target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibLocale LibUnicode)
|
target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibLocale LibUnicode LibJIT)
|
||||||
|
|
|
@ -6,13 +6,15 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <LibJIT/Assembler.h>
|
||||||
#include <LibJS/Bytecode/Executable.h>
|
#include <LibJS/Bytecode/Executable.h>
|
||||||
#include <LibJS/Bytecode/Op.h>
|
#include <LibJS/Bytecode/Op.h>
|
||||||
#include <LibJS/JIT/Assembler.h>
|
|
||||||
#include <LibJS/JIT/NativeExecutable.h>
|
#include <LibJS/JIT/NativeExecutable.h>
|
||||||
|
|
||||||
namespace JS::JIT {
|
namespace JS::JIT {
|
||||||
|
|
||||||
|
using ::JIT::Assembler;
|
||||||
|
|
||||||
class Compiler {
|
class Compiler {
|
||||||
public:
|
public:
|
||||||
static OwnPtr<NativeExecutable> compile(Bytecode::Executable&);
|
static OwnPtr<NativeExecutable> compile(Bytecode::Executable&);
|
||||||
|
|
Loading…
Reference in a new issue