Bug 1013663 - Fix some bad implicit conversion constructors in the JS engine; r=jorendorff,jandem

This commit is contained in:
Ehsan Akhgari 2014-05-25 21:46:24 -04:00
Родитель bf17f250a7
Коммит 5b0272c079
188 изменённых файлов: 847 добавлений и 837 удалений

Просмотреть файл

@ -1069,7 +1069,7 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
return NS_ERROR_UNEXPECTED;
}
if (!JS_CallFunctionValue(cx, thisObject, funval, argv, &rval)) {
if (!JS_CallFunctionValue(cx, thisObject, funval, JS::HandleValueArray(argv), &rval)) {
nsJSUtils::ReportPendingException(cx);
continue;
}

Просмотреть файл

@ -168,7 +168,7 @@ DispatchNFCEvent::RunTask(JSContext* aCx)
memcpy(JS_GetArrayBufferViewData(array), mMessage->mData, mMessage->mSize);
JS::Rooted<JS::Value> rval(aCx);
return JS_CallFunctionName(aCx, obj, "onNfcMessage", arrayVal, &rval);
return JS_CallFunctionName(aCx, obj, "onNfcMessage", JS::HandleValueArray(arrayVal), &rval);
}
class NfcConnector : public mozilla::ipc::UnixSocketConnector

Просмотреть файл

@ -80,7 +80,7 @@ TestShellCommandParent::RunCallback(const nsString& aResponse)
JS::Rooted<JS::Value> rval(mCx);
JS::Rooted<JS::Value> callback(mCx, mCallback);
bool ok = JS_CallFunctionValue(mCx, global, callback, strVal, &rval);
bool ok = JS_CallFunctionValue(mCx, global, callback, JS::HandleValueArray(strVal), &rval);
NS_ENSURE_TRUE(ok, false);
return true;

Просмотреть файл

@ -151,7 +151,7 @@ class ConstTwoByteChars : public mozilla::RangedPtr<const jschar>
{
public:
ConstTwoByteChars(const ConstTwoByteChars &s) : ConstCharPtr(s) {}
ConstTwoByteChars(const mozilla::RangedPtr<const jschar> &s) : ConstCharPtr(s) {}
MOZ_IMPLICIT ConstTwoByteChars(const mozilla::RangedPtr<const jschar> &s) : ConstCharPtr(s) {}
ConstTwoByteChars(const jschar *s, size_t len) : ConstCharPtr(s, len) {}
ConstTwoByteChars(const jschar *pos, const jschar *start, size_t len)
: ConstCharPtr(pos, start, len)

Просмотреть файл

@ -249,7 +249,7 @@ enum GCProgress {
struct JS_FRIEND_API(GCDescription) {
bool isCompartment_;
GCDescription(bool isCompartment)
explicit GCDescription(bool isCompartment)
: isCompartment_(isCompartment) {}
jschar *formatMessage(JSRuntime *rt) const;
@ -341,7 +341,7 @@ class JS_FRIEND_API(AutoDisableGenerationalGC)
#endif
public:
AutoDisableGenerationalGC(JSRuntime *rt);
explicit AutoDisableGenerationalGC(JSRuntime *rt);
~AutoDisableGenerationalGC();
};
@ -395,7 +395,7 @@ class JS_PUBLIC_API(AutoAssertNoGC)
public:
/* Prevent unreferenced local warnings in opt builds. */
AutoAssertNoGC() {}
AutoAssertNoGC(JSRuntime *) {}
explicit AutoAssertNoGC(JSRuntime *) {}
#endif
};
@ -406,7 +406,7 @@ class JS_PUBLIC_API(ObjectPtr)
public:
ObjectPtr() : value(nullptr) {}
ObjectPtr(JSObject *obj) : value(obj) {}
explicit ObjectPtr(JSObject *obj) : value(obj) {}
/* Always call finalize before the destructor. */
~ObjectPtr() { MOZ_ASSERT(!value); }

Просмотреть файл

@ -73,7 +73,7 @@ class HashMap
// HashMap construction is fallible (due to OOM); thus the user must call
// init after constructing a HashMap and check the return value.
HashMap(AllocPolicy a = AllocPolicy()) : impl(a) {}
explicit HashMap(AllocPolicy a = AllocPolicy()) : impl(a) {}
bool init(uint32_t len = 16) { return impl.init(len); }
bool initialized() const { return impl.initialized(); }
@ -314,7 +314,7 @@ class HashSet
// HashSet construction is fallible (due to OOM); thus the user must call
// init after constructing a HashSet and check the return value.
HashSet(AllocPolicy a = AllocPolicy()) : impl(a) {}
explicit HashSet(AllocPolicy a = AllocPolicy()) : impl(a) {}
bool init(uint32_t len = 16) { return impl.init(len); }
bool initialized() const { return impl.initialized(); }
@ -1062,7 +1062,7 @@ class HashTable : private AllocPolicy
}
public:
HashTable(AllocPolicy ap)
explicit HashTable(AllocPolicy ap)
: AllocPolicy(ap),
hashShift(sHashBits),
entryCount(0),

Просмотреть файл

@ -567,7 +567,7 @@ struct RuntimeStats
macro(_, _, gcHeapChunkAdmin) \
macro(_, _, gcHeapGCThings) \
RuntimeStats(mozilla::MallocSizeOf mallocSizeOf)
explicit RuntimeStats(mozilla::MallocSizeOf mallocSizeOf)
: FOR_EACH_SIZE(ZERO_SIZE)
runtime(),
cTotals(),
@ -630,7 +630,7 @@ class ObjectPrivateVisitor
typedef bool(*GetISupportsFun)(JSObject *obj, nsISupports **iface);
GetISupportsFun getISupports_;
ObjectPrivateVisitor(GetISupportsFun getISupports)
explicit ObjectPrivateVisitor(GetISupportsFun getISupports)
: getISupports_(getISupports)
{}
};

Просмотреть файл

@ -444,7 +444,7 @@ class JS_PUBLIC_API(JSBrokenFrameIterator)
void *data_;
public:
JSBrokenFrameIterator(JSContext *cx);
explicit JSBrokenFrameIterator(JSContext *cx);
~JSBrokenFrameIterator();
bool done() const;

Просмотреть файл

