summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-08 09:16:31 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-08 09:16:31 +0200
commit22d10f3c61959827bb634c9fe25a85ead891d59d (patch)
tree59e04586a4e4e96163454e6949991260e7bf11bc /dev
parent5563e156b8fe751d72f983531572ffdd324d8671 (diff)
refactor! Breaking changes in LibCompiler, see details.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev')
-rw-r--r--dev/LibC++/defines.h2
-rw-r--r--dev/LibCompiler/AE.h4
-rw-r--r--dev/LibCompiler/Util/DylibHelpers.h2
-rw-r--r--dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc2
-rw-r--r--dev/LibCompiler/src/Linkers/DynamicLinker64PEF.cc (renamed from dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc)16
-rw-r--r--dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc2
6 files changed, 14 insertions, 14 deletions
diff --git a/dev/LibC++/defines.h b/dev/LibC++/defines.h
index c0459ac..521601f 100644
--- a/dev/LibC++/defines.h
+++ b/dev/LibC++/defines.h
@@ -60,7 +60,7 @@ typedef char* caddr_t;
#endif
#define __alloca alloca
#else
-#warning ! alloca not detected !
+#warning !! alloca not detected !!
#endif
typedef long long off_t;
diff --git a/dev/LibCompiler/AE.h b/dev/LibCompiler/AE.h
index f42b9d7..0a15417 100644
--- a/dev/LibCompiler/AE.h
+++ b/dev/LibCompiler/AE.h
@@ -88,7 +88,7 @@ namespace LibCompiler::Utils {
*/
class AEReadableProtocol final {
public:
- std::ifstream FP;
+ std::ifstream _Fp;
public:
explicit AEReadableProtocol() = default;
@@ -120,7 +120,7 @@ class AEReadableProtocol final {
*/
template <typename TypeClass>
TypeClass* Read_(char* raw, std::size_t sz) {
- FP.read(raw, std::streamsize(sz));
+ _Fp.read(raw, std::streamsize(sz));
return reinterpret_cast<TypeClass*>(raw);
}
};
diff --git a/dev/LibCompiler/Util/DylibHelpers.h b/dev/LibCompiler/Util/DylibHelpers.h
index be8119f..901d321 100644
--- a/dev/LibCompiler/Util/DylibHelpers.h
+++ b/dev/LibCompiler/Util/DylibHelpers.h
@@ -10,4 +10,4 @@
#include <dlfcn.h>
typedef Int32 (*LibCompilerEntrypoint)(Int32 argc, Char const* argv[]);
-typedef VoidPtr DylibHandle;
+typedef VoidPtr LibCompilerDylib;
diff --git a/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc b/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc
index 984d059..1aaf091 100644
--- a/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc
+++ b/dev/LibCompiler/src/Frontend/CompilerCPlusPlusAMD64.cc
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * CompilerCPlusPlusAMD64 CPlusPlus Compiler Driver
+ * C++ Compiler Driver
* Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved.
*
* ========================================================
diff --git a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc b/dev/LibCompiler/src/Linkers/DynamicLinker64PEF.cc
index bd4566c..7cb93a9 100644
--- a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc
+++ b/dev/LibCompiler/src/Linkers/DynamicLinker64PEF.cc
@@ -8,7 +8,7 @@
------------------------------------------- */
/// @author EL Mahrouss Amlal (amlal@nekernel.org)
-/// @brief NeKernel 64-bit PEF Linker.
+/// @brief NeKernel.org 64-bit PEF Linker.
/// Last Rev: Sat Apr 19 CET 2025
/// @note Do not look up for anything with .code64/.data64/.zero64!
/// It will be loaded when the program loader will start the image.
@@ -41,7 +41,7 @@
#include <iostream>
#define kLinkerVersionStr \
- "NeKernel 64-Bit Linker (Preferred Executable Format) %s, (c) Amlal El Mahrouss " \
+ "NeKernel.org 64-Bit Linker (Preferred Executable Format) %s, (c) Amlal El Mahrouss " \
"2024-2025 " \
"all rights reserved.\n"
@@ -76,7 +76,7 @@ struct DynamicLinkerBlob final {
enum {
kABITypeNull = 0,
kABITypeStart = 0x1010, /* The start of ABI list. */
- kABITypeNE = 0x5046, /* PF (NeKernel's PEF ABI) */
+ kABITypeNE = 0x5046, /* PF (NeKernel.org's PEF ABI) */
kABITypeInvalid = 0xFFFF,
};
@@ -258,8 +258,8 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) {
LibCompiler::AEHeader hdr{};
- reader_protocol.FP = std::ifstream(objectFile, std::ifstream::binary);
- reader_protocol.FP >> hdr;
+ reader_protocol._Fp = std::ifstream(objectFile, std::ifstream::binary);
+ reader_protocol._Fp >> hdr;
if (hdr.fMagic[0] == kAEMag0 && hdr.fMagic[1] == kAEMag1 &&
hdr.fSize == sizeof(LibCompiler::AEHeader)) {
@@ -354,14 +354,14 @@ LIBCOMPILER_MODULE(DynamicLinker64PEF) {
std::vector<char> bytes;
bytes.resize(hdr.fCodeSize);
- reader_protocol.FP.seekg(std::streamsize(hdr.fStartCode));
- reader_protocol.FP.read(bytes.data(), std::streamsize(hdr.fCodeSize));
+ reader_protocol._Fp.seekg(std::streamsize(hdr.fStartCode));
+ reader_protocol._Fp.read(bytes.data(), std::streamsize(hdr.fCodeSize));
kObjectBytes.push_back({.mBlob = bytes, .mOffset = hdr.fStartCode});
// Blob was written, close fp.
- reader_protocol.FP.close();
+ reader_protocol._Fp.close();
continue;
}
diff --git a/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc b/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc
index f9986f4..ae38030 100644
--- a/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc
+++ b/dev/LibCompiler/src/Macro/CPlusPlusCompilerPreProcessor.cc
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * CPlusPlusCompilerPreProcessor Preprocessor Driver
+ * C++ Preprocessor Driver
* Copyright (C) 2024-2025 Amlal El Mahrouss, all rights reserved.
*
* ========================================================