mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:42:44 +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
					
				
					 7 changed files with 15 additions and 6 deletions
				
			
		|  | @ -421,6 +421,7 @@ if (BUILD_LAGOM) | |||
|         IMAP | ||||
|         ImageDecoderClient | ||||
|         IPC | ||||
|         JIT | ||||
|         JS | ||||
|         Line | ||||
|         Locale | ||||
|  |  | |||
|  | @ -33,6 +33,7 @@ add_subdirectory(LibIDL) | |||
| add_subdirectory(LibIMAP) | ||||
| add_subdirectory(LibImageDecoderClient) | ||||
| add_subdirectory(LibIPC) | ||||
| add_subdirectory(LibJIT) | ||||
| add_subdirectory(LibJS) | ||||
| add_subdirectory(LibKeyboard) | ||||
| add_subdirectory(LibLine) | ||||
|  |  | |||
|  | @ -4,8 +4,8 @@ | |||
|  * 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> | ||||
| 
 | ||||
| namespace JS::JIT { | ||||
| namespace JIT { | ||||
| 
 | ||||
| struct Assembler { | ||||
|     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/HeapBlock.cpp | ||||
|     Heap/MarkedVector.cpp | ||||
|     JIT/Assembler.cpp | ||||
|     JIT/Compiler.cpp | ||||
|     JIT/NativeExecutable.cpp | ||||
|     Lexer.cpp | ||||
|  | @ -268,4 +267,4 @@ set(SOURCES | |||
| ) | ||||
| 
 | ||||
| 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 | ||||
| 
 | ||||
| #include <LibJIT/Assembler.h> | ||||
| #include <LibJS/Bytecode/Executable.h> | ||||
| #include <LibJS/Bytecode/Op.h> | ||||
| #include <LibJS/JIT/Assembler.h> | ||||
| #include <LibJS/JIT/NativeExecutable.h> | ||||
| 
 | ||||
| namespace JS::JIT { | ||||
| 
 | ||||
| using ::JIT::Assembler; | ||||
| 
 | ||||
| class Compiler { | ||||
| public: | ||||
|     static OwnPtr<NativeExecutable> compile(Bytecode::Executable&); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling