summaryrefslogtreecommitdiffhomepage
path: root/dev/LibCompiler/src/CCompiler64x0.cc
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-05-07 09:18:33 +0200
committerAmlal <amlal@nekernel.org>2025-05-07 09:18:33 +0200
commitd8d943929c25151fd6a8aadd6ea4cdbd5065845a (patch)
tree137147035caca99ed27431039b65b9ab61546d35 /dev/LibCompiler/src/CCompiler64x0.cc
parent23d3e00324b7f691a893df7e73462b9b73c03a4f (diff)
feat(LibCompiler): Reworking architecture to integrate the Arch() method in the AssemblyInterface.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibCompiler/src/CCompiler64x0.cc')
-rw-r--r--dev/LibCompiler/src/CCompiler64x0.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/dev/LibCompiler/src/CCompiler64x0.cc b/dev/LibCompiler/src/CCompiler64x0.cc
index c100e96..79d32ce 100644
--- a/dev/LibCompiler/src/CCompiler64x0.cc
+++ b/dev/LibCompiler/src/CCompiler64x0.cc
@@ -142,7 +142,7 @@ class CompilerFrontend64x0 final : public LibCompiler::ICompilerFrontend {
LIBCOMPILER_COPY_DEFAULT(CompilerFrontend64x0);
std::string Check(const char* text, const char* file);
- bool Compile(std::string text, const std::string file) override;
+ bool 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_, const std::string file) {
+bool CompilerFrontend64x0::Compile(std::string text_, std::string file) {
std::string text = text_;
bool typeFound = false;
@@ -1051,11 +1051,11 @@ class AssemblyCCInterface final ASSEMBLY_INTERFACE {
LIBCOMPILER_COPY_DEFAULT(AssemblyCCInterface);
- [[maybe_unused]] static Int32 Arch() noexcept { return LibCompiler::AssemblyFactory::kArch64x0; }
+ [[maybe_unused]] Int32 Arch() noexcept override {
+ return LibCompiler::AssemblyFactory::kArch64x0;
+ }
Int32 CompileToFormat(std::string src, Int32 arch) override {
- if (arch != AssemblyCCInterface::Arch()) return 1;
-
if (kCompilerFrontend == nullptr) return 1;
/* @brief copy contents wihtout extension */