Commit bccf3870 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

Revert "[objects] Remove uncached internal external string type"

This reverts commit b3d09001.

Reason for revert: https://chromium-review.googlesource.com/c/v8/v8/+/2565511 has to be reverted, and this was a follow-up to that

Original change's description:
> [objects] Remove uncached internal external string type
>
> We shouldn't be creating those anymore since they are not thread-safe.
>
> Bug: v8:7790
> Change-Id: I4546d995fa32eb076c8dfe9d95301fad719c9e07
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615347
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72006}

TBR=rmcilroy@chromium.org,leszeks@chromium.org,solanes@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7790
Change-Id: I4eb1a6b8446fa602eeb5bf29fbf1fe57182cdbf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2627605Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72122}
parent af343b5e
......@@ -153,6 +153,8 @@ Type::bitset BitsetType::Lub(const MapRefLike& map) {
return kString;
case EXTERNAL_INTERNALIZED_STRING_TYPE:
case EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE:
case UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE:
case UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE:
case INTERNALIZED_STRING_TYPE:
case ONE_BYTE_INTERNALIZED_STRING_TYPE:
return kInternalizedString;
......
......@@ -232,6 +232,8 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case EXTERNAL_INTERNALIZED_STRING_TYPE:
case ONE_BYTE_INTERNALIZED_STRING_TYPE:
case EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE:
case UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE:
case UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE:
case STRING_TYPE:
case CONS_STRING_TYPE:
case EXTERNAL_STRING_TYPE:
......
......@@ -87,6 +87,12 @@ enum InstanceType : uint16_t {
kTwoByteStringTag | kExternalStringTag | kInternalizedTag,
EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE =
kOneByteStringTag | kExternalStringTag | kInternalizedTag,
UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE =
EXTERNAL_INTERNALIZED_STRING_TYPE | kUncachedExternalStringTag |
kInternalizedTag,
UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE =
EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE | kUncachedExternalStringTag |
kInternalizedTag,
STRING_TYPE = INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
ONE_BYTE_STRING_TYPE =
ONE_BYTE_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
......@@ -101,12 +107,10 @@ enum InstanceType : uint16_t {
EXTERNAL_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
EXTERNAL_ONE_BYTE_STRING_TYPE =
EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
UNCACHED_EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag |
kUncachedExternalStringTag |
kNotInternalizedTag,
UNCACHED_EXTERNAL_STRING_TYPE =
UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE =
kOneByteStringTag | kExternalStringTag | kUncachedExternalStringTag |
kNotInternalizedTag,
UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE | kNotInternalizedTag,
THIN_STRING_TYPE = kTwoByteStringTag | kThinStringTag | kNotInternalizedTag,
THIN_ONE_BYTE_STRING_TYPE =
kOneByteStringTag | kThinStringTag | kNotInternalizedTag,
......
......@@ -36,6 +36,8 @@ namespace internal {
V(EXTERNAL_INTERNALIZED_STRING_TYPE) \
V(ONE_BYTE_INTERNALIZED_STRING_TYPE) \
V(EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE) \
V(UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE) \
V(UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE) \
V(STRING_TYPE) \
V(CONS_STRING_TYPE) \
V(EXTERNAL_STRING_TYPE) \
......@@ -83,6 +85,13 @@ namespace internal {
external_internalized_string, ExternalInternalizedString) \
V(EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE, ExternalOneByteString::kSize, \
external_one_byte_internalized_string, ExternalOneByteInternalizedString) \
V(UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE, \
ExternalTwoByteString::kUncachedSize, \
uncached_external_internalized_string, UncachedExternalInternalizedString) \
V(UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE, \
ExternalOneByteString::kUncachedSize, \
uncached_external_one_byte_internalized_string, \
UncachedExternalOneByteInternalizedString) \
V(THIN_STRING_TYPE, ThinString::kSize, thin_string, ThinString) \
V(THIN_ONE_BYTE_STRING_TYPE, ThinString::kSize, thin_one_byte_string, \
ThinOneByteString)
......
......@@ -129,6 +129,10 @@ class Symbol;
V(Map, external_internalized_string_map, ExternalInternalizedStringMap) \
V(Map, external_one_byte_internalized_string_map, \
ExternalOneByteInternalizedStringMap) \
V(Map, uncached_external_internalized_string_map, \
UncachedExternalInternalizedStringMap) \
V(Map, uncached_external_one_byte_internalized_string_map, \
UncachedExternalOneByteInternalizedStringMap) \
V(Map, uncached_external_one_byte_string_map, \
UncachedExternalOneByteStringMap) \
/* Oddball maps */ \
......
......@@ -2140,6 +2140,7 @@ TEST(InternalizeExternalStringUncachedWithCopyTwoByte) {
CHECK(external->is_uncached());
// Internalize succesfully, with a copy.
CHECK(!external->IsInternalizedString());
Handle<String> internal = factory->InternalizeString(external);
CHECK(!external->IsInternalizedString());
CHECK(internal->IsInternalizedString());
......
......@@ -94,6 +94,8 @@ export const CATEGORIES = new Map([
'SYMBOL_TYPE',
'THIN_ONE_BYTE_STRING_TYPE',
'THIN_STRING_TYPE',
'UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE',
'UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
'UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE',
'UNCACHED_EXTERNAL_STRING_TYPE',
'WASM_INSTANCE_OBJECT_TYPE',
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment