зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1054334 - SpiderMonkey: Delete unneeded semicolons r=nbp
This commit is contained in:
Родитель
1d9c1a39c4
Коммит
00b4fef72c
|
@ -92,7 +92,7 @@ class ProfileEntry
|
|||
bool isCpp() const volatile { return hasFlag(IS_CPP_ENTRY); }
|
||||
bool isJs() const volatile { return !isCpp(); }
|
||||
|
||||
bool isCopyLabel() const volatile { return hasFlag(FRAME_LABEL_COPY); };
|
||||
bool isCopyLabel() const volatile { return hasFlag(FRAME_LABEL_COPY); }
|
||||
|
||||
void setLabel(const char *aString) volatile { string = aString; }
|
||||
const char *label() const volatile { return string; }
|
||||
|
|
|
@ -406,7 +406,7 @@ class EdgeRange {
|
|||
EdgeRange() : front_(nullptr) { }
|
||||
|
||||
public:
|
||||
virtual ~EdgeRange() { };
|
||||
virtual ~EdgeRange() { }
|
||||
|
||||
// True if there are no more edges in this range.
|
||||
bool empty() const { return !front_; }
|
||||
|
@ -444,7 +444,7 @@ class TracerConcrete : public Base {
|
|||
|
||||
public:
|
||||
static const jschar concreteTypeName[];
|
||||
static void construct(void *storage, Referent *ptr) { new (storage) TracerConcrete(ptr); };
|
||||
static void construct(void *storage, Referent *ptr) { new (storage) TracerConcrete(ptr); }
|
||||
};
|
||||
|
||||
// For JS_TraceChildren-based types that have a 'compartment' method.
|
||||
|
@ -460,7 +460,7 @@ class TracerConcreteWithCompartment : public TracerConcrete<Referent> {
|
|||
public:
|
||||
static void construct(void *storage, Referent *ptr) {
|
||||
new (storage) TracerConcreteWithCompartment(ptr);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
template<> struct Concrete<JSObject> : TracerConcreteWithCompartment<JSObject> { };
|
||||
|
|
|
@ -23,9 +23,9 @@ template <typename K, typename V>
|
|||
class JS_PUBLIC_API(WeakMapPtr)
|
||||
{
|
||||
public:
|
||||
WeakMapPtr() : ptr(nullptr) {};
|
||||
WeakMapPtr() : ptr(nullptr) {}
|
||||
bool init(JSContext *cx);
|
||||
bool initialized() { return ptr != nullptr; };
|
||||
bool initialized() { return ptr != nullptr; }
|
||||
void destroy();
|
||||
virtual ~WeakMapPtr() { MOZ_ASSERT(!initialized()); }
|
||||
void trace(JSTracer *tracer);
|
||||
|
|
|
@ -690,7 +690,7 @@ FuncShuffle(JSContext *cx, unsigned argc, Value *vp)
|
|||
if (!IsVectorObject<V>(args[0]) || !args[1].isInt32())
|
||||
return ErrorBadArgs(cx);
|
||||
|
||||
Elem *val = TypedObjectMemory<Elem *>(args[0]);;
|
||||
Elem *val = TypedObjectMemory<Elem *>(args[0]);
|
||||
int32_t maskArg;
|
||||
if (!ToInt32(cx, args[1], &maskArg))
|
||||
return false;
|
||||
|
@ -734,7 +734,7 @@ Int32x4BinaryScalar(JSContext *cx, unsigned argc, Value *vp)
|
|||
if (!IsVectorObject<Int32x4>(args[0]) || !args[1].isNumber())
|
||||
return ErrorBadArgs(cx);
|
||||
|
||||
int32_t *val = TypedObjectMemory<int32_t *>(args[0]);;
|
||||
int32_t *val = TypedObjectMemory<int32_t *>(args[0]);
|
||||
int32_t bits;
|
||||
if (!ToInt32(cx, args[1], &bits))
|
||||
return false;
|
||||
|
|
|
@ -4429,7 +4429,7 @@ ArrayType::GetSafeLength(JSObject* obj, size_t* result)
|
|||
// The "length" property can be an int, a double, or JSVAL_VOID
|
||||
// (for arrays of undefined length), and must always fit in a size_t.
|
||||
if (length.isInt32()) {
|
||||
*result = length.toInt32();;
|
||||
*result = length.toInt32();
|
||||
return true;
|
||||
}
|
||||
if (length.isDouble()) {
|
||||
|
@ -4455,7 +4455,7 @@ ArrayType::GetLength(JSObject* obj)
|
|||
// (for arrays of undefined length), and must always fit in a size_t.
|
||||
// For callers who know it can never be JSVAL_VOID, return a size_t directly.
|
||||
if (length.isInt32())
|
||||
return length.toInt32();;
|
||||
return length.toInt32();
|
||||
return Convert<size_t>(length.toDouble());
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ struct BaselineStackBuilder
|
|||
|
||||
static size_t HeaderSize() {
|
||||
return AlignBytes(sizeof(BaselineBailoutInfo), sizeof(void *));
|
||||
};
|
||||
}
|
||||
size_t bufferTotal_;
|
||||
size_t bufferAvail_;
|
||||
size_t bufferUsed_;
|
||||
|
|
|
@ -677,13 +677,13 @@ Range::or_(TempAllocator &alloc, const Range *lhs, const Range *rhs)
|
|||
if (lhs->lower() == 0)
|
||||
return new(alloc) Range(*rhs);
|
||||
if (lhs->lower() == -1)
|
||||
return new(alloc) Range(*lhs);;
|
||||
return new(alloc) Range(*lhs);
|
||||
}
|
||||
if (rhs->lower() == rhs->upper()) {
|
||||
if (rhs->lower() == 0)
|
||||
return new(alloc) Range(*lhs);
|
||||
if (rhs->lower() == -1)
|
||||
return new(alloc) Range(*rhs);;
|
||||
return new(alloc) Range(*rhs);
|
||||
}
|
||||
|
||||
// The code below uses CountLeadingZeroes32, which has undefined behavior
|
||||
|
|
|
@ -50,7 +50,7 @@ class BufferOffset
|
|||
}
|
||||
|
||||
BufferOffset() : offset(INT_MIN) {}
|
||||
bool assigned() const { return offset != INT_MIN; };
|
||||
bool assigned() const { return offset != INT_MIN; }
|
||||
};
|
||||
|
||||
template<int SliceSize>
|
||||
|
@ -278,7 +278,7 @@ struct AssemblerBuffer
|
|||
Inst *i = m_buffer->getInst(bo);
|
||||
bo = BufferOffset(bo.getOffset() + i->size());
|
||||
return cur();
|
||||
};
|
||||
}
|
||||
Inst *cur() {
|
||||
return m_buffer->getInst(bo);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ const JSClass BarkWhenTracedClass::class_ = {
|
|||
struct Kennel {
|
||||
PersistentRootedObject obj;
|
||||
explicit Kennel(JSContext *cx) : obj(cx) { }
|
||||
Kennel(JSContext *cx, const HandleObject &woof) : obj(cx, woof) { };
|
||||
Kennel(JSContext *cx, const HandleObject &woof) : obj(cx, woof) { }
|
||||
};
|
||||
|
||||
// A function for allocating a Kennel and a barker. Only allocating
|
||||
|
|
|
@ -1151,8 +1151,8 @@ JS_InitStandardClasses(JSContext *cx, HandleObject obj)
|
|||
typedef struct JSStdName {
|
||||
size_t atomOffset; /* offset of atom pointer in JSAtomState */
|
||||
JSProtoKey key;
|
||||
bool isDummy() const { return key == JSProto_Null; };
|
||||
bool isSentinel() const { return key == JSProto_LIMIT; };
|
||||
bool isDummy() const { return key == JSProto_Null; }
|
||||
bool isSentinel() const { return key == JSProto_LIMIT; }
|
||||
} JSStdName;
|
||||
|
||||
static const JSStdName*
|
||||
|
|
|
@ -1320,8 +1320,8 @@ class JSAutoRequest
|
|||
|
||||
#if 0
|
||||
private:
|
||||
static void *operator new(size_t) CPP_THROW_NEW { return 0; };
|
||||
static void operator delete(void *, size_t) { };
|
||||
static void *operator new(size_t) CPP_THROW_NEW { return 0; }
|
||||
static void operator delete(void *, size_t) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -2518,11 +2518,11 @@ class JS_PUBLIC_API(CompartmentOptions)
|
|||
if (mode_ == Default)
|
||||
return defaultValue;
|
||||
return mode_ == ForceTrue;
|
||||
};
|
||||
}
|
||||
|
||||
void set(bool overrideValue) {
|
||||
mode_ = overrideValue ? ForceTrue : ForceFalse;
|
||||
};
|
||||
}
|
||||
|
||||
void reset() {
|
||||
mode_ = Default;
|
||||
|
@ -2610,7 +2610,7 @@ class JS_PUBLIC_API(CompartmentOptions)
|
|||
}
|
||||
bool getSingletonsAsTemplates() const {
|
||||
return singletonsAsTemplates_;
|
||||
};
|
||||
}
|
||||
|
||||
// A null add-on ID means that the compartment is not associated with an
|
||||
// add-on.
|
||||
|
|
|
@ -947,7 +947,7 @@ template <typename CharT>
|
|||
struct CharSeparatorOp
|
||||
{
|
||||
const CharT sep;
|
||||
explicit CharSeparatorOp(CharT sep) : sep(sep) {};
|
||||
explicit CharSeparatorOp(CharT sep) : sep(sep) {}
|
||||
bool operator()(JSContext *, StringBuffer &sb) { return sb.append(sep); }
|
||||
};
|
||||
|
||||
|
|
|
@ -1289,7 +1289,7 @@ class MOZ_STACK_CLASS AutoStableStringChars
|
|||
public:
|
||||
explicit AutoStableStringChars(JSContext *cx)
|
||||
: s_(cx), state_(Uninitialized), ownsChars_(false)
|
||||
{};
|
||||
{}
|
||||
~AutoStableStringChars();
|
||||
|
||||
bool init(JSContext *cx, JSString *s);
|
||||
|
@ -2379,7 +2379,7 @@ JS_FRIEND_API(void)
|
|||
Debug_SetActiveJSContext(JSRuntime *rt, JSContext *cx);
|
||||
#else
|
||||
inline void
|
||||
Debug_SetActiveJSContext(JSRuntime *rt, JSContext *cx) {};
|
||||
Debug_SetActiveJSContext(JSRuntime *rt, JSContext *cx) {}
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -6323,7 +6323,7 @@ JS::AutoAssertOnGC::AutoAssertOnGC()
|
|||
JSRuntime *runtime = data->runtimeIfOnOwnerThread();
|
||||
if (runtime) {
|
||||
gc = &runtime->gc;
|
||||
gcNumber = gc->gcNumber();;
|
||||
gcNumber = gc->gcNumber();
|
||||
gc->enterUnsafeRegion();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1866,7 +1866,7 @@ ScriptedDirectProxyHandler::has(JSContext *cx, HandleObject proxy, HandleId id,
|
|||
return false;
|
||||
|
||||
// step 9
|
||||
bool success = ToBoolean(trapResult);;
|
||||
bool success = ToBoolean(trapResult);
|
||||
|
||||
// step 11
|
||||
if (!success) {
|
||||
|
|
|
@ -501,7 +501,7 @@ class JS_FRIEND_API(AutoEnterPolicy)
|
|||
: context(nullptr)
|
||||
, enteredAction(BaseProxyHandler::NONE)
|
||||
#endif
|
||||
{};
|
||||
{}
|
||||
void reportErrorIfExceptionIsNotPending(JSContext *cx, jsid id);
|
||||
bool allow;
|
||||
bool rv;
|
||||
|
@ -553,7 +553,7 @@ assertEnteredPolicy(JSContext *cx, JSObject *obj, jsid id,
|
|||
#else
|
||||
inline void assertEnteredPolicy(JSContext *cx, JSObject *obj, jsid id,
|
||||
BaseProxyHandler::Action act)
|
||||
{};
|
||||
{}
|
||||
#endif
|
||||
|
||||
} /* namespace js */
|
||||
|
|
|
@ -562,7 +562,7 @@ ProcessCallSiteObjOperation(JSContext *cx, RootedObject &cso, RootedObject &raw,
|
|||
} else { \
|
||||
double l, r; \
|
||||
if (!ToNumber(cx, lhs, &l) || !ToNumber(cx, rhs, &r)) \
|
||||
return false;; \
|
||||
return false; \
|
||||
*res = (l OP r); \
|
||||
} \
|
||||
} \
|
||||
|
|
|
@ -1993,7 +1993,7 @@ CASE(JSOP_SETCONST)
|
|||
if (!SetConstOperation(cx, obj, name, rval))
|
||||
goto error;
|
||||
}
|
||||
END_CASE(JSOP_SETCONST);
|
||||
END_CASE(JSOP_SETCONST)
|
||||
|
||||
CASE(JSOP_BINDGNAME)
|
||||
PUSH_OBJECT(REGS.fp()->global());
|
||||
|
@ -3106,7 +3106,7 @@ CASE(JSOP_MUTATEPROTO)
|
|||
|
||||
REGS.sp--;
|
||||
}
|
||||
END_CASE(JSOP_MUTATEPROTO);
|
||||
END_CASE(JSOP_MUTATEPROTO)
|
||||
|
||||
CASE(JSOP_INITPROP)
|
||||
{
|
||||
|
@ -3130,7 +3130,7 @@ CASE(JSOP_INITPROP)
|
|||
|
||||
REGS.sp--;
|
||||
}
|
||||
END_CASE(JSOP_INITPROP);
|
||||
END_CASE(JSOP_INITPROP)
|
||||
|
||||
CASE(JSOP_INITELEM)
|
||||
{
|
||||
|
|
|
@ -2882,7 +2882,7 @@ public:
|
|||
|
||||
private:
|
||||
friend class mozilla::dom::danger::AutoCxPusher;
|
||||
friend bool xpc::PushJSContextNoScriptContext(JSContext *aCx);;
|
||||
friend bool xpc::PushJSContextNoScriptContext(JSContext *aCx);
|
||||
friend void xpc::PopJSContextNoScriptContext();
|
||||
|
||||
// We make these private so that stack manipulation can only happen
|
||||
|
@ -3466,7 +3466,7 @@ public:
|
|||
, defineAs(cx, JSID_VOID)
|
||||
{ }
|
||||
|
||||
virtual bool Parse() { return ParseId("defineAs", &defineAs); };
|
||||
virtual bool Parse() { return ParseId("defineAs", &defineAs); }
|
||||
|
||||
JS::RootedId defineAs;
|
||||
};
|
||||
|
@ -3481,7 +3481,7 @@ public:
|
|||
|
||||
virtual bool Parse() {
|
||||
return ParseId("defineAs", &defineAs);
|
||||
};
|
||||
}
|
||||
|
||||
JS::RootedId defineAs;
|
||||
};
|
||||
|
@ -3498,7 +3498,7 @@ public:
|
|||
virtual bool Parse() {
|
||||
return ParseBoolean("wrapReflectors", &wrapReflectors) &&
|
||||
ParseBoolean("cloneFunctions", &cloneFunctions);
|
||||
};
|
||||
}
|
||||
|
||||
// When a reflector is encountered, wrap it rather than aborting the clone.
|
||||
bool wrapReflectors;
|
||||
|
|
Загрузка…
Ссылка в новой задаче