From 7cc26ff0be5cb727bbf7fb597fcc2a0ea65414c5 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 29 Nov 2024 09:48:42 +0100 Subject: Merging with unstable. Signed-off-by: Amlal --- dev/ToolchainKit/UUID.h | 28 +++++----- dev/ToolchainKit/src/Assembler64x0.cc | 56 ++++++++++---------- dev/ToolchainKit/src/AssemblerAMD64.cc | 60 +++++++++++----------- dev/ToolchainKit/src/AssemblerPower.cc | 46 ++++++++--------- dev/ToolchainKit/src/CCompiler64x0.cc | 30 +++++------ dev/ToolchainKit/src/CCompilerPower64.cc | 30 +++++------ dev/ToolchainKit/src/CPlusPlusCompilerAMD64.cc | 24 ++++----- .../src/CPlusPlusCompilerPreProcessor.cc | 50 +++++++++--------- dev/ToolchainKit/src/Detail/AsmUtils.h | 12 ++--- dev/ToolchainKit/src/DynamicLinker64PEF.cc | 8 +-- 10 files changed, 172 insertions(+), 172 deletions(-) (limited to 'dev/ToolchainKit') diff --git a/dev/ToolchainKit/UUID.h b/dev/ToolchainKit/UUID.h index 00b153b..74584b4 100644 --- a/dev/ToolchainKit/UUID.h +++ b/dev/ToolchainKit/UUID.h @@ -73,7 +73,7 @@ namespace uuids using span = gsl::span; #endif - namespace detail + namespace Details { template [[nodiscard]] constexpr inline unsigned char hex2char(TChar const ch) noexcept @@ -319,7 +319,7 @@ namespace uuids template <> inline constexpr wchar_t guid_encoder[17] = L"0123456789abcdef"; - } // namespace detail + } // namespace Details // -------------------------------------------------------------------------------------------------------------------------- // UUID format https://tools.ietf.org/html/rfc4122 @@ -486,7 +486,7 @@ namespace uuids [[nodiscard]] constexpr static bool is_valid_uuid( StringType const& in_str) noexcept { - auto str = detail::to_string_view(in_str); + auto str = Details::to_string_view(in_str); bool firstDigit = true; size_t hasBraces = 0; size_t index = 0; @@ -504,7 +504,7 @@ namespace uuids if (str[i] == '-') continue; - if (index >= 16 || !detail::is_hex(str[i])) + if (index >= 16 || !Details::is_hex(str[i])) { return false; } @@ -532,7 +532,7 @@ namespace uuids [[nodiscard]] constexpr static std::optional from_string( StringType const& in_str) noexcept { - auto str = detail::to_string_view(in_str); + auto str = Details::to_string_view(in_str); bool firstDigit = true; size_t hasBraces = 0; size_t index = 0; @@ -552,20 +552,20 @@ namespace uuids if (str[i] == '-') continue; - if (index >= 16 || !detail::is_hex(str[i])) + if (index >= 16 || !Details::is_hex(str[i])) { return {}; } if (firstDigit) { - data[index] = static_cast(detail::hex2char(str[i]) << 4); + data[index] = static_cast(Details::hex2char(str[i]) << 4); firstDigit = false; } else { data[index] = - static_cast(data[index] | detail::hex2char(str[i])); + static_cast(data[index] | Details::hex2char(str[i])); index++; firstDigit = true; } @@ -620,7 +620,7 @@ namespace uuids [[nodiscard]] inline std::basic_string to_string( uuid const& id) { - std::basic_string uustr{detail::empty_guid}; + std::basic_string uustr{Details::empty_guid}; for (size_t i = 0, index = 0; i < 36; ++i) { @@ -628,8 +628,8 @@ namespace uuids { continue; } - uustr[i] = detail::guid_encoder[id.data[index] >> 4 & 0x0f]; - uustr[++i] = detail::guid_encoder[id.data[index] & 0x0f]; + uustr[i] = Details::guid_encoder[id.data[index] >> 4 & 0x0f]; + uustr[++i] = Details::guid_encoder[id.data[index] & 0x0f]; index++; } @@ -796,7 +796,7 @@ namespace uuids [[nodiscard]] uuid operator()(StringType const& name) { reset(); - process_characters(detail::to_string_view(name)); + process_characters(Details::to_string_view(name)); return make_uuid(); } @@ -827,7 +827,7 @@ namespace uuids [[nodiscard]] uuid make_uuid() { - detail::sha1::digest8_t digest; + Details::sha1::digest8_t digest; hasher.get_digest_bytes(digest); // variant must be 0b10xxxxxx @@ -843,7 +843,7 @@ namespace uuids private: uuid nsuuid; - detail::sha1 hasher; + Details::sha1 hasher; }; #ifdef UUID_TIME_GENERATOR diff --git a/dev/ToolchainKit/src/Assembler64x0.cc b/dev/ToolchainKit/src/Assembler64x0.cc index 4dafc09..fb6a183 100644 --- a/dev/ToolchainKit/src/Assembler64x0.cc +++ b/dev/ToolchainKit/src/Assembler64x0.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -72,7 +72,7 @@ static const std::string kRelocSymbol = ":RuntimeSymbol:"; // \brief forward decl. static bool asm_read_attributes(std::string& line); -namespace detail +namespace Details { void print_error_asm(std::string reason, std::string file) noexcept { @@ -103,7 +103,7 @@ namespace detail kStdOut << kYellow << "[ ToolchainKit ] " << kWhite << reason << kBlank << std::endl; } -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -201,7 +201,7 @@ TOOLCHAINKIT_MODULE(AssemblerMain64x0) { if (auto ln = asm64.CheckLine(line, argv[i]); !ln.empty()) { - detail::print_error_asm(ln, argv[i]); + Details::print_error_asm(ln, argv[i]); continue; } @@ -215,7 +215,7 @@ TOOLCHAINKIT_MODULE(AssemblerMain64x0) if (kVerbose) { std::string what = e.what(); - detail::print_warning_asm("exit because of: " + what, "ToolchainKit"); + Details::print_warning_asm("exit because of: " + what, "ToolchainKit"); } std::filesystem::remove(object_output); @@ -347,7 +347,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid extern_segment directive in flat binary mode.", + Details::print_error_asm("Invalid extern_segment directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_extern_segment_bin"); } @@ -357,7 +357,7 @@ static bool asm_read_attributes(std::string& line) /// sanity check to avoid stupid linker errors. if (name.size() == 0) { - detail::print_error_asm("Invalid extern_segment", "power-as"); + Details::print_error_asm("Invalid extern_segment", "power-as"); throw std::runtime_error("invalid_extern_segment"); } @@ -420,7 +420,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid public_segment directive in flat binary mode.", + Details::print_error_asm("Invalid public_segment directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_public_segment_bin"); } @@ -493,7 +493,7 @@ static bool asm_read_attributes(std::string& line) // \brief algorithms and helpers. -namespace detail::algorithm +namespace Details::Algorithms { // \brief authorize a brief set of characters. static inline bool is_not_alnum_space(char c) @@ -508,7 +508,7 @@ namespace detail::algorithm { return std::find_if(str.begin(), str.end(), is_not_alnum_space) == str.end(); } -} // namespace detail::algorithm +} // namespace Details::Algorithms ///////////////////////////////////////////////////////////////////////////////////////// @@ -536,7 +536,7 @@ std::string ToolchainKit::Encoder64x0::CheckLine(std::string& line, else { // now check the line for validity - if (!detail::algorithm::is_valid_64x0(line)) + if (!Details::Algorithms::is_valid_64x0(line)) { err_str = "Line contains non alphanumeric characters.\nhere -> "; err_str += line; @@ -546,7 +546,7 @@ std::string ToolchainKit::Encoder64x0::CheckLine(std::string& line, return err_str; } - if (!detail::algorithm::is_valid_64x0(line)) + if (!Details::Algorithms::is_valid_64x0(line)) { err_str = "Line contains non alphanumeric characters.\nhere -> "; err_str += line; @@ -664,7 +664,7 @@ bool ToolchainKit::Encoder64x0::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_hex_number"); } } @@ -691,7 +691,7 @@ bool ToolchainKit::Encoder64x0::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -718,7 +718,7 @@ bool ToolchainKit::Encoder64x0::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -786,7 +786,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, { // strict check here if (ToolchainKit::find_word(line, opcode64x0.fName) && - detail::algorithm::is_valid_64x0(line)) + Details::Algorithms::is_valid_64x0(line)) { std::string name(opcode64x0.fName); std::string jump_label, cpy_jump_label; @@ -830,7 +830,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, isdigit(line[line_index + 2])) { reg_str += line[line_index + 3]; - detail::print_error_asm( + Details::print_error_asm( "invalid register index, r" + reg_str + "\nnote: The 64x0 accepts registers from r0 to r20.", file); @@ -843,7 +843,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (reg_index > kAsmRegisterLimit) { - detail::print_error_asm("invalid register index, r" + reg_str, + Details::print_error_asm("invalid register index, r" + reg_str, file); throw std::runtime_error("invalid_register_index"); } @@ -866,7 +866,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, // remember! register to register! if (found_some == 1) { - detail::print_error_asm( + Details::print_error_asm( "Too few registers.\ntip: each Assembler64x0 register " "starts with 'r'.\nline: " + line, @@ -878,21 +878,21 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (found_some < 1 && name != "ldw" && name != "lda" && name != "stw") { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and registers.\nline: " + line, file); throw std::runtime_error("invalid_comb_op_reg"); } else if (found_some == 1 && name == "add") { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and registers.\nline: " + line, file); throw std::runtime_error("invalid_comb_op_reg"); } else if (found_some == 1 && name == "sub") { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and registers.\nline: " + line, file); throw std::runtime_error("invalid_comb_op_reg"); @@ -900,7 +900,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (found_some > 0 && name == "pop") { - detail::print_error_asm( + Details::print_error_asm( "invalid combination for opcode 'pop'.\ntip: it expects " "nothing.\nline: " + line, @@ -941,7 +941,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, { if (found_sym) { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and operands.\nhere -> " + jump_label, file); @@ -974,7 +974,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, // sta expects this: sta 0x000000, r0 if (name == "sta") { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and operands.\nHere ->" + line, file); throw std::runtime_error("invalid_comb_op_ops"); @@ -985,7 +985,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (name == "sta" && cpy_jump_label.find("extern_segment ") != std::string::npos) { - detail::print_error_asm("invalid usage extern_segment on 'sta', here: " + line, + Details::print_error_asm("invalid usage extern_segment on 'sta', here: " + line, file); throw std::runtime_error("invalid_sta_usage"); } @@ -1007,7 +1007,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (name == "sta") { - detail::print_error_asm("extern_segment is not allowed on a sta operation.", + Details::print_error_asm("extern_segment is not allowed on a sta operation.", file); throw std::runtime_error("extern_segment_sta_op"); } @@ -1067,7 +1067,7 @@ bool ToolchainKit::Encoder64x0::WriteLine(std::string& line, if (cpy_jump_label.size() < 1) { - detail::print_error_asm("label is empty, can't jump on it.", file); + Details::print_error_asm("label is empty, can't jump on it.", file); throw std::runtime_error("label_empty"); } diff --git a/dev/ToolchainKit/src/AssemblerAMD64.cc b/dev/ToolchainKit/src/AssemblerAMD64.cc index 8b4fc22..9775e39 100644 --- a/dev/ToolchainKit/src/AssemblerAMD64.cc +++ b/dev/ToolchainKit/src/AssemblerAMD64.cc @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -230,7 +230,7 @@ TOOLCHAINKIT_MODULE(AssemblerAMD64) { if (auto ln = asm64.CheckLine(line, argv[i]); !ln.empty()) { - detail::print_error_asm(ln, argv[i]); + Details::print_error_asm(ln, argv[i]); continue; } @@ -244,7 +244,7 @@ TOOLCHAINKIT_MODULE(AssemblerAMD64) if (kVerbose) { std::string what = e.what(); - detail::print_warning_asm("exit because of: " + what, "ToolchainKit"); + Details::print_warning_asm("exit because of: " + what, "ToolchainKit"); } try @@ -391,7 +391,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid directive in flat binary mode.", "ToolchainKit"); + Details::print_error_asm("Invalid directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_extern_segment_bin"); } @@ -399,7 +399,7 @@ static bool asm_read_attributes(std::string& line) if (name.size() == 0) { - detail::print_error_asm("Invalid extern_segment", "power-as"); + Details::print_error_asm("Invalid extern_segment", "power-as"); throw std::runtime_error("invalid_extern_segment"); } @@ -462,7 +462,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid directive in flat binary mode.", "ToolchainKit"); + Details::print_error_asm("Invalid directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_public_segment_bin"); } @@ -479,7 +479,7 @@ static bool asm_read_attributes(std::string& line) if (std::find(kDefinedSymbols.begin(), kDefinedSymbols.end(), name) != kDefinedSymbols.end()) { - detail::print_error_asm("Symbol already defined.", "ToolchainKit"); + Details::print_error_asm("Symbol already defined.", "ToolchainKit"); throw std::runtime_error("invalid_public_segment_bin"); } @@ -543,7 +543,7 @@ static bool asm_read_attributes(std::string& line) // \brief algorithms and helpers. -namespace detail::algorithm +namespace Details::Algorithms { // \brief authorize a brief set of characters. static inline bool is_not_valid(char c) @@ -561,7 +561,7 @@ namespace detail::algorithm { return std::find_if(str.begin(), str.end(), is_not_valid) == str.end(); } -} // namespace detail::algorithm +} // namespace Details::Algorithms ///////////////////////////////////////////////////////////////////////////////////////// @@ -586,7 +586,7 @@ std::string ToolchainKit::EncoderAMD64::CheckLine(std::string& line, else { // now check the line for validity - if (!detail::algorithm::is_valid_amd64(line)) + if (!Details::Algorithms::is_valid_amd64(line)) { err_str = "Line contains non valid characters.\nhere -> "; err_str += line; @@ -666,7 +666,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } @@ -696,7 +696,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -726,7 +726,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -919,7 +919,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber16(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } @@ -949,7 +949,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber16(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -979,7 +979,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber16(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -1051,7 +1051,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber8(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } @@ -1075,7 +1075,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber8(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -1099,7 +1099,7 @@ bool ToolchainKit::EncoderAMD64::WriteNumber8(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -1187,7 +1187,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, { // strict check here if (ToolchainKit::find_word(line, opcodeAMD64.fName) && - detail::algorithm::is_valid_amd64(line)) + Details::Algorithms::is_valid_amd64(line)) { foundInstruction = true; std::string name(opcodeAMD64.fName); @@ -1202,7 +1202,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (substr.find(",") == std::string::npos) { - detail::print_error_asm("Syntax error: missing right operand.", "ToolchainKit"); + Details::print_error_asm("Syntax error: missing right operand.", "ToolchainKit"); throw std::runtime_error("syntax_err"); } @@ -1231,7 +1231,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, { if (registerName[0] == 'r') { - detail::print_error_asm( + Details::print_error_asm( "invalid size for register, current bit width is: " + std::to_string(kRegisterBitWidth), file); @@ -1286,7 +1286,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, { if (hasRBasedRegs) { - detail::print_error_asm( + Details::print_error_asm( "Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1323,7 +1323,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[1].fName[0] == 'r' && currentRegList[0].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1331,7 +1331,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[0].fName[0] == 'r' && currentRegList[1].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1341,7 +1341,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[0].fName[0] == 'r' || currentRegList[0].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1349,7 +1349,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[1].fName[0] == 'r' || currentRegList[1].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1359,7 +1359,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[0].fName[0] != 'r' || currentRegList[0].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1367,7 +1367,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, if (currentRegList[1].fName[0] != 'r' || currentRegList[1].fName[0] == 'e') { - detail::print_error_asm("Invalid combination of operands and registers.", + Details::print_error_asm("Invalid combination of operands and registers.", "ToolchainKit"); throw std::runtime_error("comb_op_reg"); } @@ -1413,7 +1413,7 @@ bool ToolchainKit::EncoderAMD64::WriteLine(std::string& line, { if (foundInstruction) { - detail::print_error_asm("Syntax error: " + line, "ToolchainKit"); + Details::print_error_asm("Syntax error: " + line, "ToolchainKit"); throw std::runtime_error("syntax_err"); } diff --git a/dev/ToolchainKit/src/AssemblerPower.cc b/dev/ToolchainKit/src/AssemblerPower.cc index 63f01cd..cb322d1 100644 --- a/dev/ToolchainKit/src/AssemblerPower.cc +++ b/dev/ToolchainKit/src/AssemblerPower.cc @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -171,7 +171,7 @@ TOOLCHAINKIT_MODULE(AssemblerMainPower64) { if (auto ln = asm64.CheckLine(line, argv[i]); !ln.empty()) { - detail::print_error_asm(ln, argv[i]); + Details::print_error_asm(ln, argv[i]); continue; } @@ -185,7 +185,7 @@ TOOLCHAINKIT_MODULE(AssemblerMainPower64) if (kVerbose) { std::string what = e.what(); - detail::print_warning_asm("exit because of: " + what, "ToolchainKit"); + Details::print_warning_asm("exit because of: " + what, "ToolchainKit"); } std::filesystem::remove(object_output); @@ -317,7 +317,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid extern_segment directive in flat binary mode.", + Details::print_error_asm("Invalid extern_segment directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_extern_segment_bin"); } @@ -326,7 +326,7 @@ static bool asm_read_attributes(std::string& line) if (name.size() == 0) { - detail::print_error_asm("Invalid extern_segment", "ToolchainKit"); + Details::print_error_asm("Invalid extern_segment", "ToolchainKit"); throw std::runtime_error("invalid_extern_segment"); } @@ -389,7 +389,7 @@ static bool asm_read_attributes(std::string& line) { if (kOutputAsBinary) { - detail::print_error_asm("Invalid public_segment directive in flat binary mode.", + Details::print_error_asm("Invalid public_segment directive in flat binary mode.", "ToolchainKit"); throw std::runtime_error("invalid_public_segment_bin"); } @@ -462,7 +462,7 @@ static bool asm_read_attributes(std::string& line) // \brief algorithms and helpers. -namespace detail::algorithm +namespace Details::Algorithms { // \brief authorize a brief set of characters. static inline bool is_not_alnum_space(char c) @@ -477,7 +477,7 @@ namespace detail::algorithm { return std::find_if(str.begin(), str.end(), is_not_alnum_space) == str.end(); } -} // namespace detail::algorithm +} // namespace Details::Algorithms ///////////////////////////////////////////////////////////////////////////////////////// @@ -505,7 +505,7 @@ std::string ToolchainKit::EncoderPowerPC::CheckLine(std::string& line, else { /// does the line contains valid input? - if (!detail::algorithm::is_valid_power64(line)) + if (!Details::Algorithms::is_valid_power64(line)) { err_str = "Line contains non alphanumeric characters.\nhere -> "; err_str += line; @@ -515,7 +515,7 @@ std::string ToolchainKit::EncoderPowerPC::CheckLine(std::string& line, return err_str; } - if (!detail::algorithm::is_valid_power64(line)) + if (!Details::Algorithms::is_valid_power64(line)) { err_str = "Line contains non alphanumeric characters.\nhere -> "; err_str += line; @@ -630,7 +630,7 @@ bool ToolchainKit::EncoderPowerPC::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } @@ -657,7 +657,7 @@ bool ToolchainKit::EncoderPowerPC::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid binary number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -684,7 +684,7 @@ bool ToolchainKit::EncoderPowerPC::WriteNumber(const std::size_t& pos, { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + jump_label, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -747,7 +747,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, { if (ToolchainKit::find_word(line, "public_segment")) return true; - if (!detail::algorithm::is_valid_power64(line)) + if (!Details::Algorithms::is_valid_power64(line)) return true; for (auto& opcodePPC : kOpcodesPowerPC) @@ -820,7 +820,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, isdigit(line[line_index + 2])) { reg_str += line[line_index + 3]; - detail::print_error_asm( + Details::print_error_asm( "invalid register index, r" + reg_str + "\nnote: The POWER accepts registers from r0 to r32.", file); @@ -832,7 +832,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, if (reg_index > kAsmRegisterLimit) { - detail::print_error_asm("invalid register index, r" + reg_str, + Details::print_error_asm("invalid register index, r" + reg_str, file); throw std::runtime_error("invalid_register_index"); } @@ -858,7 +858,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, { if (num.number[i] > 0) { - detail::print_warning_asm("number overflow on li operation.", + Details::print_warning_asm("number overflow on li operation.", file); break; } @@ -948,7 +948,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, if (found_some_count > 3) { - detail::print_error_asm("Too much registers. -> " + line, file); + Details::print_error_asm("Too much registers. -> " + line, file); throw std::runtime_error("too_much_regs"); } } @@ -959,7 +959,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, if (found_some_count > 3) { - detail::print_error_asm("Too much registers. -> " + line, file); + Details::print_error_asm("Too much registers. -> " + line, file); throw std::runtime_error("too_much_regs"); } } @@ -980,7 +980,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, if (found_some_count > 1) { - detail::print_error_asm("Too much registers. -> " + line, file); + Details::print_error_asm("Too much registers. -> " + line, file); throw std::runtime_error("too_much_regs"); } @@ -1052,7 +1052,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, { if (register_count == 1) { - detail::print_error_asm("Too few registers. -> " + line, file); + Details::print_error_asm("Too few registers. -> " + line, file); throw std::runtime_error("too_few_registers"); } } @@ -1063,7 +1063,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, // remember! register to register! if (found_some_count == 1) { - detail::print_error_asm( + Details::print_error_asm( "Unrecognized register found.\ntip: each AssemblerPower register " "starts with 'r'.\nline: " + line, @@ -1075,7 +1075,7 @@ bool ToolchainKit::EncoderPowerPC::WriteLine(std::string& line, if (found_some_count < 1 && name[0] != 'l' && name[0] != 's') { - detail::print_error_asm( + Details::print_error_asm( "invalid combination of opcode and registers.\nline: " + line, file); throw std::runtime_error("invalid_comb_op_reg"); diff --git a/dev/ToolchainKit/src/CCompiler64x0.cc b/dev/ToolchainKit/src/CCompiler64x0.cc index bc0e91e..4222df9 100644 --- a/dev/ToolchainKit/src/CCompiler64x0.cc +++ b/dev/ToolchainKit/src/CCompiler64x0.cc @@ -51,7 +51,7 @@ ///////////////////////////////////// -namespace detail +namespace Details { // \brief Register map structure, used to keep track of each variable's registers. struct CompilerRegisterMap final @@ -88,14 +88,14 @@ namespace detail std::string fLastError; bool fVerbose; }; -} // namespace detail +} // namespace Details -static detail::CompilerState kState; +static Details::CompilerState kState; static SizeType kErrorLimit = 100; static std::string kIfFunction = ""; static Int32 kAcceptableErrors = 0; -namespace detail +namespace Details { /// @brief prints an error into stdout. /// @param reason the reason of the error. @@ -107,7 +107,7 @@ namespace detail std::string fName; std::string fValue; }; -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -160,11 +160,11 @@ public: }; static CompilerFrontend64x0* kCompilerFrontend = nullptr; -static std::vector kCompilerVariables; +static std::vector kCompilerVariables; static std::vector kCompilerFunctions; -static std::vector kCompilerTypes; +static std::vector kCompilerTypes; -namespace detail +namespace Details { union number_cast final { public: @@ -192,7 +192,7 @@ namespace detail float _Raw; }; -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -224,7 +224,7 @@ bool CompilerFrontend64x0::Compile(const std::string text, const std::string fil auto gen = uuids::uuid_random_generator{generator}; uuids::uuid out = gen(); - detail::number_cast time_off = (UInt64)out.as_bytes().data(); + Details::number_cast time_off = (UInt64)out.as_bytes().data(); if (!typeFound) { @@ -403,7 +403,7 @@ bool CompilerFrontend64x0::Compile(const std::string text, const std::string fil if (textBuffer[text_index] == '=' && kInStruct) { - detail::print_error_asm("assignement of value in struct " + textBuffer, + Details::print_error_asm("assignement of value in struct " + textBuffer, file); continue; } @@ -566,7 +566,7 @@ bool CompilerFrontend64x0::Compile(const std::string text, const std::string fil auto var_to_find = std::find_if(kCompilerVariables.cbegin(), kCompilerVariables.cend(), - [&](detail::CompilerType type) { + [&](Details::CompilerType type) { return type.fName.find(substr) != std::string::npos; }); @@ -1361,7 +1361,7 @@ public: } else { - detail::print_error_asm(err, src.data()); + Details::print_error_asm(err, src.data()); } } @@ -1568,7 +1568,7 @@ TOOLCHAINKIT_MODULE(NewOSCompilerCLang64x0) std::string err = "Unknown command: "; err += argv[index]; - detail::print_error_asm(err, "cc"); + Details::print_error_asm(err, "cc"); continue; } @@ -1581,7 +1581,7 @@ TOOLCHAINKIT_MODULE(NewOSCompilerCLang64x0) { if (kState.fVerbose) { - detail::print_error_asm(srcFile + " is not a valid C source.\n", "cc"); + Details::print_error_asm(srcFile + " is not a valid C source.\n", "cc"); } return 1; diff --git a/dev/ToolchainKit/src/CCompilerPower64.cc b/dev/ToolchainKit/src/CCompilerPower64.cc index cf9a46a..3e5e0d6 100644 --- a/dev/ToolchainKit/src/CCompilerPower64.cc +++ b/dev/ToolchainKit/src/CCompilerPower64.cc @@ -42,7 +42,7 @@ ///////////////////////////////////// -namespace detail +namespace Details { // \brief name to register struct. struct CompilerRegisterMap final @@ -79,14 +79,14 @@ namespace detail std::string fLastError; bool fVerbose; }; -} // namespace detail +} // namespace Details -static detail::CompilerState kState; +static Details::CompilerState kState; static SizeType kErrorLimit = 100; static std::string kIfFunction = ""; static Int32 kAcceptableErrors = 0; -namespace detail +namespace Details { /// @brief prints an error into stdout. /// @param reason the reason of the error. @@ -98,7 +98,7 @@ namespace detail std::string fName; std::string fValue; }; -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -151,11 +151,11 @@ public: }; static CompilerFrontendPower64* kCompilerFrontend = nullptr; -static std::vector kCompilerVariables; +static std::vector kCompilerVariables; static std::vector kCompilerFunctions; -static std::vector kCompilerTypes; +static std::vector kCompilerTypes; -namespace detail +namespace Details { union number_cast final { public: @@ -183,7 +183,7 @@ namespace detail float _Raw; }; -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -215,7 +215,7 @@ bool CompilerFrontendPower64::Compile(const std::string text, const std::string auto gen = uuids::uuid_random_generator{generator}; uuids::uuid out = gen(); - detail::number_cast time_off = (UInt64)out.as_bytes().data(); + Details::number_cast time_off = (UInt64)out.as_bytes().data(); if (!typeFound) { @@ -414,7 +414,7 @@ bool CompilerFrontendPower64::Compile(const std::string text, const std::string if (textBuffer[text_index] == '=' && kInStruct) { - detail::print_error_asm( + Details::print_error_asm( "assignement of value inside a struct " + textBuffer, file); continue; } @@ -577,7 +577,7 @@ bool CompilerFrontendPower64::Compile(const std::string text, const std::string auto var_to_find = std::find_if(kCompilerVariables.cbegin(), kCompilerVariables.cend(), - [&](detail::CompilerType type) { + [&](Details::CompilerType type) { return type.fName.find(substr) != std::string::npos; }); @@ -1384,7 +1384,7 @@ public: } else { - detail::print_error_asm(err, src.data()); + Details::print_error_asm(err, src.data()); } } @@ -1588,7 +1588,7 @@ TOOLCHAINKIT_MODULE(NewOSCompilerCLangPowerPC) std::string err = "Unknown command: "; err += argv[index]; - detail::print_error_asm(err, "cc"); + Details::print_error_asm(err, "cc"); continue; } @@ -1601,7 +1601,7 @@ TOOLCHAINKIT_MODULE(NewOSCompilerCLangPowerPC) { if (kState.fVerbose) { - detail::print_error_asm(srcFile + " is not a valid C source.\n", "cc"); + Details::print_error_asm(srcFile + " is not a valid C source.\n", "cc"); } return 1; diff --git a/dev/ToolchainKit/src/CPlusPlusCompilerAMD64.cc b/dev/ToolchainKit/src/CPlusPlusCompilerAMD64.cc index 5568e3a..45399ce 100644 --- a/dev/ToolchainKit/src/CPlusPlusCompilerAMD64.cc +++ b/dev/ToolchainKit/src/CPlusPlusCompilerAMD64.cc @@ -51,7 +51,7 @@ ///////////////////////////////////// /// @internal -namespace detail +namespace Details { std::filesystem::path expand_home(const std::filesystem::path& p) { @@ -103,14 +103,14 @@ namespace detail std::string fLastError; bool fVerbose; }; -} // namespace detail +} // namespace Details -static detail::CompilerState kState; +static Details::CompilerState kState; static SizeType kErrorLimit = 100; static Int32 kAcceptableErrors = 0; -namespace detail +namespace Details { /// @brief prints an error into stdout. /// @param reason the reason of the error. @@ -122,7 +122,7 @@ namespace detail std::string fName; std::string fValue; }; -} // namespace detail +} // namespace Details ///////////////////////////////////////////////////////////////////////////////////////// @@ -277,7 +277,7 @@ bool CompilerFrontendCPlusPlus::Compile(const std::string text, { if (isalnum(text[i])) { - detail::print_error_asm("syntax error: " + text, file); + Details::print_error_asm("syntax error: " + text, file); return false; } } @@ -580,7 +580,7 @@ bool CompilerFrontendCPlusPlus::Compile(const std::string text, goto done; } - detail::print_error_asm("Variable not declared: " + varName, file); + Details::print_error_asm("Variable not declared: " + varName, file); return false; } @@ -696,7 +696,7 @@ bool CompilerFrontendCPlusPlus::Compile(const std::string text, if (syntax_tree.fUserValue.empty()) { - detail::print_error_asm("Variable not declared: " + varErrCpy, file); + Details::print_error_asm("Variable not declared: " + varErrCpy, file); } break; @@ -727,7 +727,7 @@ bool CompilerFrontendCPlusPlus::Compile(const std::string text, if (syntax_tree.fUserValue.empty()) { - detail::print_error_asm("Variable not declared: " + subText, file); + Details::print_error_asm("Variable not declared: " + subText, file); } } else @@ -824,7 +824,7 @@ public: std::filesystem::path path = std::filesystem::path("./"); - while (path != detail::expand_home(std::filesystem::path("~"))) + while (path != Details::expand_home(std::filesystem::path("~"))) { for (auto const& dir_entry : std::filesystem::recursive_directory_iterator{path}) { @@ -1015,7 +1015,7 @@ TOOLCHAINKIT_MODULE(CompilerCPlusPlusX8664) std::string err = "Unknown option: "; err += argv[index]; - detail::print_error_asm(err, "c++-drv"); + Details::print_error_asm(err, "c++-drv"); continue; } @@ -1040,7 +1040,7 @@ TOOLCHAINKIT_MODULE(CompilerCPlusPlusX8664) { if (kState.fVerbose) { - detail::print_error_asm(argv_i + " is not a valid C++ source.\n", "c++-drv"); + Details::print_error_asm(argv_i + " is not a valid C++ source.\n", "c++-drv"); } return 1; diff --git a/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc b/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc index fbcfa53..11db04f 100644 --- a/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc +++ b/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -32,7 +32,7 @@ typedef Int32 (*bpp_parser_fn_t)(std::string& line, std::ifstream& hdr_file, std ///////////////////////////////////////////////////////////////////////////////////////// -namespace detail +namespace Details { enum { @@ -79,10 +79,10 @@ namespace detail std::string fMacroName; bpp_parser_fn_t fParse; }; -} // namespace detail +} // namespace Details static std::vector kFiles; -static std::vector kMacros; +static std::vector kMacros; static std::vector kIncludes; static std::string kWorkingDir; @@ -100,13 +100,13 @@ static std::vector kKeywords = { ///////////////////////////////////////////////////////////////////////////////////////// -int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, - detail::bpp_macro& macro, +int32_t bpp_parse_if_condition(Details::bpp_macro_condition& cond, + Details::bpp_macro& macro, bool& inactive_code, bool& defined, std::string& macro_str) { - if (cond.fType == detail::kEqual) + if (cond.fType == Details::kEqual) { auto substr_macro = macro_str.substr(macro_str.find(macro.fName) + macro.fName.size()); @@ -127,7 +127,7 @@ int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, return 1; } } - else if (cond.fType == detail::kNotEqual) + else if (cond.fType == Details::kNotEqual) { auto substr_macro = macro_str.substr(macro_str.find(macro.fName) + macro.fName.size()); @@ -223,7 +223,7 @@ int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, lhs = atol(number.c_str()); } - if (cond.fType == detail::kGreaterThan) + if (cond.fType == Details::kGreaterThan) { if (lhs < rhs) { @@ -236,7 +236,7 @@ int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, return 0; } - if (cond.fType == detail::kGreaterEqThan) + if (cond.fType == Details::kGreaterEqThan) { if (lhs <= rhs) { @@ -249,7 +249,7 @@ int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, return 0; } - if (cond.fType == detail::kLesserEqThan) + if (cond.fType == Details::kLesserEqThan) { if (lhs >= rhs) { @@ -262,7 +262,7 @@ int32_t bpp_parse_if_condition(detail::bpp_macro_condition& cond, return 0; } - if (cond.fType == detail::kLesserThan) + if (cond.fType == Details::kLesserThan) { if (lhs > rhs) { @@ -516,7 +516,7 @@ void bpp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) } } - detail::bpp_macro macro; + Details::bpp_macro macro; macro.fArgs = args; macro.fName = macro_key; @@ -663,29 +663,29 @@ void bpp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) { inactive_code = true; - std::vector bpp_macro_condition_list = { + std::vector bpp_macro_condition_list = { { - .fType = detail::kEqual, + .fType = Details::kEqual, .fTypeName = "==", }, { - .fType = detail::kNotEqual, + .fType = Details::kNotEqual, .fTypeName = "!=", }, { - .fType = detail::kLesserThan, + .fType = Details::kLesserThan, .fTypeName = "<", }, { - .fType = detail::kGreaterThan, + .fType = Details::kGreaterThan, .fTypeName = ">", }, { - .fType = detail::kLesserEqThan, + .fType = Details::kLesserEqThan, .fTypeName = "<=", }, { - .fType = detail::kGreaterEqThan, + .fType = Details::kGreaterEqThan, .fTypeName = ">=", }, }; @@ -915,28 +915,28 @@ TOOLCHAINKIT_MODULE(CPlusPlusPreprocessorMain) bool skip = false; bool double_skip = false; - detail::bpp_macro macro_1; + Details::bpp_macro macro_1; macro_1.fName = "__true"; macro_1.fValue = "1"; kMacros.push_back(macro_1); - detail::bpp_macro macro_0; + Details::bpp_macro macro_0; macro_0.fName = "__false"; macro_0.fValue = "0"; kMacros.push_back(macro_0); - detail::bpp_macro macro_zka; + Details::bpp_macro macro_zka; macro_zka.fName = "__TOOLCHAINKIT__"; macro_zka.fValue = "1"; kMacros.push_back(macro_zka); - detail::bpp_macro macro_size_t; + Details::bpp_macro macro_size_t; macro_size_t.fName = "__SIZE_TYPE__"; macro_size_t.fValue = "unsigned long long int"; @@ -1028,7 +1028,7 @@ TOOLCHAINKIT_MODULE(CPlusPlusPreprocessorMain) if (is_string) macro_value += "\""; - detail::bpp_macro macro; + Details::bpp_macro macro; macro.fName = macro_key; macro.fValue = macro_value; diff --git a/dev/ToolchainKit/src/Detail/AsmUtils.h b/dev/ToolchainKit/src/Detail/AsmUtils.h index dcd7834..30c22bc 100644 --- a/dev/ToolchainKit/src/Detail/AsmUtils.h +++ b/dev/ToolchainKit/src/Detail/AsmUtils.h @@ -11,11 +11,11 @@ using namespace ToolchainKit; -namespace detail +namespace Details { extern void print_error_asm(std::string reason, std::string file) noexcept; extern void print_warning_asm(std::string reason, std::string file) noexcept; -} // namespace detail +} // namespace Details /// @brief Get Number from lineBuffer. /// @param lineBuffer the lineBuffer to fetch from. @@ -37,7 +37,7 @@ static NumberCast32 GetNumber32(std::string lineBuffer, std::string numberKey) { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + lineBuffer, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + lineBuffer, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } @@ -57,7 +57,7 @@ static NumberCast32 GetNumber32(std::string lineBuffer, std::string numberKey) { if (errno != 0) { - detail::print_error_asm("invalid binary number:" + lineBuffer, "ToolchainKit"); + Details::print_error_asm("invalid binary number:" + lineBuffer, "ToolchainKit"); throw std::runtime_error("invalid_bin"); } } @@ -77,7 +77,7 @@ static NumberCast32 GetNumber32(std::string lineBuffer, std::string numberKey) { if (errno != 0) { - detail::print_error_asm("invalid octal number: " + lineBuffer, "ToolchainKit"); + Details::print_error_asm("invalid octal number: " + lineBuffer, "ToolchainKit"); throw std::runtime_error("invalid_octal"); } } @@ -97,7 +97,7 @@ static NumberCast32 GetNumber32(std::string lineBuffer, std::string numberKey) { if (errno != 0) { - detail::print_error_asm("invalid hex number: " + lineBuffer, "ToolchainKit"); + Details::print_error_asm("invalid hex number: " + lineBuffer, "ToolchainKit"); throw std::runtime_error("invalid_hex"); } } diff --git a/dev/ToolchainKit/src/DynamicLinker64PEF.cc b/dev/ToolchainKit/src/DynamicLinker64PEF.cc index d127376..94a047a 100644 --- a/dev/ToolchainKit/src/DynamicLinker64PEF.cc +++ b/dev/ToolchainKit/src/DynamicLinker64PEF.cc @@ -13,7 +13,7 @@ /// @note Do not look up for anything with .code64/.data64/.zero64! /// It will be loaded when the program loader will start the image. -//! Toplchain Kit. +//! Toolchain Kit. #include #include @@ -28,7 +28,7 @@ //! Release macros. #include -//! Amlal ELMahrouss Object Format +//! Advanced Executable Object Format. #include #include @@ -50,7 +50,7 @@ /// @brief PEF stack size symbol. #define kLinkerStackSizeSymbol "SizeOfReserveStack" -namespace detail +namespace Details { struct DynamicLinkerBlob final { @@ -81,7 +81,7 @@ static const char* kLdDynamicSym = ":RuntimeSymbol:"; /* object code and list. */ static std::vector kObjectList; -static std::vector kObjectBytes; +static std::vector kObjectBytes; static uintptr_t kMIBCount = 8; static uintptr_t kByteCount = 1024; -- cgit v1.2.3