From 8bce0e2404cdac695acc2735ada4aca22a9ab934 Mon Sep 17 00:00:00 2001 From: win7-7 Date: Mon, 29 Jan 2024 16:51:24 +0200 Subject: [PATCH] Bug 903519- GC: allocate JSStrings and string data in the Nursery. 903519 part 1: Separate out AllocKinds for nursery-allocatable strings. Rest of part TBD: Need 1350760 Atomizing strings needs to be faster first. --- js/src/gc/AllocKind.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/src/gc/AllocKind.h b/js/src/gc/AllocKind.h index 4602503f4f..9f7f93b76b 100644 --- a/js/src/gc/AllocKind.h +++ b/js/src/gc/AllocKind.h @@ -51,7 +51,7 @@ namespace gc { D(OBJECT16, Object, JSObject, JSObject_Slots16, false, false) \ D(OBJECT16_BACKGROUND, Object, JSObject, JSObject_Slots16, true, true) -#define FOR_EACH_NONOBJECT_ALLOCKIND(D) \ +#define FOR_EACH_NONOBJECT_NONNURSERY_ALLOCKIND(D) \ /* AllocKind TraceKind TypeName SizedType BGFinal Nursery */ \ D(SCRIPT, Script, JSScript, JSScript, false, false) \ D(LAZY_SCRIPT, LazyScript, js::LazyScript, js::LazyScript, true, false) \ @@ -59,8 +59,6 @@ namespace gc { D(ACCESSOR_SHAPE, Shape, js::AccessorShape, js::AccessorShape, true, false) \ D(BASE_SHAPE, BaseShape, js::BaseShape, js::BaseShape, true, false) \ D(OBJECT_GROUP, ObjectGroup, js::ObjectGroup, js::ObjectGroup, true, false) \ - D(FAT_INLINE_STRING, String, JSFatInlineString, JSFatInlineString, true, false) \ - D(STRING, String, JSString, JSString, true, false) \ D(EXTERNAL_STRING, String, JSExternalString, JSExternalString, true, false) \ D(FAT_INLINE_ATOM, String, js::FatInlineAtom, js::FatInlineAtom, true, false) \ D(ATOM, String, js::NormalAtom, js::NormalAtom, true, false) \ @@ -70,7 +68,15 @@ namespace gc { D(SCOPE, Scope, js::Scope, js::Scope, true, false) \ D(REGEXP_SHARED, RegExpShared, js::RegExpShared, js::RegExpShared, true, false) -#define FOR_EACH_ALLOCKIND(D) \ +#define FOR_EACH_NURSERY_STRING_ALLOCKIND(D) \ + D(FAT_INLINE_STRING, String, JSFatInlineString, JSFatInlineString, true, true) \ + D(STRING, String, JSString, JSString, true, true) + +#define FOR_EACH_NONOBJECT_ALLOCKIND(D) \ + FOR_EACH_NONOBJECT_NONNURSERY_ALLOCKIND(D) \ + FOR_EACH_NURSERY_STRING_ALLOCKIND(D) + +#define FOR_EACH_ALLOCKIND(D) \ FOR_EACH_OBJECT_ALLOCKIND(D) \ FOR_EACH_NONOBJECT_ALLOCKIND(D)