- 13 Nov, 2024 2 commits
-
-
PiperOrigin-RevId: 696219306 Change-Id: I513f7da5370539663ecce5c1b374c6802587cdfe
Abseil Team committed -
The proto encoding for structured logging currently pessimistically assumes each numeric tag value for encoded fields could be up to `UINT64_MAX`. In practice, the tag values we care about are all < 16, which only requires 1 byte of buffer space. This CL improves the memory consumption by specifying the tag value when calculating the buffer size needed for the structured logging proto. PiperOrigin-RevId: 696118135 Change-Id: Iee67deef568cb4df7646d3ddd40c14b490ca0e45
Abseil Team committed
-
- 11 Nov, 2024 2 commits
-
-
This macro is internal to libc++ and was removed by https://github.com/llvm/llvm-project/commit/c6f3b7bcd0596d30f8dabecdfb9e44f9a07b6e4c Abseil clients lacking this support should send a PR to add a supported platform specific condition to the preprocessor to disable it. https://github.com/llvm/llvm-project/pull/89178#issuecomment-2075009955 suggests the feature test macros like __cpp_lib_filesystem now work. PiperOrigin-RevId: 695454966 Change-Id: I9d4f710f422b9a2351d2780c219e8804f4162c07
Derek Mauro committed -
_The implementation has not changed, only constexpr markers have been added._ PiperOrigin-RevId: 695435063 Change-Id: I66cd03195e429534c0e58c330f1019c89025abed
Abseil Team committed
-
- 08 Nov, 2024 4 commits
-
-
There is no documentation that says zero isn't okay, and the closed interval [0, k] described by the documentation is perfectly well-defined even when k is zero. As far as I can tell, there is no reason *not* to support zero: a random variable that always returns the same value is still a random variable. absl::Uniform will happily generate on the interval [0, 1) for the same reason. PiperOrigin-RevId: 694649518 Change-Id: Ib940406f762a30e27c19c846c45bd908ae8411c3
Aaron Jacobs committed -
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1786 Merge d81cf2128c9ad4ee03c3162c1326403e977d0af1 into dee1b6c2 Merging this change closes #1786 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1786 from c8ef:master d81cf2128c9ad4ee03c3162c1326403e977d0af1 PiperOrigin-RevId: 694627073 Change-Id: I7ba1dcc5aacdc1c8209628cff0a4e29a62cde7e6
c8ef committed -
In order to avoid unrelated diffs in future changes that touch this code. PiperOrigin-RevId: 694625990 Change-Id: I51ac54438a977f38c54c7638701d9ff3a259a58b
Aaron Jacobs committed -
PiperOrigin-RevId: 694512830 Change-Id: Ibeb8eb5fd18af5c49fe45a903e5cb129ee15974d
Andy Getzendanner committed
-
- 07 Nov, 2024 1 commit
-
-
PiperOrigin-RevId: 694144866 Change-Id: I631221fa0fc64821cf328f9a6d65839a39839276
Derek Mauro committed
-
- 06 Nov, 2024 3 commits
-
-
See some relevant context on this project in https://github.com/abseil/abseil-cpp/commit/254b3a5326932026fd23923fd367619d2837f0ad. This type existed to support the incremental migration of added validation to MockingBitGen, validating that the returned value from absl::Uniform() is in bounds. All known cases where an out-of-bounds value was returned have been fixed and migrated to use MockingBitGen. PiperOrigin-RevId: 693836317 Change-Id: I04f54b7b4856f4280580b294194ce2c25a18e9b1
Justin Bassett committed -
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1783 Today we cannot build V8 (which uses the Abseil library) in strict mode for RISC-V due to a few warnings in debbugging inlines. All the warnings are about implicit signed to unsigned conversion and precision losses, nothing serious, but they are still very annoying. Merge 7b2a865021ca18e3666c544000b6b1258964f6c4 into 8596c6e7 Merging this change closes #1783 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1783 from apavlyutkin:riscv-fix-warnings 7b2a865021ca18e3666c544000b6b1258964f6c4 PiperOrigin-RevId: 693802454 Change-Id: Ibfefc9370606a6b8ec217ac6d87d7c6d70d1a3ce
Alexey Pavlyutkin committed -
This is similar to the conversion operator to std::pair, but for N elements instead of two. Missing elements are filled with the empty string and extra elements are discarded. PiperOrigin-RevId: 693727220 Change-Id: Icfee16613a4859b019ca043da712f20797386beb
Jake Cobb committed
-
- 05 Nov, 2024 1 commit
-
-
Add a comment explaining the extra comparison in raw_hash_set::operator==. Also add a small optimization to avoid the extra comparison in sets that use hash_default_eq as the key_equal functor. Note that removing the comparison entirely causes the Table.Equality2 test case to fail. PiperOrigin-RevId: 693447075 Change-Id: I769f75cf1cb27114455f1854e330c899cee55fc2
Evan Brown committed
-
- 04 Nov, 2024 2 commits
-
-
PiperOrigin-RevId: 692960029 Change-Id: I98252f2de95a237622ccf16f200bbb16dc441d88
Derek Mauro committed -
This install is conflicting with the manual one done after. It causes spurious recompilations for users as the original file is copied and then overwritten with each install. Fixes #1769 PiperOrigin-RevId: 692919849 Change-Id: I2fb9c68f6e547212425d5b5ae7205bbf19b46bf4
Florent Castelli committed
-
- 01 Nov, 2024 1 commit
-
-
This enables clang to catch more use-after-free bugs. PiperOrigin-RevId: 692275317 Change-Id: I86c414a90d24d239ed67b3316fe74e1c24f95ed9
Abseil Team committed
-
- 30 Oct, 2024 1 commit
-
-
PiperOrigin-RevId: 691547968 Change-Id: I41055f6840e7d08a5ba239f17e73632abc8f028d
Chris Kennelly committed
-
- 28 Oct, 2024 1 commit
-
-
`c_find_first_of` does not keep or return references into `options` so there's no reason to require an l-value there. PiperOrigin-RevId: 690696332 Change-Id: Ibbabb69ba72e9506c0406f2124034a944d6899d6
Abseil Team committed
-
- 23 Oct, 2024 5 commits
-
-
PiperOrigin-RevId: 689081310 Change-Id: I394b8eb6f87f3ea8e2ebce511baeef132b28d452
Abseil Team committed -
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1775 Win32 `dbhelp.h` defines `SYMBOL_INFO` structure under `WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)` guard. Any other partition will have these symbols undefined. Follow same logic in `symbolize.cc` to prevent compilation failure on non-Desktop platforms. Merge 0081212d7d6f40158157d616592633301437acb4 into 87831365 Merging this change closes #1775 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1775 from redbaron:patch-1 0081212d7d6f40158157d616592633301437acb4 PiperOrigin-RevId: 689022871 Change-Id: If68795b432b3d09b999aa52cb629c5ad2b6eb75c
Maxim Ivanov committed -
either the string ABSL_NAMESPACE_BEGIN or SKIP_ABSL_INLINE_NAMESPACE_CHECK A lot of files are currently missing one or the other. These will be updated when the files change (triggering the presubmit on the file) or though a followup mass update. PiperOrigin-RevId: 688985640 Change-Id: If2d3f3fcd6b41a7452198ba9de13c8633d6051c6
Derek Mauro committed -
PiperOrigin-RevId: 688971140 Change-Id: I11283c77c3df8fc9b964bfb58a46211b8783cdb4
Abseil Team committed -
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1777 This patch replaces all instances of std::ldexp(msb, 64) with msb * (2**64) as it turns out that this optimization is not done by MSVC. Worse, it emited a function call with error checking, even if the int128 cannot hit the inf limitation. Sadly even the constant `std::ldexp(1.0, 64)` is not inlined: https://gcc.godbolt.org/z/oGhGz77sx Merge a21b1c952494944e51e12c62127a71480bc28695 into 87831365 Merging this change closes #1777 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1777 from degasus:int128_t a21b1c952494944e51e12c62127a71480bc28695 PiperOrigin-RevId: 688968524 Change-Id: Id88cf38e241553f88bf4d97e7b001247dcd5599b
Markus Wick committed
-
- 22 Oct, 2024 1 commit
-
-
This allows containers that either optimize based on these concepts or produce lifetime warnings based on them to handle absl::Span appropriately. An example is Chromium's base::span, which warns more aggressively about construction from rvalues that are not borrowed ranges. This only has an effect for codebases using C++20. While many such codebases will presumably also be using std::span directly, they may use absl::Span for backwards compat, or compile against libraries that do so. Also fixes lint's that fired when I tried to edit this. PiperOrigin-RevId: 688552975 Change-Id: I603e04cd74d60ac6b65754ac73037d7f0ab457fe
Abseil Team committed
-
- 17 Oct, 2024 1 commit
-
-
PiperOrigin-RevId: 686814718 Change-Id: Ia712f4cd24ebf3d02fd0b03cd6973bb53e128682
Abseil Team committed
-
- 15 Oct, 2024 1 commit
-
-
PiperOrigin-RevId: 686110246 Change-Id: I78be07f1c6795d282c3739c54764b1562fd2523c
Gennadiy Rozental committed
-
- 14 Oct, 2024 1 commit
-
-
This fix increases the hash quality of these types. Also, make sure that absl::(u)int128 have the same hash expansion as their intrinsic counterparts. PiperOrigin-RevId: 685706878 Change-Id: Ib8e2e2b7a8ce24cf08f1e8d18094188a6eedbb3a
Samuel Benzaquen committed
-
- 11 Oct, 2024 1 commit
-
-
PiperOrigin-RevId: 684941948 Change-Id: I78a7ae6f4ec8f29e5bed414016eadf2ec95167a4
Abseil Team committed
-
- 10 Oct, 2024 2 commits
-
-
PiperOrigin-RevId: 684499936 Change-Id: Id5901d9d526abdf269f097a293bab6d08850d432
Evan Brown committed -
This is a followup to the [previous change](https://github.com/abseil/abseil-cpp/commit/69195d5bd2416a7224416887c78353ee8edf67ee) that added the `ABSL_NULLABILITY_COMPATIBLE` attribute macro. Adding these attributes has the following benefits: - Clang itself can now diagnose certain nullability errors through the `-Wnonnull` and `-Wnullability` warnings. - The nullability annotations can now also be used on pointers to incomplete types, as we have removed the `IsSupportedType` mechanism that used the `absl_nullability_compatible` tag to check whether a type is nullability-compatible (which only worked for complete types) and instead let Clang perform this check through the `ABSL_NULLABILITY_COMPATIBLE` attribute (which also works on incomplete types). PiperOrigin-RevId: 684342145 Change-Id: I94c8affd5be704cb49340058ced177f09ebd83a3
Martin Brænne committed
-
- 08 Oct, 2024 1 commit
-
-
PiperOrigin-RevId: 683715628 Change-Id: If73080e74c69523a458b2992c1f3740879ff097d
Evan Brown committed
-
- 02 Oct, 2024 2 commits
-
-
Also fix the old definition by verifying that the condition is contextually convertible to bool. The new C++20 definition reduces codegen bloat and guarantees fast performance while still retaining the expression (so that unused-variable warnings don't trigger). As an example where this makes a difference, compare the following snippet under `-DABSL_INTERNAL_CPLUSPLUS_LANG=202002`: https://godbolt.org/z/hjf59n84v ``` #include <stdlib.h> template<class T> struct S { S() { abort(); } static S const s; }; template<class T> S<T> const S<T>::s = {}; #if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L #define ABSL_ASSERT(expr) (decltype((expr) ? void() : void())()) #else #define ABSL_ASSERT(expr) (false ? ((expr) ? void() : void()) : void()) #endif void foo() { ABSL_ASSERT(((void)&S<int>::s, true)); } ``` We see that, in unoptimized builds, code is still generated with the old definition of `ABSL_ASSERT`. Moreover, even under optimizations (with `-O2`), the call to abort() still lingers with the old definition of `ABSL_ASSERT`. Therefore the extra generated code can affect both compile- and run-time performance. PiperOrigin-RevId: 681563573 Change-Id: I7fbfadcc7fd198e8e1daf14615c33687f6b23af7
Abseil Team committed -
When Abseil hardening is enabled, this assertion's condition gets evaluated every time an iterator equality check is performed on iterators from a raw_hash_set. This occurs very frequently when looping over the contents of sets, due to loop conditions like `it != end()`, and causes about 0.4% CPU overhead to some Google workloads. PiperOrigin-RevId: 681560141 Change-Id: Ia0177cbef7cf67f9f0b6adf2cf55d9a2ed320d2d
Abseil Team committed
-
- 27 Sep, 2024 1 commit
-
-
sure MaskedPointer is trivially copyable and copy constructible. Fixes #1758 PiperOrigin-RevId: 679618900 Change-Id: Ia0ebacd8bb43b3fe3b9cd654259bef9072cec46c
Derek Mauro committed
-
- 26 Sep, 2024 1 commit
-
-
Saving one "&" operation in the Mutex::Unlock fast path. This has likely no performance impact (the two AND instructions ran in parallel anyway), but is as complex as the current solution, and enables two possible improvements in the future. 1. If bits Ev, Wr, Wa, De are made into the highest bits in the kMuLow, then the second "&" operation can be omitted because if kMuWriter is set, the there are no readers, so the kMuHigh bits are zero. 2. If the meanings of kMuWriter and kMuDesig are flipped, then the "^" operation is not needed either. PiperOrigin-RevId: 679272590 Change-Id: Iea7a04df0118d2410b7bfdab70b30e33d4b90e43
piotrzielinski committed
-
- 24 Sep, 2024 1 commit
-
-
- Compute the escape character values at compile time. - Use `little_endian::Store32` invariably to write all escaped characters. - Use 3 slop bytes at the end so that we can safely call `little_endian::Store32` at the end as well. PiperOrigin-RevId: 677995014 Change-Id: I9d710fff48d0ce0b013e64d726960364c77ea1d7
Shahriar Rouf committed
-
- 23 Sep, 2024 1 commit
-
-
to verify that AVX can be forced via `gnu::target`. Fixes #1759 PiperOrigin-RevId: 677853230 Change-Id: Ic69045c71ddf8230fd7b0210ba4aef8693053232
Derek Mauro committed
-
- 20 Sep, 2024 1 commit
-
-
PiperOrigin-RevId: 676894552 Change-Id: I68619a6ae48e65c7c58466b0be7ec79f5797066c
Evan Brown committed
-
- 19 Sep, 2024 2 commits
-
-
Fix benchmarks in `escaping_benchmark.cc` by properly calling `benchmark::DoNotOptimize` on both inputs and outputs and by removing the unnecessary and wrong `ABSL_RAW_CHECK` condition (`check != 0`) of `BM_ByteStringFromAscii_Fail` benchmark. Relevant comment: ``` // The DoNotOptimize(...) function can be used to prevent a value or // expression from being optimized away by the compiler. This function is // intended to add little to no overhead. // See: http://stackoverflow.com/questions/28287064 // // The specific guarantees of DoNotOptimize(x) are: // 1) x, and any data it transitively points to, will exist (in a register or // in memory) at the current point in the program. // 2) The optimizer will assume that DoNotOptimize(x) could mutate x or // anything it transitively points to (although it actually doesn't). // // To see this in action: // // void BM_multiply(benchmark::State& state) { // int a = 2; // int b = 4; // for (auto s : state) { // testing::DoNotOptimize(a); // testing::DoNotOptimize(b); // int c = a * b; // testing::DoNotOptimize(c); // } // } // BENCHMARK(BM_multiply); // // Guarantee (2) applied to 'a' and 'b' prevents the compiler lifting the // multiplication outside of the loop. Guarantee (1) applied to 'c' prevents the // compiler from optimizing away 'c' as dead code. ``` To see #1 and #2 in action, see: https://godbolt.org/z/ned1578ve PiperOrigin-RevId: 676588185 Change-Id: I7ed3e4bed8274b54ac7877316f2d82c33d68f00f
Shahriar Rouf committed -
PiperOrigin-RevId: 676486501 Change-Id: I874097a85486534150ce4c2f814d20be9d8b3b1f
Abseil Team committed
-