Bug 1156632 - Remove unused forward class declarations - patch 7 - JS, r=sfink
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 22 Apr 2015 08:29:26 +0200
changeset 259376 1f79844c376f994585b43edb1b739a553f2b1fbf
parent 259375 9e1d3ea762968d090fd4c945de5e3838c1bd3ec9
child 259377 5d21763f8a467c26971d290e9db375b3acf72bc0
push id8007
push userraliiev@mozilla.com
push dateMon, 11 May 2015 19:23:16 +0000
treeherdermozilla-aurora@e2ce1aac996e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1156632
milestone40.0a1
Bug 1156632 - Remove unused forward class declarations - patch 7 - JS, r=sfink
js/ipc/CPOWTimer.h
js/ipc/JavaScriptShared.h
js/public/Class.h
js/public/ProfilingFrameIterator.h
js/src/asmjs/AsmJSFrameIterator.h
js/src/gc/Barrier.h
js/src/gc/GCRuntime.h
js/src/gc/Heap.h
js/src/gc/Memory.h
js/src/gc/Nursery.h
js/src/gc/Statistics.h
js/src/jit/Bailouts.h
js/src/jit/BaselineIC.h
js/src/jit/C1Spewer.h
js/src/jit/CodeGenerator.h
js/src/jit/IonCaches.h
js/src/jit/IonCode.h
js/src/jit/JSONSpewer.h
js/src/jit/JitCompartment.h
js/src/jit/LIR.h
js/src/jit/MIRGenerator.h
js/src/jit/Safepoints.h
js/src/jit/ValueNumbering.h
js/src/jit/arm/MoveEmitter-arm.h
js/src/jit/mips/Assembler-mips.h
js/src/jit/mips/MoveEmitter-mips.h
js/src/jit/none/MacroAssembler-none.h
js/src/jit/shared/Lowering-shared.h
js/src/jit/x86-shared/MoveEmitter-x86-shared.h
js/src/jsapi.h
js/src/jscntxt.h
js/src/jscompartment.h
js/src/jsgcinlines.h
js/src/jsobj.h
js/src/jsscript.h
js/src/jsstr.h
js/src/jswrapper.h
js/src/vm/ErrorObject.h
js/src/vm/NativeObject.h
js/src/vm/RegExpObject.h
js/src/vm/Runtime.h
js/src/vm/Shape.h
js/src/vm/Stack.h
js/xpconnect/loader/mozJSLoaderUtils.h
js/xpconnect/public/nsAXPCNativeCallContext.h
js/xpconnect/src/XPCWrapper.h
--- a/js/ipc/CPOWTimer.h
+++ b/js/ipc/CPOWTimer.h
@@ -5,18 +5,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef CPOWTIMER_H
 #define CPOWTIMER_H
 
 #include "prinrval.h"
 
-class JSObject;
-
 /**
  * A stopwatch measuring the duration of a CPOW call.
  *
  * As the process is consuming neither user time nor system time
  * during a CPOW call, we measure such durations using wallclock time.
  *
  * This stopwatch is active iff JSRuntime::stopwatch.isActive is set.
  * Upon destruction, update JSRuntime::stopwatch.data.totalCPOWTime.
--- a/js/ipc/JavaScriptShared.h
+++ b/js/ipc/JavaScriptShared.h
@@ -9,21 +9,16 @@
 #define mozilla_jsipc_JavaScriptShared_h__
 
 #include "mozilla/dom/DOMTypes.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "mozilla/jsipc/PJavaScript.h"
 #include "nsJSUtils.h"
 
 namespace mozilla {
-
-namespace dom {
-class CPOWManagerGetter;
-}
-
 namespace jsipc {
 
 class ObjectId {
   public:
     // Use 47 bits at most, to be safe, since jsval privates are encoded as
     // doubles. See bug 1065811 comment 12 for an explanation.
     static const size_t SERIAL_NUMBER_BITS = 47;
     static const size_t FLAG_BITS = 1;
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -26,17 +26,16 @@
 
 struct JSFreeOp;
 struct JSFunctionSpec;
 
 namespace js {
 
 struct Class;
 class FreeOp;
-class PropertyName;
 class Shape;
 
 // This is equal to JSFunction::class_.  Use it in places where you don't want
 // to #include jsfun.h.
 extern JS_FRIEND_DATA(const js::Class* const) FunctionClassPtr;
 
 } // namespace js
 
--- a/js/public/ProfilingFrameIterator.h
+++ b/js/public/ProfilingFrameIterator.h
@@ -9,17 +9,16 @@
 
 #include "mozilla/Alignment.h"
 #include "mozilla/Maybe.h"
 
 #include <stdint.h>
 
 #include "js/Utility.h"
 
-class JSAtom;
 struct JSRuntime;
 
 namespace js {
     class Activation;
     class AsmJSProfilingFrameIterator;
     namespace jit {
         class JitActivation;
         class JitProfilingFrameIterator;
--- a/js/src/asmjs/AsmJSFrameIterator.h
+++ b/js/src/asmjs/AsmJSFrameIterator.h
@@ -19,17 +19,16 @@
 #ifndef asmjs_AsmJSFrameIterator_h
 #define asmjs_AsmJSFrameIterator_h
 
 #include <stdint.h>
 
 #include "js/ProfilingFrameIterator.h"
 
 class JSAtom;
-struct JSContext;
 
 namespace js {
 
 class AsmJSActivation;
 class AsmJSModule;
 struct AsmJSFunctionLabels;
 namespace jit { class CallSite; class MacroAssembler; class Label; }
 
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -168,17 +168,16 @@ class ArrayBufferViewObject;
 class SharedArrayBufferObject;
 class SharedTypedArrayObject;
 class BaseShape;
 class DebugScopeObject;
 class GlobalObject;
 class LazyScript;
 class NativeObject;
 class NestedScopeObject;
-class Nursery;
 class PlainObject;
 class PropertyName;
 class SavedFrame;
 class ScopeObject;
 class ScriptSourceObject;
 class Shape;
 class UnownedBaseShape;
 class ObjectGroup;
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -25,21 +25,18 @@
 namespace js {
 
 class AutoLockGC;
 
 namespace gc {
 
 typedef Vector<JS::Zone*, 4, SystemAllocPolicy> ZoneVector;
 
-struct FinalizePhase;
 class MarkingValidator;
-struct AutoPrepareForTracing;
 class AutoTraceSession;
-struct ArenasToUpdate;
 struct MovingTracer;
 
 class ChunkPool
 {
     Chunk* head_;
     size_t count_;
 
   public:
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -22,18 +22,16 @@
 #include "jsutil.h"
 
 #include "ds/BitArray.h"
 #include "gc/Memory.h"
 #include "js/GCAPI.h"
 #include "js/HeapAPI.h"
 #include "js/TracingAPI.h"
 
-struct JSCompartment;
-
 struct JSRuntime;
 
 namespace JS {
 namespace shadow {
 struct Runtime;
 }
 }
 
--- a/js/src/gc/Memory.h
+++ b/js/src/gc/Memory.h
@@ -4,18 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef gc_Memory_h
 #define gc_Memory_h
 
 #include <stddef.h>
 
-struct JSRuntime;
-
 namespace js {
 namespace gc {
 
 // Sanity check that our compiled configuration matches the currently
 // running instance and initialize any runtime data needed for allocation.
 void InitMemorySubsystem();
 
 size_t SystemPageSize();
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -22,35 +22,30 @@
 #include "js/Vector.h"
 
 namespace JS {
 struct Zone;
 }
 
 namespace js {
 
-class TypedArrayObject;
 class ObjectElements;
 class NativeObject;
 class HeapSlot;
 class ObjectGroup;
 
 void SetGCZeal(JSRuntime*, uint8_t, uint32_t);
 
 namespace gc {
 struct Cell;
-class Collector;
 class MinorCollectionTracer;
 } /* namespace gc */
 
 namespace jit {
-class CodeGenerator;
 class MacroAssembler;
-class ICStubCompiler;
-class BaselineCompiler;
 }
 
 class Nursery
 {
   public:
     static const size_t Alignment = gc::ChunkSize;
     static const size_t ChunkShift = gc::ChunkShift;
 
--- a/js/src/gc/Statistics.h
+++ b/js/src/gc/Statistics.h
@@ -13,18 +13,16 @@
 
 #include "jsalloc.h"
 #include "jsgc.h"
 #include "jspubtd.h"
 
 #include "js/GCAPI.h"
 #include "js/Vector.h"
 
-struct JSCompartment;
-
 namespace js {
 
 class GCParallelTask;
 
 namespace gcstats {
 
 enum Phase {
     PHASE_MUTATOR,
--- a/js/src/jit/Bailouts.h
+++ b/js/src/jit/Bailouts.h
@@ -99,18 +99,16 @@ static const uint32_t BAILOUT_TABLE_SIZE
 static const uint32_t BAILOUT_RETURN_OK = 0;
 static const uint32_t BAILOUT_RETURN_FATAL_ERROR = 1;
 static const uint32_t BAILOUT_RETURN_OVERRECURSED = 2;
 
 // This address is a magic number made to cause crashes while indicating that we
 // are making an attempt to mark the stack during a bailout.
 static uint8_t * const FAKE_JIT_TOP_FOR_BAILOUT = reinterpret_cast<uint8_t*>(0xba1);
 
-class JitCompartment;
-
 // BailoutStack is an architecture specific pointer to the stack, given by the
 // bailout handler.
 class BailoutStack;
 class InvalidationBailoutStack;
 
 // Must be implemented by each architecture.
 
 // This structure is constructed before recovering the baseline frames for a
--- a/js/src/jit/BaselineIC.h
+++ b/js/src/jit/BaselineIC.h
@@ -17,19 +17,16 @@
 #include "builtin/TypedObject.h"
 #include "jit/BaselineJIT.h"
 #include "jit/BaselineRegisters.h"
 #include "vm/ArrayObject.h"
 #include "vm/TypedArrayCommon.h"
 #include "vm/UnboxedObject.h"
 
 namespace js {
-
-class TypedArrayLayout;
-
 namespace jit {
 
 //
 // Baseline Inline Caches are polymorphic caches that aggressively
 // share their stub code.
 //
 // Every polymorphic site contains a linked list of stubs which are
 // specific to that site.  These stubs are composed of a |StubData|
--- a/js/src/jit/C1Spewer.h
+++ b/js/src/jit/C1Spewer.h
@@ -12,18 +12,16 @@
 #include "NamespaceImports.h"
 
 #include "js/RootingAPI.h"
 
 namespace js {
 namespace jit {
 
 class BacktrackingAllocator;
-class MDefinition;
-class MInstruction;
 class MBasicBlock;
 class MIRGraph;
 class LNode;
 
 class C1Spewer
 {
     MIRGraph* graph;
     FILE* spewout_;
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -32,17 +32,16 @@ namespace jit {
 class OutOfLineTestObject;
 class OutOfLineNewArray;
 class OutOfLineNewObject;
 class CheckOverRecursedFailure;
 class OutOfLineInterruptCheckImplicit;
 class OutOfLineUnboxFloatingPoint;
 class OutOfLineStoreElementHole;
 class OutOfLineTypeOfV;
-class OutOfLineLoadTypedArray;
 class OutOfLineUpdateCache;
 class OutOfLineCallPostWriteBarrier;
 class OutOfLineIsCallable;
 class OutOfLineRegExpExec;
 class OutOfLineRegExpTest;
 
 class CodeGenerator : public CodeGeneratorSpecific
 {
--- a/js/src/jit/IonCaches.h
+++ b/js/src/jit/IonCaches.h
@@ -12,19 +12,16 @@
 #elif defined(JS_CODEGEN_MIPS)
 # include "jit/mips/Assembler-mips.h"
 #endif
 #include "jit/Registers.h"
 #include "jit/shared/Assembler-shared.h"
 #include "vm/TypedArrayCommon.h"
 
 namespace js {
-
-class LockedJSContext;
-
 namespace jit {
 
 class LInstruction;
 
 #define IONCACHE_KIND_LIST(_)                                   \
     _(GetProperty)                                              \
     _(SetProperty)                                              \
     _(GetElement)                                               \
--- a/js/src/jit/IonCode.h
+++ b/js/src/jit/IonCode.h
@@ -17,23 +17,19 @@
 #include "jit/ExecutableAllocator.h"
 #include "jit/IonOptimizationLevels.h"
 #include "jit/IonTypes.h"
 #include "js/UbiNode.h"
 #include "vm/TraceLogging.h"
 #include "vm/TypeInference.h"
 
 namespace js {
-
-class AsmJSModule;
-
 namespace jit {
 
 class MacroAssembler;
-class CodeOffsetLabel;
 class PatchableBackedge;
 class IonBuilder;
 
 typedef Vector<JSObject*, 4, JitAllocPolicy> ObjectVector;
 
 class JitCode : public gc::TenuredCell
 {
   protected:
@@ -723,19 +719,16 @@ struct IonScriptCounts
 
     IonScriptCounts* previous() const {
         return previous_;
     }
 };
 
 struct VMFunction;
 
-class JitCompartment;
-class JitRuntime;
-
 struct AutoFlushICache
 {
   private:
 #if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS)
     uintptr_t start_;
     uintptr_t stop_;
     const char* name_;
     bool inhibit_;
--- a/js/src/jit/JSONSpewer.h
+++ b/js/src/jit/JSONSpewer.h
@@ -11,18 +11,16 @@
 
 #include "js/TypeDecls.h"
 
 namespace js {
 namespace jit {
 
 class BacktrackingAllocator;
 class MDefinition;
-class MInstruction;
-class MBasicBlock;
 class MIRGraph;
 class MResumePoint;
 class LNode;
 
 class JSONSpewer
 {
   private:
     // Set by beginFunction(); unset by endFunction().
--- a/js/src/jit/JitCompartment.h
+++ b/js/src/jit/JitCompartment.h
@@ -52,17 +52,16 @@ struct EnterJitData
 
     bool constructing;
 };
 
 typedef void (*EnterJitCode)(void* code, unsigned argc, Value* argv, InterpreterFrame* fp,
                              CalleeToken calleeToken, JSObject* scopeChain,
                              size_t numStackValues, Value* vp);
 
-class IonBuilder;
 class JitcodeGlobalTable;
 
 // ICStubSpace is an abstraction for allocation policy and storage for stub data.
 // There are two kinds of stubs: optimized stubs and fallback stubs (the latter
 // also includes stubs that can make non-tail calls that can GC).
 //
 // Optimized stubs are allocated per-compartment and are always purged when
 // JIT-code is discarded. Fallback stubs are allocated per BaselineScript and
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -27,19 +27,17 @@ namespace jit {
 
 class LUse;
 class LGeneralReg;
 class LFloatReg;
 class LStackSlot;
 class LArgument;
 class LConstantIndex;
 class MBasicBlock;
-class MTableSwitch;
 class MIRGenerator;
-class MSnapshot;
 
 static const uint32_t VREG_INCREMENT = 1;
 
 static const uint32_t THIS_FRAME_ARGSLOT = 0;
 
 #if defined(JS_NUNBOX32)
 # define BOX_PIECES         2
 static const uint32_t VREG_TYPE_OFFSET = 0;
--- a/js/src/jit/MIRGenerator.h
+++ b/js/src/jit/MIRGenerator.h
@@ -24,19 +24,17 @@
 #ifdef JS_ION_PERF
 # include "jit/PerfSpewer.h"
 #endif
 #include "jit/RegisterSets.h"
 
 namespace js {
 namespace jit {
 
-class MBasicBlock;
 class MIRGraph;
-class MStart;
 class OptimizationInfo;
 
 class MIRGenerator
 {
   public:
     MIRGenerator(CompileCompartment* compartment, const JitCompileOptions& options,
                  TempAllocator* alloc, MIRGraph* graph,
                  CompileInfo* info, const OptimizationInfo* optimizationInfo,
--- a/js/src/jit/Safepoints.h
+++ b/js/src/jit/Safepoints.h
@@ -10,17 +10,16 @@
 #include "jit/BitSet.h"
 #include "jit/CompactBuffer.h"
 #include "jit/shared/Assembler-shared.h"
 
 namespace js {
 namespace jit {
 
 struct SafepointSlotEntry;
-struct SafepointNunboxEntry;
 
 class LAllocation;
 class LSafepoint;
 
 static const uint32_t INVALID_SAFEPOINT_OFFSET = uint32_t(-1);
 
 class SafepointWriter
 {
--- a/js/src/jit/ValueNumbering.h
+++ b/js/src/jit/ValueNumbering.h
@@ -12,17 +12,16 @@
 
 namespace js {
 namespace jit {
 
 class MDefinition;
 class MBasicBlock;
 class MIRGraph;
 class MPhi;
-class MInstruction;
 class MIRGenerator;
 class MResumePoint;
 
 class ValueNumberer
 {
     // Value numbering data.
     class VisibleValues
     {
--- a/js/src/jit/arm/MoveEmitter-arm.h
+++ b/js/src/jit/arm/MoveEmitter-arm.h
@@ -8,18 +8,16 @@
 #define jit_arm_MoveEmitter_arm_h
 
 #include "jit/MacroAssembler.h"
 #include "jit/MoveResolver.h"
 
 namespace js {
 namespace jit {
 
-class CodeGenerator;
-
 class MoveEmitterARM
 {
     uint32_t inCycle_;
     MacroAssembler& masm;
 
     // Original stack push value.
     uint32_t pushedAtStart_;
 
--- a/js/src/jit/mips/Assembler-mips.h
+++ b/js/src/jit/mips/Assembler-mips.h
@@ -251,17 +251,16 @@ static const uint32_t RegMask = Register
 
 static const uint32_t BREAK_STACK_UNALIGNED = 1;
 static const uint32_t MAX_BREAK_CODE = 1024 - 1;
 
 class Instruction;
 class InstReg;
 class InstImm;
 class InstJump;
-class BranchInstBlock;
 
 uint32_t RS(Register r);
 uint32_t RT(Register r);
 uint32_t RT(uint32_t regCode);
 uint32_t RT(FloatRegister r);
 uint32_t RD(Register r);
 uint32_t RD(FloatRegister r);
 uint32_t RD(uint32_t regCode);
@@ -440,17 +439,16 @@ enum FunctionField {
     ff_c_ule_fmt   = 55,
 
     ff_madd_s      = 32,
     ff_madd_d      = 33,
 
     ff_null        = 0
 };
 
-class MacroAssemblerMIPS;
 class Operand;
 
 // A BOffImm16 is a 16 bit immediate that is used for branches.
 class BOffImm16
 {
     uint32_t data;
 
   public:
--- a/js/src/jit/mips/MoveEmitter-mips.h
+++ b/js/src/jit/mips/MoveEmitter-mips.h
@@ -8,18 +8,16 @@
 #define jit_mips_MoveEmitter_mips_h
 
 #include "jit/MacroAssembler.h"
 #include "jit/MoveResolver.h"
 
 namespace js {
 namespace jit {
 
-class CodeGenerator;
-
 class MoveEmitterMIPS
 {
     uint32_t inCycle_;
     MacroAssembler& masm;
 
     // Original stack push value.
     uint32_t pushedAtStart_;
 
--- a/js/src/jit/none/MacroAssembler-none.h
+++ b/js/src/jit/none/MacroAssembler-none.h
@@ -10,18 +10,16 @@
 #include "jit/JitCompartment.h"
 #include "jit/MoveResolver.h"
 #include "jit/shared/Assembler-shared.h"
 
 
 namespace js {
 namespace jit {
 
-class MDefinition;
-
 static MOZ_CONSTEXPR_VAR Register StackPointer = { Registers::invalid_reg };
 static MOZ_CONSTEXPR_VAR Register FramePointer = { Registers::invalid_reg };
 static MOZ_CONSTEXPR_VAR Register ReturnReg = { Registers::invalid_reg };
 static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = { FloatRegisters::invalid_reg };
 static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = { FloatRegisters::invalid_reg };
 static MOZ_CONSTEXPR_VAR FloatRegister ReturnInt32x4Reg = { FloatRegisters::invalid_reg };
 static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32x4Reg = { FloatRegisters::invalid_reg };
 static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = { FloatRegisters::invalid_reg };
--- a/js/src/jit/shared/Lowering-shared.h
+++ b/js/src/jit/shared/Lowering-shared.h
@@ -11,18 +11,16 @@
 // MIRGraph.
 
 #include "jit/LIR.h"
 #include "jit/MIRGenerator.h"
 
 namespace js {
 namespace jit {
 
-class MBasicBlock;
-class MTableSwitch;
 class MIRGenerator;
 class MIRGraph;
 class MDefinition;
 class MInstruction;
 class LOsiPoint;
 
 class LIRGeneratorShared : public MDefinitionVisitor
 {
--- a/js/src/jit/x86-shared/MoveEmitter-x86-shared.h
+++ b/js/src/jit/x86-shared/MoveEmitter-x86-shared.h
@@ -8,18 +8,16 @@
 #define jit_MoveEmitter_x86_shared_h
 
 #include "jit/MacroAssembler.h"
 #include "jit/MoveResolver.h"
 
 namespace js {
 namespace jit {
 
-class CodeGenerator;
-
 class MoveEmitterX86
 {
     bool inCycle_;
     MacroAssembler& masm;
 
     // Original stack push value.
     uint32_t pushedAtStart_;
 
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -32,17 +32,16 @@
 #include "js/Utility.h"
 #include "js/Value.h"
 #include "js/Vector.h"
 
 /************************************************************************/
 
 namespace JS {
 
-class Latin1CharsZ;
 class TwoByteChars;
 
 #ifdef JS_DEBUG
 
 class JS_PUBLIC_API(AutoCheckRequestDepth)
 {
     JSContext* cx;
   public:
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -20,17 +20,16 @@
 #endif
 
 struct DtoaState;
 
 namespace js {
 
 namespace jit {
 class JitContext;
-class CompileCompartment;
 class DebugModeOSRVolatileJitFrameIterator;
 }
 
 typedef HashSet<JSObject*> ObjectSet;
 typedef HashSet<Shape*> ShapeSet;
 
 /* Detects cycles when traversing an object graph. */
 class AutoCycleDetector
@@ -57,18 +56,16 @@ class AutoCycleDetector
     bool foundCycle() { return cyclic; }
 };
 
 /* Updates references in the cycle detection set if the GC moves them. */
 extern void
 TraceCycleDetectionSet(JSTracer* trc, ObjectSet& set);
 
 struct AutoResolving;
-class DtoaCache;
-class RegExpStatics;
 
 namespace frontend { struct CompileError; }
 
 /*
  * Execution Context Overview:
  *
  * Several different structures may be used to provide a context for operations
  * on the VM. Each context is thread local, but varies in what data it can
--- a/js/src/jscompartment.h
+++ b/js/src/jscompartment.h
@@ -120,23 +120,20 @@ struct WrapperHasher : public DefaultHas
     }
 };
 
 typedef HashMap<CrossCompartmentKey, ReadBarrieredValue,
                 WrapperHasher, SystemAllocPolicy> WrapperMap;
 
 } /* namespace js */
 
-namespace JS {
-struct TypeInferenceSizes;
-}
-
 namespace js {
 class DebugScopes;
 class ObjectWeakMap;
+class WatchpointMap;
 class WeakMapBase;
 }
 
 struct JSCompartment
 {
     JS::CompartmentOptions       options_;
 
   private:
--- a/js/src/jsgcinlines.h
+++ b/js/src/jsgcinlines.h
@@ -8,19 +8,16 @@
 #define jsgcinlines_h
 
 #include "jsgc.h"
 
 #include "gc/GCTrace.h"
 #include "gc/Zone.h"
 
 namespace js {
-
-class Shape;
-
 namespace gc {
 
 static inline AllocKind
 GetGCObjectKind(const Class* clasp)
 {
     if (clasp == FunctionClassPtr)
         return JSFunction::FinalizeKind;
     uint32_t nslots = JSCLASS_RESERVED_SLOTS(clasp);
--- a/js/src/jsobj.h
+++ b/js/src/jsobj.h
@@ -30,20 +30,17 @@
 namespace JS {
 struct ClassInfo;
 }
 
 namespace js {
 
 class AutoPropertyDescriptorVector;
 class GCMarker;
-struct NativeIterator;
 class Nursery;
-class ObjectElements;
-struct StackShape;
 
 namespace gc {
 class RelocationOverlay;
 }
 
 inline JSObject*
 CastAsObject(GetterOp op)
 {
@@ -70,21 +67,17 @@ CastAsObjectJsval(SetterOp op)
 
 /******************************************************************************/
 
 extern const Class IntlClass;
 extern const Class JSONClass;
 extern const Class MathClass;
 
 class GlobalObject;
-class MapObject;
 class NewObjectCache;
-class NormalArgumentsObject;
-class SetObject;
-class StrictArgumentsObject;
 
 // Forward declarations, required for later friend declarations.
 bool PreventExtensions(JSContext* cx, JS::HandleObject obj, JS::ObjectOpResult& result);
 bool SetImmutablePrototype(js::ExclusiveContext* cx, JS::HandleObject obj, bool* succeeded);
 
 }  /* namespace js */
 
 /*
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -38,21 +38,21 @@ namespace jit {
 
 # define ION_DISABLED_SCRIPT ((js::jit::IonScript*)0x1)
 # define ION_COMPILING_SCRIPT ((js::jit::IonScript*)0x2)
 
 # define BASELINE_DISABLED_SCRIPT ((js::jit::BaselineScript*)0x1)
 
 class BreakpointSite;
 class BindingIter;
+class Debugger;
 class LazyScript;
 class RegExpObject;
 struct SourceCompressionTask;
 class Shape;
-class WatchpointMap;
 class NestedScopeObject;
 
 namespace frontend {
     struct BytecodeEmitter;
     class UpvarCookie;
 }
 
 }
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -14,25 +14,22 @@
 #include "jsutil.h"
 #include "NamespaceImports.h"
 
 #include "gc/Rooting.h"
 #include "js/RootingAPI.h"
 #include "vm/Unicode.h"
 
 class JSAutoByteString;
-class JSFlatString;
 class JSLinearString;
 
 namespace js {
 
 class StringBuffer;
 
-class MutatingRopeSegmentRange;
-
 template <AllowGC allowGC>
 extern JSString*
 ConcatStrings(ExclusiveContext* cx,
               typename MaybeRooted<JSString*, allowGC>::HandleType left,
               typename MaybeRooted<JSString*, allowGC>::HandleType right);
 
 // Return s advanced past any Unicode white space characters.
 template <typename CharT>
--- a/js/src/jswrapper.h
+++ b/js/src/jswrapper.h
@@ -8,18 +8,16 @@
 #define jswrapper_h
 
 #include "mozilla/Attributes.h"
 
 #include "js/Proxy.h"
 
 namespace js {
 
-class DummyFrameGuard;
-
 /*
  * Helper for Wrapper::New default options.
  *
  * Callers of Wrapper::New() who wish to specify a prototype for the created
  * Wrapper, *MUST* construct a WrapperOptions with a JSContext.
  */
 class MOZ_STACK_CLASS WrapperOptions : public ProxyOptions {
   public:
--- a/js/src/vm/ErrorObject.h
+++ b/js/src/vm/ErrorObject.h
@@ -8,18 +8,16 @@
 #define vm_ErrorObject_h_
 
 #include "mozilla/ArrayUtils.h"
 
 #include "vm/NativeObject.h"
 #include "vm/SavedStacks.h"
 #include "vm/Shape.h"
 
-struct JSExnPrivate;
-
 namespace js {
 
 /*
  * Initialize the exception constructor/prototype hierarchy.
  */
 extern JSObject*
 InitExceptionClasses(JSContext* cx, HandleObject obj);
 
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -277,21 +277,19 @@ class ObjectElements
 static_assert(ObjectElements::VALUES_PER_HEADER * sizeof(HeapSlot) == sizeof(ObjectElements),
               "ObjectElements doesn't fit in the given number of slots");
 
 /* Shared singleton for objects with no elements. */
 extern HeapSlot* const emptyObjectElements;
 
 struct Class;
 class GCMarker;
-struct ObjectOps;
 class Shape;
 
 class NewObjectCache;
-class TaggedProto;
 
 #ifdef DEBUG
 static inline bool
 IsObjectValueInCompartment(Value v, JSCompartment* comp);
 #endif
 
 /*
  * NOTE: This is a placeholder for bug 619558.
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -36,16 +36,17 @@
  * Because of the last point, any code using a RegExpShared (viz., by executing
  * a regexp) must indicate the RegExpShared is active via RegExpGuard.
  */
 namespace js {
 
 struct MatchPair;
 class MatchPairs;
 class RegExpShared;
+class RegExpStatics;
 
 namespace frontend { class TokenStream; }
 
 enum RegExpFlag
 {
     IgnoreCaseFlag  = 0x01,
     GlobalFlag      = 0x02,
     MultilineFlag   = 0x04,
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -564,18 +564,16 @@ class PerThreadData : public PerThreadDa
     void setAutoFlushICache(js::jit::AutoFlushICache* afc);
 
 #if defined(JS_ARM_SIMULATOR) || defined(JS_MIPS_SIMULATOR)
     js::jit::Simulator* simulator() const;
 #endif
 };
 
 class AutoLockForExclusiveAccess;
-
-struct AutoStopwatch;
 } // namespace js
 
 struct JSRuntime : public JS::shadow::Runtime,
                    public js::MallocProvider<JSRuntime>
 {
     /*
      * Per-thread data for the main thread that is associated with
      * this JSRuntime, as opposed to any worker threads used in
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -105,17 +105,16 @@
  * a single BaseShape.
  */
 
 #define JSSLOT_FREE(clasp)  JSCLASS_RESERVED_SLOTS(clasp)
 
 namespace js {
 
 class Bindings;
-class Debugger;
 class Nursery;
 class StaticBlockObject;
 
 typedef JSGetterOp GetterOp;
 typedef JSSetterOp SetterOp;
 typedef JSPropertyDescriptor PropertyDescriptor;
 
 /* Limit on the number of slotful properties in an object. */
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -23,17 +23,16 @@ struct JSCompartment;
 
 namespace js {
 
 class ArgumentsObject;
 class AsmJSModule;
 class InterpreterRegs;
 class CallObject;
 class ScopeObject;
-class ClonedBlockObject;
 class ScriptFrameIter;
 class SPSProfiler;
 class InterpreterFrame;
 class StaticBlockObject;
 
 class ScopeCoordinate;
 
 class SavedFrame;
--- a/js/xpconnect/loader/mozJSLoaderUtils.h
+++ b/js/xpconnect/loader/mozJSLoaderUtils.h
@@ -4,17 +4,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozJSLoaderUtils_h
 #define mozJSLoaderUtils_h
 
 #include "nsString.h"
 
-class nsIURI;
 namespace mozilla {
 namespace scache {
 class StartupCache;
 }
 }
 
 nsresult
 ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri,
--- a/js/xpconnect/public/nsAXPCNativeCallContext.h
+++ b/js/xpconnect/public/nsAXPCNativeCallContext.h
@@ -2,18 +2,16 @@
 /* vim: set ts=8 sts=4 et sw=4 tw=99: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsAXPCNativeCallContext_h__
 #define nsAXPCNativeCallContext_h__
 
-class nsIXPConnectWrappedNative;
-
 /**
 * A native call context is allocated on the stack when XPConnect calls a
 * native method. Holding a pointer to this object beyond the currently
 * executing stack frame is not permitted.
 */
 class nsAXPCNativeCallContext
 {
 public:
--- a/js/xpconnect/src/XPCWrapper.h
+++ b/js/xpconnect/src/XPCWrapper.h
@@ -5,18 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef XPC_WRAPPER_H
 #define XPC_WRAPPER_H 1
 
 #include "xpcprivate.h"
 #include "jswrapper.h"
 
-class nsIScriptSecurityManager;
-
 namespace XPCNativeWrapper {
 
 // Given an XPCWrappedNative pointer and the name of the function on
 // XPCNativeScriptableFlags corresponding with a flag, returns 'true'
 // if the flag is set.
 // XXX Convert to using GetFlags() and not a macro.
 #define NATIVE_HAS_FLAG(_wn, _flag)                                           \
   ((_wn)->GetScriptableInfo() &&                                              \