diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-20 09:18:57 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-20 09:18:57 -0500 |
| commit | 56db5137ddd10f476b9820944b47ab72c6f8e019 (patch) | |
| tree | 6c16ac05bb73c7aea0bb4a69f5bc77c2f6ca2d77 | |
| parent | f1177e376ee62a1663961087231386a79b46fced (diff) | |
feat! breaking ABI changes, breaking codegen changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | dev/CompilerKit/AE.h | 6 | ||||
| -rw-r--r-- | dev/CompilerKit/Frontend.h | 6 | ||||
| -rw-r--r-- | dev/CompilerKit/PEF.h | 2 | ||||
| -rw-r--r-- | dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/dev/CompilerKit/AE.h b/dev/CompilerKit/AE.h index b8e076d..3ca14e6 100644 --- a/dev/CompilerKit/AE.h +++ b/dev/CompilerKit/AE.h @@ -12,10 +12,10 @@ #include <CompilerKit/Defines.h> -#define kAEVer (0x0120) +#define kAEVer (0x0121) -#define kAEMag0 'O' -#define kAEMag1 'B' +#define kAEMag0 'A' +#define kAEMag1 'E' #define kAESymbolLen (255) #define kAEPad (8) diff --git a/dev/CompilerKit/Frontend.h b/dev/CompilerKit/Frontend.h index 225de96..500f952 100644 --- a/dev/CompilerKit/Frontend.h +++ b/dev/CompilerKit/Frontend.h @@ -18,7 +18,7 @@ struct SyntaxLeafList; struct CompilerKeyword; /// =========================================================== /// -/// we want to do that because to separate keywords. +/// @note we want to do that to separate keywords. /// =========================================================== /// enum KeywordKind { @@ -79,7 +79,7 @@ struct SyntaxLeafList final { }; std::vector<SyntaxLeaf> fLeafList; - SizeType fNumLeafs; + SizeType fNumLeafs{0}; SizeType SizeOf() { return fNumLeafs; } std::vector<SyntaxLeaf>& Get() { return fLeafList; } @@ -116,7 +116,7 @@ class CompilerFrontendInterface { /// =========================================================== /// // NOTE: cast this to your user defined ast. /// =========================================================== /// - typedef void* AstType; + typedef VoidPtr AstType; /// =========================================================== /// //! @brief Compile a syntax tree ouf of the text. diff --git a/dev/CompilerKit/PEF.h b/dev/CompilerKit/PEF.h index dd2e03a..fc36fd7 100644 --- a/dev/CompilerKit/PEF.h +++ b/dev/CompilerKit/PEF.h @@ -46,7 +46,7 @@ enum { kPefArchIntel86S, kPefArchAMD64, kPefArchRISCV, - kPefArch64000, /* 64x0 RISC architecture. */ + kPefArch64000, /* Open64x0 RISC architecture. */ kPefArch32000, kPefArchPowerPC, /* 64-bit POWER architecture. */ kPefArchARM64, diff --git a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc index e44f4f2..a13aa0e 100644 --- a/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc +++ b/dev/CompilerKit/src/Frontend/CPlusPlusCompilerAMD64.cc @@ -172,7 +172,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( CompilerKit::STLString text, CompilerKit::STLString file) { CompilerKit::SyntaxLeafList::SyntaxLeaf syntax_tree; - if (text.length() < 1) return syntax_tree; + if (text.empty()) return syntax_tree; std::size_t index = 0UL; std::vector<std::pair<CompilerKit::CompilerKeyword, std::size_t>> keywords_list; @@ -747,8 +747,8 @@ class AssemblyCPlusPlusInterfaceAMD64 final CK_ASSEMBLY_INTERFACE { CompilerKit::STLString line_source; - out_fp << "#bits 64\n"; - out_fp << "#org " << kOrigin << "\n\n"; + out_fp << "%bits 64\n"; + out_fp << "%org " << kOrigin << "\n\n"; while (std::getline(src_fp, line_source)) { out_fp << kFrontend->Compile(line_source, src).fUserValue; |
