diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-30 08:50:15 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-30 08:50:15 +0100 |
| commit | 1c8c5cff67b20d86c442b0917d6c1fc6407140df (patch) | |
| tree | 53ebea660bef14cdc2ff5b7ebefb4049f705f997 /dev/LibCompiler/src/CodeGen.cc | |
| parent | 073811d89c98d6e1c078a032ca2eedefebf80384 (diff) | |
feat! Breaking API changes of NeCTI's LibCompiler and LibDebugger.
what:
- They've now become CompilerKit and DebuggerKit.
- Expanding XCoff for NeBoot PowerPC backend.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/CodeGen.cc')
| -rw-r--r-- | dev/LibCompiler/src/CodeGen.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/dev/LibCompiler/src/CodeGen.cc b/dev/LibCompiler/src/CodeGen.cc deleted file mode 100644 index a6fff71..0000000 --- a/dev/LibCompiler/src/CodeGen.cc +++ /dev/null @@ -1,53 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025 Amlal EL Mahrouss, all rights reserved - -------------------------------------------- */ - -#include <LibCompiler/CodeGen.h> -#include <LibCompiler/ErrorID.h> - -/** - * @file CodeGen.cc - * @author amlal (amlal@nekernel.org) - * @brief Assembler Kit (Code generation kit) - * @version 0.1 - * @date 2024-01-27 - * - * @copyright Copyright (c) 2024-2025 Amlal El Mahrouss - * - */ - -namespace LibCompiler { -///! @brief Compile for specific format (ELF, PEF, ZBIN) -Int32 AssemblyFactory::Compile(STLString sourceFile, const Int32& arch) noexcept { - if (sourceFile.length() < 1) return LIBCOMPILER_UNIMPLEMENTED; - - if (!fMounted) return LIBCOMPILER_UNIMPLEMENTED; - if (arch != fMounted->Arch()) return LIBCOMPILER_INVALID_ARCH; - - try { - return this->fMounted->CompileToFormat(sourceFile, arch); - } catch (std::exception& e) { - return LIBCOMPILER_EXEC_ERROR; - } -} - -///! @brief mount assembly backend. -void AssemblyFactory::Mount(AssemblyInterface* mountPtr) noexcept { - if (mountPtr) { - fMounted = mountPtr; - } -} - -///! @brief Unmount assembler. -AssemblyInterface* AssemblyFactory::Unmount() noexcept { - auto mount_prev = fMounted; - - if (fMounted) { - fMounted = nullptr; - } - - return mount_prev; -} -} // namespace LibCompiler |
