From fa84e340446e661259cbbbbc91bdd5e73766dc17 Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Mon, 12 Aug 2019 10:16:04 +0000 Subject: [PATCH] Bug 1572782 - Remove unused js::FreeOp alias r=tcampbell? Differential Revision: https://phabricator.services.mozilla.com/D41413 --HG-- extra : moz-landing-system : lando --- js/public/TypeDecls.h | 1 - js/public/Utility.h | 2 +- js/src/debugger/DebugScript.cpp | 4 ++-- js/src/debugger/DebugScript.h | 1 - js/src/debugger/Debugger.cpp | 2 +- js/src/debugger/Debugger.h | 1 - js/src/debugger/Frame.cpp | 2 +- js/src/debugger/Frame.h | 1 - js/src/gc/FreeOp.h | 8 ++------ js/src/gc/ZoneAllocator.h | 4 ++-- 10 files changed, 9 insertions(+), 17 deletions(-) diff --git a/js/public/TypeDecls.h b/js/public/TypeDecls.h index 8fba20ceec2e..96d88509ba32 100644 --- a/js/public/TypeDecls.h +++ b/js/public/TypeDecls.h @@ -34,7 +34,6 @@ class JSScript; class JSString; namespace js { -using FreeOp = JSFreeOp; class TempAllocPolicy; }; // namespace js diff --git a/js/public/Utility.h b/js/public/Utility.h index 8342b69fc483..d46fae4f6959 100644 --- a/js/public/Utility.h +++ b/js/public/Utility.h @@ -490,7 +490,7 @@ static inline void js_free(void* p) { * - For deallocations during GC finalization, use one of the following * operations on the JSFreeOp provided to the finalizer: * - * FreeOp::{free_,delete_} + * JSFreeOp::{free_,delete_} */ /* diff --git a/js/src/debugger/DebugScript.cpp b/js/src/debugger/DebugScript.cpp index 8a4db51b22e6..c1fd68ed08fd 100644 --- a/js/src/debugger/DebugScript.cpp +++ b/js/src/debugger/DebugScript.cpp @@ -17,7 +17,7 @@ #include "debugger/Debugger.h" // for BreakpointSite, Breakpoint #include "gc/Barrier.h" // for GCPtrNativeObject, WriteBarriered #include "gc/Cell.h" // for TenuredCell -#include "gc/FreeOp.h" // for FreeOp +#include "gc/FreeOp.h" // for JSFreeOp #include "gc/GCEnum.h" // for MemoryUse, MemoryUse::BreakpointSite #include "gc/Marking.h" // for IsAboutToBeFinalized #include "gc/Zone.h" // for Zone @@ -30,7 +30,7 @@ #include "vm/Runtime.h" // for ReportOutOfMemory #include "vm/Stack.h" // for ActivationIterator, Activation -#include "gc/FreeOp-inl.h" // for FreeOp::free_ +#include "gc/FreeOp-inl.h" // for JSFreeOp::free_ #include "gc/GC-inl.h" // for ZoneCellIter #include "gc/Marking-inl.h" // for CheckGCThingAfterMovingGC #include "vm/JSContext-inl.h" // for JSContext::check diff --git a/js/src/debugger/DebugScript.h b/js/src/debugger/DebugScript.h index 5ecff81b17d3..b59bd02ad492 100644 --- a/js/src/debugger/DebugScript.h +++ b/js/src/debugger/DebugScript.h @@ -21,7 +21,6 @@ namespace js { class BreakpointSite; class Debugger; -class FreeOp; // DebugScript manages the internal debugger state for a JSScript, which may be // associated with multiple Debuggers. diff --git a/js/src/debugger/Debugger.cpp b/js/src/debugger/Debugger.cpp index d134f8bea49d..c0aa5ff2caef 100644 --- a/js/src/debugger/Debugger.cpp +++ b/js/src/debugger/Debugger.cpp @@ -49,7 +49,7 @@ #include "frontend/ParseContext.h" // for UsedNameTracker #include "frontend/Parser.h" // for Parser #include "gc/Barrier.h" // for GCPtrNativeObject -#include "gc/FreeOp.h" // for FreeOp +#include "gc/FreeOp.h" // for JSFreeOp #include "gc/GC.h" // for IterateLazyScripts #include "gc/GCMarker.h" // for GCMarker #include "gc/GCRuntime.h" // for GCRuntime, AutoEnterIteration diff --git a/js/src/debugger/Debugger.h b/js/src/debugger/Debugger.h index b5b924231cf4..97c079ddb996 100644 --- a/js/src/debugger/Debugger.h +++ b/js/src/debugger/Debugger.h @@ -65,7 +65,6 @@ class AutoRealm; class CrossCompartmentKey; class Debugger; class DebuggerEnvironment; -class FreeOp; class PromiseObject; namespace gc { struct Cell; diff --git a/js/src/debugger/Frame.cpp b/js/src/debugger/Frame.cpp index 76c8b649aa9d..12cb1eaf8f72 100644 --- a/js/src/debugger/Frame.cpp +++ b/js/src/debugger/Frame.cpp @@ -34,7 +34,7 @@ #include "debugger/Script.h" // for DebuggerScript #include "frontend/BytecodeCompilation.h" // for CompileEvalScript #include "gc/Barrier.h" // for HeapPtr -#include "gc/FreeOp.h" // for FreeOp +#include "gc/FreeOp.h" // for JSFreeOp #include "gc/GC.h" // for MemoryUse #include "gc/Marking.h" // for IsAboutToBeFinalized #include "gc/Rooting.h" // for RootedDebuggerFrame diff --git a/js/src/debugger/Frame.h b/js/src/debugger/Frame.h index 238928ffdded..e96f318c1f4d 100644 --- a/js/src/debugger/Frame.h +++ b/js/src/debugger/Frame.h @@ -28,7 +28,6 @@ namespace js { class AbstractGeneratorObject; -class FreeOp; class GlobalObject; /* diff --git a/js/src/gc/FreeOp.h b/js/src/gc/FreeOp.h index 37024db30e90..5a6ba79bf3bd 100644 --- a/js/src/gc/FreeOp.h +++ b/js/src/gc/FreeOp.h @@ -88,7 +88,7 @@ class JSFreeOp { // Queue memory that was associated with a GC thing using js::AddCellMemory to // be freed when the JSFreeOp is destroyed. // - // This should not be called on the default FreeOps returned by + // This should not be called on the default JSFreeOps returned by // JSRuntime/JSContext::defaultFreeOp() since these are not destroyed until // the runtime itself is destroyed. // @@ -97,7 +97,7 @@ class JSFreeOp { void freeLater(Cell* cell, void* p, size_t nbytes, MemoryUse use); bool appendJitPoisonRange(const js::jit::JitPoisonRange& range) { - // FreeOps other than the defaultFreeOp() are constructed on the stack, + // JSFreeOps other than the defaultFreeOp() are constructed on the stack, // and won't hold onto the pointers to free indefinitely. MOZ_ASSERT(!isDefaultFreeOp()); @@ -173,8 +173,4 @@ class JSFreeOp { void queueForFreeLater(void* p); }; -namespace js { -using FreeOp = JSFreeOp; -} // namespace js - #endif // gc_FreeOp_h diff --git a/js/src/gc/ZoneAllocator.h b/js/src/gc/ZoneAllocator.h index f1cd0f79c621..1231f474de90 100644 --- a/js/src/gc/ZoneAllocator.h +++ b/js/src/gc/ZoneAllocator.h @@ -324,7 +324,7 @@ inline void RemoveCellMemory(gc::Cell* cell, size_t nbytes, MemoryUse use, // Initialize an object's reserved slot with a private value pointing to // malloc-allocated memory and associate the memory with the object. // -// This call should be matched with a call to FreeOp::free_/delete_ in the +// This call should be matched with a call to JSFreeOp::free_/delete_ in the // object's finalizer to free the memory and update the memory accounting. inline void InitReservedSlot(NativeObject* obj, uint32_t slot, void* ptr, @@ -341,7 +341,7 @@ inline void InitReservedSlot(NativeObject* obj, uint32_t slot, T* ptr, // Initialize an object's private slot with a pointer to malloc-allocated memory // and associate the memory with the object. // -// This call should be matched with a call to FreeOp::free_/delete_ in the +// This call should be matched with a call to JSFreeOp::free_/delete_ in the // object's finalizer to free the memory and update the memory accounting. inline void InitObjectPrivate(NativeObject* obj, void* ptr, size_t nbytes,