summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-28 18:12:17 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-28 18:12:17 +0200
commitd37f1a7381825d414e4b71c487eea509325f24c3 (patch)
treeb8df54b1da6a152e6f9a61b91b8feac90bdef4b9 /dev/LibCompiler/src
parent26b2f0395db53b0bbb1915cd27ac2b99a4dbb0a2 (diff)
refactor: Refactor toolchain source code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src')
-rw-r--r--dev/LibCompiler/src/Backend/AssemblerARM64.cc2
-rw-r--r--dev/LibCompiler/src/Backend/AssemblerPowerPC.cc2
-rw-r--r--dev/LibCompiler/src/BasicString.cc14
-rw-r--r--dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc6
4 files changed, 12 insertions, 12 deletions
diff --git a/dev/LibCompiler/src/Backend/AssemblerARM64.cc b/dev/LibCompiler/src/Backend/AssemblerARM64.cc
index 142dcc7..a1cc6dc 100644
--- a/dev/LibCompiler/src/Backend/AssemblerARM64.cc
+++ b/dev/LibCompiler/src/Backend/AssemblerARM64.cc
@@ -45,7 +45,7 @@
constexpr auto cPowerIPAlignment = 0x1U;
-static CharType kOutputArch = LibCompiler::kPefArchARM64;
+static Char kOutputArch = LibCompiler::kPefArchARM64;
static std::size_t kCounter = 1UL;
diff --git a/dev/LibCompiler/src/Backend/AssemblerPowerPC.cc b/dev/LibCompiler/src/Backend/AssemblerPowerPC.cc
index 3134748..b979f64 100644
--- a/dev/LibCompiler/src/Backend/AssemblerPowerPC.cc
+++ b/dev/LibCompiler/src/Backend/AssemblerPowerPC.cc
@@ -45,7 +45,7 @@
constexpr auto cPowerIPAlignment = 0x4U;
-static CharType kOutputArch = LibCompiler::kPefArchPowerPC;
+static Char kOutputArch = LibCompiler::kPefArchPowerPC;
static std::size_t kCounter = 1UL;
diff --git a/dev/LibCompiler/src/BasicString.cc b/dev/LibCompiler/src/BasicString.cc
index 78bfcaa..41989fe 100644
--- a/dev/LibCompiler/src/BasicString.cc
+++ b/dev/LibCompiler/src/BasicString.cc
@@ -21,11 +21,11 @@
#include <LibCompiler/BasicString.h>
namespace LibCompiler {
-CharType* BasicString::Data() {
+Char* BasicString::Data() {
return m_Data;
}
-const CharType* BasicString::CData() const {
+const Char* BasicString::CData() const {
return m_Data;
}
@@ -43,7 +43,7 @@ bool BasicString::operator==(const BasicString& rhs) const {
return true;
}
-bool BasicString::operator==(const CharType* rhs) const {
+bool BasicString::operator==(const Char* rhs) const {
if (string_length(rhs) != Length()) return false;
for (SizeType index = 0; index < string_length(rhs); ++index) {
@@ -63,7 +63,7 @@ bool BasicString::operator!=(const BasicString& rhs) const {
return true;
}
-bool BasicString::operator!=(const CharType* rhs) const {
+bool BasicString::operator!=(const Char* rhs) const {
if (string_length(rhs) != Length()) return false;
for (SizeType index = 0; index < string_length(rhs); ++index) {
@@ -73,7 +73,7 @@ bool BasicString::operator!=(const CharType* rhs) const {
return true;
}
-BasicString StringBuilder::Construct(const CharType* data) {
+BasicString StringBuilder::Construct(const Char* data) {
if (!data || *data == 0) return BasicString(0);
BasicString view(strlen(data));
@@ -92,7 +92,7 @@ const char* StringBuilder::FromInt(const char* fmt, int i) {
memset(ret, 0, ret_len);
- CharType result[sizeof(int64_t)];
+ Char result[sizeof(int64_t)];
if (!to_str(result, sizeof(int64_t), i)) {
delete[] ret;
@@ -183,7 +183,7 @@ const char* StringBuilder::Format(const char* fmt, const char* fmtRight) {
return ret;
}
-BasicString& BasicString::operator+=(const CharType* rhs) {
+BasicString& BasicString::operator+=(const Char* rhs) {
if (strlen(rhs) > this->m_Sz) {
throw std::runtime_error("out_of_bounds: BasicString");
}
diff --git a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc b/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc
index 820b06d..b58c786 100644
--- a/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc
+++ b/dev/LibCompiler/src/Linkers/DynamicLinkerPEF.cc
@@ -68,7 +68,7 @@
namespace Detail {
struct DynamicLinkerBlob final {
- std::vector<CharType> mBlob{}; // PEF code/bss/data blob.
+ std::vector<Char> mBlob{}; // PEF code/bss/data blob.
UIntPtr mOffset{0UL}; // the offset of the PEF container header...
};
} // namespace Detail
@@ -89,8 +89,8 @@ static Bool kStartFound = false;
static Bool kDuplicateSymbols = false;
/* ld64 is to be found, mld is to be found at runtime. */
-static const CharType* kLdDefineSymbol = ":UndefinedSymbol:";
-static const CharType* kLdDynamicSym = ":RuntimeSymbol:";
+static const Char* kLdDefineSymbol = ":UndefinedSymbol:";
+static const Char* kLdDynamicSym = ":RuntimeSymbol:";
/* object code and list. */
static std::vector<LibCompiler::STLString> kObjectList;