aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize InlineData into an inner Rep structure.Martijn Vels2022-10-131-103/+141
| | | | | | | | | | | | | | | | 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
* Remove internal `VLOG_xxx` macrosChristian Blichmann2022-10-131-39/+0
| | | | | | | | Those have been exported by accident and are using internal machinery to implement verbose logging. PiperOrigin-RevId: 480815356 Change-Id: I84f6b6dac562cb27634d6538023eda66bed9a7f8
* Import of CCTZ from GitHub.Abseil Team2022-10-1216-1/+1
| | | | | PiperOrigin-RevId: 480664184 Change-Id: Id26fd22ae877ef48e5fa51d26c506a33b1473358
* `absl::InlinedVector` supports move assignment with non-assignable types.Abseil Team2022-10-125-12/+165
| | | | | PiperOrigin-RevId: 480601268 Change-Id: I5a639da57b79ae600387c81e662d5c1542b2bf99
* Change Cord internal layout, which reduces store-load penalties on ARMMartijn Vels2022-10-111-36/+41
| | | | | PiperOrigin-RevId: 480511524 Change-Id: I73945b1150a2e2e75774684fb8e7364f9c1290a7
* Detects accidental multiple invocations of ↵Abseil Team2022-10-113-12/+64
| | | | | | | AnyInvocable<R(...)&&>::operator()&& by producing an error in debug mode, and clarifies that the behavior is undefined in the general case. PiperOrigin-RevId: 480392976 Change-Id: I2d4c6f213fa7c8747f125c9735272a8e47b9214b
* Fix a bug in StrFormat. This issue would have been caught by any compile-timeAndy Soffer2022-10-102-3/+6
| | | | | | | | | 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
* Adds documentation for stringification extensionAbseil Team2022-10-102-2/+74
| | | | | PiperOrigin-RevId: 480166410 Change-Id: Ie915e98747ffda0d1f0e5a72383f5dd9fc940970
* CMake: Remove check_target calls which can be problematic in case of ↵Abseil Team2022-10-102-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | dependency cycle Also renames `_target_compile_features_if_available` CMake function to `_absl_target_compile_features_if_available` since CMake's function namespace is global. The dependency cycle can occur if absl is configured with test helpers enabled, and googletest is configured to use absl. In the case that both projects are being built from source via FetchContent with OVERRIDE_FIND_PACKAGE, depending on the order in which the two projects are added to the build, the check_target calls may fail even though the build would have otherwise succeeded. The existing `check_target` calls seem to have been originally added to detect missing gtest targets when the `GTest::` prefix was not yet in use. For target names without "::", CMake does not warn if they are undefined, and just assumes they refer to system library names. However, CMake does fail during build generation if a target name with "::" is missing; thus the check_taget calls are redundant. PiperOrigin-RevId: 480140797 Change-Id: Ic51631e4a36dd8b6f569ad6424bea15a4af0b875
* Changes mutex unlock profilingAbseil Team2022-10-071-6/+10
| | | | | PiperOrigin-RevId: 479667897 Change-Id: I6085df8bfcfb009806230f8d71b576a1371a4d1f
* Add static_cast<void*> to the sources for trivial relocations to avoid ↵Evan Brown2022-10-072-4/+6
| | | | | | | spurious -Wdynamic-class-memaccess errors in the presence of other compilation errors. PiperOrigin-RevId: 479625866 Change-Id: Ia10ad35a2f58ffb3f36f996d357d5e126b181e1c
* Configure ABSL_CACHE_ALIGNED for clang-like and MSVC toolchains.Abseil Team2022-10-071-2/+2
| | | | | PiperOrigin-RevId: 479614832 Change-Id: I440d145172c93cc4043aeda36898877a331ed5ff
* Fix "unsafe narrowing" warnings in absl, 11/n.Abseil Team2022-10-065-23/+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 the logging facility.) Bug: chromium:1292951 PiperOrigin-RevId: 479384741 Change-Id: Id450438ea3781ce25137366ca16757e810020ad4
* Eliminate use of internal interfacesGennadiy Rozental2022-10-062-2/+2
| | | | | PiperOrigin-RevId: 479325483 Change-Id: I9c4384173ce996818e0cf749c0fc465d6e9aaf8c
* Merge pull request #1289 from keith:ks/fix-more-clang-deprecated-builtinsCopybara-Service2022-10-061-0/+2
|\ | | | | | | | | PiperOrigin-RevId: 479321649 Change-Id: Icc3eba76fc17272fb1e9b1da2216394971a3d3ae
| * Fix more clang deprecated builtinsKeith Smiley2022-10-041-0/+2
| | | | | | | | | | | | | | | | | | If you compile with clang 15+, the uses of trivially destructible and assignable are deprecated. This sets this configuration correctly as the ifdef to fix the build. Fixes https://github.com/abseil/abseil-cpp/issues/1201 Related https://github.com/abseil/abseil-cpp/pull/1277
* | Merge pull request #1285 from jun-sheaf:patch-1Copybara-Service2022-10-061-3/+8
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 479310550 Change-Id: Id42c33f58d4d0bbdf131a807540cff212f3a6bc8
| * | Add clang < 7 to conditionsRandolf J2022-10-051-4/+6
| | |
| * | Merge branch 'abseil:master' into patch-1Randolf J2022-10-0519-129/+183
| |\ \ | |/ / |/| |
* | | Delete LogEntry's copy ctor and assignment operator.Andy Getzendanner2022-10-051-2/+4
| | | | | | | | | | | | | | | | | | | | | This is an immutable view type, and the viewed data have a very limited lifetime. Since it's immutable and has no public constructor, there's no way to repoint one at a longer-lived copy of the data. PiperOrigin-RevId: 479089273 Change-Id: I2ea70878edc45fa1774c8fd26dee3a1b726d8b4a
* | | Make sinks provided to `AbslStringify()` usable with `absl::Format()`.Marcin Kowalczyk2022-10-056-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | Such sinks must define ADL-callable `AbslFormatFlush()`. It can just forward to `Append()`. PiperOrigin-RevId: 479043790 Change-Id: I5d7d80ca1e17adf03b77726df8a52e2b4e9196ce
* | | Cast unused variable to voidAbseil Team2022-10-041-0/+1
| | | | | | | | | | | | | | | | | | | | | Fixes -wunused-variable warning PiperOrigin-RevId: 478886333 Change-Id: Ib84def2ddaf6a6860606e78603c2c25865ce2814
* | | No changes in OSS.Gennadiy Rozental2022-10-043-7/+26
| |/ |/| | | | | | | PiperOrigin-RevId: 478869244 Change-Id: Id16eb1e5036e95a5e2a990a647f1f7090129a009
* | No changes in OSSGennadiy Rozental2022-10-032-2/+1
| | | | | | | | | | PiperOrigin-RevId: 478668020 Change-Id: Iee79011bf7154e83ad862e7bf6e7a76dd337ec06
* | Replace the kPower10ExponentTable array with a formula.Abseil Team2022-10-031-73/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sizeof(kPower10ExponentTable) = 651 * sizeof(int16_t) = 1302 bytes. Their equivalence can be confirmed by this test program: ``` const int minIncl = -342; const int maxExcl = 309; const int kPower10ExponentTable[] = { etc }; int Power10Exponent(int n) { return kPower10ExponentTable[n - minIncl]; } int main(int argc, char** argv) { for (int n = minIncl; n < maxExcl; n++) { int formula = (217706 * n >> 16) - 63; int table = Power10Exponent(n); if (formula != table) { return 1; } } return 0; } ``` Tested by atod_manual_test over the parse-number-fxx-test-data test cases, with and without manually disabling the EiselLemire code path, noting that changing the magic 217706 value causes test failures. PiperOrigin-RevId: 478646550 Change-Id: Icaaf106f9aa36e2de057f3bc9aeddc3ae0efade6
* | CMake: Mark absl::cord_test_helpers and absl::spy_hash_state PUBLICAbseil Team2022-10-032-0/+6
| | | | | | | | | | PiperOrigin-RevId: 478611460 Change-Id: I327dbd1c16a22649e3a25b9ebbc94b48a2fda26f
* | Use trivial relocation for transfers in swisstable and b-tree.Evan Brown2022-10-033-6/+31
| | | | | | | | | | PiperOrigin-RevId: 478547898 Change-Id: Ie20cd0a49df042be912888ee238333a5f5fa0404
* | Merge pull request #1284 from t0ny-peng:chore/remove-unused-class-in-variantCopybara-Service2022-10-031-37/+25
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 478500346 Change-Id: Ia15746857db3068ca74e95a447c5cc26f9450d94
| * | chore: Remove unused helper ConversionIsPossible.Hao Peng2022-10-011-12/+0
| | |
* | | Removes the legacy spellings of the thread annotation macros/functionsDerek Mauro2022-10-031-0/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by default. The compatibility macro `ABSL_LEGACY_THREAD_ANNOTATIONS` can be defined on the compile command-line to temporarily restore these spellings. All of the thread annotation macros are available under ABSL_ prefixed spellings in `absl/base/thread_annotations.h`. The compatibility macro and the legacy spellings will be removed in the future. See https://github.com/google/fuzztest/issues/41 PiperOrigin-RevId: 478498273 Change-Id: I120ad6480d031642bf95a11bf72ab883d9161810
| * Update charconv.ccRandolf J2022-10-041-7/+6
| |
| * chore: limit to ClangRandolf J2022-10-041-0/+4
| |
| * Update charconv.ccRandolf J2022-10-021-1/+1
|/
* Allows absl::StrCat to accept types that implement AbslStringify()Abseil Team2022-09-303-0/+94
| | | | | PiperOrigin-RevId: 478050535 Change-Id: I8e4a4b01aceb8d712476101633eac0ce8647823a
* Merge pull request #1283 from pateldeev:any_inovcable_rename_trueCopybara-Service2022-09-301-21/+21
|\ | | | | | | | | PiperOrigin-RevId: 478009291 Change-Id: I136dffd1383e42ae499c318132e9d789f3a859b9
| * Rename True alias.pateldeev2022-09-291-21/+21
| |
* | Cleanup: SmallMemmove nullify should also be limited to 15 bytesMartijn Vels2022-09-301-5/+5
| | | | | | | | | | | | | | | | | | The current implementation correctly copies up to 15 bytes of data, but the nullify code clears up to 16 bytes, which was likely motivated by the assumption that the length indicator is always the last byte. This changes limits the nullify to 15 bytes as well removing this layout specific assumption from cord.h, making future platform specific internal layout changes easier to land. PiperOrigin-RevId: 477997741 Change-Id: Idcdfeca2a005139f97eafcc77111542d90b817af
* | Cleanup: implement PrependArray and PrependPrecise in terms of InlineDataMartijn Vels2022-09-291-11/+11
| | | | | | | | | | | | | | This removes layout specific details from InlineData from cord.cc, making future platform specific internal layout changes easier to land. PiperOrigin-RevId: 477870559 Change-Id: I26e428ef280d593ad321cf7875e05adcb1cb6438
* | Cleanup: Move BitwiseCompare() to InlineData, and make it layout independent.Martijn Vels2022-09-292-15/+24
|/ | | | | | | 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
* Change kPower10Table bounds to be half-openAbseil Team2022-09-291-37/+41
| | | | | | | | | | | | Half-open intervals are recommended by Dijkstra: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html This also simplifies a static_assert by removing a +1 term. Also fix a "smaller exponent" copy/pasto. PiperOrigin-RevId: 477848998 Change-Id: I67af73d37ac08d36a1117ba33313a02932bd5814
* Cleanup some InlineData internal layout specific details from cord.hMartijn Vels2022-09-291-4/+3
| | | | | | | This makes future platform specific internal layout changes easier to land. PiperOrigin-RevId: 477843948 Change-Id: I4ca4fdea5e965261c029d08319aba0290721c227
* Improve the comments on the implementation of format hooks adl tricks.Matt Kulukundis2022-09-291-2/+6
| | | | | PiperOrigin-RevId: 477811281 Change-Id: Iba838e0eaceb5e6bfe1dac496fc86a22f5cf31d5
* Expand LogEntry method docs.Andy Getzendanner2022-09-293-28/+75
| | | | | | | | | In particular: * point to LOG mutator methods that can affect their values * point out lifetime hazards with ABSL_ATTRIBUTE_LIFETIME_BOUND PiperOrigin-RevId: 477725823 Change-Id: I38cb434b300ceea3cceb2c42eb406bba8e1049d4
* Documentation: Remove an obsolete note about the implementation of `Cord`.Abseil Team2022-09-281-2/+1
| | | | | PiperOrigin-RevId: 477587157 Change-Id: I4527b891222a011f8c1788387479bdc8e4a3bb94
* `absl::base_internal::ReadLongFromFile` should use `O_CLOEXEC` and handle ↵Abseil Team2022-09-281-2/+5
| | | | | | | interrupts to `read` PiperOrigin-RevId: 477547252 Change-Id: Icc94290511b5071d15584d59dcd9cf6ad7319e2b
* Allows absl::StrFormat to accept types which implement AbslStringify()Abseil Team2022-09-282-11/+42
| | | | | PiperOrigin-RevId: 477507777 Change-Id: I5ecde3163ca560ac8774034e55654774e36ad230
* Add common_policy_traits - a subset of hash_policy_traits that can be shared ↵Evan Brown2022-09-2810-156/+279
| | | | | | | | | | between raw_hash_set and btree. Also remove the transfer implementations from btree_set.h and flat_hash_set.h, which are equivalent to the default implementations. Motivation: this will simplify upcoming changes related to trivial relocation. PiperOrigin-RevId: 477493403 Change-Id: I75babef4c93dec3a8105f86c58af54199bb1ec9c
* Split configuration related to cycle clock into separate headersAbseil Team2022-09-267-57/+144
| | | | | PiperOrigin-RevId: 477043101 Change-Id: I009ea39ad61e7e78cdac51afc57a8ad5b4d8aa2d
* Fix -Wimplicit-int-conversion and -Wsign-conversion warnings in btree.Abseil Team2022-09-261-18/+26
| | | | | | | | | | | Certain core libraries in Chrome build with these warnings [1]; btree_map and btree_set cannot be used in those libraries until these warnings are fixed. [1] https://crbug.com/1292951 PiperOrigin-RevId: 476908396 Change-Id: I32e9ea1eec911e329d6ff00f04fa2e9cfde8660a
* Implement Eisel-Lemire for from_chars<float>Abseil Team2022-09-262-34/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does for float what a recent commit did for double. Median of 5 runs of "time atod_manual_test pnftd/data/*.txt" user 0m0.730s # Before user 0m0.701s # After (a speed-up of 1.04x) where pnftd is https://github.com/nigeltao/parse-number-fxx-test-data Part of the reason why this speed-up of 1.04x isn't as dramatic as for the from_chars<double> change is that, out of the 5299993 pnftd test cases, 76.42% produce result_out_of_range for single precision (compared to 1.03% for double precision). "benchy --reference=srcfs --benchmark_filter='SimpleAtof' :numbers_benchmark" output (which uses deterministic but randomly generated input strings): name old cpu/op new cpu/op delta BM_SimpleAtof<absl::string_view>/10/1 392ns ± 2% 323ns ± 3% -17.60% (p=0.000 n=48+48) BM_SimpleAtof<absl::string_view>/10/2 426ns ± 3% 311ns ± 4% -26.89% (p=0.000 n=59+49) BM_SimpleAtof<absl::string_view>/10/4 435ns ± 3% 341ns ± 3% -21.68% (p=0.000 n=58+48) BM_SimpleAtof<absl::string_view>/10/8 501ns ± 3% 393ns ± 3% -21.55% (p=0.000 n=60+50) BM_SimpleAtof<const char*>/10/1 409ns ± 6% 339ns ± 3% -17.06% (p=0.000 n=48+49) BM_SimpleAtof<const char*>/10/2 412ns ± 4% 347ns ± 3% -15.82% (p=0.000 n=47+49) BM_SimpleAtof<const char*>/10/4 463ns ± 6% 369ns ± 6% -20.37% (p=0.000 n=60+50) BM_SimpleAtof<const char*>/10/8 548ns ± 3% 450ns ± 4% -17.91% (p=0.000 n=57+59) BM_SimpleAtof<std::string>/10/1 386ns ± 2% 325ns ± 3% -15.74% (p=0.000 n=48+50) BM_SimpleAtof<std::string>/10/2 425ns ± 3% 311ns ± 4% -26.79% (p=0.000 n=60+50) BM_SimpleAtof<std::string>/10/4 435ns ± 4% 340ns ± 3% -21.94% (p=0.000 n=59+49) BM_SimpleAtof<std::string>/10/8 503ns ± 4% 398ns ± 2% -20.89% (p=0.000 n=59+48) PiperOrigin-RevId: 476880111 Change-Id: Ibc5583677ac2ed338d09d8db960ae8a513eb2ccb