@ -414,20 +414,20 @@ class MOZ_NONHEAP_CLASS Handle : public js::HandleBase<T>
}
/* Create a handle for a nullptr pointer. */
Handle(js::NullPtr) {
MOZ_IMPLICIT Handle(js::NullPtr) {
static_assert(mozilla::IsPointer<T>::value,
"js::NullPtr overload not valid for non-pointer types");
ptr = reinterpret_cast<const T *>(&js::NullPtr::constNullValue);
}
/* Create a handle for a nullptr pointer. */
Handle(JS::NullPtr) {
MOZ_IMPLICIT Handle(JS::NullPtr) {
static_assert(mozilla::IsPointer<T>::value,
"JS::NullPtr overload not valid for non-pointer types");
ptr = reinterpret_cast<const T *>(&JS::NullPtr::constNullValue);
}
Handle(MutableHandle<T> handle) {
MOZ_IMPLICIT Handle(MutableHandle<T> handle) {
ptr = handle.address();
}
@ -509,8 +509,8 @@ template <typename T>
class MOZ_STACK_CLASS MutableHandle : public js::MutableHandleBase<T>
{
public:
inline MutableHandle(Rooted<T> *root);
inline MutableHandle(PersistentRooted<T> *root);
inline MOZ_IMPLICIT MutableHandle(Rooted<T> *root);
inline MOZ_IMPLICIT MutableHandle(PersistentRooted<T> *root);
private:
// Disallow true nullptr and emulated nullptr (gcc 4.4/4.5, __null, appears
@ -625,7 +625,7 @@ class InternalHandle<T*>
* Make this private to prevent accidental misuse; this is only for
* fromMarkedLocation().
*/
InternalHandle(T *field)
explicit InternalHandle(T *field)
: holder(reinterpret_cast<void * const *>(&js::NullPtr::constNullValue)),
offset(uintptr_t(field))
{}
@ -711,8 +711,8 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
}
public:
Rooted(JSContext *cx
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
explicit Rooted(JSContext *cx
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: ptr(js::GCMethods<T>::initial())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
@ -733,8 +733,8 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
init(js::ContextFriendFields::get(cx));
}
Rooted(js::ContextFriendFields *cx
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
explicit Rooted(js::ContextFriendFields *cx
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: ptr(js::GCMethods<T>::initial())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
@ -749,8 +749,8 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
init(cx);
}
Rooted(js::PerThreadDataFriendFields *pt
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
explicit Rooted(js::PerThreadDataFriendFields *pt
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: ptr(js::GCMethods<T>::initial())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
@ -765,8 +765,8 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
init(pt);
}
Rooted(JSRuntime *rt
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
explicit Rooted(JSRuntime *rt
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: ptr(js::GCMethods<T>::initial())
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
@ -886,7 +886,7 @@ class JS_PUBLIC_API(RootedGeneric)
public:
JS::Rooted<GCType> rooter;
RootedGeneric(js::ContextFriendFields *cx)
explicit RootedGeneric(js::ContextFriendFields *cx)
: rooter(cx)
{
}
@ -974,11 +974,11 @@ template <typename T>
class FakeMutableHandle : public js::MutableHandleBase<T>
{
public:
FakeMutableHandle(T *t) {
MOZ_IMPLICIT FakeMutableHandle(T *t) {
ptr = t;
}
FakeMutableHandle(FakeRooted<T> *root) {
MOZ_IMPLICIT FakeMutableHandle(FakeRooted<T> *root) {
ptr = root->address();
}
@ -1145,7 +1145,7 @@ class PersistentRooted : private mozilla::LinkedListElement<PersistentRooted<T>
}
public:
PersistentRooted(JSContext *cx) : ptr(js::GCMethods<T>::initial())
explicit PersistentRooted(JSContext *cx) : ptr(js::GCMethods<T>::initial())
{
registerWithRuntime(js::GetRuntime(cx));
}
@ -1155,7 +1155,7 @@ class PersistentRooted : private mozilla::LinkedListElement<PersistentRooted<T>
registerWithRuntime(js::GetRuntime(cx));
}
PersistentRooted(JSRuntime *rt) : ptr(js::GCMethods<T>::initial())
explicit PersistentRooted(JSRuntime *rt) : ptr(js::GCMethods<T>::initial())
{
registerWithRuntime(rt);
}
@ -1219,7 +1219,7 @@ namespace js {
class CompilerRootNode
{
protected:
CompilerRootNode(js::gc::Cell *ptr) : next(nullptr), ptr_(ptr) {}
explicit CompilerRootNode(js::gc::Cell *ptr) : next(nullptr), ptr_(ptr) {}
public:
void **address() { return (void **)&ptr_; }

Просмотреть файл

@ -32,7 +32,7 @@ struct JS_PUBLIC_API(SliceBudget)
SliceBudget();
/* Instantiate as SliceBudget(Time/WorkBudget(n)). */
SliceBudget(int64_t budget);
explicit SliceBudget(int64_t budget);
void reset() {
deadline = unlimitedDeadline;

Просмотреть файл

@ -1251,7 +1251,7 @@ class Value
private:
#if defined(JS_VALUE_IS_CONSTEXPR)
JS_VALUE_CONSTEXPR Value(jsval_layout layout) : data(layout) {}
MOZ_IMPLICIT JS_VALUE_CONSTEXPR Value(jsval_layout layout) : data(layout) {}
#endif
void staticAssertions() {

Просмотреть файл

@ -54,7 +54,7 @@ class Vector
typedef typename mozilla::VectorBase<T, MinInlineCapacity, AllocPolicy, Vector> Base;
public:
Vector(AllocPolicy alloc = AllocPolicy()) : Base(alloc) {}
explicit Vector(AllocPolicy alloc = AllocPolicy()) : Base(alloc) {}
Vector(Vector &&vec) : Base(mozilla::Move(vec)) {}
Vector &operator=(Vector &&vec) {
return Base::operator=(mozilla::Move(vec));

Просмотреть файл

@ -118,13 +118,13 @@ public:
// Are equivalent, and the explicit wrapping of the Address in the former
// is unnecessary.
struct ImplicitAddress {
ImplicitAddress(RegisterID base)
explicit ImplicitAddress(RegisterID base)
: base(base)
, offset(0)
{
}
ImplicitAddress(Address address)
MOZ_IMPLICIT ImplicitAddress(Address address)
: base(address.base)
, offset(address.offset)
{
@ -285,7 +285,7 @@ public:
{
}
Label(AbstractMacroAssembler<AssemblerType>* masm)
explicit Label(AbstractMacroAssembler<AssemblerType>* masm)
: m_label(masm->m_assembler.label())
{
}
@ -310,7 +310,7 @@ public:
{
}
DataLabelPtr(AbstractMacroAssembler<AssemblerType>* masm)
explicit DataLabelPtr(AbstractMacroAssembler<AssemblerType>* masm)
: m_label(masm->m_assembler.label())
{
}
@ -334,7 +334,7 @@ public:
{
}
DataLabel32(AbstractMacroAssembler<AssemblerType>* masm)
explicit DataLabel32(AbstractMacroAssembler<AssemblerType>* masm)
: m_label(masm->m_assembler.label())
{
}
@ -403,7 +403,7 @@ public:
{
}
Jump(JmpSrc jmp)
explicit Jump(JmpSrc jmp)
: m_jmp(jmp)
{
}

Просмотреть файл

@ -71,7 +71,7 @@ protected:
{
}
CodeLocationCommon(MacroAssemblerCodePtr location)
explicit CodeLocationCommon(MacroAssemblerCodePtr location)
: MacroAssemblerCodePtr(location)
{
}

Просмотреть файл

@ -727,7 +727,7 @@ public:
load16(left, ARMRegisters::S0);
move(right, ARMRegisters::S1);
m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1);
return m_assembler.jmp(ARMCondition(cond));
return Jump(m_assembler.jmp(ARMCondition(cond)));
}
Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1))

Просмотреть файл

@ -725,8 +725,8 @@ public:
// Convert the integer result back to float & compare to the original value - if not equal or unordered (NaN) then jump.
convertInt32ToDouble(dest, fpTemp);
m_assembler.ucomisd_rr(fpTemp, src);
failureCases.append(m_assembler.jp());
failureCases.append(m_assembler.jne());
failureCases.append(Jump(m_assembler.jp()));
failureCases.append(Jump(m_assembler.jne()));
}
void zeroDouble(FPRegisterID srcDest)

Просмотреть файл

@ -99,7 +99,7 @@ public:
DataLabelPtr loadDouble(const void* address, FPRegisterID dest)
{
DataLabelPtr label = moveWithPatch(ImmPtr(address), scratchRegister);
loadDouble(scratchRegister, dest);
loadDouble(ImplicitAddress(scratchRegister), dest);
return label;
}

Просмотреть файл

@ -395,7 +395,7 @@ public:
{
}
JmpSrc(int offset)
explicit JmpSrc(int offset)
: m_offset(offset)
{
}
@ -426,7 +426,7 @@ public:
void used() { m_used = true; }
bool isValid() const { return m_offset != -1; }
JmpDst(int offset)
explicit JmpDst(int offset)
: m_offset(offset)
, m_used(false)
{

Просмотреть файл

@ -90,7 +90,7 @@ class EvalScriptGuard
Rooted<JSLinearString*> lookupStr_;
public:
EvalScriptGuard(JSContext *cx)
explicit EvalScriptGuard(JSContext *cx)
: cx_(cx), script_(cx), lookup_(cx), lookupStr_(cx) {}
~EvalScriptGuard() {

Просмотреть файл

@ -100,7 +100,7 @@ class OrderedHashTable
AllocPolicy alloc;
public:
OrderedHashTable(AllocPolicy &ap)
explicit OrderedHashTable(AllocPolicy &ap)
: hashTable(nullptr), data(nullptr), dataLength(0), ranges(nullptr), alloc(ap) {}
bool init() {
@ -331,7 +331,7 @@ class OrderedHashTable
* Create a Range over all the entries in ht.
* (This is private on purpose. End users must use ht.all().)
*/
Range(OrderedHashTable &ht) : ht(ht), i(0), count(0), prevp(&ht.ranges), next(ht.ranges) {
explicit Range(OrderedHashTable &ht) : ht(ht), i(0), count(0), prevp(&ht.ranges), next(ht.ranges) {
*prevp = this;
if (next)
next->prevp = &next;
@ -717,7 +717,7 @@ class OrderedHashMap
public:
typedef typename Impl::Range Range;
OrderedHashMap(AllocPolicy ap = AllocPolicy()) : impl(ap) {}
explicit OrderedHashMap(AllocPolicy ap = AllocPolicy()) : impl(ap) {}
bool init() { return impl.init(); }
uint32_t count() const { return impl.count(); }
bool has(const Key &key) const { return impl.has(key); }
@ -753,7 +753,7 @@ class OrderedHashSet
public:
typedef typename Impl::Range Range;
OrderedHashSet(AllocPolicy ap = AllocPolicy()) : impl(ap) {}
explicit OrderedHashSet(AllocPolicy ap = AllocPolicy()) : impl(ap) {}
bool init() { return impl.init(); }
uint32_t count() const { return impl.count(); }
bool has(const T &value) const { return impl.has(value); }

Просмотреть файл

@ -3154,7 +3154,7 @@ class MemoryInitVisitor {
const JSRuntime *rt_;
public:
MemoryInitVisitor(const JSRuntime *rt)
explicit MemoryInitVisitor(const JSRuntime *rt)
: rt_(rt)
{}
@ -3222,7 +3222,7 @@ class MemoryTracingVisitor {
public:
MemoryTracingVisitor(JSTracer *trace)
explicit MemoryTracingVisitor(JSTracer *trace)
: trace_(trace)
{}

Просмотреть файл

@ -301,7 +301,7 @@ struct ClosureInfo
// Anything conditionally freed in the destructor should be initialized to
// nullptr here.
ClosureInfo(JSRuntime* runtime)
explicit ClosureInfo(JSRuntime* runtime)
: rt(runtime)
, errResult(nullptr)
, closure(nullptr)

Просмотреть файл

@ -19,7 +19,7 @@ struct IdValuePair
Value value;
IdValuePair() {}
IdValuePair(jsid idArg)
explicit IdValuePair(jsid idArg)
: id(idArg), value(UndefinedValue())
{}
};

Просмотреть файл

@ -157,7 +157,7 @@ class InlineMap
: inlAddPtr(ptr), isInlinePtr(true), inlPtrFound(found)
{}
AddPtr(const WordMapAddPtr &p) : mapAddPtr(p), isInlinePtr(false) {}
explicit AddPtr(const WordMapAddPtr &p) : mapAddPtr(p), isInlinePtr(false) {}
void operator==(const AddPtr &other);

Просмотреть файл

@ -423,7 +423,7 @@ class LifoAlloc
}
public:
Enum(LifoAlloc &alloc)
explicit Enum(LifoAlloc &alloc)
: alloc_(&alloc),
chunk_(alloc.first),
position_(static_cast<char *>(alloc.first ? alloc.first->start() : nullptr))
@ -513,7 +513,7 @@ class LifoAllocPolicy
LifoAlloc &alloc_;
public:
LifoAllocPolicy(LifoAlloc &alloc)
MOZ_IMPLICIT LifoAllocPolicy(LifoAlloc &alloc)
: alloc_(alloc)
{}
void *malloc_(size_t bytes) {

Просмотреть файл

@ -31,7 +31,7 @@ class PriorityQueue
public:
PriorityQueue(AllocPolicy ap = AllocPolicy())
explicit PriorityQueue(AllocPolicy ap = AllocPolicy())
: heap(ap)
{}

Просмотреть файл

@ -27,7 +27,7 @@ class SplayTree
T item;
Node *left, *right, *parent;
Node(const T &item)
explicit Node(const T &item)
: item(item), left(nullptr), right(nullptr), parent(nullptr)
{}
};
@ -40,7 +40,7 @@ class SplayTree
public:
SplayTree(LifoAlloc *alloc = nullptr)
explicit SplayTree(LifoAlloc *alloc = nullptr)
: alloc(alloc), root(nullptr), freeList(nullptr)
{}

Просмотреть файл

@ -60,7 +60,7 @@ struct frontend::StmtInfoBCE : public StmtInfoBase
ptrdiff_t continues; /* offset of last continue in loop */
uint32_t blockScopeIndex; /* index of scope in BlockScopeArray */
StmtInfoBCE(ExclusiveContext *cx) : StmtInfoBase(cx) {}
explicit StmtInfoBCE(ExclusiveContext *cx) : StmtInfoBase(cx) {}
/*
* To reuse space, alias two of the ptrdiff_t fields for use during
@ -93,7 +93,7 @@ struct LoopStmtInfo : public StmtInfoBCE
// Can we OSR into Ion from here? True unless there is non-loop state on the stack.
bool canIonOsr;
LoopStmtInfo(ExclusiveContext *cx) : StmtInfoBCE(cx) {}
explicit LoopStmtInfo(ExclusiveContext *cx) : StmtInfoBCE(cx) {}
static LoopStmtInfo* fromStmtInfo(StmtInfoBCE *stmt) {
JS_ASSERT(stmt->isLoop());
@ -3931,7 +3931,7 @@ class EmitLevelManager
{
BytecodeEmitter *bce;
public:
EmitLevelManager(BytecodeEmitter *bce) : bce(bce) { bce->emitLevel++; }
explicit EmitLevelManager(BytecodeEmitter *bce) : bce(bce) { bce->emitLevel++; }
~EmitLevelManager() { bce->emitLevel--; }
};

Просмотреть файл

@ -31,7 +31,7 @@ class TokenStream;
class CGConstList {
Vector<Value> list;
public:
CGConstList(ExclusiveContext *cx) : list(cx) {}
explicit CGConstList(ExclusiveContext *cx) : list(cx) {}
bool append(Value v) { JS_ASSERT_IF(v.isString(), v.toString()->isAtom()); return list.append(v); }
size_t length() const { return list.length(); }
void finish(ConstArray *array);
@ -51,7 +51,7 @@ struct CGObjectList {
struct CGTryNoteList {
Vector<JSTryNote> list;
CGTryNoteList(ExclusiveContext *cx) : list(cx) {}
explicit CGTryNoteList(ExclusiveContext *cx) : list(cx) {}
bool append(JSTryNoteKind kind, uint32_t stackDepth, size_t start, size_t end);
size_t length() const { return list.length(); }
@ -60,7 +60,7 @@ struct CGTryNoteList {
struct CGBlockScopeList {
Vector<BlockScopeNote> list;
CGBlockScopeList(ExclusiveContext *cx) : list(cx) {}
explicit CGBlockScopeList(ExclusiveContext *cx) : list(cx) {}
bool append(uint32_t scopeObject, uint32_t offset, uint32_t parent);
uint32_t findEnclosingScope(uint32_t index);

Просмотреть файл

@ -1135,7 +1135,7 @@ class ContinueStatement : public LoopControlStatement
class DebuggerStatement : public ParseNode
{
public:
DebuggerStatement(const TokenPos &pos)
explicit DebuggerStatement(const TokenPos &pos)
: ParseNode(PNK_DEBUGGER, JSOP_NOP, PN_NULLARY, pos)
{ }
};
@ -1178,13 +1178,13 @@ class ConditionalExpression : public ParseNode
class ThisLiteral : public ParseNode
{
public:
ThisLiteral(const TokenPos &pos) : ParseNode(PNK_THIS, JSOP_THIS, PN_NULLARY, pos) { }
explicit ThisLiteral(const TokenPos &pos) : ParseNode(PNK_THIS, JSOP_THIS, PN_NULLARY, pos) { }
};
class NullLiteral : public ParseNode
{
public:
NullLiteral(const TokenPos &pos) : ParseNode(PNK_NULL, JSOP_NULL, PN_NULLARY, pos) { }
explicit NullLiteral(const TokenPos &pos) : ParseNode(PNK_NULL, JSOP_NULL, PN_NULLARY, pos) { }
};
class BooleanLiteral : public ParseNode

Просмотреть файл

@ -1202,7 +1202,7 @@ Parser<FullParseHandler>::makeDefIntoUse(Definition *dn, ParseNode *pn, JSAtom *
template <typename ParseHandler>
struct BindData
{
BindData(ExclusiveContext *cx) : let(cx) {}
explicit BindData(ExclusiveContext *cx) : let(cx) {}
typedef bool
(*Binder)(BindData *data, HandlePropertyName name, Parser<ParseHandler> *parser);
@ -1214,7 +1214,7 @@ struct BindData
Binder binder; /* binder, discriminates u */
struct LetData {
LetData(ExclusiveContext *cx) : blockObj(cx) {}
explicit LetData(ExclusiveContext *cx) : blockObj(cx) {}
VarContext varContext;
RootedStaticBlockObject blockObj;
unsigned overflow;
@ -3227,7 +3227,7 @@ struct AddLetDecl
{
uint32_t blockid;
AddLetDecl(uint32_t blockid) : blockid(blockid) {}
explicit AddLetDecl(uint32_t blockid) : blockid(blockid) {}
bool operator()(TokenStream &ts, ParseContext<FullParseHandler> *pc,
HandleStaticBlockObject blockObj, const Shape &shape, JSAtom *)

Просмотреть файл

@ -30,7 +30,7 @@ struct StmtInfoPC : public StmtInfoBase {
uint32_t blockid; /* for simplified dominance computation */
uint32_t innerBlockScopeDepth; /* maximum depth of nested block scopes, in slots */
StmtInfoPC(ExclusiveContext *cx) : StmtInfoBase(cx), innerBlockScopeDepth(0) {}
explicit StmtInfoPC(ExclusiveContext *cx) : StmtInfoBase(cx), innerBlockScopeDepth(0) {}
};
typedef HashSet<JSAtom *> FuncStmtSet;

Просмотреть файл

@ -410,7 +410,7 @@ struct StmtInfoBase {
// isNestedScope.
Rooted<NestedScopeObject *> staticScope;
StmtInfoBase(ExclusiveContext *cx)
explicit StmtInfoBase(ExclusiveContext *cx)
: isBlockScope(false), isNestedScope(false), isForLetBlock(false),
label(cx), staticScope(cx)
{}

Просмотреть файл

@ -597,7 +597,7 @@ class MOZ_STACK_CLASS TokenStream
//
// This class is explicity ignored by the analysis, so don't add any
// more pointers to GC things here!
Position(AutoKeepAtoms&) { }
explicit Position(AutoKeepAtoms&) { }
private:
Position(const Position&) MOZ_DELETE;
friend class TokenStream;

Просмотреть файл

@ -412,7 +412,7 @@ class BarrieredBase : public BarrieredBaseMixins<T>
protected:
T value;
BarrieredBase(T v) : value(v) {}
explicit BarrieredBase(T v) : value(v) {}
~BarrieredBase() { pre(); }
public:
@ -468,7 +468,10 @@ class PreBarriered : public BarrieredBase<T>
{
public:
PreBarriered() : BarrieredBase<T>(GCMethods<T>::initial()) {}
PreBarriered(T v) : BarrieredBase<T>(v) {}
/*
* Allow implicit construction for use in generic contexts, such as DebuggerWeakMap::markKeys.
*/
MOZ_IMPLICIT PreBarriered(T v) : BarrieredBase<T>(v) {}
explicit PreBarriered(const PreBarriered<T> &v)
: BarrieredBase<T>(v.value) {}
@ -735,8 +738,8 @@ class ReadBarriered
public:
ReadBarriered() : value(nullptr) {}
ReadBarriered(T value) : value(value) {}
ReadBarriered(const Rooted<T> &rooted) : value(rooted) {}
explicit ReadBarriered(T value) : value(value) {}
explicit ReadBarriered(const Rooted<T> &rooted) : value(rooted) {}
T get() const {
if (!InternalGCMethods<T>::isMarkable(value))
@ -914,7 +917,7 @@ class HeapSlotArray
HeapSlot *array;
public:
HeapSlotArray(HeapSlot *array) : array(array) {}
explicit HeapSlotArray(HeapSlot *array) : array(array) {}
operator const Value *() const { return Valueify(array); }
operator HeapSlot *() const { return array; }

Просмотреть файл

@ -64,7 +64,7 @@ template<class Node>
class ComponentFinder
{
public:
ComponentFinder(uintptr_t sl)
explicit ComponentFinder(uintptr_t sl)
: clock(1),
stack(nullptr),
firstComponent(nullptr),

Просмотреть файл

@ -31,7 +31,7 @@ class AutoCopyFreeListToArenas
struct AutoFinishGC
{
AutoFinishGC(JSRuntime *rt);
explicit AutoFinishGC(JSRuntime *rt);
};
/*
@ -41,7 +41,7 @@ struct AutoFinishGC
class AutoTraceSession
{
public:
AutoTraceSession(JSRuntime *rt, HeapState state = Tracing);
explicit AutoTraceSession(JSRuntime *rt, HeapState state = Tracing);
~AutoTraceSession();
protected:
@ -68,7 +68,7 @@ class IncrementalSafety
{
const char *reason_;
IncrementalSafety(const char *reason) : reason_(reason) {}
explicit IncrementalSafety(const char *reason) : reason_(reason) {}
public:
static IncrementalSafety Safe() { return IncrementalSafety(nullptr); }

Просмотреть файл

@ -104,7 +104,7 @@ class CallbackVector : public Vector<Callback<F>, 4, SystemAllocPolicy> {};
class GCRuntime
{
public:
GCRuntime(JSRuntime *rt);
explicit GCRuntime(JSRuntime *rt);
bool init(uint32_t maxbytes);
void finish();

Просмотреть файл

@ -1694,7 +1694,7 @@ struct UnmarkGrayTracer : public JSTracer
* We set eagerlyTraceWeakMaps to false because the cycle collector will fix
* up any color mismatches involving weakmaps when it runs.
*/
UnmarkGrayTracer(JSRuntime *rt)
explicit UnmarkGrayTracer(JSRuntime *rt)
: JSTracer(rt, UnmarkGrayChildren, DoNotTraceWeakMaps),
tracingShape(false),
previousShape(nullptr),

Просмотреть файл

@ -45,7 +45,7 @@ class gcstats::StatisticsSerializer
AsText = false
};
StatisticsSerializer(Mode asJSON)
explicit StatisticsSerializer(Mode asJSON)
: buf_(), asJSON_(asJSON), needComma_(false), oom_(false)
{}

Просмотреть файл

@ -75,7 +75,7 @@ enum Stat {
class StatisticsSerializer;
struct Statistics {
Statistics(JSRuntime *rt);
explicit Statistics(JSRuntime *rt);
~Statistics();
void beginPhase(Phase phase);

Просмотреть файл

@ -54,7 +54,7 @@ class MarkStack
size_t maxCapacity_;
public:
MarkStack(size_t maxCapacity)
explicit MarkStack(size_t maxCapacity)
: stack_(nullptr),
tos_(nullptr),
end_(nullptr),

Просмотреть файл

@ -93,7 +93,7 @@ struct Zone : public JS::shadow::Zone,
public js::gc::GraphNodeBase<JS::Zone>,
public js::MallocProvider<JS::Zone>
{
Zone(JSRuntime *rt);
explicit Zone(JSRuntime *rt);
~Zone();
bool init();

Просмотреть файл

@ -29,7 +29,7 @@ FRAGMENT(Root, handle) {
FRAGMENT(Root, HeapSlot) {
JS::Rooted<jsval> plinth(cx, STRING_TO_JSVAL(JS_NewStringCopyZ(cx, "plinth")));
JS::Rooted<JSObject *> array(cx, JS_NewArrayObject(cx, plinth));
JS::Rooted<JSObject *> array(cx, JS_NewArrayObject(cx, JS::HandleValueArray(plinth)));
breakpoint();

Просмотреть файл

@ -43,7 +43,7 @@ static const size_t kBitsPerByteLog2 = 3;
class MOZ_STACK_CLASS RegExpStackCursor
{
public:
RegExpStackCursor(JSContext *cx)
explicit RegExpStackCursor(JSContext *cx)
: cx(cx), cursor(base())
{}

Просмотреть файл

@ -64,7 +64,7 @@ class AliasSetIterator
unsigned pos;
public:
AliasSetIterator(AliasSet set)
explicit AliasSetIterator(AliasSet set)
: flags(set.flags()), pos(0)
{
while (flags && (flags & 1) == 0) {

Просмотреть файл

@ -387,7 +387,7 @@ class Type
public:
Type() : which_(Which(-1)) {}
Type(Which w) : which_(w) {}
MOZ_IMPLICIT Type(Which w) : which_(w) {}
bool operator==(Type rhs) const { return which_ == rhs.which_; }
bool operator!=(Type rhs) const { return which_ != rhs.which_; }
@ -498,8 +498,8 @@ class RetType
public:
RetType() : which_(Which(-1)) {}
RetType(Which w) : which_(w) {}
RetType(AsmJSCoercion coercion) {
MOZ_IMPLICIT RetType(Which w) : which_(w) {}
MOZ_IMPLICIT RetType(AsmJSCoercion coercion) {
switch (coercion) {
case AsmJS_ToInt32: which_ = Signed; break;
case AsmJS_ToNumber: which_ = Double; break;
@ -572,9 +572,9 @@ class VarType
public:
VarType()
: which_(Which(-1)) {}
VarType(Which w)
MOZ_IMPLICIT VarType(Which w)
: which_(w) {}
VarType(AsmJSCoercion coercion) {
MOZ_IMPLICIT VarType(AsmJSCoercion coercion) {
switch (coercion) {
case AsmJS_ToInt32: which_ = Int; break;
case AsmJS_ToNumber: which_ = Double; break;
@ -647,7 +647,7 @@ class ABIArgIter
void settle() { if (!done()) gen_.next(ToMIRType(types_[i_])); }
public:
ABIArgIter(const VecT &types) : types_(types), i_(0) { settle(); }
explicit ABIArgIter(const VecT &types) : types_(types), i_(0) { settle(); }
void operator++(int) { JS_ASSERT(!done()); i_++; settle(); }
bool done() const { return i_ == types_.length(); }
@ -671,7 +671,7 @@ class Signature
RetType retType_;
public:
Signature(LifoAlloc &alloc)
explicit Signature(LifoAlloc &alloc)
: argTypes_(alloc) {}
Signature(LifoAlloc &alloc, RetType retType)
: argTypes_(alloc), retType_(retType) {}
@ -881,7 +881,7 @@ class MOZ_STACK_CLASS ModuleCompiler
friend class ModuleCompiler;
friend class js::LifoAlloc;
Global(Which which) : which_(which) {}
explicit Global(Which which) : which_(which) {}
public:
Which which() const {
@ -998,10 +998,10 @@ class MOZ_STACK_CLASS ModuleCompiler
} u;
MathBuiltin() : kind(Kind(-1)) {}
MathBuiltin(double cst) : kind(Constant) {
explicit MathBuiltin(double cst) : kind(Constant) {
u.cst = cst;
}
MathBuiltin(AsmJSMathBuiltinFunction func) : kind(Function) {
explicit MathBuiltin(AsmJSMathBuiltinFunction func) : kind(Function) {
u.func = func;
}
};
@ -1620,7 +1620,7 @@ class MOZ_STACK_CLASS ModuleCompiler
for (size_t i = 0; i < masm_.numAsmJSAbsoluteLinks(); i++) {
AsmJSAbsoluteLink src = masm_.asmJSAbsoluteLink(i);
AsmJSModule::AbsoluteLink link;
link.patchAt = masm_.actualOffset(src.patchAt.offset());
link.patchAt = CodeOffsetLabel(masm_.actualOffset(src.patchAt.offset()));
link.target = src.target;
if (!module_->addAbsoluteLink(link))
return false;
@ -2025,7 +2025,7 @@ class FunctionCompiler
if (!newBlock(/* pred = */ nullptr, &curBlock_, fn_))
return false;
for (ABIArgTypeIter i = argTypes; !i.done(); i++) {
for (ABIArgTypeIter i(argTypes); !i.done(); i++) {
MAsmJSParameter *ins = MAsmJSParameter::New(alloc(), *i, i.mirType());
curBlock_->add(ins);
curBlock_->initSlot(info().localSlot(i.index()), ins);
@ -5616,7 +5616,7 @@ struct ParallelGroupState
int32_t outstandingJobs; // Good work, jobs!
uint32_t compiledJobs;
ParallelGroupState(js::Vector<AsmJSParallelTask> &tasks)
explicit ParallelGroupState(js::Vector<AsmJSParallelTask> &tasks)
: tasks(tasks), outstandingJobs(0), compiledJobs(0)
{ }
};
@ -5992,7 +5992,7 @@ static const RegisterSet NonVolatileRegs =
static void
LoadAsmJSActivationIntoRegister(MacroAssembler &masm, Register reg)
{
masm.movePtr(AsmJSImm_Runtime, reg);
masm.movePtr(AsmJSImmPtr(AsmJSImm_Runtime), reg);
size_t offset = offsetof(JSRuntime, mainThread) +
PerThreadData::offsetOfAsmJSActivationStackReadOnly();
masm.loadPtr(Address(reg, offset), reg);
@ -6388,16 +6388,16 @@ GenerateFFIInterpreterExit(ModuleCompiler &m, const ModuleCompiler::ExitDescript
AssertStackAlignment(masm);
switch (exit.sig().retType().which()) {
case RetType::Void:
masm.callExit(AsmJSImm_InvokeFromAsmJS_Ignore, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_InvokeFromAsmJS_Ignore), i.stackBytesConsumedSoFar());
masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
break;
case RetType::Signed:
masm.callExit(AsmJSImm_InvokeFromAsmJS_ToInt32, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_InvokeFromAsmJS_ToInt32), i.stackBytesConsumedSoFar());
masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
masm.unboxInt32(argv, ReturnReg);
break;
case RetType::Double:
masm.callExit(AsmJSImm_InvokeFromAsmJS_ToNumber, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_InvokeFromAsmJS_ToNumber), i.stackBytesConsumedSoFar());
masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
masm.loadDouble(argv, ReturnFloatReg);
break;
@ -6463,12 +6463,12 @@ GenerateOOLConvert(ModuleCompiler &m, RetType retType, Label *throwLabel)
AssertStackAlignment(masm);
switch (retType.which()) {
case RetType::Signed:
masm.callExit(AsmJSImm_CoerceInPlace_ToInt32, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_CoerceInPlace_ToInt32), i.stackBytesConsumedSoFar());
masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
masm.unboxInt32(Address(StackPointer, offsetToArgv), ReturnReg);
break;
case RetType::Double:
masm.callExit(AsmJSImm_CoerceInPlace_ToNumber, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_CoerceInPlace_ToNumber), i.stackBytesConsumedSoFar());
masm.branchTest32(Assembler::Zero, ReturnReg, ReturnReg, throwLabel);
masm.loadDouble(Address(StackPointer, offsetToArgv), ReturnFloatReg);
break;
@ -6537,10 +6537,10 @@ GenerateFFIIonExit(ModuleCompiler &m, const ModuleCompiler::ExitDescriptor &exit
unsigned globalDataOffset = m.module().exitIndexToGlobalDataOffset(exitIndex);
#if defined(JS_CODEGEN_X64)
CodeOffsetLabel label2 = masm.leaRipRelative(callee);
m.masm().append(AsmJSGlobalAccess(label2.offset(), globalDataOffset));
m.masm().append(AsmJSGlobalAccess(CodeOffsetLabel(label2.offset()), globalDataOffset));
#elif defined(JS_CODEGEN_X86)
CodeOffsetLabel label2 = masm.movlWithPatch(Imm32(0), callee);
m.masm().append(AsmJSGlobalAccess(label2.offset(), globalDataOffset));
m.masm().append(AsmJSGlobalAccess(CodeOffsetLabel(label2.offset()), globalDataOffset));
#else
masm.lea(Operand(GlobalReg, globalDataOffset), callee);
#endif
@ -6771,7 +6771,7 @@ GenerateStackOverflowExit(ModuleCompiler &m, Label *throwLabel)
JS_ASSERT(i.done());
AssertStackAlignment(masm);
masm.callExit(AsmJSImm_ReportOverRecursed, i.stackBytesConsumedSoFar());
masm.callExit(AsmJSImmPtr(AsmJSImm_ReportOverRecursed), i.stackBytesConsumedSoFar());
// Don't worry about restoring the stack; throwLabel will pop everything.
masm.jump(throwLabel);
@ -6829,7 +6829,7 @@ GenerateInterruptExit(ModuleCompiler &m, Label *throwLabel)
LoadJSContextFromActivation(masm, activation, IntArgReg0);
#endif
masm.call(AsmJSImm_HandleExecutionInterrupt);
masm.call(AsmJSImmPtr(AsmJSImm_HandleExecutionInterrupt));
masm.branchIfFalseBool(ReturnReg, throwLabel);
// Restore the StackPointer to it's position before the call.

Просмотреть файл

@ -67,7 +67,7 @@ AsmJSFrameIterator::AsmJSFrameIterator(const AsmJSActivation *activation)
struct GetCallSite
{
const AsmJSModule &module;
GetCallSite(const AsmJSModule &module) : module(module) {}
explicit GetCallSite(const AsmJSModule &module) : module(module) {}
uint32_t operator[](size_t index) const {
return module.callSite(index).returnAddressOffset();
}

Просмотреть файл

@ -29,7 +29,7 @@ class AsmJSFrameIterator
void settle();
public:
AsmJSFrameIterator(const AsmJSActivation *activation);
explicit AsmJSFrameIterator(const AsmJSActivation *activation);
void operator++() { popFrame(); settle(); }
bool done() const { return !callsite_; }
JSAtom *functionDisplayAtom() const;

Просмотреть файл

@ -277,7 +277,7 @@ AsmJSModule::restoreToInitialState(ArrayBufferObject *maybePrevBuffer, Exclusive
// in staticallyLink are valid.
for (size_t i = 0; i < staticLinkData_.absoluteLinks.length(); i++) {
AbsoluteLink link = staticLinkData_.absoluteLinks[i];
Assembler::patchDataWithValueCheck(code_ + link.patchAt.offset(),
Assembler::patchDataWithValueCheck(CodeLocationLabel(code_ + link.patchAt.offset()),
PatchedImmPtr((void*)-1),
PatchedImmPtr(AddressOf(link.target, cx)));
}
@ -318,7 +318,7 @@ AsmJSModule::staticallyLink(ExclusiveContext *cx)
for (size_t i = 0; i < staticLinkData_.absoluteLinks.length(); i++) {
AbsoluteLink link = staticLinkData_.absoluteLinks[i];
Assembler::patchDataWithValueCheck(code_ + link.patchAt.offset(),
Assembler::patchDataWithValueCheck(CodeLocationLabel(code_ + link.patchAt.offset()),
PatchedImmPtr(AddressOf(link.target, cx)),
PatchedImmPtr((void*)-1));
}
@ -1079,7 +1079,7 @@ struct PropertyNameWrapper
PropertyNameWrapper()
: name(nullptr)
{}
PropertyNameWrapper(PropertyName *name)
explicit PropertyNameWrapper(PropertyName *name)
: name(name)
{}
size_t serializedSize() const {
@ -1305,7 +1305,7 @@ struct ScopedCacheEntryOpenedForRead
const uint8_t *memory;
intptr_t handle;
ScopedCacheEntryOpenedForRead(ExclusiveContext *cx)
explicit ScopedCacheEntryOpenedForRead(ExclusiveContext *cx)
: cx(cx), serializedSize(0), memory(nullptr), handle(0)
{}

Просмотреть файл

@ -299,7 +299,7 @@ class AsmJSModule
PropertyName *name_;
public:
Name() : name_(nullptr) {}
Name(PropertyName *name) : name_(name) {}
MOZ_IMPLICIT Name(PropertyName *name) : name_(name) {}
PropertyName *name() const { return name_; }
PropertyName *&name() { return name_; }
size_t serializedSize() const;

Просмотреть файл

@ -175,7 +175,7 @@ class AutoSetHandlingSignal
JSRuntime *rt;
public:
AutoSetHandlingSignal(JSRuntime *rt)
explicit AutoSetHandlingSignal(JSRuntime *rt)
: rt(rt)
{
JS_ASSERT(!rt->handlingSignal);

Просмотреть файл

@ -350,7 +350,7 @@ BaselineCompiler::emitPrologue()
// Record the offset of the prologue, because Ion can bailout before
// the scope chain is initialized.
prologueOffset_ = masm.currentOffset();
prologueOffset_ = CodeOffsetLabel(masm.currentOffset());
// Initialize the scope chain before any operation that may
// call into the VM and trigger a GC.
@ -380,7 +380,7 @@ BaselineCompiler::emitEpilogue()
{
// Record the offset of the epilogue, so we can do early return from
// Debugger handlers during on-stack recompile.
epilogueOffset_ = masm.currentOffset();
epilogueOffset_ = CodeOffsetLabel(masm.currentOffset());
masm.bind(&return_);
@ -454,7 +454,7 @@ BaselineCompiler::emitIC(ICStub *stub, ICEntry::Kind kind)
CodeOffsetLabel patchOffset;
EmitCallIC(&patchOffset, masm);
entry->setReturnOffset(masm.currentOffset());
entry->setReturnOffset(CodeOffsetLabel(masm.currentOffset()));
if (!addICLoadLabel(patchOffset))
return false;
@ -550,7 +550,7 @@ BaselineCompiler::emitDebugPrologue()
masm.bind(&done);
}
postDebugPrologueOffset_ = masm.currentOffset();
postDebugPrologueOffset_ = CodeOffsetLabel(masm.currentOffset());
return true;
}
@ -726,7 +726,7 @@ BaselineCompiler::emitDebugTrap()
// Add an IC entry for the return offset -> pc mapping.
ICEntry icEntry(script->pcToOffset(pc), ICEntry::Kind_DebugTrap);
icEntry.setReturnOffset(masm.currentOffset());
icEntry.setReturnOffset(CodeOffsetLabel(masm.currentOffset()));
if (!icEntries_.append(icEntry))
return false;

Просмотреть файл

@ -28,7 +28,7 @@ struct DebugModeOSREntry
uint32_t pcOffset;
ICEntry::Kind frameKind;
DebugModeOSREntry(JSScript *script)
explicit DebugModeOSREntry(JSScript *script)
: script(script),
oldBaselineScript(script->baselineScript()),
oldStub(nullptr),
@ -742,7 +742,7 @@ JitRuntime::generateBaselineDebugModeOSRHandler(JSContext *cx, uint32_t *noFrame
// Not all patched baseline frames are returning from a situation where
// the frame reg is already fixed up.
CodeOffsetLabel noFrameRegPopOffset = masm.currentOffset();
CodeOffsetLabel noFrameRegPopOffset(masm.currentOffset());
// Record the stack pointer for syncing.
masm.movePtr(StackPointer, syncedStackStart);

Просмотреть файл

@ -172,14 +172,14 @@ ICStub::trace(JSTracer *trc)
// that references the same stub chain.
if (isMonitoredFallback()) {
ICTypeMonitor_Fallback *lastMonStub = toMonitoredFallbackStub()->fallbackMonitorStub();
for (ICStubConstIterator iter = lastMonStub->firstMonitorStub(); !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(lastMonStub->firstMonitorStub()); !iter.atEnd(); iter++) {
JS_ASSERT_IF(iter->next() == nullptr, *iter == lastMonStub);
iter->trace(trc);
}
}
if (isUpdated()) {
for (ICStubConstIterator iter = toUpdatedStub()->firstUpdateStub(); !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(toUpdatedStub()->firstUpdateStub()); !iter.atEnd(); iter++) {
JS_ASSERT_IF(iter->next() == nullptr, iter->isTypeUpdate_Fallback());
iter->trace(trc);
}
@ -1170,7 +1170,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
// Check for existing TypeMonitor stub.
ICTypeMonitor_PrimitiveSet *existingStub = nullptr;
for (ICStubConstIterator iter = firstMonitorStub(); !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstMonitorStub()); !iter.atEnd(); iter++) {
if (iter->isTypeMonitor_PrimitiveSet()) {
existingStub = iter->toTypeMonitor_PrimitiveSet();
if (existingStub->containsType(type))
@ -1198,7 +1198,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
RootedObject obj(cx, &val.toObject());
// Check for existing TypeMonitor stub.
for (ICStubConstIterator iter = firstMonitorStub(); !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstMonitorStub()); !iter.atEnd(); iter++) {
if (iter->isTypeMonitor_SingleObject() &&
iter->toTypeMonitor_SingleObject()->object() == obj)
{
@ -1222,7 +1222,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
RootedTypeObject type(cx, val.toObject().type());
// Check for existing TypeMonitor stub.
for (ICStubConstIterator iter = firstMonitorStub(); !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstMonitorStub()); !iter.atEnd(); iter++) {
if (iter->isTypeMonitor_TypeObject() &&
iter->toTypeMonitor_TypeObject()->type() == type)
{
@ -1250,7 +1250,7 @@ ICTypeMonitor_Fallback::addMonitorStubForValue(JSContext *cx, JSScript *script,
// only time that any main stubs' firstMonitorStub fields need to be updated to
// refer to the newly added monitor stub.
ICStub *firstStub = mainFallbackStub_->icEntry()->firstStub();
for (ICStubConstIterator iter = firstStub; !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstStub); !iter.atEnd(); iter++) {
// Non-monitored stubs are used if the result has always the same type,
// e.g. a StringLength stub will always return int32.
if (!iter->isMonitored())
@ -1422,7 +1422,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
// Check for existing TypeUpdate stub.
ICTypeUpdate_PrimitiveSet *existingStub = nullptr;
for (ICStubConstIterator iter = firstUpdateStub_; !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstUpdateStub_); !iter.atEnd(); iter++) {
if (iter->isTypeUpdate_PrimitiveSet()) {
existingStub = iter->toTypeUpdate_PrimitiveSet();
if (existingStub->containsType(type))
@ -1447,7 +1447,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
RootedObject obj(cx, &val.toObject());
// Check for existing TypeUpdate stub.
for (ICStubConstIterator iter = firstUpdateStub_; !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstUpdateStub_); !iter.atEnd(); iter++) {
if (iter->isTypeUpdate_SingleObject() &&
iter->toTypeUpdate_SingleObject()->object() == obj)
{
@ -1468,7 +1468,7 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
RootedTypeObject type(cx, val.toObject().type());
// Check for existing TypeUpdate stub.
for (ICStubConstIterator iter = firstUpdateStub_; !iter.atEnd(); iter++) {
for (ICStubConstIterator iter(firstUpdateStub_); !iter.atEnd(); iter++) {
if (iter->isTypeUpdate_TypeObject() &&
iter->toTypeUpdate_TypeObject()->type() == type)
{
@ -7320,7 +7320,7 @@ DoSetPropFallback(JSContext *cx, BaselineFrame *frame, ICSetProp_Fallback *stub_
if (!SetNameOperation(cx, script, pc, obj, rhs))
return false;
} else if (op == JSOP_SETALIASEDVAR) {
obj->as<ScopeObject>().setAliasedVar(cx, pc, name, rhs);
obj->as<ScopeObject>().setAliasedVar(cx, ScopeCoordinate(pc), name, rhs);
} else {
MOZ_ASSERT(op == JSOP_SETPROP);
if (script->strict()) {

Просмотреть файл

@ -473,7 +473,7 @@ class ICStubConstIterator
ICStub *currentStub_;
public:
ICStubConstIterator(ICStub *currentStub) : currentStub_(currentStub) {}
explicit ICStubConstIterator(ICStub *currentStub) : currentStub_(currentStub) {}
static ICStubConstIterator StartingAt(ICStub *stub) {
return ICStubConstIterator(stub);
@ -534,7 +534,7 @@ class ICStubIterator
ICStub *currentStub_;
bool unlinked_;
ICStubIterator(ICFallbackStub *fallbackStub, bool end=false);
explicit ICStubIterator(ICFallbackStub *fallbackStub, bool end=false);
public:
bool operator ==(const ICStubIterator &other) const {
@ -1180,7 +1180,7 @@ class ICUseCount_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICUseCount_Fallback(JitCode *stubCode)
explicit ICUseCount_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::UseCount_Fallback, stubCode)
{ }
@ -1197,7 +1197,7 @@ class ICUseCount_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::UseCount_Fallback)
{ }
@ -1213,7 +1213,7 @@ class ICProfiler_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICProfiler_Fallback(JitCode *stubCode)
explicit ICProfiler_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::Profiler_Fallback, stubCode)
{ }
@ -1230,7 +1230,7 @@ class ICProfiler_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::Profiler_Fallback)
{ }
@ -1684,7 +1684,7 @@ class ICTypeUpdate_Fallback : public ICStub
{
friend class ICStubSpace;
ICTypeUpdate_Fallback(JitCode *stubCode)
explicit ICTypeUpdate_Fallback(JitCode *stubCode)
: ICStub(ICStub::TypeUpdate_Fallback, stubCode)
{}
@ -1701,7 +1701,7 @@ class ICTypeUpdate_Fallback : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::TypeUpdate_Fallback)
{ }
@ -1845,7 +1845,7 @@ class ICThis_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICThis_Fallback(JitCode *stubCode)
explicit ICThis_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::This_Fallback, stubCode) {}
public:
@ -1861,7 +1861,7 @@ class ICThis_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::This_Fallback) {}
ICStub *getStub(ICStubSpace *space) {
@ -1954,7 +1954,7 @@ class ICCompare_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICCompare_Fallback(JitCode *stubCode)
explicit ICCompare_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::Compare_Fallback, stubCode) {}
public:
@ -1972,7 +1972,7 @@ class ICCompare_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::Compare_Fallback) {}
ICStub *getStub(ICStubSpace *space) {
@ -1985,7 +1985,7 @@ class ICCompare_Int32 : public ICStub
{
friend class ICStubSpace;
ICCompare_Int32(JitCode *stubCode)
explicit ICCompare_Int32(JitCode *stubCode)
: ICStub(ICStub::Compare_Int32, stubCode) {}
public:
@ -2014,7 +2014,7 @@ class ICCompare_Double : public ICStub
{
friend class ICStubSpace;
ICCompare_Double(JitCode *stubCode)
explicit ICCompare_Double(JitCode *stubCode)
: ICStub(ICStub::Compare_Double, stubCode)
{}
@ -2089,7 +2089,7 @@ class ICCompare_String : public ICStub
{
friend class ICStubSpace;
ICCompare_String(JitCode *stubCode)
explicit ICCompare_String(JitCode *stubCode)
: ICStub(ICStub::Compare_String, stubCode)
{}
@ -2119,7 +2119,7 @@ class ICCompare_Boolean : public ICStub
{
friend class ICStubSpace;
ICCompare_Boolean(JitCode *stubCode)
explicit ICCompare_Boolean(JitCode *stubCode)
: ICStub(ICStub::Compare_Boolean, stubCode)
{}
@ -2149,7 +2149,7 @@ class ICCompare_Object : public ICStub
{
friend class ICStubSpace;
ICCompare_Object(JitCode *stubCode)
explicit ICCompare_Object(JitCode *stubCode)
: ICStub(ICStub::Compare_Object, stubCode)
{}
@ -2179,7 +2179,7 @@ class ICCompare_ObjectWithUndefined : public ICStub
{
friend class ICStubSpace;
ICCompare_ObjectWithUndefined(JitCode *stubCode)
explicit ICCompare_ObjectWithUndefined(JitCode *stubCode)
: ICStub(ICStub::Compare_ObjectWithUndefined, stubCode)
{}
@ -2272,7 +2272,7 @@ class ICToBool_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICToBool_Fallback(JitCode *stubCode)
explicit ICToBool_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::ToBool_Fallback, stubCode) {}
public:
@ -2290,7 +2290,7 @@ class ICToBool_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_Fallback) {}
ICStub *getStub(ICStubSpace *space) {
@ -2303,7 +2303,7 @@ class ICToBool_Int32 : public ICStub
{
friend class ICStubSpace;
ICToBool_Int32(JitCode *stubCode)
explicit ICToBool_Int32(JitCode *stubCode)
: ICStub(ICStub::ToBool_Int32, stubCode) {}
public:
@ -2319,7 +2319,7 @@ class ICToBool_Int32 : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_Int32) {}
ICStub *getStub(ICStubSpace *space) {
@ -2332,7 +2332,7 @@ class ICToBool_String : public ICStub
{
friend class ICStubSpace;
ICToBool_String(JitCode *stubCode)
explicit ICToBool_String(JitCode *stubCode)
: ICStub(ICStub::ToBool_String, stubCode) {}
public:
@ -2348,7 +2348,7 @@ class ICToBool_String : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_String) {}
ICStub *getStub(ICStubSpace *space) {
@ -2361,7 +2361,7 @@ class ICToBool_NullUndefined : public ICStub
{
friend class ICStubSpace;
ICToBool_NullUndefined(JitCode *stubCode)
explicit ICToBool_NullUndefined(JitCode *stubCode)
: ICStub(ICStub::ToBool_NullUndefined, stubCode) {}
public:
@ -2377,7 +2377,7 @@ class ICToBool_NullUndefined : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_NullUndefined) {}
ICStub *getStub(ICStubSpace *space) {
@ -2390,7 +2390,7 @@ class ICToBool_Double : public ICStub
{
friend class ICStubSpace;
ICToBool_Double(JitCode *stubCode)
explicit ICToBool_Double(JitCode *stubCode)
: ICStub(ICStub::ToBool_Double, stubCode) {}
public:
@ -2406,7 +2406,7 @@ class ICToBool_Double : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_Double) {}
ICStub *getStub(ICStubSpace *space) {
@ -2419,7 +2419,7 @@ class ICToBool_Object : public ICStub
{
friend class ICStubSpace;
ICToBool_Object(JitCode *stubCode)
explicit ICToBool_Object(JitCode *stubCode)
: ICStub(ICStub::ToBool_Object, stubCode) {}
public:
@ -2435,7 +2435,7 @@ class ICToBool_Object : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToBool_Object) {}
ICStub *getStub(ICStubSpace *space) {
@ -2451,7 +2451,7 @@ class ICToNumber_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICToNumber_Fallback(JitCode *stubCode)
explicit ICToNumber_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::ToNumber_Fallback, stubCode) {}
public:
@ -2467,7 +2467,7 @@ class ICToNumber_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::ToNumber_Fallback) {}
ICStub *getStub(ICStubSpace *space) {
@ -2485,7 +2485,7 @@ class ICBinaryArith_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICBinaryArith_Fallback(JitCode *stubCode)
explicit ICBinaryArith_Fallback(JitCode *stubCode)
: ICFallbackStub(BinaryArith_Fallback, stubCode)
{
extra_ = 0;
@ -2522,7 +2522,7 @@ class ICBinaryArith_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::BinaryArith_Fallback) {}
ICStub *getStub(ICStubSpace *space) {
@ -2580,7 +2580,7 @@ class ICBinaryArith_StringConcat : public ICStub
{
friend class ICStubSpace;
ICBinaryArith_StringConcat(JitCode *stubCode)
explicit ICBinaryArith_StringConcat(JitCode *stubCode)
: ICStub(BinaryArith_StringConcat, stubCode)
{}
@ -2596,7 +2596,7 @@ class ICBinaryArith_StringConcat : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::BinaryArith_StringConcat)
{}
@ -2653,7 +2653,7 @@ class ICBinaryArith_Double : public ICStub
{
friend class ICStubSpace;
ICBinaryArith_Double(JitCode *stubCode)
explicit ICBinaryArith_Double(JitCode *stubCode)
: ICStub(BinaryArith_Double, stubCode)
{}
@ -2792,7 +2792,7 @@ class ICUnaryArith_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICUnaryArith_Fallback(JitCode *stubCode)
explicit ICUnaryArith_Fallback(JitCode *stubCode)
: ICFallbackStub(UnaryArith_Fallback, stubCode)
{
extra_ = 0;
@ -2820,7 +2820,7 @@ class ICUnaryArith_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::UnaryArith_Fallback)
{}
@ -2834,7 +2834,7 @@ class ICUnaryArith_Int32 : public ICStub
{
friend class ICStubSpace;
ICUnaryArith_Int32(JitCode *stubCode)
explicit ICUnaryArith_Int32(JitCode *stubCode)
: ICStub(UnaryArith_Int32, stubCode)
{}
@ -2864,7 +2864,7 @@ class ICUnaryArith_Double : public ICStub
{
friend class ICStubSpace;
ICUnaryArith_Double(JitCode *stubCode)
explicit ICUnaryArith_Double(JitCode *stubCode)
: ICStub(UnaryArith_Double, stubCode)
{}
@ -2897,7 +2897,7 @@ class ICGetElem_Fallback : public ICMonitoredFallbackStub
{
friend class ICStubSpace;
ICGetElem_Fallback(JitCode *stubCode)
explicit ICGetElem_Fallback(JitCode *stubCode)
: ICMonitoredFallbackStub(ICStub::GetElem_Fallback, stubCode)
{ }
@ -2933,7 +2933,7 @@ class ICGetElem_Fallback : public ICMonitoredFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetElem_Fallback)
{ }
@ -3308,7 +3308,7 @@ class ICGetElem_String : public ICStub
{
friend class ICStubSpace;
ICGetElem_String(JitCode *stubCode)
explicit ICGetElem_String(JitCode *stubCode)
: ICStub(ICStub::GetElem_String, stubCode) {}
public:
@ -3324,7 +3324,7 @@ class ICGetElem_String : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetElem_String) {}
ICStub *getStub(ICStubSpace *space) {
@ -3510,7 +3510,7 @@ class ICSetElem_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICSetElem_Fallback(JitCode *stubCode)
explicit ICSetElem_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::SetElem_Fallback, stubCode)
{ }
@ -3536,7 +3536,7 @@ class ICSetElem_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::SetElem_Fallback)
{ }
@ -3776,7 +3776,7 @@ class ICIn_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICIn_Fallback(JitCode *stubCode)
explicit ICIn_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::In_Fallback, stubCode)
{ }
@ -3792,7 +3792,7 @@ class ICIn_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::In_Fallback)
{ }
@ -3809,7 +3809,7 @@ class ICGetName_Fallback : public ICMonitoredFallbackStub
{
friend class ICStubSpace;
ICGetName_Fallback(JitCode *stubCode)
explicit ICGetName_Fallback(JitCode *stubCode)
: ICMonitoredFallbackStub(ICStub::GetName_Fallback, stubCode)
{ }
@ -3827,7 +3827,7 @@ class ICGetName_Fallback : public ICMonitoredFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetName_Fallback)
{ }
@ -3972,7 +3972,7 @@ class ICBindName_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICBindName_Fallback(JitCode *stubCode)
explicit ICBindName_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::BindName_Fallback, stubCode)
{ }
@ -3988,7 +3988,7 @@ class ICBindName_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::BindName_Fallback)
{ }
@ -4004,7 +4004,7 @@ class ICGetIntrinsic_Fallback : public ICMonitoredFallbackStub
{
friend class ICStubSpace;
ICGetIntrinsic_Fallback(JitCode *stubCode)
explicit ICGetIntrinsic_Fallback(JitCode *stubCode)
: ICMonitoredFallbackStub(ICStub::GetIntrinsic_Fallback, stubCode)
{ }
@ -4020,7 +4020,7 @@ class ICGetIntrinsic_Fallback : public ICMonitoredFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetIntrinsic_Fallback)
{ }
@ -4080,7 +4080,7 @@ class ICGetProp_Fallback : public ICMonitoredFallbackStub
{
friend class ICStubSpace;
ICGetProp_Fallback(JitCode *stubCode)
explicit ICGetProp_Fallback(JitCode *stubCode)
: ICMonitoredFallbackStub(ICStub::GetProp_Fallback, stubCode)
{ }
@ -4117,7 +4117,7 @@ class ICGetProp_Fallback : public ICMonitoredFallbackStub
bool postGenerateStubCode(MacroAssembler &masm, Handle<JitCode *> code);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetProp_Fallback)
{ }
@ -4135,7 +4135,7 @@ class ICGetProp_ArrayLength : public ICStub
{
friend class ICStubSpace;
ICGetProp_ArrayLength(JitCode *stubCode)
explicit ICGetProp_ArrayLength(JitCode *stubCode)
: ICStub(GetProp_ArrayLength, stubCode)
{}
@ -4150,7 +4150,7 @@ class ICGetProp_ArrayLength : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetProp_ArrayLength)
{}
@ -4165,7 +4165,7 @@ class ICGetProp_TypedArrayLength : public ICStub
{
friend class ICStubSpace;
ICGetProp_TypedArrayLength(JitCode *stubCode)
explicit ICGetProp_TypedArrayLength(JitCode *stubCode)
: ICStub(GetProp_TypedArrayLength, stubCode)
{}
@ -4180,7 +4180,7 @@ class ICGetProp_TypedArrayLength : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetProp_TypedArrayLength)
{}
@ -4266,7 +4266,7 @@ class ICGetProp_StringLength : public ICStub
{
friend class ICStubSpace;
ICGetProp_StringLength(JitCode *stubCode)
explicit ICGetProp_StringLength(JitCode *stubCode)
: ICStub(GetProp_StringLength, stubCode)
{}
@ -4281,7 +4281,7 @@ class ICGetProp_StringLength : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::GetProp_StringLength)
{}
@ -4967,7 +4967,7 @@ class ICGetProp_ArgumentsLength : public ICStub
enum Which { Normal, Strict, Magic };
protected:
ICGetProp_ArgumentsLength(JitCode *stubCode)
explicit ICGetProp_ArgumentsLength(JitCode *stubCode)
: ICStub(ICStub::GetProp_ArgumentsLength, stubCode)
{ }
@ -5011,7 +5011,7 @@ class ICSetProp_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICSetProp_Fallback(JitCode *stubCode)
explicit ICSetProp_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::SetProp_Fallback, stubCode)
{ }
@ -5039,7 +5039,7 @@ class ICSetProp_Fallback : public ICFallbackStub
bool postGenerateStubCode(MacroAssembler &masm, Handle<JitCode *> code);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::SetProp_Fallback)
{ }
@ -5917,7 +5917,7 @@ class ICIteratorNew_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICIteratorNew_Fallback(JitCode *stubCode)
explicit ICIteratorNew_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::IteratorNew_Fallback, stubCode)
{ }
@ -5933,7 +5933,7 @@ class ICIteratorNew_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorNew_Fallback)
{ }
@ -5948,7 +5948,7 @@ class ICIteratorMore_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICIteratorMore_Fallback(JitCode *stubCode)
explicit ICIteratorMore_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::IteratorMore_Fallback, stubCode)
{ }
@ -5964,7 +5964,7 @@ class ICIteratorMore_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorMore_Fallback)
{ }
@ -5979,7 +5979,7 @@ class ICIteratorMore_Native : public ICStub
{
friend class ICStubSpace;
ICIteratorMore_Native(JitCode *stubCode)
explicit ICIteratorMore_Native(JitCode *stubCode)
: ICStub(ICStub::IteratorMore_Native, stubCode)
{ }
@ -5995,7 +5995,7 @@ class ICIteratorMore_Native : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorMore_Native)
{ }
@ -6010,7 +6010,7 @@ class ICIteratorNext_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICIteratorNext_Fallback(JitCode *stubCode)
explicit ICIteratorNext_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::IteratorNext_Fallback, stubCode)
{ }
@ -6034,7 +6034,7 @@ class ICIteratorNext_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorNext_Fallback)
{ }
@ -6049,7 +6049,7 @@ class ICIteratorNext_Native : public ICStub
{
friend class ICStubSpace;
ICIteratorNext_Native(JitCode *stubCode)
explicit ICIteratorNext_Native(JitCode *stubCode)
: ICStub(ICStub::IteratorNext_Native, stubCode)
{ }
@ -6065,7 +6065,7 @@ class ICIteratorNext_Native : public ICStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorNext_Native)
{ }
@ -6080,7 +6080,7 @@ class ICIteratorClose_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICIteratorClose_Fallback(JitCode *stubCode)
explicit ICIteratorClose_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::IteratorClose_Fallback, stubCode)
{ }
@ -6096,7 +6096,7 @@ class ICIteratorClose_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::IteratorClose_Fallback)
{ }
@ -6112,7 +6112,7 @@ class ICInstanceOf_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICInstanceOf_Fallback(JitCode *stubCode)
explicit ICInstanceOf_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::InstanceOf_Fallback, stubCode)
{ }
@ -6128,7 +6128,7 @@ class ICInstanceOf_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::InstanceOf_Fallback)
{ }
@ -6145,7 +6145,7 @@ class ICTypeOf_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICTypeOf_Fallback(JitCode *stubCode)
explicit ICTypeOf_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::TypeOf_Fallback, stubCode)
{ }
@ -6161,7 +6161,7 @@ class ICTypeOf_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::TypeOf_Fallback)
{ }
@ -6262,7 +6262,7 @@ class ICRetSub_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
ICRetSub_Fallback(JitCode *stubCode)
explicit ICRetSub_Fallback(JitCode *stubCode)
: ICFallbackStub(ICStub::RetSub_Fallback, stubCode)
{ }
@ -6280,7 +6280,7 @@ class ICRetSub_Fallback : public ICFallbackStub
bool generateStubCode(MacroAssembler &masm);
public:
Compiler(JSContext *cx)
explicit Compiler(JSContext *cx)
: ICStubCompiler(cx, ICStub::RetSub_Fallback)
{ }

Просмотреть файл

@ -50,7 +50,7 @@ class BaselineInspector
ICEntry *prevLookedUpEntry;
public:
BaselineInspector(JSScript *script)
explicit BaselineInspector(JSScript *script)
: script(script), prevLookedUpEntry(nullptr)
{
JS_ASSERT(script);

Просмотреть файл

@ -783,7 +783,7 @@ BaselineScript::toggleDebugTraps(JSScript *script, jsbytecode *pc)
script->hasBreakpointsAt(curPC);
// Patch the trap.
CodeLocationLabel label(method(), nativeOffset);
CodeLocationLabel label(method(), CodeOffsetLabel(nativeOffset));
Assembler::ToggleCall(label, enabled);
}

Просмотреть файл

@ -28,7 +28,7 @@ class BitSet : private TempObject
}
private:
BitSet(unsigned int numBits) :
explicit BitSet(unsigned int numBits) :
bits_(nullptr),
numBits_(numBits) {}
@ -144,7 +144,7 @@ class BitSet::Iterator
}
public:
Iterator(BitSet &set) :
explicit Iterator(BitSet &set) :
set_(set),
index_(0),
word_(0),

Просмотреть файл

@ -2866,7 +2866,7 @@ class CheckOverRecursedFailure : public OutOfLineCodeBase<CodeGenerator>
LCheckOverRecursed *lir_;
public:
CheckOverRecursedFailure(LCheckOverRecursed *lir)
explicit CheckOverRecursedFailure(LCheckOverRecursed *lir)
: lir_(lir)
{ }
@ -2973,7 +2973,7 @@ class CheckOverRecursedFailurePar : public OutOfLineCodeBase<CodeGenerator>
LCheckOverRecursedPar *lir_;
public:
CheckOverRecursedFailurePar(LCheckOverRecursedPar *lir)
explicit CheckOverRecursedFailurePar(LCheckOverRecursedPar *lir)
: lir_(lir)
{ }
@ -3047,7 +3047,7 @@ class OutOfLineInterruptCheckPar : public OutOfLineCodeBase<CodeGenerator>
public:
LInterruptCheckPar *const lir;
OutOfLineInterruptCheckPar(LInterruptCheckPar *lir)
explicit OutOfLineInterruptCheckPar(LInterruptCheckPar *lir)
: lir(lir)
{ }
@ -3450,7 +3450,7 @@ class OutOfLineNewArray : public OutOfLineCodeBase<CodeGenerator>
LNewArray *lir_;
public:
OutOfLineNewArray(LNewArray *lir)
explicit OutOfLineNewArray(LNewArray *lir)
: lir_(lir)
{ }
@ -3583,7 +3583,7 @@ class OutOfLineNewObject : public OutOfLineCodeBase<CodeGenerator>
LNewObject *lir_;
public:
OutOfLineNewObject(LNewObject *lir)
explicit OutOfLineNewObject(LNewObject *lir)
: lir_(lir)
{ }
@ -5593,7 +5593,7 @@ class OutOfLineStoreElementHole : public OutOfLineCodeBase<CodeGenerator>
Label rejoinStore_;
public:
OutOfLineStoreElementHole(LInstruction *ins)
explicit OutOfLineStoreElementHole(LInstruction *ins)
: ins_(ins)
{
JS_ASSERT(ins->isStoreElementHoleV() || ins->isStoreElementHoleT());
@ -6734,7 +6734,7 @@ class OutOfLineUnboxFloatingPoint : public OutOfLineCodeBase<CodeGenerator>
LUnboxFloatingPoint *unboxFloatingPoint_;
public:
OutOfLineUnboxFloatingPoint(LUnboxFloatingPoint *unboxFloatingPoint)
explicit OutOfLineUnboxFloatingPoint(LUnboxFloatingPoint *unboxFloatingPoint)
: unboxFloatingPoint_(unboxFloatingPoint)
{ }
@ -7524,7 +7524,7 @@ class OutOfLineTypeOfV : public OutOfLineCodeBase<CodeGenerator>
LTypeOfV *ins_;
public:
OutOfLineTypeOfV(LTypeOfV *ins)
explicit OutOfLineTypeOfV(LTypeOfV *ins)
: ins_(ins)
{ }
@ -8485,7 +8485,7 @@ CodeGenerator::visitAsmJSCall(LAsmJSCall *ins)
masm.call(mir->desc(), ToRegister(ins->getOperand(mir->dynamicCalleeOperandIndex())));
break;
case MAsmJSCall::Callee::Builtin:
masm.call(mir->desc(), callee.builtin());
masm.call(mir->desc(), AsmJSImmPtr(callee.builtin()));
break;
}

Просмотреть файл

@ -51,7 +51,7 @@ class CompactBufferReader
: buffer_(start),
end_(end)
{ }
inline CompactBufferReader(const CompactBufferWriter &writer);
inline explicit CompactBufferReader(const CompactBufferWriter &writer);
uint8_t readByte() {
JS_ASSERT(buffer_ < end_);
return *buffer_++;

Просмотреть файл

@ -128,7 +128,7 @@ class JitCompileOptions
{
public:
JitCompileOptions();
JitCompileOptions(JSContext *cx);
explicit JitCompileOptions(JSContext *cx);
bool cloneSingletons() const {
return cloneSingletons_;

Просмотреть файл

@ -25,7 +25,7 @@ template <typename T>
class CompilerRoot : public CompilerRootNode
{
public:
CompilerRoot(T ptr)
explicit CompilerRoot(T ptr)
: CompilerRootNode(nullptr)
{
if (ptr) {

Просмотреть файл

@ -17,7 +17,7 @@ class EffectiveAddressAnalysis
MIRGraph &graph_;
public:
EffectiveAddressAnalysis(MIRGraph &graph)
explicit EffectiveAddressAnalysis(MIRGraph &graph)
: graph_(graph)
{}

Просмотреть файл

@ -20,7 +20,7 @@ class InlineForwardListNode
public:
InlineForwardListNode() : next(nullptr)
{ }
InlineForwardListNode(InlineForwardListNode<T> *n) : next(n)
explicit InlineForwardListNode(InlineForwardListNode<T> *n) : next(n)
{ }
protected:
@ -155,7 +155,7 @@ private:
typedef InlineForwardListNode<T> Node;
InlineForwardListIterator<T>(const InlineForwardList<T> *owner)
explicit InlineForwardListIterator<T>(const InlineForwardList<T> *owner)
: prev(const_cast<Node *>(static_cast<const Node *>(owner))),
iter(owner ? owner->next : nullptr)
#ifdef DEBUG
@ -328,7 +328,7 @@ class InlineListIterator
typedef InlineListNode<T> Node;
InlineListIterator(const Node *iter)
explicit InlineListIterator(const Node *iter)
: iter(const_cast<Node *>(iter))
{ }
@ -372,7 +372,7 @@ class InlineListReverseIterator
typedef InlineListNode<T> Node;
InlineListReverseIterator(const Node *iter)
explicit InlineListReverseIterator(const Node *iter)
: iter(const_cast<Node *>(iter))
{ }
@ -458,7 +458,7 @@ class InlineConcatListIterator
typedef InlineConcatList<T> Node;
InlineConcatListIterator(const Node *iter)
explicit InlineConcatListIterator(const Node *iter)
: iter(const_cast<Node *>(iter))
{ }

Просмотреть файл

@ -496,14 +496,14 @@ bool
JitCompartment::ensureIonStubsExist(JSContext *cx)
{
if (!stringConcatStub_) {
stringConcatStub_ = generateStringConcatStub(cx, SequentialExecution);
stringConcatStub_.set(generateStringConcatStub(cx, SequentialExecution));
if (!stringConcatStub_)
return false;
}
#ifdef JS_THREADSAFE
if (!parallelStringConcatStub_) {
parallelStringConcatStub_ = generateStringConcatStub(cx, ParallelExecution);
parallelStringConcatStub_.set(generateStringConcatStub(cx, ParallelExecution));
if (!parallelStringConcatStub_)
return false;
}
@ -645,10 +645,10 @@ JitCompartment::sweep(FreeOp *fop)
baselineSetPropReturnAddr_ = nullptr;
if (stringConcatStub_ && !IsJitCodeMarked(stringConcatStub_.unsafeGet()))
stringConcatStub_ = nullptr;
stringConcatStub_.set(nullptr);
if (parallelStringConcatStub_ && !IsJitCodeMarked(parallelStringConcatStub_.unsafeGet()))
parallelStringConcatStub_ = nullptr;
parallelStringConcatStub_.set(nullptr);
if (activeParallelEntryScripts_) {
for (ScriptSet::Enum e(*activeParallelEntryScripts_); !e.empty(); e.popFront()) {
@ -778,7 +778,7 @@ JitCode::togglePreBarriers(bool enabled)
while (reader.more()) {
size_t offset = reader.readUnsigned();
CodeLocationLabel loc(this, offset);
CodeLocationLabel loc(this, CodeOffsetLabel(offset));
if (enabled)
Assembler::ToggleToCmp(loc);
else
@ -2634,7 +2634,7 @@ InvalidateActivation(FreeOp *fop, uint8_t *jitTop, bool invalidateAll)
Assembler::patchWrite_Imm32(dataLabelToMunge, Imm32(delta));
CodeLocationLabel osiPatchPoint = SafepointReader::InvalidationPatchPoint(ionScript, si);
CodeLocationLabel invalidateEpilogue(ionCode, ionScript->invalidateEpilogueOffset());
CodeLocationLabel invalidateEpilogue(ionCode, CodeOffsetLabel(ionScript->invalidateEpilogueOffset()));
IonSpew(IonSpew_Invalidate, " ! Invalidate ionScript %p (ref %u) -> patching osipoint %p",
ionScript, ionScript->refcount(), (void *) osiPatchPoint.raw());

Просмотреть файл

@ -50,7 +50,7 @@ class IonContext
IonContext(JSContext *cx, TempAllocator *temp);
IonContext(ExclusiveContext *cx, TempAllocator *temp);
IonContext(CompileRuntime *rt, CompileCompartment *comp, TempAllocator *temp);
IonContext(CompileRuntime *rt);
explicit IonContext(CompileRuntime *rt);
~IonContext();
// Running context when executing on the main thread. Not available during

Просмотреть файл

@ -27,7 +27,7 @@ class TempAllocator
CompilerRootNode *rootList_;
public:
TempAllocator(LifoAlloc *lifoAlloc)
explicit TempAllocator(LifoAlloc *lifoAlloc)
: lifoScope_(lifoAlloc),
rootList_(nullptr)
{ }
@ -97,7 +97,7 @@ class IonAllocPolicy
TempAllocator &alloc_;
public:
IonAllocPolicy(TempAllocator &alloc)
MOZ_IMPLICIT IonAllocPolicy(TempAllocator &alloc)
: alloc_(alloc)
{}
void *malloc_(size_t bytes) {

Просмотреть файл

@ -99,7 +99,7 @@ struct LinearTerm
class LinearSum
{
public:
LinearSum(TempAllocator &alloc)
explicit LinearSum(TempAllocator &alloc)
: terms_(alloc),
constant_(0)
{

Просмотреть файл

@ -45,7 +45,7 @@ class jit::BaselineFrameInspector
Vector<types::Type, 4, IonAllocPolicy> argTypes;
Vector<types::Type, 4, IonAllocPolicy> varTypes;
BaselineFrameInspector(TempAllocator *temp)
explicit BaselineFrameInspector(TempAllocator *temp)
: thisType(types::Type::UndefinedType()),
singletonScopeChain(nullptr),
argTypes(*temp),
@ -8376,7 +8376,7 @@ IonBuilder::freezePropertiesForCommonPrototype(types::TemporaryTypeSet *types, P
// Don't mark the proto. It will be held down by the shape
// guard. This allows us to use properties found on prototypes
// with properties unknown to TI.
if (type->proto() == foundProto)
if (type->proto() == TaggedProto(foundProto))
break;
type = types::TypeObjectKey::get(type->proto().toObjectOrNull());
}

Просмотреть файл

@ -172,7 +172,7 @@ class IonCache::StubAttacher
CodeOffsetLabel stubCodePatchOffset_;
public:
StubAttacher(CodeLocationLabel rejoinLabel)
explicit StubAttacher(CodeLocationLabel rejoinLabel)
: hasNextStubOffset_(false),
hasStubCodePatchOffset_(false),
rejoinLabel_(rejoinLabel),
@ -261,7 +261,7 @@ class RepatchIonCache::RepatchStubAppender : public IonCache::StubAttacher
RepatchIonCache &cache_;
public:
RepatchStubAppender(RepatchIonCache &cache)
explicit RepatchStubAppender(RepatchIonCache &cache)
: StubAttacher(cache.rejoinLabel()),
cache_(cache)
{
@ -321,7 +321,7 @@ class DispatchIonCache::DispatchStubPrepender : public IonCache::StubAttacher
DispatchIonCache &cache_;
public:
DispatchStubPrepender(DispatchIonCache &cache)
explicit DispatchStubPrepender(DispatchIonCache &cache)
: StubAttacher(cache.rejoinLabel_),
cache_(cache)
{

Просмотреть файл

@ -790,7 +790,7 @@ struct AutoFlushICache
static void flush(uintptr_t p, size_t len);
static void setInhibit();
~AutoFlushICache();
AutoFlushICache(const char *nonce, bool inhibit=false);
explicit AutoFlushICache(const char *nonce, bool inhibit=false);
};
} // namespace jit

Просмотреть файл

@ -557,7 +557,7 @@ HandleExceptionBaseline(JSContext *cx, const JitFrameIterator &frame, ResumeFrom
struct AutoDeleteDebugModeOSRInfo
{
BaselineFrame *frame;
AutoDeleteDebugModeOSRInfo(BaselineFrame *frame) : frame(frame) { MOZ_ASSERT(frame); }
explicit AutoDeleteDebugModeOSRInfo(BaselineFrame *frame) : frame(frame) { MOZ_ASSERT(frame); }
~AutoDeleteDebugModeOSRInfo() { frame->deleteDebugModeOSRInfo(); }
};
@ -1864,7 +1864,7 @@ SnapshotIterator::warnUnreadableAllocation()
}
struct DumpOp {
DumpOp(unsigned int i) : i_(i) {}
explicit DumpOp(unsigned int i) : i_(i) {}
unsigned int i_;
void operator()(const Value& v) {

Просмотреть файл

@ -70,7 +70,7 @@ class Linker
}
public:
Linker(MacroAssembler &masm)
explicit Linker(MacroAssembler &masm)
: masm(masm)
{
masm.finish();

Просмотреть файл

@ -39,7 +39,7 @@ class TypeWrapper {
types::Type t_;
public:
TypeWrapper(types::Type t) : t_(t) {}
explicit TypeWrapper(types::Type t) : t_(t) {}
inline bool unknown() const {
return t_.isUnknown();

Просмотреть файл

@ -224,8 +224,8 @@ class MacroAssembler : public MacroAssemblerSpecific
// This constructor should only be used when there is no IonContext active
// (for example, Trampoline-$(ARCH).cpp and IonCaches.cpp).
MacroAssembler(JSContext *cx, IonScript *ion = nullptr,
JSScript *script = nullptr, jsbytecode *pc = nullptr)
explicit MacroAssembler(JSContext *cx, IonScript *ion = nullptr,
JSScript *script = nullptr, jsbytecode *pc = nullptr)
: enoughMemory_(true),
embedsNurseryPointers_(false),
sps_(nullptr)
@ -253,7 +253,7 @@ class MacroAssembler : public MacroAssemblerSpecific
// asm.js compilation handles its own IonContet-pushing
struct AsmJSToken {};
MacroAssembler(AsmJSToken)
explicit MacroAssembler(AsmJSToken)
: enoughMemory_(true),
embedsNurseryPointers_(false),
sps_(nullptr)
@ -1394,7 +1394,7 @@ class MacroAssembler : public MacroAssemblerSpecific
public:
class AfterICSaveLive {
friend class MacroAssembler;
AfterICSaveLive(uint32_t initialStack)
explicit AfterICSaveLive(uint32_t initialStack)
#ifdef JS_DEBUG
: initialStack(initialStack)
#endif

Просмотреть файл

@ -367,8 +367,8 @@ class SnapshotIterator
SnapshotIterator(IonScript *ionScript, SnapshotOffset snapshotOffset,
IonJSFrameLayout *fp, const MachineState &machine);
SnapshotIterator(const JitFrameIterator &iter);
SnapshotIterator(const IonBailoutIterator &iter);
explicit SnapshotIterator(const JitFrameIterator &iter);
explicit SnapshotIterator(const IonBailoutIterator &iter);
SnapshotIterator();
Value read() {

Просмотреть файл

@ -101,7 +101,7 @@ class LMoveGroup : public LInstructionHelper<0, 0, 0>
{
js::Vector<LMove, 2, IonAllocPolicy> moves_;
LMoveGroup(TempAllocator &alloc)
explicit LMoveGroup(TempAllocator &alloc)
: moves_(alloc)
{ }
@ -136,7 +136,7 @@ class LInteger : public LInstructionHelper<1, 0, 0>
public:
LIR_HEADER(Integer)
LInteger(int32_t i32)
explicit LInteger(int32_t i32)
: i32_(i32)
{ }
@ -161,7 +161,7 @@ class LPointer : public LInstructionHelper<1, 0, 0>
public:
LIR_HEADER(Pointer)
LPointer(gc::Cell *ptr)
explicit LPointer(gc::Cell *ptr)
: ptr_(ptr), kind_(GC_THING)
{ }
@ -192,7 +192,7 @@ class LDouble : public LInstructionHelper<1, 0, 0>
public:
LIR_HEADER(Double);
LDouble(double d) : d_(d)
explicit LDouble(double d) : d_(d)
{ }
double getDouble() const {
return d_;
@ -206,7 +206,7 @@ class LFloat32 : public LInstructionHelper<1, 0, 0>
public:
LIR_HEADER(Float32);
LFloat32(float f)
explicit LFloat32(float f)
: f_(f)
{ }
@ -223,7 +223,7 @@ class LValue : public LInstructionHelper<BOX_PIECES, 0, 0>
public:
LIR_HEADER(Value)
LValue(const Value &v)
explicit LValue(const Value &v)
: v_(v)
{ }
@ -239,7 +239,7 @@ class LCloneLiteral : public LCallInstructionHelper<1, 1, 0>
public:
LIR_HEADER(CloneLiteral)
LCloneLiteral(const LAllocation &obj)
explicit LCloneLiteral(const LAllocation &obj)
{
setOperand(0, obj);
}
@ -292,7 +292,7 @@ class LGoto : public LControlInstructionHelper<1, 0, 0>
public:
LIR_HEADER(Goto)
LGoto(MBasicBlock *block)
explicit LGoto(MBasicBlock *block)
{
setSuccessor(0, block);
}
@ -307,7 +307,7 @@ class LNewArray : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(NewArray)
LNewArray(const LDefinition &temp) {
explicit LNewArray(const LDefinition &temp) {
setTemp(0, temp);
}
@ -329,7 +329,7 @@ class LNewObject : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(NewObject)
LNewObject(const LDefinition &temp) {
explicit LNewObject(const LDefinition &temp) {
setTemp(0, temp);
}
@ -425,7 +425,7 @@ class LNewDeclEnvObject : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(NewDeclEnvObject);
LNewDeclEnvObject(const LDefinition &temp) {
explicit LNewDeclEnvObject(const LDefinition &temp) {
setTemp(0, temp);
}
@ -450,7 +450,7 @@ class LNewCallObject : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(NewCallObject)
LNewCallObject(const LDefinition &temp) {
explicit LNewCallObject(const LDefinition &temp) {
setTemp(0, temp);
}
@ -476,7 +476,7 @@ class LNewSingletonCallObject : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(NewSingletonCallObject)
LNewSingletonCallObject(const LDefinition &temp) {
explicit LNewSingletonCallObject(const LDefinition &temp) {
setTemp(0, temp);
}
@ -582,7 +582,7 @@ class LInitElem : public LCallInstructionHelper<0, 1 + 2*BOX_PIECES, 0>
public:
LIR_HEADER(InitElem)
LInitElem(const LAllocation &object) {
explicit LInitElem(const LAllocation &object) {
setOperand(0, object);
}
@ -626,7 +626,7 @@ class LMutateProto : public LCallInstructionHelper<0, 1 + BOX_PIECES, 0>
public:
LIR_HEADER(MutateProto)
LMutateProto(const LAllocation &object) {
explicit LMutateProto(const LAllocation &object) {
setOperand(0, object);
}
@ -646,7 +646,7 @@ class LInitProp : public LCallInstructionHelper<0, 1 + BOX_PIECES, 0>
public:
LIR_HEADER(InitProp)
LInitProp(const LAllocation &object) {
explicit LInitProp(const LAllocation &object) {
setOperand(0, object);
}
@ -761,7 +761,7 @@ class LDefVar : public LCallInstructionHelper<0, 1, 0>
public:
LIR_HEADER(DefVar)
LDefVar(const LAllocation &scopeChain)
explicit LDefVar(const LAllocation &scopeChain)
{
setOperand(0, scopeChain);
}
@ -779,7 +779,7 @@ class LDefFun : public LCallInstructionHelper<0, 1, 0>
public:
LIR_HEADER(DefFun)
LDefFun(const LAllocation &scopeChain)
explicit LDefFun(const LAllocation &scopeChain)
{
setOperand(0, scopeChain);
}
@ -797,7 +797,7 @@ class LTypeOfV : public LInstructionHelper<1, BOX_PIECES, 1>
public:
LIR_HEADER(TypeOfV)
LTypeOfV(const LDefinition &tempToUnbox) {
explicit LTypeOfV(const LDefinition &tempToUnbox) {
setTemp(0, tempToUnbox);
}
@ -817,7 +817,7 @@ class LToIdV : public LInstructionHelper<BOX_PIECES, 2 * BOX_PIECES, 1>
public:
LIR_HEADER(ToIdV)
LToIdV(const LDefinition &temp)
explicit LToIdV(const LDefinition &temp)
{
setTemp(0, temp);
}
@ -841,7 +841,7 @@ class LCreateThis : public LCallInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(CreateThis)
LCreateThis(const LAllocation &callee)
explicit LCreateThis(const LAllocation &callee)
{
setOperand(0, callee);
}
@ -887,7 +887,7 @@ class LCreateThisWithTemplate : public LInstructionHelper<1, 0, 1>
public:
LIR_HEADER(CreateThisWithTemplate)
LCreateThisWithTemplate(const LDefinition &temp) {
explicit LCreateThisWithTemplate(const LDefinition &temp) {
setTemp(0, temp);
}
@ -972,7 +972,7 @@ class LReturnFromCtor : public LInstructionHelper<1, BOX_PIECES + 1, 0>
public:
LIR_HEADER(ReturnFromCtor)
LReturnFromCtor(const LAllocation &object)
explicit LReturnFromCtor(const LAllocation &object)
{
// Value set by useBox() during lowering.
setOperand(LReturnFromCtor::ObjectIndex, object);
@ -1005,7 +1005,7 @@ class LComputeThis : public LInstructionHelper<1, BOX_PIECES, 0>
class LLoadArrowThis : public LInstructionHelper<BOX_PIECES, 1, 0>
{
public:
LLoadArrowThis(const LAllocation &callee) {
explicit LLoadArrowThis(const LAllocation &callee) {
setOperand(0, callee);
}
@ -1050,7 +1050,7 @@ class LStackArgV : public LInstructionHelper<0, BOX_PIECES, 0>
public:
LIR_HEADER(StackArgV)
LStackArgV(uint32_t argslot)
explicit LStackArgV(uint32_t argslot)
: argslot_(argslot)
{ }
@ -1254,7 +1254,7 @@ class LGetDOMMember : public LInstructionHelper<BOX_PIECES, 1, 0>
{
public:
LIR_HEADER(GetDOMMember);
LGetDOMMember(const LAllocation &object) {
explicit LGetDOMMember(const LAllocation &object) {
setOperand(0, object);
}
@ -1481,7 +1481,7 @@ class LCallDirectEvalV : public LCallInstructionHelper<BOX_PIECES, 1 + (2 * BOX_
public:
LIR_HEADER(CallDirectEvalV)
LCallDirectEvalV(const LAllocation &scopeChain)
explicit LCallDirectEvalV(const LAllocation &scopeChain)
{
setOperand(0, scopeChain);
}
@ -1649,7 +1649,7 @@ class LFunctionDispatch : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(FunctionDispatch);
LFunctionDispatch(const LAllocation &in) {
explicit LFunctionDispatch(const LAllocation &in) {
setOperand(0, in);
}
@ -1921,7 +1921,7 @@ class LCompareB : public LInstructionHelper<1, BOX_PIECES + 1, 0>
public:
LIR_HEADER(CompareB)
LCompareB(const LAllocation &rhs) {
explicit LCompareB(const LAllocation &rhs) {
setOperand(BOX_PIECES, rhs);
}
@ -2126,7 +2126,7 @@ class LEmulatesUndefined : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(EmulatesUndefined)
LEmulatesUndefined(const LAllocation &input)
explicit LEmulatesUndefined(const LAllocation &input)
{
setOperand(0, input);
}
@ -2177,7 +2177,7 @@ class LNotI : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(NotI)
LNotI(const LAllocation &input) {
explicit LNotI(const LAllocation &input) {
setOperand(0, input);
}
};
@ -2188,7 +2188,7 @@ class LNotD : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(NotD)
LNotD(const LAllocation &input) {
explicit LNotD(const LAllocation &input) {
setOperand(0, input);
}
@ -2203,7 +2203,7 @@ class LNotF : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(NotF)
LNotF(const LAllocation &input) {
explicit LNotF(const LAllocation &input) {
setOperand(0, input);
}
@ -2218,7 +2218,7 @@ class LNotO : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(NotO)
LNotO(const LAllocation &input)
explicit LNotO(const LAllocation &input)
{
setOperand(0, input);
}
@ -2285,7 +2285,7 @@ class LBitOpI : public LInstructionHelper<1, 2, 0>
public:
LIR_HEADER(BitOpI)
LBitOpI(JSOp op)
explicit LBitOpI(JSOp op)
: op_(op)
{ }
@ -2308,7 +2308,7 @@ class LBitOpV : public LCallInstructionHelper<1, 2 * BOX_PIECES, 0>
public:
LIR_HEADER(BitOpV)
LBitOpV(JSOp jsop)
explicit LBitOpV(JSOp jsop)
: jsop_(jsop)
{ }
@ -2333,7 +2333,7 @@ class LShiftI : public LBinaryMath<0>
public:
LIR_HEADER(ShiftI)
LShiftI(JSOp op)
explicit LShiftI(JSOp op)
: op_(op)
{ }
@ -2440,7 +2440,7 @@ class LNegI : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(NegI);
LNegI(const LAllocation &num) {
explicit LNegI(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2450,7 +2450,7 @@ class LNegD : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(NegD)
LNegD(const LAllocation &num) {
explicit LNegD(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2460,7 +2460,7 @@ class LNegF : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(NegF)
LNegF(const LAllocation &num) {
explicit LNegF(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2470,7 +2470,7 @@ class LAbsI : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(AbsI)
LAbsI(const LAllocation &num) {
explicit LAbsI(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2480,7 +2480,7 @@ class LAbsD : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(AbsD)
LAbsD(const LAllocation &num) {
explicit LAbsD(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2490,7 +2490,7 @@ class LAbsF : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(AbsF)
LAbsF(const LAllocation &num) {
explicit LAbsF(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2500,7 +2500,7 @@ class LSqrtD : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(SqrtD)
LSqrtD(const LAllocation &num) {
explicit LSqrtD(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2510,7 +2510,7 @@ class LSqrtF : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(SqrtF)
LSqrtF(const LAllocation &num) {
explicit LSqrtF(const LAllocation &num) {
setOperand(0, num);
}
};
@ -2726,7 +2726,7 @@ class LMathD : public LBinaryMath<0>
public:
LIR_HEADER(MathD)
LMathD(JSOp jsop)
explicit LMathD(JSOp jsop)
: jsop_(jsop)
{ }
@ -2747,7 +2747,7 @@ class LMathF: public LBinaryMath<0>
public:
LIR_HEADER(MathF)
LMathF(JSOp jsop)
explicit LMathF(JSOp jsop)
: jsop_(jsop)
{ }
@ -2786,7 +2786,7 @@ class LBinaryV : public LCallInstructionHelper<BOX_PIECES, 2 * BOX_PIECES, 0>
public:
LIR_HEADER(BinaryV)
LBinaryV(JSOp jsop)
explicit LBinaryV(JSOp jsop)
: jsop_(jsop)
{ }
@ -2910,7 +2910,7 @@ class LFromCharCode : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(FromCharCode)
LFromCharCode(const LAllocation &code) {
explicit LFromCharCode(const LAllocation &code) {
setOperand(0, code);
}
@ -2945,7 +2945,7 @@ class LInt32ToDouble : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Int32ToDouble)
LInt32ToDouble(const LAllocation &input) {
explicit LInt32ToDouble(const LAllocation &input) {
setOperand(0, input);
}
};
@ -2956,7 +2956,7 @@ class LFloat32ToDouble : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Float32ToDouble)
LFloat32ToDouble(const LAllocation &input) {
explicit LFloat32ToDouble(const LAllocation &input) {
setOperand(0, input);
}
};
@ -2967,7 +2967,7 @@ class LDoubleToFloat32 : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(DoubleToFloat32)
LDoubleToFloat32(const LAllocation &input) {
explicit LDoubleToFloat32(const LAllocation &input) {
setOperand(0, input);
}
};
@ -2978,7 +2978,7 @@ class LInt32ToFloat32 : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Int32ToFloat32)
LInt32ToFloat32(const LAllocation &input) {
explicit LInt32ToFloat32(const LAllocation &input) {
setOperand(0, input);
}
};
@ -3069,7 +3069,7 @@ class LDoubleToInt32 : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(DoubleToInt32)
LDoubleToInt32(const LAllocation &in) {
explicit LDoubleToInt32(const LAllocation &in) {
setOperand(0, in);
}
@ -3087,7 +3087,7 @@ class LFloat32ToInt32 : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Float32ToInt32)
LFloat32ToInt32(const LAllocation &in) {
explicit LFloat32ToInt32(const LAllocation &in) {
setOperand(0, in);
}
@ -3138,7 +3138,7 @@ class LBooleanToString : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(BooleanToString)
LBooleanToString(const LAllocation &input) {
explicit LBooleanToString(const LAllocation &input) {
setOperand(0, input);
}
@ -3153,7 +3153,7 @@ class LIntToString : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(IntToString)
LIntToString(const LAllocation &input) {
explicit LIntToString(const LAllocation &input) {
setOperand(0, input);
}
@ -3187,7 +3187,7 @@ class LPrimitiveToString : public LInstructionHelper<1, BOX_PIECES, 1>
public:
LIR_HEADER(PrimitiveToString)
LPrimitiveToString(const LDefinition &tempToUnbox)
explicit LPrimitiveToString(const LDefinition &tempToUnbox)
{
setTemp(0, tempToUnbox);
}
@ -3245,7 +3245,7 @@ class LOsrValue : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(OsrValue)
LOsrValue(const LAllocation &entry)
explicit LOsrValue(const LAllocation &entry)
{
setOperand(0, entry);
}
@ -3261,7 +3261,7 @@ class LOsrScopeChain : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(OsrScopeChain)
LOsrScopeChain(const LAllocation &entry)
explicit LOsrScopeChain(const LAllocation &entry)
{
setOperand(0, entry);
}
@ -3277,7 +3277,7 @@ class LOsrReturnValue : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(OsrReturnValue)
LOsrReturnValue(const LAllocation &entry)
explicit LOsrReturnValue(const LAllocation &entry)
{
setOperand(0, entry);
}
@ -3293,7 +3293,7 @@ class LOsrArgumentsObject : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(OsrArgumentsObject)
LOsrArgumentsObject(const LAllocation &entry)
explicit LOsrArgumentsObject(const LAllocation &entry)
{
setOperand(0, entry);
}
@ -3419,7 +3419,7 @@ class LLambdaForSingleton : public LCallInstructionHelper<1, 1, 0>
public:
LIR_HEADER(LambdaForSingleton)
LLambdaForSingleton(const LAllocation &scopeChain)
explicit LLambdaForSingleton(const LAllocation &scopeChain)
{
setOperand(0, scopeChain);
}
@ -3509,7 +3509,7 @@ class LImplicitThis : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(ImplicitThis)
LImplicitThis(const LAllocation &callee) {
explicit LImplicitThis(const LAllocation &callee) {
setOperand(0, callee);
}
@ -3529,7 +3529,7 @@ class LSlots : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Slots)
LSlots(const LAllocation &object) {
explicit LSlots(const LAllocation &object) {
setOperand(0, object);
}
@ -3546,7 +3546,7 @@ class LElements : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Elements)
LElements(const LAllocation &object) {
explicit LElements(const LAllocation &object) {
setOperand(0, object);
}
@ -3561,7 +3561,7 @@ class LConvertElementsToDoubles : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(ConvertElementsToDoubles)
LConvertElementsToDoubles(const LAllocation &elements) {
explicit LConvertElementsToDoubles(const LAllocation &elements) {
setOperand(0, elements);
}
@ -3601,7 +3601,7 @@ class LInitializedLength : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(InitializedLength)
LInitializedLength(const LAllocation &elements) {
explicit LInitializedLength(const LAllocation &elements) {
setOperand(0, elements);
}
@ -3636,7 +3636,7 @@ class LArrayLength : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(ArrayLength)
LArrayLength(const LAllocation &elements) {
explicit LArrayLength(const LAllocation &elements) {
setOperand(0, elements);
}
@ -3671,7 +3671,7 @@ class LTypedArrayLength : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(TypedArrayLength)
LTypedArrayLength(const LAllocation &obj) {
explicit LTypedArrayLength(const LAllocation &obj) {
setOperand(0, obj);
}
@ -3686,7 +3686,7 @@ class LTypedArrayElements : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(TypedArrayElements)
LTypedArrayElements(const LAllocation &object) {
explicit LTypedArrayElements(const LAllocation &object) {
setOperand(0, object);
}
const LAllocation *object() {
@ -3700,7 +3700,7 @@ class LTypedObjectElements : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(TypedObjectElements)
LTypedObjectElements(const LAllocation &object) {
explicit LTypedObjectElements(const LAllocation &object) {
setOperand(0, object);
}
const LAllocation *object() {
@ -3805,7 +3805,7 @@ class LBoundsCheckLower : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(BoundsCheckLower)
LBoundsCheckLower(const LAllocation &index)
explicit LBoundsCheckLower(const LAllocation &index)
{
setOperand(0, index);
}
@ -4240,7 +4240,7 @@ class LLoadTypedArrayElementStatic : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(LoadTypedArrayElementStatic);
LLoadTypedArrayElementStatic(const LAllocation &ptr) {
explicit LLoadTypedArrayElementStatic(const LAllocation &ptr) {
setOperand(0, ptr);
}
MLoadTypedArrayElementStatic *mir() const {
@ -4352,7 +4352,7 @@ class LClampIToUint8 : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(ClampIToUint8)
LClampIToUint8(const LAllocation &in) {
explicit LClampIToUint8(const LAllocation &in) {
setOperand(0, in);
}
};
@ -4373,7 +4373,7 @@ class LClampVToUint8 : public LInstructionHelper<1, BOX_PIECES, 1>
public:
LIR_HEADER(ClampVToUint8)
LClampVToUint8(const LDefinition &tempFloat) {
explicit LClampVToUint8(const LDefinition &tempFloat) {
setTemp(0, tempFloat);
}
@ -4393,7 +4393,7 @@ class LLoadFixedSlotV : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(LoadFixedSlotV)
LLoadFixedSlotV(const LAllocation &object) {
explicit LLoadFixedSlotV(const LAllocation &object) {
setOperand(0, object);
}
const MLoadFixedSlot *mir() const {
@ -4407,7 +4407,7 @@ class LLoadFixedSlotT : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(LoadFixedSlotT)
LLoadFixedSlotT(const LAllocation &object) {
explicit LLoadFixedSlotT(const LAllocation &object) {
setOperand(0, object);
}
const MLoadFixedSlot *mir() const {
@ -4421,7 +4421,7 @@ class LStoreFixedSlotV : public LInstructionHelper<0, 1 + BOX_PIECES, 0>
public:
LIR_HEADER(StoreFixedSlotV)
LStoreFixedSlotV(const LAllocation &obj) {
explicit LStoreFixedSlotV(const LAllocation &obj) {
setOperand(0, obj);
}
@ -4463,7 +4463,7 @@ class LGetNameCache : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(GetNameCache)
LGetNameCache(const LAllocation &scopeObj) {
explicit LGetNameCache(const LAllocation &scopeObj) {
setOperand(0, scopeObj);
}
const LAllocation *scopeObj() {
@ -4489,7 +4489,7 @@ class LCallsiteCloneCache : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(CallsiteCloneCache);
LCallsiteCloneCache(const LAllocation &callee) {
explicit LCallsiteCloneCache(const LAllocation &callee) {
setOperand(0, callee);
}
const LAllocation *callee() {
@ -4507,7 +4507,7 @@ class LGetPropertyCacheV : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(GetPropertyCacheV)
LGetPropertyCacheV(const LAllocation &object) {
explicit LGetPropertyCacheV(const LAllocation &object) {
setOperand(0, object);
}
const MGetPropertyCache *mir() const {
@ -4541,7 +4541,7 @@ class LGetPropertyPolymorphicV : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(GetPropertyPolymorphicV)
LGetPropertyPolymorphicV(const LAllocation &obj) {
explicit LGetPropertyPolymorphicV(const LAllocation &obj) {
setOperand(0, obj);
}
const LAllocation *obj() {
@ -4644,7 +4644,7 @@ class LGetElementCacheV : public LInstructionHelper<BOX_PIECES, 1 + BOX_PIECES,
static const size_t Index = 1;
LGetElementCacheV(const LAllocation &object) {
explicit LGetElementCacheV(const LAllocation &object) {
setOperand(0, object);
}
const LAllocation *object() {
@ -4688,7 +4688,7 @@ class LBindNameCache : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(BindNameCache)
LBindNameCache(const LAllocation &scopeChain) {
explicit LBindNameCache(const LAllocation &scopeChain) {
setOperand(0, scopeChain);
}
const LAllocation *scopeChain() {
@ -4705,7 +4705,7 @@ class LLoadSlotV : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(LoadSlotV)
LLoadSlotV(const LAllocation &in) {
explicit LLoadSlotV(const LAllocation &in) {
setOperand(0, in);
}
const MLoadSlot *mir() const {
@ -4721,7 +4721,7 @@ class LLoadSlotT : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(LoadSlotT)
LLoadSlotT(const LAllocation &in) {
explicit LLoadSlotT(const LAllocation &in) {
setOperand(0, in);
}
const MLoadSlot *mir() const {
@ -4735,7 +4735,7 @@ class LStoreSlotV : public LInstructionHelper<0, 1 + BOX_PIECES, 0>
public:
LIR_HEADER(StoreSlotV)
LStoreSlotV(const LAllocation &slots) {
explicit LStoreSlotV(const LAllocation &slots) {
setOperand(0, slots);
}
@ -4781,7 +4781,7 @@ class LStringLength : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(StringLength)
LStringLength(const LAllocation &string) {
explicit LStringLength(const LAllocation &string) {
setOperand(0, string);
}
@ -4796,7 +4796,7 @@ class LFloor : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(Floor)
LFloor(const LAllocation &num) {
explicit LFloor(const LAllocation &num) {
setOperand(0, num);
}
};
@ -4807,7 +4807,7 @@ class LFloorF : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(FloorF)
LFloorF(const LAllocation &num) {
explicit LFloorF(const LAllocation &num) {
setOperand(0, num);
}
};
@ -4878,7 +4878,7 @@ class LFunctionEnvironment : public LInstructionHelper<1, 1, 0>
public:
LIR_HEADER(FunctionEnvironment)
LFunctionEnvironment(const LAllocation &function) {
explicit LFunctionEnvironment(const LAllocation &function) {
setOperand(0, function);
}
const LAllocation *function() {
@ -4891,7 +4891,7 @@ class LForkJoinContext : public LCallInstructionHelper<1, 0, 1>
public:
LIR_HEADER(ForkJoinContext);
LForkJoinContext(const LDefinition &temp1) {
explicit LForkJoinContext(const LDefinition &temp1) {
setTemp(0, temp1);
}
@ -4987,7 +4987,7 @@ class LCallSetProperty : public LCallInstructionHelper<0, 1 + BOX_PIECES, 0>
public:
LIR_HEADER(CallSetProperty)
LCallSetProperty(const LAllocation &obj) {
explicit LCallSetProperty(const LAllocation &obj) {
setOperand(0, obj);
}
@ -5159,7 +5159,7 @@ class LCallIteratorStart : public LCallInstructionHelper<1, 1, 0>
public:
LIR_HEADER(CallIteratorStart)
LCallIteratorStart(const LAllocation &object) {
explicit LCallIteratorStart(const LAllocation &object) {
setOperand(0, object);
}
const LAllocation *object() {
@ -5281,7 +5281,7 @@ class LGetFrameArgument : public LInstructionHelper<BOX_PIECES, 1, 0>
public:
LIR_HEADER(GetFrameArgument)
LGetFrameArgument(const LAllocation &index) {
explicit LGetFrameArgument(const LAllocation &index) {
setOperand(0, index);
}
const LAllocation *index() {
@ -5295,7 +5295,7 @@ class LSetFrameArgumentT : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(SetFrameArgumentT)
LSetFrameArgumentT(const LAllocation &input) {
explicit LSetFrameArgumentT(const LAllocation &input) {
setOperand(0, input);
}
MSetFrameArgument *mir() const {
@ -5314,7 +5314,7 @@ class LSetFrameArgumentC : public LInstructionHelper<0, 0, 0>
public:
LIR_HEADER(SetFrameArgumentC)
LSetFrameArgumentC(const Value &val) {
explicit LSetFrameArgumentC(const Value &val) {
val_ = val;
}
MSetFrameArgument *mir() const {
@ -5447,7 +5447,7 @@ class LTypeBarrierV : public LInstructionHelper<0, BOX_PIECES, 1>
public:
LIR_HEADER(TypeBarrierV)
LTypeBarrierV(const LDefinition &temp) {
explicit LTypeBarrierV(const LDefinition &temp) {
setTemp(0, temp);
}
@ -5488,7 +5488,7 @@ class LMonitorTypes : public LInstructionHelper<0, BOX_PIECES, 1>
public:
LIR_HEADER(MonitorTypes)
LMonitorTypes(const LDefinition &temp) {
explicit LMonitorTypes(const LDefinition &temp) {
setTemp(0, temp);
}
@ -5559,7 +5559,7 @@ class LGuardObjectIdentity : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(GuardObjectIdentity)
LGuardObjectIdentity(const LAllocation &in) {
explicit LGuardObjectIdentity(const LAllocation &in) {
setOperand(0, in);
}
const MGuardObjectIdentity *mir() const {
@ -5654,7 +5654,7 @@ class LIn : public LCallInstructionHelper<1, BOX_PIECES+1, 0>
{
public:
LIR_HEADER(In)
LIn(const LAllocation &rhs) {
explicit LIn(const LAllocation &rhs) {
setOperand(RHS, rhs);
}
@ -5673,7 +5673,7 @@ class LInstanceOfO : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(InstanceOfO)
LInstanceOfO(const LAllocation &lhs) {
explicit LInstanceOfO(const LAllocation &lhs) {
setOperand(0, lhs);
}
@ -5708,7 +5708,7 @@ class LCallInstanceOf : public LCallInstructionHelper<1, BOX_PIECES+1, 0>
{
public:
LIR_HEADER(CallInstanceOf)
LCallInstanceOf(const LAllocation &rhs) {
explicit LCallInstanceOf(const LAllocation &rhs) {
setOperand(RHS, rhs);
}
@ -5731,7 +5731,7 @@ class LProfilerStackOp : public LInstructionHelper<0, 0, 1>
public:
LIR_HEADER(ProfilerStackOp)
LProfilerStackOp(const LDefinition &temp) {
explicit LProfilerStackOp(const LDefinition &temp) {
setTemp(0, temp);
}
@ -5756,7 +5756,7 @@ class LIsCallable : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(IsCallable);
LIsCallable(const LAllocation &object) {
explicit LIsCallable(const LAllocation &object) {
setOperand(0, object);
}
@ -5794,7 +5794,7 @@ class LHasClass : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(HasClass);
LHasClass(const LAllocation &lhs) {
explicit LHasClass(const LAllocation &lhs) {
setOperand(0, lhs);
}
@ -5810,7 +5810,7 @@ class LAsmJSLoadHeap : public LInstructionHelper<1, 1, 0>
{
public:
LIR_HEADER(AsmJSLoadHeap);
LAsmJSLoadHeap(const LAllocation &ptr) {
explicit LAsmJSLoadHeap(const LAllocation &ptr) {
setOperand(0, ptr);
}
MAsmJSLoadHeap *mir() const {
@ -5853,7 +5853,7 @@ class LAsmJSStoreGlobalVar : public LInstructionHelper<0, 1, 0>
{
public:
LIR_HEADER(AsmJSStoreGlobalVar);
LAsmJSStoreGlobalVar(const LAllocation &value) {
explicit LAsmJSStoreGlobalVar(const LAllocation &value) {
setOperand(0, value);
}
MAsmJSStoreGlobalVar *mir() const {
@ -5895,7 +5895,7 @@ class LAsmJSPassStackArg : public LInstructionHelper<0, 1, 0>
{
public:
LIR_HEADER(AsmJSPassStackArg);
LAsmJSPassStackArg(const LAllocation &arg) {
explicit LAsmJSPassStackArg(const LAllocation &arg) {
setOperand(0, arg);
}
MAsmJSPassStackArg *mir() const {
@ -5978,7 +5978,7 @@ class LAssertRangeI : public LInstructionHelper<0, 1, 0>
public:
LIR_HEADER(AssertRangeI)
LAssertRangeI(const LAllocation &input) {
explicit LAssertRangeI(const LAllocation &input) {
setOperand(0, input);
}
@ -6084,7 +6084,7 @@ class LRecompileCheck : public LInstructionHelper<0, 0, 1>
public:
LIR_HEADER(RecompileCheck)
LRecompileCheck(const LDefinition &scratch) {
explicit LRecompileCheck(const LDefinition &scratch) {
setTemp(0, scratch);
}

Просмотреть файл

@ -256,13 +256,13 @@ class LUse : public LAllocation
set(policy, 0, usedAtStart);
setVirtualRegister(vreg);
}
LUse(Policy policy, bool usedAtStart = false) {
explicit LUse(Policy policy, bool usedAtStart = false) {
set(policy, 0, usedAtStart);
}
LUse(Register reg, bool usedAtStart = false) {
explicit LUse(Register reg, bool usedAtStart = false) {
set(FIXED, reg.code(), usedAtStart);
}
LUse(FloatRegister reg, bool usedAtStart = false) {
explicit LUse(FloatRegister reg, bool usedAtStart = false) {
set(FIXED, reg.code(), usedAtStart);
}
LUse(Register reg, uint32_t virtualRegister) {
@ -455,7 +455,7 @@ class LDefinition
set(index, type, policy);
}
LDefinition(Type type, Policy policy = DEFAULT) {
explicit LDefinition(Type type, Policy policy = DEFAULT) {
set(0, type, policy);
}
@ -905,7 +905,7 @@ class LRecoverInfo : public TempObject
// Cached offset where this resume point is encoded.
RecoverOffset recoverOffset_;
LRecoverInfo(TempAllocator &alloc);
explicit LRecoverInfo(TempAllocator &alloc);
bool init(MResumePoint *mir);
// Fill the instruction vector such as all instructions needed for the
@ -945,7 +945,7 @@ class LRecoverInfo : public TempObject
size_t op_;
public:
OperandIter(MNode **it)
explicit OperandIter(MNode **it)
: it_(it), op_(0)
{ }
@ -1133,7 +1133,7 @@ class LSafepoint : public TempObject
JS_ASSERT((gcRegs().bits() & ~liveRegs().gprs().bits()) == 0);
}
LSafepoint(TempAllocator &alloc)
explicit LSafepoint(TempAllocator &alloc)
: safepointOffset_(INVALID_SAFEPOINT_OFFSET)
, osiCallPointOffset_(0)
, gcSlots_(alloc)
@ -1423,7 +1423,7 @@ class LInstruction::InputIterator
}
public:
InputIterator(LInstruction &ins) :
explicit InputIterator(LInstruction &ins) :
ins_(ins),
idx_(0),
snapshot_(false)
@ -1506,7 +1506,7 @@ class LIRGraph
MIRGraph &mir_;
public:
LIRGraph(MIRGraph *mir);
explicit LIRGraph(MIRGraph *mir);
bool init() {
return constantPoolMap_.init();

Просмотреть файл

@ -26,7 +26,7 @@ class LinearScanVirtualRegister : public VirtualRegister
bool finished_ : 1;
public:
LinearScanVirtualRegister(TempAllocator &alloc)
explicit LinearScanVirtualRegister(TempAllocator &alloc)
: VirtualRegister(alloc)
{}
void setCanonicalSpill(LAllocation *alloc) {

Просмотреть файл

@ -33,7 +33,7 @@ class Requirement
: kind_(NONE)
{ }
Requirement(Kind kind)
explicit Requirement(Kind kind)
: kind_(kind)
{
// These have dedicated constructors.
@ -48,7 +48,7 @@ class Requirement
JS_ASSERT(kind != FIXED && kind != SAME_AS_OTHER);
}
Requirement(LAllocation fixed)
explicit Requirement(LAllocation fixed)
: kind_(FIXED),
allocation_(fixed)
{

Просмотреть файл

@ -181,7 +181,7 @@ class MNode : public TempObject
: block_(nullptr)
{ }
MNode(MBasicBlock *block)
explicit MNode(MBasicBlock *block)
: block_(block)
{ }
@ -256,7 +256,7 @@ class AliasSet {
// Indicates load or store.
Store_ = 1 << 31
};
AliasSet(uint32_t flags)
explicit AliasSet(uint32_t flags)
: flags_(flags)
{
JS_STATIC_ASSERT((1 << NumCategories) - 1 == Any);
@ -722,7 +722,7 @@ class MUseDefIterator
}
public:
MUseDefIterator(MDefinition *def)
explicit MUseDefIterator(MDefinition *def)
: def_(def),
current_(search(def->usesBegin()))
{ }
@ -819,7 +819,7 @@ class MNullaryInstruction : public MAryInstruction<0>
class MUnaryInstruction : public MAryInstruction<1>
{
protected:
MUnaryInstruction(MDefinition *ins)
explicit MUnaryInstruction(MDefinition *ins)
{
initOperand(0, ins);
}
@ -960,7 +960,7 @@ class MStart : public MNullaryInstruction
StartType startType_;
private:
MStart(StartType startType)
explicit MStart(StartType startType)
: startType_(startType)
{ }
@ -1057,7 +1057,7 @@ class MConstant : public MNullaryInstruction
protected:
MConstant(const Value &v, types::CompilerConstraintList *constraints);
MConstant(JSObject *obj);
explicit MConstant(JSObject *obj);
public:
INSTRUCTION_HEADER(Constant)
@ -1109,7 +1109,7 @@ class MCloneLiteral
public ObjectPolicy<0>
{
protected:
MCloneLiteral(MDefinition *obj)
explicit MCloneLiteral(MDefinition *obj)
: MUnaryInstruction(obj)
{
setResultType(MIRType_Object);
@ -1382,7 +1382,7 @@ class MAryControlInstruction : public MControlInstruction
// Jump to the start of another basic block.
class MGoto : public MAryControlInstruction<0, 1>
{
MGoto(MBasicBlock *target) {
explicit MGoto(MBasicBlock *target) {
setSuccessor(0, target);
}
@ -1478,7 +1478,7 @@ class MReturn
: public MAryControlInstruction<1, 0>,
public BoxInputsPolicy
{
MReturn(MDefinition *ins) {
explicit MReturn(MDefinition *ins) {
initOperand(0, ins);
}
@ -1503,7 +1503,7 @@ class MThrow
: public MAryControlInstruction<1, 0>,
public BoxInputsPolicy
{
MThrow(MDefinition *ins) {
explicit MThrow(MDefinition *ins) {
initOperand(0, ins);
}
@ -2316,7 +2316,7 @@ class MFilterArgumentsOrEval
public BoxExceptPolicy<0, MIRType_String>
{
protected:
MFilterArgumentsOrEval(MDefinition *string)
explicit MFilterArgumentsOrEval(MDefinition *string)
{
initOperand(0, string);
setGuard();
@ -2691,7 +2691,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
class MGuardObject : public MUnaryInstruction, public SingleObjectPolicy
{
MGuardObject(MDefinition *ins)
explicit MGuardObject(MDefinition *ins)
: MUnaryInstruction(ins)
{
setGuard();
@ -2718,7 +2718,7 @@ class MGuardString
: public MUnaryInstruction,
public StringPolicy<0>
{
MGuardString(MDefinition *ins)
explicit MGuardString(MDefinition *ins)
: MUnaryInstruction(ins)
{
setGuard();
@ -2860,7 +2860,7 @@ class MCreateThis
: public MUnaryInstruction,
public ObjectPolicy<0>
{
MCreateThis(MDefinition *callee)
explicit MCreateThis(MDefinition *callee)
: MUnaryInstruction(callee)
{
setResultType(MIRType_Value);
@ -2894,7 +2894,7 @@ class MCreateArgumentsObject
: public MUnaryInstruction,
public ObjectPolicy<0>
{
MCreateArgumentsObject(MDefinition *callObj)
explicit MCreateArgumentsObject(MDefinition *callObj)
: MUnaryInstruction(callObj)
{
setResultType(MIRType_Object);
@ -3076,7 +3076,7 @@ class MToDouble
TruncateKind implicitTruncate_;
MToDouble(MDefinition *def, ConversionKind conversion = NonStringPrimitives)
explicit MToDouble(MDefinition *def, ConversionKind conversion = NonStringPrimitives)
: MUnaryInstruction(def), conversion_(conversion), implicitTruncate_(NoTruncate)
{
setResultType(MIRType_Double);
@ -3199,7 +3199,7 @@ class MToFloat32
class MAsmJSUnsignedToDouble
: public MUnaryInstruction
{
MAsmJSUnsignedToDouble(MDefinition *def)
explicit MAsmJSUnsignedToDouble(MDefinition *def)
: MUnaryInstruction(def)
{
setResultType(MIRType_Double);
@ -3225,7 +3225,7 @@ class MAsmJSUnsignedToDouble
class MAsmJSUnsignedToFloat32
: public MUnaryInstruction
{
MAsmJSUnsignedToFloat32(MDefinition *def)
explicit MAsmJSUnsignedToFloat32(MDefinition *def)
: MUnaryInstruction(def)
{
setResultType(MIRType_Float32);
@ -3319,7 +3319,7 @@ class MToInt32
// operations. This is an infallible ValueToECMAInt32.
class MTruncateToInt32 : public MUnaryInstruction
{
MTruncateToInt32(MDefinition *def)
explicit MTruncateToInt32(MDefinition *def)
: MUnaryInstruction(def)
{
setResultType(MIRType_Int32);
@ -3360,7 +3360,7 @@ class MTruncateToInt32 : public MUnaryInstruction
// Converts any type to a string
class MToString : public MUnaryInstruction
{
MToString(MDefinition *def)
explicit MToString(MDefinition *def)
: MUnaryInstruction(def)
{
// Converting an object to a string might be effectful.
@ -3396,7 +3396,7 @@ class MBitNot
public BitwisePolicy
{
protected:
MBitNot(MDefinition *input)
explicit MBitNot(MDefinition *input)
: MUnaryInstruction(input)
{
setResultType(MIRType_Int32);
@ -4062,7 +4062,7 @@ class MPowHalf
bool operandIsNeverNegativeZero_;
bool operandIsNeverNaN_;
MPowHalf(MDefinition *input)
explicit MPowHalf(MDefinition *input)
: MUnaryInstruction(input),
operandIsNeverNegativeInfinity_(false),
operandIsNeverNegativeZero_(false),
@ -4647,7 +4647,7 @@ class MFromCharCode
: public MUnaryInstruction,
public IntPolicy<0>
{
MFromCharCode(MDefinition *code)
explicit MFromCharCode(MDefinition *code)
: MUnaryInstruction(code)
{
setMovable();
@ -4724,7 +4724,7 @@ class MComputeThis
: public MUnaryInstruction,
public BoxPolicy<0>
{
MComputeThis(MDefinition *def)
explicit MComputeThis(MDefinition *def)
: MUnaryInstruction(def)
{
setResultType(MIRType_Object);
@ -4756,7 +4756,7 @@ class MLoadArrowThis
: public MUnaryInstruction,
public SingleObjectPolicy
{
MLoadArrowThis(MDefinition *callee)
explicit MLoadArrowThis(MDefinition *callee)
: MUnaryInstruction(callee)
{
setResultType(MIRType_Value);
@ -4998,7 +4998,7 @@ class MOsrValue : public MUnaryInstruction
class MOsrScopeChain : public MUnaryInstruction
{
private:
MOsrScopeChain(MOsrEntry *entry)
explicit MOsrScopeChain(MOsrEntry *entry)
: MUnaryInstruction(entry)
{
setResultType(MIRType_Object);
@ -5020,7 +5020,7 @@ class MOsrScopeChain : public MUnaryInstruction
class MOsrArgumentsObject : public MUnaryInstruction
{
private:
MOsrArgumentsObject(MOsrEntry *entry)
explicit MOsrArgumentsObject(MOsrEntry *entry)
: MUnaryInstruction(entry)
{
setResultType(MIRType_Object);
@ -5042,7 +5042,7 @@ class MOsrArgumentsObject : public MUnaryInstruction
class MOsrReturnValue : public MUnaryInstruction
{
private:
MOsrReturnValue(MOsrEntry *entry)
explicit MOsrReturnValue(MOsrEntry *entry)
: MUnaryInstruction(entry)
{
setResultType(MIRType_Value);
@ -5074,7 +5074,7 @@ class MCheckOverRecursed : public MNullaryInstruction
// Uses the per-thread recursion limit.
class MCheckOverRecursedPar : public MUnaryInstruction
{
MCheckOverRecursedPar(MDefinition *cx)
explicit MCheckOverRecursedPar(MDefinition *cx)
: MUnaryInstruction(cx)
{
setResultType(MIRType_None);
@ -5097,7 +5097,7 @@ class MCheckOverRecursedPar : public MUnaryInstruction
// Check for an interrupt (or rendezvous) in parallel mode.
class MInterruptCheckPar : public MUnaryInstruction
{
MInterruptCheckPar(MDefinition *cx)
explicit MInterruptCheckPar(MDefinition *cx)
: MUnaryInstruction(cx)
{
setResultType(MIRType_None);
@ -5397,7 +5397,7 @@ struct LambdaFunctionInfo
bool singletonType;
bool useNewTypeForClone;
LambdaFunctionInfo(JSFunction *fun)
explicit LambdaFunctionInfo(JSFunction *fun)
: fun(fun), flags(fun->flags()),
scriptOrLazyScript(fun->hasScript()
? (gc::Cell *) fun->nonLazyScript()
@ -5531,7 +5531,7 @@ class MImplicitThis
: public MUnaryInstruction,
public SingleObjectPolicy
{
MImplicitThis(MDefinition *callee)
explicit MImplicitThis(MDefinition *callee)
: MUnaryInstruction(callee)
{
setResultType(MIRType_Value);
@ -5561,7 +5561,7 @@ class MSlots
: public MUnaryInstruction,
public SingleObjectPolicy
{
MSlots(MDefinition *object)
explicit MSlots(MDefinition *object)
: MUnaryInstruction(object)
{
setResultType(MIRType_Slots);
@ -5594,7 +5594,7 @@ class MElements
: public MUnaryInstruction,
public SingleObjectPolicy
{
MElements(MDefinition *object)
explicit MElements(MDefinition *object)
: MUnaryInstruction(object)
{
setResultType(MIRType_Elements);
@ -5628,7 +5628,7 @@ class MConstantElements : public MNullaryInstruction
void *value_;
protected:
MConstantElements(void *v)
explicit MConstantElements(void *v)
: value_(v)
{
setResultType(MIRType_Elements);
@ -5664,7 +5664,7 @@ class MConstantElements : public MNullaryInstruction
class MConvertElementsToDoubles
: public MUnaryInstruction
{
MConvertElementsToDoubles(MDefinition *elements)
explicit MConvertElementsToDoubles(MDefinition *elements)
: MUnaryInstruction(elements)
{
setGuard();
@ -5742,7 +5742,7 @@ class MMaybeToDoubleElement
class MInitializedLength
: public MUnaryInstruction
{
MInitializedLength(MDefinition *elements)
explicit MInitializedLength(MDefinition *elements)
: MUnaryInstruction(elements)
{
setResultType(MIRType_Int32);
@ -5801,7 +5801,7 @@ class MSetInitializedLength
class MArrayLength
: public MUnaryInstruction
{
MArrayLength(MDefinition *elements)
explicit MArrayLength(MDefinition *elements)
: MUnaryInstruction(elements)
{
setResultType(MIRType_Int32);
@ -5861,7 +5861,7 @@ class MTypedArrayLength
: public MUnaryInstruction,
public SingleObjectPolicy
{
MTypedArrayLength(MDefinition *obj)
explicit MTypedArrayLength(MDefinition *obj)
: MUnaryInstruction(obj)
{
setResultType(MIRType_Int32);
@ -5898,7 +5898,7 @@ class MTypedArrayElements
: public MUnaryInstruction,
public SingleObjectPolicy
{
MTypedArrayElements(MDefinition *object)
explicit MTypedArrayElements(MDefinition *object)
: MUnaryInstruction(object)
{
setResultType(MIRType_Elements);
@ -5931,7 +5931,7 @@ class MNeuterCheck
: public MUnaryInstruction
{
private:
MNeuterCheck(MDefinition *object)
explicit MNeuterCheck(MDefinition *object)
: MUnaryInstruction(object)
{
JS_ASSERT(object->type() == MIRType_Object);
@ -5969,7 +5969,7 @@ class MTypedObjectElements
public SingleObjectPolicy
{
private:
MTypedObjectElements(MDefinition *object)
explicit MTypedObjectElements(MDefinition *object)
: MUnaryInstruction(object)
{
setResultType(MIRType_Elements);
@ -6044,7 +6044,7 @@ class MNot
bool operandIsNeverNaN_;
public:
MNot(MDefinition *input)
explicit MNot(MDefinition *input)
: MUnaryInstruction(input),
operandMightEmulateUndefined_(true),
operandIsNeverNaN_(false)
@ -6168,7 +6168,7 @@ class MBoundsCheckLower
int32_t minimum_;
bool fallible_;
MBoundsCheckLower(MDefinition *index)
explicit MBoundsCheckLower(MDefinition *index)
: MUnaryInstruction(index), minimum_(0), fallible_(true)
{
setGuard();
@ -6995,7 +6995,7 @@ class MClampToUint8
: public MUnaryInstruction,
public ClampPolicy
{
MClampToUint8(MDefinition *input)
explicit MClampToUint8(MDefinition *input)
: MUnaryInstruction(input)
{
setResultType(MIRType_Int32);
@ -7964,7 +7964,7 @@ class MFunctionEnvironment
public SingleObjectPolicy
{
public:
MFunctionEnvironment(MDefinition *function)
explicit MFunctionEnvironment(MDefinition *function)
: MUnaryInstruction(function)
{
setResultType(MIRType_Object);
@ -8025,7 +8025,7 @@ class MForkJoinContext
class MForkJoinGetSlice
: public MUnaryInstruction
{
MForkJoinGetSlice(MDefinition *cx)
explicit MForkJoinGetSlice(MDefinition *cx)
: MUnaryInstruction(cx)
{
setResultType(MIRType_Int32);
@ -8157,7 +8157,7 @@ class MCallGetIntrinsicValue : public MNullaryInstruction
{
CompilerRootPropertyName name_;
MCallGetIntrinsicValue(PropertyName *name)
explicit MCallGetIntrinsicValue(PropertyName *name)
: name_(name)
{
setResultType(MIRType_Value);
@ -8740,7 +8740,7 @@ class MStringLength
: public MUnaryInstruction,
public StringPolicy<0>
{
MStringLength(MDefinition *string)
explicit MStringLength(MDefinition *string)
: MUnaryInstruction(string)
{
setResultType(MIRType_Int32);
@ -8779,7 +8779,7 @@ class MFloor
: public MUnaryInstruction,
public FloatingPointPolicy<0>
{
MFloor(MDefinition *num)
explicit MFloor(MDefinition *num)
: MUnaryInstruction(num)
{
setResultType(MIRType_Int32);
@ -8866,7 +8866,7 @@ class MRound
: public MUnaryInstruction,
public FloatingPointPolicy<0>
{
MRound(MDefinition *num)
explicit MRound(MDefinition *num)
: MUnaryInstruction(num)
{
setResultType(MIRType_Int32);
@ -8939,7 +8939,7 @@ class MIteratorNext
: public MUnaryInstruction,
public SingleObjectPolicy
{
MIteratorNext(MDefinition *iter)
explicit MIteratorNext(MDefinition *iter)
: MUnaryInstruction(iter)
{
setResultType(MIRType_Value);
@ -8964,7 +8964,7 @@ class MIteratorMore
: public MUnaryInstruction,
public SingleObjectPolicy
{
MIteratorMore(MDefinition *iter)
explicit MIteratorMore(MDefinition *iter)
: MUnaryInstruction(iter)
{
setResultType(MIRType_Boolean);
@ -8989,7 +8989,7 @@ class MIteratorEnd
: public MUnaryInstruction,
public SingleObjectPolicy
{
MIteratorEnd(MDefinition *iter)
explicit MIteratorEnd(MDefinition *iter)
: MUnaryInstruction(iter)
{ }
@ -9590,7 +9590,7 @@ class MNewDeclEnvObject : public MNullaryInstruction
{
CompilerRootObject templateObj_;
MNewDeclEnvObject(JSObject *templateObj)
explicit MNewDeclEnvObject(JSObject *templateObj)
: MNullaryInstruction(),
templateObj_(templateObj)
{
@ -9617,7 +9617,7 @@ class MNewCallObjectBase : public MNullaryInstruction
CompilerRootObject templateObj_;
protected:
MNewCallObjectBase(JSObject *templateObj)
explicit MNewCallObjectBase(JSObject *templateObj)
: MNullaryInstruction(),
templateObj_(templateObj)
{
@ -9638,7 +9638,7 @@ class MNewCallObject : public MNewCallObjectBase
public:
INSTRUCTION_HEADER(NewCallObject)
MNewCallObject(JSObject *templateObj)
explicit MNewCallObject(JSObject *templateObj)
: MNewCallObjectBase(templateObj)
{}
@ -9654,7 +9654,7 @@ class MNewRunOnceCallObject : public MNewCallObjectBase
public:
INSTRUCTION_HEADER(NewRunOnceCallObject)
MNewRunOnceCallObject(JSObject *templateObj)
explicit MNewRunOnceCallObject(JSObject *templateObj)
: MNewCallObjectBase(templateObj)
{}
@ -9780,7 +9780,7 @@ class MProfilerStackOp : public MNullaryInstruction
// This is an alias for MLoadFixedSlot.
class MEnclosingScope : public MLoadFixedSlot
{
MEnclosingScope(MDefinition *obj)
explicit MEnclosingScope(MDefinition *obj)
: MLoadFixedSlot(obj, ScopeObject::enclosingScopeSlot())
{
setResultType(MIRType_Object);
@ -9953,7 +9953,7 @@ class MIsCallable
: public MUnaryInstruction,
public SingleObjectPolicy
{
MIsCallable(MDefinition *object)
explicit MIsCallable(MDefinition *object)
: MUnaryInstruction(object)
{
setResultType(MIRType_Boolean);
@ -10250,7 +10250,7 @@ class MAsmJSLoadFuncPtr : public MUnaryInstruction
class MAsmJSLoadFFIFunc : public MNullaryInstruction
{
MAsmJSLoadFFIFunc(unsigned globalDataOffset)
explicit MAsmJSLoadFFIFunc(unsigned globalDataOffset)
: globalDataOffset_(globalDataOffset)
{
setResultType(MIRType_Pointer);
@ -10291,7 +10291,7 @@ class MAsmJSParameter : public MNullaryInstruction
class MAsmJSReturn : public MAryControlInstruction<1, 0>
{
MAsmJSReturn(MDefinition *ins) {
explicit MAsmJSReturn(MDefinition *ins) {
initOperand(0, ins);
}
@ -10351,9 +10351,9 @@ class MAsmJSCall MOZ_FINAL : public MInstruction
} u;
public:
Callee() {}
Callee(Label *callee) : which_(Internal) { u.internal_ = callee; }
Callee(MDefinition *callee) : which_(Dynamic) { u.dynamic_ = callee; }
Callee(AsmJSImmKind callee) : which_(Builtin) { u.builtin_ = callee; }
explicit Callee(Label *callee) : which_(Internal) { u.internal_ = callee; }
explicit Callee(MDefinition *callee) : which_(Dynamic) { u.dynamic_ = callee; }
explicit Callee(AsmJSImmKind callee) : which_(Builtin) { u.builtin_ = callee; }
Which which() const { return which_; }
Label *internal() const { JS_ASSERT(which_ == Internal); return u.internal_; }
MDefinition *dynamic() const { JS_ASSERT(which_ == Dynamic); return u.dynamic_; }

Просмотреть файл

@ -545,7 +545,7 @@ class MIRGraph
bool hasTryBlock_;
public:
MIRGraph(TempAllocator *alloc)
explicit MIRGraph(TempAllocator *alloc)
: alloc_(alloc),
returnAccumulator_(nullptr),
blockIdGen_(0),
@ -698,7 +698,7 @@ class MDefinitionIterator
}
public:
MDefinitionIterator(MBasicBlock *block)
explicit MDefinitionIterator(MBasicBlock *block)
: block_(block),
phiIter_(block->phisBegin()),
iter_(block->begin())

Просмотреть файл

@ -92,7 +92,7 @@ class ParallelSafetyVisitor : public MInstructionVisitor
}
public:
ParallelSafetyVisitor(MIRGraph &graph)
explicit ParallelSafetyVisitor(MIRGraph &graph)
: graph_(graph),
unsafe_(false),
cx_(nullptr)

Просмотреть файл

@ -366,7 +366,7 @@ class Range : public TempObject {
// Construct a range from the given MDefinition. This differs from the
// MDefinition's range() method in that it describes the range of values
// *after* any bailout checks.
Range(const MDefinition *def);
explicit Range(const MDefinition *def);
static Range *NewInt32Range(TempAllocator &alloc, int32_t l, int32_t h) {
return new(alloc) Range(l, h, false, MaxInt32Exponent);

Просмотреть файл

@ -68,7 +68,7 @@ class RInstruction
#define RINSTRUCTION_HEADER_(op) \
private: \
friend class RInstruction; \
R##op(CompactBufferReader &reader); \
explicit R##op(CompactBufferReader &reader); \
\
public: \
Opcode opcode() const { \

Просмотреть файл

@ -138,7 +138,7 @@ struct AllocationIntegrityState
class CodePosition
{
private:
MOZ_CONSTEXPR CodePosition(const uint32_t &bits)
MOZ_CONSTEXPR explicit CodePosition(const uint32_t &bits)
: bits_(bits)
{ }

Просмотреть файл

@ -166,7 +166,7 @@ class TypedOrValueRegister
dataTyped() = reg;
}
TypedOrValueRegister(ValueOperand value)
MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
: type_(MIRType_Value)
{
dataValue() = value;
@ -225,13 +225,13 @@ class ConstantOrRegister
ConstantOrRegister()
{}
ConstantOrRegister(Value value)
MOZ_IMPLICIT ConstantOrRegister(Value value)
: constant_(true)
{
dataValue() = value;
}
ConstantOrRegister(TypedOrValueRegister reg)
MOZ_IMPLICIT ConstantOrRegister(TypedOrValueRegister reg)
: constant_(false)
{
dataReg() = reg;
@ -631,7 +631,7 @@ class TypedRegisterIterator
TypedRegisterSet<T> regset_;
public:
TypedRegisterIterator(TypedRegisterSet<T> regset) : regset_(regset)
explicit TypedRegisterIterator(TypedRegisterSet<T> regset) : regset_(regset)
{ }
TypedRegisterIterator(const TypedRegisterIterator &other) : regset_(other.regset_)
{ }
@ -660,7 +660,7 @@ class TypedRegisterBackwardIterator
TypedRegisterSet<T> regset_;
public:
TypedRegisterBackwardIterator(TypedRegisterSet<T> regset) : regset_(regset)
explicit TypedRegisterBackwardIterator(TypedRegisterSet<T> regset) : regset_(regset)
{ }
TypedRegisterBackwardIterator(const TypedRegisterBackwardIterator &other)
: regset_(other.regset_)
@ -690,7 +690,7 @@ class TypedRegisterForwardIterator
TypedRegisterSet<T> regset_;
public:
TypedRegisterForwardIterator(TypedRegisterSet<T> regset) : regset_(regset)
explicit TypedRegisterForwardIterator(TypedRegisterSet<T> regset) : regset_(regset)
{ }
TypedRegisterForwardIterator(const TypedRegisterForwardIterator &other) : regset_(other.regset_)
{ }
@ -731,7 +731,7 @@ class AnyRegisterIterator
AnyRegisterIterator(GeneralRegisterSet genset, FloatRegisterSet floatset)
: geniter_(genset), floatiter_(floatset)
{ }
AnyRegisterIterator(const RegisterSet &set)
explicit AnyRegisterIterator(const RegisterSet &set)
: geniter_(set.gpr_), floatiter_(set.fpu_)
{ }
AnyRegisterIterator(const AnyRegisterIterator &other)
@ -770,9 +770,9 @@ class ABIArg
public:
ABIArg() : kind_(Kind(-1)) { u.offset_ = -1; }
ABIArg(Register gpr) : kind_(GPR) { u.gpr_ = gpr.code(); }
ABIArg(FloatRegister fpu) : kind_(FPU) { u.fpu_ = fpu.code(); }
ABIArg(uint32_t offset) : kind_(Stack) { u.offset_ = offset; }
explicit ABIArg(Register gpr) : kind_(GPR) { u.gpr_ = gpr.code(); }
explicit ABIArg(FloatRegister fpu) : kind_(FPU) { u.fpu_ = fpu.code(); }
explicit ABIArg(uint32_t offset) : kind_(Stack) { u.offset_ = offset; }
Kind kind() const { return kind_; }
Register gpr() const { JS_ASSERT(kind() == GPR); return Register::FromCode(u.gpr_); }

Просмотреть файл

@ -19,7 +19,7 @@ struct CopyValueToRematerializedFrame
{
Value *slots;
CopyValueToRematerializedFrame(Value *slots)
explicit CopyValueToRematerializedFrame(Value *slots)
: slots(slots)
{ }

Просмотреть файл

@ -379,7 +379,7 @@ SafepointReader::InvalidationPatchPoint(IonScript *script, const SafepointIndex
{
SafepointReader reader(script, si);
return CodeLocationLabel(script->method(), reader.osiCallPointOffset());
return CodeLocationLabel(script->method(), CodeOffsetLabel(reader.osiCallPointOffset()));
}
void

Просмотреть файл

@ -149,7 +149,7 @@ class RValueAllocation
{
}
RValueAllocation(Mode mode)
explicit RValueAllocation(Mode mode)
: mode_(mode)
{
}

Просмотреть файл

@ -100,7 +100,7 @@ class PowPolicy : public BoxInputsPolicy
MIRType specialization_;
public:
PowPolicy(MIRType specialization)
explicit PowPolicy(MIRType specialization)
: specialization_(specialization)
{ }

Просмотреть файл

@ -242,7 +242,7 @@ struct VMFunction
// A collection of VM functions for each execution mode.
struct VMFunctionsModal
{
VMFunctionsModal(const VMFunction &info) {
explicit VMFunctionsModal(const VMFunction &info) {
add(info);
}
VMFunctionsModal(const VMFunction &info1, const VMFunction &info2) {
@ -445,7 +445,7 @@ template <> struct MatchContext<ThreadSafeContext *> {
static inline uint64_t argumentRootTypes() { \
return ForEachNb(COMPUTE_ARG_ROOT, SEP_OR, NOTHING); \
} \
FunctionInfo(pf fun, PopValues extraValuesToPop = PopValues(0)) \
explicit FunctionInfo(pf fun, PopValues extraValuesToPop = PopValues(0)) \
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(), \
argumentProperties(), argumentPassedInFloatRegs(), \
argumentRootTypes(), outParam(), outParamRootType(), \
@ -486,7 +486,7 @@ struct FunctionInfo<R (*)(Context)> : public VMFunction {
static inline uint64_t argumentRootTypes() {
return 0;
}
FunctionInfo(pf fun)
explicit FunctionInfo(pf fun)
: VMFunction(JS_FUNC_TO_DATA_PTR(void *, fun), explicitArgs(),
argumentProperties(), argumentPassedInFloatRegs(),
argumentRootTypes(), outParam(), outParamRootType(),

Просмотреть файл

@ -2047,7 +2047,7 @@ MacroAssemblerARMCompat::movePtr(AsmJSImmPtr imm, Register dest)
else
rs = L_LDR;
enoughMemory_ &= append(AsmJSAbsoluteLink(nextOffset().getOffset(), imm.kind()));
enoughMemory_ &= append(AsmJSAbsoluteLink(CodeOffsetLabel(nextOffset().getOffset()), imm.kind()));
ma_movPatchable(Imm32(-1), dest, Always, rs);
}
void

Просмотреть файл

@ -699,7 +699,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
}
CodeOffsetLabel movWithPatch(ImmWord imm, Register dest) {
CodeOffsetLabel label = currentOffset();
CodeOffsetLabel label = CodeOffsetLabel(currentOffset());
ma_movPatchable(Imm32(imm.value), dest, Always, hasMOVWT() ? L_MOVWT : L_LDR);
return label;
}

Просмотреть файл

@ -363,7 +363,7 @@ class CodeLabel
public:
CodeLabel()
{ }
CodeLabel(const AbsoluteLabel &dest)
explicit CodeLabel(const AbsoluteLabel &dest)
: dest_(dest)
{ }
AbsoluteLabel *dest() {
@ -413,7 +413,7 @@ class CodeOffsetLabel
size_t offset_;
public:
CodeOffsetLabel(size_t offset) : offset_(offset) {}
explicit CodeOffsetLabel(size_t offset) : offset_(offset) {}
CodeOffsetLabel() : offset_(0) {}
size_t offset() const {
@ -529,11 +529,11 @@ class CodeLocationLabel
*this = base;
repoint(code);
}
CodeLocationLabel(JitCode *code) {
explicit CodeLocationLabel(JitCode *code) {
raw_ = code->raw();
setAbsolute();
}
CodeLocationLabel(uint8_t *raw) {
explicit CodeLocationLabel(uint8_t *raw) {
raw_ = raw;
setAbsolute();
}
@ -757,7 +757,8 @@ class AsmJSImmPtr
AsmJSImmKind kind_;
public:
AsmJSImmKind kind() const { return kind_; }
AsmJSImmPtr(AsmJSImmKind kind) : kind_(kind) { JS_ASSERT(IsCompilingAsmJS()); }
// This needs to be MOZ_IMPLICIT in order to make MacroAssember::CallWithABINoProfiling compile.
MOZ_IMPLICIT AsmJSImmPtr(AsmJSImmKind kind) : kind_(kind) { JS_ASSERT(IsCompilingAsmJS()); }
AsmJSImmPtr() {}
};
@ -768,7 +769,7 @@ class AsmJSAbsoluteAddress
AsmJSImmKind kind_;
public:
AsmJSImmKind kind() const { return kind_; }
AsmJSAbsoluteAddress(AsmJSImmKind kind) : kind_(kind) { JS_ASSERT(IsCompilingAsmJS()); }
explicit AsmJSAbsoluteAddress(AsmJSImmKind kind) : kind_(kind) { JS_ASSERT(IsCompilingAsmJS()); }
AsmJSAbsoluteAddress() {}
};

Просмотреть файл

@ -97,7 +97,7 @@ BaselineCompilerShared::callVM(const VMFunction &fun, CallVMPhase phase)
// Add a fake ICEntry (without stubs), so that the return offset to
// pc mapping works.
ICEntry entry(script->pcToOffset(pc), ICEntry::Kind_CallVM);
entry.setReturnOffset(callOffset);
entry.setReturnOffset(CodeOffsetLabel(callOffset));
return icEntries_.append(entry);
}

Просмотреть файл

@ -649,7 +649,7 @@ class StoreRegisterTo
Register out_;
public:
StoreRegisterTo(Register out)
explicit StoreRegisterTo(Register out)
: out_(out)
{ }
@ -669,7 +669,7 @@ class StoreFloatRegisterTo
FloatRegister out_;
public:
StoreFloatRegisterTo(FloatRegister out)
explicit StoreFloatRegisterTo(FloatRegister out)
: out_(out)
{ }
@ -690,7 +690,7 @@ class StoreValueTo_
Output out_;
public:
StoreValueTo_(const Output &out)
explicit StoreValueTo_(const Output &out)
: out_(out)
{ }
@ -803,7 +803,7 @@ class OutOfLinePropagateAbortPar : public OutOfLineCode
LInstruction *lir_;
public:
OutOfLinePropagateAbortPar(LInstruction *lir)
explicit OutOfLinePropagateAbortPar(LInstruction *lir)
: lir_(lir)
{ }

Просмотреть файл

@ -367,7 +367,7 @@ class BailoutJump {
Assembler::Condition cond_;
public:
BailoutJump(Assembler::Condition cond) : cond_(cond)
explicit BailoutJump(Assembler::Condition cond) : cond_(cond)
{ }
#ifdef JS_CODEGEN_X86
void operator()(MacroAssembler &masm, uint8_t *code) const {
@ -383,7 +383,7 @@ class BailoutLabel {
Label *label_;
public:
BailoutLabel(Label *label) : label_(label)
explicit BailoutLabel(Label *label) : label_(label)
{ }
#ifdef JS_CODEGEN_X86
void operator()(MacroAssembler &masm, uint8_t *code) const {
@ -616,7 +616,7 @@ class OutOfLineUndoALUOperation : public OutOfLineCodeBase<CodeGeneratorX86Share
LInstruction *ins_;
public:
OutOfLineUndoALUOperation(LInstruction *ins)
explicit OutOfLineUndoALUOperation(LInstruction *ins)
: ins_(ins)
{ }
@ -711,7 +711,7 @@ class MulNegativeZeroCheck : public OutOfLineCodeBase<CodeGeneratorX86Shared>
LMulI *ins_;
public:
MulNegativeZeroCheck(LMulI *ins)
explicit MulNegativeZeroCheck(LMulI *ins)
: ins_(ins)
{ }
@ -1446,7 +1446,7 @@ class OutOfLineTableSwitch : public OutOfLineCodeBase<CodeGeneratorX86Shared>
}
public:
OutOfLineTableSwitch(MTableSwitch *mir)
explicit OutOfLineTableSwitch(MTableSwitch *mir)
: mir_(mir)
{}

Просмотреть файл

@ -197,7 +197,7 @@ class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorX86Shared>
LSnapshot *snapshot_;
public:
OutOfLineBailout(LSnapshot *snapshot)
explicit OutOfLineBailout(LSnapshot *snapshot)
: snapshot_(snapshot)
{ }

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше