From 7a263d8818941a0c77c22a50935d0322115fe38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Mon, 19 Feb 2018 05:08:09 -0800 Subject: [PATCH] Bug 1438618: Remove unused using declarations. r=Waldo --- js/src/builtin/DataViewObject.cpp | 1 - js/src/builtin/MapObject.cpp | 2 -- js/src/builtin/Object.cpp | 2 -- js/src/builtin/ReflectParse.cpp | 2 -- js/src/builtin/RegExp.cpp | 2 -- js/src/builtin/SIMD.cpp | 4 ---- js/src/builtin/TypedObject.cpp | 1 - js/src/builtin/intl/IntlObject.cpp | 3 --- js/src/builtin/intl/NumberFormat.cpp | 2 -- js/src/builtin/intl/PluralRules.cpp | 3 --- js/src/builtin/intl/RelativeTimeFormat.cpp | 6 +----- js/src/frontend/ParseNode.cpp | 3 ++- js/src/frontend/TokenStream.cpp | 3 --- js/src/gc/GC.cpp | 2 -- js/src/gc/Marking.cpp | 1 - js/src/gc/Nursery.cpp | 1 - js/src/gc/RootMarking.cpp | 4 ---- js/src/gc/Statistics.cpp | 3 --- js/src/jit/AliasAnalysis.cpp | 2 -- js/src/jit/BaselineDebugModeOSR.cpp | 4 ---- js/src/jit/CacheIRCompiler.cpp | 2 -- js/src/jit/FlowAliasAnalysis.cpp | 2 -- js/src/jit/IonIC.cpp | 4 ---- js/src/jit/MCallOptimize.cpp | 2 -- js/src/jit/RangeAnalysis.cpp | 1 - js/src/jit/SharedIC.cpp | 2 -- js/src/jsapi.cpp | 6 ------ js/src/jsarray.cpp | 2 -- js/src/jsexn.cpp | 5 ----- js/src/jsnum.cpp | 3 +-- js/src/jsstr.cpp | 5 ----- js/src/proxy/ScriptedProxyHandler.cpp | 1 - js/src/vm/ArrayBufferObject.cpp | 1 - js/src/vm/BytecodeUtil.cpp | 2 -- js/src/vm/Debugger.cpp | 2 -- js/src/vm/DebuggerMemory.cpp | 5 ----- js/src/vm/EnvironmentObject.cpp | 9 --------- js/src/vm/HelperThreads.cpp | 3 --- js/src/vm/Interpreter.cpp | 5 ----- js/src/vm/Iteration.cpp | 3 --- js/src/vm/JSCompartment.cpp | 2 -- js/src/vm/JSContext.cpp | 1 - js/src/vm/JSFunction.cpp | 3 --- js/src/vm/JSObject.cpp | 3 --- js/src/vm/JSScript.cpp | 3 --- js/src/vm/MemoryMetrics.cpp | 4 ---- js/src/vm/NativeObject.cpp | 1 - js/src/vm/ObjectGroup.cpp | 1 - js/src/vm/RegExpObject.cpp | 1 - js/src/vm/Runtime.cpp | 2 -- js/src/vm/SavedStacks.cpp | 1 - js/src/vm/Scope.cpp | 5 ----- js/src/vm/SelfHosting.cpp | 1 - js/src/vm/Shape.cpp | 3 --- js/src/vm/SharedArrayObject.cpp | 1 - js/src/vm/Stack.cpp | 3 --- js/src/vm/StructuredClone.cpp | 2 -- js/src/vm/TraceLogging.cpp | 1 - js/src/vm/UbiNode.cpp | 1 - js/src/vm/UnboxedObject.cpp | 1 - js/src/wasm/AsmJS.cpp | 3 --- js/src/wasm/WasmBaselineCompile.cpp | 3 --- js/src/wasm/WasmBinaryToAST.cpp | 2 -- js/src/wasm/WasmBuiltins.cpp | 2 -- js/src/wasm/WasmCode.cpp | 1 - js/src/wasm/WasmFrameIter.cpp | 1 - js/src/wasm/WasmInstance.cpp | 3 --- js/src/wasm/WasmIonCompile.cpp | 1 - js/src/wasm/WasmJS.cpp | 3 --- js/src/wasm/WasmModule.cpp | 2 -- js/src/wasm/WasmTextToBinary.cpp | 1 - 71 files changed, 4 insertions(+), 174 deletions(-) diff --git a/js/src/builtin/DataViewObject.cpp b/js/src/builtin/DataViewObject.cpp index 0eef4cb6913b..74e014e519ec 100644 --- a/js/src/builtin/DataViewObject.cpp +++ b/js/src/builtin/DataViewObject.cpp @@ -38,7 +38,6 @@ using namespace js::gc; using mozilla::AssertedCast; using JS::CanonicalizeNaN; using JS::ToInt32; -using JS::ToUint32; static NewObjectKind DataViewNewObjectKind(JSContext* cx) diff --git a/js/src/builtin/MapObject.cpp b/js/src/builtin/MapObject.cpp index d1ea484fe406..6d8cbd993d44 100644 --- a/js/src/builtin/MapObject.cpp +++ b/js/src/builtin/MapObject.cpp @@ -23,12 +23,10 @@ using namespace js; -using mozilla::ArrayLength; using mozilla::IsNaN; using mozilla::NumberEqualsInt32; using JS::DoubleNaNValue; -using JS::ForOfIterator; /*** HashableValue *******************************************************************************/ diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 5908986db99a..1b81b3431bbc 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -6,7 +6,6 @@ #include "builtin/Object.h" -#include "mozilla/ArrayUtils.h" #include "mozilla/MaybeOneOf.h" #include "jsstr.h" @@ -33,7 +32,6 @@ using namespace js; using js::frontend::IsIdentifier; -using mozilla::ArrayLength; bool js::obj_construct(JSContext* cx, unsigned argc, Value* vp) diff --git a/js/src/builtin/ReflectParse.cpp b/js/src/builtin/ReflectParse.cpp index 27d1b1fe4b1f..01d986d99cc8 100644 --- a/js/src/builtin/ReflectParse.cpp +++ b/js/src/builtin/ReflectParse.cpp @@ -6,7 +6,6 @@ /* JS reflection package. */ -#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/Move.h" @@ -30,7 +29,6 @@ using namespace js; using namespace js::frontend; using JS::AutoValueArray; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::Forward; diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp index 02e5c54e6f75..65b9e49e1b18 100644 --- a/js/src/builtin/RegExp.cpp +++ b/js/src/builtin/RegExp.cpp @@ -25,9 +25,7 @@ using namespace js; using namespace js::unicode; -using mozilla::ArrayLength; using mozilla::CheckedInt; -using mozilla::Maybe; /* * ES 2017 draft rev 6a13789aa9e7c6de4e96b7d3e24d9e6eba6584ad 21.2.5.2.2 diff --git a/js/src/builtin/SIMD.cpp b/js/src/builtin/SIMD.cpp index 7762c765b571..52861141f24b 100644 --- a/js/src/builtin/SIMD.cpp +++ b/js/src/builtin/SIMD.cpp @@ -32,11 +32,7 @@ using namespace js; -using mozilla::ArrayLength; -using mozilla::IsFinite; using mozilla::IsNaN; -using mozilla::FloorLog2; -using mozilla::NumberIsInt32; using mozilla::EnableIf; using mozilla::IsIntegral; using mozilla::IsFloatingPoint; diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp index a23eb0e7df2a..fc8447edbfec 100644 --- a/js/src/builtin/TypedObject.cpp +++ b/js/src/builtin/TypedObject.cpp @@ -30,7 +30,6 @@ using mozilla::AssertedCast; using mozilla::CheckedInt32; -using mozilla::DebugOnly; using mozilla::IsPowerOfTwo; using mozilla::PodCopy; using mozilla::PointerRangeSize; diff --git a/js/src/builtin/intl/IntlObject.cpp b/js/src/builtin/intl/IntlObject.cpp index fe823a86c0e0..2224a1ff9ea2 100644 --- a/js/src/builtin/intl/IntlObject.cpp +++ b/js/src/builtin/intl/IntlObject.cpp @@ -36,10 +36,7 @@ using mozilla::RangedPtr; using js::intl::CallICU; using js::intl::DateTimeFormatOptions; -using js::intl::GetAvailableLocales; using js::intl::IcuLocale; -using js::intl::INITIAL_CHAR_BUFFER_SIZE; -using js::intl::StringsAreEqual; /******************** Intl ********************/ diff --git a/js/src/builtin/intl/NumberFormat.cpp b/js/src/builtin/intl/NumberFormat.cpp index 2702cd43cc5e..fddf63200118 100644 --- a/js/src/builtin/intl/NumberFormat.cpp +++ b/js/src/builtin/intl/NumberFormat.cpp @@ -39,8 +39,6 @@ using js::intl::CallICU; using js::intl::DateTimeFormatOptions; using js::intl::GetAvailableLocales; using js::intl::IcuLocale; -using js::intl::INITIAL_CHAR_BUFFER_SIZE; -using js::intl::StringsAreEqual; const ClassOps NumberFormatObject::classOps_ = { nullptr, /* addProperty */ diff --git a/js/src/builtin/intl/PluralRules.cpp b/js/src/builtin/intl/PluralRules.cpp index 6195bbb98eb6..00527b3db260 100644 --- a/js/src/builtin/intl/PluralRules.cpp +++ b/js/src/builtin/intl/PluralRules.cpp @@ -27,11 +27,8 @@ using namespace js; using mozilla::AssertedCast; using js::intl::CallICU; -using js::intl::DateTimeFormatOptions; using js::intl::GetAvailableLocales; using js::intl::IcuLocale; -using js::intl::INITIAL_CHAR_BUFFER_SIZE; -using js::intl::StringsAreEqual; const ClassOps PluralRulesObject::classOps_ = { nullptr, /* addProperty */ diff --git a/js/src/builtin/intl/RelativeTimeFormat.cpp b/js/src/builtin/intl/RelativeTimeFormat.cpp index 3669f5dad4f6..fb961694d175 100644 --- a/js/src/builtin/intl/RelativeTimeFormat.cpp +++ b/js/src/builtin/intl/RelativeTimeFormat.cpp @@ -9,7 +9,7 @@ #include "builtin/intl/RelativeTimeFormat.h" #include "mozilla/Assertions.h" -#include "mozilla/Casting.h" +#include "mozilla/FloatingPoint.h" #include "builtin/intl/CommonFunctions.h" #include "builtin/intl/ICUStubs.h" @@ -23,14 +23,10 @@ using namespace js; using mozilla::IsNegativeZero; -using mozilla::Range; -using mozilla::RangedPtr; using js::intl::CallICU; -using js::intl::DateTimeFormatOptions; using js::intl::GetAvailableLocales; using js::intl::IcuLocale; -using js::intl::StringsAreEqual; /**************** RelativeTimeFormat *****************/ diff --git a/js/src/frontend/ParseNode.cpp b/js/src/frontend/ParseNode.cpp index 16aba5c92950..4f2c70cda923 100644 --- a/js/src/frontend/ParseNode.cpp +++ b/js/src/frontend/ParseNode.cpp @@ -6,6 +6,8 @@ #include "frontend/ParseNode-inl.h" +#include "mozilla/FloatingPoint.h" + #include "frontend/Parser.h" #include "vm/JSContext-inl.h" @@ -13,7 +15,6 @@ using namespace js; using namespace js::frontend; -using mozilla::ArrayLength; using mozilla::IsFinite; #ifdef DEBUG diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp index 2139556097c7..c2f95238738d 100644 --- a/js/src/frontend/TokenStream.cpp +++ b/js/src/frontend/TokenStream.cpp @@ -35,11 +35,8 @@ using mozilla::ArrayLength; using mozilla::MakeScopeExit; -using mozilla::Maybe; using mozilla::PodArrayZero; -using mozilla::PodAssign; using mozilla::PodCopy; -using mozilla::PodZero; struct ReservedWordInfo { diff --git a/js/src/gc/GC.cpp b/js/src/gc/GC.cpp index aacfef357eaa..7e92ff2a09d1 100644 --- a/js/src/gc/GC.cpp +++ b/js/src/gc/GC.cpp @@ -254,8 +254,6 @@ using namespace js; using namespace js::gc; using mozilla::ArrayLength; -using mozilla::Get; -using mozilla::HashCodeScrambler; using mozilla::Maybe; using mozilla::Move; using mozilla::Swap; diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 3f4898fd707d..2a23ed7bbc50 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -46,7 +46,6 @@ using namespace js::gc; using JS::MapTypeToTraceKind; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::IntegerRange; using mozilla::IsBaseOf; diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp index 06c4032c26de..c9ea726b6a6f 100644 --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -36,7 +36,6 @@ using namespace js; using namespace gc; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::PodCopy; using mozilla::TimeDuration; diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 2e9a72e60c79..63e5d891d69e 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -4,8 +4,6 @@ * 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/. */ -#include "mozilla/ArrayUtils.h" - #ifdef MOZ_VALGRIND # include #endif @@ -30,8 +28,6 @@ using namespace js; using namespace js::gc; -using mozilla::ArrayEnd; - using JS::AutoGCRooter; typedef RootedValueMap::Range RootRange; diff --git a/js/src/gc/Statistics.cpp b/js/src/gc/Statistics.cpp index b75a1074ceb3..33c7d2e7e100 100644 --- a/js/src/gc/Statistics.cpp +++ b/js/src/gc/Statistics.cpp @@ -8,7 +8,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" -#include "mozilla/IntegerRange.h" #include "mozilla/PodOperations.h" #include "mozilla/Sprintf.h" #include "mozilla/TimeStamp.h" @@ -33,8 +32,6 @@ using namespace js::gcstats; using mozilla::DebugOnly; using mozilla::EnumeratedArray; -using mozilla::IntegerRange; -using mozilla::PodArrayZero; using mozilla::PodZero; using mozilla::TimeStamp; using mozilla::TimeDuration; diff --git a/js/src/jit/AliasAnalysis.cpp b/js/src/jit/AliasAnalysis.cpp index 4b3b40a4ac38..1d10665f6a4b 100644 --- a/js/src/jit/AliasAnalysis.cpp +++ b/js/src/jit/AliasAnalysis.cpp @@ -20,8 +20,6 @@ using namespace js; using namespace js::jit; -using mozilla::Array; - namespace js { namespace jit { diff --git a/js/src/jit/BaselineDebugModeOSR.cpp b/js/src/jit/BaselineDebugModeOSR.cpp index cc92cad7ce03..c138e3a0b28a 100644 --- a/js/src/jit/BaselineDebugModeOSR.cpp +++ b/js/src/jit/BaselineDebugModeOSR.cpp @@ -6,8 +6,6 @@ #include "jit/BaselineDebugModeOSR.h" -#include "mozilla/DebugOnly.h" - #include "jit/BaselineIC.h" #include "jit/JitcodeMap.h" #include "jit/Linker.h" @@ -21,8 +19,6 @@ using namespace js; using namespace js::jit; -using mozilla::DebugOnly; - struct DebugModeOSREntry { JSScript* script; diff --git a/js/src/jit/CacheIRCompiler.cpp b/js/src/jit/CacheIRCompiler.cpp index ba86e9a2871e..deb7ede243b0 100644 --- a/js/src/jit/CacheIRCompiler.cpp +++ b/js/src/jit/CacheIRCompiler.cpp @@ -17,8 +17,6 @@ using namespace js; using namespace js::jit; -using mozilla::Maybe; - ValueOperand CacheRegisterAllocator::useValueRegister(MacroAssembler& masm, ValOperandId op) { diff --git a/js/src/jit/FlowAliasAnalysis.cpp b/js/src/jit/FlowAliasAnalysis.cpp index 89d0a410fa3c..b0aec792fa35 100644 --- a/js/src/jit/FlowAliasAnalysis.cpp +++ b/js/src/jit/FlowAliasAnalysis.cpp @@ -20,8 +20,6 @@ using namespace js; using namespace js::jit; -using mozilla::Array; - namespace js { namespace jit { diff --git a/js/src/jit/IonIC.cpp b/js/src/jit/IonIC.cpp index 25738d6366d7..eca5af31c2eb 100644 --- a/js/src/jit/IonIC.cpp +++ b/js/src/jit/IonIC.cpp @@ -6,8 +6,6 @@ #include "jit/IonIC.h" -#include "mozilla/Maybe.h" - #include "jit/CacheIRCompiler.h" #include "jit/Linker.h" @@ -17,8 +15,6 @@ using namespace js; using namespace js::jit; -using mozilla::Maybe; - void IonIC::updateBaseAddress(JitCode* code, MacroAssembler& masm) { diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp index 1d46ba206a8a..643a24e5d291 100644 --- a/js/src/jit/MCallOptimize.cpp +++ b/js/src/jit/MCallOptimize.cpp @@ -42,8 +42,6 @@ using mozilla::AssertedCast; using JS::DoubleNaNValue; using JS::TrackedOutcome; -using JS::TrackedStrategy; -using JS::TrackedTypeSite; namespace js { namespace jit { diff --git a/js/src/jit/RangeAnalysis.cpp b/js/src/jit/RangeAnalysis.cpp index 026cfa9e7a66..01ba80a996b3 100644 --- a/js/src/jit/RangeAnalysis.cpp +++ b/js/src/jit/RangeAnalysis.cpp @@ -30,7 +30,6 @@ using mozilla::ExponentComponent; using mozilla::FloorLog2; using mozilla::IsInfinite; using mozilla::IsNaN; -using mozilla::IsNegative; using mozilla::IsNegativeZero; using mozilla::NegativeInfinity; using mozilla::PositiveInfinity; diff --git a/js/src/jit/SharedIC.cpp b/js/src/jit/SharedIC.cpp index 21b4daf7e32b..1797a491eeef 100644 --- a/js/src/jit/SharedIC.cpp +++ b/js/src/jit/SharedIC.cpp @@ -7,7 +7,6 @@ #include "jit/SharedIC.h" #include "mozilla/Casting.h" -#include "mozilla/DebugOnly.h" #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/Sprintf.h" @@ -32,7 +31,6 @@ #include "vm/Interpreter-inl.h" using mozilla::BitwiseCast; -using mozilla::DebugOnly; namespace js { namespace jit { diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 68a55043b8ed..18bfb7492d17 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -107,14 +107,8 @@ using namespace js::gc; using mozilla::Maybe; using mozilla::PodCopy; -using mozilla::PodZero; using mozilla::Some; -using JS::AutoGCRooter; -using JS::ToInt32; -using JS::ToInteger; -using JS::ToUint32; - #ifdef HAVE_VA_LIST_AS_ARRAY #define JS_ADDRESSOF_VA_LIST(ap) ((va_list*)(ap)) #else diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index c237be74cdb3..a3c6a1d8de02 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -9,7 +9,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/CheckedInt.h" #include "mozilla/DebugOnly.h" -#include "mozilla/FloatingPoint.h" #include "mozilla/MathAlgorithms.h" #include @@ -55,7 +54,6 @@ using mozilla::ArrayLength; using mozilla::CeilingLog2; using mozilla::CheckedInt; using mozilla::DebugOnly; -using mozilla::IsNaN; using JS::AutoCheckCannotGC; using JS::IsArrayAnswer; diff --git a/js/src/jsexn.cpp b/js/src/jsexn.cpp index ed3f4edd3473..5ee7203e95d4 100644 --- a/js/src/jsexn.cpp +++ b/js/src/jsexn.cpp @@ -10,8 +10,6 @@ #include "jsexn.h" -#include "mozilla/ArrayUtils.h" -#include "mozilla/PodOperations.h" #include "mozilla/Sprintf.h" #include @@ -43,9 +41,6 @@ using namespace js; using namespace js::gc; -using mozilla::ArrayLength; -using mozilla::PodArrayZero; - static void exn_finalize(FreeOp* fop, JSObject* obj); diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 16acc83a9f70..4b14a893a2d7 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -10,9 +10,9 @@ #include "jsnum.h" +#include "mozilla/ArrayUtils.h" #include "mozilla/double-conversion.h" #include "mozilla/FloatingPoint.h" -#include "mozilla/PodOperations.h" #include "mozilla/RangedPtr.h" #ifdef HAVE_LOCALECONV @@ -42,7 +42,6 @@ using mozilla::Abs; using mozilla::ArrayLength; using mozilla::MinNumberValue; using mozilla::NegativeInfinity; -using mozilla::PodCopy; using mozilla::PositiveInfinity; using mozilla::RangedPtr; diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index 8e72dc02fb82..b4dafaa1231b 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -8,7 +8,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/Attributes.h" -#include "mozilla/Casting.h" #include "mozilla/CheckedInt.h" #include "mozilla/FloatingPoint.h" #include "mozilla/PodOperations.h" @@ -61,15 +60,11 @@ using namespace js::gc; using JS::Symbol; using JS::SymbolCode; -using JS::ToInt32; -using JS::ToUint32; -using mozilla::AssertedCast; using mozilla::CheckedInt; using mozilla::IsNaN; using mozilla::IsNegativeZero; using mozilla::IsSame; -using mozilla::Move; using mozilla::PodCopy; using mozilla::PodEqual; using mozilla::RangedPtr; diff --git a/js/src/proxy/ScriptedProxyHandler.cpp b/js/src/proxy/ScriptedProxyHandler.cpp index e0f8179cb80e..a4d6919e9be4 100644 --- a/js/src/proxy/ScriptedProxyHandler.cpp +++ b/js/src/proxy/ScriptedProxyHandler.cpp @@ -16,7 +16,6 @@ using namespace js; using JS::IsArrayAnswer; -using mozilla::ArrayLength; // ES8 rev 0c1bd3004329336774cbc90de727cd0cf5f11e93 // 9.1.6.2 IsCompatiblePropertyDescriptor. BUT that method just calls diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp index 9da327078a59..5b519aeac0db 100644 --- a/js/src/vm/ArrayBufferObject.cpp +++ b/js/src/vm/ArrayBufferObject.cpp @@ -55,7 +55,6 @@ using JS::ToInt32; -using mozilla::DebugOnly; using mozilla::CheckedInt; using mozilla::Some; using mozilla::Maybe; diff --git a/js/src/vm/BytecodeUtil.cpp b/js/src/vm/BytecodeUtil.cpp index 8468a1c90ec8..c17daf344755 100644 --- a/js/src/vm/BytecodeUtil.cpp +++ b/js/src/vm/BytecodeUtil.cpp @@ -56,8 +56,6 @@ using namespace js; using namespace js::gc; -using JS::AutoCheckCannotGC; - using js::frontend::IsIdentifier; /* diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index 67e395287e75..3650f3c3cc9e 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -55,13 +55,11 @@ using namespace js; using JS::dbg::AutoEntryMonitor; using JS::dbg::Builder; using js::frontend::IsIdentifier; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::MakeScopeExit; using mozilla::Maybe; using mozilla::Some; using mozilla::Nothing; -using mozilla::Variant; using mozilla::AsVariant; using mozilla::TimeDuration; using mozilla::TimeStamp; diff --git a/js/src/vm/DebuggerMemory.cpp b/js/src/vm/DebuggerMemory.cpp index 19288072a6ca..ab8b97bcf3ce 100644 --- a/js/src/vm/DebuggerMemory.cpp +++ b/js/src/vm/DebuggerMemory.cpp @@ -32,13 +32,8 @@ using namespace js; -using JS::ubi::BreadthFirst; -using JS::ubi::Edge; -using JS::ubi::Node; - using mozilla::Forward; using mozilla::Maybe; -using mozilla::Move; using mozilla::Nothing; /* static */ DebuggerMemory* diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp index 236c49e75a8a..7c6ddba355a4 100644 --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -6,9 +6,6 @@ #include "vm/EnvironmentObject-inl.h" -#include "mozilla/PodOperations.h" -#include "mozilla/ScopeExit.h" - #include "builtin/ModuleObject.h" #include "gc/Policy.h" #include "vm/ArgumentsObject.h" @@ -31,12 +28,6 @@ using namespace js; using namespace js::gc; -using mozilla::PodZero; -using mozilla::Maybe; -using mozilla::Some; -using mozilla::Nothing; -using mozilla::MakeScopeExit; - typedef Rooted RootedArgumentsObject; typedef MutableHandle MutableHandleArgumentsObject; diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp index 448e86edeb5f..e9b5658c9e5f 100644 --- a/js/src/vm/HelperThreads.cpp +++ b/js/src/vm/HelperThreads.cpp @@ -6,7 +6,6 @@ #include "vm/HelperThreads.h" -#include "mozilla/DebugOnly.h" #include "mozilla/Maybe.h" #include "mozilla/Unused.h" @@ -33,8 +32,6 @@ using namespace js; -using mozilla::ArrayLength; -using mozilla::DebugOnly; using mozilla::Maybe; using mozilla::Unused; using mozilla::TimeDuration; diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index d9efb58cc3a5..109b0f0fe8f2 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -10,11 +10,9 @@ #include "vm/Interpreter-inl.h" -#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/FloatingPoint.h" #include "mozilla/Maybe.h" -#include "mozilla/PodOperations.h" #include "mozilla/Sprintf.h" #include @@ -65,11 +63,8 @@ using namespace js; using namespace js::gc; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::NumberEqualsInt32; -using mozilla::PodCopy; -using JS::ForOfIterator; template static MOZ_ALWAYS_INLINE bool diff --git a/js/src/vm/Iteration.cpp b/js/src/vm/Iteration.cpp index 508f72766ea2..bf5d25d0db15 100644 --- a/js/src/vm/Iteration.cpp +++ b/js/src/vm/Iteration.cpp @@ -8,7 +8,6 @@ #include "vm/Iteration.h" -#include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" #include "mozilla/Maybe.h" #include "mozilla/MemoryReporting.h" @@ -42,9 +41,7 @@ using namespace js; using namespace js::gc; -using JS::ForOfIterator; -using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::Maybe; using mozilla::PodCopy; diff --git a/js/src/vm/JSCompartment.cpp b/js/src/vm/JSCompartment.cpp index c36526564580..c977497fb6eb 100644 --- a/js/src/vm/JSCompartment.cpp +++ b/js/src/vm/JSCompartment.cpp @@ -6,7 +6,6 @@ #include "vm/JSCompartment-inl.h" -#include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include @@ -40,7 +39,6 @@ using namespace js; using namespace js::gc; using namespace js::jit; -using mozilla::DebugOnly; using mozilla::PodArrayZero; JSCompartment::JSCompartment(Zone* zone, const JS::CompartmentOptions& options = JS::CompartmentOptions()) diff --git a/js/src/vm/JSContext.cpp b/js/src/vm/JSContext.cpp index 3d43acc03640..ea25b7675e15 100644 --- a/js/src/vm/JSContext.cpp +++ b/js/src/vm/JSContext.cpp @@ -62,7 +62,6 @@ using namespace js::gc; using mozilla::DebugOnly; using mozilla::PodArrayZero; -using mozilla::PointerRangeSize; bool js::AutoCycleDetector::init() diff --git a/js/src/vm/JSFunction.cpp b/js/src/vm/JSFunction.cpp index 7c809edbb8b3..fed6f483dffe 100644 --- a/js/src/vm/JSFunction.cpp +++ b/js/src/vm/JSFunction.cpp @@ -13,7 +13,6 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/CheckedInt.h" #include "mozilla/Maybe.h" -#include "mozilla/PodOperations.h" #include "mozilla/Range.h" #include @@ -62,8 +61,6 @@ using namespace js::frontend; using mozilla::ArrayLength; using mozilla::Maybe; -using mozilla::PodCopy; -using mozilla::RangedPtr; using mozilla::Some; static bool diff --git a/js/src/vm/JSObject.cpp b/js/src/vm/JSObject.cpp index 43eff12626ef..21589ed8b745 100644 --- a/js/src/vm/JSObject.cpp +++ b/js/src/vm/JSObject.cpp @@ -73,9 +73,6 @@ using namespace js; using namespace js::gc; -using mozilla::DebugOnly; -using mozilla::Maybe; - void js::ReportNotObject(JSContext* cx, const Value& v) { diff --git a/js/src/vm/JSScript.cpp b/js/src/vm/JSScript.cpp index 129d516cf1af..a197c25e04ad 100644 --- a/js/src/vm/JSScript.cpp +++ b/js/src/vm/JSScript.cpp @@ -11,7 +11,6 @@ #include "vm/JSScript-inl.h" #include "mozilla/DebugOnly.h" -#include "mozilla/MathAlgorithms.h" #include "mozilla/MemoryReporting.h" #include "mozilla/PodOperations.h" #include "mozilla/ScopeExit.h" @@ -65,10 +64,8 @@ using namespace js; using namespace js::gc; using namespace js::frontend; -using mozilla::AsVariant; using mozilla::PodCopy; using mozilla::PodZero; -using mozilla::RotateLeft; // Check that JSScript::data hasn't experienced obvious memory corruption. diff --git a/js/src/vm/MemoryMetrics.cpp b/js/src/vm/MemoryMetrics.cpp index c4fb0d3eefc7..1cb6fa154cdc 100644 --- a/js/src/vm/MemoryMetrics.cpp +++ b/js/src/vm/MemoryMetrics.cpp @@ -6,8 +6,6 @@ #include "js/MemoryMetrics.h" -#include "mozilla/DebugOnly.h" - #include "gc/GC.h" #include "gc/Heap.h" #include "gc/Nursery.h" @@ -27,11 +25,9 @@ #include "wasm/WasmJS.h" #include "wasm/WasmModule.h" -using mozilla::DebugOnly; using mozilla::MallocSizeOf; using mozilla::Move; using mozilla::PodCopy; -using mozilla::PodEqual; using namespace js; diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp index 8f1ef27301d3..3c7303359e7c 100644 --- a/js/src/vm/NativeObject.cpp +++ b/js/src/vm/NativeObject.cpp @@ -24,7 +24,6 @@ using namespace js; using JS::AutoCheckCannotGC; -using JS::GenericNaN; using mozilla::ArrayLength; using mozilla::CheckedInt; using mozilla::DebugOnly; diff --git a/js/src/vm/ObjectGroup.cpp b/js/src/vm/ObjectGroup.cpp index 87801cc77ade..8147ec208e67 100644 --- a/js/src/vm/ObjectGroup.cpp +++ b/js/src/vm/ObjectGroup.cpp @@ -26,7 +26,6 @@ using namespace js; -using mozilla::DebugOnly; using mozilla::PodZero; ///////////////////////////////////////////////////////////////////// diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp index 456b44cc24ff..1ed9b3952307 100644 --- a/js/src/vm/RegExpObject.cpp +++ b/js/src/vm/RegExpObject.cpp @@ -38,7 +38,6 @@ using namespace js; using mozilla::ArrayLength; using mozilla::DebugOnly; -using mozilla::Maybe; using mozilla::PodCopy; using js::frontend::TokenStream; diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 0b46219f58a1..7a44639aeb45 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -57,9 +57,7 @@ using mozilla::Atomic; using mozilla::DebugOnly; using mozilla::NegativeInfinity; using mozilla::PodZero; -using mozilla::PodArrayZero; using mozilla::PositiveInfinity; -using JS::GenericNaN; using JS::DoubleNaNValue; /* static */ MOZ_THREAD_LOCAL(JSContext*) js::TlsContext; diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index 926cc770d48b..d70595121092 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -42,7 +42,6 @@ using mozilla::AddToHash; using mozilla::DebugOnly; -using mozilla::HashString; using mozilla::Maybe; using mozilla::Move; using mozilla::Nothing; diff --git a/js/src/vm/Scope.cpp b/js/src/vm/Scope.cpp index a3c61aa51b52..969aa48317f7 100644 --- a/js/src/vm/Scope.cpp +++ b/js/src/vm/Scope.cpp @@ -6,8 +6,6 @@ #include "vm/Scope.h" -#include "mozilla/ScopeExit.h" - #include "builtin/ModuleObject.h" #include "gc/Allocator.h" #include "gc/FreeOp.h" @@ -22,10 +20,7 @@ using namespace js; using mozilla::Maybe; -using mozilla::MakeScopeExit; using mozilla::Move; -using mozilla::Nothing; -using mozilla::Some; const char* js::BindingKindString(BindingKind kind) diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp index 95b05e041c67..2b3c0c6b5b7d 100644 --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -72,7 +72,6 @@ using namespace js::selfhosted; using JS::AutoCheckCannotGC; using mozilla::IsInRange; using mozilla::Maybe; -using mozilla::PodMove; static void selfHosting_WarningReporter(JSContext* cx, JSErrorReport* report) diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp index 21c7c0b1f6b0..9211dba3921f 100644 --- a/js/src/vm/Shape.cpp +++ b/js/src/vm/Shape.cpp @@ -8,7 +8,6 @@ #include "vm/Shape-inl.h" -#include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/PodOperations.h" @@ -31,9 +30,7 @@ using namespace js; using namespace js::gc; using mozilla::CeilingLog2Size; -using mozilla::DebugOnly; using mozilla::PodZero; -using mozilla::RotateLeft; using JS::AutoCheckCannotGC; diff --git a/js/src/vm/SharedArrayObject.cpp b/js/src/vm/SharedArrayObject.cpp index 1043c5ca95f6..f7b6bba07e1e 100644 --- a/js/src/vm/SharedArrayObject.cpp +++ b/js/src/vm/SharedArrayObject.cpp @@ -23,7 +23,6 @@ #include "vm/JSObject-inl.h" #include "vm/NativeObject-inl.h" -using mozilla::Some; using mozilla::Maybe; using mozilla::Nothing; using mozilla::CheckedInt; diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp index 53c68b45fb26..6853367a7753 100644 --- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -6,8 +6,6 @@ #include "vm/Stack-inl.h" -#include "mozilla/PodOperations.h" - #include "gc/Marking.h" #include "jit/BaselineFrame.h" #include "jit/JitcodeMap.h" @@ -26,7 +24,6 @@ using namespace js; using mozilla::ArrayLength; using mozilla::DebugOnly; using mozilla::Maybe; -using mozilla::PodCopy; /*****************************************************************************/ diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp index 37b31ca03a28..530436f89eb6 100644 --- a/js/src/vm/StructuredClone.cpp +++ b/js/src/vm/StructuredClone.cpp @@ -57,8 +57,6 @@ using namespace js; using mozilla::BitwiseCast; -using mozilla::IsNaN; -using mozilla::LittleEndian; using mozilla::NativeEndian; using mozilla::NumbersAreIdentical; using JS::CanonicalizeNaN; diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp index c45110c751ef..507121fd8da2 100644 --- a/js/src/vm/TraceLogging.cpp +++ b/js/src/vm/TraceLogging.cpp @@ -29,7 +29,6 @@ using namespace js; using namespace js::jit; using mozilla::DebugOnly; -using mozilla::NativeEndian; TraceLoggerThreadState* traceLoggerState = nullptr; diff --git a/js/src/vm/UbiNode.cpp b/js/src/vm/UbiNode.cpp index 558adf221881..c8d49b9c7399 100644 --- a/js/src/vm/UbiNode.cpp +++ b/js/src/vm/UbiNode.cpp @@ -37,7 +37,6 @@ using namespace js; -using mozilla::Some; using mozilla::RangedPtr; using JS::DispatchTyped; using JS::HandleValue; diff --git a/js/src/vm/UnboxedObject.cpp b/js/src/vm/UnboxedObject.cpp index 8858d64f1b12..7ea89d2f2184 100644 --- a/js/src/vm/UnboxedObject.cpp +++ b/js/src/vm/UnboxedObject.cpp @@ -17,7 +17,6 @@ #include "vm/Shape-inl.h" using mozilla::ArrayLength; -using mozilla::DebugOnly; using mozilla::PodCopy; using namespace js; diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 74653193cd95..87bc2bd40de0 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -21,7 +21,6 @@ #include "mozilla/Attributes.h" #include "mozilla/Compression.h" #include "mozilla/MathAlgorithms.h" -#include "mozilla/Maybe.h" #include "mozilla/Unused.h" #include "jsmath.h" @@ -63,9 +62,7 @@ using mozilla::IsNaN; using mozilla::IsNegativeZero; using mozilla::IsPositiveZero; using mozilla::IsPowerOfTwo; -using mozilla::Maybe; using mozilla::Move; -using mozilla::PodCopy; using mozilla::PodEqual; using mozilla::PodZero; using mozilla::PositiveInfinity; diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index 74c1720c8783..ecc89e10e19d 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -135,17 +135,14 @@ #include "jit/MacroAssembler-inl.h" using mozilla::DebugOnly; -using mozilla::FloatingPoint; using mozilla::FloorLog2; using mozilla::IsPowerOfTwo; using mozilla::Maybe; -using mozilla::SpecificNaN; namespace js { namespace wasm { using namespace js::jit; -using JS::GenericNaN; typedef bool HandleNaNSpecially; typedef bool InvertBranch; diff --git a/js/src/wasm/WasmBinaryToAST.cpp b/js/src/wasm/WasmBinaryToAST.cpp index 6d8de46b5390..661b05e3c453 100644 --- a/js/src/wasm/WasmBinaryToAST.cpp +++ b/js/src/wasm/WasmBinaryToAST.cpp @@ -18,7 +18,6 @@ #include "wasm/WasmBinaryToAST.h" -#include "mozilla/CheckedInt.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/Sprintf.h" @@ -30,7 +29,6 @@ using namespace js; using namespace js::wasm; -using mozilla::CheckedInt; using mozilla::FloorLog2; enum AstDecodeTerminationKind diff --git a/js/src/wasm/WasmBuiltins.cpp b/js/src/wasm/WasmBuiltins.cpp index 51f37504fd9b..61119c760f55 100644 --- a/js/src/wasm/WasmBuiltins.cpp +++ b/js/src/wasm/WasmBuiltins.cpp @@ -19,7 +19,6 @@ #include "wasm/WasmBuiltins.h" #include "mozilla/Atomics.h" -#include "mozilla/BinarySearch.h" #include "fdlibm.h" #include "jslibmath.h" @@ -38,7 +37,6 @@ using namespace js; using namespace jit; using namespace wasm; -using mozilla::BinarySearchIf; using mozilla::HashGeneric; using mozilla::IsNaN; using mozilla::MakeEnumeratedRange; diff --git a/js/src/wasm/WasmCode.cpp b/js/src/wasm/WasmCode.cpp index 4754db86d633..27c79bc83121 100644 --- a/js/src/wasm/WasmCode.cpp +++ b/js/src/wasm/WasmCode.cpp @@ -38,7 +38,6 @@ using namespace js::wasm; using mozilla::BinarySearch; using mozilla::MakeEnumeratedRange; using mozilla::PodAssign; -using JS::GenericNaN; bool CodeSegment::registerInProcessMap() diff --git a/js/src/wasm/WasmFrameIter.cpp b/js/src/wasm/WasmFrameIter.cpp index 23514ee5fc26..05209f4eb115 100644 --- a/js/src/wasm/WasmFrameIter.cpp +++ b/js/src/wasm/WasmFrameIter.cpp @@ -29,7 +29,6 @@ using namespace js::wasm; using mozilla::DebugOnly; using mozilla::Maybe; -using mozilla::Swap; /*****************************************************************************/ // WasmFrameIter implementation diff --git a/js/src/wasm/WasmInstance.cpp b/js/src/wasm/WasmInstance.cpp index c199e2f778a2..ee7e03627b60 100644 --- a/js/src/wasm/WasmInstance.cpp +++ b/js/src/wasm/WasmInstance.cpp @@ -31,10 +31,7 @@ using namespace js; using namespace js::jit; using namespace js::wasm; -using mozilla::BinarySearch; using mozilla::BitwiseCast; -using mozilla::IsNaN; -using mozilla::Swap; class SigIdSet { diff --git a/js/src/wasm/WasmIonCompile.cpp b/js/src/wasm/WasmIonCompile.cpp index bd717ffeb0ba..428d91699c5c 100644 --- a/js/src/wasm/WasmIonCompile.cpp +++ b/js/src/wasm/WasmIonCompile.cpp @@ -32,7 +32,6 @@ using namespace js; using namespace js::jit; using namespace js::wasm; -using mozilla::DebugOnly; using mozilla::IsPowerOfTwo; using mozilla::Maybe; using mozilla::Nothing; diff --git a/js/src/wasm/WasmJS.cpp b/js/src/wasm/WasmJS.cpp index 3762975da5b9..7a40032ba90a 100644 --- a/js/src/wasm/WasmJS.cpp +++ b/js/src/wasm/WasmJS.cpp @@ -46,10 +46,7 @@ using namespace js; using namespace js::jit; using namespace js::wasm; -using mozilla::BitwiseCast; using mozilla::CheckedInt; -using mozilla::IsNaN; -using mozilla::IsSame; using mozilla::Nothing; using mozilla::RangedPtr; diff --git a/js/src/wasm/WasmModule.cpp b/js/src/wasm/WasmModule.cpp index b09110379a7e..20199504c90e 100644 --- a/js/src/wasm/WasmModule.cpp +++ b/js/src/wasm/WasmModule.cpp @@ -37,8 +37,6 @@ using namespace js; using namespace js::jit; using namespace js::wasm; -using mozilla::IsNaN; - size_t LinkDataTier::SymbolicLinkArray::serializedSize() const { diff --git a/js/src/wasm/WasmTextToBinary.cpp b/js/src/wasm/WasmTextToBinary.cpp index b02e3035a6e4..5494a63cbfa3 100644 --- a/js/src/wasm/WasmTextToBinary.cpp +++ b/js/src/wasm/WasmTextToBinary.cpp @@ -45,7 +45,6 @@ using mozilla::FloatingPoint; using mozilla::IsPowerOfTwo; using mozilla::Maybe; using mozilla::PositiveInfinity; -using mozilla::SpecificNaN; /*****************************************************************************/ // wasm text token stream