summaryrefslogtreecommitdiff
path: root/absl/strings/internal/cord_internal.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2020-11-23 17:05:17 -0800
committerGravatar Gennadiy Rozental <rogeeff@google.com>2020-11-24 02:43:25 -0500
commit5d8fc9192245f0ea67094af57399d7931d6bd53f (patch)
tree99d50d3b52bbd768ee5f5c1d7ecf8c46678e7192 /absl/strings/internal/cord_internal.h
parente19260fd7dbef881492fd73891e0be5bd4a09b95 (diff)
Export of internal Abseil changes
-- 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
Diffstat (limited to 'absl/strings/internal/cord_internal.h')
-rw-r--r--absl/strings/internal/cord_internal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/absl/strings/internal/cord_internal.h b/absl/strings/internal/cord_internal.h
index aa91a691..195a7988 100644
--- a/absl/strings/internal/cord_internal.h
+++ b/absl/strings/internal/cord_internal.h
@@ -116,10 +116,16 @@ enum CordRepKind {
CONCAT = 0,
EXTERNAL = 1,
SUBSTRING = 2,
+ RING = 3,
// We have different tags for different sized flat arrays,
- // starting with FLAT
- FLAT = 3,
+ // starting with FLAT, and limited to MAX_FLAT_TAG. The 224 value is based on
+ // the current 'size to tag' encoding of 8 / 32 bytes. If a new tag is needed
+ // in the future, then 'FLAT' and 'MAX_FLAT_TAG' should be adjusted as well
+ // as the Tag <---> Size logic so that FLAT stil represents the minimum flat
+ // allocation size. (32 bytes as of now).
+ FLAT = 4,
+ MAX_FLAT_TAG = 224,
};
struct CordRep {