diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-21 14:52:47 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-21 14:52:47 +0100 |
| commit | 29cdd455ebe5ea61481c47a35f7d621075795cc0 (patch) | |
| tree | 9731e26d8baf6bbb7ba1149bb8698b3404e0499b /dev | |
| parent | d978aea4025338d2cabd61c050d879b6db3ec199 (diff) | |
feat: reintroduce PowerPC, ARM, and Open64x0 C compiler frontends.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/LibCompiler/src.old/.keep | 0 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Frontend/CCompiler64x0.cc (renamed from dev/LibCompiler/src.old/Frontend/CCompiler64x0.cc) | 8 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Frontend/CCompilerARM64.cc (renamed from dev/LibCompiler/src.old/Frontend/CCompilerARM64.cc) | 8 | ||||
| -rw-r--r-- | dev/LibCompiler/src/Frontend/CCompilerPower64.cc (renamed from dev/LibCompiler/src.old/Frontend/CCompilerPower64.cc) | 8 | ||||
| -rw-r--r-- | dev/LibDebugger/NeKernelContract.h | 17 | ||||
| -rw-r--r-- | dev/LibDebugger/src/NeKernelContract.cc | 25 |
6 files changed, 27 insertions, 39 deletions
diff --git a/dev/LibCompiler/src.old/.keep b/dev/LibCompiler/src.old/.keep deleted file mode 100644 index e69de29..0000000 --- a/dev/LibCompiler/src.old/.keep +++ /dev/null diff --git a/dev/LibCompiler/src.old/Frontend/CCompiler64x0.cc b/dev/LibCompiler/src/Frontend/CCompiler64x0.cc index 7b908f7..295de89 100644 --- a/dev/LibCompiler/src.old/Frontend/CCompiler64x0.cc +++ b/dev/LibCompiler/src/Frontend/CCompiler64x0.cc @@ -142,7 +142,7 @@ class CompilerFrontend64x0 final : public LibCompiler::CompilerFrontendInterface LIBCOMPILER_COPY_DEFAULT(CompilerFrontend64x0); std::string Check(const char* text, const char* file); - bool Compile(std::string text, std::string file) override; + LibCompiler::SyntaxLeafList::SyntaxLeaf Compile(std::string text, std::string file) override; const char* Language() override { return "64k C"; } }; @@ -182,7 +182,7 @@ union double_cast final { ///////////////////////////////////////////////////////////////////////////////////////// -bool CompilerFrontend64x0::Compile(std::string text_, std::string file) { +LibCompiler::SyntaxLeafList::SyntaxLeaf CompilerFrontend64x0::Compile(std::string text_, std::string file) { std::string text = text_; bool typeFound = false; @@ -618,7 +618,7 @@ bool CompilerFrontend64x0::Compile(std::string text_, std::string file) { syntaxLeaf.fUserValue = "\n"; kState.fSyntaxTree->fLeafList.push_back(syntaxLeaf); - return true; + return syntaxLeaf; } static bool kShouldHaveBraces = false; @@ -1197,7 +1197,7 @@ static void cc_print_help() { #define kExt ".c" -LIBCOMPILER_MODULE(NeOSCompilerCLang64x0) { +LIBCOMPILER_MODULE(CompilerCLang64x0) { ::signal(SIGSEGV, Detail::drvi_crash_handler); kCompilerTypes.push_back({.fName = "void", .fValue = "void"}); diff --git a/dev/LibCompiler/src.old/Frontend/CCompilerARM64.cc b/dev/LibCompiler/src/Frontend/CCompilerARM64.cc index 9e62747..a169e52 100644 --- a/dev/LibCompiler/src.old/Frontend/CCompilerARM64.cc +++ b/dev/LibCompiler/src/Frontend/CCompilerARM64.cc @@ -142,7 +142,7 @@ class CompilerFrontendARM64 final : public LibCompiler::CompilerFrontendInterfac LIBCOMPILER_COPY_DEFAULT(CompilerFrontendARM64); std::string Check(const char* text, const char* file); - bool Compile(std::string text, std::string file) override; + LibCompiler::SyntaxLeafList::SyntaxLeaf Compile(std::string text, std::string file) override; const char* Language() override { return "64k C"; } }; @@ -182,7 +182,7 @@ union double_cast final { ///////////////////////////////////////////////////////////////////////////////////////// -bool CompilerFrontendARM64::Compile(std::string text, std::string file) { +LibCompiler::SyntaxLeafList::SyntaxLeaf CompilerFrontendARM64::Compile(std::string text, std::string file) { bool typeFound = false; bool fnFound = false; @@ -616,7 +616,7 @@ bool CompilerFrontendARM64::Compile(std::string text, std::string file) { syntaxLeaf.fUserValue = "\n"; kState.fSyntaxTree->fLeafList.push_back(syntaxLeaf); - return true; + return syntaxLeaf; } static bool kShouldHaveBraces = false; @@ -1195,7 +1195,7 @@ static void cc_print_help() { #define kCExtension ".c" -LIBCOMPILER_MODULE(NeOSCompilerCLangARM64) { +LIBCOMPILER_MODULE(CompilerCLangARM64) { ::signal(SIGSEGV, Detail::drvi_crash_handler); kCompilerTypes.push_back({.fName = "void", .fValue = "void"}); diff --git a/dev/LibCompiler/src.old/Frontend/CCompilerPower64.cc b/dev/LibCompiler/src/Frontend/CCompilerPower64.cc index 233ad98..cd50dfa 100644 --- a/dev/LibCompiler/src.old/Frontend/CCompilerPower64.cc +++ b/dev/LibCompiler/src/Frontend/CCompilerPower64.cc @@ -133,7 +133,7 @@ class CompilerFrontendPower64 final : public LibCompiler::CompilerFrontendInterf LIBCOMPILER_COPY_DEFAULT(CompilerFrontendPower64); std::string Check(const char* text, const char* file); - bool Compile(std::string text, std::string file) override; + LibCompiler::SyntaxLeafList::SyntaxLeaf Compile(std::string text, std::string file) override; const char* Language() override { return "POWER C"; } }; @@ -173,7 +173,7 @@ union double_cast final { ///////////////////////////////////////////////////////////////////////////////////////// -bool CompilerFrontendPower64::Compile(std::string text_, std::string file) { +LibCompiler::SyntaxLeafList::SyntaxLeaf CompilerFrontendPower64::Compile(std::string text_, std::string file) { std::string text = text_; bool typeFound = false; @@ -636,7 +636,7 @@ bool CompilerFrontendPower64::Compile(std::string text_, std::string file) { syntax_leaf.fUserValue = "\n"; kState.fSyntaxTree->fLeafList.push_back(syntax_leaf); - return true; + return syntax_leaf; } static bool kShouldHaveBraces = false; @@ -1214,7 +1214,7 @@ static void cc_print_help() { #define kExt ".c" -LIBCOMPILER_MODULE(NeOSCompilerCLangPowerPC) { +LIBCOMPILER_MODULE(CompilerCLangPowerPC) { ::signal(SIGSEGV, Detail::drvi_crash_handler); kCompilerTypes.push_back({.fName = "void", .fValue = "void"}); diff --git a/dev/LibDebugger/NeKernelContract.h b/dev/LibDebugger/NeKernelContract.h index 3634788..9f816d8 100644 --- a/dev/LibDebugger/NeKernelContract.h +++ b/dev/LibDebugger/NeKernelContract.h @@ -10,23 +10,6 @@ #include <LibDebugger/DebuggerContract.h> -#include <sys/socket.h> -#include <sys/types.h> -#include <sys/un.h> -#include <unistd.h> - -#define kDebugUnboundPort 0x0FEED - -#define kDebugMag0 'K' -#define kDebugMag1 'D' -#define kDebugMag2 'B' -#define kDebugMag3 'G' - -#define kDebugSourceFile 23 -#define kDebugLine 33 -#define kDebugTeam 43 -#define kDebugEOP 49 - namespace LibDebugger::NeKernel { class NeKernelContract; diff --git a/dev/LibDebugger/src/NeKernelContract.cc b/dev/LibDebugger/src/NeKernelContract.cc index 075a1cb..2c2543e 100644 --- a/dev/LibDebugger/src/NeKernelContract.cc +++ b/dev/LibDebugger/src/NeKernelContract.cc @@ -11,6 +11,11 @@ #include <LibDebugger/NeKernelContract.h> #include <Vendor/Dialogs.h> +#include <sys/socket.h> +#include <sys/types.h> +#include <sys/un.h> +#include <unistd.h> + constexpr static UInt16 kDebugPort = 51820; using namespace LibDebugger::NeKernel; @@ -19,25 +24,25 @@ NeKernelContract::NeKernelContract() = default; NeKernelContract::~NeKernelContract() = default; -bool NeKernelContract::Attach(LibCompiler::STLString path, LibCompiler::STLString argv, +BOOL NeKernelContract::Attach(LibCompiler::STLString path, LibCompiler::STLString argv, ProcessID& pid) noexcept { - return false; + return NO; } -bool NeKernelContract::BreakAt(LibCompiler::STLString symbol) noexcept { - return false; +BOOL NeKernelContract::BreakAt(LibCompiler::STLString symbol) noexcept { + return NO; } -bool NeKernelContract::Break() noexcept { - return false; +BOOL NeKernelContract::Break() noexcept { + return NO; } -bool NeKernelContract::Continue() noexcept { - return false; +BOOL NeKernelContract::Continue() noexcept { + return NO; } -bool NeKernelContract::Detach() noexcept { - return false; +BOOL NeKernelContract::Detach() noexcept { + return NO; } #endif // LD_NEKERNEL_DEBUGGER
\ No newline at end of file |
