diff --git a/js/ipc/CPOWTimer.cpp b/js/ipc/CPOWTimer.cpp index 2dc25806d061..2aa6d0e36f4e 100644 --- a/js/ipc/CPOWTimer.cpp +++ b/js/ipc/CPOWTimer.cpp @@ -19,7 +19,7 @@ CPOWTimer::~CPOWTimer() if (!js::IsStopwatchActive(runtime)) return; - js::PerformanceData *performance = js::GetPerformanceData(runtime); + js::PerformanceData* performance = js::GetPerformanceData(runtime); uint64_t duration = PR_IntervalToMicroseconds(PR_IntervalNow() - startInterval); performance->totalCPOWTime += duration; } diff --git a/js/public/TracingAPI.h b/js/public/TracingAPI.h index d55bfe943654..a79d7fc5e161 100644 --- a/js/public/TracingAPI.h +++ b/js/public/TracingAPI.h @@ -219,7 +219,7 @@ class JS_PUBLIC_API(CallbackTracer) : public JSTracer class AutoTracingName { CallbackTracer* trc_; - const char *prior_; + const char* prior_; public: AutoTracingName(CallbackTracer* trc, const char* name) : trc_(trc), prior_(trc->contextName_) { @@ -290,7 +290,7 @@ class AutoTracingDetails class AutoOriginalTraceLocation { #ifdef JS_GC_ZEAL - CallbackTracer *trc_; + CallbackTracer* trc_; public: template diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 9be542b9533a..a355cfef6c01 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -211,7 +211,7 @@ GetBuildConfiguration(JSContext* cx, unsigned argc, jsval* vp) if (!JS_SetProperty(cx, info, "moz-memory", value)) return false; - value.setInt32(sizeof(void *)); + value.setInt32(sizeof(void*)); if (!JS_SetProperty(cx, info, "pointer-byte-size", value)) return false; diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h index c30fe5b9e89f..672ff6a68fab 100644 --- a/js/src/gc/Barrier.h +++ b/js/src/gc/Barrier.h @@ -404,7 +404,7 @@ struct InternalGCMethods static JS::shadow::Runtime* shadowRuntimeFromAnyThread(jsid id) { return reinterpret_cast(runtimeFromAnyThread(id)); } - static void preBarrierImpl(Zone *zone, jsid id) { + static void preBarrierImpl(Zone* zone, jsid id) { JS::shadow::Zone* shadowZone = JS::shadow::Zone::asShadowZone(zone); if (shadowZone->needsIncrementalBarrier()) { jsid tmp(id); diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index f16801ad3132..39b70cbd961a 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -351,13 +351,13 @@ ICStub::trace(JSTracer* trc) break; } case ICStub::In_Native: { - ICIn_Native *inStub = toIn_Native(); + ICIn_Native* inStub = toIn_Native(); TraceEdge(trc, &inStub->shape(), "baseline-innative-stub-shape"); TraceEdge(trc, &inStub->name(), "baseline-innative-stub-name"); break; } case ICStub::In_NativePrototype: { - ICIn_NativePrototype *inStub = toIn_NativePrototype(); + ICIn_NativePrototype* inStub = toIn_NativePrototype(); TraceEdge(trc, &inStub->shape(), "baseline-innativeproto-stub-shape"); TraceEdge(trc, &inStub->name(), "baseline-innativeproto-stub-name"); TraceEdge(trc, &inStub->holder(), "baseline-innativeproto-stub-holder"); @@ -365,7 +365,7 @@ ICStub::trace(JSTracer* trc) break; } case ICStub::In_NativeDoesNotExist: { - ICIn_NativeDoesNotExist *inStub = toIn_NativeDoesNotExist(); + ICIn_NativeDoesNotExist* inStub = toIn_NativeDoesNotExist(); TraceEdge(trc, &inStub->name(), "baseline-innativedoesnotexist-stub-name"); JS_STATIC_ASSERT(ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH == 8); switch (inStub->protoChainDepth()) { @@ -383,7 +383,7 @@ ICStub::trace(JSTracer* trc) break; } case ICStub::In_Dense: { - ICIn_Dense *inStub = toIn_Dense(); + ICIn_Dense* inStub = toIn_Dense(); TraceEdge(trc, &inStub->shape(), "baseline-in-dense-shape"); break; } @@ -3806,7 +3806,7 @@ ArgumentsGetElemStubExists(ICGetElem_Fallback* stub, ICGetElem_Arguments::Which } static bool -IsOptimizableElementPropertyName(JSContext *cx, HandleValue key, MutableHandleId idp) +IsOptimizableElementPropertyName(JSContext* cx, HandleValue key, MutableHandleId idp) { if (!key.isString()) return false; @@ -5856,8 +5856,8 @@ ICSetElem_TypedArray::Compiler::generateStubCode(MacroAssembler& masm) // static bool -TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, - HandleValue key, HandleObject obj, bool *attached) +TryAttachDenseInStub(JSContext* cx, HandleScript script, ICIn_Fallback* stub, + HandleValue key, HandleObject obj, bool* attached) { MOZ_ASSERT(!*attached); @@ -5866,7 +5866,7 @@ TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, JitSpew(JitSpew_BaselineIC, " Generating In(Native[Int32] dense) stub"); ICIn_Dense::Compiler compiler(cx, obj->as().lastProperty()); - ICStub *denseStub = compiler.getStub(compiler.getStubSpace(script)); + ICStub* denseStub = compiler.getStub(compiler.getStubSpace(script)); if (!denseStub) return false; @@ -5876,8 +5876,8 @@ TryAttachDenseInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, } static bool -TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, - HandleValue key, HandleObject obj, bool *attached) +TryAttachNativeInStub(JSContext* cx, HandleScript script, ICIn_Fallback* stub, + HandleValue key, HandleObject obj, bool* attached) { MOZ_ASSERT(!*attached); @@ -5897,7 +5897,7 @@ TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, JitSpew(JitSpew_BaselineIC, " Generating In(Native %s) stub", (obj == holder) ? "direct" : "prototype"); ICInNativeCompiler compiler(cx, kind, obj, holder, name); - ICStub *newStub = compiler.getStub(compiler.getStubSpace(script)); + ICStub* newStub = compiler.getStub(compiler.getStubSpace(script)); if (!newStub) return false; @@ -5910,9 +5910,9 @@ TryAttachNativeInStub(JSContext *cx, HandleScript script, ICIn_Fallback *stub, } static bool -TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script, - ICIn_Fallback *stub, HandleValue key, - HandleObject obj, bool *attached) +TryAttachNativeInDoesNotExistStub(JSContext* cx, HandleScript script, + ICIn_Fallback* stub, HandleValue key, + HandleObject obj, bool* attached) { MOZ_ASSERT(!*attached); @@ -5934,7 +5934,7 @@ TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script, // Confirmed no-such-property. Add stub. JitSpew(JitSpew_BaselineIC, " Generating In_NativeDoesNotExist stub"); ICInNativeDoesNotExistCompiler compiler(cx, obj, name, protoChainDepth); - ICStub *newStub = compiler.getStub(compiler.getStubSpace(script)); + ICStub* newStub = compiler.getStub(compiler.getStubSpace(script)); if (!newStub) return false; @@ -5944,7 +5944,7 @@ TryAttachNativeInDoesNotExistStub(JSContext *cx, HandleScript script, } static bool -DoInFallback(JSContext *cx, BaselineFrame *frame, ICIn_Fallback *stub_, +DoInFallback(JSContext* cx, BaselineFrame* frame, ICIn_Fallback* stub_, HandleValue key, HandleValue objValue, MutableHandleValue res) { // This fallback stub may trigger debug mode toggling. @@ -5993,7 +5993,7 @@ DoInFallback(JSContext *cx, BaselineFrame *frame, ICIn_Fallback *stub_, return true; } -typedef bool (*DoInFallbackFn)(JSContext *, BaselineFrame *, ICIn_Fallback *, HandleValue, +typedef bool (*DoInFallbackFn)(JSContext*, BaselineFrame*, ICIn_Fallback*, HandleValue, HandleValue, MutableHandleValue); static const VMFunction DoInFallbackInfo = FunctionInfo(DoInFallback, TailCall, PopValues(2)); @@ -6017,7 +6017,7 @@ ICIn_Fallback::Compiler::generateStubCode(MacroAssembler& masm) } bool -ICInNativeCompiler::generateStubCode(MacroAssembler &masm) +ICInNativeCompiler::generateStubCode(MacroAssembler& masm) { Label failure, failurePopR0Scratch; @@ -6061,8 +6061,8 @@ ICInNativeCompiler::generateStubCode(MacroAssembler &masm) return true; } -ICStub * -ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space) +ICStub* +ICInNativeDoesNotExistCompiler::getStub(ICStubSpace* space) { AutoShapeVector shapes(cx); if (!shapes.append(obj_->as().lastProperty())) @@ -6073,7 +6073,7 @@ ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space) JS_STATIC_ASSERT(ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH == 8); - ICStub *stub = nullptr; + ICStub* stub = nullptr; switch (protoChainDepth_) { case 0: stub = getStubSpecific<0>(space, &shapes); break; case 1: stub = getStubSpecific<1>(space, &shapes); break; @@ -6092,7 +6092,7 @@ ICInNativeDoesNotExistCompiler::getStub(ICStubSpace *space) } bool -ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler &masm) +ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler& masm) { Label failure, failurePopR0Scratch; @@ -6149,7 +6149,7 @@ ICInNativeDoesNotExistCompiler::generateStubCode(MacroAssembler &masm) } bool -ICIn_Dense::Compiler::generateStubCode(MacroAssembler &masm) +ICIn_Dense::Compiler::generateStubCode(MacroAssembler& masm) { Label failure; @@ -7335,10 +7335,10 @@ TryAttachPrimitiveGetPropStub(JSContext* cx, HandleScript script, jsbytecode* pc } static bool -TryAttachNativeGetPropDoesNotExistStub(JSContext *cx, HandleScript script, - jsbytecode *pc, ICGetProp_Fallback *stub, +TryAttachNativeGetPropDoesNotExistStub(JSContext* cx, HandleScript script, + jsbytecode* pc, ICGetProp_Fallback* stub, HandlePropertyName name, HandleValue val, - bool *attached) + bool* attached) { MOZ_ASSERT(!*attached); @@ -12372,14 +12372,14 @@ ICSetElem_TypedArray::ICSetElem_TypedArray(JitCode* stubCode, Shape* shape, Scal extra_ |= (static_cast(expectOutOfBounds) << 8); } -ICInNativeStub::ICInNativeStub(ICStub::Kind kind, JitCode *stubCode, HandleShape shape, +ICInNativeStub::ICInNativeStub(ICStub::Kind kind, JitCode* stubCode, HandleShape shape, HandlePropertyName name) : ICStub(kind, stubCode), shape_(shape), name_(name) { } -ICIn_NativePrototype::ICIn_NativePrototype(JitCode *stubCode, HandleShape shape, +ICIn_NativePrototype::ICIn_NativePrototype(JitCode* stubCode, HandleShape shape, HandlePropertyName name, HandleObject holder, HandleShape holderShape) : ICInNativeStub(In_NativePrototype, stubCode, shape, name), @@ -12387,7 +12387,7 @@ ICIn_NativePrototype::ICIn_NativePrototype(JitCode *stubCode, HandleShape shape, holderShape_(holderShape) { } -ICIn_NativeDoesNotExist::ICIn_NativeDoesNotExist(JitCode *stubCode, size_t protoChainDepth, +ICIn_NativeDoesNotExist::ICIn_NativeDoesNotExist(JitCode* stubCode, size_t protoChainDepth, HandlePropertyName name) : ICStub(In_NativeDoesNotExist, stubCode), name_(name) @@ -12407,7 +12407,7 @@ ICIn_NativeDoesNotExist::offsetOfShape(size_t idx) template ICIn_NativeDoesNotExistImpl::ICIn_NativeDoesNotExistImpl( - JitCode *stubCode, const AutoShapeVector *shapes, HandlePropertyName name) + JitCode* stubCode, const AutoShapeVector* shapes, HandlePropertyName name) : ICIn_NativeDoesNotExist(stubCode, ProtoChainDepth, name) { MOZ_ASSERT(shapes->length() == NumShapes); @@ -12416,7 +12416,7 @@ ICIn_NativeDoesNotExistImpl::ICIn_NativeDoesNotExistImpl( } ICInNativeDoesNotExistCompiler::ICInNativeDoesNotExistCompiler( - JSContext *cx, HandleObject obj, HandlePropertyName name, size_t protoChainDepth) + JSContext* cx, HandleObject obj, HandlePropertyName name, size_t protoChainDepth) : ICStubCompiler(cx, ICStub::In_NativeDoesNotExist), obj_(cx, obj), name_(cx, name), @@ -12425,7 +12425,7 @@ ICInNativeDoesNotExistCompiler::ICInNativeDoesNotExistCompiler( MOZ_ASSERT(protoChainDepth_ <= ICIn_NativeDoesNotExist::MAX_PROTO_CHAIN_DEPTH); } -ICIn_Dense::ICIn_Dense(JitCode *stubCode, HandleShape shape) +ICIn_Dense::ICIn_Dense(JitCode* stubCode, HandleShape shape) : ICStub(In_Dense, stubCode), shape_(shape) { } diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h index b0949ba825e1..a9b935bf05b9 100644 --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -3422,18 +3422,18 @@ class ICInNativeStub : public ICStub HeapPtrPropertyName name_; protected: - ICInNativeStub(ICStub::Kind kind, JitCode *stubCode, HandleShape shape, + ICInNativeStub(ICStub::Kind kind, JitCode* stubCode, HandleShape shape, HandlePropertyName name); public: - HeapPtrShape &shape() { + HeapPtrShape& shape() { return shape_; } static size_t offsetOfShape() { return offsetof(ICInNativeStub, shape_); } - HeapPtrPropertyName &name() { + HeapPtrPropertyName& name() { return name_; } static size_t offsetOfName() { @@ -3446,7 +3446,7 @@ class ICIn_Native : public ICInNativeStub { friend class ICStubSpace; - ICIn_Native(JitCode *stubCode, HandleShape shape, HandlePropertyName name) + ICIn_Native(JitCode* stubCode, HandleShape shape, HandlePropertyName name) : ICInNativeStub(In_Native, stubCode, shape, name) {} }; @@ -3461,14 +3461,14 @@ class ICIn_NativePrototype : public ICInNativeStub HeapPtrObject holder_; HeapPtrShape holderShape_; - ICIn_NativePrototype(JitCode *stubCode, HandleShape shape, HandlePropertyName name, + ICIn_NativePrototype(JitCode* stubCode, HandleShape shape, HandlePropertyName name, HandleObject holder, HandleShape holderShape); public: - HeapPtrObject &holder() { + HeapPtrObject& holder() { return holder_; } - HeapPtrShape &holderShape() { + HeapPtrShape& holderShape() { return holderShape_; } static size_t offsetOfHolder() { @@ -3486,10 +3486,10 @@ class ICInNativeCompiler : public ICStubCompiler RootedObject holder_; RootedPropertyName name_; - bool generateStubCode(MacroAssembler &masm); + bool generateStubCode(MacroAssembler& masm); public: - ICInNativeCompiler(JSContext *cx, ICStub::Kind kind, HandleObject obj, HandleObject holder, + ICInNativeCompiler(JSContext* cx, ICStub::Kind kind, HandleObject obj, HandleObject holder, HandlePropertyName name) : ICStubCompiler(cx, kind), obj_(cx, obj), @@ -3497,7 +3497,7 @@ class ICInNativeCompiler : public ICStubCompiler name_(cx, name) {} - ICStub *getStub(ICStubSpace *space) { + ICStub* getStub(ICStubSpace* space) { RootedShape shape(cx, obj_->as().lastProperty()); if (kind == ICStub::In_Native) { MOZ_ASSERT(obj_ == holder_); @@ -3524,7 +3524,7 @@ class ICIn_NativeDoesNotExist : public ICStub static const size_t MAX_PROTO_CHAIN_DEPTH = 8; protected: - ICIn_NativeDoesNotExist(JitCode *stubCode, size_t protoChainDepth, + ICIn_NativeDoesNotExist(JitCode* stubCode, size_t protoChainDepth, HandlePropertyName name); public: @@ -3532,14 +3532,14 @@ class ICIn_NativeDoesNotExist : public ICStub MOZ_ASSERT(extra_ <= MAX_PROTO_CHAIN_DEPTH); return extra_; } - HeapPtrPropertyName &name() { + HeapPtrPropertyName& name() { return name_; } template - ICIn_NativeDoesNotExistImpl *toImpl() { + ICIn_NativeDoesNotExistImpl* toImpl() { MOZ_ASSERT(ProtoChainDepth == protoChainDepth()); - return static_cast *>(this); + return static_cast*>(this); } static size_t offsetOfShape(size_t idx); @@ -3560,11 +3560,11 @@ class ICIn_NativeDoesNotExistImpl : public ICIn_NativeDoesNotExist private: mozilla::Array shapes_; - ICIn_NativeDoesNotExistImpl(JitCode *stubCode, const AutoShapeVector *shapes, + ICIn_NativeDoesNotExistImpl(JitCode* stubCode, const AutoShapeVector* shapes, HandlePropertyName name); public: - void traceShapes(JSTracer *trc) { + void traceShapes(JSTracer* trc) { for (size_t i = 0; i < NumShapes; i++) TraceEdge(trc, &shapes_[i], "baseline-innativedoesnotexist-stub-shape"); } @@ -3585,19 +3585,19 @@ class ICInNativeDoesNotExistCompiler : public ICStubCompiler return static_cast(kind) | (static_cast(protoChainDepth_) << 16); } - bool generateStubCode(MacroAssembler &masm); + bool generateStubCode(MacroAssembler& masm); public: - ICInNativeDoesNotExistCompiler(JSContext *cx, HandleObject obj, HandlePropertyName name, + ICInNativeDoesNotExistCompiler(JSContext* cx, HandleObject obj, HandlePropertyName name, size_t protoChainDepth); template - ICStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes) { + ICStub* getStubSpecific(ICStubSpace* space, const AutoShapeVector* shapes) { return ICStub::New>(space, getStubCode(), shapes, name_); } - ICStub *getStub(ICStubSpace *space); + ICStub* getStub(ICStubSpace* space); }; class ICIn_Dense : public ICStub @@ -3606,10 +3606,10 @@ class ICIn_Dense : public ICStub HeapPtrShape shape_; - ICIn_Dense(JitCode *stubCode, HandleShape shape); + ICIn_Dense(JitCode* stubCode, HandleShape shape); public: - HeapPtrShape &shape() { + HeapPtrShape& shape() { return shape_; } static size_t offsetOfShape() { @@ -3620,15 +3620,15 @@ class ICIn_Dense : public ICStub RootedShape shape_; protected: - bool generateStubCode(MacroAssembler &masm); + bool generateStubCode(MacroAssembler& masm); public: - Compiler(JSContext *cx, Shape *shape) + Compiler(JSContext* cx, Shape* shape) : ICStubCompiler(cx, ICStub::In_Dense), shape_(cx, shape) {} - ICStub *getStub(ICStubSpace *space) { + ICStub* getStub(ICStubSpace* space) { return ICStub::New(space, getStubCode(), shape_); } }; diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index d11dbb4d3370..57eb5051343b 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -1023,7 +1023,7 @@ RegExpPairsVectorStartOffset(size_t inputOutputDataStartOffset) } static Address -RegExpPairCountAddress(MacroAssembler &masm, size_t inputOutputDataStartOffset) +RegExpPairCountAddress(MacroAssembler& masm, size_t inputOutputDataStartOffset) { return Address(masm.getStackPointer(), inputOutputDataStartOffset + sizeof(irregexp::InputOutputData) diff --git a/js/src/jit/EffectiveAddressAnalysis.cpp b/js/src/jit/EffectiveAddressAnalysis.cpp index ddd292f13b4c..a88b13824e1a 100644 --- a/js/src/jit/EffectiveAddressAnalysis.cpp +++ b/js/src/jit/EffectiveAddressAnalysis.cpp @@ -102,7 +102,7 @@ AnalyzeLsh(TempAllocator& alloc, MLsh* lsh) template bool -EffectiveAddressAnalysis::tryAddDisplacement(MAsmJSHeapAccessType *ins, int32_t o) +EffectiveAddressAnalysis::tryAddDisplacement(MAsmJSHeapAccessType* ins, int32_t o) { // Compute the new offset. Check for overflow and negative. In theory it // ought to be possible to support negative offsets, but it'd require diff --git a/js/src/jit/EffectiveAddressAnalysis.h b/js/src/jit/EffectiveAddressAnalysis.h index b129fb7e2006..feb9010e5a54 100644 --- a/js/src/jit/EffectiveAddressAnalysis.h +++ b/js/src/jit/EffectiveAddressAnalysis.h @@ -18,13 +18,13 @@ class EffectiveAddressAnalysis MIRGraph& graph_; template - bool tryAddDisplacement(MAsmJSHeapAccessType *ins, int32_t o); + bool tryAddDisplacement(MAsmJSHeapAccessType* ins, int32_t o); template void analyzeAsmHeapAccess(MAsmJSHeapAccessType* ins); public: - EffectiveAddressAnalysis(MIRGenerator *mir, MIRGraph& graph) + EffectiveAddressAnalysis(MIRGenerator* mir, MIRGraph& graph) : mir_(mir), graph_(graph) {} diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 06dc8ef1afb1..fe99f95c405b 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -12883,7 +12883,7 @@ IonBuilder::constant(const Value& v) MOZ_ASSERT(!v.isString() || v.toString()->isAtom(), "To handle non-atomized strings, you should use constantMaybeAtomize instead of constant."); if (v.isString() && MOZ_UNLIKELY(!v.toString()->isAtom())) { - MConstant *cst = constantMaybeAtomize(v); + MConstant* cst = constantMaybeAtomize(v); if (!cst) js::CrashAtUnhandlableOOM("Use constantMaybeAtomize."); return cst; diff --git a/js/src/jit/JitFrames.cpp b/js/src/jit/JitFrames.cpp index ae7a47bb192d..c6bf23ad16e2 100644 --- a/js/src/jit/JitFrames.cpp +++ b/js/src/jit/JitFrames.cpp @@ -528,7 +528,7 @@ BaselineFrameAndStackPointersFromTryNote(JSTryNote* tn, const JitFrameIterator& } static void -SettleOnTryNote(JSContext* cx, JSTryNote *tn, const JitFrameIterator& frame, +SettleOnTryNote(JSContext* cx, JSTryNote* tn, const JitFrameIterator& frame, ScopeIter& si, ResumeFromException* rfe, jsbytecode** pc) { RootedScript script(cx, frame.baselineFrame()->script()); diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 002e29ffe191..cdbf8c14a5b4 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -8090,7 +8090,7 @@ class MNot cacheOperandMightEmulateUndefined(constraints); } - void cacheOperandMightEmulateUndefined(CompilerConstraintList *constraints); + void cacheOperandMightEmulateUndefined(CompilerConstraintList* constraints); public: static MNot* New(TempAllocator& alloc, MDefinition* elements, diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h index 68c6da874200..80aa025d2e0c 100644 --- a/js/src/jit/MacroAssembler.h +++ b/js/src/jit/MacroAssembler.h @@ -970,15 +970,15 @@ class MacroAssembler : public MacroAssemblerSpecific // On ARM64, sp can function as the zero register depending on context. // Code shared across platforms must use these functions to be valid. template - void branchTestStackPtr(Condition cond, T t, Label *label) { + void branchTestStackPtr(Condition cond, T t, Label* label) { branchTestPtr(cond, getStackPointer(), t, label); } template - void branchStackPtr(Condition cond, T rhs, Label *label) { + void branchStackPtr(Condition cond, T rhs, Label* label) { branchPtr(cond, getStackPointer(), rhs, label); } template - void branchStackPtrRhs(Condition cond, T lhs, Label *label) { + void branchStackPtrRhs(Condition cond, T lhs, Label* label) { branchPtr(cond, lhs, getStackPointer(), label); } #endif // !JS_CODEGEN_ARM64 diff --git a/js/src/jsapi.h b/js/src/jsapi.h index d651c5266dda..3918b0d837c5 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -984,7 +984,7 @@ extern JS_PUBLIC_API(JSString*) JS_ValueToSource(JSContext* cx, JS::Handle v); extern JS_PUBLIC_API(bool) -JS_DoubleIsInt32(double d, int32_t *ip); +JS_DoubleIsInt32(double d, int32_t* ip); extern JS_PUBLIC_API(JSType) JS_TypeOfValue(JSContext* cx, JS::Handle v); @@ -5430,14 +5430,14 @@ struct PerformanceGroup { // Mark that an instance of `AutoStopwatch` is monitoring // the performance of this group for a given iteration. - void acquireStopwatch(uint64_t iteration, const AutoStopwatch *stopwatch) { + void acquireStopwatch(uint64_t iteration, const AutoStopwatch* stopwatch) { iteration_ = iteration; stopwatch_ = stopwatch; } // Mark that no `AutoStopwatch` is monitoring the // performance of this group for the iteration. - void releaseStopwatch(uint64_t iteration, const AutoStopwatch *stopwatch) { + void releaseStopwatch(uint64_t iteration, const AutoStopwatch* stopwatch) { if (iteration_ != iteration) return; @@ -5460,7 +5460,7 @@ struct PerformanceGroup { // The stopwatch currently monitoring the group, // or `nullptr` if none. Used ony for comparison. - const AutoStopwatch *stopwatch_; + const AutoStopwatch* stopwatch_; // The current iteration of the event loop. If necessary, // may safely overflow. @@ -5490,7 +5490,7 @@ struct PerformanceGroupHolder { // Get the group. // On first call, this causes a single Hashtable lookup. // Successive calls do not require further lookups. - js::PerformanceGroup *getGroup(); + js::PerformanceGroup* getGroup(); // `true` if the this holder is currently associated to a // PerformanceGroup, `false` otherwise. Use this method to avoid @@ -5505,7 +5505,7 @@ struct PerformanceGroupHolder { // (new values of `isSystem()`, `principals()` or `addonId`). void unlink(); - PerformanceGroupHolder(JSRuntime *runtime, JSCompartment *compartment) + PerformanceGroupHolder(JSRuntime* runtime, JSCompartment* compartment) : runtime_(runtime) , compartment_(compartment) , group_(nullptr) @@ -5517,13 +5517,13 @@ private: // Do not deallocate the key. void* getHashKey(); - JSRuntime *runtime_; - JSCompartment *compartment_; + JSRuntime* runtime_; + JSCompartment* compartment_; // The PerformanceGroup held by this object. // Initially set to `nullptr` until the first cal to `getGroup`. // May be reset to `nullptr` by a call to `unlink`. - js::PerformanceGroup *group_; + js::PerformanceGroup* group_; }; /** @@ -5560,7 +5560,7 @@ struct PerformanceStats { * If this group represents an add-on, the ID of the addon, * otherwise `nullptr`. */ - JSAddonId *addonId; + JSAddonId* addonId; /** * If this group represents a webpage, the process itself or a special @@ -5598,7 +5598,7 @@ typedef js::Vector PerformanceStatsV * representing the entire process. */ extern JS_PUBLIC_API(bool) -GetPerformanceStats(JSRuntime *rt, js::PerformanceStatsVector &stats, js::PerformanceStats &global); +GetPerformanceStats(JSRuntime* rt, js::PerformanceStatsVector& stats, js::PerformanceStats& global); } /* namespace js */ diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp index 59009f5edca0..78b7937d63f5 100644 --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -764,9 +764,9 @@ js::ReportErrorNumberVA(JSContext* cx, unsigned flags, JSErrorCallback callback, } static bool -ExpandErrorArguments(ExclusiveContext *cx, JSErrorCallback callback, - void *userRef, const unsigned errorNumber, - char **messagep, JSErrorReport *reportp, +ExpandErrorArguments(ExclusiveContext* cx, JSErrorCallback callback, + void* userRef, const unsigned errorNumber, + char** messagep, JSErrorReport* reportp, ErrorArgumentsType argumentsType, ...) { va_list ap; diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index 4474fa8d4777..7c7fde519fbb 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -4041,17 +4041,17 @@ JSObject::sizeOfIncludingThisInNursery() const MOZ_ASSERT(!isTenured()); - const Nursery &nursery = compartment()->runtimeFromAnyThread()->gc.nursery; + const Nursery& nursery = compartment()->runtimeFromAnyThread()->gc.nursery; size_t size = Arena::thingSize(allocKindForTenure(nursery)); if (is()) { - const NativeObject &native = as(); + const NativeObject& native = as(); size += native.numFixedSlots() * sizeof(Value); size += native.numDynamicSlots() * sizeof(Value); if (native.hasDynamicElements()) { - js::ObjectElements &elements = *native.getElementsHeader(); + js::ObjectElements& elements = *native.getElementsHeader(); if (!elements.isCopyOnWrite() || elements.ownerObject() == this) size += elements.capacity * sizeof(HeapSlot); } @@ -4063,7 +4063,7 @@ JSObject::sizeOfIncludingThisInNursery() const size_t JS::ubi::Concrete::size(mozilla::MallocSizeOf mallocSizeOf) const { - JSObject &obj = get(); + JSObject& obj = get(); if (!obj.isTenured()) return obj.sizeOfIncludingThisInNursery(); diff --git a/js/src/jsobj.h b/js/src/jsobj.h index c9a8b3652391..d37ff91b58cd 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -283,7 +283,7 @@ class JSObject : public js::gc::Cell static MOZ_ALWAYS_INLINE void writeBarrierPostRemove(JSObject* obj, void* cellp); /* Return the allocKind we would use if we were to tenure this object. */ - js::gc::AllocKind allocKindForTenure(const js::Nursery &nursery) const; + js::gc::AllocKind allocKindForTenure(const js::Nursery& nursery) const; size_t tenuredSizeOfThis() const { MOZ_ASSERT(isTenured()); diff --git a/js/src/jspropertytree.cpp b/js/src/jspropertytree.cpp index adfbdff2cd71..313bc361e300 100644 --- a/js/src/jspropertytree.cpp +++ b/js/src/jspropertytree.cpp @@ -310,7 +310,7 @@ Shape::fixupAfterMovingGC() } void -Shape::fixupGetterSetterForBarrier(JSTracer *trc) +Shape::fixupGetterSetterForBarrier(JSTracer* trc) { // Relocating the getterObj or setterObj will change our location in our // parent's KidsHash, so remove ourself first if we're going to get moved. diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp index b03ed9306072..039f2468426c 100644 --- a/js/src/vm/Interpreter.cpp +++ b/js/src/vm/Interpreter.cpp @@ -408,7 +408,7 @@ struct AutoStopwatch final // stopwatch. // // Previous owner is restored upon destruction. - explicit inline AutoStopwatch(JSContext *cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) + explicit inline AutoStopwatch(JSContext* cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) : compartment_(nullptr) , runtime_(nullptr) , iteration_(0) @@ -428,7 +428,7 @@ struct AutoStopwatch final return; iteration_ = runtime_->stopwatch.iteration; - PerformanceGroup *group = compartment_->performanceMonitoring.getGroup(); + PerformanceGroup* group = compartment_->performanceMonitoring.getGroup(); MOZ_ASSERT(group); if (group->hasStopwatch(iteration_)) { @@ -477,7 +477,7 @@ struct AutoStopwatch final return; } - PerformanceGroup *group = compartment_->performanceMonitoring.getGroup(); + PerformanceGroup* group = compartment_->performanceMonitoring.getGroup(); MOZ_ASSERT(group); // Compute time spent. @@ -606,11 +606,11 @@ struct AutoStopwatch final private: // The compartment with which this object was initialized. // Non-null. - JSCompartment *compartment_; + JSCompartment* compartment_; // The runtime with which this object was initialized. // Non-null. - JSRuntime *runtime_; + JSRuntime* runtime_; // An indication of the number of times we have entered the event // loop. Used only for comparison. diff --git a/js/src/vm/Interpreter.h b/js/src/vm/Interpreter.h index b5e54b19a628..2cf7db82c070 100644 --- a/js/src/vm/Interpreter.h +++ b/js/src/vm/Interpreter.h @@ -323,7 +323,7 @@ class MOZ_STACK_CLASS TryNoteIter }; bool -HandleClosingGeneratorReturn(JSContext *cx, AbstractFramePtr frame, bool ok); +HandleClosingGeneratorReturn(JSContext* cx, AbstractFramePtr frame, bool ok); /************************************************************************/ diff --git a/js/src/vm/ObjectGroup.h b/js/src/vm/ObjectGroup.h index 659e55a33153..682877fb0e59 100644 --- a/js/src/vm/ObjectGroup.h +++ b/js/src/vm/ObjectGroup.h @@ -540,7 +540,7 @@ class ObjectGroup : public gc::TenuredCell inline void clearProperties(); void maybeSweep(AutoClearTypeInferenceStateOnOOM* oom); - void traceChildren(JSTracer *trc); + void traceChildren(JSTracer* trc); private: #ifdef DEBUG diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 0d7c3150d0df..e9030c345e3a 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -870,21 +870,21 @@ JS::IsProfilingEnabledForRuntime(JSRuntime* runtime) } void -js::ResetStopwatches(JSRuntime *rt) +js::ResetStopwatches(JSRuntime* rt) { MOZ_ASSERT(rt); rt->stopwatch.reset(); } bool -js::SetStopwatchActive(JSRuntime *rt, bool isActive) +js::SetStopwatchActive(JSRuntime* rt, bool isActive) { MOZ_ASSERT(rt); return rt->stopwatch.setIsActive(isActive); } bool -js::IsStopwatchActive(JSRuntime *rt) +js::IsStopwatchActive(JSRuntime* rt) { MOZ_ASSERT(rt); return rt->stopwatch.isActive(); @@ -931,7 +931,7 @@ js::PerformanceGroupHolder::unlink() js_delete(group); } -PerformanceGroup * +PerformanceGroup* js::PerformanceGroupHolder::getGroup() { if (group_) @@ -954,7 +954,7 @@ js::PerformanceGroupHolder::getGroup() } PerformanceData* -js::GetPerformanceData(JSRuntime *rt) +js::GetPerformanceData(JSRuntime* rt) { return &rt->stopwatch.performance; } diff --git a/js/src/vm/Shape.h b/js/src/vm/Shape.h index 22489dbd949f..3c4c5aad97b7 100644 --- a/js/src/vm/Shape.h +++ b/js/src/vm/Shape.h @@ -970,7 +970,7 @@ class Shape : public gc::TenuredCell inline Shape* searchLinear(jsid id); void fixupAfterMovingGC(); - void fixupGetterSetterForBarrier(JSTracer *trc); + void fixupGetterSetterForBarrier(JSTracer* trc); /* For JIT usage */ static inline size_t offsetOfBase() { return offsetof(Shape, base_); } @@ -1252,14 +1252,14 @@ GetterSetterWriteBarrierPost(AccessorShape* shape) { MOZ_ASSERT(shape); if (shape->hasGetterObject()) { - gc::StoreBuffer *sb = reinterpret_cast(shape->getterObject())->storeBuffer(); + gc::StoreBuffer* sb = reinterpret_cast(shape->getterObject())->storeBuffer(); if (sb) { sb->putGeneric(ShapeGetterSetterRef(shape)); return; } } if (shape->hasSetterObject()) { - gc::StoreBuffer *sb = reinterpret_cast(shape->setterObject())->storeBuffer(); + gc::StoreBuffer* sb = reinterpret_cast(shape->setterObject())->storeBuffer(); if (sb) { sb->putGeneric(ShapeGetterSetterRef(shape)); return; diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index b1d964a54bc4..d710804ac71c 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -2111,8 +2111,8 @@ js::StringIsTypedArrayIndex(const Latin1Char* s, size_t length, uint64_t* indexp /* ES6 draft rev 34 (2015 Feb 20) 9.4.5.3 [[DefineOwnProperty]] step 3.c. */ bool -js::DefineTypedArrayElement(JSContext *cx, HandleObject obj, uint64_t index, - Handle desc, ObjectOpResult &result) +js::DefineTypedArrayElement(JSContext* cx, HandleObject obj, uint64_t index, + Handle desc, ObjectOpResult& result) { MOZ_ASSERT(IsAnyTypedArray(obj)); diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h index e4791e97be13..e35e481a8961 100644 --- a/js/src/vm/TypedArrayObject.h +++ b/js/src/vm/TypedArrayObject.h @@ -291,8 +291,8 @@ IsTypedArrayIndex(jsid id, uint64_t* indexp) * when the property key is a TypedArray index. */ bool -DefineTypedArrayElement(JSContext *cx, HandleObject arr, uint64_t index, - Handle desc, ObjectOpResult &result); +DefineTypedArrayElement(JSContext* cx, HandleObject arr, uint64_t index, + Handle desc, ObjectOpResult& result); static inline unsigned TypedArrayShift(Scalar::Type viewType) diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 7708420a430c..3b062485d57a 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -565,7 +565,7 @@ XPCConvert::JSData2Native(void* d, HandleValue s, if (length == size_t(-1)) { return false; } - char* buffer = static_cast(moz_xmalloc(length + 1)); + char* buffer = static_cast(moz_xmalloc(length + 1)); if (!buffer) { return false; } @@ -1721,7 +1721,7 @@ XPCConvert::JSStringWithSize2Native(void* d, HandleValue s, len = count; uint32_t alloc_len = (len + 1) * sizeof(char); - char* buffer = static_cast(moz_xmalloc(alloc_len)); + char* buffer = static_cast(moz_xmalloc(alloc_len)); if (!buffer) { return false; }