We are also moving some internals into an internal header.
`HasAbslStringify` was not previously in an internal namespace but was intended
to be and has now been moved to an internal namespace. This is in adherence to
our compatibility guidelines which wave requirements for APIs within their
first 30 days of public release (See https://abseil.io/about/compatibility for
details).
PiperOrigin-RevId: 481190705
Change-Id: I4c0c348f269ea8d76ea3d4bd5a2c41cce475dc04
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
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
checking but can happen for incorrect formats parsed via ParsedFormat::New.
Specifically, if a user were to add length modifiers with 'v', for example the
incorrect format string "%hv", the ParsedFormat would incorrectly be allowed.
PiperOrigin-RevId: 480183817
Change-Id: I8510c13189fdf807cdaa7f2e1b7ed9fba2aaefb9
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
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: 470810568
Change-Id: Ibd316a7e62cc43cb198ba22daed565c9573ce235
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
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
This change introduces the symbol
ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL
to guard redundant declarations of static constexpr data
members that are needed prior to C++17.
This change also introduces the symbol
ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set
to the same value as __cplusplus, except it uses _MSVC_LANG
on MSVC so that the value is correct on MSVC.
Neither of these new symbols should be used outside of Abseil.
Fixes#1191
PiperOrigin-RevId: 453923908
Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862
The "deleted" overload error is useless to users. By passing some dummy string to the base class constructor we use a valid constructor and remove the unintended use of the deleted default constructor.
PiperOrigin-RevId: 452826509
Change-Id: I5430a373c8e7e3a13336d2c42899e0e59444620b
Without the change absl-cpp build fails on this week's gcc-13 snapshot as:
/build/abseil-cpp/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
34 | enum class FormatConversionChar : uint8_t;
| ^
| ::
--
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
--
ef2bf829c333f378ecc12f3259e3187cdb75a3d5 by Abseil Team <absl-team@google.com>:
debugging: fix the VDSO symbol name used for unwinding on RISC-V Linux
The name listed in `man vdso` is incorrect. Instead, use the name from `linux-5.16/arch/riscv/kernel/vdso/rt_sigreturn.S`
PiperOrigin-RevId: 439654174
Change-Id: Ib39d066f416681720068e806e828a2c76a14a532
--
43dfad824afd36cfc3e5049b4fea71a2bccb066c by Benjamin Barenblat <bbaren@google.com>:
Check printf format strings in str_format_convert_test
Add ABSL_PRINTF_ATTRIBUTE to appropriate functions in
strings/internal/str_format/convert_test. Correct
TypedFormatConvertTest.Char, which was accidentally passing values of
types larger than int to StrPrint.
PiperOrigin-RevId: 439388148
Change-Id: I6cde4e8e0c6455064138192430f07f4c990be0bc
--
f84b4ab2c3b070c8af0c82742ac7a8a4bf443bca by Derek Mauro <dmauro@google.com>:
Use __builtin_memcmp in the absl::string_view implementation
starting with MSVC 16.9, where it first appeared
This enables more constexpr operations
PiperOrigin-RevId: 439317316
Change-Id: Iaf1ce76b60901d4b2d5b96be5900c56572f57b15
GitOrigin-RevId: ef2bf829c333f378ecc12f3259e3187cdb75a3d5
--
b984c7c1cbee4253192c833046bfcfa16dca8ccf by Dino Radakovic <dinor@google.com>:
Restrict visibility of absl/flags:commandlineflag_internal
PiperOrigin-RevId: 438591894
Change-Id: I12a6392b2c7f9f1263c741dfd6c43ae22e903aad
--
81315601aab70bb6ac2d17655a727d7f9ee2ff95 by Justin Lebar <jlebar@google.com>:
Update example in str_join.h to use a lambda.
PiperOrigin-RevId: 438390035
Change-Id: Icc707b972e5a369a71ad774004fdf0a17a9b33a7
--
1c3c7921224e505faca8617b073f657d3737219f by Dino Radakovic <dinor@google.com>:
Internal change
PiperOrigin-RevId: 438386036
Change-Id: I6066da1b5a1ddf5af265944a31ed298297b4f2e1
--
2d6885f78481f04e0e7ee86060aec15b677144f3 by Abseil Team <absl-team@google.com>:
Internal change
PiperOrigin-RevId: 438378389
Change-Id: If70dd9114114eb44e85afccd521e7fb7e1436b88
--
7f8282ddee7fcd032e01cbfe65c11c2d166cceb8 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 438374554
Change-Id: I993367952af1dc83bd5aa0ae19a64c024f457fdd
--
ce65ba28f6031e45db8fa5118a05410f5166fd7a by Abseil Team <absl-team@google.com>:
Spelling gardening: Heterogeneous has an "e" after the "n".
PiperOrigin-RevId: 438374411
Change-Id: If1a9098a5d04338837998883739c7b555efa62b4
GitOrigin-RevId: b984c7c1cbee4253192c833046bfcfa16dca8ccf
--
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
--
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
--
7473df9e4922c589f6b27cf546aad097381ae552 by Martijn Vels <mvels@google.com>:
Make ABSL_ASSUME publicly available
PiperOrigin-RevId: 430540224
Change-Id: I760e2d86e3a0b676cd2a6d26e0225a77381e948f
--
c83e38bc421f715b3c1e20150c2f1ffe8e633028 by Abseil Team <absl-team@google.com>:
Alias absl::bind_front to std::bind_front if available
This avoids ambiguity between the two when enabling C++20.
PiperOrigin-RevId: 430486679
GitOrigin-RevId: 7473df9e4922c589f6b27cf546aad097381ae552
Change-Id: I1e9bba09a8946480ce10ddd28e86b6c86191d38c
--
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
--
ed829ac612f090375427c3488827c6e74deb2e3f by Derek Mauro <dmauro@google.com>:
Update latest GCC/Clang Linux tests to Bazel 5.0.0 and CMake 3.22.2
PiperOrigin-RevId: 429369775
--
76952303c4d942288c4e7657ffb5893cec54a132 by Martijn Vels <mvels@google.com>:
Optimize Cord::ChunkIterator now that CordRepConcat is removed
PiperOrigin-RevId: 429321455
--
dcd0d287793649aba9b98268c5783e449a34749f by Martijn Vels <mvels@google.com>:
Add IsDataEdge() and DataEdgeValue() helper functions.
This moves repetitive logic accessing data edges into its own header, and more strongly defines the notion of what a data edge is, enforcing the internal invariants. This will also be incorporated in optimized Cord iteration logic once CordRepConcat is totally removed from the Cord code.
PiperOrigin-RevId: 429307248
--
6a0903962155988085bf8656743fda9c4cdcba6c by Abseil Team <absl-team@google.com>:
Make it clear that the probability function given for the zipf distribution is unnormalized, i.e., sum(p(x) for x = 0..k) != 100%.
Quoting Section 7 of the paper cited in the comments, where this formula comes from (emphasis mine): "We will consider the two parameter generalization as defined in Dagpunar [1988] with the *unnormalized* probability function ..."
PiperOrigin-RevId: 429068258
--
3899ff6d444ba755148bc521a6ee031d9e9d4485 by Abseil Team <absl-team@google.com>:
Internal Changes
PiperOrigin-RevId: 428644856
--
319de702d2b537cbb76c4c71277ae89b349b162e by Benjamin Barenblat <bbaren@google.com>:
Support symbolization on PA-RISC
Null out supervisor bits in PA-RISC addresses before symbolizing, and
handle function descriptor tables correctly.
Change symbolize_test.cc to use 32-bit aligned addresses, allowing that
test to pass on PA-RISC.
PiperOrigin-RevId: 428590564
GitOrigin-RevId: ed829ac612f090375427c3488827c6e74deb2e3f
Change-Id: Ie01ff3b9365fd45e5a55f858038552679f3180d3
--
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
--
262f6992ee0553782531ad58dd7d8bcd6d0b7bb7 by Martijn Vels <mvels@google.com>:
Remove CordRepConcat uses in tests and CONCAT constants.
This change removes the creation and uses of CordRepConcat in unit tests, and replaces some remaining CONCAT constants with IsConcat() to make subsequent teardown of CordrepConcat uses easier.
PiperOrigin-RevId: 426932694
--
fd590f7e849ba8c5395c589ed3f762cd00affdc8 by Abseil Team <absl-team@google.com>:
Replace NULL and 0 with nullptr.
PiperOrigin-RevId: 426912932
--
183e5babc478748023f732a1608745a2a544c996 by Abseil Team <absl-team@google.com>:
Replace "span of time" with "amount of time" in the first comment line, to make it clearer that we're not talking about a duration that starts at a specific time.
PiperOrigin-RevId: 426691794
--
e28ca760f21505f1be55c7af336eb61d2f1b7fea by Martijn Vels <mvels@google.com>:
Add extra assertions on CordRepSubstring child nodes
PiperOrigin-RevId: 426369104
GitOrigin-RevId: 262f6992ee0553782531ad58dd7d8bcd6d0b7bb7
Change-Id: I7ffdaa2dc999a2117944c9abdb1565b6b6f48b59
--
4409b08e103d6e7041d18a4d431290cafe3650cf by Derek Mauro <dmauro@google.com>:
Workaround NVCC compile error in StringConstant
Based on a patch in TensorFlow:
da83132aba/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
--
dab53ef01a1c8ceebd1347a4918a0def0d7d4ce5 by Derek Mauro <dmauro@google.com>:
Migrate away from the remaining usages of GoogleTest's legacy TestCase API
and use the new TestSuite API instead
PiperOrigin-RevId: 424668744
GitOrigin-RevId: dab53ef01a1c8ceebd1347a4918a0def0d7d4ce5
Change-Id: I599de09f3349d18c2d74795b1f867fa6c99c3eed
--
7fbe730c56c0890f27df47f9ad4f0cfa600c6ad9 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 424639048
--
1825fcf704e45e881cdd1d2fe3eb2226f523f3cd by Derek Mauro <dmauro@google.com>:
Disable tests Table.EnsureNonQuadraticTopNXorSeedByProbeSeqLength and Table.EnsureNonQuadraticTopNLinearTransformByProbeSeqLength again
as they are (still) flaky
PiperOrigin-RevId: 424616745
--
e624119171d9bceec2f6df023b220a6642070cfb by Abseil Team <absl-team@google.com>:
Switch from *_TEST_CASE_P to *_TEST_SUITE_P gtest macros.
PiperOrigin-RevId: 424404790
--
a110698c10554fb1f640412db8cd7c5a38b7b8e8 by Abseil Team <absl-team@google.com>:
Remove extraneous newline in documentation.
PiperOrigin-RevId: 424328502
GitOrigin-RevId: 7fbe730c56c0890f27df47f9ad4f0cfa600c6ad9
Change-Id: I56fd8c7cecf65fe37cb4cf2dde70842867d637d7
--
7f5caec21a1a88db6486b8bc2e5f6d5baba076ed by Derek Mauro <dmauro@google.com>:
Tag absl::StatusOr with [[nodiscard]] when it is available
[[nodiscard]] provides better diagnostics on classes than the current
ABSL_MUST_USE_RESULT, which expands to
__attribute__((warn_unused_result))
Ideally we would make ABSL_MUST_USE_RESULT expand to [[nodiscard]], but
we would need to fix all code to build with [[nodiscard]] first.
PiperOrigin-RevId: 422628161
--
236be69f0f34ccaa3adc831075613847797e6557 by Jorg Brown <jorg@google.com>:
Make sure all of absl/strings compiles even with -Wsign-compare and -Wconversion warnings.
PiperOrigin-RevId: 422573904
--
005669883a8794e6d19dc4bbb4f0e18032e2fbc9 by Chris Kennelly <ckennelly@google.com>:
Include sampling stride in hashtable sampling data.
This allows us to weight each sample to control for our sampling rate.
PiperOrigin-RevId: 421886935
--
78046ce6b429b9f5b6c97b05e8448a791db93bbe by Abseil Team <absl-team@google.com>:
Use __builtin_bit_cast for absl::bit_cast when possible
This makes absl::bit_cast match the requirements of the standard when compiler support exists.
PiperOrigin-RevId: 421883999
--
f397461f4bbeabd32437df0f2275663aeb51adb2 by Derek Mauro <dmauro@google.com>:
Tag absl::Status with [[nodiscard]] when it is available
[[nodiscard]] provides better diagnostics on classes than the current
ABSL_MUST_USE_RESULT, which expands to
__attribute__((warn_unused_result))
Ideally we would make ABSL_MUST_USE_RESULT expand to [[nodiscard]], but
we would need to fix all code to build with [[nodiscard]] first.
PiperOrigin-RevId: 421825565
GitOrigin-RevId: 7f5caec21a1a88db6486b8bc2e5f6d5baba076ed
Change-Id: I760b45b68f6012809c70c2a584e4144a99f98733
--
389189dbb322df0d0468ab13edf7dc185dc63833 by Abseil Team <absl-team@google.com>:
absl str_format.h can compile with -Wconversion and -Wsign-compare
PiperOrigin-RevId: 420799960
--
762e5adc429fc143756c42fe92fe8073c87c075f by Abseil Team <absl-team@google.com>:
GetStackTraceWithContext: Fix min_dropped_frames when no frames are recorded
Previously, if there were still frames to skip, they would be included
in min_dropped_frames.
PiperOrigin-RevId: 420766341
--
7d4374b8eaa410f4f98ec03d6a8997dccadfb271 by Abseil Team <absl-team@google.com>:
absl::flags compiles with -Wconversion and -Wsign-compare
PiperOrigin-RevId: 420476807
--
5f00f7805419d725fa1ff57b388e4c0750d1d6b0 by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420282152
--
bd5471fc34956acf3888bf90287b2aee4415c96d by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420282033
--
61c78020804e4290e9b2fe151aeaf99b198716ee by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 420281867
--
dbe3aad24b65ea11664401a307ea3d2f28e8a7b9 by Derek Mauro <dmauro@google.com>:
Remove the incorrect test for the availability of [[nodiscard]]
It should have been ABSL_HAVE_CPP_ATTRIBUTE(nodiscard) instead of
ABSL_HAVE_ATTRIBUTE(nodiscard). As a result, some code is not
compliant with [[nodiscard]], so we cannot simply correct the availability
test.
Recommend that C++17-only code use the standard [[nodiscard] directly.
PiperOrigin-RevId: 420150702
GitOrigin-RevId: 389189dbb322df0d0468ab13edf7dc185dc63833
Change-Id: Idf6ebae3c4edd945c9032c7db3d0ab32d16e8078
--
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
--
e7f53dfbf809812e84770217777f81b6308a3084 by Abseil Team <absl-team@google.com>:
Add a parameter pack to absl profile to allow profiles to separate
dynamic data from static data that is available at constructor-time.
Background: `inline_element_size` is effectively constant, but there
is a data race between its initialization and its access. We had fixed that race by making
inline_element_size atomic. This CL changes `inline_element_size`
back to a non-atomic integer, and provides a way for all profiles to
provide Register()-time values.
PiperOrigin-RevId: 413960559
--
70234c5943f8e37e17c1d9c54d8ed61d39880abf by Chris Kennelly <ckennelly@google.com>:
Document that absl::FunctionRef does not allocate.
PiperOrigin-RevId: 413946831
--
3308ae571412c4be3cc32d088c6edac98ff2d1ed by Samuel Benzaquen <sbenza@google.com>:
Internal change
PiperOrigin-RevId: 413933619
--
1617093a730d055edcf7bc04fdd6509783f5f75d by Martijn Vels <mvels@google.com>:
Internal Change
PiperOrigin-RevId: 413778735
--
03ad683f059c806a6c8b04f5b79b2662c3df8c73 by Evan Brown <ezb@google.com>:
Unify btree erase_if definitions and optimize them so that we only do rebalancing once per leaf node.
PiperOrigin-RevId: 413757280
--
5ba402f70801938178e486617063f01c7862525d by Martijn Vels <mvels@google.com>:
Cleanup up cord sampling internals
PiperOrigin-RevId: 413755011
--
522da8f9d3e0f11630d89fb41952004742bc335a by Evan Brown <ezb@google.com>:
Add b-tree benchmark for erase_if.
Since this benchmark doesn't work for std:: containers before C++20, disable it for them.
PiperOrigin-RevId: 413740844
--
a690ea42de8ed4a761d00235d8b2fb7548ba9732 by Andy Getzendanner <durandal@google.com>:
Import of CCTZ from GitHub.
PiperOrigin-RevId: 413735737
GitOrigin-RevId: e7f53dfbf809812e84770217777f81b6308a3084
Change-Id: I4f9f9039ba92831bc48971964aa063244c9fed72
--
a9ea60e9c0ccd744b6f12fd021dbedfe826dfe84 by Matt Kulukundis <kfm@google.com>:
Add an internal hook to allow keeping flags in sync with global state.
Rollforward, except continue including hashtablez_flags.h in absl_flags.h so users don't break.
PiperOrigin-RevId: 412198044
--
183e5c440b68c797ce4a82102f94f41c97a14674 by Martijn Vels <mvels@google.com>:
Internal cleanups and changes
PiperOrigin-RevId: 412083793
--
3740faf7c5a2e1723e3c7e4d1b3f3db7cbec6e61 by Abseil Team <absl-team@google.com>:
Mark Cord::Clear() with the ABSL_ATTRIBUTE_REINITIALIZES attribute.
This prevents false positives in the clang-tidy check bugprone-use-after-move; it allows Clear() to be called on a moved-from Cord without any warnings, and the Cord will thereafter be regarded as initialized again.
PiperOrigin-RevId: 412082757
--
a730d3f4ba06b55ae50386920a0544592069ac01 by Abseil Team <absl-team@google.com>:
StrJoin: Support iterators that do not have an `operator->`
Allows using `StrJoin` with iterators that do not have an `operator->`.
The `operator->` requirement for input iterators was dropped in C++20.
PiperOrigin-RevId: 412066130
--
6773c0ced2caa6a7855898298faecc584f3997ec by Andy Soffer <asoffer@google.com>:
Rollback of internal hook for keeping flags in sync with global state.
PiperOrigin-RevId: 411895027
--
4e7016a2fb88ce97853ef85ad5b4f76998eacca1 by Matt Kulukundis <kfm@google.com>:
Add an internal hook to allow keeping flags in sync with global state.
PiperOrigin-RevId: 411867376
--
2a7d4056e467b6b5d8a7aa9398d6cb5454c10fc5 by Martijn Vels <mvels@google.com>:
Internal change
PiperOrigin-RevId: 411806932
GitOrigin-RevId: a9ea60e9c0ccd744b6f12fd021dbedfe826dfe84
Change-Id: Ib35bb7b40774979ed2ad205bbb1744b1085eae78
--
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
--
e400e8c3dc7190b83dec57be9d858ee44e146a42 by Martijn Vels <mvels@google.com>:
Optimize Cord destructor through CordRepBtree::Destroy
This change inlines tree destruction 2 levels at a time, special casing leaf and leaf + 1 levels.
Benchmarks shows this provides up to 8% speed up
PiperOrigin-RevId: 410953099
GitOrigin-RevId: e400e8c3dc7190b83dec57be9d858ee44e146a42
Change-Id: Ic1c123fa0fa2b13cb141ee7a6be155d9e57a0466
--
2130ba98c8359b08d97fb16d84dfd05687005dcf by Abseil Team <absl-team@google.com>:
Tweaking the documentation of c_all_of to state the effect more directly.
PiperOrigin-RevId: 410557900
--
4732289bf4b56123fed113e36be4710b55c6a6c7 by Greg Falcon <gfalcon@google.com>:
Improve the quality of absl::Hash<std::vector<bool>>.
This previously dispatched to std::hash<vector<bool>>, which suffers from trivial collisions on many platforms. (They often hash the internal words but no size info, so that, e.g., {1, 1} and {1, 1, 0} collide.)
Also extended the unit test to exercise this.
PiperOrigin-RevId: 410329943
--
1c5f3934230a7669f74c96b305251786a265e235 by Greg Falcon <gfalcon@google.com>:
Add broader testing of absl hash contracts in the hash unit test.
In particular, test that the hash erasure mechanism works.
PiperOrigin-RevId: 410312738
--
5e1923f527ed3d02f6752a5b38d5e1c17a4a146f by Derek Mauro <dmauro@google.com>:
Internal change
PiperOrigin-RevId: 410290663
--
8c74bc962b3b98a5908017c345efc592393048ea by Martijn Vels <mvels@google.com>:
Add Cord::CreateFlat() function
PiperOrigin-RevId: 410260776
--
bd0de4e94c85620d3b8dd60fae367b730fc4cb34 by Evan Brown <ezb@google.com>:
Rename node_hash_policy to node_slot_policy.
Motivation: we can potentially reuse this code for node_btree_*.
PiperOrigin-RevId: 410082271
GitOrigin-RevId: 2130ba98c8359b08d97fb16d84dfd05687005dcf
Change-Id: Ie052084cf992dee250d8b2f388d39c4de0dcff40
--
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