From facb3edec9fd275d5a8fcabaa87f768087255768 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 12 Dec 2025 02:34:07 +0100 Subject: chore! breaking API changes, rename project to Nectar, instead of NeCTI. Signed-off-by: Amlal El Mahrouss --- .github/workflows/necti-dev.yml | 2 +- .github/workflows/necti.yml | 2 +- .gitignore | 6 +- CITATION.cff | 2 +- Doxyfile | 4 +- README.md | 15 +--- examples/example_03_compilerkit/.keep | 0 examples/example_03_compilerkit/example.cc | 0 examples/example_04_debuggerkit/.keep | 0 examples/example_04_debuggerkit/example.cc | 0 include/CompilerKit/AE.h | 8 +- include/CompilerKit/AST.h | 2 +- include/CompilerKit/AST.inl | 2 +- include/CompilerKit/CodeGenerator.h | 2 +- include/CompilerKit/Detail/32x0.h | 2 +- include/CompilerKit/Detail/64x0.h | 2 +- include/CompilerKit/Detail/AMD64.h | 2 +- include/CompilerKit/Detail/Aarch64.h | 2 +- include/CompilerKit/Detail/Config.h | 7 +- include/CompilerKit/Detail/PreConfig.h | 2 +- include/CompilerKit/ErrorID.h | 2 +- include/CompilerKit/ErrorOr.h | 2 +- include/CompilerKit/Macros.h | 8 +- include/CompilerKit/PEF.h | 2 +- include/CompilerKit/Ref.h | 2 +- include/CompilerKit/Utilities/Assembler.h | 2 +- include/CompilerKit/Utilities/Compiler.h | 2 +- include/CompilerKit/Utilities/DLL.h | 2 +- include/CompilerKit/XCOFF.h | 8 +- include/DebuggerKit/Common.inl | 2 +- include/DebuggerKit/DebuggerContract.h | 2 +- include/DebuggerKit/Detail/Config.h | 2 +- include/DebuggerKit/NeKernelContract.h | 2 +- include/DebuggerKit/POSIXMachContract.h | 2 +- include/LibC++/__abi.h | 2 +- include/LibC++/__power64.inc | 2 +- include/LibC++/base_alloc.h | 2 +- include/LibC++/base_exception.h | 2 +- include/LibC++/base_math.h | 2 +- include/LibC++/base_process.h | 2 +- include/LibC++/defines.h | 8 +- include/LibC++/filesystem.h | 8 +- include/LibC++/utility.h | 2 +- meta/png/nekernel.png | Bin 156843 -> 0 bytes src/CommandLine/asm.cc | 95 +++++++++++++++++++++ src/CommandLine/asm.json | 12 +++ src/CommandLine/cppdrv.cc | 23 +++++ src/CommandLine/cppdrv.json | 12 +++ src/CommandLine/dbg.cc | 18 ++++ src/CommandLine/dbg.json | 12 +++ src/CommandLine/kdbg.cc | 18 ++++ src/CommandLine/kdbg.json | 12 +++ src/CommandLine/ld64.cc | 16 ++++ src/CommandLine/ld64.json | 12 +++ src/CommandLine/pef-amd64-cxxdrv.cc | 38 +++++++++ src/CommandLine/pef-amd64-cxxdrv.json | 19 +++++ src/CommandLine/pef-arm64-cdrv.cc | 38 +++++++++ src/CommandLine/pef-arm64-cdrv.json | 19 +++++ src/CompilerKit/ck-osx-san.json | 2 +- src/CompilerKit/ck-osx.json | 2 +- src/CompilerKit/ck-posix.json | 2 +- src/CompilerKit/src/Assemblers/Assembler+32x0.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+64x0.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+AMD64.cc | 2 +- src/CompilerKit/src/Assemblers/Assembler+ARM64.cc | 2 +- .../src/Assemblers/Assembler+PowerPC.cc | 2 +- .../src/CodeGenerator+AssemblyFactory.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+64x0.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+ARM64.cc | 4 +- src/CompilerKit/src/Compilers/CCompiler+Power64.cc | 4 +- .../src/Compilers/CPlusPlusCompiler+AMD64.cc | 20 ++--- .../src/DynamicLinkers/DynamicLinker64+PEF.cc | 8 +- .../src/Preprocessor/Preprocessor+Generic.cc | 4 +- src/DebuggerKit/dk-nekernel.json | 2 +- src/DebuggerKit/dk-osx.json | 2 +- src/DebuggerKit/src/NeKernelContract.cc | 2 +- src/DebuggerKit/src/NeKernelContractCLI.cc | 4 +- src/DebuggerKit/src/POSIXMachContractCLI.cc | 4 +- src/Tools/asm.cc | 95 --------------------- src/Tools/asm.json | 12 --- src/Tools/cppdrv.cc | 23 ----- src/Tools/cppdrv.json | 12 --- src/Tools/dbg.cc | 18 ---- src/Tools/dbg.json | 12 --- src/Tools/kdbg.cc | 18 ---- src/Tools/kdbg.json | 12 --- src/Tools/ld64.cc | 16 ---- src/Tools/ld64.json | 12 --- src/Tools/pef-amd64-cxxdrv.cc | 38 --------- src/Tools/pef-amd64-cxxdrv.json | 19 ----- src/Tools/pef-arm64-cdrv.cc | 38 --------- src/Tools/pef-arm64-cdrv.json | 19 ----- tests/test_01_codegen/codegen_test.cc | 2 +- tests/test_02_linker/linker_test.cc | 12 +-- 94 files changed, 453 insertions(+), 459 deletions(-) delete mode 100644 examples/example_03_compilerkit/.keep create mode 100644 examples/example_03_compilerkit/example.cc delete mode 100644 examples/example_04_debuggerkit/.keep create mode 100644 examples/example_04_debuggerkit/example.cc delete mode 100644 meta/png/nekernel.png create mode 100644 src/CommandLine/asm.cc create mode 100644 src/CommandLine/asm.json create mode 100644 src/CommandLine/cppdrv.cc create mode 100644 src/CommandLine/cppdrv.json create mode 100644 src/CommandLine/dbg.cc create mode 100644 src/CommandLine/dbg.json create mode 100644 src/CommandLine/kdbg.cc create mode 100644 src/CommandLine/kdbg.json create mode 100644 src/CommandLine/ld64.cc create mode 100644 src/CommandLine/ld64.json create mode 100644 src/CommandLine/pef-amd64-cxxdrv.cc create mode 100644 src/CommandLine/pef-amd64-cxxdrv.json create mode 100644 src/CommandLine/pef-arm64-cdrv.cc create mode 100644 src/CommandLine/pef-arm64-cdrv.json delete mode 100644 src/Tools/asm.cc delete mode 100644 src/Tools/asm.json delete mode 100644 src/Tools/cppdrv.cc delete mode 100644 src/Tools/cppdrv.json delete mode 100644 src/Tools/dbg.cc delete mode 100644 src/Tools/dbg.json delete mode 100644 src/Tools/kdbg.cc delete mode 100644 src/Tools/kdbg.json delete mode 100644 src/Tools/ld64.cc delete mode 100644 src/Tools/ld64.json delete mode 100644 src/Tools/pef-amd64-cxxdrv.cc delete mode 100644 src/Tools/pef-amd64-cxxdrv.json delete mode 100644 src/Tools/pef-arm64-cdrv.cc delete mode 100644 src/Tools/pef-arm64-cdrv.json diff --git a/.github/workflows/necti-dev.yml b/.github/workflows/necti-dev.yml index 74e3a43..6b44fba 100644 --- a/.github/workflows/necti-dev.yml +++ b/.github/workflows/necti-dev.yml @@ -1,4 +1,4 @@ -name: Kits (NeCTI,Develop) +name: Kits (Nectar,Develop) on: push: diff --git a/.github/workflows/necti.yml b/.github/workflows/necti.yml index be94d2d..2f395f2 100644 --- a/.github/workflows/necti.yml +++ b/.github/workflows/necti.yml @@ -1,4 +1,4 @@ -name: Kits CI (NeCTI,Stable) +name: Kits CI (Nectar,Stable) on: push: diff --git a/.gitignore b/.gitignore index 8577e53..dae057d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,9 +12,9 @@ tools/asm tools/ld64 tools/cxxdrv -tools/dbg -tools/cppdrv -tools/kdbg +src/*/dbg +src/*/cppdrv +src/*/kdbg src/*/pef-amd64-cxxdrv src/*/pef-aarch64-cxxdrv src/*/pef-aarch64-cdrv diff --git a/CITATION.cff b/CITATION.cff index 7424d3e..4e2800e 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,7 +9,7 @@ authors: identifiers: - type: url value: 'https://nekernel.org' - description: NeKernel's website. + description: NeKernel.org repository-code: 'https://github.com/nekernel-org/necti' url: 'https://nekernel.org' abstract: >- diff --git a/Doxyfile b/Doxyfile index 882213c..31b9c7f 100644 --- a/Doxyfile +++ b/Doxyfile @@ -42,13 +42,13 @@ DOXYFILE_ENCODING = UTF-8 # title of most generated pages and in a few other places. # The default value is: My Project. -PROJECT_NAME = NeCTI +PROJECT_NAME = Nectar # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = dev +PROJECT_NUMBER = develop # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewers a diff --git a/README.md b/README.md index ad8f444..1a6fc5b 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,17 @@ - + -
- Logo -
- -
+# Nectar -![CI](https://github.com/amlel-el-mahrouss/cc/actions/workflows/necti.yml/badge.svg) ![CI](https://github.com/amlel-el-mahrouss/cc/actions/workflows/necti-dev.yml/badge.svg) [![License: GPL-3.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) -## Overview: - -NeCTI is a modern, multi-platform compiler instractucture designed for modularity, and performance. It features a custom debugger engine, advanced linker, and a modular compiler architecture. It is built for research, education, and next-generation toolchain development. - ## Structure: - `src/CompilerKit` – Compiler Kit written in modern C++ - `src/LibC++` – C++ ABI Library - `src/LibStdC++` – Standard C++ Library - `src/DebuggerKit` – Debugging Kit written in modern C++ -- `src/Tools/` – C/C++ Frontend Tools +- `src/CommandLine/` – C/C++ Command Line Tools ## Requirements: diff --git a/examples/example_03_compilerkit/.keep b/examples/example_03_compilerkit/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/example_03_compilerkit/example.cc b/examples/example_03_compilerkit/example.cc new file mode 100644 index 0000000..e69de29 diff --git a/examples/example_04_debuggerkit/.keep b/examples/example_04_debuggerkit/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/examples/example_04_debuggerkit/example.cc b/examples/example_04_debuggerkit/example.cc new file mode 100644 index 0000000..e69de29 diff --git a/include/CompilerKit/AE.h b/include/CompilerKit/AE.h index c1c6ed9..3475460 100644 --- a/include/CompilerKit/AE.h +++ b/include/CompilerKit/AE.h @@ -2,13 +2,13 @@ * ======================================================== * * CompilerKit - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ -#ifndef _NECTI_AE_H_ -#define _NECTI_AE_H_ +#ifndef _NECTAR_AE_H_ +#define _NECTAR_AE_H_ #include #include @@ -135,4 +135,4 @@ class AEReadableProtocol final { }; } // namespace CompilerKit::Utils -#endif /* ifndef _NECTI_AE_H_ */ \ No newline at end of file +#endif /* ifndef _NECTAR_AE_H_ */ \ No newline at end of file diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h index 2cefed7..e904317 100644 --- a/include/CompilerKit/AST.h +++ b/include/CompilerKit/AST.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/AST.inl b/include/CompilerKit/AST.inl index c051815..665d683 100644 --- a/include/CompilerKit/AST.inl +++ b/include/CompilerKit/AST.inl @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/CodeGenerator.h b/include/CompilerKit/CodeGenerator.h index 721743d..36663ca 100644 --- a/include/CompilerKit/CodeGenerator.h +++ b/include/CompilerKit/CodeGenerator.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Detail/32x0.h b/include/CompilerKit/Detail/32x0.h index 7172a2d..ce22761 100644 --- a/include/CompilerKit/Detail/32x0.h +++ b/include/CompilerKit/Detail/32x0.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Detail/64x0.h b/include/CompilerKit/Detail/64x0.h index ad909dc..23a0542 100644 --- a/include/CompilerKit/Detail/64x0.h +++ b/include/CompilerKit/Detail/64x0.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Detail/AMD64.h b/include/CompilerKit/Detail/AMD64.h index 053b0b0..a4294ee 100644 --- a/include/CompilerKit/Detail/AMD64.h +++ b/include/CompilerKit/Detail/AMD64.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Detail/Aarch64.h b/include/CompilerKit/Detail/Aarch64.h index 1ce1719..7b39e8b 100644 --- a/include/CompilerKit/Detail/Aarch64.h +++ b/include/CompilerKit/Detail/Aarch64.h @@ -1,6 +1,6 @@ /* ======================================== -Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license +Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Detail/Config.h b/include/CompilerKit/Detail/Config.h index 198db7c..3935fa3 100644 --- a/include/CompilerKit/Detail/Config.h +++ b/include/CompilerKit/Detail/Config.h @@ -1,10 +1,11 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ -#pragma once +#ifndef __COMPILERKIT_CONFIG_H__ +#define __COMPILERKIT_CONFIG_H__ /// =========================================================== /// /// @file detail/Config.h @@ -62,3 +63,5 @@ inline bool install_signal(Int32 signal, void (*handler)(int)) noexcept { return true; } } // namespace CompilerKit + +#endif // __COMPILERKIT_CONFIG_H__ \ No newline at end of file diff --git a/include/CompilerKit/Detail/PreConfig.h b/include/CompilerKit/Detail/PreConfig.h index 0279072..dc96377 100644 --- a/include/CompilerKit/Detail/PreConfig.h +++ b/include/CompilerKit/Detail/PreConfig.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/ErrorID.h b/include/CompilerKit/ErrorID.h index 3e3b0d7..e2ec164 100644 --- a/include/CompilerKit/ErrorID.h +++ b/include/CompilerKit/ErrorID.h @@ -2,7 +2,7 @@ * ======================================================== * * CompilerKit - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ diff --git a/include/CompilerKit/ErrorOr.h b/include/CompilerKit/ErrorOr.h index 1d5c2ac..ae1bd84 100644 --- a/include/CompilerKit/ErrorOr.h +++ b/include/CompilerKit/ErrorOr.h @@ -2,7 +2,7 @@ * ======================================================== * * CompilerKit - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ diff --git a/include/CompilerKit/Macros.h b/include/CompilerKit/Macros.h index 6cef758..8c112c6 100644 --- a/include/CompilerKit/Macros.h +++ b/include/CompilerKit/Macros.h @@ -1,13 +1,13 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ /// @brief provide support for Macros.h header. -#ifndef _NECTI_MACROS_H_ -#define _NECTI_MACROS_H_ +#ifndef _NECTAR_MACROS_H_ +#define _NECTAR_MACROS_H_ #define NECTI_COPY_DELETE(KLASS) \ KLASS& operator=(const KLASS&) = delete; \ @@ -25,4 +25,4 @@ KLASS& operator=(KLASS&&) = default; \ KLASS(KLASS&&) = default; -#endif /* ifndef _NECTI_MACROS_H_ */ +#endif /* ifndef _NECTAR_MACROS_H_ */ diff --git a/include/CompilerKit/PEF.h b/include/CompilerKit/PEF.h index 2838f52..32d799c 100644 --- a/include/CompilerKit/PEF.h +++ b/include/CompilerKit/PEF.h @@ -1,6 +1,6 @@ /* ========================================= - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Ref.h b/include/CompilerKit/Ref.h index c104a81..3dee0c0 100644 --- a/include/CompilerKit/Ref.h +++ b/include/CompilerKit/Ref.h @@ -3,7 +3,7 @@ * ======================================================== * * CompilerKit - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ diff --git a/include/CompilerKit/Utilities/Assembler.h b/include/CompilerKit/Utilities/Assembler.h index ef1cf18..2cb5e25 100644 --- a/include/CompilerKit/Utilities/Assembler.h +++ b/include/CompilerKit/Utilities/Assembler.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Utilities/Compiler.h b/include/CompilerKit/Utilities/Compiler.h index 0fa95df..7a79787 100644 --- a/include/CompilerKit/Utilities/Compiler.h +++ b/include/CompilerKit/Utilities/Compiler.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/Utilities/DLL.h b/include/CompilerKit/Utilities/DLL.h index 8e32d2b..6f14c13 100644 --- a/include/CompilerKit/Utilities/DLL.h +++ b/include/CompilerKit/Utilities/DLL.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/include/CompilerKit/XCOFF.h b/include/CompilerKit/XCOFF.h index 777f501..3ad680f 100644 --- a/include/CompilerKit/XCOFF.h +++ b/include/CompilerKit/XCOFF.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license File: XCOFF.h Purpose: XCOFF for NeKernel. @@ -11,8 +11,8 @@ ======================================== */ -#ifndef _NECTI_XCOFF_H_ -#define _NECTI_XCOFF_H_ +#ifndef _NECTAR_XCOFF_H_ +#define _NECTAR_XCOFF_H_ #include @@ -40,4 +40,4 @@ typedef struct XCoffFileHeader { typedef struct XCoffFileHeader* XCoffFileHeaderPtr; } // namespace CompilerKit -#endif // ifndef _NECTI_XCOFF_H_ +#endif // ifndef _NECTAR_XCOFF_H_ diff --git a/include/DebuggerKit/Common.inl b/include/DebuggerKit/Common.inl index c630041..9265e97 100644 --- a/include/DebuggerKit/Common.inl +++ b/include/DebuggerKit/Common.inl @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/DebuggerKit/DebuggerContract.h b/include/DebuggerKit/DebuggerContract.h index d172f78..1e4f7b1 100644 --- a/include/DebuggerKit/DebuggerContract.h +++ b/include/DebuggerKit/DebuggerContract.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/DebuggerKit/Detail/Config.h b/include/DebuggerKit/Detail/Config.h index f5593fd..b8b0cde 100644 --- a/include/DebuggerKit/Detail/Config.h +++ b/include/DebuggerKit/Detail/Config.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/DebuggerKit/NeKernelContract.h b/include/DebuggerKit/NeKernelContract.h index fe38a22..505cae9 100644 --- a/include/DebuggerKit/NeKernelContract.h +++ b/include/DebuggerKit/NeKernelContract.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/DebuggerKit/POSIXMachContract.h b/include/DebuggerKit/POSIXMachContract.h index f2ae8a2..054b935 100644 --- a/include/DebuggerKit/POSIXMachContract.h +++ b/include/DebuggerKit/POSIXMachContract.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/__abi.h b/include/LibC++/__abi.h index c8ac2a5..80a0398 100644 --- a/include/LibC++/__abi.h +++ b/include/LibC++/__abi.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/__power64.inc b/include/LibC++/__power64.inc index c06863a..8a189ae 100644 --- a/include/LibC++/__power64.inc +++ b/include/LibC++/__power64.inc @@ -2,7 +2,7 @@ # Language: CompilerKit POWER Assembly support for GNU. # Build Date: 2024-6-4 -#ifdef __NECTI__ +#ifdef __NECTAR__ #ifdef __ASSEMBLER__ diff --git a/include/LibC++/base_alloc.h b/include/LibC++/base_alloc.h index ea5b5b2..7ae03df 100644 --- a/include/LibC++/base_alloc.h +++ b/include/LibC++/base_alloc.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/base_exception.h b/include/LibC++/base_exception.h index 8747688..0f81431 100644 --- a/include/LibC++/base_exception.h +++ b/include/LibC++/base_exception.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/base_math.h b/include/LibC++/base_math.h index 60b260e..97f24ee 100644 --- a/include/LibC++/base_math.h +++ b/include/LibC++/base_math.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/base_process.h b/include/LibC++/base_process.h index cb25aa1..96ca42f 100644 --- a/include/LibC++/base_process.h +++ b/include/LibC++/base_process.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/include/LibC++/defines.h b/include/LibC++/defines.h index 6aac009..d6a5369 100644 --- a/include/LibC++/defines.h +++ b/include/LibC++/defines.h @@ -1,11 +1,11 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ -#ifndef __NECTI_DEFINES_H__ -#define __NECTI_DEFINES_H__ +#ifndef __NECTAR_DEFINES_H__ +#define __NECTAR_DEFINES_H__ #define __ATTRIBUTE(X) __attribute__((X)) @@ -78,4 +78,4 @@ struct placement_t; struct nothrow_t; } // namespace std -#endif /* __NECTI_DEFINES_H__ */ +#endif /* __NECTAR_DEFINES_H__ */ diff --git a/include/LibC++/filesystem.h b/include/LibC++/filesystem.h index 4627c50..af9fd79 100644 --- a/include/LibC++/filesystem.h +++ b/include/LibC++/filesystem.h @@ -1,11 +1,11 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ -#ifndef __NECTI_FS_H__ -#define __NECTI_FS_H__ +#ifndef __NECTAR_FS_H__ +#define __NECTAR_FS_H__ #include @@ -16,4 +16,4 @@ class directory_entry; class directory_iterator; } // namespace std -#endif // __NECTI_FS_H__ \ No newline at end of file +#endif // __NECTAR_FS_H__ \ No newline at end of file diff --git a/include/LibC++/utility.h b/include/LibC++/utility.h index 62096f5..0ee2735 100644 --- a/include/LibC++/utility.h +++ b/include/LibC++/utility.h @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/meta/png/nekernel.png b/meta/png/nekernel.png deleted file mode 100644 index 565a1db..0000000 Binary files a/meta/png/nekernel.png and /dev/null differ diff --git a/src/CommandLine/asm.cc b/src/CommandLine/asm.cc new file mode 100644 index 0000000..3773ff3 --- /dev/null +++ b/src/CommandLine/asm.cc @@ -0,0 +1,95 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file asm.cc +/// @brief Assembler frontend. + +#include +#include +#include + +CK_IMPORT_C Int32 AssemblerMainPower64(Int32 argc, Char const* argv[]); +CK_IMPORT_C Int32 AssemblerMainARM64(Int32 argc, Char const* argv[]); +CK_IMPORT_C Int32 AssemblerMain64x0(Int32 argc, Char const* argv[]); +CK_IMPORT_C Int32 AssemblerMainAMD64(Int32 argc, Char const* argv[]); + +enum AsmKind : Int32 { + kInvalidAssembler = 0, + kX64Assembler = 100, + k64X0Assembler, + kPOWER64Assembler, + kARM64Assembler, + kAssemblerCount = kARM64Assembler - kX64Assembler + 1, +}; + +Int32 main(Int32 argc, Char const* argv[]) { + std::vector arg_vec_cstr; + arg_vec_cstr.push_back(argv[0]); + + const Int32 kInvalidAssembler = -1; + Int32 asm_type = kInvalidAssembler; + + for (size_t index_arg = 1; index_arg < argc; ++index_arg) { + if (strcmp(argv[index_arg], "-asm-h") == 0) { + std::printf("asm: Frontend Assembler (64x0, power64, arm64, x64).\n"); + std::printf("asm: Version: %s, Release: %s.\n", kDistVersion, kDistRelease); + std::printf( + "asm: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, all " + "rights reserved.\n"); + std::printf( + "CompilerKit: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, " + "Licensed under the Apache 2.0 license.\n"); + + return 0; + } else if (strcmp(argv[index_arg], "-asm-x64") == 0) { + asm_type = kX64Assembler; + } else if (strcmp(argv[index_arg], "-asm-aarch64") == 0) { + asm_type = kARM64Assembler; + } else if (strcmp(argv[index_arg], "-asm-64x0") == 0) { + asm_type = k64X0Assembler; + } else if (strcmp(argv[index_arg], "-asm-power64") == 0) { + asm_type = kPOWER64Assembler; + } else { + arg_vec_cstr.push_back(argv[index_arg]); + } + } + + switch (asm_type) { + case kPOWER64Assembler: { + if (int32_t code = AssemblerMainPower64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { + std::printf("asm: frontend exited with code %i.\n", code); + return code; + } + break; + } + case k64X0Assembler: { + if (int32_t code = AssemblerMain64x0(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { + std::printf("asm: frontend exited with code %i.\n", code); + return code; + } + break; + } + case kARM64Assembler: { + if (int32_t code = AssemblerMainARM64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { + std::printf("asm: frontend exited with code %i.\n", code); + return code; + } + break; + } + case kX64Assembler: { + if (int32_t code = AssemblerMainAMD64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { + std::printf("asm: frontend exited with code %i.\n", code); + return code; + } + break; + } + default: { + return EXIT_FAILURE; + } + } + + return EXIT_SUCCESS; +} diff --git a/src/CommandLine/asm.json b/src/CommandLine/asm.json new file mode 100644 index 0000000..bfb8ac7 --- /dev/null +++ b/src/CommandLine/asm.json @@ -0,0 +1,12 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], + "sources_path": ["asm.cc"], + "output_name": "asm", + "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], + "cpp_macros": [ + "__ASM__=202401", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} diff --git a/src/CommandLine/cppdrv.cc b/src/CommandLine/cppdrv.cc new file mode 100644 index 0000000..92bc5ae --- /dev/null +++ b/src/CommandLine/cppdrv.cc @@ -0,0 +1,23 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file cppdrv.cc +/// @brief Nectar frontend preprocessor. + +#include +#include + +CK_IMPORT_C int CPlusPlusPreprocessorMain(int argc, char const* argv[]); + +int main(int argc, char const* argv[]) { + if (auto code = CPlusPlusPreprocessorMain(argc, argv); code > 0) { + std::printf("cppdrv: preprocessor exited with code %i.\n", code); + + return NECTI_EXEC_ERROR; + } + + return NECTI_SUCCESS; +} diff --git a/src/CommandLine/cppdrv.json b/src/CommandLine/cppdrv.json new file mode 100644 index 0000000..9eb5e54 --- /dev/null +++ b/src/CommandLine/cppdrv.json @@ -0,0 +1,12 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], + "sources_path": ["cppdrv.cc"], + "output_name": "cppdrv", + "compiler_flags": ["-L/usr/local/lib", "-lCompilerKit"], + "cpp_macros": [ + "__CPPDRV__=202504", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} diff --git a/src/CommandLine/dbg.cc b/src/CommandLine/dbg.cc new file mode 100644 index 0000000..290b183 --- /dev/null +++ b/src/CommandLine/dbg.cc @@ -0,0 +1,18 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @file dbg.cc +/// @brief Nectar debugger. + +CK_IMPORT_C Int32 DebuggerMachPOSIX(Int32 argc, Char const* argv[]); + +/// @brief Debugger entrypoint. +/// @return Status code of debugger. +Int32 main(Int32 argc, Char const* argv[]) { + return DebuggerMachPOSIX(argc, argv); +} diff --git a/src/CommandLine/dbg.json b/src/CommandLine/dbg.json new file mode 100644 index 0000000..8e786a7 --- /dev/null +++ b/src/CommandLine/dbg.json @@ -0,0 +1,12 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], + "sources_path": ["dbg.cc"], + "output_name": "dbg", + "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"], + "cpp_macros": [ + "__DBG__=202401", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} diff --git a/src/CommandLine/kdbg.cc b/src/CommandLine/kdbg.cc new file mode 100644 index 0000000..3a6eaa3 --- /dev/null +++ b/src/CommandLine/kdbg.cc @@ -0,0 +1,18 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @file kdbg.cc +/// @brief NeKernel debugger. + +CK_IMPORT_C Int32 DebuggerNeKernel(Int32 argc, Char const* argv[]); + +/// @brief Debugger entrypoint. +/// @return Status code of debugger. +Int32 main(Int32 argc, Char const* argv[]) { + return DebuggerNeKernel(argc, argv); +} diff --git a/src/CommandLine/kdbg.json b/src/CommandLine/kdbg.json new file mode 100644 index 0000000..f661fc5 --- /dev/null +++ b/src/CommandLine/kdbg.json @@ -0,0 +1,12 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], + "sources_path": ["kdbg.cc"], + "output_name": "kdbg", + "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"], + "cpp_macros": [ + "__DBG__=202401", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} diff --git a/src/CommandLine/ld64.cc b/src/CommandLine/ld64.cc new file mode 100644 index 0000000..618bd32 --- /dev/null +++ b/src/CommandLine/ld64.cc @@ -0,0 +1,16 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +#include + +/// @file ld64.cc +/// @brief Nectar linker for AE objects. + +CK_IMPORT_C Int32 DynamicLinker64PEF(Int32 argc, Char const* argv[]); + +Int32 main(Int32 argc, Char const* argv[]) { + return DynamicLinker64PEF(argc, argv); +} diff --git a/src/CommandLine/ld64.json b/src/CommandLine/ld64.json new file mode 100644 index 0000000..2045550 --- /dev/null +++ b/src/CommandLine/ld64.json @@ -0,0 +1,12 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], + "sources_path": ["ld64.cc"], + "output_name": "ld64", + "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], + "cpp_macros": [ + "__LD64__=202401", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} diff --git a/src/CommandLine/pef-amd64-cxxdrv.cc b/src/CommandLine/pef-amd64-cxxdrv.cc new file mode 100644 index 0000000..1bd7c3c --- /dev/null +++ b/src/CommandLine/pef-amd64-cxxdrv.cc @@ -0,0 +1,38 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file pef-amd64-cxxdrv.cc +/// @brief Nectar C++ frontend compiler for AMD64. + +#include +#include +#include +#include + +#ifdef __APPLE__ +static auto kPath = "/usr/local/lib/libCompilerKit.dylib"; +#else +static auto kPath = "/usr/lib/libCompilerKit.so"; +#endif + +static auto kSymbol = "CompilerCPlusPlusAMD64"; + +Int32 main(Int32 argc, Char const* argv[]) { + CompilerKit::DLLLoader dylib; + dylib(kPath, kSymbol); + + CompilerKit::DLLLoader::EntryT entrypoint_cxx = + reinterpret_cast(dylib.fEntrypoint); + + if (!entrypoint_cxx) { + kStdOut; + std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror()); + + return EXIT_FAILURE; + } + + return (entrypoint_cxx(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/CommandLine/pef-amd64-cxxdrv.json b/src/CommandLine/pef-amd64-cxxdrv.json new file mode 100644 index 0000000..62b5b4d --- /dev/null +++ b/src/CommandLine/pef-amd64-cxxdrv.json @@ -0,0 +1,19 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": [ + "../CompilerKit", + "../", + "../CompilerKit/src/Detail" + ], + "sources_path": [ + "pef-amd64-cxxdrv.cc" + ], + "output_name": "pef-amd64-cxxdrv", + "compiler_flags": [ + ], + "cpp_macros": [ + "__CXXDRV__=202504", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} \ No newline at end of file diff --git a/src/CommandLine/pef-arm64-cdrv.cc b/src/CommandLine/pef-arm64-cdrv.cc new file mode 100644 index 0000000..f4be5d0 --- /dev/null +++ b/src/CommandLine/pef-arm64-cdrv.cc @@ -0,0 +1,38 @@ +/* ======================================== + + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license + +======================================== */ + +/// @file pef-arm-cdrv.cc +/// @brief Nectar ARm64 C frontend compiler. + +#include +#include +#include +#include + +#ifdef __APPLE__ +static auto kPath = "/usr/local/lib/libCompilerKit.dylib"; +#else +static auto kPath = "/usr/lib/libCompilerKit.so"; +#endif + +static auto kSymbol = "CompilerCLangARM64"; + +Int32 main(Int32 argc, Char const* argv[]) { + CompilerKit::DLLLoader dylib; + dylib(kPath, kSymbol); + + CompilerKit::DLLLoader::EntryT entrypoint_c = + reinterpret_cast(dylib.fEntrypoint); + + if (!entrypoint_c) { + kStdOut; + std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror()); + + return EXIT_FAILURE; + } + + return (entrypoint_c(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/src/CommandLine/pef-arm64-cdrv.json b/src/CommandLine/pef-arm64-cdrv.json new file mode 100644 index 0000000..be6a1be --- /dev/null +++ b/src/CommandLine/pef-arm64-cdrv.json @@ -0,0 +1,19 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": [ + "../CompilerKit", + "../", + "../CompilerKit/src/Detail" + ], + "sources_path": [ + "pef-arm64-cdrv.cc" + ], + "output_name": "pef-arm64-cdrv", + "compiler_flags": [ + ], + "cpp_macros": [ + "__CXXDRV__=202504", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} \ No newline at end of file diff --git a/src/CompilerKit/ck-osx-san.json b/src/CompilerKit/ck-osx-san.json index 193b3a2..137596f 100644 --- a/src/CompilerKit/ck-osx-san.json +++ b/src/CompilerKit/ck-osx-san.json @@ -23,7 +23,7 @@ "-fsanitize=undefined" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/ck-osx.json b/src/CompilerKit/ck-osx.json index 1109f75..392140a 100644 --- a/src/CompilerKit/ck-osx.json +++ b/src/CompilerKit/ck-osx.json @@ -18,7 +18,7 @@ "-shared" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/ck-posix.json b/src/CompilerKit/ck-posix.json index 3f6127c..6380ae2 100644 --- a/src/CompilerKit/ck-posix.json +++ b/src/CompilerKit/ck-posix.json @@ -17,7 +17,7 @@ "-shared" ], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" ] diff --git a/src/CompilerKit/src/Assemblers/Assembler+32x0.cc b/src/CompilerKit/src/Assemblers/Assembler+32x0.cc index 1b8d9f6..dbf2898 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+32x0.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+32x0.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+64x0.cc b/src/CompilerKit/src/Assemblers/Assembler+64x0.cc index 757f5b4..1ddb5d2 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+64x0.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+64x0.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc index 7146a53..6d1ca0e 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+AMD64.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc b/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc index 5113704..3df2b03 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+ARM64.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc index bad9535..d595731 100644 --- a/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc +++ b/src/CompilerKit/src/Assemblers/Assembler+PowerPC.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ diff --git a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc index b5da2a8..c132638 100644 --- a/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc +++ b/src/CompilerKit/src/CodeGenerator+AssemblyFactory.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license ======================================== */ @@ -9,7 +9,7 @@ /** * @file AssemblyFactory.cc * @author Amlal El Mahrouss (amlal@nekernel.org) - * @brief Assembly API of NeCTI + * @brief Assembly API of Nectar * @version 0.0.3 * @copyright Copyright (c) 2024-2025 Amlal El Mahrouss * diff --git a/src/CompilerKit/src/Compilers/CCompiler+64x0.cc b/src/CompilerKit/src/Compilers/CCompiler+64x0.cc index f18b22b..42d654b 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+64x0.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+64x0.cc @@ -2,7 +2,7 @@ * ======================================================== * * cc - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -321,7 +321,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontend64x0::Compile(std::strin if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntaxLeaf.fUserValue = "\tlda r12, extern_segment "; diff --git a/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc b/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc index e0f08e2..688835e 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+ARM64.cc @@ -2,7 +2,7 @@ * ======================================================== * * CCompilerARM64 - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -320,7 +320,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendARM64::Compile(std::stri if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntaxLeaf.fUserValue = "\tlda r12, extern_segment "; diff --git a/src/CompilerKit/src/Compilers/CCompiler+Power64.cc b/src/CompilerKit/src/Compilers/CCompiler+Power64.cc index 724e7cc..3867be6 100644 --- a/src/CompilerKit/src/Compilers/CCompiler+Power64.cc +++ b/src/CompilerKit/src/Compilers/CCompiler+Power64.cc @@ -2,7 +2,7 @@ * ======================================================== * * CompilerPower64 - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -321,7 +321,7 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendPower64::Compile(std::st if (expr.find(")") != std::string::npos) expr.erase(expr.find(")")); - kIfFunction = "__NECTI_IF_PROC_"; + kIfFunction = "__NECTAR_IF_PROC_"; kIfFunction += std::to_string(time_off._Raw); syntax_leaf.fUserValue = diff --git a/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc b/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc index 70de909..54fbc25 100644 --- a/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc +++ b/src/CompilerKit/src/Compilers/CPlusPlusCompiler+AMD64.cc @@ -2,7 +2,7 @@ * ======================================================== * * C++ Compiler Driver - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -345,10 +345,10 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( symbol_name_fn.erase(symbol_name_fn.find("(")); } - syntax_tree.fUserValue = "public_segment .code64 __NECTI_" + symbol_name_fn + "\n"; + syntax_tree.fUserValue = "public_segment .code64 __NECTAR_" + symbol_name_fn + "\n"; ++kFunctionEmbedLevel; - kOriginMap.push_back({"__NECTI_" + symbol_name_fn, kOrigin}); + kOriginMap.push_back({"__NECTAR_" + symbol_name_fn, kOrigin}); break; @@ -474,10 +474,10 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( if (pairRight != valueOfVar) { if (valueOfVar[0] == '\"') { - syntax_tree.fUserValue = "segment .data64 __NECTI_LOCAL_VAR_" + varName + ": db " + + syntax_tree.fUserValue = "segment .data64 __NECTAR_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n\n"; syntax_tree.fUserValue += instr + kRegisterList[kRegisterMap.size() - 1] + ", " + - "__NECTI_LOCAL_VAR_" + varName + "\n"; + "__NECTAR_LOCAL_VAR_" + varName + "\n"; kOrigin += 1UL; } else { syntax_tree.fUserValue = @@ -492,16 +492,16 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( if (((int) indexRight - 1) < 0) { if (valueOfVar[0] == '\"') { syntax_tree.fUserValue = - "segment .data64 __NECTI_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n"; + "segment .data64 __NECTAR_LOCAL_VAR_" + varName + ": db " + valueOfVar + ", 0\n"; syntax_tree.fUserValue += instr + kRegisterList[kRegisterMap.size()] + ", " + - "__NECTI_LOCAL_VAR_" + varName + "\n"; + "__NECTAR_LOCAL_VAR_" + varName + "\n"; kOrigin += 1UL; } else { auto mangled = valueOfVar; if (mangled.find("(") != std::string::npos) { auto ret = mangled.erase(mangled.find("(")); - mangled = "__NECTI_"; + mangled = "__NECTAR_"; mangled += ret; syntax_tree.fUserValue = "jmp " + mangled + "\n"; @@ -660,8 +660,8 @@ CompilerKit::SyntaxLeafList::SyntaxLeaf CompilerFrontendCPlusPlusAMD64::Compile( break; } } else { - syntax_tree.fUserValue = "__NECTI_LOCAL_RETURN_STRING: db " + subText + - ", 0\nmov rcx, __NECTI_LOCAL_RETURN_STRING\n"; + syntax_tree.fUserValue = "__NECTAR_LOCAL_RETURN_STRING: db " + subText + + ", 0\nmov rcx, __NECTAR_LOCAL_RETURN_STRING\n"; syntax_tree.fUserValue += "mov rax, rcx\nret\n"; kOrigin += 1UL; diff --git a/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc b/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc index 0361873..f3eaaa9 100644 --- a/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc +++ b/src/CompilerKit/src/DynamicLinkers/DynamicLinker64+PEF.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license @file DynamicLinker64PEF.cc @brief: C++ 64-Bit PEF Linker for NeKernel.org's NeKernel @@ -22,7 +22,7 @@ #include #include -#define kLinkerVersionStr "NeCTI 64-Bit Linker (Preferred Executable Format)" +#define kLinkerVersionStr "Nectar 64-Bit Linker (Preferred Executable Format)" #define kPefNoCpu (0U) #define kPefNoSubCpu (0U) @@ -68,8 +68,8 @@ static CompilerKit::STLString kLinkerStart = kPefStart; static std::vector kObjectList; static std::vector kObjectBytes; -/// @brief NeCTI 64-bit Linker. -/// @note This linker is made for PEF executable, thus NeCTI based OSes. +/// @brief Nectar 64-bit Linker. +/// @note This linker is made for PEF executable, thus Nectar based OSes. NECTI_MODULE(DynamicLinker64PEF) { bool is_executable = true; diff --git a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc b/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc index 4e34ab3..97bf44f 100644 --- a/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc +++ b/src/CompilerKit/src/Preprocessor/Preprocessor+Generic.cc @@ -2,7 +2,7 @@ * ======================================================== * * C++ Preprocessor Driver - * Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + * Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. * * ======================================================== */ @@ -760,7 +760,7 @@ NECTI_MODULE(CPlusPlusPreprocessorMain) { Detail::bpp_macro macro_zka; - macro_zka.fName = "__NECTI__"; + macro_zka.fName = "__NECTAR__"; macro_zka.fValue = "1"; kMacros.push_back(macro_zka); diff --git a/src/DebuggerKit/dk-nekernel.json b/src/DebuggerKit/dk-nekernel.json index ad2deb8..4483a30 100644 --- a/src/DebuggerKit/dk-nekernel.json +++ b/src/DebuggerKit/dk-nekernel.json @@ -9,7 +9,7 @@ "output_name": "/usr/local/lib/libDebuggerKit.dylib", "compiler_flags": ["-fPIC", "-shared"], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "DK_USE_STRUCTS=1", "DK_NEKERNEL_DEBUGGER", "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" diff --git a/src/DebuggerKit/dk-osx.json b/src/DebuggerKit/dk-osx.json index 20813aa..677e473 100644 --- a/src/DebuggerKit/dk-osx.json +++ b/src/DebuggerKit/dk-osx.json @@ -9,7 +9,7 @@ "output_name": "/usr/local/lib/libDebuggerKit.dylib", "compiler_flags": ["-fPIC", "-shared"], "cpp_macros": [ - "__NECTI__=202505", + "__NECTAR__=202505", "CK_USE_STRUCTS=1", "DEBUGGERKIT_POSIX", "DK_MACH_DEBUGGER", diff --git a/src/DebuggerKit/src/NeKernelContract.cc b/src/DebuggerKit/src/NeKernelContract.cc index 58d1295..b4b3b9d 100644 --- a/src/DebuggerKit/src/NeKernelContract.cc +++ b/src/DebuggerKit/src/NeKernelContract.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/src/DebuggerKit/src/NeKernelContractCLI.cc b/src/DebuggerKit/src/NeKernelContractCLI.cc index 3079568..3f05bed 100644 --- a/src/DebuggerKit/src/NeKernelContractCLI.cc +++ b/src/DebuggerKit/src/NeKernelContractCLI.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ @@ -29,7 +29,7 @@ static void dbgi_ctrlc_handler(std::int32_t _) { NECTI_MODULE(DebuggerNeKernel) { pfd::notify("Debugger Event", - "NeCTI Debugger\n(C) 2025 Amlal El Mahrouss and NeKernel.org contributors, all " + "Nectar Debugger\n(C) 2025 Amlal El Mahrouss and NeKernel.org contributors, all " "rights reserved."); if (argc >= 5 && std::string(argv[1]) == "-k" && argv[2] != nullptr && diff --git a/src/DebuggerKit/src/POSIXMachContractCLI.cc b/src/DebuggerKit/src/POSIXMachContractCLI.cc index 9093ec2..041a243 100644 --- a/src/DebuggerKit/src/POSIXMachContractCLI.cc +++ b/src/DebuggerKit/src/POSIXMachContractCLI.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. + Copyright (C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ @@ -30,7 +30,7 @@ static void dbgi_ctrlc_handler(std::int32_t _) { NECTI_MODULE(DebuggerMachPOSIX) { pfd::notify( "Debugger Event", - "Userland Debugger\n(C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license."); + "Userland Debugger\n(C) 2025 Amlal El Mahrouss, licensed under the Apache 2.0 license."); if (argc >= 3 && std::string(argv[1]) == "-p" && argv[2] != nullptr) { kPath = argv[2]; diff --git a/src/Tools/asm.cc b/src/Tools/asm.cc deleted file mode 100644 index 90b104c..0000000 --- a/src/Tools/asm.cc +++ /dev/null @@ -1,95 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -/// @file asm.cc -/// @brief Assembler frontend. - -#include -#include -#include - -CK_IMPORT_C Int32 AssemblerMainPower64(Int32 argc, Char const* argv[]); -CK_IMPORT_C Int32 AssemblerMainARM64(Int32 argc, Char const* argv[]); -CK_IMPORT_C Int32 AssemblerMain64x0(Int32 argc, Char const* argv[]); -CK_IMPORT_C Int32 AssemblerMainAMD64(Int32 argc, Char const* argv[]); - -enum AsmKind : Int32 { - kInvalidAssembler = 0, - kX64Assembler = 100, - k64X0Assembler, - kPOWER64Assembler, - kARM64Assembler, - kAssemblerCount = kARM64Assembler - kX64Assembler + 1, -}; - -Int32 main(Int32 argc, Char const* argv[]) { - std::vector arg_vec_cstr; - arg_vec_cstr.push_back(argv[0]); - - const Int32 kInvalidAssembler = -1; - Int32 asm_type = kInvalidAssembler; - - for (size_t index_arg = 1; index_arg < argc; ++index_arg) { - if (strcmp(argv[index_arg], "-asm-h") == 0) { - std::printf("asm: Frontend Assembler (64x0, power64, arm64, x64).\n"); - std::printf("asm: Version: %s, Release: %s.\n", kDistVersion, kDistRelease); - std::printf( - "asm: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, all " - "rights reserved.\n"); - std::printf( - "CompilerKit: Designed by Amlal El Mahrouss, Copyright (C) 2024-2025 Amlal El Mahrouss, " - "Licensed under the Apache 2.0 license.\n"); - - return 0; - } else if (strcmp(argv[index_arg], "-asm-x64") == 0) { - asm_type = kX64Assembler; - } else if (strcmp(argv[index_arg], "-asm-aarch64") == 0) { - asm_type = kARM64Assembler; - } else if (strcmp(argv[index_arg], "-asm-64x0") == 0) { - asm_type = k64X0Assembler; - } else if (strcmp(argv[index_arg], "-asm-power64") == 0) { - asm_type = kPOWER64Assembler; - } else { - arg_vec_cstr.push_back(argv[index_arg]); - } - } - - switch (asm_type) { - case kPOWER64Assembler: { - if (int32_t code = AssemblerMainPower64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { - std::printf("asm: frontend exited with code %i.\n", code); - return code; - } - break; - } - case k64X0Assembler: { - if (int32_t code = AssemblerMain64x0(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { - std::printf("asm: frontend exited with code %i.\n", code); - return code; - } - break; - } - case kARM64Assembler: { - if (int32_t code = AssemblerMainARM64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { - std::printf("asm: frontend exited with code %i.\n", code); - return code; - } - break; - } - case kX64Assembler: { - if (int32_t code = AssemblerMainAMD64(arg_vec_cstr.size(), arg_vec_cstr.data()); code) { - std::printf("asm: frontend exited with code %i.\n", code); - return code; - } - break; - } - default: { - return EXIT_FAILURE; - } - } - - return EXIT_SUCCESS; -} diff --git a/src/Tools/asm.json b/src/Tools/asm.json deleted file mode 100644 index bfb8ac7..0000000 --- a/src/Tools/asm.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], - "sources_path": ["asm.cc"], - "output_name": "asm", - "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], - "cpp_macros": [ - "__ASM__=202401", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} diff --git a/src/Tools/cppdrv.cc b/src/Tools/cppdrv.cc deleted file mode 100644 index 95d4c3a..0000000 --- a/src/Tools/cppdrv.cc +++ /dev/null @@ -1,23 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -/// @file cppdrv.cc -/// @brief NeCTI frontend preprocessor. - -#include -#include - -CK_IMPORT_C int CPlusPlusPreprocessorMain(int argc, char const* argv[]); - -int main(int argc, char const* argv[]) { - if (auto code = CPlusPlusPreprocessorMain(argc, argv); code > 0) { - std::printf("cppdrv: preprocessor exited with code %i.\n", code); - - return NECTI_EXEC_ERROR; - } - - return NECTI_SUCCESS; -} diff --git a/src/Tools/cppdrv.json b/src/Tools/cppdrv.json deleted file mode 100644 index 9eb5e54..0000000 --- a/src/Tools/cppdrv.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], - "sources_path": ["cppdrv.cc"], - "output_name": "cppdrv", - "compiler_flags": ["-L/usr/local/lib", "-lCompilerKit"], - "cpp_macros": [ - "__CPPDRV__=202504", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} diff --git a/src/Tools/dbg.cc b/src/Tools/dbg.cc deleted file mode 100644 index b8c4932..0000000 --- a/src/Tools/dbg.cc +++ /dev/null @@ -1,18 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -#include - -/// @file dbg.cc -/// @brief NeCTI debugger. - -CK_IMPORT_C Int32 DebuggerMachPOSIX(Int32 argc, Char const* argv[]); - -/// @brief Debugger entrypoint. -/// @return Status code of debugger. -Int32 main(Int32 argc, Char const* argv[]) { - return DebuggerMachPOSIX(argc, argv); -} diff --git a/src/Tools/dbg.json b/src/Tools/dbg.json deleted file mode 100644 index 8e786a7..0000000 --- a/src/Tools/dbg.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], - "sources_path": ["dbg.cc"], - "output_name": "dbg", - "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"], - "cpp_macros": [ - "__DBG__=202401", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} diff --git a/src/Tools/kdbg.cc b/src/Tools/kdbg.cc deleted file mode 100644 index ca82002..0000000 --- a/src/Tools/kdbg.cc +++ /dev/null @@ -1,18 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -#include - -/// @file kdbg.cc -/// @brief NeKernel debugger. - -CK_IMPORT_C Int32 DebuggerNeKernel(Int32 argc, Char const* argv[]); - -/// @brief Debugger entrypoint. -/// @return Status code of debugger. -Int32 main(Int32 argc, Char const* argv[]) { - return DebuggerNeKernel(argc, argv); -} diff --git a/src/Tools/kdbg.json b/src/Tools/kdbg.json deleted file mode 100644 index f661fc5..0000000 --- a/src/Tools/kdbg.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], - "sources_path": ["kdbg.cc"], - "output_name": "kdbg", - "compiler_flags": ["-L/usr/lib", "-lDebuggerKit"], - "cpp_macros": [ - "__DBG__=202401", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} diff --git a/src/Tools/ld64.cc b/src/Tools/ld64.cc deleted file mode 100644 index a2ce544..0000000 --- a/src/Tools/ld64.cc +++ /dev/null @@ -1,16 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -#include - -/// @file ld64.cc -/// @brief NeCTI linker for AE objects. - -CK_IMPORT_C Int32 DynamicLinker64PEF(Int32 argc, Char const* argv[]); - -Int32 main(Int32 argc, Char const* argv[]) { - return DynamicLinker64PEF(argc, argv); -} diff --git a/src/Tools/ld64.json b/src/Tools/ld64.json deleted file mode 100644 index 2045550..0000000 --- a/src/Tools/ld64.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": ["../CompilerKit", "../", "../CompilerKit/src/Detail"], - "sources_path": ["ld64.cc"], - "output_name": "ld64", - "compiler_flags": ["-L/usr/lib", "-lCompilerKit"], - "cpp_macros": [ - "__LD64__=202401", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} diff --git a/src/Tools/pef-amd64-cxxdrv.cc b/src/Tools/pef-amd64-cxxdrv.cc deleted file mode 100644 index 7abda83..0000000 --- a/src/Tools/pef-amd64-cxxdrv.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -/// @file pef-amd64-cxxdrv.cc -/// @brief NeCTI C++ frontend compiler for AMD64. - -#include -#include -#include -#include - -#ifdef __APPLE__ -static auto kPath = "/usr/local/lib/libCompilerKit.dylib"; -#else -static auto kPath = "/usr/lib/libCompilerKit.so"; -#endif - -static auto kSymbol = "CompilerCPlusPlusAMD64"; - -Int32 main(Int32 argc, Char const* argv[]) { - CompilerKit::DLLLoader dylib; - dylib(kPath, kSymbol); - - CompilerKit::DLLLoader::EntryT entrypoint_cxx = - reinterpret_cast(dylib.fEntrypoint); - - if (!entrypoint_cxx) { - kStdOut; - std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror()); - - return EXIT_FAILURE; - } - - return (entrypoint_cxx(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff --git a/src/Tools/pef-amd64-cxxdrv.json b/src/Tools/pef-amd64-cxxdrv.json deleted file mode 100644 index 62b5b4d..0000000 --- a/src/Tools/pef-amd64-cxxdrv.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": [ - "../CompilerKit", - "../", - "../CompilerKit/src/Detail" - ], - "sources_path": [ - "pef-amd64-cxxdrv.cc" - ], - "output_name": "pef-amd64-cxxdrv", - "compiler_flags": [ - ], - "cpp_macros": [ - "__CXXDRV__=202504", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} \ No newline at end of file diff --git a/src/Tools/pef-arm64-cdrv.cc b/src/Tools/pef-arm64-cdrv.cc deleted file mode 100644 index 3fba1ef..0000000 --- a/src/Tools/pef-arm64-cdrv.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* ======================================== - - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license - -======================================== */ - -/// @file pef-arm-cdrv.cc -/// @brief NeCTI ARm64 C frontend compiler. - -#include -#include -#include -#include - -#ifdef __APPLE__ -static auto kPath = "/usr/local/lib/libCompilerKit.dylib"; -#else -static auto kPath = "/usr/lib/libCompilerKit.so"; -#endif - -static auto kSymbol = "CompilerCLangARM64"; - -Int32 main(Int32 argc, Char const* argv[]) { - CompilerKit::DLLLoader dylib; - dylib(kPath, kSymbol); - - CompilerKit::DLLLoader::EntryT entrypoint_c = - reinterpret_cast(dylib.fEntrypoint); - - if (!entrypoint_c) { - kStdOut; - std::printf("error: Could not find entrypoint in %s: %s\n", kPath, dlerror()); - - return EXIT_FAILURE; - } - - return (entrypoint_c(argc, argv) == NECTI_SUCCESS) ? EXIT_SUCCESS : EXIT_FAILURE; -} diff --git a/src/Tools/pef-arm64-cdrv.json b/src/Tools/pef-arm64-cdrv.json deleted file mode 100644 index be6a1be..0000000 --- a/src/Tools/pef-arm64-cdrv.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "compiler_path": "clang++", - "compiler_std": "c++20", - "headers_path": [ - "../CompilerKit", - "../", - "../CompilerKit/src/Detail" - ], - "sources_path": [ - "pef-arm64-cdrv.cc" - ], - "output_name": "pef-arm64-cdrv", - "compiler_flags": [ - ], - "cpp_macros": [ - "__CXXDRV__=202504", - "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" - ] -} \ No newline at end of file diff --git a/tests/test_01_codegen/codegen_test.cc b/tests/test_01_codegen/codegen_test.cc index d94379a..06c8e25 100644 --- a/tests/test_01_codegen/codegen_test.cc +++ b/tests/test_01_codegen/codegen_test.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ diff --git a/tests/test_02_linker/linker_test.cc b/tests/test_02_linker/linker_test.cc index 3c18fe0..617327f 100644 --- a/tests/test_02_linker/linker_test.cc +++ b/tests/test_02_linker/linker_test.cc @@ -1,6 +1,6 @@ /* ======================================== - Copyright (C) 2024-2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license + Copyright (C) 2024-2025 Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ @@ -9,21 +9,21 @@ #include -/// c++ -TEST(LinkerTest, BasicLinkTest) { +/// compile +TEST(LinkerTest, BasicLinkTestCompile) { auto expr = std::system("pef-amd64-cxxdrv test_samples/sample.cc"); EXPECT_TRUE(expr == 0) << "C++ Driver did not compile the easy C++ unit."; } /// assemble -TEST(LinkerTest, BasicLinkTest2) { +TEST(LinkerTest, BasicLinkTestAssemble) { auto expr = std::system("asm -asm:x64 test_samples/sample.cc.pp.masm"); EXPECT_TRUE(expr == 0) << "Assembler did not assemble the easy asm unit."; } /// link -TEST(LinkerTest, BasicLinkTest3) { +TEST(LinkerTest, BasicLinkTestLink) { auto expr = std::system( - "ld64 -amd64 test_samples/sample.cc.pp.obj -start __NECTI_main -output main.exec"); + "ld64 -amd64 test_samples/sample.cc.pp.obj -start __NECTAR_main -output main.exec"); EXPECT_TRUE(expr == 0) << "Linker did not link the easy object."; } -- cgit v1.2.3