diff options
| -rw-r--r-- | include/CompilerKit/PEF.h | 2 | ||||
| -rw-r--r-- | include/CoreRuntime/cplusplus/utility.hpp | 8 | ||||
| -rw-r--r-- | include/CoreRuntime/nec/exports.hpp | 6 | ||||
| -rw-r--r-- | src/CompilerKit/ck-win64.json | 27 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp | 10 | ||||
| -rw-r--r-- | src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp | 12 | ||||
| -rw-r--r-- | src/DebuggerKit/dk-win64.json | 19 |
7 files changed, 66 insertions, 18 deletions
diff --git a/include/CompilerKit/PEF.h b/include/CompilerKit/PEF.h index 875f925..8d062a4 100644 --- a/include/CompilerKit/PEF.h +++ b/include/CompilerKit/PEF.h @@ -39,7 +39,7 @@ /* @note counting the \0 at the end */ #define kPefMagicLen (5) -#define kPefVersion (0x0510) +#define kPefVersion (0x0500) #define kPefNameLen (255) #define kPefBaseOrigin (0x40000000) diff --git a/include/CoreRuntime/cplusplus/utility.hpp b/include/CoreRuntime/cplusplus/utility.hpp index a427c44..81da627 100644 --- a/include/CoreRuntime/cplusplus/utility.hpp +++ b/include/CoreRuntime/cplusplus/utility.hpp @@ -3,10 +3,11 @@ // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nectar -#ifndef LIBCXX_UTILITY_H -#define LIBCXX_UTILITY_H +#ifndef CRK_UTILITY_HPP +#define CRK_UTILITY_HPP namespace std { + /// @brief Forward object. /// @tparam Args the object type. /// @param arg the object. @@ -24,6 +25,7 @@ template <typename Args> inline auto move(Args&& arg) -> Args&& { return static_cast<Args&&>(arg); } + } // namespace std -#endif // LIBCXX_UTILITY_H +#endif // CRK_UTILITY_HPP diff --git a/include/CoreRuntime/nec/exports.hpp b/include/CoreRuntime/nec/exports.hpp index 3fea960..7e02641 100644 --- a/include/CoreRuntime/nec/exports.hpp +++ b/include/CoreRuntime/nec/exports.hpp @@ -6,10 +6,10 @@ #pragma once -#include <CoreRuntime/C++/abi/abi.hpp> -#include <CoreRuntime/C++/abi/new.hpp> +#include <CoreRuntime/cplusplus/abi/abi.hpp> +#include <CoreRuntime/cplusplus/abi/new.hpp> /// @brief The Nectar FFI. -namespace nectar_lang { +namespace nec::abi { } diff --git a/src/CompilerKit/ck-win64.json b/src/CompilerKit/ck-win64.json new file mode 100644 index 0000000..dca9350 --- /dev/null +++ b/src/CompilerKit/ck-win64.json @@ -0,0 +1,27 @@ +{ + "compiler_path": "g++", + "compiler_std": "c++20", + "headers_path": [ + "../../include/CompilerKit", + "../../include/", + "../../include/CompilerKit/src/", + "../../include/CompilerKit/src/impl" + ], + "sources_path": [ + "src/*.cpp", + "src/*/*.cpp" + ], + "output_name": "Ne-app.CompilerKit.dll", + "compiler_flags": [ + "-fPIC", + "-shared" + ], + "cpp_macros": [ + "__NECTAR__=202602", + "CK_USE_STRUCTS=1", + "CK_WINDOWS=1", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ], + "description": "CompilerKit for Windows NT. The Compiler Kit is the framework behind Nectar." +} + diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp index 939823e..822a2d0 100644 --- a/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+AMD64.cpp @@ -1303,7 +1303,7 @@ static CompilerKit::STLString nectar_get_variable_ref(const CompilerKit::STLStri } if (!varInfo) { - return ""; + return {}; } if (varInfo->fIsConstant) { @@ -1327,7 +1327,7 @@ static CompilerKit::STLString nectar_get_variable_ref(const CompilerKit::STLStri return reg; } - return ""; + return {}; } /// \brief Allocate a register for a variable @@ -1383,7 +1383,7 @@ static CompilerKit::STLString nectar_allocate_register(const CompilerKit::STLStr } // No free register - return ""; + return {}; } /// \brief Spill the least recently used variable to stack @@ -1403,7 +1403,7 @@ static CompilerKit::STLString nectar_spill_lru_variable() { } if (!lruVar) { - return ""; // No variable to spill + return {}; // No variable to spill } // Allocate stack space @@ -1492,7 +1492,7 @@ static CompilerKit::STLString nectar_generate_destructor_call( auto* varInfo = nectar_find_variable(obj_name); if (!varInfo) { - return ""; + return {}; } nectar_push_scope(ScopeKind::kScopeClass, class_name); diff --git a/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp index 7edc493..ed13b09 100644 --- a/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp +++ b/src/CompilerKit/src/Frontends/NectarCompiler+PTX.cpp @@ -1197,7 +1197,7 @@ static CompilerKit::STLString nectar_generate_prologue() { /// \brief Generate function epilogue static CompilerKit::STLString nectar_generate_epilogue() { - return ""; + return {}; } /// \brief Generate PTX function header @@ -1286,7 +1286,7 @@ static CompilerKit::STLString nectar_get_variable_ref(const CompilerKit::STLStri } if (!varInfo) { - return ""; + return {}; } if (varInfo->fIsConstant) { @@ -1310,7 +1310,7 @@ static CompilerKit::STLString nectar_get_variable_ref(const CompilerKit::STLStri delete varInfo; return reg; - return ""; + return {}; } /// \brief Allocate a register for a variable @@ -1366,12 +1366,12 @@ static CompilerKit::STLString nectar_allocate_register(const CompilerKit::STLStr } // No free register - return ""; + return {}; } /// \brief Spill the least recently used variable to stack static CompilerKit::STLString nectar_spill_lru_variable() { - return ""; + return {}; } /// \brief Add a class member to the struct map @@ -1441,7 +1441,7 @@ static CompilerKit::STLString nectar_generate_destructor_call( auto* varInfo = nectar_find_variable(obj_name); if (!varInfo) { - return ""; + return {}; } nectar_push_scope(ScopeKind::kScopeClass, class_name); diff --git a/src/DebuggerKit/dk-win64.json b/src/DebuggerKit/dk-win64.json new file mode 100644 index 0000000..d74fd29 --- /dev/null +++ b/src/DebuggerKit/dk-win64.json @@ -0,0 +1,19 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": [ + "../../include/DebuggerKit", + "../../include" + ], + "sources_path": [ "src/*.cpp" ], + "output_name": "Ne-app.DebuggerKit.dll", + "compiler_flags": [ "-fPIC", "-shared" ], + "cpp_macros": [ + "__NECTAR__=202505", + "CK_USE_STRUCTS=1", + "DEBUGGERKIT_WINDOWS=1", + "DK_NEKERNEL_DEBUGGER=1", + "kDistReleaseBranch=$(git rev-parse --abbrev-ref HEAD)-$(uuidgen)" + ] +} + |
