diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-14 14:26:01 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-14 14:26:01 +0100 |
| commit | e199681a53aba5e7121e522f2422ae3bdea0a3fd (patch) | |
| tree | 6797476f2a58b82d92d28773996b168a03d67786 | |
| parent | a0cddce77cbb01479aa115ee63d76b30117e954f (diff) | |
[CHORE] Codebase chore and tweaks.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | doc/requirements/GenericsLibrary.FreeFunctions.md | 16 | ||||
| -rw-r--r-- | example/example_05_nectar_gpu/example.nc | 9 | ||||
| -rw-r--r-- | include/CompilerKit/AST.h | 3 | ||||
| -rw-r--r-- | include/CompilerKit/CodeGenerator.h | 3 | ||||
| -rw-r--r-- | include/CompilerKit/Utilities/DLL.h | 3 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp (renamed from src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cpp) | 2 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp (renamed from src/CompilerKit/src/Compilers/NectarCompiler+PTX.cpp) | 2 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/README.md (renamed from src/CompilerKit/src/Compilers/README.md) | 0 | ||||
| -rw-r--r-- | src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cpp | 2 | ||||
| -rw-r--r-- | src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cpp | 2 |
10 files changed, 28 insertions, 14 deletions
diff --git a/doc/requirements/GenericsLibrary.FreeFunctions.md b/doc/requirements/GenericsLibrary.FreeFunctions.md new file mode 100644 index 0000000..60e8bc5 --- /dev/null +++ b/doc/requirements/GenericsLibrary.FreeFunctions.md @@ -0,0 +1,16 @@ +# GenericsLibrary: Free Functions + +## Abstract: + +The 'Free functions' concept comes from Stepanov' STL and their papers, Nectar implements them in order to provide algorithms to work on. + +## Example: + +```nectar + let it = begin(trt); + it.leak().field_value; +``` + +```nectar + printf("%i:2", size(it)); +```
\ No newline at end of file diff --git a/example/example_05_nectar_gpu/example.nc b/example/example_05_nectar_gpu/example.nc index d0a8b72..f170b31 100644 --- a/example/example_05_nectar_gpu/example.nc +++ b/example/example_05_nectar_gpu/example.nc @@ -1,11 +1,6 @@ -// SPDX-License-Identifier: Apache-2.0 -// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (See accompanying -// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) -// Official repository: https://github.com/ne-foss-org/nectar +extern palloc_bytes; const main() { - const dummy := 0x10; + const dummy := palloc_bytes(0, 1, 0); return dummy; } - diff --git a/include/CompilerKit/AST.h b/include/CompilerKit/AST.h index 20389c3..c1313ce 100644 --- a/include/CompilerKit/AST.h +++ b/include/CompilerKit/AST.h @@ -1,4 +1,5 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (See accompanying // file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) // Official repository: https://github.com/ne-foss-org/nectar diff --git a/include/CompilerKit/CodeGenerator.h b/include/CompilerKit/CodeGenerator.h index f2cbe9d..ac42879 100644 --- a/include/CompilerKit/CodeGenerator.h +++ b/include/CompilerKit/CodeGenerator.h @@ -1,4 +1,5 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (See accompanying // file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) // Official repository: https://github.com/ne-foss-org/nectar diff --git a/include/CompilerKit/Utilities/DLL.h b/include/CompilerKit/Utilities/DLL.h index 461661a..6d12538 100644 --- a/include/CompilerKit/Utilities/DLL.h +++ b/include/CompilerKit/Utilities/DLL.h @@ -1,4 +1,5 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (See accompanying // file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) // Official repository: https://github.com/ne-foss-org/nectar diff --git a/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp index 92cc52d..88b6894 100644 --- a/src/CompilerKit/src/Compilers/NectarCompiler+AMD64.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp @@ -14,7 +14,7 @@ /////////////////////// -// MACROS // +// MACROS // /////////////////////// diff --git a/src/CompilerKit/src/Compilers/NectarCompiler+PTX.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp index 5737cfe..cab7ebd 100644 --- a/src/CompilerKit/src/Compilers/NectarCompiler+PTX.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp @@ -16,7 +16,7 @@ /////////////////////// -// MACROS // +// MACROS // /////////////////////// diff --git a/src/CompilerKit/src/Compilers/README.md b/src/CompilerKit/src/Frontends/README.md index 2e32d07..2e32d07 100644 --- a/src/CompilerKit/src/Compilers/README.md +++ b/src/CompilerKit/src/Frontends/README.md diff --git a/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cpp b/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cpp index f016c6e..911b582 100644 --- a/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cpp +++ b/src/CompilerKit/src/Linkers/DynamicLinker64+MachO.cpp @@ -6,7 +6,7 @@ /// @author Amlal El Mahrouss (amlal@nekernel.org) /// @brief NeKernel.org 64-bit Mach-O Linker. -/// Last Rev: 2026 +/// @version Last Rev: 2026 /// @note Outputs Mach-O executables with __TEXT and __DATA segments. #ifdef CK_USE_MACHO_LINKER diff --git a/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cpp b/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cpp index 0ef8531..34333a3 100644 --- a/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cpp +++ b/src/CompilerKit/src/Linkers/DynamicLinker64+PEF.cpp @@ -6,7 +6,7 @@ /// @author Amlal El Mahrouss (amlal@nekernel.org) /// @brief NeKernel.org 64-bit PEF Linker. -/// Last Rev: Sun Feb 8 CET 2026 +/// @version Last Rev: Sun Feb 8 CET 2026 /// @note Do not look up for anything with .code64/.data64/.zero64! /// It will be loaded when the program loader will start the image. |
