summaryrefslogtreecommitdiff
path: root/absl/strings/internal/cord_internal.h
Commit message (Collapse)AuthorAge
* Optimize Cord Refcount decrement.Gravatar Connal de Souza2023-06-09
| | | | | | | Introduce kHighRefcountMask which masks off flags and the LSb of the refcount value. In the cases where this mask is used, we don't need to check the LSb because we can assume the refcount is 1 when the rest of the masked RefcountAndFlags is empty, and the LSb doesn't matter if the masked value is not empty (either it's immortal or refcount > 1). This saves an instruction and a cycle (and + cmp -> tst) https://godbolt.org/z/Kz69eqfhq PiperOrigin-RevId: 539151659 Change-Id: I2ec7d72918f052c4b0938edd746af9d5b3052c7e
* Fixed Windows DLL builds of test targetsGravatar Derek Mauro2023-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a heavily modified version of https://github.com/abseil/abseil-cpp/pull/1445, which adds some missing test libraries to the test DLL. Unlike #1445, this change moves several global variables out of headers that did not need to be in headers. For instance, cord_btree_exhaustive_validation was a global defined/declared in cord_internal, but only used in cord_rep_btree and its test. cordz_handle defined a queue in its header even though it wasn't needed, which also led to ODR problems. The Spinlock used in CordzHandle is replaced with a Mutex. This was originally a Mutex, but Chromium asked us to change it to a Spinlock to avoid a static initializer. After this change, the static initializer is no longer an issue. #1407 PiperOrigin-RevId: 531516991 Change-Id: I0e431a193698b20ba03fac6e414c26f153f330a7
* Make `SanitizerSafeCopy()` constexpr, and check for constant evaluationGravatar Martijn Vels2023-01-25
| | | | | PiperOrigin-RevId: 504728034 Change-Id: Ifb338247b7484426e25a58580783a1d70d27e6fd
* Add memory sanitizer to absl::CordGravatar Martijn Vels2023-01-25
| | | | | PiperOrigin-RevId: 504555535 Change-Id: Id40484e9f52c87e9d67def2735ee60481ca50526
* Refactor InlineData to allow for memory sanitizer changes step 2Gravatar Martijn Vels2023-01-10
| | | | | PiperOrigin-RevId: 501074382 Change-Id: I26a59ee6452855685ffe89469c352e6384060f59
* Refactor InlineData to allow for memory sanitizer changes step 1Gravatar Martijn Vels2023-01-09
| | | | | PiperOrigin-RevId: 500765473 Change-Id: Iaa3f9fdee6c9f4322bc8995b0d381cf1c8cb1349
* Remove possible UB from CopyRaw()Gravatar Martijn Vels2022-12-07
| | | | | | | This change removes the 'create by single memcpy' CopyRaw() logic to avoid potential UB from the atomic refcount data being included in the memcpy. While we know this works on all supported platforms, it is officially UB, and we should change it to something else. This change changes the CopyRaw() method to explicitly create a (default initialized) instance, initialize `length` and `refcount`, and then memcpy the remaining contents which are trivial uint8_t and CordRep* values. PiperOrigin-RevId: 493596072 Change-Id: I46618883eb1c7c9ed9eb083f4d3e7fc501f23df5
* Fix "unsafe narrowing" warnings in absl, 12/12.Gravatar Abseil Team2022-10-13
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL enables these warnings and fixes the remaining known issues.) Bug: chromium:1292951 PiperOrigin-RevId: 480981210 Change-Id: I92d5023c6833e24d6aa29b10d433116329972f41
* Revert change to internal 'Rep', this causes issues for gdbGravatar Martijn Vels2022-10-13
| | | | | PiperOrigin-RevId: 480945608 Change-Id: I3e90a105c793deee02fbef322946bf7d5340dc78
* Reorganize InlineData into an inner Rep structure.Gravatar Martijn Vels2022-10-13
| | | | | | | | | | | | | | | | This moves inlined code around a bit without changing anything bar the names of things. The purpose for all this is that it greatly simplifies the process of adding memory poisining to Cord / InlineData. InlineData can have scoped poison / unpoison regions around the interface, calling into rep for the 'real code'. I.e.: Rep::as_chars() { return &inline_data[1]; } InlineData::as_chars() { Unpoisoned self(this); return rep_.as_chars(); } Likewise, it greatly simplifies intercepting the code for constructors, copy constructors and operator= logic. PiperOrigin-RevId: 480893031 Change-Id: I050c88caff2315939d95a0361ae20528be36a96b
* Change Cord internal layout, which reduces store-load penalties on ARMGravatar Martijn Vels2022-10-11
| | | | | PiperOrigin-RevId: 480511524 Change-Id: I73945b1150a2e2e75774684fb8e7364f9c1290a7
* Cleanup: Move BitwiseCompare() to InlineData, and make it layout independent.Gravatar Martijn Vels2022-09-29
| | | | | | | This removes layout specific details from InlineData from cord.h, making future platform specific internal layout changes easier to land. PiperOrigin-RevId: 477869206 Change-Id: I1d417af47d7f04e34a98ba7b93ae591ece8f9151
* Fix "unsafe narrowing" warnings in absl, 5/n.Gravatar Abseil Team2022-08-17
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in strings/internal/.) Bug: chromium:1292951 PiperOrigin-RevId: 468215101 Change-Id: I07fa487bcf2cf62d403489c3be7a5997cdef8987
* Fix "unsafe narrowing" warnings in absl, 1/n.Gravatar Abseil Team2022-07-28
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .h and win32 .inc files.) Bug: chromium:1292951 PiperOrigin-RevId: 463835431 Change-Id: If8e5f7f651d5cd96035e23e4623bdb08a7fedabe
* Cord: workaround a GCC 12.1 bug that triggers a spurious warningGravatar Derek Mauro2022-05-20
| | | | | | | | | | | | | See the GCC bug report https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105585 and Abseil bug report https://github.com/abseil/abseil-cpp/issues/1175 Fixes #1175 PiperOrigin-RevId: 450083136 Change-Id: I207aaffaec9166b335065dd6ef148a721b94048e
* Export of internal Abseil changesGravatar Abseil Team2022-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3d018c03a34bf273a4b24b3584ed77f0a6d21686 by Abseil Team <absl-team@google.com>: Fix a spelling typo (s/boundries/boundaries). PiperOrigin-RevId: 442041877 Change-Id: I608020697d37b85316bb9a0838e4b457659c926c -- 518b8119e51db24ce7fb0fd2fe537ec43825c3e6 by Dino Radakovic <dinor@google.com>: absl/types/internal/variant: Make include guard uppercase https://google.github.io/styleguide/cppguide.html#The__define_Guard PiperOrigin-RevId: 441911692 Change-Id: I9837dd07f20204d8253f20627b0917a34dc21825 -- b91696c38310a7cae8c1ea9e2d479495f5dc3f69 by Greg Falcon <gfalcon@google.com>: Add an internal-only API to wrap __builtin_prefetch() if available. This private API is intended for future use by the Abseil implementation. Like any internal-namespaced function, it may be changed or removed at any time. PiperOrigin-RevId: 441894616 Change-Id: Iaa48bd4680b373f4a0d5afab0cb35e2a1908595f -- 0f01e8b0551a662e02dff60840c54320f987315f by Derek Mauro <dmauro@google.com>: C++20: Use the standard `constinit` keyword for `ABSL_CONST_INIT` when available PiperOrigin-RevId: 441778874 Change-Id: I70c616469752ff23b326b1c615437599f42cc6aa GitOrigin-RevId: 3d018c03a34bf273a4b24b3584ed77f0a6d21686
* Export of internal Abseil changesGravatar Abseil Team2022-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fb671efb2a70f452f17a884b17cf18817b977a8f by Abseil Team <absl-team@google.com>: Remove extra semicolon in ABSL_INTERNAL_ASSERT_IS_FULL macro To fix compilation when empty statement warning is treated as error. PiperOrigin-RevId: 438342663 Change-Id: I3067fbeffa2691888f37554e88f229f24fb55ecc -- a58c9396f1d88d11347aed36ef2e1b633071363c by Martijn Vels <mvels@google.com>: Fix kMaxHeight bounds to kMaxDepth for CordrepBtreeNavigator Added unit test (confirmed failure mode with old code) and extra assertion in the implementation. PiperOrigin-RevId: 438327463 Change-Id: I32242c86b0c879b8a42cb9a92075e537d588e09f -- f348e85dbfc9187ef59085fa2b999374f1670338 by Jorge Gorbe Moya <jgorbe@google.com>: Make the flags enum in `RefcountAndFlags` a named enum to workaround an lldb issue (https://github.com/llvm/llvm-project/issues/54602). PiperOrigin-RevId: 438146097 Change-Id: Ibc2ee26489d99de515a779a903b6458dd0befef7 -- a960a3e9fb2a2e3418f806178e73d8566b78bc85 by Gennadiy Rozental <rogeeff@google.com>: Introduce support for std::optional<T>/absl::optional<T> flag types. PiperOrigin-RevId: 438129500 Change-Id: I3d925c0a7f9ce9f857277fac3b0bf664ccd3a95c GitOrigin-RevId: fb671efb2a70f452f17a884b17cf18817b977a8f
* Export of internal Abseil changesGravatar Abseil Team2022-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f0b7d230a90c82c6fee7adcb46a213d2582b6a7b by Martijn Vels <mvels@google.com>: Optimize substring logic now that CONCAT is removed This CL adds a static Substring() method to CordRepSubstring, and implements substring logic in cord.cc in terms of the new function. This cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed. PiperOrigin-RevId: 431756805 Change-Id: I39c875b5af119916780e68598c7fc619fb2e8476 -- fa7d1bedf0e1244303844869a332c2a5dbd9ac0f by Derek Mauro <dmauro@google.com>: Allow macro expansion within ABSL_FLAG and ABSL_DECLARE_FLAG args PiperOrigin-RevId: 431721184 Change-Id: I6e19713fb541205d796f940998db5ee25178d55e -- 1b328badd92304ed1c634f23e1c191be57b7bb15 by Laramie Leavitt <lar@google.com>: Add #include for std:: types PiperOrigin-RevId: 431546757 Change-Id: I75efbcd3c77e6f53e4db66494101d30d670d988e -- e25323b299d4d3840218702860f537cdd2a3926f by Thomas Köppe <tkoeppe@google.com>: Add hashing support for pointers to member. Also add tests for function pointers to the existing "pointer" test. PiperOrigin-RevId: 431067588 Change-Id: I3686010635d9fee34c47a418b72402e10737cdbc -- ab27b012a61cf10109fd51932b3b0b05ee78f32f by Laramie Leavitt <lar@google.com>: Avoid use of std::pow in ChiSquare test. PiperOrigin-RevId: 431015830 Change-Id: Idd767ff2f51009ee171de48757207b38330ffea3 -- 28c359135d89061177958580fe4a7493802499cb by Laramie Leavitt <lar@google.com>: Add #include <type_traits> for std::false_type PiperOrigin-RevId: 431005757 Change-Id: I85a6a918778601e19512aaea744424cf39018521 -- a920730f23669479d92e3a696d65d0bc3a5b1de1 by Laramie Leavitt <lar@google.com>: #include <utility> for std::declval PiperOrigin-RevId: 431004934 Change-Id: I295237b2d44e9a15e4083698ea121b68ce0a1bb7 GitOrigin-RevId: f0b7d230a90c82c6fee7adcb46a213d2582b6a7b
* Export of internal Abseil changesGravatar Abseil Team2022-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 91d76b3ac9edff91f206d9eee60423c39eeeaf93 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 430442277 -- 9f8a87bcc5cc5b0fd8b7f0318f37d152fd8bea06 by Evan Brown <ezb@google.com>: Small refactoring to work towards allowing for node_btree_* containers. - Change common_params::transfer to rely on slot_policy transfer instead of manually doing construct/destruct. Transfer is not construct/destruct for node containers. - Move maps' value_compare into btree.h from btree_map.h so it can be reused for node_btree_map.h. - Also add a test for maps' value_compare protected members. PiperOrigin-RevId: 430245542 -- 0126e0b6295342317d9c9f0a66e2d7009b858426 by Martijn Vels <mvels@google.com>: Add CordRepSubString::Create function with hard checks on IsFlat() | IsExternal() This hardens internal invariants, IsFlat() || IsExternal() is a cheap, single predicted branch, and removes boilerplate code from cord.cc PiperOrigin-RevId: 429676041 -- ed98a92af49d9e238d9f1d1b69fb4eddcd1ccbc7 by Abseil Team <absl-team@google.com>: tweaks to status.h documentation to reflect general-purpose communication PiperOrigin-RevId: 429584104 GitOrigin-RevId: 91d76b3ac9edff91f206d9eee60423c39eeeaf93 Change-Id: I54d6d116a564f86a842b983ca76559bf9b388f72
* Export of internal Abseil changesGravatar Abseil Team2022-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ceee18732f9499d3a53d46d5974f12ea0774b900 by Abseil Team <absl-team@google.com>: Remove division from the profile guided optimization PiperOrigin-RevId: 428444108 -- fc27059f1b0c0b4cb8ddd9a7a88220af52c0c755 by Evan Brown <ezb@google.com>: Rename btree_node::leaf to is_leaf and also add is_internal for readability improvements. PiperOrigin-RevId: 428076422 -- 6a90d18477cc3a6de84282b6e38d6f294aa72748 by Evan Brown <ezb@google.com>: In sanitizer mode, add generation integers to b-tree nodes and iterators and validate that iterators have not been invalidated already when they're used. Even though generation integers are stored in all nodes, we only use the one stored in the root node for validation. The reason we keep one in all the nodes is that nodes can become a root node after they are allocated. Also change the order of args in init_leaf to not violate the style guide. PiperOrigin-RevId: 428054226 -- ede4a0f676f43e7003fd2599c263d55222e760ba by Martijn Vels <mvels@google.com>: Physically remove CordRepConcat This CL removes all uses of CordRepConcat. This change is executed by removing all the dead 'btree_enabled()' and 'IsConcat' branches, and all subsequent dead code. This change explicitly does not optimize any of the remaining code other than the most trivial ones such as removing 'stack' loop vars and loops. PiperOrigin-RevId: 428002308 -- 7cc83d96118149cf1aa1258a066b8fd4517df5f6 by Evan Brown <ezb@google.com>: Change btree_iterator from a struct to a class. Motivation: btree_iterator has private members and invariants so it should be a class. Also merge two private sections. PiperOrigin-RevId: 427768836 -- 524d478b0af422e1a867a8823d9fbad149030360 by Martijn Vels <mvels@google.com>: Physically block the creation of new CordRepConcat nodes. This change removes CordRepConcat creation, issuing a FATAL errors on the (practically impossible) call path on broken invariants. This change is deliberately limited in impact, subsequent changes will be more voluminous ripping out the (now dead) CordRepConcat code. PiperOrigin-RevId: 427741022 -- e21eb354c1bb358ea8b64d0e3fbb378e87b8b8c4 by Derek Mauro <dmauro@google.com>: Update the implementation of ABSL_DEPRECATED to work with GCC, and recommend using the standard attribute [[deprecated]] for C++14 and newer GCC users that are experiencing new warnings can silence them with -Wno-deprecated-declatations. GCC users that want to see the warnings but not error on them can use -Wno-error=deprecated-declarations. PiperOrigin-RevId: 427228952 -- 0ab4ee5660f3a072054dc4ab5056925c26977c7a by Laramie Leavitt <lar@google.com>: Change comment to avoid overflow. PiperOrigin-RevId: 427090218 GitOrigin-RevId: ceee18732f9499d3a53d46d5974f12ea0774b900 Change-Id: Ida00477b6a3d02a8b7bb467be7621b618385d1e9
* Export of internal Abseil changesGravatar Abseil Team2022-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4409b08e103d6e7041d18a4d431290cafe3650cf by Derek Mauro <dmauro@google.com>: Workaround NVCC compile error in StringConstant Based on a patch in TensorFlow: https://github.com/tensorflow/tensorflow/blob/da83132aba8d2b6a3c3a9b2e662868eb24f4dd1e/third_party/absl/com_google_absl_fix_mac_and_nvcc_build.patch#L262-L282 Fixes #1105 PiperOrigin-RevId: 426156316 -- 25db16567ffc5400dfaa30b567398ede84729687 by Abseil Team <absl-team@google.com>: Only look for Elf64_Auxinfo on 64-bit FreeBSD. PiperOrigin-RevId: 426132251 -- 2e73c3d9df59b2b769d2b8dca97f0ca5c512c72a by Abseil Team <absl-team@google.com>: Add a problem hint to the error message when dereferencing the end() iterator. PiperOrigin-RevId: 426120394 -- 6befbf89c47963656b9e8151166ab4c8446d4785 by Martijn Vels <mvels@google.com>: Make Cord Btree the default and remove opt out machinery This change makes btree the default Cord format and removes the machinery to opt out. Subsequent changes will remove the 'true' constant evaluation and effectively cleanup all old code and references to CONCAT. PiperOrigin-RevId: 426119728 -- f6a0a664029d61811d90bd484f4eefa0400b5dd4 by Abseil Team <absl-team@google.com>: Mark Notification::HasBeenNotified as ABSL_MUST_USE_RESULT PiperOrigin-RevId: 425927033 GitOrigin-RevId: 4409b08e103d6e7041d18a4d431290cafe3650cf Change-Id: I86f1052c63c13c6486baf4108de2554f162f9c40
* Export of internal Abseil changesGravatar Abseil Team2022-01-05
| | | | | | | | | | | | | | | | | | -- 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 by Abseil Team <absl-team@google.com>: Another implicit sign conversion found and removed. PiperOrigin-RevId: 419718762 -- dbb6bca7d3cfa9ce79e70d0ed3d0354a4e3a0983 by Abseil Team <absl-team@google.com>: Fix sign conversions so that absl/status/status.h can compile with -Wconversion -Wsign-compare PiperOrigin-RevId: 419658075 GitOrigin-RevId: 04e8fdf6a37d31f9364ca0f70bf663ee972481c6 Change-Id: I18441488cc84f573c2818ee241c387e1953d5105
* Export of internal Abseil changesGravatar Abseil Team2021-11-19
| | | | | | | | | | | | | | | | | | | | -- 28ba85cbeb766341969fda677bbd8df8615b349f by Martijn Vels <mvels@google.com>: Internally allow for CordRepFlat sizes up to 256KB The default flat size will remain at 4KB, but this allows for future specializations such as file io and compression where larger buffers can be used providing 'zero copy' streaming optimizations. PiperOrigin-RevId: 411095538 -- 0c1cae5ff376a0955a5b67868723836665737801 by Abseil Team <absl-team@google.com>: cord_rep_btree: Reduce nesting in `DestroyTree` using guard clauses PiperOrigin-RevId: 411093741 GitOrigin-RevId: 28ba85cbeb766341969fda677bbd8df8615b349f Change-Id: Ieb84ed409f1e8a8bca74edebbf2d097a9ec828a7
* Export of internal Abseil changesGravatar Abseil Team2021-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 83e4cdf03a4d702b30e69204060de09e462e23c6 by Greg Falcon <gfalcon@google.com>: Revert the crc addition to RefcountAndFlags, and restore related comments to their original state. In development, the implementation of SetExpectedCrc() changed, and there is no longer a need to track the CRC status in the refcount. Since the distinction between IsOne() and IsMutable() is subtle *and unused*, removing it now can help avoid subtle bugs in the future. This distinction can always be added back later, if it proves necessary. Keep the reserved bit for now; all it costs is one extra mask instruction in the refcount checks, and space for extra state in Cord is always hard to find. PiperOrigin-RevId: 408647038 -- ee67585cf66954176615271f50f8b278119dd138 by Greg Falcon <gfalcon@google.com>: Implement Cord::SetExpectedChecksum() and Cord::ExpectedChecksum(). SetExpectedChecksum() will store a uint32_t out-of-band alongside a Cord's data. This value persists through copies and assignments. Mutating operations on a Cord cause the value to be forgotten. ExpectedChecksum() retrieves the stored value, if present. This API is intended for storing a CRC32C checksum alongside data, allowing checksums to be passed through dataflows and validated at the final step. However, this API is agnostic to the meaning of the stored value. No CRC32C validation is performed by these new APIs. This implementation adds a new CordRep node, CordRepCrc. A CordRepCrc may (currently) only live at the top of a tree. This allows traversal logic to be agnostic to these nodes, instead putting the needed branches at the mutation level. This also implements the property requested from API review, that any mutation is guaranteed to permanently forget the stored CRC. PiperOrigin-RevId: 408611221 -- a86f592402b37c854ebdc77d2b9b425451a7a675 by Martijn Vels <mvels@google.com>: Move 'ExtractResult' into CordRep The result of an extract operation is logically identical for any tree implementation, and having a single type makes 'tree independent' implementation in cord.cc more concise. PiperOrigin-RevId: 408332408 -- baa7647e21db59a87f75af9cac62172ce38a0f71 by Abseil Team <absl-team@google.com>: Replace usages of `assert` macros with `ABSL_HARDENING_ASSERT`. PiperOrigin-RevId: 408272133 -- c7658133d8662c39fa5035fc93a364c7c3d327e0 by Martijn Vels <mvels@google.com>: Add CordRepBtree::ExtractAppendBuffer PiperOrigin-RevId: 407944179 -- 5775100363b5890ebfe710fadebf040445eab991 by Martijn Vels <mvels@google.com>: Add CordRepConcat::ExtractAppendBuffer PiperOrigin-RevId: 407932968 -- 9f520ba1600a93352c78f644a369c7c76195ee86 by Greg Falcon <gfalcon@google.com>: Add cordz tracking for crc nodes. This also adds a new kSetExpectedChecksum method to the list of tracked methods. This is presently unused but will be used soon. PiperOrigin-RevId: 407884120 GitOrigin-RevId: 83e4cdf03a4d702b30e69204060de09e462e23c6 Change-Id: I134ace2d87215813eaa60a282996a33884676c06
* Export of internal Abseil changesGravatar Abseil Team2021-11-04
| | | | | | | | | | | | | | | | | | | | | | | | -- 5e45aadfb89e366dedd1fcad5034a76c5c10ad76 by James Y Knight <jyknight@google.com>: Correct the conditions for std::{optional,variant,any} availability on Apple platforms. Before XCode 12.5, the availability declarations incorrectly excluded one release on which the features were in fact available. This was corrected in https://github.com/llvm/llvm-project/commit/7fb40e1569dd66292b647f4501b85517e9247953 Unfortunately, we cannot simply switch abseil to the corrected versions, as that will cause build failures when using the older XCode toolchain. So, we check the version, and choose the correct set of versions for the toolchain in use. PiperOrigin-RevId: 407667302 -- 376fa06cde048e536e9447336b27bebf598ed4ea by Greg Falcon <gfalcon@google.com>: Cord implementation change: Add a new CordRepCrc node type. This is an implementation detail that will allow storing expected CRCs alongside cord data. This node is intended only to live at the top of Cord trees. PiperOrigin-RevId: 407587140 GitOrigin-RevId: 5e45aadfb89e366dedd1fcad5034a76c5c10ad76 Change-Id: Iea3ca001c0cbb4deec8286b5581b30dc172a9918
* Export of internal Abseil changesGravatar Abseil Team2021-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b by Martijn Vels <mvels@google.com>: Add common [container.requirements] type definitions to `CharRange` and `ChunkRange` The presence of these allow these range classes to be used in various utility functions which require some minimum type of container. For example, this change allows tests to use `EXPECT_THAT(cord.Chunks(), ElementsAre(...))` PiperOrigin-RevId: 406941278 -- 0c195f073632e21d9a4bce158047b2ba8551c2d1 by Evan Brown <ezb@google.com>: Use explicit exponential growth in SubstituteAndAppendArray. PiperOrigin-RevId: 406931952 -- afb043bccd809a55cab78abadb7548a057d9eda0 by Jorg Brown <jorg@google.com>: Use longer var names in macro to avoid clang-tidy warning PiperOrigin-RevId: 406930978 -- 80397e2604e6b3d929a34742c3a32581b34d3ac4 by Martijn Vels <mvels@google.com>: Add future kAppendBuffer and kPrependBuffer API trackers for Cordz sampling PiperOrigin-RevId: 406912759 -- e910ce919ef83933f08a690e8b7325c7cc5b6d5d by Martijn Vels <mvels@google.com>: Implement Prepend(string_view) in terms of PrependArray(string_view, MethodIdentifier). PiperOrigin-RevId: 406891665 -- c9cff43d4c0568ed01f2fca0f6ef038ae03112b5 by Martijn Vels <mvels@google.com>: Add 'Rebuild' logic to CordRepBtree There are btree hostile scenarios where an application could perform repeated split/insert/merge operations on a cord leading to a tree exceeding the maximum height. While this should be rare in practice, this change adds a Rebuild() method that will rebuild a tree with a 100% fill factor, and we will invoke this rebuild when a tree exceeds the maximum height. This basically follows the similar 'balance' logic in Concat trees (although the latter is common in Concat uses) PiperOrigin-RevId: 406875739 -- 5b2b8fb88f1ebfdc1c670088152da2cb2ea4c376 by Martijn Vels <mvels@google.com>: Add 'in place' enabled RemoveSuffix An in-place RemoveSuffix is more efficient than SubTree() as it can directly modify privately owned nodes and flats allowing easy re-use of free capacity in right-most flats that may turn into Substring edges when using SubTree. PiperOrigin-RevId: 406431230 -- f09903c0a3d7344f59aaf1380a16ea10829217d4 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 406430373 -- 9957af575c33bb18dc170572a4ee8cc5901df6b2 by Greg Falcon <gfalcon@google.com>: Initial groundwork to allow storing checksum data inside CordRep instances. This uses a RefcountAndFlags bit that was reserved for this purpose, and will be leveraged in a follow-up change to allow attaching checksums to a Cord's value. This change splits RefcountAndFlags::IsOne() into two distinct operations: * IsOne(): This returns true when the associated CordRep is not shared with other threads. This is useful for functions that consume CordRep instances; for example, code that consumes an unshared CordRep can assume ownership of its children without modifying those refcounts. * IsMutable(): This returns true when the associated CordRep reference is not shared with other threads, *and* does not store an associated checksum value. This is useful for functions that modify a CordRep's contents: code may modify the bytes of a mutable-unshared CordRep without fear of races with other threads, or of invalidating a stored checksum. The tricky part of this CL is ensuring that the correct choice between IsMutable() and IsOne() was made at each point. An incorrect application of IsOne() could lead to correctness bugs in the future. Code conditioned on IsOne() may delete the CordRep in question, or assume ownership of its children, but must not modify the CordRep's data without explicitly adjusting the CRC. PiperOrigin-RevId: 406191103 -- 686544814079e5ab6d4593cca0c068b510be400a by Martijn Vels <mvels@google.com>: Reduce the size in the LargeString test when running with Sanitizers PiperOrigin-RevId: 406186945 -- 735b4490bdb695c35731f06ce4b8de14ce2be6ed by Alex Strelnikov <strel@google.com>: Release absl::SimpleHexAtoi. PiperOrigin-RevId: 406143188 GitOrigin-RevId: f49e405201d2ffd5955503fa8ad0f08ec0cdfb2b Change-Id: Ic6527ac40fa03ea02ca813e8bb7868a219544de4
* Export of internal Abseil changesGravatar Abseil Team2021-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- b008f3aaab60f1f0eb5987b50336543cca7151be by Martijn Vels <mvels@google.com>: Enable Cord Btree as the default Cord implementation. The Cord Btree implementation has been extensively tested by google. This changes makes the Cord Btree implementation the default implementation. This change should have no impact on current use cases and does not effect any public API or behavior. PiperOrigin-RevId: 403966449 -- 3d82052b5819d1244942c59d5cb4e51d75ada287 by Derek Mauro <dmauro@google.com>: Add missing CMake alias for gmock_main. Remove unused variable ABSL_TEST_COMMON_LIBRARIES Fixes #709 Fixes #1043 PiperOrigin-RevId: 403950358 -- 86695f6d06915b56d807303c37ee81487998cd58 by Abseil Team <absl-team@google.com>: FunctionRef is cheaper to construct than a std::function, and the argument is only used during the call, so this is safe. This has the added advantage of allowing the caller to provide a non-movable callable, which can't be converted to a std::function. PiperOrigin-RevId: 403457615 -- 196c1109ba519d4ff00c856bbb4bff754468359f by Abseil Team <absl-team@google.com>: Internal optimization. PiperOrigin-RevId: 403413291 GitOrigin-RevId: b008f3aaab60f1f0eb5987b50336543cca7151be Change-Id: I1665f0efd484f53e0ed22d8940ef2fa60b03cc5b
* Export of internal Abseil changesGravatar Abseil Team2021-08-18
| | | | | | | | | | | | | | | | | | | | | | -- 84bcdcd9497d1ec989f50c8dee93f656507c7bd6 by Abseil Team <absl-team@google.com>: Reduce length of the `flat_hash_map<std::string, V>` type name in order to reduce binary bloat. PiperOrigin-RevId: 391560997 -- 5f49bd435e066989851dc045c7786ef400413f66 by Greg Falcon <gfalcon@google.com>: Claim a bit from the Cord refcount for future use. Also rename the increasingly-inaccurately named "Refcount" class to "RefcountAndFlags". In optimized builds, this adds an extra mask instruction to decrement and test operations, but no new branches. Future flags can be added at no extra cost. Each additional flag will of course reduce the range of our refcount, but even with the bit added, we still support refcounts of 500 million. PiperOrigin-RevId: 391557567 GitOrigin-RevId: 84bcdcd9497d1ec989f50c8dee93f656507c7bd6 Change-Id: I051823bf5a9a42d4fa9200e39563ab585ecab331
* Export of internal Abseil changesGravatar Abseil Team2021-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 77cd6291781bc39e8472c706163d6951fe2ae573 by Derek Mauro <dmauro@google.com>: absl::uint128: Use intrinsics for more operations when available This change also inlines the division and modulus operators when intrinsics are available for better code generation. Fixes #987 PiperOrigin-RevId: 389895706 -- fa23339584599e07ebcb4d0a857e2553b017757c by Abseil Team <absl-team@google.com>: only hide retired flags if human-readable output is requested PiperOrigin-RevId: 389835452 -- f1111f2b88359d4b253d4d81681c8a488458a36e by Martijn Vels <mvels@google.com>: Add helpers IsFlat(), IsExternal(), etc to improve readability PiperOrigin-RevId: 389779333 -- 785b8712261e41695ebeeb64b4317f93b37adc11 by Martijn Vels <mvels@google.com>: Split off 'concat' and 'btree' RepMemoryUsageLeaf and RepMemoryUsageDataEdge PiperOrigin-RevId: 389701120 -- 5264bffebffc2b377bf7e18f0ce69a3ed38c6629 by CJ Johnson <johnsoncj@google.com>: Eagerly destroy `Callback` in `absl::Cleanup` PiperOrigin-RevId: 389678813 -- a05312f0668458e97c50ca932c8f974c1508ebf2 by Abseil Team <absl-team@google.com>: Have one instance of empty_group per program, rather than one per translation unit. https://stackoverflow.com/questions/185624/static-variables-in-an-inlined-function PiperOrigin-RevId: 389185845 GitOrigin-RevId: 77cd6291781bc39e8472c706163d6951fe2ae573 Change-Id: Iac8d9cb27707a9562c831c77a552d1fb4bb0405f
* Export of internal Abseil changesGravatar Abseil Team2021-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 93c607726d663800b4bfa472cba043fd3f5d0e97 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 389158822 -- 55b3bb50bbc168567c6ba25d07df2c2c39e864af by Martijn Vels <mvels@google.com>: Change CordRepRing alternative implementation to CordRepBtree alternative. This changes makes CordRepBtree (BTREE) the alternative to CordRepConcat (CONCAT) trees, enabled through the internal / experimental 'cord_btree_enabled' latch. PiperOrigin-RevId: 389030571 -- d6fc346143606c096bca8eb5029e4c429ac6e305 by Todd Lipcon <tlipcon@google.com>: Fix a small typo in SequenceLock doc comment PiperOrigin-RevId: 388972936 -- e46f9245dce8b4150e3ca2664e0cf42b75f90a83 by Martijn Vels <mvels@google.com>: Add 'shallow' validation mode to CordRepBtree which will be the default for internal assertions. PiperOrigin-RevId: 388753606 -- b5e74f163b490beb006f848ace67bb650433fe13 by Martijn Vels <mvels@google.com>: Add btree statistics to CordzInfo, and reduce rounding errors PiperOrigin-RevId: 388715878 -- 105bcbf80de649937e693b29b18220f9e6841a51 by Evan Brown <ezb@google.com>: Skip length checking when constructing absl::string_view from `const char*`. The length check causes unnecessary code bloat. PiperOrigin-RevId: 388271741 -- bed595158f24839efe49c65ae483f797d79fe0ae by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 387713428 GitOrigin-RevId: 93c607726d663800b4bfa472cba043fd3f5d0e97 Change-Id: I2a4840f5ffcd7f70b7d7d45cce66f23c42cf565f
* Export of internal Abseil changesGravatar Abseil Team2021-07-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 007ce045d5d38a727ededdb5bf06e64785fd73bd by Martijn Vels <mvels@google.com>: Add `cord_enable_btree` feature flag (default false). PiperOrigin-RevId: 383729939 -- 98e7dc6a0407b0fd7b8713d883cdb3a766e0583d by Benjamin Barenblat <bbaren@google.com>: Eliminate some byte swapping from randen_slow Stop swapping bytes when serializing randen_slow’s Vector128 into and out of memory. Instead, simply index different bytes in the AES round function. This requires byte swapping the te{0..3} lookup tables, but it produces an 8% speedup on my Xeon W-2135. PiperOrigin-RevId: 383689402 -- 180b6bf45049188840d439b16a28e6b968669340 by Evan Brown <ezb@google.com>: Minor simplification in drop_deletes_without_resize() - save probe_offset outside the lambda. Also, add some consts, avoid an auto, and use lambda capture by value instead of reference. I realized that the compiler can already optimize this - https://godbolt.org/z/Wxd9c4TfK, but I think this way makes the code a bit clearer. PiperOrigin-RevId: 383646658 -- 781706a974c4dc1c0abbb6b801fca0550229e883 by Martijn Vels <mvels@google.com>: Change storage to contain 3 bytes. As per the comments in the code, this allows us to utilize all available space in CordRep that may otherwise be 'lost' in padding in derived clases. For the upcoming CordrepBtree class, we want a strong guarantee on having a 64 bytes aligned implementation. PiperOrigin-RevId: 383633963 -- 8fe22ecf92492fa6649938a2215934ebfe01c714 by Derek Mauro <dmauro@google.com>: Remove reference to str_format_arg.h, which no longer exists PiperOrigin-RevId: 383517865 -- 79397f3b18f18c1e2d7aea993b687329d626ce64 by Benjamin Barenblat <bbaren@google.com>: Use absl::uint128 for AES random number generator Replace randen’s internal 128-bit integer struct, u64x2, with absl::uint128. This eliminates some code and improves support for big-endian platforms. PiperOrigin-RevId: 383475671 GitOrigin-RevId: 007ce045d5d38a727ededdb5bf06e64785fd73bd Change-Id: Ia9d9c40de557221f1744fb0d6d4d6ca7ac569070
* Export of internal Abseil changesGravatar Abseil Team2021-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 1620e8ffaa93ef24510ca60c7fff2a07248ac9f6 by Abseil Team <absl-team@google.com>: Update comment. PiperOrigin-RevId: 382858259 -- 20db116f28469149d10e0f7f8b976cb903dd4879 by Gennadiy Rozental <rogeeff@google.com>: Add benchmark running on multiple flags. Update size_tester to include cost of absl::GetFlag call. Add size_tester invocation for bool flag. New benchmark better represent GetFlag usage. PiperOrigin-RevId: 382820341 -- 2e097ad3811c4e329f75b98877a5e74c1d3d84fd by Abseil Team <absl-team@google.com>: Avoid 64x64->128 multiplication in absl::Hash's mix on AArch64 On AArch64, calculating a 128-bit product is inefficient, because it requires a sequence of two instructions to calculate the upper and lower halves of the result. So calculate a 64-bit product instead. Making MultType 64-bits means the upper 32 bits of the result do not participate in shift/xor, but the add/multiply gives us sufficient mixing. PiperOrigin-RevId: 382625931 -- f3ae3f32cb53168c8dc91b766f2932dc87cec503 by Abseil Team <absl-team@google.com>: Remove homegrown Round implementation absl/time/duration.cc defined a Round implementation to accommodate old versions of MSVC that lacked std::round(long double). Abseil no longer supports those MSVCs, so we don’t need the homegrown implementation anymore. Remove it, and replace calls to it with std::rint. PiperOrigin-RevId: 382605191 -- a13631c91bf5478289e1a512ce215c85501a26f7 by Martijn Vels <mvels@google.com>: Move the Consume() conversion functions out of cord_rep_ring into cord_rep_consume. This makes these functions generic, so we can repurpose these for the new Btree conversion functions. PiperOrigin-RevId: 382594902 -- 7394c737500c2d8371fcf913b21ad1b321ba499d by Benjamin Barenblat <bbaren@google.com>: Remove homegrown Round implementation absl/time/duration.cc defined a Round implementation to accommodate old versions of MSVC that lacked std::round(long double). Abseil no longer supports those MSVCs, so we don’t need the homegrown implementation anymore. Remove it, and replace calls to it with std::rint. PiperOrigin-RevId: 382569900 -- d72a761f43dc5c9b9510c3a1363177ed26646b5d by Abseil Team <absl-team@google.com>: Prefer `getentropy` for Emscripten. It needs a different header, so I've separated it out from the GLIBC check above. PiperOrigin-RevId: 382332475 -- 74e261dbb467741b2ddd8b490e04c531fdd2f559 by Martijn Vels <mvels@google.com>: Add BTREE tag for CordRepNode implementing a Btree cord. This change only forward declared the CordRepBtree class (not implemented yet) and defines the enum value BTREE. While RING and BTREE should never co-exist, we define a new value for BTREE so as not to make transitioning between RING and BTREE harder than it needs to be. This changes shifts the FLAT value / computation from FLAT = 4 to FLAT =5 PiperOrigin-RevId: 382326710 GitOrigin-RevId: 1620e8ffaa93ef24510ca60c7fff2a07248ac9f6 Change-Id: Ia8f99dde3874808f56062bd37ab3e63764099734
* Export of internal Abseil changesGravatar Abseil Team2021-06-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- b1fc72630aaa81c8395c3b22ba267d938fe29a2e by Derek Mauro <dmauro@google.com>: Fix -Wdeprecated-copy warnings from Clang 13. Example: error: definition of implicit copy assignment operator for 'UDT' is deprecated because it has a user-declared copy constructor [-Werror,-Wdeprecated-copy] PiperOrigin-RevId: 380058303 -- 0422744812b1a2010d9eea5b17fbe89f3441b66b by Evan Brown <ezb@google.com>: Change the "full table!" asserts in raw_hash_set to use `<= capacity` instead of `< capacity`. If we add support for non-power-of-two-minus-one capacities, this is the correct thing to assert. For example, consider: Group::kWidth = 8, capacity_ = 8, ctrl_ = {kEmpty, 1, 2, 3, 4, 5, 6, 7, kSentinel, kEmpty, 1, 2, 3, 4, 5, 6}. In this case, if we do an unsuccessful lookup with H2 mapping to slot 1, then the first Group will contain {1, 2, 3, 4, 5, 6, 7, kSentinel} so we need to continue to the second Group (at which point seq.index() == 8 == capacity_) to find a kEmpty. Note: this is a no-op change for now since we never have `capacity % Group::kWidth == 0`. PiperOrigin-RevId: 380033480 -- 40628c34d540356de65fabb16c1439c0ec7a0764 by Abseil Team <absl-team@google.com>: Drop out-of-date documentation about `absl::FixedArray`'s allocator support PiperOrigin-RevId: 379811653 -- e7ad047863ae55c9b7aec0753cfc527a4ea614bc by Evan Brown <ezb@google.com>: Fix a bug in ConvertDeletedToEmptyAndFullToDeleted in which we were copying 1 more cloned control byte than actually exists. When alignof(slot_type)>1, this wouldn't cause a problem because the extra byte is padding. Also change loop bounds to not rely on the fact that capacity_+1 is a multiple of Group::kWidth. PiperOrigin-RevId: 379311830 -- 1a3ba500fb2c33205854eb9258cd6e0fb1061bca by Martijn Vels <mvels@google.com>: Change Ring, EXTERNAL and FLAT tag values to be consecutive values The purpose of this change is to have FLAT = EXTERNAL + 1. Especially in the ring and btree alternative code, there is a common check if a node is a 'plain' edge (EXTERNAL or FLAT), or 'something else'. This change can make that check a single branch, i.e., instead of 'tag == EXTERNAL || tag >= FLAT', we can simply check for 'tag >= EXTERNAL'. Likewise we have some cases where we check for RING, EXTERNAL or FLAT, so we align RING + 1 with EXTERNAL. PiperOrigin-RevId: 379291576 -- 0c78e65ca4d85244b106c3f8e24cf268e09e72a3 by Benjamin Barenblat <bbaren@google.com>: Round a double multiplication before casting it to integer The code static_cast<int>(x * y) (for double x and y) performs a double multiplication into a temporary that, by standard, may have excess precision. The subsequent cast to int discards the excess precision. However, the cast may examine the excess precision during conversion, producing surprising results like static_cast<int>(1.7 * 10) == 16 on certain systems. Correct this case by explicitly rounding 1.7 * 10 before casting it. PiperOrigin-RevId: 378922064 GitOrigin-RevId: b1fc72630aaa81c8395c3b22ba267d938fe29a2e Change-Id: Ica708a006921118673e78d5fd2d61fe0fb0894d1
* Export of internal Abseil changesGravatar Abseil Team2021-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 51e9291d9bc385082b4061fe760b236ba59c79c3 by Abseil Team <absl-team@google.com>: Cast to uint64_t using braces instead of parentheses. PiperOrigin-RevId: 372475909 -- 939fc409855da2639dcaf2d1d4971ca0e0568d03 by Martijn Vels <mvels@google.com>: Expand # flat nodes into size detailed counters. PiperOrigin-RevId: 372474608 -- 54b158c99b32f8a14821ce74fed0f9f836525ce7 by Martijn Vels <mvels@google.com>: Make copies of sampled cords sampled as well This applies to the following methods: - Cord(const Cord&) - operator=(const Cord&) - Subcord(...) PiperOrigin-RevId: 372468160 -- 876c2581ce008871464e8b471efbb967d150f83b by Andy Getzendanner <durandal@google.com>: Document the type of an ABSL_FLAGS.OnUpdate() callback. PiperOrigin-RevId: 372406390 GitOrigin-RevId: 51e9291d9bc385082b4061fe760b236ba59c79c3 Change-Id: Ifb75122cae56b66c28128aee90a63bbb28d93817
* Export of internal Abseil changesGravatar Abseil Team2021-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9e0df3dd23da17cd0ff75c93c1493a858032639c by Martijn Vels <mvels@google.com>: Prep work for changing Cordz instrumentation Create CordzInfo::TrackCord() and CordzInfo::MaybeTrackCord() methods on InlineData This follows a suggestion from kfm@ to move where possible Cordz logic out of Cord and Cord::InlineRep, which we can now that InlineData provides us the abstraction of Cords internal data. PiperOrigin-RevId: 369844310 -- 45f39709033bd3bc09fa1a7880a5b3c9eaa617c7 by Abseil Team <absl-team@google.com>: Fix dependence on C++20 constexpr default construction of std::atomic. PiperOrigin-RevId: 369745251 -- 195ae230963c95068406ab0e73b4e711b5f3cd62 by Martijn Vels <mvels@google.com>: Reduce the cost of 'SetCordRep()` This change inlines SetCordRep(), which is currently two stores and a branch, going forward a naked store. AssertHeld is only enforced for debug builds. The intention here is not to reduce the 'actual' (or 'self') cost of SetCordRep() as it should only be called for sampled cords, but to reduce the cost of a branch and out of line call at the call site. The compiler can now 'perfectly inline' the single branch / store. PiperOrigin-RevId: 369696265 -- d722199ed69d413994740624159ac7bd001a9219 by Martijn Vels <mvels@google.com>: Add kDefaultInit initialization This avoids double store on init PiperOrigin-RevId: 369655217 -- 3499aed79e6cc12ce36277063ec37991bba0cccd by Martijn Vels <mvels@google.com>: Introduce CordzUpdateScope PiperOrigin-RevId: 369491326 -- 325c1bc99c7d1aeca7bd1273e51a0900b6faf731 by Abseil Team <absl-team@google.com>: make unary and logical operators constexpr PiperOrigin-RevId: 369476773 -- ad3bed3dea5e5d7d281ff36ee786f802630c3728 by Martijn Vels <mvels@google.com>: Add LOCKABLE attribute to CordzInfo PiperOrigin-RevId: 369476772 GitOrigin-RevId: 9e0df3dd23da17cd0ff75c93c1493a858032639c Change-Id: I00e2859328fe8da46d2e04d3f07dfe70ec6cb1f5
* Export of internal Abseil changesGravatar Abseil Team2021-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 8e3ed8c8f770f9371f037e4956334b6e38525e91 by Abseil Team <absl-team@google.com>: Remove legacy, non-standard sanitizer macros. PiperOrigin-RevId: 367079577 -- c06aa9b9c20ba2e87dfc6933bbf8a30e0502d70a by Martijn Vels <mvels@google.com>: Remove kFakeCordzInfo and last caller to set_profiled() These have all been superseded by clear_cordz_info() and set_cordz_info() PiperOrigin-RevId: 367020835 -- e0bd3e4e0b46db495663261a1664815eb94999f8 by Abseil Team <absl-team@google.com>: AbseilConfigureCopts.cmake: fix AppleClang detection restore use of MATCHES in comparison with "Clang"; this was lost in: commit 22771d471930ce88e1e75d0ca9dd8c65a7b0f895 ... 24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>: Fixes failing CMake string comparisons https://cmake.org/cmake/help/latest/policy/CMP0054.html fixes: CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message): Unknown compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++. Building with no default flags Fixes #930 PiperOrigin-RevId: 366879337 GitOrigin-RevId: 8e3ed8c8f770f9371f037e4956334b6e38525e91 Change-Id: I7b027b7e82491676b59dc9d23cfe063ea6004d3b
* Export of internal Abseil changesGravatar Abseil Team2021-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4ff721439234e91caf6f7b772e5f554e7dd423c8 by Benjamin Barenblat <bbaren@google.com>: Remove endian-sensitivity from hash slow path Prior to this commit, the Abseil hash fast path was endian-agnostic, but the slow path assumed a little-endian platform. Change the slow path to be endian-correct, ensuring that values produced by the fast and slow paths are equal even on big-endian systems. PiperOrigin-RevId: 355424258 -- 7f4fe1aa4de46ad0a2ef19fa9c061fc12a7391ed by Abseil Team <absl-team@google.com>: Directly store CordzInfo in the InlineData data contents of InlineRep This greatly reduces the cost of coping and moving cords. Especially the move constructor and move assignment are now back to lean loads and stores without needing any CordzInfo lookups for tracked cords. PiperOrigin-RevId: 355409161 -- 3ca4ca84ed6d98f1e383ffd8d12c28876e905bb3 by Abseil Team <absl-team@google.com>: Add #include <unordered_map> PiperOrigin-RevId: 355386114 -- 30b0ffad0621971b3135148fcc9e183b0dd2a6bb by Abseil Team <absl-team@google.com>: Optimize Cord copy constructor This change avoids double stores of the Cord copy constructor from the zero init of the InlineData / InlineRep contents followed by the assignment and inlines the copy constructor. PiperOrigin-RevId: 355287939 -- 0c043fa7b6e41ca7cefc5edc1e17ad46223e4e77 by CJ Johnson <johnsoncj@google.com>: Now that the absl::Cleanup example returns absl::Status, since we decided on absl::FailedPreconditionError, the precondition should be a positive statement and then the check should be failure to adhere to that positive statement PiperOrigin-RevId: 355216923 -- 9ed922ca5d28fe8790ec6bc0837cf39fbcc92896 by Gennadiy Rozental <rogeeff@google.com>: Do not set mvsc linker flags for clang-cl (fixes #874) Import of https://github.com/abseil/abseil-cpp/pull/891 PiperOrigin-RevId: 355199380 GitOrigin-RevId: 4ff721439234e91caf6f7b772e5f554e7dd423c8 Change-Id: I3d9d2383549720d7a91f9108dfcd979ad6632fce
* Export of internal Abseil changesGravatar Abseil Team2021-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- cea62ebc5d31c62aabcb94c066d9be506f34baf6 by Abseil Team <absl-team@google.com>: Fix typo in `Cord::EndsWith()` docs PiperOrigin-RevId: 355023067 -- f89225a55476478ec167be50dea543f5414836f9 by Abseil Team <absl-team@google.com>: Add set_cordz_info() and get_cordz_info() methods to InlineData This change has preparations for future (optional) integration of CordzInfo sampling data into Cord's InlineData for non inlined cords. PiperOrigin-RevId: 354965340 -- 324057574aeb697bd3327cb905eb5bca16ade768 by Abseil Team <absl-team@google.com>: Fix two comment typos. PiperOrigin-RevId: 354952568 -- 5bb93ca3d57ead3633e1efde4aa28718987ef64f by CJ Johnson <johnsoncj@google.com>: Clarify doc comment for absl::Cleanup by using absl::Status return type and clarify the engaged state by surfacing the initial value in the public header. PiperOrigin-RevId: 354935253 -- ec95424594b24a1aec9bf7972b2355f37285506a by Abseil Team <absl-team@google.com>: Remove `preserve_most` attribute from CordRep::Destroy() PiperOrigin-RevId: 354921927 GitOrigin-RevId: cea62ebc5d31c62aabcb94c066d9be506f34baf6 Change-Id: Ibe1d66197db7ce9554594e07b1c6e7c6dea3c9da
* Export of internal Abseil changesGravatar Abseil Team2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0 by Jorg Brown <jorg@google.com>: Add union padding to AsTree, to avoid issues on 32-bit MSVC 2015 compilers alignas() causes compiler errors as per https://godbolt.org/z/vaTKjn This change uses explicit padding to achieve what we want: https://godbolt.org/z/Mfjhhj PiperOrigin-RevId: 353211413 -- b1ac7430ffdefe58c01b29e9acd182cda4630e1d by Jorg Brown <jorg@google.com>: Make the casting functions flat() and ring() be static_cast, rather than reinterpret_cast. PiperOrigin-RevId: 353149543 -- c37a6761c31720317c8b0b7db62b693643a88586 by Abseil Team <absl-team@google.com>: Integrate CordRepRing logic into cord (but do not enable it) PiperOrigin-RevId: 353135656 -- 2007fd3045ed6285106795cf8f2e6d792922f5e8 by Abseil Team <absl-team@google.com>: Fix a typo in the description of ::equal_range(). The correct return is actually a half-open range [first, last). PiperOrigin-RevId: 353122213 -- 6683fa2ba7271dd1f575bd7742d97f47a034c9d2 by Abseil Team <absl-team@google.com>: Integrate CordRepRing logic into cord (but do not enable it) PiperOrigin-RevId: 353121763 GitOrigin-RevId: cfd7ee2487ed9b5636d8f83d3850c02e3b4a5cb0 Change-Id: I6635163cd634706f5462c4065aa278e6bf193a72
* Export of internal Abseil changesGravatar Abseil Team2021-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3b43586da865534cf86401d2cae09c65c60b8474 by Abseil Team <absl-team@google.com>: Introduce CordRepRingReader class PiperOrigin-RevId: 353070937 -- 0bff6e4bcca34fdd1e6610da5fb3c37fd49b2940 by Abseil Team <absl-team@google.com>: Fix docstring typo "Exmaple" -> "Example" PiperOrigin-RevId: 352927688 -- 1ef4e0a1100cfa7bc9d9e8f155acf0e469348b56 by Abseil Team <absl-team@google.com>: Refactor tree initialization of ChunkIterator and CordReader PiperOrigin-RevId: 352916786 -- 919c3eb175b87294184a405785eef4fab520d47e by Abseil Team <absl-team@google.com>: Disable `preserve_most` when compiling with sanitizers. PiperOrigin-RevId: 352890630 GitOrigin-RevId: 3b43586da865534cf86401d2cae09c65c60b8474 Change-Id: I8a733494b353af69a46862a4019a7f9b40148f49
* Export of internal Abseil changesGravatar Abseil Team2021-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 642ab296a2c9629c44f3f2ce6911cd2488bcf416 by Derek Mauro <dmauro@google.com>: Remove an obsolete check in CMakeLists.txt PiperOrigin-RevId: 352852564 -- ce78cb96bcfd162737dbcf35005da3d1d6a3486b by Abseil Team <absl-team@google.com>: Clarify that the calling *thread* must have locked the mutex in order to unlock it. PiperOrigin-RevId: 352801804 -- 24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <dmauro@google.com>: Fixes failing CMake string comparisons https://cmake.org/cmake/help/latest/policy/CMP0054.html Fixes #791 PiperOrigin-RevId: 352791054 -- 0ac10bc3f4dca2c4c4b51d7b8196a2eaee9537a1 by Abseil Team <absl-team@google.com>: Introduce CordRepRing class This change introduces the CordRepRing class that implements all the lower level / internal implementation for upcoming CordRepRing ring buffer support in cord. PiperOrigin-RevId: 352771994 -- 4bd36dda61760785844f0f29f26d90cc18046f75 by Abseil Team <absl-team@google.com>: Optimize InlineData representation for cord sampling (cordz) This CL changes InlineData to allow us to store a (future) Cordz Info pointer directly into the inline representation: - make InlineData a class that provides a public API to set the active union members (tree or chars) and safely access that data. - change 'tree' and 'profiled' bits to be the 2 least significant bits, allowing us 62 continquous bits for storing a Cordz Info pointer. PiperOrigin-RevId: 352642411 -- dc55ba71bbce0e6a83e05a453990c51ac3d68426 by Mark Barolak <mbar@google.com>: Add unit test coverage for the mutating overload of absl::AsciiStrToLower. PiperOrigin-RevId: 352626006 GitOrigin-RevId: 642ab296a2c9629c44f3f2ce6911cd2488bcf416 Change-Id: I6c5929dd830d3c630e14e7fd5387fc3e25a69100
* Export of internal Abseil changesGravatar Abseil Team2021-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- a0491c8d790972cd80e2d720fe1fdf5f711a6f1a by Greg Falcon <gfalcon@google.com>: Stop directly accessing CordRepFlat data via CordRep::data. The old pattern of access breaks the `CordRep` type abstraction; since `CordRep::data` is not in general guaranteed to contain the chunk's data, we shouldn't access it that way. This incidentally adds an assertion check (via the flat() accessor) that the CordRep is indeed flat on each such access, but a manual inspection of the code, as well as the fact that this code currently works, suggest that this is always true.) PiperOrigin-RevId: 351592344 -- f40c3b43ca5b1d7e23cd45f1ffac1783105ac1a3 by Abseil Team <absl-team@google.com>: Revert 18abb2902b9f06c63a968b24d3dda785ebf99a22 PiperOrigin-RevId: 351523518 -- 18abb2902b9f06c63a968b24d3dda785ebf99a22 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 351512412 -- 9b881602d45e95e06089792c7627cd56528a255a by Abseil Team <absl-team@google.com>: Keep time's global state in a cacheline-aligned structure. Keeping the global state as separate global variables results in two issues: 1) False sharing with adjacent global data (e.g., cycle clock source), since the global fields are updated every O(10usec). 2) The hot global fields (e.g., seq and samples) can reside on different cache lines. To fix this, simply wrap the global data in a ABSL_CACHE_ALIGNED structure. This is similar to what we do for MutexGlobals. PiperOrigin-RevId: 351389466 GitOrigin-RevId: a0491c8d790972cd80e2d720fe1fdf5f711a6f1a Change-Id: Ie0fa80112043381cd37c84e2ab2b7334839f54b5
* Export of internal Abseil changesGravatar Abseil Team2020-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 0bfa836596a9c787a2f0bdc283011dd1f6810c6e by Benjamin Barenblat <bbaren@google.com>: Ignore missing CPU frequency on more architectures Linux on MIPS, PA-RISC, RISC-V, and SystemZ doesn’t expose the nominal CPU frequency via /sys, so don’t worry if `NominalCPUFrequency` returns 1.0 on those platforms. Some POWER machines expose the CPU frequency; others do not. Since we can’t predict which type of machine the tests will run on, simply disable testing for `NominalCPUFrequency` on POWER. PiperOrigin-RevId: 347079873 -- 492b6834ed4a07cbc3abccd846f7e37d8c556ee5 by Benjamin Barenblat <bbaren@google.com>: Use ABSL_HAVE_THREAD_LOCAL macro instead of copying code Reduce code duplication by checking the ABSL_HAVE_THREAD_LOCAL macro instead of copying code from base/config.h. PiperOrigin-RevId: 347079561 -- 8d656efce4da9cb032094377e58493d98427a536 by Abseil Team <absl-team@google.com>: Rollback PiperOrigin-RevId: 347078779 -- 221bc69ec6dd7e2777ffcff6942584f979ef6382 by Abseil Team <absl-team@google.com>: Add flag for 'shallow subcord' feature for experimental ring buffer rollout There is a potential trade-off of CPU cost vs over-sharing cord data for subcord of large cords. This flag allows making subcords shallow for ringbuffers (with a potential larger waste of referenced source cords), which allows us to make subcord fast for this apps that do no persist (unmodified / plain copied) sub cords. This change also introduces constants for the default settings, intended to keep the internal cord settings concistent with external flags. PiperOrigin-RevId: 347053271 -- 00a56c24293566734009f6bf2169a83fb37a35ba by Abseil Team <absl-team@google.com>: Revert the usage of variant<> in Cord iterator and reader. The introduction of the variant may lead to some missed compiler optimizations. PiperOrigin-RevId: 347053041 -- c7b7b5ed7e3ab46b1e75b80f1a7de0bda26c8f70 by Chris Kennelly <ckennelly@google.com>: Release library for integer power-of-2 functions and bit counting. PiperOrigin-RevId: 347035065 -- 5a035c0d9840b251967f9e7039fc6a4e01dd52f3 by Abseil Team <absl-team@google.com>: Restructure Cord::ChunkIterator for future ring buffer support. PiperOrigin-RevId: 346890054 GitOrigin-RevId: 0bfa836596a9c787a2f0bdc283011dd1f6810c6e Change-Id: I3a58e2a44cb4c6f2116c43e2a4ccbc319d3ccecf
* Export of internal Abseil changesGravatar Abseil Team2020-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 6e9f93888bbe6718997ed90bbd049f1f3572b066 by Abseil Team <absl-team@google.com>: Fix status to be safe for self move assignment. PiperOrigin-RevId: 346815392 -- 35cae74a977f258e81dfbe925fb5a34cb6632036 by Gennadiy Rozental <rogeeff@google.com>: Eliminate unnecessary access to the global vars. PiperOrigin-RevId: 346777168 -- e7e786c243069060f5d6c1c945decb4b0b83f95b by Andy Getzendanner <durandal@google.com>: Internal change. PiperOrigin-RevId: 346685656 -- 4ccd41c48f1a83cfa20b3ea534f743dd7d788376 by Abseil Team <absl-team@google.com>: Move CordRep Ref() and Unref() logic into cord_internal.h This change moves Ref() and Unref() logic out of cord.cc into cord_internal. The main purpose is to make upcoming ring buffer changes easier to isolate from existing cord.cc code. Notice that this removes the nullptr check from Unref() and now requires it to be non null (which held true most times). We may need to rethink if the 'unref unlikely one' is the common case: are cordreps most likely shared? This may be something between 'root' and non root nodes, i.e., is it more likely for leaf / flat nodes in large cords to be shared than top level cordreps being shared? Vice versa? Benchmarks say that we mostly shouldn't care, the caveat being that atomic ops seem more expensive on upcoming archs (arcadia) so we should error on the side of an extra IsOne() branch saving us single owned atomic ops. PiperOrigin-RevId: 346676121 -- f0babab103b9e60d61ba09482d468985e43eceb3 by Samuel Benzaquen <sbenza@google.com>: Fix iterator based constructor and `.insert` members to only require EmplaceConstructible as the standard specifies. PiperOrigin-RevId: 346616707 -- 8f48eedda02277f9c96a88ed7726e34b557cce20 by Evan Brown <ezb@google.com>: Fix a bug in binary_search_impl when there's a transparent, three-way comparator that has different equivalence classes for different lookup types. Add a new can_have_multiple_equivalent_keys method to share the common logic for these cases. PiperOrigin-RevId: 346605948 -- 649183cb3cc9383431de9c81fb1c0f885d4001ae by Abseil Team <absl-team@google.com>: Add benchmark for accessing a Duration flag. PiperOrigin-RevId: 346594843 -- fefdb046520871af63ce2229e2f7cccfc0483dea by Abseil Team <absl-team@google.com>: Restructure CordReader for upcoming ring buffer changes. PiperOrigin-RevId: 346410642 -- 8b2f50e7da0ebab06ead5f94e366e984ca23cb6a by Abseil Team <absl-team@google.com>: Wire in an internal-only flag to toggle upcoming ring buffer changes on/off for experimentation. PiperOrigin-RevId: 346199111 GitOrigin-RevId: 6e9f93888bbe6718997ed90bbd049f1f3572b066 Change-Id: I8f34866b25a79209cb5448bbb28dd3044111d2e9
* Export of internal Abseil changesGravatar Abseil Team2020-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ff793052bd01e1e4fcf639f94d7c30c4855a9372 by Evan Brown <ezb@google.com>: Roll forward of btree_iterator refactoring. PiperOrigin-RevId: 346116047 -- 17984679f16e3e2139b0f14fa76f4a6ca16a3ef9 by Chris Kennelly <ckennelly@google.com>: Extend absl::StrContains to accept single character needles. Single characters are more efficient to search for. Extending this API allows the abseil-string-find-str-contains Clang Tidy to include this pattern. The C++ committee has adopted http://wg21.link/P1679 for inclusion in C++23. PiperOrigin-RevId: 346095060 -- ef20b31c501b1dcaa25e244fd8f8aa43dec09bd6 by Jorg Brown <jorg@google.com>: Internal change for cord ring PiperOrigin-RevId: 346087545 -- b70f2c1cb77fc9e733a126e790967d45c5fd1dc7 by Derek Mauro <dmauro@google.com>: Release layout_benchmark PiperOrigin-RevId: 345968909 -- 3a0eda337ee43622f92cfe14c2aa06f72dc71ee5 by Derek Mauro <dmauro@google.com>: Release raw_hash_set_probe_benchmark PiperOrigin-RevId: 345965969 -- abffdb4bb241a2264cb4e73a6262b660bb10447d by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 345733599 -- 7c9e24a71188df945be17fe98f700bdb51f81b16 by Derek Mauro <dmauro@google.com>: Release hash_benchmark PiperOrigin-RevId: 345721635 -- d68f33f17f9a8cd3f6da8eee3870bdb46402cdc8 by Derek Mauro <dmauro@google.com>: Release raw_hash_set_benchmark PiperOrigin-RevId: 345708384 -- 6e6c547d4d1327b226c0ffe8ff34d0aa103ce24b by Abseil Team <absl-team@google.com>: Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345548260 -- 1532424deda97d468444c217cc0fa4614099c7c1 by Evan Brown <ezb@google.com>: Rollback btree_iterator refactoring. PiperOrigin-RevId: 345543900 GitOrigin-RevId: ff793052bd01e1e4fcf639f94d7c30c4855a9372 Change-Id: I719831981fd056de41939f9addfee3d85e3b49b2
* Export of internal Abseil changesGravatar Abseil Team2020-11-30
| | | | | | | | | | | | | | | | | | -- d85f04af95a6fdafb102f7dc393d78d4431b47e5 by Abseil Team <absl-team@google.com>: Internal change for cord ring PiperOrigin-RevId: 344541196 -- 1ff57908e31a09ec0c98d8316da1263092cc3a1c by Abseil Team <absl-team@google.com>: Fix typo in comment. PiperOrigin-RevId: 344214280 GitOrigin-RevId: d85f04af95a6fdafb102f7dc393d78d4431b47e5 Change-Id: I58b3c28f62a5d10dd665b17d58a121f371e1260a
* Export of internal Abseil changesGravatar Abseil Team2020-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fcedaa5714efab8738446fa21620b827a40a3458 by Derek Mauro <dmauro@google.com>: Uses Wyhash in the implementation of absl::Hash for hashing sequences of more than 16 bytes on some platforms. Due to the per-process randomization of the seed used by absl::Hash, users should not notice this change, other than possibly getting better performance. This change only affects platforms where absl::uint128 is implemented with an intrinsic (and where sizeof(size_t)==8) since Wyhash relies on fast 128-bit multiplication for speed. PiperOrigin-RevId: 343956735 -- 085e108c760084f19caa21dbeb2118de2be3f8f0 by Abseil Team <absl-team@google.com>: Internal change for cord ring PiperOrigin-RevId: 343919274 -- 4c333278ad14d6692f203074b902506008ad624a by Jorg Brown <jorg@google.com>: Minimize strings_internal::StringConstant further, by removing the need for the compiler to instantiate a compile-time class function. PiperOrigin-RevId: 343878568 -- 71c3c8c7b7821b67997e3d5345aaec67f93f266f by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 343838259 GitOrigin-RevId: fcedaa5714efab8738446fa21620b827a40a3458 Change-Id: Ifb91895a82d11e743acd42fe97ab7fb70712b7df
* Export of internal Abseil changesGravatar Abseil Team2020-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 77c85460dc3c46593b231c5161ac55273bb0c7ef by Abseil Team <absl-team@google.com>: Support int128 in SimpleAtoi. PiperOrigin-RevId: 337946262 -- 0be53049ccf8309650e4e22f23b290e5f75ee828 by Gennadiy Rozental <rogeeff@google.com>: Update build scripts to use --mount instead of --volume to mount the host data into a container. This is somewhat more verbose, but more readable and flexible. More importantly this is what docker documentation is recomending to use now. PiperOrigin-RevId: 337898761 -- 3bc877f1679fdf61ecbf4365287a0403cfc9b53e by Samuel Benzaquen <sbenza@google.com>: Add Cord constructor for constinit instances. PiperOrigin-RevId: 337871148 -- 8b87701892b9c325e78ad4e8e4f16b785a744622 by Chris Kennelly <ckennelly@google.com>: Use the address of kSeed, rather than its value. We initialize kSeed with &kSeed, so these are equivalent, but kSeed requires a load from memory while &kSeed can be formed as a RIP-relative lea. PiperOrigin-RevId: 337868415 GitOrigin-RevId: 77c85460dc3c46593b231c5161ac55273bb0c7ef Change-Id: I3d06c18a123f1be29dad5801e8625952dc41cd95
* Export of internal Abseil changesGravatar Abseil Team2020-09-28
| | | | | | | | | | | | | | | | | | | | -- f50d25c8f8491ef7031cbbcad78edd15f98c2bd1 by Abseil Team <absl-team@google.com>: Add myriad2 to HAVE_MMAP Remove mutex_nonprod and associated defines. PiperOrigin-RevId: 333759830 -- 25ef4c577ea983aa3fcd6cfe2af6cdc62a06f520 by Samuel Benzaquen <sbenza@google.com>: Internal refactor. Represent the data with a union to allow for better constexpr support in the future. PiperOrigin-RevId: 333756733 GitOrigin-RevId: f50d25c8f8491ef7031cbbcad78edd15f98c2bd1 Change-Id: Ieecd2c47cb20de638726eb3f9fc2e5682d05dcca
* Export of internal Abseil changesGravatar Abseil Team2020-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 587e6db882749fa7faa12815e614afab04d218b9 by Derek Mauro <dmauro@google.com>: Use attribute detection for other sanitizer related attributes PiperOrigin-RevId: 324077073 -- 3ee55e4935b4235516b1fcac3c55945e510f7afc by Evan Brown <ezb@google.com>: Simplify CordRepExternal allocation/deallocation. I think this can save some memory when `Releaser` is empty and when on platforms where alignof(CordRepExternal) < (default `::operator new` alignment). We no longer need the API requirement that alignof(Releaser) <= (default `::operator new` alignment). Also remove another static_assert from a TODO in cord_internal.h and fix some warnings about calling std::move on a forwarding reference. PiperOrigin-RevId: 324053720 -- 9fc78436565eb3b204d4aa425ee3773354392f45 by Derek Mauro <dmauro@google.com>: Use auto-detected sanitizer attributes for ASAN, MSAN, and TSAN builds PiperOrigin-RevId: 323831461 GitOrigin-RevId: 587e6db882749fa7faa12815e614afab04d218b9 Change-Id: Ie0e4a2846d7f66988a2d81a5e50721b62fdb3d6d