diff --git a/js/public/Id.h b/js/public/Id.h index 7103df82d287..f2d89df5bd94 100644 --- a/js/public/Id.h +++ b/js/public/Id.h @@ -150,13 +150,13 @@ JSID_IS_VOID(const jsid id) { MOZ_ASSERT_IF(((size_t)JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_VOID, JSID_BITS(id) == JSID_TYPE_VOID); - return ((size_t)JSID_BITS(id) == JSID_TYPE_VOID); + return (size_t)JSID_BITS(id) == JSID_TYPE_VOID; } static MOZ_ALWAYS_INLINE bool JSID_IS_EMPTY(const jsid id) { - return ((size_t)JSID_BITS(id) == JSID_TYPE_SYMBOL); + return (size_t)JSID_BITS(id) == JSID_TYPE_SYMBOL; } extern JS_PUBLIC_DATA(const jsid) JSID_VOID; diff --git a/js/public/Value.h b/js/public/Value.h index 291b0fedc4ed..e0dd6c335b5f 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -1945,9 +1945,9 @@ DOUBLE_TO_JSVAL(double d) static inline JS_VALUE_CONSTEXPR jsval UINT_TO_JSVAL(uint32_t i) { - return (i <= JSVAL_INT_MAX - ? INT_TO_JSVAL((int32_t)i) - : DOUBLE_TO_JSVAL((double)i)); + return i <= JSVAL_INT_MAX + ? INT_TO_JSVAL((int32_t)i) + : DOUBLE_TO_JSVAL((double)i); } static inline jsval diff --git a/js/src/jit/BaselineDebugModeOSR.cpp b/js/src/jit/BaselineDebugModeOSR.cpp index 6472f8f1bf6e..c69c6087e117 100644 --- a/js/src/jit/BaselineDebugModeOSR.cpp +++ b/js/src/jit/BaselineDebugModeOSR.cpp @@ -87,10 +87,10 @@ struct DebugModeOSREntry } bool needsRecompileInfo() const { - return (frameKind == ICEntry::Kind_CallVM || - frameKind == ICEntry::Kind_DebugTrap || - frameKind == ICEntry::Kind_DebugPrologue || - frameKind == ICEntry::Kind_DebugEpilogue); + return frameKind == ICEntry::Kind_CallVM || + frameKind == ICEntry::Kind_DebugTrap || + frameKind == ICEntry::Kind_DebugPrologue || + frameKind == ICEntry::Kind_DebugEpilogue; } bool recompiled() const { @@ -805,9 +805,9 @@ JitRuntime::getBaselineDebugModeOSRHandlerAddress(JSContext *cx, bool popFrameRe { if (!getBaselineDebugModeOSRHandler(cx)) return nullptr; - return (popFrameReg - ? baselineDebugModeOSRHandler_->raw() - : baselineDebugModeOSRHandlerNoFrameRegPopAddr_); + return popFrameReg + ? baselineDebugModeOSRHandler_->raw() + : baselineDebugModeOSRHandlerNoFrameRegPopAddr_; } JitCode * diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 5e6c6871aabe..878fafa3202e 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -3890,9 +3890,9 @@ static bool TypedArrayRequiresFloatingPoint(TypedArrayObject *tarr) { uint32_t type = tarr->type(); - return (type == Scalar::Uint32 || - type == Scalar::Float32 || - type == Scalar::Float64); + return type == Scalar::Uint32 || + type == Scalar::Float32 || + type == Scalar::Float64; } static bool diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h index e3a545e52187..a95143421f7d 100644 --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -2255,8 +2255,8 @@ class ICCompare_Int32WithBoolean : public ICStub bool generateStubCode(MacroAssembler &masm); virtual int32_t getKey() const { - return (static_cast(kind) | (static_cast(op_) << 16) | - (static_cast(lhsIsInt32_) << 24)); + return static_cast(kind) | (static_cast(op_) << 16) | + (static_cast(lhsIsInt32_) << 24); } public: @@ -2568,8 +2568,8 @@ class ICBinaryArith_Int32 : public ICStub // Stub keys shift-stubs need to encode the kind, the JSOp and if we allow doubles. virtual int32_t getKey() const { - return (static_cast(kind) | (static_cast(op_) << 16) | - (static_cast(allowDouble_) << 24)); + return static_cast(kind) | (static_cast(op_) << 16) | + (static_cast(allowDouble_) << 24); } public: diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index a069b417b6a3..f5bf43c9d806 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -9250,8 +9250,8 @@ IonBuilder::needsToMonitorMissingProperties(types::TemporaryTypeSet *types) // TypeScript::Monitor to ensure that the observed type set contains // undefined. To account for possible missing properties, which property // types do not track, we must always insert a type barrier. - return (info().executionMode() == ParallelExecution && - !types->hasType(types::Type::UndefinedType())); + return info().executionMode() == ParallelExecution && + !types->hasType(types::Type::UndefinedType()); } bool diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp index a752ffccf1ba..83f9c5cf4cc5 100644 --- a/js/src/jit/IonCaches.cpp +++ b/js/src/jit/IonCaches.cpp @@ -2986,10 +2986,10 @@ const size_t GetElementIC::MAX_FAILED_UPDATES = 16; GetElementIC::canAttachGetProp(JSObject *obj, const Value &idval, jsid id) { uint32_t dummy; - return (obj->isNative() && - idval.isString() && - JSID_IS_ATOM(id) && - !JSID_TO_ATOM(id)->isIndex(&dummy)); + return obj->isNative() && + idval.isString() && + JSID_IS_ATOM(id) && + !JSID_TO_ATOM(id)->isIndex(&dummy); } static bool @@ -3562,8 +3562,8 @@ static bool IsTypedArrayElementSetInlineable(JSObject *obj, const Value &idval, const Value &value) { // Don't bother attaching stubs for assigning strings and objects. - return (obj->is() && idval.isInt32() && - !value.isString() && !value.isObject()); + return obj->is() && idval.isInt32() && + !value.isString() && !value.isObject(); } static void diff --git a/js/src/jit/LiveRangeAllocator.h b/js/src/jit/LiveRangeAllocator.h index e3e7753539ac..92eef0b8ace6 100644 --- a/js/src/jit/LiveRangeAllocator.h +++ b/js/src/jit/LiveRangeAllocator.h @@ -568,8 +568,8 @@ static inline bool IsNunbox(VirtualRegister *vreg) { #ifdef JS_NUNBOX32 - return (vreg->type() == LDefinition::TYPE || - vreg->type() == LDefinition::PAYLOAD); + return vreg->type() == LDefinition::TYPE || + vreg->type() == LDefinition::PAYLOAD; #else return false; #endif diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 36159bd4f9a2..8a729e6cc1ab 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -7559,13 +7559,13 @@ class MStoreTypedArrayElement return arrayType_; } bool isByteArray() const { - return (arrayType_ == Scalar::Int8 || - arrayType_ == Scalar::Uint8 || - arrayType_ == Scalar::Uint8Clamped); + return arrayType_ == Scalar::Int8 || + arrayType_ == Scalar::Uint8 || + arrayType_ == Scalar::Uint8Clamped; } bool isFloatArray() const { - return (arrayType_ == Scalar::Float32 || - arrayType_ == Scalar::Float64); + return arrayType_ == Scalar::Float32 || + arrayType_ == Scalar::Float64; } TypePolicy *typePolicy() { return this; @@ -7632,13 +7632,13 @@ class MStoreTypedArrayElementHole return arrayType_; } bool isByteArray() const { - return (arrayType_ == Scalar::Int8 || - arrayType_ == Scalar::Uint8 || - arrayType_ == Scalar::Uint8Clamped); + return arrayType_ == Scalar::Int8 || + arrayType_ == Scalar::Uint8 || + arrayType_ == Scalar::Uint8Clamped; } bool isFloatArray() const { - return (arrayType_ == Scalar::Float32 || - arrayType_ == Scalar::Float64); + return arrayType_ == Scalar::Float32 || + arrayType_ == Scalar::Float64; } TypePolicy *typePolicy() { return this; @@ -7695,8 +7695,8 @@ class MStoreTypedArrayElementStatic : return typedArray_->type(); } bool isFloatArray() const { - return (viewType() == Scalar::Float32 || - viewType() == Scalar::Float64); + return viewType() == Scalar::Float32 || + viewType() == Scalar::Float64; } void *base() const; diff --git a/js/src/jit/ParallelFunctions.cpp b/js/src/jit/ParallelFunctions.cpp index 4fbae4fccb68..87b326515813 100644 --- a/js/src/jit/ParallelFunctions.cpp +++ b/js/src/jit/ParallelFunctions.cpp @@ -123,8 +123,8 @@ jit::IsInTargetRegion(ForkJoinContext *cx, TypedObject *typedObj) { JS_ASSERT(typedObj->is()); // in case JIT supplies something bogus uint8_t *typedMem = typedObj->typedMem(); - return (typedMem >= cx->targetRegionStart && - typedMem < cx->targetRegionEnd); + return typedMem >= cx->targetRegionStart && + typedMem < cx->targetRegionEnd; } bool diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 60d14ca22b04..55d12fdb555e 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -4332,9 +4332,9 @@ JS::OwningCompileOptions::copy(JSContext *cx, const ReadOnlyCompileOptions &rhs) setElementAttributeName(rhs.elementAttributeName()); setIntroductionScript(rhs.introductionScript()); - return (setFileAndLine(cx, rhs.filename(), rhs.lineno) && - setSourceMapURL(cx, rhs.sourceMapURL()) && - setIntroducerFilename(cx, rhs.introducerFilename())); + return setFileAndLine(cx, rhs.filename(), rhs.lineno) && + setSourceMapURL(cx, rhs.sourceMapURL()) && + setIntroducerFilename(cx, rhs.introducerFilename()); } bool diff --git a/js/src/vm/Probes-inl.h b/js/src/vm/Probes-inl.h index c828a37bb9af..453abaa1cdd2 100644 --- a/js/src/vm/Probes-inl.h +++ b/js/src/vm/Probes-inl.h @@ -35,8 +35,8 @@ probes::CallTrackingActive(JSContext *cx) inline bool probes::WantNativeAddressInfo(JSContext *cx) { - return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION && - JITGranularityRequested(cx) >= JITREPORT_GRANULARITY_FUNCTION); + return cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION && + JITGranularityRequested(cx) >= JITREPORT_GRANULARITY_FUNCTION; } inline bool diff --git a/js/xpconnect/src/XPCMaps.cpp b/js/xpconnect/src/XPCMaps.cpp index 695bac411334..5fc5a8bbf582 100644 --- a/js/xpconnect/src/XPCMaps.cpp +++ b/js/xpconnect/src/XPCMaps.cpp @@ -375,10 +375,10 @@ NativeSetMap::Entry::Match(PLDHashTable *table, // it would end up really being a set with two interfaces (except for // the case where the one interface happened to be nsISupports). - return ((SetInTable->GetInterfaceCount() == 1 && - SetInTable->GetInterfaceAt(0) == Addition) || - (SetInTable->GetInterfaceCount() == 2 && - SetInTable->GetInterfaceAt(1) == Addition)); + return (SetInTable->GetInterfaceCount() == 1 && + SetInTable->GetInterfaceAt(0) == Addition) || + (SetInTable->GetInterfaceCount() == 2 && + SetInTable->GetInterfaceAt(1) == Addition); } if (!Addition && Set == SetInTable)