diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-19 09:21:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-19 09:21:48 +0100 |
| commit | 281bef7f35e63a9c5daf37cca5bb8eea64c12693 (patch) | |
| tree | 43025631e922b4d61b4b19e0f84cde8b7dd785b2 /dev/CompilerKit/Compiler.h | |
| parent | 893c7e2169bfce6211a23e865a1f7efb43d025c7 (diff) | |
| parent | a48098479269cdace4d9ce32264a73eef76994dc (diff) | |
Merge pull request #23 from nekernel-org/dev
feat: new documented codebase and improvements.
Diffstat (limited to 'dev/CompilerKit/Compiler.h')
| -rw-r--r-- | dev/CompilerKit/Compiler.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dev/CompilerKit/Compiler.h b/dev/CompilerKit/Compiler.h index 3da99ca..a14005b 100644 --- a/dev/CompilerKit/Compiler.h +++ b/dev/CompilerKit/Compiler.h @@ -17,7 +17,9 @@ namespace CompilerKit { class AssemblyFactory; class AssemblyInterface; +/// =========================================================== /// /// @brief Simple assembly factory +/// =========================================================== /// class AssemblyFactory final { public: explicit AssemblyFactory() = default; @@ -47,8 +49,10 @@ class AssemblyFactory final { AssemblyInterface* fMounted{nullptr}; }; +/// =========================================================== /// /// @brief Assembly to binary generator class. /// @note This interface creates according to the CPU target of the child class. +/// =========================================================== /// class AssemblyInterface { public: explicit AssemblyInterface() = default; @@ -58,11 +62,16 @@ class AssemblyInterface { virtual UInt32 Arch() noexcept { return AssemblyFactory::kArchAMD64; } + /// =========================================================== /// /// @brief compile to object file. /// @note Example C++ -> MASM -> AE object. + /// =========================================================== /// virtual Int32 CompileToFormat(std::string src, Int32 arch) = 0; }; +/// =========================================================== /// +/// @brief Number casting unions for different sizes. +/// =========================================================== /// union NumberCastBase { NumberCastBase() = default; ~NumberCastBase() = default; @@ -108,6 +117,9 @@ union NumberCast8 final { UInt8 raw; }; +/// =========================================================== /// +/// @brief Assembly encoder interface. +/// =========================================================== /// class EncoderInterface { public: explicit EncoderInterface() = default; @@ -120,6 +132,10 @@ class EncoderInterface { virtual bool WriteNumber(const std::size_t& pos, std::string& from_what) = 0; }; +/// =========================================================== /// +/// @brief Different architecture encoders. +/// =========================================================== /// + #ifdef __ASM_NEED_AMD64__ class EncoderAMD64 final : public EncoderInterface { |
