From 0b2684b5005918edc7d0c0edb55575b56d818708 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 19 May 2023 16:18:28 +0000 Subject: [PATCH] Bug 1832850 - Part 3: Remove an unnecessary include and some unnecessary forward declarations from gc/Nursery.h r=jandem Differential Revision: https://phabricator.services.mozilla.com/D177929 --- js/src/gc/Nursery.h | 15 --------------- js/src/gc/StoreBuffer.h | 2 ++ js/src/vm/RegExpShared.h | 1 + js/src/vm/Runtime.h | 1 + js/src/vm/StringType.h | 16 ++++++++-------- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index 5c243a55a02e..d04f73062a9f 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -17,7 +17,6 @@ #include "js/AllocPolicy.h" #include "js/Class.h" #include "js/GCAPI.h" -#include "js/HeapAPI.h" #include "js/TypeDecls.h" #include "js/UniquePtr.h" #include "js/Vector.h" @@ -54,8 +53,6 @@ namespace js { struct StringStats; class AutoLockGCBgAlloc; class ObjectElements; -class PlainObject; -class NativeObject; struct NurseryChunk; class HeapSlot; class JSONPrinter; @@ -65,21 +62,11 @@ class JS_PUBLIC_API Sprinter; namespace gc { class AutoGCSession; -class AutoMaybeStartBackgroundAllocation; -class AutoTraceSession; struct Cell; class GCSchedulingTunables; -class MinorCollectionTracer; -class RelocationOverlay; -class StringRelocationOverlay; class TenuringTracer; -enum class AllocKind : uint8_t; } // namespace gc -namespace jit { -class MacroAssembler; -} // namespace jit - // Classes with JSCLASS_SKIP_NURSERY_FINALIZE or Wrapper classes with // CROSS_COMPARTMENT flags will not have their finalizer called if they are // nursery allocated and not promoted to the tenured heap. The finalizers for @@ -704,8 +691,6 @@ class alignas(TypicalCacheLineSize) Nursery { friend class gc::GCRuntime; friend class gc::TenuringTracer; - friend class gc::MinorCollectionTracer; - friend class jit::MacroAssembler; friend struct NurseryChunk; }; diff --git a/js/src/gc/StoreBuffer.h b/js/src/gc/StoreBuffer.h index 05461c6cb371..47003920748f 100644 --- a/js/src/gc/StoreBuffer.h +++ b/js/src/gc/StoreBuffer.h @@ -28,6 +28,8 @@ struct GCSizes; namespace js { +class NativeObject; + #ifdef DEBUG extern bool CurrentThreadIsGCMarking(); #endif diff --git a/js/src/vm/RegExpShared.h b/js/src/vm/RegExpShared.h index 5cdf4082812a..5b6111c5572e 100644 --- a/js/src/vm/RegExpShared.h +++ b/js/src/vm/RegExpShared.h @@ -31,6 +31,7 @@ namespace js { class ArrayObject; +class PlainObject; class RegExpRealm; class RegExpShared; class RegExpStatics; diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 881f1716d28d..0ceca1904281 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -66,6 +66,7 @@ class AutoAssertNoContentJS; class Debugger; class EnterDebuggeeNoExecute; class FrontendContext; +class PlainObject; class StaticStrings; } // namespace js diff --git a/js/src/vm/StringType.h b/js/src/vm/StringType.h index 2f2e14d29127..f1a03642a055 100644 --- a/js/src/vm/StringType.h +++ b/js/src/vm/StringType.h @@ -37,26 +37,26 @@ class JSInlineString; class JSRope; namespace JS { - class JS_PUBLIC_API AutoStableStringChars; - } // namespace JS namespace js { -namespace frontend { +class ArrayObject; +class GenericPrinter; +class PropertyName; +class StringBuffer; +namespace frontend { class ParserAtomsTable; class TaggedParserAtomIndex; class WellKnownParserAtoms; struct CompilationAtomCache; - } // namespace frontend -class ArrayObject; -class JS_PUBLIC_API GenericPrinter; -class PropertyName; -class StringBuffer; +namespace jit { +class MacroAssembler; +} // namespace jit /* The buffer length required to contain any unsigned 32-bit integer. */ static const size_t UINT32_CHAR_BUFFER_LENGTH = sizeof("4294967295") - 1; -- 2.11.4.GIT