Commit ea2c6e67 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[heap] Fix shared string allocation refinement with single generation builds

Also skip the test-shared-strings/YoungInternalization cctest, which
doesn't make sense when there is no young generation.

Bug: v8:12007
Change-Id: I3006960181a7da681d7318289a6ade6b0f0bf6da
Cq-Include-Trybots: luci.v8.try:v8_linux64_single_generation_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3218197
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77371}
parent 1bbeac58
......@@ -959,6 +959,9 @@ FactoryBase<Impl>::RefineAllocationTypeForInPlaceInternalizableString(
DCHECK(InstanceTypeChecker::IsInternalizedString(instance_type) ||
String::IsInPlaceInternalizable(instance_type));
#endif
if (FLAG_single_generation && allocation == AllocationType::kYoung) {
allocation = AllocationType::kOld;
}
if (allocation != AllocationType::kOld) return allocation;
return impl()->AllocationTypeForInPlaceInternalizableString();
}
......
......@@ -64,6 +64,7 @@ class MultiClientIsolateTest {
};
UNINITIALIZED_TEST(InPlaceInternalizableStringsAreShared) {
if (FLAG_single_generation) return;
if (!ReadOnlyHeap::IsReadOnlySpaceShared()) return;
if (!COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL) return;
......@@ -176,6 +177,7 @@ UNINITIALIZED_TEST(InPlaceInternalization) {
UNINITIALIZED_TEST(YoungInternalization) {
if (!ReadOnlyHeap::IsReadOnlySpaceShared()) return;
if (!COMPRESS_POINTERS_IN_SHARED_CAGE_BOOL) return;
if (FLAG_single_generation) return;
FLAG_shared_string_table = true;
......
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