summaryrefslogtreecommitdiff
path: root/absl
Commit message (Collapse)AuthorAge
...
* Recognize some simple Rust mangled names in Demangle.Gravatar Chris Mihelich2024-05-06
| | | | | PiperOrigin-RevId: 631018414 Change-Id: Ice8efa0af4cb1f72b5d62fbbea4cb12cbead8634
* Use __builtin_ctzg and __builtin_clzg in the implementations ofGravatar Derek Mauro2024-05-03
| | | | | | | | | | | | | | | | CountTrailingZeroesNonzero16 and CountLeadingZeroes16 when they are available. GCC 14 and Clang 19 adds these new builtins. The g-suffix is for "generic". The s-suffix on __builtin_ctzs and __builtin_clzs is for "short". GCC never implemented the short versions and #1664 reports GCC 14 (pre-release) gives an error here, although this may be a pre-release bug. Fixes #1664 PiperOrigin-RevId: 630408249 Change-Id: I4aedcc82b85430f50d025f8eb1cab089c6fcd1bc
* Remove the forked absl::Status matchers implementation in statusor_testGravatar Derek Mauro2024-05-03
| | | | | PiperOrigin-RevId: 630404862 Change-Id: Icfe4bea2657d319cdd10902ee79af895c43602f1
* Add comment hack to fix copybara reversibilityGravatar Derek Mauro2024-05-02
| | | | | PiperOrigin-RevId: 630205286 Change-Id: I14e29fe846701c1381adb4642e55843b482254c6
* Add GoogleTest matchers for absl::StatusGravatar Zie Weaver2024-05-02
| | | | | PiperOrigin-RevId: 630072639 Change-Id: Ibbb166cc3c0479617c8e48abe8134b59a67a578f
* [random] LogUniform: Document as a discrete distributionGravatar Abseil Team2024-05-02
| | | | | PiperOrigin-RevId: 630047753 Change-Id: I6ad73216bbe4e279553b9a57bd2727310091c754
* Enable Cord tests with Crc.Gravatar Fergus Henderson2024-04-30
| | | | | PiperOrigin-RevId: 629403229 Change-Id: I24762df161f8a0ea41e59765ec68273f8607166b
* Fix order of qualifiers in `absl::AnyInvocable` documentation.Gravatar Abseil Team2024-04-26
| | | | | PiperOrigin-RevId: 628424298 Change-Id: Ia4d15decff040add1b161cd9b472f19f562c49f9
* Guard against null pointer dereference in DumpNode.Gravatar Fergus Henderson2024-04-25
| | | | | PiperOrigin-RevId: 628134930 Change-Id: I6b9763f2a87a9259963f00815c6953927f8add73
* Apply ABSL_MUST_USE_RESULT to try lock functions.Gravatar Chris Kennelly2024-04-25
| | | | | PiperOrigin-RevId: 628091370 Change-Id: I2dd20b7f33ab99e78d63688832ab475a513aa3fd
* Add public aliases for default hash/eq types in hash-based containersGravatar Dennis Kormalev2024-04-24
| | | | | | | | | | | | | | | Generic user code sometimes wants to provide more flexibility for its own users and provide type arguments that are used as Hash/Eq in underlying containers. However, there is no sensible publicly available default value for it yet. This CL fixes this issue and provides publicly visible aliases that such user code can use. PiperOrigin-RevId: 627844757 Change-Id: I4c393007244ad8d998da02883c623eae1715c0df
* Import of CCTZ from GitHub.Gravatar Abseil Team2024-04-24
| | | | | PiperOrigin-RevId: 627807723 Change-Id: I106cfe4d3d614b26422f632e856397b8bdcf743e
* Remove the hand-rolled CordLeaker and replace with absl::NoDestructorGravatar Derek Mauro2024-04-24
| | | | | | | to test the after-exit behavior PiperOrigin-RevId: 627804039 Change-Id: Idc1c5fc14cea466dcc98f0d8746c02cafe887502
* `convert_test`: Delete obsolete `skip_verify` parameter in test helperGravatar Dino Radakovic2024-04-24
| | | | | | | | It is unused. We already use code within the `TestWithMultipleFormatsHelper` to skip output verification for Apple and MSVC. PiperOrigin-RevId: 627783586 Change-Id: Ib51374e8571aa5f4b5f1e836815188bd9bdc1536
* overload: allow using the underlying type with CTAD directly.Gravatar Aaron Jacobs2024-04-23
| | | | | | | There's no need to go through an extra layer of indirection to get this. PiperOrigin-RevId: 627567108 Change-Id: I241851c5294417aae069047e35961ed58475e59e
* PR #1653: Remove unnecessary casts when calling CRC32_u64Gravatar Pavel P2024-04-19
| | | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1653 CRC32_u64 returns uint32_t, no need to cast returned result to uint32_t Merge 90e7b063f39c6b1559a21832d764e500e1cdd40c into 9a61b00dde4031f17ed4fa4bdc0e0e9ad8859846 Merging this change closes #1653 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1653 from pps83:CRC32_u64-cast 90e7b063f39c6b1559a21832d764e500e1cdd40c PiperOrigin-RevId: 626462347 Change-Id: I748a2da5fcc66eb6aa07aaf0fbc7eca927fcbb16
* PR #1652: Avoid C++23 deprecation warnings from float_denorm_styleGravatar Pavel P2024-04-18
| | | | | | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1652 this change fixes errors emitted by MS compiler: ``` 1>C:\abseil-cpp\absl\numeric\int128.h(278,20): error C4996: 'std::float_denorm_style': warning STL4042: std::float_denorm_style, std::numeric_limits::has_denorm, and std::numeric_limits::has_denorm_loss are deprecated in C++23. You can define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning. ``` Merge 7be96350012559b2b3f3b705cb06088e0a6aaf0d into 7efc308b31d3635a6fb0cb94f9f0ac2317d11fcf Merging this change closes #1652 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1652 from pps83:float_denorm_style-warn 7be96350012559b2b3f3b705cb06088e0a6aaf0d PiperOrigin-RevId: 626124710 Change-Id: I5fc2b5758dcb3956164dbec1e8559f241a0d7bf7
* Minor cleanup for `absl::Cord`Gravatar Abseil Team2024-04-18
| | | | | PiperOrigin-RevId: 626124196 Change-Id: I81a9e4c35d6456ab8cd3942f9c2452c70db90678
* PR #1651: Implement ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING for ↵Gravatar Pavel P2024-04-18
| | | | | | | | | | | | | | MSVC compiler Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1651 Merge 6c02d45f193cb9d8e26f2f8e4db57cea384cefb2 into 9a61b00dde4031f17ed4fa4bdc0e0e9ad8859846 Merging this change closes #1651 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1651 from pps83:ms-pragma-warn 6c02d45f193cb9d8e26f2f8e4db57cea384cefb2 PiperOrigin-RevId: 626108518 Change-Id: Idb00aca9bafbca92b231bdff7ef8c220948f134c
* Add `operator<=>` support to `absl::int128` and `absl::uint128`Gravatar Benjamin Barenblat2024-04-18
| | | | | PiperOrigin-RevId: 626080616 Change-Id: If434be2371c1e28f9fd0133f411596bdc38bd222
* [absl] Re-use the existing `std::type_identity` backfill instead of ↵Gravatar Lawrence Wolf-Sonkin2024-04-18
| | | | | | | | | redefining it again * Specifically, using `absl::internal::type_identity_t` instead of a reimplementation thereof (`NoTypeDeduction`) in the `absl::InlinedVector` code PiperOrigin-RevId: 626055714 Change-Id: I3f5a9a1c25480bc4431edbcc4784e6bc8d257f8d
* Add `absl::AppendCordToString`Gravatar Abseil Team2024-04-18
| | | | | PiperOrigin-RevId: 626039936 Change-Id: I6e791363bab06d66029a8565c42d158a2fe176f0
* `str_format/convert_test`: Delete workaround for [glibc ↵Gravatar Dino Radakovic2024-04-18
| | | | | | | | | bug](https://sourceware.org/bugzilla/show_bug.cgi?id=22142) RHEL7 ships an affected version of glibc, but this bug is specific to powerpc, which abseil [does not support](https://github.com/google/oss-policies-info/blob/4ec9f2a979a6c6b7bb148040347c8d2b1def09fa/foundational-cxx-support-matrix.md). PiperOrigin-RevId: 626018125 Change-Id: I1875aee6c37e69f712ef91e41da455af9d00fb5f
* `absl/log/internal`: Document conditional ABSL_ATTRIBUTE_UNUSED, add C++17 TODOGravatar Dino Radakovic2024-04-17
| | | | | | | Once absl's support floor moves to C++17, we'll be able to replace it with [`[[maybe_unused]]`](https://en.cppreference.com/w/cpp/language/attributes/maybe_unused). PiperOrigin-RevId: 625680108 Change-Id: I823b70c0f833dcf9c41bca0c2566b12ec65785de
* `log/internal/check_op`: Add ABSL_ATTRIBUTE_UNUSED to CHECK macros when ↵Gravatar Dino Radakovic2024-04-15
| | | | | | | | | | | | | | STRIP_LOG is enabled When `STRIP_LOG` is off, the internal variable `absl_log_internal_check_op_result` is passed to `absl::log_internal::LogMessageFatal()` and used in the failure message. When `STRIP_LOG` is on, the variable is truly unused. Applying a `ABSL_ATTRIBUTE_UNUSED` on the variable triggers `-Wused-but-marked-unused` when `STRIP_LOG` is off, not applying the attribute triggers `-Wunused-but-set-variable` when `STRIP_LOG` is on. Define a new internal macro `ABSL_LOG_INTERNAL_ATTRIBUTE_UNUSED_IF_STRIP_LOG` that evaluates to `ABSL_ATTRIBUTE_UNUSED` when `STRIP_LOG` is on and nothing when `STRIP_LOG` is off to address both of these scenarios. PiperOrigin-RevId: 625049155 Change-Id: Ia3f8a6ca916dd67a287bbda4b9bd6c574c92247a
* log_benchmark: Add VLOG_IS_ON benchmarkGravatar Abseil Team2024-04-12
| | | | | PiperOrigin-RevId: 624149255 Change-Id: I74815463226adaf183af531b8d373782d20b2ef2
* Restore string_view detection checkGravatar Abseil Team2024-04-09
| | | | | PiperOrigin-RevId: 623195368 Change-Id: Iadb9bdedee4d9b5ced4fff9e6316ee63f9a89ea5
* Remove an unnecessary ABSL_ATTRIBUTE_UNUSED from a logging macroGravatar Derek Mauro2024-04-09
| | | | | PiperOrigin-RevId: 623158262 Change-Id: If6a29faa89f893747de22a3b02bd69573b5af15f
* In example code, add missing template parameter.Gravatar Abseil Team2024-04-05
| | | | | PiperOrigin-RevId: 622164857 Change-Id: I806ebeb4da81403c8a9d57f3529b2bfbc1a07d01
* Optimize crc32 V128_From2x64 on ArmGravatar Connal de Souza2024-04-04
| | | | | | | This removes redundant vector-vector moves and results in Extend being up to 3% faster. PiperOrigin-RevId: 621948170 Change-Id: Id82816aa6e294d34140ff591103cb20feac79d9a
* Annotate that Mutex should warn when unused.Gravatar Chris Kennelly2024-04-04
| | | | | | | This often indicates a bug from adding synchronization logic but not using it. PiperOrigin-RevId: 621921486 Change-Id: Iec49134c5e4bb50d9fc728c1f8a4fd2e86856782
* Add ABSL_ATTRIBUTE_LIFETIME_BOUND to Cord::Flatten/TryFlatGravatar Abseil Team2024-04-04
| | | | | | | These were already on the declarations, but it seems like the definitions need them as well. PiperOrigin-RevId: 621868985 Change-Id: I2595aae506924f8b1dad3b07efe1660ae0e4488e
* Deprecate `absl::exchange`, `absl::forward` and `absl::move`, whichGravatar Derek Mauro2024-04-04
| | | | | | | | | | | | | | | | were only useful before C++14. Callers should use `std::exchange`, `std::forward` and `std::move` instead. One thing to note is that some compilers issue warnings about pessimizing and redundant moves. Some compilers were able to apply this analysis to std::move but not absl::move. If you get a warning about one of these issues now that absl::move is an alias for std::move, you should remove this use of move. See https://developers.redhat.com/blog/2019/04/12/understanding-when-not-to-stdmove-in-c PiperOrigin-RevId: 621861324 Change-Id: I60f98b59be5ff425bd17fbce43d9218c361720c2
* Temporarily revert dangling std::string_view detection until dependent is fixedGravatar Abseil Team2024-04-02
| | | | | PiperOrigin-RevId: 621413395 Change-Id: I20e9fac94e81e59c0d723f115670c8cf68e9b44a
* Use _decimal_ literals for the CivilDay example.Gravatar Devin Jeanpierre2024-04-02
| | | | | | | Using `07` is a neat pun, but it not friendly to the reader. If the reader naively copies it and then changes the `7` to an `8` or a `9`, it will fail compilation: `invalid digit ... in octal constant`. Best avoided. Note that the other examples do not use octal literals. PiperOrigin-RevId: 621335289 Change-Id: I6b11a639c5ba675eb29467baf45996ceff0ed9bf
* Fix bug in BM_EraseIf.Gravatar Vitaly Goldshteyn2024-04-02
| | | | | PiperOrigin-RevId: 621258501 Change-Id: Id094f3f0d0bc4a9fa8f3d1f90cfcd4c53beeb776
* Add internal traits to absl::string_view for lifetimebound detectionGravatar Abseil Team2024-04-02
| | | | | | | | | This helps compilers that understand `ABSL_ATTRIBUTE_LIFETIME_BOUND` flag constructs such as `absl::StatusOr<std::string_view> str = std::string(...)` as error-prone. PiperOrigin-RevId: 621196818 Change-Id: I78d4c66854cde9d06eaaec05869d956376109d9c
* Add internal traits to absl::StatusOr for lifetimebound detectionGravatar Abseil Team2024-04-02
| | | | | | | | | This helps compilers that understand `ABSL_ATTRIBUTE_LIFETIME_BOUND` flag constructs such as `absl::StatusOr<std::string_view> str = std::string(...)` as error-prone. PiperOrigin-RevId: 621169918 Change-Id: Id621f63b9da4dc72eb4bd42c62d88bcc15a05243
* Add internal traits to absl::Span for lifetimebound detectionGravatar Abseil Team2024-04-02
| | | | | PiperOrigin-RevId: 621169753 Change-Id: Ib6d7b248e14f29f1f91c24b8e1cf9703962b0e36
* Add missing dependency for log test build targetGravatar Abseil Team2024-04-02
| | | | | PiperOrigin-RevId: 621155521 Change-Id: I1705451bc1b931bfae3e1a2977bc56127e15faed
* Add internal traits for lifetimebound detectionGravatar Abseil Team2024-04-01
| | | | | | | | | | | | | | | | | | | | | | | | This will helps compilers that understand `ABSL_ATTRIBUTE_LIFETIME_BOUND` flag constructs such as `absl::StatusOr<std::string_view> str = std::string(...)` as error-prone. For standard types, this is done via specializing the type traits. For all other types, this is done by detecting the presence of a Boolean member trait such as: `using absl_internal_is_view = std::true_type;` in the type. This is purely intended as a safety feature, and the values of these traits (even if wrong!) must NOT be depended on for correct behavior. Furthermore, only high-value types (such as `absl::StatusOr`) are the intended users here. Do not declare or use these traits on arbitrary types that are unlikely to be misused. Do not depend on any of these to be stable, as they not (yet) public APIs. Moreover, the trait declarations and mechanisms are all subject to change. (For example, if `[[clang::lifetimebound]]` becomes possible to detect directly, the traits may need to be altered to utilize that, and distinguish between assignments and constructions.) Should these or similar APIs be made public at a later point, the detection mechanisms may be altered quickly, and may (either loudly or silently) break existing code depending on these internal APIs without notice. PiperOrigin-RevId: 620868493 Change-Id: I4a528a1dcf0df6ffbc3641d09537bc4c674aee4e
* Use local decoding buffer in HexStringToBytesGravatar Abseil Team2024-03-28
| | | | | PiperOrigin-RevId: 620141661 Change-Id: I9dc9243b1d227f7cf32319bc1fec94aba850d4c1
* Only check if the frame pointer is inside a signal stack with known boundsGravatar Abseil Team2024-03-28
| | | | | | | | This function previously returned true whenever the signal stack had unknown bounds, that is obviously incorrect. PiperOrigin-RevId: 620084964 Change-Id: I3821730b45773300569b9cbdb7e72442ed109d04
* Roll forward: enable small object optimization in swisstable.Gravatar Evan Brown2024-03-28
| | | | | PiperOrigin-RevId: 619984581 Change-Id: I68fc9d6e9dd447bdccdbfd270073e11865f85965
* Optimize LowLevelHash by breaking dependency between final loads and ↵Gravatar Connal de Souza2024-03-28
| | | | | | | | | previous len/ptr updates. No functional change. PiperOrigin-RevId: 619979819 Change-Id: I71a4ae14272bcdf1da2e201ed286f95213ecb5e2
* Fix the wrong link.Gravatar Abseil Team2024-03-27
| | | | | | | | | It took me way too much time to figure out why parameters of `absl::LogUniform` have nothing to do with the contents of the linked wiki page. The new link does not match the function exactly, but it is still much closer than the log-normal distribution. PiperOrigin-RevId: 619749575 Change-Id: Idbe748ed0dadf3ca22dc592f296f770ce04de8be
* Optimize InsertMiss for tables without kDeleted slots.Gravatar Vitaly Goldshteyn2024-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL contains two optimizations that were measured together. 1) InsertMiss (i. e. successful insert) optimization: The idea that in case there is no kDeleted, we already know 99% of the information. So we are finding the position to insert with 2 asm instructions (or 3 in case of ARM or portable) and passing that as a hint into `prepare_insert`. `prepare_insert` is out of the line in order to minimize effect on InsertHit (the most important case). `prepare_insert` may use the hint in case we still have growth and no kDeleted is guaranteed. In case of kDeleted, we still call `find_first_non_full` in order to potentially find kDeleted slot earlier. We may consider different ways to do it faster for kDeleted later. 2) `find_first_non_full` optimization: After optimization #1 `find_first_non_full` is used: 1. during resize and copy 2. right after resize 3. during DropDeletedWithoutResize 3. in InsertMiss for tables with kDeleted In cases 1-3 the table is quite sparse. 1. After resize it is 7/16 sparse 2. During resize it is 7/16 maximum, but during first inserts it is much sparser. 3. During copy it may be up to 7/8, but at the beginning it is way sparser. 4. During DropDeletedWithoutResize it is 25/32 sparse, but at the beginning it is way sparser. The only case, where the table is not known to be sparse, with `find_first_non_full` usage is a table with deleted elements. But according to hashz, we have <3% such tables. Adding an extra branch wouldn't hurt much there. PiperOrigin-RevId: 619681885 Change-Id: Id3e2852cc6d85f6c8f90982d7aeb14799696bf39
* Use GrowthInfo without applying any optimizations based on it.Gravatar Vitaly Goldshteyn2024-03-27
| | | | | PiperOrigin-RevId: 619649335 Change-Id: I8b3380816418a363fb6686db7966248cb530c491
* Disable small object optimization while debugging some failing tests.Gravatar Evan Brown2024-03-27
| | | | | PiperOrigin-RevId: 619598530 Change-Id: Ie4b808a3b826db8c271c81914c7a88d2c6216eb2
* Adjust conditonal compilation in non_temporal_memcpy.hGravatar Abseil Team2024-03-27
| | | | | | | | | | This change will allow the AVX version of non-temporal memcpy to be compiled even if the compiler isn't run with AVX support. This allows runtime dispatch to select the AVX implementation for CPUs that are known to be compatible with AVX instructions. PiperOrigin-RevId: 619594422 Change-Id: Ia7d92404ef8d10d152030b29b71948ed954f28f5