зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj
This commit is contained in:
Родитель
5d3ead1816
Коммит
43c2748f66
|
@ -31,7 +31,7 @@ namespace a11y {
|
|||
class IDSet
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR IDSet() : mBitSet(), mIdx(0) {}
|
||||
constexpr IDSet() : mBitSet(), mIdx(0) {}
|
||||
|
||||
/**
|
||||
* Return a new unique id.
|
||||
|
|
|
@ -1447,7 +1447,7 @@ HeapSnapshot::CreateUniqueCoreDumpFile(ErrorResult& rv,
|
|||
class DeleteHeapSnapshotTempFileHelperChild
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR DeleteHeapSnapshotTempFileHelperChild() { }
|
||||
constexpr DeleteHeapSnapshotTempFileHelperChild() { }
|
||||
|
||||
void operator()(PHeapSnapshotTempFileHelperChild* ptr) const {
|
||||
NS_WARN_IF(!HeapSnapshotTempFileHelperChild::Send__delete__(ptr));
|
||||
|
|
|
@ -49,7 +49,7 @@ struct AnimationPerformanceWarning
|
|||
// this variable, please include this header file directly.
|
||||
// This value is the same as the limit of nsStringBundle::FormatString.
|
||||
// See the implementation of nsStringBundle::FormatString.
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kMaxParamsForLocalization = 10;
|
||||
static constexpr uint8_t kMaxParamsForLocalization = 10;
|
||||
|
||||
// Indicates why this property could not be animated on the compositor.
|
||||
Type mType;
|
||||
|
|
|
@ -107,7 +107,7 @@ struct Keyframe
|
|||
}
|
||||
|
||||
Maybe<double> mOffset;
|
||||
static MOZ_CONSTEXPR_VAR double kComputedOffsetNotSet = -1.0;
|
||||
static constexpr double kComputedOffsetNotSet = -1.0;
|
||||
double mComputedOffset = kComputedOffsetNotSet;
|
||||
Maybe<ComputedTimingFunction> mTimingFunction; // Nothing() here means
|
||||
// "linear"
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace dom {
|
|||
class WindowNamedPropertiesHandler : public BaseDOMProxyHandler
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR WindowNamedPropertiesHandler()
|
||||
constexpr WindowNamedPropertiesHandler()
|
||||
: BaseDOMProxyHandler(nullptr, /* hasPrototype = */ true)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -669,7 +669,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DialogValueHolder)
|
|||
class nsOuterWindowProxy : public js::Wrapper
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR nsOuterWindowProxy() : js::Wrapper(0) { }
|
||||
constexpr nsOuterWindowProxy() : js::Wrapper(0) { }
|
||||
|
||||
virtual bool finalizeInBackground(JS::Value priv) const override {
|
||||
return false;
|
||||
|
@ -1139,7 +1139,7 @@ nsOuterWindowProxy::singleton;
|
|||
class nsChromeOuterWindowProxy : public nsOuterWindowProxy
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR nsChromeOuterWindowProxy() : nsOuterWindowProxy() { }
|
||||
constexpr nsChromeOuterWindowProxy() : nsOuterWindowProxy() { }
|
||||
|
||||
virtual const char *className(JSContext *cx, JS::Handle<JSObject*> wrapper) const override;
|
||||
|
||||
|
|
|
@ -1291,7 +1291,7 @@ TimeUntilNow(TimeStamp start)
|
|||
|
||||
struct CycleCollectorStats
|
||||
{
|
||||
MOZ_CONSTEXPR CycleCollectorStats() :
|
||||
constexpr CycleCollectorStats() :
|
||||
mMaxGCDuration(0), mRanSyncForgetSkippable(false), mSuspected(0),
|
||||
mMaxSkippableDuration(0), mMaxSliceTime(0), mMaxSliceTimeSinceClear(0),
|
||||
mTotalSliceTime(0), mAnyLockedOut(false), mExtraForgetSkippableCalls(0) {}
|
||||
|
|
|
@ -2956,21 +2956,21 @@ class GetCCParticipant
|
|||
{
|
||||
// Helper for GetCCParticipant for classes that participate in CC.
|
||||
template<class U>
|
||||
static MOZ_CONSTEXPR nsCycleCollectionParticipant*
|
||||
static constexpr nsCycleCollectionParticipant*
|
||||
GetHelper(int, typename U::NS_CYCLE_COLLECTION_INNERCLASS* dummy=nullptr)
|
||||
{
|
||||
return T::NS_CYCLE_COLLECTION_INNERCLASS::GetParticipant();
|
||||
}
|
||||
// Helper for GetCCParticipant for classes that don't participate in CC.
|
||||
template<class U>
|
||||
static MOZ_CONSTEXPR nsCycleCollectionParticipant*
|
||||
static constexpr nsCycleCollectionParticipant*
|
||||
GetHelper(double)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
public:
|
||||
static MOZ_CONSTEXPR nsCycleCollectionParticipant*
|
||||
static constexpr nsCycleCollectionParticipant*
|
||||
Get()
|
||||
{
|
||||
// Passing int() here will try to call the GetHelper that takes an int as
|
||||
|
@ -2985,7 +2985,7 @@ template<class T>
|
|||
class GetCCParticipant<T, true>
|
||||
{
|
||||
public:
|
||||
static MOZ_CONSTEXPR nsCycleCollectionParticipant*
|
||||
static constexpr nsCycleCollectionParticipant*
|
||||
Get()
|
||||
{
|
||||
return nullptr;
|
||||
|
@ -3022,7 +3022,7 @@ EnumerateGlobal(JSContext* aCx, JS::Handle<JSObject*> aObj);
|
|||
template <class T>
|
||||
struct CreateGlobalOptions
|
||||
{
|
||||
static MOZ_CONSTEXPR_VAR ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
|
||||
static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
|
||||
ProtoAndIfaceCache::NonWindowLike;
|
||||
static void TraceGlobal(JSTracer* aTrc, JSObject* aObj)
|
||||
{
|
||||
|
@ -3039,7 +3039,7 @@ struct CreateGlobalOptions
|
|||
template <>
|
||||
struct CreateGlobalOptions<nsGlobalWindow>
|
||||
{
|
||||
static MOZ_CONSTEXPR_VAR ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
|
||||
static constexpr ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
|
||||
ProtoAndIfaceCache::WindowLike;
|
||||
static void TraceGlobal(JSTracer* aTrc, JSObject* aObj);
|
||||
static bool PostCreateGlobal(JSContext* aCx, JS::Handle<JSObject*> aGlobal);
|
||||
|
|
|
@ -10146,7 +10146,7 @@ class ClassConstructor(ClassItem):
|
|||
if self.inline and declaring:
|
||||
decorators.append('inline')
|
||||
if self.constexpr and declaring:
|
||||
decorators.append('MOZ_CONSTEXPR')
|
||||
decorators.append('constexpr')
|
||||
if decorators:
|
||||
return ' '.join(decorators) + ' '
|
||||
return ''
|
||||
|
|
|
@ -238,7 +238,7 @@ struct NativePropertiesN {
|
|||
|
||||
const int32_t iteratorAliasMethodIndex;
|
||||
|
||||
MOZ_CONSTEXPR const NativePropertiesN<7>* Upcast() const {
|
||||
constexpr const NativePropertiesN<7>* Upcast() const {
|
||||
return reinterpret_cast<const NativePropertiesN<7>*>(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ template<typename T> struct Prefable;
|
|||
class BaseDOMProxyHandler : public js::BaseProxyHandler
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR BaseDOMProxyHandler(const void* aProxyFamily, bool aHasPrototype = false)
|
||||
explicit constexpr BaseDOMProxyHandler(const void* aProxyFamily, bool aHasPrototype = false)
|
||||
: js::BaseProxyHandler(aProxyFamily, aHasPrototype)
|
||||
{}
|
||||
|
||||
|
@ -98,7 +98,7 @@ protected:
|
|||
class DOMProxyHandler : public BaseDOMProxyHandler
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR DOMProxyHandler()
|
||||
constexpr DOMProxyHandler()
|
||||
: BaseDOMProxyHandler(&family)
|
||||
{}
|
||||
|
||||
|
|
|
@ -2463,7 +2463,7 @@ Validate(mozIStorageConnection* aConn)
|
|||
typedef nsresult (*MigrationFunc)(mozIStorageConnection*, bool&);
|
||||
struct Migration
|
||||
{
|
||||
MOZ_CONSTEXPR Migration(int32_t aFromVersion, MigrationFunc aFunc)
|
||||
constexpr Migration(int32_t aFromVersion, MigrationFunc aFunc)
|
||||
: mFromVersion(aFromVersion)
|
||||
, mFunc(aFunc)
|
||||
{ }
|
||||
|
|
|
@ -24,12 +24,12 @@ struct StaticEnumConverter
|
|||
typedef T WebidlEnumType;
|
||||
typedef uint32_t XpidlEnumType;
|
||||
|
||||
static MOZ_CONSTEXPR WebidlEnumType
|
||||
static constexpr WebidlEnumType
|
||||
x2w(XpidlEnumType aXpidlEnum) { return static_cast<WebidlEnumType>(aXpidlEnum); }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
MOZ_CONSTEXPR T
|
||||
constexpr T
|
||||
ToWebidlEnum(uint32_t aXpidlEnum) { return EnumConverter<T>::x2w(aXpidlEnum); }
|
||||
|
||||
// Declare converters here:
|
||||
|
|
|
@ -24,7 +24,7 @@ class EventStates
|
|||
public:
|
||||
typedef uint64_t InternalType;
|
||||
|
||||
MOZ_CONSTEXPR EventStates()
|
||||
constexpr EventStates()
|
||||
: mStates(0)
|
||||
{
|
||||
}
|
||||
|
@ -34,12 +34,12 @@ public:
|
|||
// In that case, we could be sure that only macros at the end were creating
|
||||
// EventStates instances with mStates set to something else than 0.
|
||||
// Unfortunately, this constructor is needed at at least two places now.
|
||||
explicit MOZ_CONSTEXPR EventStates(InternalType aStates)
|
||||
explicit constexpr EventStates(InternalType aStates)
|
||||
: mStates(aStates)
|
||||
{
|
||||
}
|
||||
|
||||
EventStates MOZ_CONSTEXPR operator|(const EventStates& aEventStates) const
|
||||
EventStates constexpr operator|(const EventStates& aEventStates) const
|
||||
{
|
||||
return EventStates(mStates | aEventStates.mStates);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
// NOTE: calling if (eventStates1 & eventStates2) will not build.
|
||||
// This might work correctly if operator bool() is defined
|
||||
// but using HasState, HasAllStates or HasAtLeastOneOfStates is recommended.
|
||||
EventStates MOZ_CONSTEXPR operator&(const EventStates& aEventStates) const
|
||||
EventStates constexpr operator&(const EventStates& aEventStates) const
|
||||
{
|
||||
return EventStates(mStates & aEventStates.mStates);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace mozilla {
|
|||
namespace dom {
|
||||
|
||||
// Map html attribute string values to TextTrackKind enums.
|
||||
static MOZ_CONSTEXPR nsAttrValue::EnumTable kKindTable[] = {
|
||||
static constexpr nsAttrValue::EnumTable kKindTable[] = {
|
||||
{ "subtitles", static_cast<int16_t>(TextTrackKind::Subtitles) },
|
||||
{ "captions", static_cast<int16_t>(TextTrackKind::Captions) },
|
||||
{ "descriptions", static_cast<int16_t>(TextTrackKind::Descriptions) },
|
||||
|
@ -71,7 +71,7 @@ static MOZ_CONSTEXPR nsAttrValue::EnumTable kKindTable[] = {
|
|||
|
||||
// Invalid values are treated as "metadata" in ParseAttribute, but if no value
|
||||
// at all is specified, it's treated as "subtitles" in GetKind
|
||||
static MOZ_CONSTEXPR const nsAttrValue::EnumTable* kKindTableInvalidValueDefault = &kKindTable[4];
|
||||
static constexpr const nsAttrValue::EnumTable* kKindTableInvalidValueDefault = &kKindTable[4];
|
||||
|
||||
/** HTMLTrackElement */
|
||||
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
|
||||
|
|
|
@ -256,7 +256,7 @@ const uint32_t kDEBUGTransactionThreadSleepMS = 0;
|
|||
#endif
|
||||
|
||||
template <size_t N>
|
||||
MOZ_CONSTEXPR size_t
|
||||
constexpr size_t
|
||||
LiteralStringLength(const char (&aArr)[N])
|
||||
{
|
||||
static_assert(N, "Zero-length string literal?!");
|
||||
|
@ -2888,11 +2888,11 @@ UpgradeKeyFunction::CopyAndUpgradeKeyBufferInternal(const uint8_t*& aSource,
|
|||
MOZ_ASSERT(aDestination);
|
||||
MOZ_ASSERT(aTagOffset <= Key::kMaxArrayCollapse);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kOldNumberTag = 0x1;
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kOldDateTag = 0x2;
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kOldStringTag = 0x3;
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kOldArrayTag = 0x4;
|
||||
static MOZ_CONSTEXPR_VAR uint8_t kOldMaxType = kOldArrayTag;
|
||||
static constexpr uint8_t kOldNumberTag = 0x1;
|
||||
static constexpr uint8_t kOldDateTag = 0x2;
|
||||
static constexpr uint8_t kOldStringTag = 0x3;
|
||||
static constexpr uint8_t kOldArrayTag = 0x4;
|
||||
static constexpr uint8_t kOldMaxType = kOldArrayTag;
|
||||
|
||||
if (NS_WARN_IF(aRecursionDepth > Key::kMaxRecursionDepth)) {
|
||||
IDB_REPORT_INTERNAL_ERR();
|
||||
|
|
|
@ -723,7 +723,7 @@ CreateBlobImpl(const nsTArray<uint8_t>& aMemoryData,
|
|||
RefPtr<BlobImpl> blobImpl;
|
||||
|
||||
if (auto length = static_cast<size_t>(aMemoryData.Length())) {
|
||||
static MOZ_CONSTEXPR_VAR size_t elementSizeMultiplier =
|
||||
static constexpr size_t elementSizeMultiplier =
|
||||
sizeof(aMemoryData[0]) / sizeof(char);
|
||||
|
||||
if (!aMetadata.mHasRecursed &&
|
||||
|
|
|
@ -42,7 +42,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILBoolType() {}
|
||||
constexpr SMILBoolType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILEnumType() {}
|
||||
constexpr SMILEnumType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
MOZ_CONSTEXPR SMILIntegerType() {}
|
||||
constexpr SMILIntegerType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -43,7 +43,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILStringType() {}
|
||||
constexpr SMILStringType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -110,7 +110,7 @@ public:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILCSSValueType() {}
|
||||
constexpr nsSMILCSSValueType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILCSSVALUETYPE_H_
|
||||
|
|
|
@ -41,7 +41,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILFloatType() {}
|
||||
constexpr nsSMILFloatType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILFLOATTYPE_H_
|
||||
|
|
|
@ -44,7 +44,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILNullType() {}
|
||||
constexpr nsSMILNullType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILNULLTYPE_H_
|
||||
|
|
|
@ -45,7 +45,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGIntegerPairSMILType() {}
|
||||
constexpr SVGIntegerPairSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -93,7 +93,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGLengthListSMILType() {}
|
||||
constexpr SVGLengthListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -78,7 +78,7 @@ public:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGMotionSMILType() {}
|
||||
constexpr SVGMotionSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -47,7 +47,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGNumberListSMILType() {}
|
||||
constexpr SVGNumberListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -40,7 +40,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGNumberPairSMILType() {}
|
||||
constexpr SVGNumberPairSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -60,7 +60,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGOrientSMILType() {}
|
||||
constexpr SVGOrientSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -51,7 +51,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGPathSegListSMILType() {}
|
||||
constexpr SVGPathSegListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -47,7 +47,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGPointListSMILType() {}
|
||||
constexpr SVGPointListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -123,7 +123,7 @@ public:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGTransformListSMILType() {}
|
||||
constexpr SVGTransformListSMILType() {}
|
||||
};
|
||||
|
||||
} // end namespace mozilla
|
||||
|
|
|
@ -40,7 +40,7 @@ protected:
|
|||
|
||||
private:
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGViewBoxSMILType() {}
|
||||
constexpr SVGViewBoxSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -21,8 +21,8 @@ struct BaseCoord {
|
|||
T value;
|
||||
|
||||
// Constructors
|
||||
MOZ_CONSTEXPR BaseCoord() : value(0) {}
|
||||
explicit MOZ_CONSTEXPR BaseCoord(T aValue) : value(aValue) {}
|
||||
constexpr BaseCoord() : value(0) {}
|
||||
explicit constexpr BaseCoord(T aValue) : value(aValue) {}
|
||||
|
||||
// Note that '=' isn't defined so we'll get the
|
||||
// compiler generated default assignment operator
|
||||
|
|
|
@ -30,8 +30,8 @@ struct BasePoint {
|
|||
};
|
||||
|
||||
// Constructors
|
||||
MOZ_CONSTEXPR BasePoint() : x(0), y(0) {}
|
||||
MOZ_CONSTEXPR BasePoint(Coord aX, Coord aY) : x(aX), y(aY) {}
|
||||
constexpr BasePoint() : x(0), y(0) {}
|
||||
constexpr BasePoint(Coord aX, Coord aY) : x(aX), y(aY) {}
|
||||
|
||||
void MoveTo(T aX, T aY) { x = aX; y = aY; }
|
||||
void MoveBy(T aDx, T aDy) { x += aDx; y += aDy; }
|
||||
|
|
|
@ -26,8 +26,8 @@ struct BaseSize {
|
|||
};
|
||||
|
||||
// Constructors
|
||||
MOZ_CONSTEXPR BaseSize() : width(0), height(0) {}
|
||||
MOZ_CONSTEXPR BaseSize(T aWidth, T aHeight) : width(aWidth), height(aHeight) {}
|
||||
constexpr BaseSize() : width(0), height(0) {}
|
||||
constexpr BaseSize(T aWidth, T aHeight) : width(aWidth), height(aHeight) {}
|
||||
|
||||
void SizeTo(T aWidth, T aHeight) { width = aWidth; height = aHeight; }
|
||||
|
||||
|
|
|
@ -110,8 +110,8 @@ struct IntCoordTyped :
|
|||
|
||||
typedef BaseCoord< int32_t, IntCoordTyped<units> > Super;
|
||||
|
||||
MOZ_CONSTEXPR IntCoordTyped() : Super() {}
|
||||
MOZ_CONSTEXPR MOZ_IMPLICIT IntCoordTyped(int32_t aValue) : Super(aValue) {}
|
||||
constexpr IntCoordTyped() : Super() {}
|
||||
constexpr MOZ_IMPLICIT IntCoordTyped(int32_t aValue) : Super(aValue) {}
|
||||
};
|
||||
|
||||
template<class units, class F>
|
||||
|
@ -126,9 +126,9 @@ struct CoordTyped :
|
|||
|
||||
typedef BaseCoord< F, CoordTyped<units, F> > Super;
|
||||
|
||||
MOZ_CONSTEXPR CoordTyped() : Super() {}
|
||||
MOZ_CONSTEXPR MOZ_IMPLICIT CoordTyped(F aValue) : Super(aValue) {}
|
||||
explicit MOZ_CONSTEXPR CoordTyped(const IntCoordTyped<units>& aCoord) : Super(F(aCoord.value)) {}
|
||||
constexpr CoordTyped() : Super() {}
|
||||
constexpr MOZ_IMPLICIT CoordTyped(F aValue) : Super(aValue) {}
|
||||
explicit constexpr CoordTyped(const IntCoordTyped<units>& aCoord) : Super(F(aCoord.value)) {}
|
||||
|
||||
void Round() {
|
||||
this->value = floor(this->value + 0.5);
|
||||
|
|
|
@ -43,13 +43,13 @@ struct IntPointTyped :
|
|||
typedef IntCoordTyped<units> Coord;
|
||||
typedef BasePoint< int32_t, IntPointTyped<units>, IntCoordTyped<units> > Super;
|
||||
|
||||
MOZ_CONSTEXPR IntPointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR IntPointTyped(int32_t aX, int32_t aY) : Super(Coord(aX), Coord(aY)) {}
|
||||
constexpr IntPointTyped() : Super() {}
|
||||
constexpr IntPointTyped(int32_t aX, int32_t aY) : Super(Coord(aX), Coord(aY)) {}
|
||||
// The mixed-type constructors (int, Coord) and (Coord, int) are needed to
|
||||
// avoid ambiguities because Coord is implicitly convertible to int.
|
||||
MOZ_CONSTEXPR IntPointTyped(int32_t aX, Coord aY) : Super(Coord(aX), aY) {}
|
||||
MOZ_CONSTEXPR IntPointTyped(Coord aX, int32_t aY) : Super(aX, Coord(aY)) {}
|
||||
MOZ_CONSTEXPR IntPointTyped(Coord aX, Coord aY) : Super(aX, aY) {}
|
||||
constexpr IntPointTyped(int32_t aX, Coord aY) : Super(Coord(aX), aY) {}
|
||||
constexpr IntPointTyped(Coord aX, int32_t aY) : Super(aX, Coord(aY)) {}
|
||||
constexpr IntPointTyped(Coord aX, Coord aY) : Super(aX, aY) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
// unknown types should be removed.
|
||||
|
@ -74,14 +74,14 @@ struct PointTyped :
|
|||
typedef CoordTyped<units, F> Coord;
|
||||
typedef BasePoint< F, PointTyped<units, F>, CoordTyped<units, F> > Super;
|
||||
|
||||
MOZ_CONSTEXPR PointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR PointTyped(F aX, F aY) : Super(Coord(aX), Coord(aY)) {}
|
||||
constexpr PointTyped() : Super() {}
|
||||
constexpr PointTyped(F aX, F aY) : Super(Coord(aX), Coord(aY)) {}
|
||||
// The mixed-type constructors (Float, Coord) and (Coord, Float) are needed to
|
||||
// avoid ambiguities because Coord is implicitly convertible to Float.
|
||||
MOZ_CONSTEXPR PointTyped(F aX, Coord aY) : Super(Coord(aX), aY) {}
|
||||
MOZ_CONSTEXPR PointTyped(Coord aX, F aY) : Super(aX, Coord(aY)) {}
|
||||
MOZ_CONSTEXPR PointTyped(Coord aX, Coord aY) : Super(aX.value, aY.value) {}
|
||||
MOZ_CONSTEXPR MOZ_IMPLICIT PointTyped(const IntPointTyped<units>& point) : Super(F(point.x), F(point.y)) {}
|
||||
constexpr PointTyped(F aX, Coord aY) : Super(Coord(aX), aY) {}
|
||||
constexpr PointTyped(Coord aX, F aY) : Super(aX, Coord(aY)) {}
|
||||
constexpr PointTyped(Coord aX, Coord aY) : Super(aX.value, aY.value) {}
|
||||
constexpr MOZ_IMPLICIT PointTyped(const IntPointTyped<units>& point) : Super(F(point.x), F(point.y)) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
// unknown types should be removed.
|
||||
|
@ -172,8 +172,8 @@ struct IntSizeTyped :
|
|||
|
||||
typedef BaseSize< int32_t, IntSizeTyped<units> > Super;
|
||||
|
||||
MOZ_CONSTEXPR IntSizeTyped() : Super() {}
|
||||
MOZ_CONSTEXPR IntSizeTyped(int32_t aWidth, int32_t aHeight) : Super(aWidth, aHeight) {}
|
||||
constexpr IntSizeTyped() : Super() {}
|
||||
constexpr IntSizeTyped(int32_t aWidth, int32_t aHeight) : Super(aWidth, aHeight) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
// unknown types should be removed.
|
||||
|
@ -197,8 +197,8 @@ struct SizeTyped :
|
|||
|
||||
typedef BaseSize< F, SizeTyped<units, F> > Super;
|
||||
|
||||
MOZ_CONSTEXPR SizeTyped() : Super() {}
|
||||
MOZ_CONSTEXPR SizeTyped(F aWidth, F aHeight) : Super(aWidth, aHeight) {}
|
||||
constexpr SizeTyped() : Super() {}
|
||||
constexpr SizeTyped(F aWidth, F aHeight) : Super(aWidth, aHeight) {}
|
||||
explicit SizeTyped(const IntSizeTyped<units>& size) :
|
||||
Super(F(size.width), F(size.height)) {}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ template<class src, class dst>
|
|||
struct ScaleFactor {
|
||||
float scale;
|
||||
|
||||
MOZ_CONSTEXPR ScaleFactor() : scale(1.0) {}
|
||||
MOZ_CONSTEXPR ScaleFactor(const ScaleFactor<src, dst>& aCopy) : scale(aCopy.scale) {}
|
||||
explicit MOZ_CONSTEXPR ScaleFactor(float aScale) : scale(aScale) {}
|
||||
constexpr ScaleFactor() : scale(1.0) {}
|
||||
constexpr ScaleFactor(const ScaleFactor<src, dst>& aCopy) : scale(aCopy.scale) {}
|
||||
explicit constexpr ScaleFactor(float aScale) : scale(aScale) {}
|
||||
|
||||
ScaleFactor<dst, src> Inverse() {
|
||||
return ScaleFactor<dst, src>(1 / scale);
|
||||
|
|
|
@ -26,20 +26,20 @@ struct ScaleFactors2D {
|
|||
float xScale;
|
||||
float yScale;
|
||||
|
||||
MOZ_CONSTEXPR ScaleFactors2D() : xScale(1.0), yScale(1.0) {}
|
||||
MOZ_CONSTEXPR ScaleFactors2D(const ScaleFactors2D<src, dst>& aCopy)
|
||||
constexpr ScaleFactors2D() : xScale(1.0), yScale(1.0) {}
|
||||
constexpr ScaleFactors2D(const ScaleFactors2D<src, dst>& aCopy)
|
||||
: xScale(aCopy.xScale), yScale(aCopy.yScale) {}
|
||||
MOZ_CONSTEXPR ScaleFactors2D(float aXScale, float aYScale)
|
||||
constexpr ScaleFactors2D(float aXScale, float aYScale)
|
||||
: xScale(aXScale), yScale(aYScale) {}
|
||||
// Layout code often uses gfxSize to represent a pair of x/y scales.
|
||||
explicit MOZ_CONSTEXPR ScaleFactors2D(const gfxSize& aSize)
|
||||
explicit constexpr ScaleFactors2D(const gfxSize& aSize)
|
||||
: xScale(aSize.width), yScale(aSize.height) {}
|
||||
|
||||
// "Upgrade" from a ScaleFactor.
|
||||
// This is deliberately 'explicit' so that the treatment of a single scale
|
||||
// number as both the x- and y-scale in a context where they are allowed to
|
||||
// be different, is more visible.
|
||||
explicit MOZ_CONSTEXPR ScaleFactors2D(const ScaleFactor<src, dst>& aScale)
|
||||
explicit constexpr ScaleFactors2D(const ScaleFactor<src, dst>& aScale)
|
||||
: xScale(aScale.scale), yScale(aScale.scale) {}
|
||||
|
||||
bool AreScalesSame() const {
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace gl {
|
|||
class GLXLibrary
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR GLXLibrary()
|
||||
constexpr GLXLibrary()
|
||||
: xDestroyContextInternal(nullptr)
|
||||
, xMakeCurrentInternal(nullptr)
|
||||
, xGetCurrentContextInternal(nullptr)
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace mozilla {
|
|||
class DBusConnectionDelete
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR DBusConnectionDelete()
|
||||
constexpr DBusConnectionDelete()
|
||||
{ }
|
||||
|
||||
void operator()(DBusConnection* aConnection) const
|
||||
|
|
|
@ -91,7 +91,7 @@ WrapperOwner::idOf(JSObject* obj)
|
|||
class CPOWProxyHandler : public BaseProxyHandler
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR CPOWProxyHandler()
|
||||
constexpr CPOWProxyHandler()
|
||||
: BaseProxyHandler(&family) {}
|
||||
|
||||
virtual bool finalizeInBackground(Value priv) const override {
|
||||
|
|
|
@ -189,7 +189,7 @@ class JS_FRIEND_API(BaseProxyHandler)
|
|||
bool mHasSecurityPolicy;
|
||||
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR BaseProxyHandler(const void* aFamily, bool aHasPrototype = false,
|
||||
explicit constexpr BaseProxyHandler(const void* aFamily, bool aHasPrototype = false,
|
||||
bool aHasSecurityPolicy = false)
|
||||
: mFamily(aFamily),
|
||||
mHasPrototype(aHasPrototype),
|
||||
|
|
|
@ -418,7 +418,7 @@ class MOZ_NONHEAP_CLASS Handle : public js::HandleBase<T>
|
|||
* for the lifetime of the handle, as its users may not expect its value
|
||||
* to change underneath them.
|
||||
*/
|
||||
static MOZ_CONSTEXPR Handle fromMarkedLocation(const T* p) {
|
||||
static constexpr Handle fromMarkedLocation(const T* p) {
|
||||
return Handle(p, DeliberatelyChoosingThisOverload,
|
||||
ImUsingThisOnlyInFromFromMarkedLocation);
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ class MOZ_NONHEAP_CLASS Handle : public js::HandleBase<T>
|
|||
|
||||
enum Disambiguator { DeliberatelyChoosingThisOverload = 42 };
|
||||
enum CallerIdentity { ImUsingThisOnlyInFromFromMarkedLocation = 17 };
|
||||
MOZ_CONSTEXPR Handle(const T* p, Disambiguator, CallerIdentity) : ptr(p) {}
|
||||
constexpr Handle(const T* p, Disambiguator, CallerIdentity) : ptr(p) {}
|
||||
|
||||
const T* ptr;
|
||||
};
|
||||
|
|
|
@ -472,7 +472,7 @@ namespace JS {
|
|||
template<typename T>
|
||||
struct DeletePolicy
|
||||
{
|
||||
MOZ_CONSTEXPR DeletePolicy() {}
|
||||
constexpr DeletePolicy() {}
|
||||
|
||||
template<typename U>
|
||||
MOZ_IMPLICIT DeletePolicy(DeletePolicy<U> other,
|
||||
|
|
|
@ -367,8 +367,8 @@ JS_STATIC_ASSERT(sizeof(jsval_layout) == 8);
|
|||
#if defined(JS_VALUE_IS_CONSTEXPR)
|
||||
# define JS_RETURN_LAYOUT_FROM_BITS(BITS) \
|
||||
return (jsval_layout) { .asBits = (BITS) }
|
||||
# define JS_VALUE_CONSTEXPR MOZ_CONSTEXPR
|
||||
# define JS_VALUE_CONSTEXPR_VAR MOZ_CONSTEXPR_VAR
|
||||
# define JS_VALUE_CONSTEXPR constexpr
|
||||
# define JS_VALUE_CONSTEXPR_VAR constexpr
|
||||
#else
|
||||
# define JS_RETURN_LAYOUT_FROM_BITS(BITS) \
|
||||
jsval_layout l; \
|
||||
|
|
|
@ -454,16 +454,16 @@ class MOZ_STACK_CLASS TokenStream
|
|||
|
||||
public:
|
||||
typedef Token::Modifier Modifier;
|
||||
static MOZ_CONSTEXPR_VAR Modifier None = Token::None;
|
||||
static MOZ_CONSTEXPR_VAR Modifier Operand = Token::Operand;
|
||||
static MOZ_CONSTEXPR_VAR Modifier KeywordIsName = Token::KeywordIsName;
|
||||
static MOZ_CONSTEXPR_VAR Modifier TemplateTail = Token::TemplateTail;
|
||||
static constexpr Modifier None = Token::None;
|
||||
static constexpr Modifier Operand = Token::Operand;
|
||||
static constexpr Modifier KeywordIsName = Token::KeywordIsName;
|
||||
static constexpr Modifier TemplateTail = Token::TemplateTail;
|
||||
|
||||
typedef Token::ModifierException ModifierException;
|
||||
static MOZ_CONSTEXPR_VAR ModifierException NoException = Token::NoException;
|
||||
static MOZ_CONSTEXPR_VAR ModifierException NoneIsOperand = Token::NoneIsOperand;
|
||||
static MOZ_CONSTEXPR_VAR ModifierException OperandIsNone = Token::OperandIsNone;
|
||||
static MOZ_CONSTEXPR_VAR ModifierException NoneIsKeywordIsName = Token::NoneIsKeywordIsName;
|
||||
static constexpr ModifierException NoException = Token::NoException;
|
||||
static constexpr ModifierException NoneIsOperand = Token::NoneIsOperand;
|
||||
static constexpr ModifierException OperandIsNone = Token::OperandIsNone;
|
||||
static constexpr ModifierException NoneIsKeywordIsName = Token::NoneIsKeywordIsName;
|
||||
|
||||
void addModifierException(ModifierException modifierException) {
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -329,7 +329,7 @@ class TenuredCell : public Cell
|
|||
/* Cells are aligned to CellShift, so the largest tagged null pointer is: */
|
||||
const uintptr_t LargestTaggedNullCellPointer = (1 << CellShift) - 1;
|
||||
|
||||
MOZ_CONSTEXPR size_t
|
||||
constexpr size_t
|
||||
DivideAndRoundUp(size_t numerator, size_t divisor) {
|
||||
return (numerator + divisor - 1) / divisor;
|
||||
}
|
||||
|
|
|
@ -39,33 +39,33 @@ enum MemoryBarrierBits {
|
|||
MembarAllbits = 31,
|
||||
};
|
||||
|
||||
static inline MOZ_CONSTEXPR MemoryBarrierBits
|
||||
static inline constexpr MemoryBarrierBits
|
||||
operator|(MemoryBarrierBits a, MemoryBarrierBits b)
|
||||
{
|
||||
return MemoryBarrierBits(int(a) | int(b));
|
||||
}
|
||||
|
||||
static inline MOZ_CONSTEXPR MemoryBarrierBits
|
||||
static inline constexpr MemoryBarrierBits
|
||||
operator&(MemoryBarrierBits a, MemoryBarrierBits b)
|
||||
{
|
||||
return MemoryBarrierBits(int(a) & int(b));
|
||||
}
|
||||
|
||||
static inline MOZ_CONSTEXPR MemoryBarrierBits
|
||||
static inline constexpr MemoryBarrierBits
|
||||
operator~(MemoryBarrierBits a)
|
||||
{
|
||||
return MemoryBarrierBits(~int(a));
|
||||
}
|
||||
|
||||
// Standard barrier bits for a full barrier.
|
||||
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarFull = MembarLoadLoad|MembarLoadStore|MembarStoreLoad|MembarStoreStore;
|
||||
static constexpr MemoryBarrierBits MembarFull = MembarLoadLoad|MembarLoadStore|MembarStoreLoad|MembarStoreStore;
|
||||
|
||||
// Standard sets of barrier bits for atomic loads and stores.
|
||||
// See http://gee.cs.oswego.edu/dl/jmm/cookbook.html for more.
|
||||
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarBeforeLoad = MembarNobits;
|
||||
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarAfterLoad = MembarLoadLoad|MembarLoadStore;
|
||||
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarBeforeStore = MembarStoreStore;
|
||||
static MOZ_CONSTEXPR_VAR MemoryBarrierBits MembarAfterStore = MembarStoreLoad;
|
||||
static constexpr MemoryBarrierBits MembarBeforeLoad = MembarNobits;
|
||||
static constexpr MemoryBarrierBits MembarAfterLoad = MembarLoadLoad|MembarLoadStore;
|
||||
static constexpr MemoryBarrierBits MembarBeforeStore = MembarStoreStore;
|
||||
static constexpr MemoryBarrierBits MembarAfterStore = MembarStoreLoad;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -144,7 +144,7 @@ struct AllocationIntegrityState
|
|||
class CodePosition
|
||||
{
|
||||
private:
|
||||
MOZ_CONSTEXPR explicit CodePosition(uint32_t bits)
|
||||
constexpr explicit CodePosition(uint32_t bits)
|
||||
: bits_(bits)
|
||||
{ }
|
||||
|
||||
|
@ -163,7 +163,7 @@ class CodePosition
|
|||
OUTPUT
|
||||
};
|
||||
|
||||
MOZ_CONSTEXPR CodePosition() : bits_(0)
|
||||
constexpr CodePosition() : bits_(0)
|
||||
{ }
|
||||
|
||||
CodePosition(uint32_t instruction, SubPosition where) {
|
||||
|
|
|
@ -111,7 +111,7 @@ class ValueOperand
|
|||
Register payload_;
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR ValueOperand(Register type, Register payload)
|
||||
constexpr ValueOperand(Register type, Register payload)
|
||||
: type_(type), payload_(payload)
|
||||
{ }
|
||||
|
||||
|
@ -138,7 +138,7 @@ class ValueOperand
|
|||
Register value_;
|
||||
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR ValueOperand(Register value)
|
||||
explicit constexpr ValueOperand(Register value)
|
||||
: value_(value)
|
||||
{ }
|
||||
|
||||
|
@ -315,13 +315,13 @@ class TypedRegisterSet
|
|||
SetType bits_;
|
||||
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR TypedRegisterSet(SetType bits)
|
||||
explicit constexpr TypedRegisterSet(SetType bits)
|
||||
: bits_(bits)
|
||||
{ }
|
||||
|
||||
MOZ_CONSTEXPR TypedRegisterSet() : bits_(0)
|
||||
constexpr TypedRegisterSet() : bits_(0)
|
||||
{ }
|
||||
MOZ_CONSTEXPR TypedRegisterSet(const TypedRegisterSet<T>& set) : bits_(set.bits_)
|
||||
constexpr TypedRegisterSet(const TypedRegisterSet<T>& set) : bits_(set.bits_)
|
||||
{ }
|
||||
|
||||
static inline TypedRegisterSet All() {
|
||||
|
@ -433,7 +433,7 @@ class RegisterSet {
|
|||
public:
|
||||
RegisterSet()
|
||||
{ }
|
||||
MOZ_CONSTEXPR RegisterSet(const GeneralRegisterSet& gpr, const FloatRegisterSet& fpu)
|
||||
constexpr RegisterSet(const GeneralRegisterSet& gpr, const FloatRegisterSet& fpu)
|
||||
: gpr_(gpr),
|
||||
fpu_(fpu)
|
||||
{ }
|
||||
|
@ -473,13 +473,13 @@ class RegisterSet {
|
|||
bool emptyFloat() const {
|
||||
return fpu_.empty();
|
||||
}
|
||||
MOZ_CONSTEXPR GeneralRegisterSet gprs() const {
|
||||
constexpr GeneralRegisterSet gprs() const {
|
||||
return gpr_;
|
||||
}
|
||||
GeneralRegisterSet& gprs() {
|
||||
return gpr_;
|
||||
}
|
||||
MOZ_CONSTEXPR FloatRegisterSet fpus() const {
|
||||
constexpr FloatRegisterSet fpus() const {
|
||||
return fpu_;
|
||||
}
|
||||
FloatRegisterSet& fpus() {
|
||||
|
@ -567,8 +567,8 @@ class AllocatableSetAccessors
|
|||
|
||||
public:
|
||||
AllocatableSetAccessors() : set_() {}
|
||||
explicit MOZ_CONSTEXPR AllocatableSetAccessors(SetType set) : set_(set) {}
|
||||
explicit MOZ_CONSTEXPR AllocatableSetAccessors(RegSet set) : set_(set) {}
|
||||
explicit constexpr AllocatableSetAccessors(SetType set) : set_(set) {}
|
||||
explicit constexpr AllocatableSetAccessors(RegSet set) : set_(set) {}
|
||||
|
||||
bool has(RegType reg) const {
|
||||
return set_.hasAllocatable(reg);
|
||||
|
@ -597,8 +597,8 @@ class AllocatableSetAccessors<RegisterSet>
|
|||
|
||||
public:
|
||||
AllocatableSetAccessors() : set_() {}
|
||||
explicit MOZ_CONSTEXPR AllocatableSetAccessors(SetType) = delete;
|
||||
explicit MOZ_CONSTEXPR AllocatableSetAccessors(RegisterSet set) : set_(set) {}
|
||||
explicit constexpr AllocatableSetAccessors(SetType) = delete;
|
||||
explicit constexpr AllocatableSetAccessors(RegisterSet set) : set_(set) {}
|
||||
|
||||
bool has(Register reg) const {
|
||||
return set_.gprs().hasAllocatable(reg);
|
||||
|
@ -649,8 +649,8 @@ class LiveSetAccessors
|
|||
|
||||
public:
|
||||
LiveSetAccessors() : set_() {}
|
||||
explicit MOZ_CONSTEXPR LiveSetAccessors(SetType set) : set_(set) {}
|
||||
explicit MOZ_CONSTEXPR LiveSetAccessors(RegSet set) : set_(set) {}
|
||||
explicit constexpr LiveSetAccessors(SetType set) : set_(set) {}
|
||||
explicit constexpr LiveSetAccessors(RegSet set) : set_(set) {}
|
||||
|
||||
bool has(RegType reg) const {
|
||||
return set_.hasRegisterIndex(reg);
|
||||
|
@ -679,8 +679,8 @@ class LiveSetAccessors<RegisterSet>
|
|||
|
||||
public:
|
||||
LiveSetAccessors() : set_() {}
|
||||
explicit MOZ_CONSTEXPR LiveSetAccessors(SetType) = delete;
|
||||
explicit MOZ_CONSTEXPR LiveSetAccessors(RegisterSet set) : set_(set) {}
|
||||
explicit constexpr LiveSetAccessors(SetType) = delete;
|
||||
explicit constexpr LiveSetAccessors(RegisterSet set) : set_(set) {}
|
||||
|
||||
bool has(Register reg) const {
|
||||
return set_.gprs().hasRegisterIndex(reg);
|
||||
|
@ -709,9 +709,9 @@ class LiveSetAccessors<RegisterSet>
|
|||
typedef typename Parent::RegType RegType; \
|
||||
typedef typename Parent::SetType SetType; \
|
||||
\
|
||||
MOZ_CONSTEXPR_TMPL REGSET() : Parent() {} \
|
||||
explicit MOZ_CONSTEXPR_TMPL REGSET(SetType set) : Parent(set) {} \
|
||||
explicit MOZ_CONSTEXPR_TMPL REGSET(RegSet set) : Parent(set) {}
|
||||
constexpr REGSET() : Parent() {} \
|
||||
explicit constexpr REGSET(SetType set) : Parent(set) {} \
|
||||
explicit constexpr REGSET(RegSet set) : Parent(set) {}
|
||||
|
||||
// This class adds checked accessors on top of the unchecked variants defined by
|
||||
// AllocatableSet and LiveSet accessors. Also it defines interface which are
|
||||
|
@ -1026,10 +1026,10 @@ class AllocatableSet : public CommonRegSet<AllocatableSetAccessors<Set>, Set>
|
|||
typedef Parent::RegType RegType; \
|
||||
typedef Parent::SetType SetType; \
|
||||
\
|
||||
MOZ_CONSTEXPR_TMPL REGSET() : Parent() {} \
|
||||
explicit MOZ_CONSTEXPR_TMPL REGSET(SetType) = delete; \
|
||||
explicit MOZ_CONSTEXPR_TMPL REGSET(RegSet set) : Parent(set) {} \
|
||||
MOZ_CONSTEXPR_TMPL REGSET(GeneralRegisterSet gpr, FloatRegisterSet fpu) \
|
||||
constexpr REGSET() : Parent() {} \
|
||||
explicit constexpr REGSET(SetType) = delete; \
|
||||
explicit constexpr REGSET(RegSet set) : Parent(set) {} \
|
||||
constexpr REGSET(GeneralRegisterSet gpr, FloatRegisterSet fpu) \
|
||||
: Parent(RegisterSet(gpr, fpu)) \
|
||||
{} \
|
||||
REGSET(REGSET<GeneralRegisterSet> gpr, REGSET<FloatRegisterSet> fpu) \
|
||||
|
|
|
@ -50,7 +50,7 @@ struct Register {
|
|||
Register r = { Encoding(Codes::Invalid) };
|
||||
return r;
|
||||
}
|
||||
MOZ_CONSTEXPR Code code() const {
|
||||
constexpr Code code() const {
|
||||
return Code(reg_);
|
||||
}
|
||||
Encoding encoding() const {
|
||||
|
@ -109,7 +109,7 @@ struct Register64
|
|||
#endif
|
||||
|
||||
#ifdef JS_PUNBOX64
|
||||
explicit MOZ_CONSTEXPR Register64(Register r)
|
||||
explicit constexpr Register64(Register r)
|
||||
: reg(r)
|
||||
{}
|
||||
bool operator ==(Register64 other) const {
|
||||
|
@ -123,7 +123,7 @@ struct Register64
|
|||
: high(Register::Invalid()), low(Register::Invalid())
|
||||
{}
|
||||
|
||||
MOZ_CONSTEXPR Register64(Register h, Register l)
|
||||
constexpr Register64(Register h, Register l)
|
||||
: high(h), low(l)
|
||||
{}
|
||||
bool operator ==(Register64 other) const {
|
||||
|
@ -228,7 +228,7 @@ struct AutoGenericRegisterScope : public RegisterType
|
|||
explicit AutoGenericRegisterScope(MacroAssembler& masm, RegisterType reg);
|
||||
~AutoGenericRegisterScope();
|
||||
#else
|
||||
MOZ_CONSTEXPR explicit AutoGenericRegisterScope(MacroAssembler& masm, RegisterType reg)
|
||||
constexpr explicit AutoGenericRegisterScope(MacroAssembler& masm, RegisterType reg)
|
||||
: RegisterType(reg)
|
||||
{ }
|
||||
#endif
|
||||
|
|
|
@ -462,21 +462,21 @@ template <>
|
|||
struct LastArg<>
|
||||
{
|
||||
typedef void Type;
|
||||
static MOZ_CONSTEXPR_VAR size_t nbArgs = 0;
|
||||
static constexpr size_t nbArgs = 0;
|
||||
};
|
||||
|
||||
template <typename HeadType>
|
||||
struct LastArg<HeadType>
|
||||
{
|
||||
typedef HeadType Type;
|
||||
static MOZ_CONSTEXPR_VAR size_t nbArgs = 1;
|
||||
static constexpr size_t nbArgs = 1;
|
||||
};
|
||||
|
||||
template <typename HeadType, typename... TailTypes>
|
||||
struct LastArg<HeadType, TailTypes...>
|
||||
{
|
||||
typedef typename LastArg<TailTypes...>::Type Type;
|
||||
static MOZ_CONSTEXPR_VAR size_t nbArgs = LastArg<TailTypes...>::nbArgs + 1;
|
||||
static constexpr size_t nbArgs = LastArg<TailTypes...>::nbArgs + 1;
|
||||
};
|
||||
|
||||
// Construct a bit mask from a list of types. The mask is constructed as an OR
|
||||
|
@ -491,7 +491,7 @@ struct BitMask;
|
|||
template <template<typename> class Each, typename ResultType, size_t Shift>
|
||||
struct BitMask<Each, ResultType, Shift>
|
||||
{
|
||||
static MOZ_CONSTEXPR_VAR ResultType result = ResultType();
|
||||
static constexpr ResultType result = ResultType();
|
||||
};
|
||||
|
||||
template <template<typename> class Each, typename ResultType, size_t Shift,
|
||||
|
@ -503,7 +503,7 @@ struct BitMask<Each, ResultType, Shift, HeadType, TailTypes...>
|
|||
static_assert(LastArg<TailTypes...>::nbArgs < (8 * sizeof(ResultType) / Shift),
|
||||
"not enough bits in the result type to store all bit masks");
|
||||
|
||||
static MOZ_CONSTEXPR_VAR ResultType result =
|
||||
static constexpr ResultType result =
|
||||
ResultType(Each<HeadType>::result) |
|
||||
(BitMask<Each, ResultType, Shift, TailTypes...>::result << Shift);
|
||||
};
|
||||
|
|
|
@ -369,18 +369,18 @@ class VFPRegister
|
|||
bool _isMissing : 1;
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR VFPRegister(uint32_t r, RegType k)
|
||||
constexpr VFPRegister(uint32_t r, RegType k)
|
||||
: kind(k), code_ (Code(r)), _isInvalid(false), _isMissing(false)
|
||||
{ }
|
||||
MOZ_CONSTEXPR VFPRegister()
|
||||
constexpr VFPRegister()
|
||||
: kind(Double), code_(Code(0)), _isInvalid(true), _isMissing(false)
|
||||
{ }
|
||||
|
||||
MOZ_CONSTEXPR VFPRegister(RegType k, uint32_t id, bool invalid, bool missing) :
|
||||
constexpr VFPRegister(RegType k, uint32_t id, bool invalid, bool missing) :
|
||||
kind(k), code_(Code(id)), _isInvalid(invalid), _isMissing(missing) {
|
||||
}
|
||||
|
||||
explicit MOZ_CONSTEXPR VFPRegister(Code id)
|
||||
explicit constexpr VFPRegister(Code id)
|
||||
: kind(Double), code_(id), _isInvalid(false), _isMissing(false)
|
||||
{ }
|
||||
bool operator==(const VFPRegister& other) const {
|
||||
|
|
|
@ -1763,7 +1763,7 @@ Assembler::as_tst(Register src1, Operand2 op2, Condition c)
|
|||
return as_alu(InvalidReg, src1, op2, OpTst, SetCC, c);
|
||||
}
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register NoAddend = { Registers::pc };
|
||||
static constexpr Register NoAddend = { Registers::pc };
|
||||
|
||||
static const int SignExtend = 0x06000070;
|
||||
|
||||
|
|
|
@ -25,26 +25,26 @@ namespace jit {
|
|||
// refer to the link register as a link register (bl lr is much clearer than bl
|
||||
// r14). HOWEVER, this register can easily be a gpr when it is not busy holding
|
||||
// the return address.
|
||||
static MOZ_CONSTEXPR_VAR Register r0 = { Registers::r0 };
|
||||
static MOZ_CONSTEXPR_VAR Register r1 = { Registers::r1 };
|
||||
static MOZ_CONSTEXPR_VAR Register r2 = { Registers::r2 };
|
||||
static MOZ_CONSTEXPR_VAR Register r3 = { Registers::r3 };
|
||||
static MOZ_CONSTEXPR_VAR Register r4 = { Registers::r4 };
|
||||
static MOZ_CONSTEXPR_VAR Register r5 = { Registers::r5 };
|
||||
static MOZ_CONSTEXPR_VAR Register r6 = { Registers::r6 };
|
||||
static MOZ_CONSTEXPR_VAR Register r7 = { Registers::r7 };
|
||||
static MOZ_CONSTEXPR_VAR Register r8 = { Registers::r8 };
|
||||
static MOZ_CONSTEXPR_VAR Register r9 = { Registers::r9 };
|
||||
static MOZ_CONSTEXPR_VAR Register r10 = { Registers::r10 };
|
||||
static MOZ_CONSTEXPR_VAR Register r11 = { Registers::r11 };
|
||||
static MOZ_CONSTEXPR_VAR Register r12 = { Registers::ip };
|
||||
static MOZ_CONSTEXPR_VAR Register ip = { Registers::ip };
|
||||
static MOZ_CONSTEXPR_VAR Register sp = { Registers::sp };
|
||||
static MOZ_CONSTEXPR_VAR Register r14 = { Registers::lr };
|
||||
static MOZ_CONSTEXPR_VAR Register lr = { Registers::lr };
|
||||
static MOZ_CONSTEXPR_VAR Register pc = { Registers::pc };
|
||||
static constexpr Register r0 = { Registers::r0 };
|
||||
static constexpr Register r1 = { Registers::r1 };
|
||||
static constexpr Register r2 = { Registers::r2 };
|
||||
static constexpr Register r3 = { Registers::r3 };
|
||||
static constexpr Register r4 = { Registers::r4 };
|
||||
static constexpr Register r5 = { Registers::r5 };
|
||||
static constexpr Register r6 = { Registers::r6 };
|
||||
static constexpr Register r7 = { Registers::r7 };
|
||||
static constexpr Register r8 = { Registers::r8 };
|
||||
static constexpr Register r9 = { Registers::r9 };
|
||||
static constexpr Register r10 = { Registers::r10 };
|
||||
static constexpr Register r11 = { Registers::r11 };
|
||||
static constexpr Register r12 = { Registers::ip };
|
||||
static constexpr Register ip = { Registers::ip };
|
||||
static constexpr Register sp = { Registers::sp };
|
||||
static constexpr Register r14 = { Registers::lr };
|
||||
static constexpr Register lr = { Registers::lr };
|
||||
static constexpr Register pc = { Registers::pc };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ScratchRegister = {Registers::ip};
|
||||
static constexpr Register ScratchRegister = {Registers::ip};
|
||||
|
||||
// Helper class for ScratchRegister usage. Asserts that only one piece
|
||||
// of code thinks it has exclusive ownership of the scratch register.
|
||||
|
@ -55,22 +55,22 @@ struct ScratchRegisterScope : public AutoRegisterScope
|
|||
{ }
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = r3;
|
||||
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = r5;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = r6;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = r7;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = r0;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = r1;
|
||||
static constexpr Register OsrFrameReg = r3;
|
||||
static constexpr Register ArgumentsRectifierReg = r8;
|
||||
static constexpr Register CallTempReg0 = r5;
|
||||
static constexpr Register CallTempReg1 = r6;
|
||||
static constexpr Register CallTempReg2 = r7;
|
||||
static constexpr Register CallTempReg3 = r8;
|
||||
static constexpr Register CallTempReg4 = r0;
|
||||
static constexpr Register CallTempReg5 = r1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = r0;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = r1;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r2;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r3;
|
||||
static MOZ_CONSTEXPR_VAR Register GlobalReg = r10;
|
||||
static MOZ_CONSTEXPR_VAR Register HeapReg = r11;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { r5, r6, r7, r8 };
|
||||
static constexpr Register IntArgReg0 = r0;
|
||||
static constexpr Register IntArgReg1 = r1;
|
||||
static constexpr Register IntArgReg2 = r2;
|
||||
static constexpr Register IntArgReg3 = r3;
|
||||
static constexpr Register GlobalReg = r10;
|
||||
static constexpr Register HeapReg = r11;
|
||||
static constexpr Register CallTempNonArgRegs[] = { r5, r6, r7, r8 };
|
||||
static const uint32_t NumCallTempNonArgRegs =
|
||||
mozilla::ArrayLength(CallTempNonArgRegs);
|
||||
|
||||
|
@ -103,35 +103,35 @@ class ABIArgGenerator
|
|||
uint32_t stackBytesConsumedSoFar() const { return stackOffset_; }
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = r4;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = r5;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = r4;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = r5;
|
||||
static constexpr Register ABINonArgReg0 = r4;
|
||||
static constexpr Register ABINonArgReg1 = r5;
|
||||
static constexpr Register ABINonArgReturnReg0 = r4;
|
||||
static constexpr Register ABINonArgReturnReg1 = r5;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = r1;
|
||||
static constexpr Register PreBarrierReg = r1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register InvalidReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg;
|
||||
static constexpr Register InvalidReg = { Registers::invalid_reg };
|
||||
static constexpr FloatRegister InvalidFloatReg;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = r3;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = r2;
|
||||
static MOZ_CONSTEXPR_VAR Register StackPointer = sp;
|
||||
static MOZ_CONSTEXPR_VAR Register FramePointer = InvalidReg;
|
||||
static MOZ_CONSTEXPR_VAR Register ReturnReg = r0;
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = { FloatRegisters::d0, VFPRegister::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = { FloatRegisters::d0, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnSimd128Reg = InvalidFloatReg;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = { FloatRegisters::d30, VFPRegister::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = { FloatRegisters::d15, VFPRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = InvalidFloatReg;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchUIntReg = { FloatRegisters::d15, VFPRegister::UInt };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchIntReg = { FloatRegisters::d15, VFPRegister::Int };
|
||||
static constexpr Register JSReturnReg_Type = r3;
|
||||
static constexpr Register JSReturnReg_Data = r2;
|
||||
static constexpr Register StackPointer = sp;
|
||||
static constexpr Register FramePointer = InvalidReg;
|
||||
static constexpr Register ReturnReg = r0;
|
||||
static constexpr Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static constexpr FloatRegister ReturnFloat32Reg = { FloatRegisters::d0, VFPRegister::Single };
|
||||
static constexpr FloatRegister ReturnDoubleReg = { FloatRegisters::d0, VFPRegister::Double};
|
||||
static constexpr FloatRegister ReturnSimd128Reg = InvalidFloatReg;
|
||||
static constexpr FloatRegister ScratchFloat32Reg = { FloatRegisters::d30, VFPRegister::Single };
|
||||
static constexpr FloatRegister ScratchDoubleReg = { FloatRegisters::d15, VFPRegister::Double };
|
||||
static constexpr FloatRegister ScratchSimd128Reg = InvalidFloatReg;
|
||||
static constexpr FloatRegister ScratchUIntReg = { FloatRegisters::d15, VFPRegister::UInt };
|
||||
static constexpr FloatRegister ScratchIntReg = { FloatRegisters::d15, VFPRegister::Int };
|
||||
|
||||
struct ScratchFloat32Scope : public AutoFloatRegisterScope
|
||||
{
|
||||
|
@ -152,56 +152,56 @@ struct ScratchDoubleScope : public AutoFloatRegisterScope
|
|||
static const int32_t AsmJSGlobalRegBias = 1024;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Enable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegCallee = r4;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE0 = r0;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE1 = r1;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE2 = r2;
|
||||
static constexpr Register AsmJSIonExitRegCallee = r4;
|
||||
static constexpr Register AsmJSIonExitRegE0 = r0;
|
||||
static constexpr Register AsmJSIonExitRegE1 = r1;
|
||||
static constexpr Register AsmJSIonExitRegE2 = r2;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
// None of these may be the second scratch register (lr).
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = r2;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = r3;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD0 = r0;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD1 = r1;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD2 = r4;
|
||||
static constexpr Register AsmJSIonExitRegReturnData = r2;
|
||||
static constexpr Register AsmJSIonExitRegReturnType = r3;
|
||||
static constexpr Register AsmJSIonExitRegD0 = r0;
|
||||
static constexpr Register AsmJSIonExitRegD1 = r1;
|
||||
static constexpr Register AsmJSIonExitRegD2 = r4;
|
||||
|
||||
// Registerd used in RegExpMatcher instruction (do not use JSReturnOperand).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
|
||||
// Registerd used in RegExpTester instruction (do not use ReturnReg).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpTesterStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d0 = {FloatRegisters::d0, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d1 = {FloatRegisters::d1, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d2 = {FloatRegisters::d2, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d3 = {FloatRegisters::d3, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d4 = {FloatRegisters::d4, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d5 = {FloatRegisters::d5, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d6 = {FloatRegisters::d6, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d7 = {FloatRegisters::d7, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d8 = {FloatRegisters::d8, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d9 = {FloatRegisters::d9, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d10 = {FloatRegisters::d10, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d11 = {FloatRegisters::d11, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d12 = {FloatRegisters::d12, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d13 = {FloatRegisters::d13, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d14 = {FloatRegisters::d14, VFPRegister::Double};
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister d15 = {FloatRegisters::d15, VFPRegister::Double};
|
||||
static constexpr FloatRegister d0 = {FloatRegisters::d0, VFPRegister::Double};
|
||||
static constexpr FloatRegister d1 = {FloatRegisters::d1, VFPRegister::Double};
|
||||
static constexpr FloatRegister d2 = {FloatRegisters::d2, VFPRegister::Double};
|
||||
static constexpr FloatRegister d3 = {FloatRegisters::d3, VFPRegister::Double};
|
||||
static constexpr FloatRegister d4 = {FloatRegisters::d4, VFPRegister::Double};
|
||||
static constexpr FloatRegister d5 = {FloatRegisters::d5, VFPRegister::Double};
|
||||
static constexpr FloatRegister d6 = {FloatRegisters::d6, VFPRegister::Double};
|
||||
static constexpr FloatRegister d7 = {FloatRegisters::d7, VFPRegister::Double};
|
||||
static constexpr FloatRegister d8 = {FloatRegisters::d8, VFPRegister::Double};
|
||||
static constexpr FloatRegister d9 = {FloatRegisters::d9, VFPRegister::Double};
|
||||
static constexpr FloatRegister d10 = {FloatRegisters::d10, VFPRegister::Double};
|
||||
static constexpr FloatRegister d11 = {FloatRegisters::d11, VFPRegister::Double};
|
||||
static constexpr FloatRegister d12 = {FloatRegisters::d12, VFPRegister::Double};
|
||||
static constexpr FloatRegister d13 = {FloatRegisters::d13, VFPRegister::Double};
|
||||
static constexpr FloatRegister d14 = {FloatRegisters::d14, VFPRegister::Double};
|
||||
static constexpr FloatRegister d15 = {FloatRegisters::d15, VFPRegister::Double};
|
||||
|
||||
|
||||
// For maximal awesomeness, 8 should be sufficent. ldrd/strd (dual-register
|
||||
// load/store) operate in a single cycle when the address they are dealing with
|
||||
// is 8 byte aligned. Also, the ARM abi wants the stack to be 8 byte aligned at
|
||||
// function boundaries. I'm trying to make sure this is always true.
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 8;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t CodeAlignment = 8;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 8;
|
||||
static constexpr uint32_t ABIStackAlignment = 8;
|
||||
static constexpr uint32_t CodeAlignment = 8;
|
||||
static constexpr uint32_t JitStackAlignment = 8;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >= 1,
|
||||
"Stack alignment should be a non-zero multiple of sizeof(Value)");
|
||||
|
||||
|
@ -209,8 +209,8 @@ static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >
|
|||
// this architecture or not. Rather than a method in the LIRGenerator, it is
|
||||
// here such that it is accessible from the entire codebase. Once full support
|
||||
// for SIMD is reached on all tier-1 platforms, this constant can be deleted.
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsSimd = false;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t SimdMemoryAlignment = 8;
|
||||
static constexpr bool SupportsSimd = false;
|
||||
static constexpr uint32_t SimdMemoryAlignment = 8;
|
||||
|
||||
static_assert(CodeAlignment % SimdMemoryAlignment == 0,
|
||||
"Code alignment should be larger than any of the alignments which are used for "
|
||||
|
@ -224,12 +224,12 @@ static_assert(JitStackAlignment % SimdMemoryAlignment == 0,
|
|||
static const uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
static const Scale ScalePointer = TimesFour;
|
||||
|
||||
|
@ -257,7 +257,7 @@ uint32_t VM(VFPRegister vr);
|
|||
|
||||
// For being passed into the generic vfp instruction generator when there is an
|
||||
// instruction that only takes two registers.
|
||||
static MOZ_CONSTEXPR_VAR VFPRegister NoVFPRegister(VFPRegister::Double, 0, false, true);
|
||||
static constexpr VFPRegister NoVFPRegister(VFPRegister::Double, 0, false, true);
|
||||
|
||||
struct ImmTag : public Imm32
|
||||
{
|
||||
|
@ -546,8 +546,8 @@ struct Imm8VFPImmData
|
|||
// have a constructor, the initialization for DoubleEncoder's internal
|
||||
// table (see below) would require a rather large static constructor on
|
||||
// some of our supported compilers. The known solution to this is to mark
|
||||
// the constructor MOZ_CONSTEXPR, but, again, some of our supported
|
||||
// compilers don't support MOZ_CONSTEXPR! So we are reduced to public
|
||||
// the constructor constexpr, but, again, some of our supported
|
||||
// compilers don't support constexpr! So we are reduced to public
|
||||
// members and eschewing a constructor in hopes that the initialization
|
||||
// of DoubleEncoder's table is correct.
|
||||
uint32_t imm4L : 4;
|
||||
|
|
|
@ -17,26 +17,26 @@ namespace jit {
|
|||
|
||||
// r13 = stack-pointer
|
||||
// r11 = frame-pointer
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = r11;
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = sp;
|
||||
static constexpr Register BaselineFrameReg = r11;
|
||||
static constexpr Register BaselineStackReg = sp;
|
||||
|
||||
// ValueOperands R0, R1, and R2.
|
||||
// R0 == JSReturnReg, and R2 uses registers not preserved across calls. R1 value
|
||||
// should be preserved across calls.
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0(r3, r2);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1(r5, r4);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2(r1, r0);
|
||||
static constexpr ValueOperand R0(r3, r2);
|
||||
static constexpr ValueOperand R1(r5, r4);
|
||||
static constexpr ValueOperand R2(r1, r0);
|
||||
|
||||
// ICTailCallReg and ICStubReg
|
||||
// These use registers that are not preserved across calls.
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = r14;
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = r9;
|
||||
static constexpr Register ICTailCallReg = r14;
|
||||
static constexpr Register ICStubReg = r9;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = InvalidReg;
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = InvalidReg;
|
||||
static constexpr Register ExtractTemp0 = InvalidReg;
|
||||
static constexpr Register ExtractTemp1 = InvalidReg;
|
||||
|
||||
// Register used internally by MacroAssemblerARM.
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = r6;
|
||||
static constexpr Register BaselineSecondScratchReg = r6;
|
||||
|
||||
// R7 - R9 are generally available for use within stubcode.
|
||||
|
||||
|
@ -45,8 +45,8 @@ static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = r6;
|
|||
// address for calls there.
|
||||
|
||||
// FloatReg0 must be equal to ReturnFloatReg.
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = d0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = d1;
|
||||
static constexpr FloatRegister FloatReg0 = d0;
|
||||
static constexpr FloatRegister FloatReg1 = d1;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -397,7 +397,7 @@ struct FloatRegister
|
|||
bool equiv(FloatRegister other) const {
|
||||
return k_ == other.k_;
|
||||
}
|
||||
MOZ_CONSTEXPR uint32_t size() const {
|
||||
constexpr uint32_t size() const {
|
||||
return k_ == FloatRegisters::Double ? sizeof(double) : sizeof(float);
|
||||
}
|
||||
uint32_t numAlignedAliased() {
|
||||
|
|
|
@ -134,14 +134,14 @@ static constexpr Register AsmJSIonExitRegD1 = r1;
|
|||
static constexpr Register AsmJSIonExitRegD2 = r4;
|
||||
|
||||
// Registerd used in RegExpMatcher instruction (do not use JSReturnOperand).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
|
||||
// Registerd used in RegExpTester instruction (do not use ReturnReg).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpTesterStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
|
||||
static constexpr Register JSReturnReg_Type = r3;
|
||||
static constexpr Register JSReturnReg_Data = r2;
|
||||
|
@ -175,12 +175,12 @@ static const uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
|||
static const int32_t AsmJSGlobalRegBias = 1024;
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
class Assembler : public vixl::Assembler
|
||||
{
|
||||
|
@ -457,15 +457,15 @@ class ABIArgGenerator
|
|||
ABIArg current_;
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = r9;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = r9;
|
||||
static constexpr Register ABINonArgReg0 = r8;
|
||||
static constexpr Register ABINonArgReg1 = r9;
|
||||
static constexpr Register ABINonArgReturnReg0 = r8;
|
||||
static constexpr Register ABINonArgReturnReg1 = r9;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static inline bool
|
||||
GetIntArgReg(uint32_t usedIntArgs, uint32_t usedFloatArgs, Register* out)
|
||||
|
|
|
@ -22,45 +22,45 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register zero = { Registers::zero };
|
||||
static MOZ_CONSTEXPR_VAR Register at = { Registers::at };
|
||||
static MOZ_CONSTEXPR_VAR Register v0 = { Registers::v0 };
|
||||
static MOZ_CONSTEXPR_VAR Register v1 = { Registers::v1 };
|
||||
static MOZ_CONSTEXPR_VAR Register a0 = { Registers::a0 };
|
||||
static MOZ_CONSTEXPR_VAR Register a1 = { Registers::a1 };
|
||||
static MOZ_CONSTEXPR_VAR Register a2 = { Registers::a2 };
|
||||
static MOZ_CONSTEXPR_VAR Register a3 = { Registers::a3 };
|
||||
static MOZ_CONSTEXPR_VAR Register a4 = { Registers::ta0 };
|
||||
static MOZ_CONSTEXPR_VAR Register a5 = { Registers::ta1 };
|
||||
static MOZ_CONSTEXPR_VAR Register a6 = { Registers::ta2 };
|
||||
static MOZ_CONSTEXPR_VAR Register a7 = { Registers::ta3 };
|
||||
static MOZ_CONSTEXPR_VAR Register t0 = { Registers::t0 };
|
||||
static MOZ_CONSTEXPR_VAR Register t1 = { Registers::t1 };
|
||||
static MOZ_CONSTEXPR_VAR Register t2 = { Registers::t2 };
|
||||
static MOZ_CONSTEXPR_VAR Register t3 = { Registers::t3 };
|
||||
static MOZ_CONSTEXPR_VAR Register t4 = { Registers::ta0 };
|
||||
static MOZ_CONSTEXPR_VAR Register t5 = { Registers::ta1 };
|
||||
static MOZ_CONSTEXPR_VAR Register t6 = { Registers::ta2 };
|
||||
static MOZ_CONSTEXPR_VAR Register t7 = { Registers::ta3 };
|
||||
static MOZ_CONSTEXPR_VAR Register s0 = { Registers::s0 };
|
||||
static MOZ_CONSTEXPR_VAR Register s1 = { Registers::s1 };
|
||||
static MOZ_CONSTEXPR_VAR Register s2 = { Registers::s2 };
|
||||
static MOZ_CONSTEXPR_VAR Register s3 = { Registers::s3 };
|
||||
static MOZ_CONSTEXPR_VAR Register s4 = { Registers::s4 };
|
||||
static MOZ_CONSTEXPR_VAR Register s5 = { Registers::s5 };
|
||||
static MOZ_CONSTEXPR_VAR Register s6 = { Registers::s6 };
|
||||
static MOZ_CONSTEXPR_VAR Register s7 = { Registers::s7 };
|
||||
static MOZ_CONSTEXPR_VAR Register t8 = { Registers::t8 };
|
||||
static MOZ_CONSTEXPR_VAR Register t9 = { Registers::t9 };
|
||||
static MOZ_CONSTEXPR_VAR Register k0 = { Registers::k0 };
|
||||
static MOZ_CONSTEXPR_VAR Register k1 = { Registers::k1 };
|
||||
static MOZ_CONSTEXPR_VAR Register gp = { Registers::gp };
|
||||
static MOZ_CONSTEXPR_VAR Register sp = { Registers::sp };
|
||||
static MOZ_CONSTEXPR_VAR Register fp = { Registers::fp };
|
||||
static MOZ_CONSTEXPR_VAR Register ra = { Registers::ra };
|
||||
static constexpr Register zero = { Registers::zero };
|
||||
static constexpr Register at = { Registers::at };
|
||||
static constexpr Register v0 = { Registers::v0 };
|
||||
static constexpr Register v1 = { Registers::v1 };
|
||||
static constexpr Register a0 = { Registers::a0 };
|
||||
static constexpr Register a1 = { Registers::a1 };
|
||||
static constexpr Register a2 = { Registers::a2 };
|
||||
static constexpr Register a3 = { Registers::a3 };
|
||||
static constexpr Register a4 = { Registers::ta0 };
|
||||
static constexpr Register a5 = { Registers::ta1 };
|
||||
static constexpr Register a6 = { Registers::ta2 };
|
||||
static constexpr Register a7 = { Registers::ta3 };
|
||||
static constexpr Register t0 = { Registers::t0 };
|
||||
static constexpr Register t1 = { Registers::t1 };
|
||||
static constexpr Register t2 = { Registers::t2 };
|
||||
static constexpr Register t3 = { Registers::t3 };
|
||||
static constexpr Register t4 = { Registers::ta0 };
|
||||
static constexpr Register t5 = { Registers::ta1 };
|
||||
static constexpr Register t6 = { Registers::ta2 };
|
||||
static constexpr Register t7 = { Registers::ta3 };
|
||||
static constexpr Register s0 = { Registers::s0 };
|
||||
static constexpr Register s1 = { Registers::s1 };
|
||||
static constexpr Register s2 = { Registers::s2 };
|
||||
static constexpr Register s3 = { Registers::s3 };
|
||||
static constexpr Register s4 = { Registers::s4 };
|
||||
static constexpr Register s5 = { Registers::s5 };
|
||||
static constexpr Register s6 = { Registers::s6 };
|
||||
static constexpr Register s7 = { Registers::s7 };
|
||||
static constexpr Register t8 = { Registers::t8 };
|
||||
static constexpr Register t9 = { Registers::t9 };
|
||||
static constexpr Register k0 = { Registers::k0 };
|
||||
static constexpr Register k1 = { Registers::k1 };
|
||||
static constexpr Register gp = { Registers::gp };
|
||||
static constexpr Register sp = { Registers::sp };
|
||||
static constexpr Register fp = { Registers::fp };
|
||||
static constexpr Register ra = { Registers::ra };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ScratchRegister = at;
|
||||
static MOZ_CONSTEXPR_VAR Register SecondScratchReg = t8;
|
||||
static constexpr Register ScratchRegister = at;
|
||||
static constexpr Register SecondScratchReg = t8;
|
||||
|
||||
// Helper classes for ScratchRegister usage. Asserts that only one piece
|
||||
// of code thinks it has exclusive ownership of each scratch register.
|
||||
|
@ -78,34 +78,34 @@ struct SecondScratchRegisterScope : public AutoRegisterScope
|
|||
};
|
||||
|
||||
// Use arg reg from EnterJIT function as OsrFrameReg.
|
||||
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = a3;
|
||||
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = s3;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = t1;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = t2;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = t3;
|
||||
static constexpr Register OsrFrameReg = a3;
|
||||
static constexpr Register ArgumentsRectifierReg = s3;
|
||||
static constexpr Register CallTempReg0 = t0;
|
||||
static constexpr Register CallTempReg1 = t1;
|
||||
static constexpr Register CallTempReg2 = t2;
|
||||
static constexpr Register CallTempReg3 = t3;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = a0;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = a1;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = a2;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = a3;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg4 = a4;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg5 = a5;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg6 = a6;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg7 = a7;
|
||||
static MOZ_CONSTEXPR_VAR Register GlobalReg = s6; // used by Odin
|
||||
static MOZ_CONSTEXPR_VAR Register HeapReg = s7; // used by Odin
|
||||
static constexpr Register IntArgReg0 = a0;
|
||||
static constexpr Register IntArgReg1 = a1;
|
||||
static constexpr Register IntArgReg2 = a2;
|
||||
static constexpr Register IntArgReg3 = a3;
|
||||
static constexpr Register IntArgReg4 = a4;
|
||||
static constexpr Register IntArgReg5 = a5;
|
||||
static constexpr Register IntArgReg6 = a6;
|
||||
static constexpr Register IntArgReg7 = a7;
|
||||
static constexpr Register GlobalReg = s6; // used by Odin
|
||||
static constexpr Register HeapReg = s7; // used by Odin
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = a1;
|
||||
static constexpr Register PreBarrierReg = a1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register InvalidReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg;
|
||||
static constexpr Register InvalidReg = { Registers::invalid_reg };
|
||||
static constexpr FloatRegister InvalidFloatReg;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register StackPointer = sp;
|
||||
static MOZ_CONSTEXPR_VAR Register FramePointer = InvalidReg;
|
||||
static MOZ_CONSTEXPR_VAR Register ReturnReg = v0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnSimd128Reg = InvalidFloatReg;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = InvalidFloatReg;
|
||||
static constexpr Register StackPointer = sp;
|
||||
static constexpr Register FramePointer = InvalidReg;
|
||||
static constexpr Register ReturnReg = v0;
|
||||
static constexpr FloatRegister ReturnSimd128Reg = InvalidFloatReg;
|
||||
static constexpr FloatRegister ScratchSimd128Reg = InvalidFloatReg;
|
||||
|
||||
// A bias applied to the GlobalReg to allow the use of instructions with small
|
||||
// negative immediate offsets which doubles the range of global data that can be
|
||||
|
@ -113,34 +113,34 @@ static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = InvalidFloatReg;
|
|||
static const int32_t AsmJSGlobalRegBias = 32768;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Enable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegCallee = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE0 = a0;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE1 = a1;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE2 = a2;
|
||||
static constexpr Register AsmJSIonExitRegCallee = t0;
|
||||
static constexpr Register AsmJSIonExitRegE0 = a0;
|
||||
static constexpr Register AsmJSIonExitRegE1 = a1;
|
||||
static constexpr Register AsmJSIonExitRegE2 = a2;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
// None of these may be the second scratch register (t8).
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD0 = a0;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD1 = a1;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD2 = t0;
|
||||
static constexpr Register AsmJSIonExitRegD0 = a0;
|
||||
static constexpr Register AsmJSIonExitRegD1 = a1;
|
||||
static constexpr Register AsmJSIonExitRegD2 = t0;
|
||||
|
||||
// Registerd used in RegExpMatcher instruction (do not use JSReturnOperand).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
|
||||
// Registerd used in RegExpTester instruction (do not use ReturnReg).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpTesterStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpTesterLastIndexReg = CallTempReg2;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t CodeAlignment = 4;
|
||||
static constexpr uint32_t CodeAlignment = 4;
|
||||
|
||||
// This boolean indicates whether we support SIMD instructions flavoured for
|
||||
// this architecture or not. Rather than a method in the LIRGenerator, it is
|
||||
// here such that it is accessible from the entire codebase. Once full support
|
||||
// for SIMD is reached on all tier-1 platforms, this constant can be deleted.
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsSimd = false;
|
||||
static constexpr bool SupportsSimd = false;
|
||||
|
||||
// MIPS instruction types
|
||||
// +---------------------------------------------------------------+
|
||||
|
|
|
@ -138,10 +138,10 @@ class FloatRegister : public FloatRegisterMIPSShared
|
|||
RegType kind_ : 1;
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR FloatRegister(uint32_t code, RegType kind = Double)
|
||||
constexpr FloatRegister(uint32_t code, RegType kind = Double)
|
||||
: code_ (Code(code)), kind_(kind)
|
||||
{ }
|
||||
MOZ_CONSTEXPR FloatRegister()
|
||||
constexpr FloatRegister()
|
||||
: code_(Code(FloatRegisters::invalid_freg)), kind_(Double)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = t4;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = t5;
|
||||
static constexpr Register CallTempReg4 = t4;
|
||||
static constexpr Register CallTempReg5 = t5;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { t0, t1, t2, t3, t4 };
|
||||
static constexpr Register CallTempNonArgRegs[] = { t0, t1, t2, t3, t4 };
|
||||
static const uint32_t NumCallTempNonArgRegs = mozilla::ArrayLength(CallTempNonArgRegs);
|
||||
|
||||
class ABIArgGenerator
|
||||
|
@ -46,72 +46,72 @@ class ABIArgGenerator
|
|||
}
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = t1;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = t1;
|
||||
static constexpr Register ABINonArgReg0 = t0;
|
||||
static constexpr Register ABINonArgReg1 = t1;
|
||||
static constexpr Register ABINonArgReturnReg0 = t0;
|
||||
static constexpr Register ABINonArgReturnReg1 = t1;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = a3;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = a2;
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = { FloatRegisters::f0, FloatRegister::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = { FloatRegisters::f0, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = { FloatRegisters::f18, FloatRegister::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = { FloatRegisters::f18, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister SecondScratchFloat32Reg = { FloatRegisters::f16, FloatRegister::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister SecondScratchDoubleReg = { FloatRegisters::f16, FloatRegister::Double };
|
||||
static constexpr Register JSReturnReg_Type = a3;
|
||||
static constexpr Register JSReturnReg_Data = a2;
|
||||
static constexpr Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static constexpr FloatRegister ReturnFloat32Reg = { FloatRegisters::f0, FloatRegister::Single };
|
||||
static constexpr FloatRegister ReturnDoubleReg = { FloatRegisters::f0, FloatRegister::Double };
|
||||
static constexpr FloatRegister ScratchFloat32Reg = { FloatRegisters::f18, FloatRegister::Single };
|
||||
static constexpr FloatRegister ScratchDoubleReg = { FloatRegisters::f18, FloatRegister::Double };
|
||||
static constexpr FloatRegister SecondScratchFloat32Reg = { FloatRegisters::f16, FloatRegister::Single };
|
||||
static constexpr FloatRegister SecondScratchDoubleReg = { FloatRegisters::f16, FloatRegister::Double };
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
// None of these may be the second scratch register (t8).
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = JSReturnReg_Data;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = JSReturnReg_Type;
|
||||
static constexpr Register AsmJSIonExitRegReturnData = JSReturnReg_Data;
|
||||
static constexpr Register AsmJSIonExitRegReturnType = JSReturnReg_Type;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f0 = { FloatRegisters::f0, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f2 = { FloatRegisters::f2, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f4 = { FloatRegisters::f4, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f6 = { FloatRegisters::f6, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f8 = { FloatRegisters::f8, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f10 = { FloatRegisters::f10, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f12 = { FloatRegisters::f12, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f14 = { FloatRegisters::f14, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f16 = { FloatRegisters::f16, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f18 = { FloatRegisters::f18, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f20 = { FloatRegisters::f20, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f22 = { FloatRegisters::f22, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f24 = { FloatRegisters::f24, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f26 = { FloatRegisters::f26, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f28 = { FloatRegisters::f28, FloatRegister::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f30 = { FloatRegisters::f30, FloatRegister::Double };
|
||||
static constexpr FloatRegister f0 = { FloatRegisters::f0, FloatRegister::Double };
|
||||
static constexpr FloatRegister f2 = { FloatRegisters::f2, FloatRegister::Double };
|
||||
static constexpr FloatRegister f4 = { FloatRegisters::f4, FloatRegister::Double };
|
||||
static constexpr FloatRegister f6 = { FloatRegisters::f6, FloatRegister::Double };
|
||||
static constexpr FloatRegister f8 = { FloatRegisters::f8, FloatRegister::Double };
|
||||
static constexpr FloatRegister f10 = { FloatRegisters::f10, FloatRegister::Double };
|
||||
static constexpr FloatRegister f12 = { FloatRegisters::f12, FloatRegister::Double };
|
||||
static constexpr FloatRegister f14 = { FloatRegisters::f14, FloatRegister::Double };
|
||||
static constexpr FloatRegister f16 = { FloatRegisters::f16, FloatRegister::Double };
|
||||
static constexpr FloatRegister f18 = { FloatRegisters::f18, FloatRegister::Double };
|
||||
static constexpr FloatRegister f20 = { FloatRegisters::f20, FloatRegister::Double };
|
||||
static constexpr FloatRegister f22 = { FloatRegisters::f22, FloatRegister::Double };
|
||||
static constexpr FloatRegister f24 = { FloatRegisters::f24, FloatRegister::Double };
|
||||
static constexpr FloatRegister f26 = { FloatRegisters::f26, FloatRegister::Double };
|
||||
static constexpr FloatRegister f28 = { FloatRegisters::f28, FloatRegister::Double };
|
||||
static constexpr FloatRegister f30 = { FloatRegisters::f30, FloatRegister::Double };
|
||||
|
||||
// MIPS CPUs can only load multibyte data that is "naturally"
|
||||
// four-byte-aligned, sp register should be eight-byte-aligned.
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 8;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 8;
|
||||
static constexpr uint32_t ABIStackAlignment = 8;
|
||||
static constexpr uint32_t JitStackAlignment = 8;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >= 1,
|
||||
"Stack alignment should be a non-zero multiple of sizeof(Value)");
|
||||
|
||||
// TODO this is just a filler to prevent a build failure. The MIPS SIMD
|
||||
// alignment requirements still need to be explored.
|
||||
// TODO Copy the static_asserts from x64/x86 assembler files.
|
||||
static MOZ_CONSTEXPR_VAR uint32_t SimdMemoryAlignment = 8;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
||||
static constexpr uint32_t SimdMemoryAlignment = 8;
|
||||
static constexpr uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Scale ScalePointer = TimesFour;
|
||||
static constexpr Scale ScalePointer = TimesFour;
|
||||
|
||||
class Assembler : public AssemblerMIPSShared
|
||||
{
|
||||
|
|
|
@ -12,31 +12,31 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = s5;
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = sp;
|
||||
static constexpr Register BaselineFrameReg = s5;
|
||||
static constexpr Register BaselineStackReg = sp;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0(a3, a2);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1(s7, s6);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2(t7, t6);
|
||||
static constexpr ValueOperand R0(a3, a2);
|
||||
static constexpr ValueOperand R1(s7, s6);
|
||||
static constexpr ValueOperand R2(t7, t6);
|
||||
|
||||
// ICTailCallReg and ICStubReg
|
||||
// These use registers that are not preserved across calls.
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = ra;
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = t5;
|
||||
static constexpr Register ICTailCallReg = ra;
|
||||
static constexpr Register ICStubReg = t5;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = InvalidReg;
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = InvalidReg;
|
||||
static constexpr Register ExtractTemp0 = InvalidReg;
|
||||
static constexpr Register ExtractTemp1 = InvalidReg;
|
||||
|
||||
// Register used internally by MacroAssemblerMIPS.
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = SecondScratchReg;
|
||||
static constexpr Register BaselineSecondScratchReg = SecondScratchReg;
|
||||
|
||||
// Note that ICTailCallReg is actually just the link register.
|
||||
// In MIPS code emission, we do not clobber ICTailCallReg since we keep
|
||||
// the return address for calls there.
|
||||
|
||||
// FloatReg0 must be equal to ReturnFloatReg.
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = f0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = f2;
|
||||
static constexpr FloatRegister FloatReg0 = f0;
|
||||
static constexpr FloatRegister FloatReg1 = f2;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -106,10 +106,10 @@ class FloatRegister : public FloatRegisterMIPSShared
|
|||
ContentType kind_ : 3;
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR FloatRegister(uint32_t r, ContentType kind = Codes::Double)
|
||||
constexpr FloatRegister(uint32_t r, ContentType kind = Codes::Double)
|
||||
: reg_(Encoding(r)), kind_(kind)
|
||||
{ }
|
||||
MOZ_CONSTEXPR FloatRegister()
|
||||
constexpr FloatRegister()
|
||||
: reg_(Encoding(FloatRegisters::invalid_freg)), kind_(Codes::Double)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = a4;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = a5;
|
||||
static constexpr Register CallTempReg4 = a4;
|
||||
static constexpr Register CallTempReg5 = a5;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { t0, t1, t2, t3 };
|
||||
static constexpr Register CallTempNonArgRegs[] = { t0, t1, t2, t3 };
|
||||
static const uint32_t NumCallTempNonArgRegs = mozilla::ArrayLength(CallTempNonArgRegs);
|
||||
|
||||
class ABIArgGenerator
|
||||
|
@ -39,90 +39,90 @@ class ABIArgGenerator
|
|||
}
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = t1;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = t0;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = t1;
|
||||
static constexpr Register ABINonArgReg0 = t0;
|
||||
static constexpr Register ABINonArgReg1 = t1;
|
||||
static constexpr Register ABINonArgReturnReg0 = t0;
|
||||
static constexpr Register ABINonArgReturnReg1 = t1;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg = v1;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = JSReturnReg;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = JSReturnReg;
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(ReturnReg);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = { FloatRegisters::f0, FloatRegisters::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = { FloatRegisters::f0, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = { FloatRegisters::f23, FloatRegisters::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = { FloatRegisters::f23, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister SecondScratchFloat32Reg = { FloatRegisters::f21, FloatRegisters::Single };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister SecondScratchDoubleReg = { FloatRegisters::f21, FloatRegisters::Double };
|
||||
static constexpr Register JSReturnReg = v1;
|
||||
static constexpr Register JSReturnReg_Type = JSReturnReg;
|
||||
static constexpr Register JSReturnReg_Data = JSReturnReg;
|
||||
static constexpr Register64 ReturnReg64(ReturnReg);
|
||||
static constexpr FloatRegister ReturnFloat32Reg = { FloatRegisters::f0, FloatRegisters::Single };
|
||||
static constexpr FloatRegister ReturnDoubleReg = { FloatRegisters::f0, FloatRegisters::Double };
|
||||
static constexpr FloatRegister ScratchFloat32Reg = { FloatRegisters::f23, FloatRegisters::Single };
|
||||
static constexpr FloatRegister ScratchDoubleReg = { FloatRegisters::f23, FloatRegisters::Double };
|
||||
static constexpr FloatRegister SecondScratchFloat32Reg = { FloatRegisters::f21, FloatRegisters::Single };
|
||||
static constexpr FloatRegister SecondScratchDoubleReg = { FloatRegisters::f21, FloatRegisters::Double };
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
// None of these may be the second scratch register (t8).
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = JSReturnReg_Data;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = JSReturnReg_Type;
|
||||
static constexpr Register AsmJSIonExitRegReturnData = JSReturnReg_Data;
|
||||
static constexpr Register AsmJSIonExitRegReturnType = JSReturnReg_Type;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f0 = { FloatRegisters::f0, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f1 = { FloatRegisters::f1, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f2 = { FloatRegisters::f2, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f3 = { FloatRegisters::f3, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f4 = { FloatRegisters::f4, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f5 = { FloatRegisters::f5, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f6 = { FloatRegisters::f6, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f7 = { FloatRegisters::f7, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f8 = { FloatRegisters::f8, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f9 = { FloatRegisters::f9, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f10 = { FloatRegisters::f10, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f11 = { FloatRegisters::f11, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f12 = { FloatRegisters::f12, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f13 = { FloatRegisters::f13, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f14 = { FloatRegisters::f14, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f15 = { FloatRegisters::f15, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f16 = { FloatRegisters::f16, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f17 = { FloatRegisters::f17, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f18 = { FloatRegisters::f18, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f19 = { FloatRegisters::f19, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f20 = { FloatRegisters::f20, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f21 = { FloatRegisters::f21, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f22 = { FloatRegisters::f22, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f23 = { FloatRegisters::f23, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f24 = { FloatRegisters::f24, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f25 = { FloatRegisters::f25, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f26 = { FloatRegisters::f26, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f27 = { FloatRegisters::f27, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f28 = { FloatRegisters::f28, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f29 = { FloatRegisters::f29, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f30 = { FloatRegisters::f30, FloatRegisters::Double };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister f31 = { FloatRegisters::f31, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f0 = { FloatRegisters::f0, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f1 = { FloatRegisters::f1, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f2 = { FloatRegisters::f2, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f3 = { FloatRegisters::f3, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f4 = { FloatRegisters::f4, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f5 = { FloatRegisters::f5, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f6 = { FloatRegisters::f6, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f7 = { FloatRegisters::f7, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f8 = { FloatRegisters::f8, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f9 = { FloatRegisters::f9, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f10 = { FloatRegisters::f10, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f11 = { FloatRegisters::f11, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f12 = { FloatRegisters::f12, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f13 = { FloatRegisters::f13, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f14 = { FloatRegisters::f14, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f15 = { FloatRegisters::f15, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f16 = { FloatRegisters::f16, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f17 = { FloatRegisters::f17, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f18 = { FloatRegisters::f18, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f19 = { FloatRegisters::f19, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f20 = { FloatRegisters::f20, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f21 = { FloatRegisters::f21, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f22 = { FloatRegisters::f22, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f23 = { FloatRegisters::f23, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f24 = { FloatRegisters::f24, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f25 = { FloatRegisters::f25, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f26 = { FloatRegisters::f26, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f27 = { FloatRegisters::f27, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f28 = { FloatRegisters::f28, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f29 = { FloatRegisters::f29, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f30 = { FloatRegisters::f30, FloatRegisters::Double };
|
||||
static constexpr FloatRegister f31 = { FloatRegisters::f31, FloatRegisters::Double };
|
||||
|
||||
// MIPS64 CPUs can only load multibyte data that is "naturally"
|
||||
// eight-byte-aligned, sp register should be sixteen-byte-aligned.
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 16;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 16;
|
||||
static constexpr uint32_t ABIStackAlignment = 16;
|
||||
static constexpr uint32_t JitStackAlignment = 16;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >= 1,
|
||||
"Stack alignment should be a non-zero multiple of sizeof(Value)");
|
||||
|
||||
// TODO this is just a filler to prevent a build failure. The MIPS SIMD
|
||||
// alignment requirements still need to be explored.
|
||||
// TODO Copy the static_asserts from x64/x86 assembler files.
|
||||
static MOZ_CONSTEXPR_VAR uint32_t SimdMemoryAlignment = 16;
|
||||
static constexpr uint32_t SimdMemoryAlignment = 16;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
||||
static constexpr uint32_t AsmJSStackAlignment = SimdMemoryAlignment;
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Scale ScalePointer = TimesEight;
|
||||
static constexpr Scale ScalePointer = TimesEight;
|
||||
|
||||
class Assembler : public AssemblerMIPSShared
|
||||
{
|
||||
|
|
|
@ -12,34 +12,34 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = s5;
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = sp;
|
||||
static constexpr Register BaselineFrameReg = s5;
|
||||
static constexpr Register BaselineStackReg = sp;
|
||||
|
||||
// ValueOperands R0, R1, and R2.
|
||||
// R0 == JSReturnReg, and R2 uses registers not preserved across calls. R1 value
|
||||
// should be preserved across calls.
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0(v1);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1(s4);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2(a6);
|
||||
static constexpr ValueOperand R0(v1);
|
||||
static constexpr ValueOperand R1(s4);
|
||||
static constexpr ValueOperand R2(a6);
|
||||
|
||||
// ICTailCallReg and ICStubReg
|
||||
// These use registers that are not preserved across calls.
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = ra;
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = a5;
|
||||
static constexpr Register ICTailCallReg = ra;
|
||||
static constexpr Register ICStubReg = a5;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = s6;
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = s7;
|
||||
static constexpr Register ExtractTemp0 = s6;
|
||||
static constexpr Register ExtractTemp1 = s7;
|
||||
|
||||
// Register used internally by MacroAssemblerMIPS.
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineSecondScratchReg = SecondScratchReg;
|
||||
static constexpr Register BaselineSecondScratchReg = SecondScratchReg;
|
||||
|
||||
// Note that ICTailCallReg is actually just the link register.
|
||||
// In MIPS code emission, we do not clobber ICTailCallReg since we keep
|
||||
// the return address for calls there.
|
||||
|
||||
// FloatReg0 must be equal to ReturnFloatReg.
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = f0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = f2;
|
||||
static constexpr FloatRegister FloatReg0 = f0;
|
||||
static constexpr FloatRegister FloatReg1 = f2;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -19,12 +19,12 @@ static const uint32_t SimdMemoryAlignment = 4; // Make it 4 to avoid a bunch of
|
|||
static const uint32_t AsmJSStackAlignment = 8;
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
class Registers
|
||||
{
|
||||
|
|
|
@ -14,82 +14,82 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register StackPointer = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register FramePointer = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ReturnReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnSimd128Reg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = { FloatRegisters::invalid_reg };
|
||||
static constexpr Register StackPointer = { Registers::invalid_reg };
|
||||
static constexpr Register FramePointer = { Registers::invalid_reg };
|
||||
static constexpr Register ReturnReg = { Registers::invalid_reg };
|
||||
static constexpr FloatRegister ReturnFloat32Reg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister ReturnDoubleReg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister ReturnSimd128Reg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister ScratchFloat32Reg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister ScratchDoubleReg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister ScratchSimd128Reg = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister InvalidFloatReg = { FloatRegisters::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register InvalidReg = { Registers::invalid_reg };
|
||||
static constexpr Register OsrFrameReg = { Registers::invalid_reg };
|
||||
static constexpr Register ArgumentsRectifierReg = { Registers::invalid_reg };
|
||||
static constexpr Register PreBarrierReg = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg0 = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg1 = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg2 = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg3 = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg4 = { Registers::invalid_reg };
|
||||
static constexpr Register CallTempReg5 = { Registers::invalid_reg };
|
||||
static constexpr Register InvalidReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register GlobalReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register HeapReg = { Registers::invalid_reg };
|
||||
static constexpr Register IntArgReg0 = { Registers::invalid_reg };
|
||||
static constexpr Register IntArgReg1 = { Registers::invalid_reg };
|
||||
static constexpr Register IntArgReg2 = { Registers::invalid_reg };
|
||||
static constexpr Register IntArgReg3 = { Registers::invalid_reg };
|
||||
static constexpr Register GlobalReg = { Registers::invalid_reg };
|
||||
static constexpr Register HeapReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegCallee = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE1 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE2 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegCallee = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegE0 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegE1 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegE2 = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD1 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD2 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegReturnData = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegReturnType = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegD0 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegD1 = { Registers::invalid_reg };
|
||||
static constexpr Register AsmJSIonExitRegD2 = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStickyReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpTesterRegExpReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpTesterStringReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpTesterLastIndexReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpTesterStickyReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStickyReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpMatcherRegExpReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpMatcherStringReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpMatcherLastIndexReg = { Registers::invalid_reg };
|
||||
static constexpr Register RegExpMatcherStickyReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg = { Registers::invalid_reg };
|
||||
static constexpr Register JSReturnReg_Type = { Registers::invalid_reg };
|
||||
static constexpr Register JSReturnReg_Data = { Registers::invalid_reg };
|
||||
static constexpr Register JSReturnReg = { Registers::invalid_reg };
|
||||
|
||||
#if defined(JS_NUNBOX32)
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand JSReturnOperand(InvalidReg, InvalidReg);
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static constexpr ValueOperand JSReturnOperand(InvalidReg, InvalidReg);
|
||||
static constexpr Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
#elif defined(JS_PUNBOX64)
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand JSReturnOperand(InvalidReg);
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(InvalidReg);
|
||||
static constexpr ValueOperand JSReturnOperand(InvalidReg);
|
||||
static constexpr Register64 ReturnReg64(InvalidReg);
|
||||
#else
|
||||
#error "Bad architecture"
|
||||
#endif
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = { Registers::invalid_reg };
|
||||
static constexpr Register ABINonArgReg0 = { Registers::invalid_reg };
|
||||
static constexpr Register ABINonArgReg1 = { Registers::invalid_reg };
|
||||
static constexpr Register ABINonArgReturnReg0 = { Registers::invalid_reg };
|
||||
static constexpr Register ABINonArgReturnReg1 = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = { Registers::invalid_reg };
|
||||
static constexpr Register WasmTableCallPtrReg = { Registers::invalid_reg };
|
||||
static constexpr Register WasmTableCallSigReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 4;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t CodeAlignment = 4;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 8;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t ABIStackAlignment = 4;
|
||||
static constexpr uint32_t CodeAlignment = 4;
|
||||
static constexpr uint32_t JitStackAlignment = 8;
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
|
||||
static const Scale ScalePointer = TimesOne;
|
||||
|
||||
|
|
|
@ -12,21 +12,21 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = { Registers::invalid_reg };
|
||||
static constexpr Register BaselineFrameReg = { Registers::invalid_reg };
|
||||
static constexpr Register BaselineStackReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0 = JSReturnOperand;
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1 = JSReturnOperand;
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2 = JSReturnOperand;
|
||||
static constexpr ValueOperand R0 = JSReturnOperand;
|
||||
static constexpr ValueOperand R1 = JSReturnOperand;
|
||||
static constexpr ValueOperand R2 = JSReturnOperand;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = { Registers::invalid_reg };
|
||||
static constexpr Register ICTailCallReg = { Registers::invalid_reg };
|
||||
static constexpr Register ICStubReg = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = { Registers::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = { Registers::invalid_reg };
|
||||
static constexpr Register ExtractTemp0 = { Registers::invalid_reg };
|
||||
static constexpr Register ExtractTemp1 = { Registers::invalid_reg };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = { FloatRegisters::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister FloatReg0 = { FloatRegisters::invalid_reg };
|
||||
static constexpr FloatRegister FloatReg1 = { FloatRegisters::invalid_reg };
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -16,61 +16,61 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register rax = { X86Encoding::rax };
|
||||
static MOZ_CONSTEXPR_VAR Register rbx = { X86Encoding::rbx };
|
||||
static MOZ_CONSTEXPR_VAR Register rcx = { X86Encoding::rcx };
|
||||
static MOZ_CONSTEXPR_VAR Register rdx = { X86Encoding::rdx };
|
||||
static MOZ_CONSTEXPR_VAR Register rsi = { X86Encoding::rsi };
|
||||
static MOZ_CONSTEXPR_VAR Register rdi = { X86Encoding::rdi };
|
||||
static MOZ_CONSTEXPR_VAR Register rbp = { X86Encoding::rbp };
|
||||
static MOZ_CONSTEXPR_VAR Register r8 = { X86Encoding::r8 };
|
||||
static MOZ_CONSTEXPR_VAR Register r9 = { X86Encoding::r9 };
|
||||
static MOZ_CONSTEXPR_VAR Register r10 = { X86Encoding::r10 };
|
||||
static MOZ_CONSTEXPR_VAR Register r11 = { X86Encoding::r11 };
|
||||
static MOZ_CONSTEXPR_VAR Register r12 = { X86Encoding::r12 };
|
||||
static MOZ_CONSTEXPR_VAR Register r13 = { X86Encoding::r13 };
|
||||
static MOZ_CONSTEXPR_VAR Register r14 = { X86Encoding::r14 };
|
||||
static MOZ_CONSTEXPR_VAR Register r15 = { X86Encoding::r15 };
|
||||
static MOZ_CONSTEXPR_VAR Register rsp = { X86Encoding::rsp };
|
||||
static constexpr Register rax = { X86Encoding::rax };
|
||||
static constexpr Register rbx = { X86Encoding::rbx };
|
||||
static constexpr Register rcx = { X86Encoding::rcx };
|
||||
static constexpr Register rdx = { X86Encoding::rdx };
|
||||
static constexpr Register rsi = { X86Encoding::rsi };
|
||||
static constexpr Register rdi = { X86Encoding::rdi };
|
||||
static constexpr Register rbp = { X86Encoding::rbp };
|
||||
static constexpr Register r8 = { X86Encoding::r8 };
|
||||
static constexpr Register r9 = { X86Encoding::r9 };
|
||||
static constexpr Register r10 = { X86Encoding::r10 };
|
||||
static constexpr Register r11 = { X86Encoding::r11 };
|
||||
static constexpr Register r12 = { X86Encoding::r12 };
|
||||
static constexpr Register r13 = { X86Encoding::r13 };
|
||||
static constexpr Register r14 = { X86Encoding::r14 };
|
||||
static constexpr Register r15 = { X86Encoding::r15 };
|
||||
static constexpr Register rsp = { X86Encoding::rsp };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm0 = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm1 = FloatRegister(X86Encoding::xmm1, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm2 = FloatRegister(X86Encoding::xmm2, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm3 = FloatRegister(X86Encoding::xmm3, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm4 = FloatRegister(X86Encoding::xmm4, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm5 = FloatRegister(X86Encoding::xmm5, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm6 = FloatRegister(X86Encoding::xmm6, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm7 = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm8 = FloatRegister(X86Encoding::xmm8, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm9 = FloatRegister(X86Encoding::xmm9, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm10 = FloatRegister(X86Encoding::xmm10, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm11 = FloatRegister(X86Encoding::xmm11, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm12 = FloatRegister(X86Encoding::xmm12, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm13 = FloatRegister(X86Encoding::xmm13, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm14 = FloatRegister(X86Encoding::xmm14, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm15 = FloatRegister(X86Encoding::xmm15, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm0 = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm1 = FloatRegister(X86Encoding::xmm1, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm2 = FloatRegister(X86Encoding::xmm2, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm3 = FloatRegister(X86Encoding::xmm3, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm4 = FloatRegister(X86Encoding::xmm4, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm5 = FloatRegister(X86Encoding::xmm5, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm6 = FloatRegister(X86Encoding::xmm6, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm7 = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm8 = FloatRegister(X86Encoding::xmm8, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm9 = FloatRegister(X86Encoding::xmm9, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm10 = FloatRegister(X86Encoding::xmm10, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm11 = FloatRegister(X86Encoding::xmm11, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm12 = FloatRegister(X86Encoding::xmm12, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm13 = FloatRegister(X86Encoding::xmm13, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm14 = FloatRegister(X86Encoding::xmm14, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm15 = FloatRegister(X86Encoding::xmm15, FloatRegisters::Double);
|
||||
|
||||
// X86-common synonyms.
|
||||
static MOZ_CONSTEXPR_VAR Register eax = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register ebx = rbx;
|
||||
static MOZ_CONSTEXPR_VAR Register ecx = rcx;
|
||||
static MOZ_CONSTEXPR_VAR Register edx = rdx;
|
||||
static MOZ_CONSTEXPR_VAR Register esi = rsi;
|
||||
static MOZ_CONSTEXPR_VAR Register edi = rdi;
|
||||
static MOZ_CONSTEXPR_VAR Register ebp = rbp;
|
||||
static MOZ_CONSTEXPR_VAR Register esp = rsp;
|
||||
static constexpr Register eax = rax;
|
||||
static constexpr Register ebx = rbx;
|
||||
static constexpr Register ecx = rcx;
|
||||
static constexpr Register edx = rdx;
|
||||
static constexpr Register esi = rsi;
|
||||
static constexpr Register edi = rdi;
|
||||
static constexpr Register ebp = rbp;
|
||||
static constexpr Register esp = rsp;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register InvalidReg = { X86Encoding::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = FloatRegister();
|
||||
static constexpr Register InvalidReg = { X86Encoding::invalid_reg };
|
||||
static constexpr FloatRegister InvalidFloatReg = FloatRegister();
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register StackPointer = rsp;
|
||||
static MOZ_CONSTEXPR_VAR Register FramePointer = rbp;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg = rcx;
|
||||
static constexpr Register StackPointer = rsp;
|
||||
static constexpr Register FramePointer = rbp;
|
||||
static constexpr Register JSReturnReg = rcx;
|
||||
// Avoid, except for assertions.
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = JSReturnReg;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = JSReturnReg;
|
||||
static constexpr Register JSReturnReg_Type = JSReturnReg;
|
||||
static constexpr Register JSReturnReg_Data = JSReturnReg;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ScratchReg = r11;
|
||||
static constexpr Register ScratchReg = r11;
|
||||
|
||||
// Helper class for ScratchRegister usage. Asserts that only one piece
|
||||
// of code thinks it has exclusive ownership of the scratch register.
|
||||
|
@ -81,33 +81,33 @@ struct ScratchRegisterScope : public AutoRegisterScope
|
|||
{ }
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ReturnReg = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register HeapReg = r15;
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(rax);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Single);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnSimd128Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Simd128);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = FloatRegister(X86Encoding::xmm15, FloatRegisters::Single);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = FloatRegister(X86Encoding::xmm15, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = xmm15;
|
||||
static constexpr Register ReturnReg = rax;
|
||||
static constexpr Register HeapReg = r15;
|
||||
static constexpr Register64 ReturnReg64(rax);
|
||||
static constexpr FloatRegister ReturnFloat32Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Single);
|
||||
static constexpr FloatRegister ReturnDoubleReg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static constexpr FloatRegister ReturnSimd128Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Simd128);
|
||||
static constexpr FloatRegister ScratchFloat32Reg = FloatRegister(X86Encoding::xmm15, FloatRegisters::Single);
|
||||
static constexpr FloatRegister ScratchDoubleReg = FloatRegister(X86Encoding::xmm15, FloatRegisters::Double);
|
||||
static constexpr FloatRegister ScratchSimd128Reg = xmm15;
|
||||
|
||||
// Avoid rbp, which is the FramePointer, which is unavailable in some modes.
|
||||
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = rdi;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = rbx;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = rcx;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = rsi;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = rdx;
|
||||
static constexpr Register ArgumentsRectifierReg = r8;
|
||||
static constexpr Register CallTempReg0 = rax;
|
||||
static constexpr Register CallTempReg1 = rdi;
|
||||
static constexpr Register CallTempReg2 = rbx;
|
||||
static constexpr Register CallTempReg3 = rcx;
|
||||
static constexpr Register CallTempReg4 = rsi;
|
||||
static constexpr Register CallTempReg5 = rdx;
|
||||
|
||||
// Different argument registers for WIN64
|
||||
#if defined(_WIN64)
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rcx;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rdx;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r9;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 4;
|
||||
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
|
||||
static constexpr Register IntArgReg0 = rcx;
|
||||
static constexpr Register IntArgReg1 = rdx;
|
||||
static constexpr Register IntArgReg2 = r8;
|
||||
static constexpr Register IntArgReg3 = r9;
|
||||
static constexpr uint32_t NumIntArgRegs = 4;
|
||||
// Use "const" instead of constexpr here to work around a bug
|
||||
// of VS2015 Update 1. See bug 1229604.
|
||||
static const Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
|
||||
|
||||
|
@ -115,62 +115,62 @@ static const Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
|
|||
static const uint32_t NumCallTempNonArgRegs =
|
||||
mozilla::ArrayLength(CallTempNonArgRegs);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
|
||||
static constexpr FloatRegister FloatArgReg0 = xmm0;
|
||||
static constexpr FloatRegister FloatArgReg1 = xmm1;
|
||||
static constexpr FloatRegister FloatArgReg2 = xmm2;
|
||||
static constexpr FloatRegister FloatArgReg3 = xmm3;
|
||||
static const uint32_t NumFloatArgRegs = 4;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3 };
|
||||
static constexpr FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3 };
|
||||
#else
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rdi;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rsi;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = rdx;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = rcx;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg4 = r8;
|
||||
static MOZ_CONSTEXPR_VAR Register IntArgReg5 = r9;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 6;
|
||||
static constexpr Register IntArgReg0 = rdi;
|
||||
static constexpr Register IntArgReg1 = rsi;
|
||||
static constexpr Register IntArgReg2 = rdx;
|
||||
static constexpr Register IntArgReg3 = rcx;
|
||||
static constexpr Register IntArgReg4 = r8;
|
||||
static constexpr Register IntArgReg5 = r9;
|
||||
static constexpr uint32_t NumIntArgRegs = 6;
|
||||
static const Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
|
||||
|
||||
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
|
||||
// Use "const" instead of constexpr here to work around a bug
|
||||
// of VS2015 Update 1. See bug 1229604.
|
||||
static const Register CallTempNonArgRegs[] = { rax, rbx };
|
||||
static const uint32_t NumCallTempNonArgRegs =
|
||||
mozilla::ArrayLength(CallTempNonArgRegs);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg4 = xmm4;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg5 = xmm5;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg6 = xmm6;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg7 = xmm7;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t NumFloatArgRegs = 8;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 };
|
||||
static constexpr FloatRegister FloatArgReg0 = xmm0;
|
||||
static constexpr FloatRegister FloatArgReg1 = xmm1;
|
||||
static constexpr FloatRegister FloatArgReg2 = xmm2;
|
||||
static constexpr FloatRegister FloatArgReg3 = xmm3;
|
||||
static constexpr FloatRegister FloatArgReg4 = xmm4;
|
||||
static constexpr FloatRegister FloatArgReg5 = xmm5;
|
||||
static constexpr FloatRegister FloatArgReg6 = xmm6;
|
||||
static constexpr FloatRegister FloatArgReg7 = xmm7;
|
||||
static constexpr uint32_t NumFloatArgRegs = 8;
|
||||
static constexpr FloatRegister FloatArgRegs[NumFloatArgRegs] = { xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7 };
|
||||
#endif
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Enable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegCallee = r10;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE0 = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE1 = rdi;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE2 = rbx;
|
||||
static constexpr Register AsmJSIonExitRegCallee = r10;
|
||||
static constexpr Register AsmJSIonExitRegE0 = rax;
|
||||
static constexpr Register AsmJSIonExitRegE1 = rdi;
|
||||
static constexpr Register AsmJSIonExitRegE2 = rbx;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD0 = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD1 = rdi;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD2 = rbx;
|
||||
static constexpr Register AsmJSIonExitRegReturnData = ecx;
|
||||
static constexpr Register AsmJSIonExitRegReturnType = ecx;
|
||||
static constexpr Register AsmJSIonExitRegD0 = rax;
|
||||
static constexpr Register AsmJSIonExitRegD1 = rdi;
|
||||
static constexpr Register AsmJSIonExitRegD2 = rbx;
|
||||
|
||||
// Registerd used in RegExpMatcher instruction (do not use JSReturnOperand).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
|
||||
// Registerd used in RegExpTester instruction (do not use ReturnReg).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = CallTempReg2;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = CallTempReg3;
|
||||
static constexpr Register RegExpTesterRegExpReg = CallTempReg1;
|
||||
static constexpr Register RegExpTesterStringReg = CallTempReg2;
|
||||
static constexpr Register RegExpTesterLastIndexReg = CallTempReg3;
|
||||
|
||||
class ABIArgGenerator
|
||||
{
|
||||
|
@ -191,28 +191,28 @@ class ABIArgGenerator
|
|||
};
|
||||
|
||||
// Avoid r11, which is the MacroAssembler's ScratchReg.
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = rax;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = rbx;
|
||||
static constexpr Register ABINonArgReg0 = rax;
|
||||
static constexpr Register ABINonArgReg1 = rbx;
|
||||
|
||||
// Note: these three registers are all guaranteed to be different
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = r10;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = r12;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonVolatileReg = r13;
|
||||
static constexpr Register ABINonArgReturnReg0 = r10;
|
||||
static constexpr Register ABINonArgReturnReg1 = r12;
|
||||
static constexpr Register ABINonVolatileReg = r13;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = IntArgReg3;
|
||||
static constexpr Register OsrFrameReg = IntArgReg3;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = rdx;
|
||||
static constexpr Register PreBarrierReg = rdx;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 16;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t CodeAlignment = 16;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 16;
|
||||
static constexpr uint32_t ABIStackAlignment = 16;
|
||||
static constexpr uint32_t CodeAlignment = 16;
|
||||
static constexpr uint32_t JitStackAlignment = 16;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >= 1,
|
||||
"Stack alignment should be a non-zero multiple of sizeof(Value)");
|
||||
|
||||
|
@ -220,8 +220,8 @@ static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >
|
|||
// this architecture or not. Rather than a method in the LIRGenerator, it is
|
||||
// here such that it is accessible from the entire codebase. Once full support
|
||||
// for SIMD is reached on all tier-1 platforms, this constant can be deleted.
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsSimd = true;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t SimdMemoryAlignment = 16;
|
||||
static constexpr bool SupportsSimd = true;
|
||||
static constexpr uint32_t SimdMemoryAlignment = 16;
|
||||
|
||||
static_assert(CodeAlignment % SimdMemoryAlignment == 0,
|
||||
"Code alignment should be larger than any of the alignments which are used for "
|
||||
|
@ -245,7 +245,7 @@ namespace js {
|
|||
namespace jit {
|
||||
|
||||
// Return operand from a JS -> JS call.
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand JSReturnOperand = ValueOperand(JSReturnReg);
|
||||
static constexpr ValueOperand JSReturnOperand = ValueOperand(JSReturnReg);
|
||||
|
||||
class Assembler : public AssemblerX86Shared
|
||||
{
|
||||
|
|
|
@ -12,22 +12,22 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = rbp;
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = rsp;
|
||||
static constexpr Register BaselineFrameReg = rbp;
|
||||
static constexpr Register BaselineStackReg = rsp;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0(rcx);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1(rbx);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2(rax);
|
||||
static constexpr ValueOperand R0(rcx);
|
||||
static constexpr ValueOperand R1(rbx);
|
||||
static constexpr ValueOperand R2(rax);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = rsi;
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = rdi;
|
||||
static constexpr Register ICTailCallReg = rsi;
|
||||
static constexpr Register ICStubReg = rdi;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = r14;
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = r15;
|
||||
static constexpr Register ExtractTemp0 = r14;
|
||||
static constexpr Register ExtractTemp1 = r15;
|
||||
|
||||
// FloatReg0 must be equal to ReturnFloatReg.
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = xmm0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = xmm1;
|
||||
static constexpr FloatRegister FloatReg0 = xmm0;
|
||||
static constexpr FloatRegister FloatReg1 = xmm1;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -21,12 +21,12 @@ namespace js {
|
|||
namespace jit {
|
||||
|
||||
// Does this architecture support SIMD conversions between Uint32x4 and Float32x4?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4FloatConversions = false;
|
||||
static constexpr bool SupportsUint32x4FloatConversions = false;
|
||||
|
||||
// Does this architecture support comparisons of unsigned integer vectors?
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint8x16Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint16x8Compares = false;
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsUint32x4Compares = false;
|
||||
static constexpr bool SupportsUint8x16Compares = false;
|
||||
static constexpr bool SupportsUint16x8Compares = false;
|
||||
static constexpr bool SupportsUint32x4Compares = false;
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
// In bytes: slots needed for potential memory->memory move spills.
|
||||
|
@ -350,13 +350,13 @@ struct FloatRegister {
|
|||
static const size_t RegMask = (1 << RegSize) - 1;
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR FloatRegister()
|
||||
constexpr FloatRegister()
|
||||
: reg_(Codes::Encoding(0)), type_(Codes::Single), isInvalid_(true)
|
||||
{ }
|
||||
MOZ_CONSTEXPR FloatRegister(uint32_t r, Codes::ContentType k)
|
||||
constexpr FloatRegister(uint32_t r, Codes::ContentType k)
|
||||
: reg_(Codes::Encoding(r)), type_(k), isInvalid_(false)
|
||||
{ }
|
||||
MOZ_CONSTEXPR FloatRegister(Codes::Encoding r, Codes::ContentType k)
|
||||
constexpr FloatRegister(Codes::Encoding r, Codes::ContentType k)
|
||||
: reg_(r), type_(k), isInvalid_(false)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -18,51 +18,51 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register eax = { X86Encoding::rax };
|
||||
static MOZ_CONSTEXPR_VAR Register ecx = { X86Encoding::rcx };
|
||||
static MOZ_CONSTEXPR_VAR Register edx = { X86Encoding::rdx };
|
||||
static MOZ_CONSTEXPR_VAR Register ebx = { X86Encoding::rbx };
|
||||
static MOZ_CONSTEXPR_VAR Register esp = { X86Encoding::rsp };
|
||||
static MOZ_CONSTEXPR_VAR Register ebp = { X86Encoding::rbp };
|
||||
static MOZ_CONSTEXPR_VAR Register esi = { X86Encoding::rsi };
|
||||
static MOZ_CONSTEXPR_VAR Register edi = { X86Encoding::rdi };
|
||||
static constexpr Register eax = { X86Encoding::rax };
|
||||
static constexpr Register ecx = { X86Encoding::rcx };
|
||||
static constexpr Register edx = { X86Encoding::rdx };
|
||||
static constexpr Register ebx = { X86Encoding::rbx };
|
||||
static constexpr Register esp = { X86Encoding::rsp };
|
||||
static constexpr Register ebp = { X86Encoding::rbp };
|
||||
static constexpr Register esi = { X86Encoding::rsi };
|
||||
static constexpr Register edi = { X86Encoding::rdi };
|
||||
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm0 = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm1 = FloatRegister(X86Encoding::xmm1, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm2 = FloatRegister(X86Encoding::xmm2, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm3 = FloatRegister(X86Encoding::xmm3, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm4 = FloatRegister(X86Encoding::xmm4, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm5 = FloatRegister(X86Encoding::xmm5, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm6 = FloatRegister(X86Encoding::xmm6, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister xmm7 = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm0 = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm1 = FloatRegister(X86Encoding::xmm1, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm2 = FloatRegister(X86Encoding::xmm2, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm3 = FloatRegister(X86Encoding::xmm3, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm4 = FloatRegister(X86Encoding::xmm4, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm5 = FloatRegister(X86Encoding::xmm5, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm6 = FloatRegister(X86Encoding::xmm6, FloatRegisters::Double);
|
||||
static constexpr FloatRegister xmm7 = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register InvalidReg = { X86Encoding::invalid_reg };
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister InvalidFloatReg = FloatRegister();
|
||||
static constexpr Register InvalidReg = { X86Encoding::invalid_reg };
|
||||
static constexpr FloatRegister InvalidFloatReg = FloatRegister();
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Type = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register JSReturnReg_Data = edx;
|
||||
static MOZ_CONSTEXPR_VAR Register StackPointer = esp;
|
||||
static MOZ_CONSTEXPR_VAR Register FramePointer = ebp;
|
||||
static MOZ_CONSTEXPR_VAR Register ReturnReg = eax;
|
||||
static MOZ_CONSTEXPR_VAR Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnFloat32Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Single);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnDoubleReg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ReturnSimd128Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Simd128);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchFloat32Reg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Single);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchDoubleReg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister ScratchSimd128Reg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Simd128);
|
||||
static constexpr Register JSReturnReg_Type = ecx;
|
||||
static constexpr Register JSReturnReg_Data = edx;
|
||||
static constexpr Register StackPointer = esp;
|
||||
static constexpr Register FramePointer = ebp;
|
||||
static constexpr Register ReturnReg = eax;
|
||||
static constexpr Register64 ReturnReg64(InvalidReg, InvalidReg);
|
||||
static constexpr FloatRegister ReturnFloat32Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Single);
|
||||
static constexpr FloatRegister ReturnDoubleReg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Double);
|
||||
static constexpr FloatRegister ReturnSimd128Reg = FloatRegister(X86Encoding::xmm0, FloatRegisters::Simd128);
|
||||
static constexpr FloatRegister ScratchFloat32Reg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Single);
|
||||
static constexpr FloatRegister ScratchDoubleReg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Double);
|
||||
static constexpr FloatRegister ScratchSimd128Reg = FloatRegister(X86Encoding::xmm7, FloatRegisters::Simd128);
|
||||
|
||||
// Avoid ebp, which is the FramePointer, which is unavailable in some modes.
|
||||
static MOZ_CONSTEXPR_VAR Register ArgumentsRectifierReg = esi;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg0 = edi;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg1 = eax;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg2 = ebx;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg3 = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg4 = esi;
|
||||
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = edx;
|
||||
static constexpr Register ArgumentsRectifierReg = esi;
|
||||
static constexpr Register CallTempReg0 = edi;
|
||||
static constexpr Register CallTempReg1 = eax;
|
||||
static constexpr Register CallTempReg2 = ebx;
|
||||
static constexpr Register CallTempReg3 = ecx;
|
||||
static constexpr Register CallTempReg4 = esi;
|
||||
static constexpr Register CallTempReg5 = edx;
|
||||
|
||||
// We have no arg regs, so our NonArgRegs are just our CallTempReg*
|
||||
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
|
||||
// Use "const" instead of constexpr here to work around a bug
|
||||
// of VS2015 Update 1. See bug 1229604.
|
||||
static const Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
|
||||
static const uint32_t NumCallTempNonArgRegs =
|
||||
|
@ -81,56 +81,56 @@ class ABIArgGenerator
|
|||
|
||||
};
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg0 = eax;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReg1 = ecx;
|
||||
static constexpr Register ABINonArgReg0 = eax;
|
||||
static constexpr Register ABINonArgReg1 = ecx;
|
||||
|
||||
// Note: these three registers are all guaranteed to be different
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg0 = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonArgReturnReg1 = edx;
|
||||
static MOZ_CONSTEXPR_VAR Register ABINonVolatileReg = ebx;
|
||||
static constexpr Register ABINonArgReturnReg0 = ecx;
|
||||
static constexpr Register ABINonArgReturnReg1 = edx;
|
||||
static constexpr Register ABINonVolatileReg = ebx;
|
||||
|
||||
// Registers used for asm.js/wasm table calls. These registers must be disjoint
|
||||
// from the ABI argument registers and from each other.
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
static constexpr Register WasmTableCallPtrReg = ABINonArgReg0;
|
||||
static constexpr Register WasmTableCallSigReg = ABINonArgReg1;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register OsrFrameReg = edx;
|
||||
static MOZ_CONSTEXPR_VAR Register PreBarrierReg = edx;
|
||||
static constexpr Register OsrFrameReg = edx;
|
||||
static constexpr Register PreBarrierReg = edx;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Enable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegCallee = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE0 = edi;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE1 = eax;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegE2 = ebx;
|
||||
static constexpr Register AsmJSIonExitRegCallee = ecx;
|
||||
static constexpr Register AsmJSIonExitRegE0 = edi;
|
||||
static constexpr Register AsmJSIonExitRegE1 = eax;
|
||||
static constexpr Register AsmJSIonExitRegE2 = ebx;
|
||||
|
||||
// Registers used in the GenerateFFIIonExit Disable Activation block.
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnData = edx;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegReturnType = ecx;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD0 = edi;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD1 = eax;
|
||||
static MOZ_CONSTEXPR_VAR Register AsmJSIonExitRegD2 = esi;
|
||||
static constexpr Register AsmJSIonExitRegReturnData = edx;
|
||||
static constexpr Register AsmJSIonExitRegReturnType = ecx;
|
||||
static constexpr Register AsmJSIonExitRegD0 = edi;
|
||||
static constexpr Register AsmJSIonExitRegD1 = eax;
|
||||
static constexpr Register AsmJSIonExitRegD2 = esi;
|
||||
|
||||
// Registerd used in RegExpMatcher instruction (do not use JSReturnOperand).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
static constexpr Register RegExpMatcherRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpMatcherStringReg = CallTempReg1;
|
||||
static constexpr Register RegExpMatcherLastIndexReg = CallTempReg2;
|
||||
|
||||
// Registerd used in RegExpTester instruction (do not use ReturnReg).
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterStringReg = CallTempReg2;
|
||||
static MOZ_CONSTEXPR_VAR Register RegExpTesterLastIndexReg = CallTempReg3;
|
||||
static constexpr Register RegExpTesterRegExpReg = CallTempReg0;
|
||||
static constexpr Register RegExpTesterStringReg = CallTempReg2;
|
||||
static constexpr Register RegExpTesterLastIndexReg = CallTempReg3;
|
||||
|
||||
// GCC stack is aligned on 16 bytes. Ion does not maintain this for internal
|
||||
// calls. asm.js code does.
|
||||
#if defined(__GNUC__)
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 16;
|
||||
static constexpr uint32_t ABIStackAlignment = 16;
|
||||
#else
|
||||
static MOZ_CONSTEXPR_VAR uint32_t ABIStackAlignment = 4;
|
||||
static constexpr uint32_t ABIStackAlignment = 4;
|
||||
#endif
|
||||
static MOZ_CONSTEXPR_VAR uint32_t CodeAlignment = 16;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackAlignment = 16;
|
||||
static constexpr uint32_t CodeAlignment = 16;
|
||||
static constexpr uint32_t JitStackAlignment = 16;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);
|
||||
static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >= 1,
|
||||
"Stack alignment should be a non-zero multiple of sizeof(Value)");
|
||||
|
||||
|
@ -138,8 +138,8 @@ static_assert(JitStackAlignment % sizeof(Value) == 0 && JitStackValueAlignment >
|
|||
// this architecture or not. Rather than a method in the LIRGenerator, it is
|
||||
// here such that it is accessible from the entire codebase. Once full support
|
||||
// for SIMD is reached on all tier-1 platforms, this constant can be deleted.
|
||||
static MOZ_CONSTEXPR_VAR bool SupportsSimd = true;
|
||||
static MOZ_CONSTEXPR_VAR uint32_t SimdMemoryAlignment = 16;
|
||||
static constexpr bool SupportsSimd = true;
|
||||
static constexpr uint32_t SimdMemoryAlignment = 16;
|
||||
|
||||
static_assert(CodeAlignment % SimdMemoryAlignment == 0,
|
||||
"Code alignment should be larger than any of the alignments which are used for "
|
||||
|
|
|
@ -12,25 +12,25 @@
|
|||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineFrameReg = ebp;
|
||||
static MOZ_CONSTEXPR_VAR Register BaselineStackReg = esp;
|
||||
static constexpr Register BaselineFrameReg = ebp;
|
||||
static constexpr Register BaselineStackReg = esp;
|
||||
|
||||
// ValueOperands R0, R1, and R2
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R0(ecx, edx);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R1(eax, ebx);
|
||||
static MOZ_CONSTEXPR_VAR ValueOperand R2(esi, edi);
|
||||
static constexpr ValueOperand R0(ecx, edx);
|
||||
static constexpr ValueOperand R1(eax, ebx);
|
||||
static constexpr ValueOperand R2(esi, edi);
|
||||
|
||||
// ICTailCallReg and ICStubReg reuse
|
||||
// registers from R2.
|
||||
static MOZ_CONSTEXPR_VAR Register ICTailCallReg = esi;
|
||||
static MOZ_CONSTEXPR_VAR Register ICStubReg = edi;
|
||||
static constexpr Register ICTailCallReg = esi;
|
||||
static constexpr Register ICStubReg = edi;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp0 = InvalidReg;
|
||||
static MOZ_CONSTEXPR_VAR Register ExtractTemp1 = InvalidReg;
|
||||
static constexpr Register ExtractTemp0 = InvalidReg;
|
||||
static constexpr Register ExtractTemp1 = InvalidReg;
|
||||
|
||||
// FloatReg0 must be equal to ReturnFloatReg.
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg0 = xmm0;
|
||||
static MOZ_CONSTEXPR_VAR FloatRegister FloatReg1 = xmm1;
|
||||
static constexpr FloatRegister FloatReg0 = xmm0;
|
||||
static constexpr FloatRegister FloatReg1 = xmm1;
|
||||
|
||||
} // namespace jit
|
||||
} // namespace js
|
||||
|
|
|
@ -19,55 +19,55 @@
|
|||
|
||||
static const int LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 4*1024;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single0(0, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single1(1, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single2(2, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single3(3, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single4(4, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single5(5, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single6(6, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single7(7, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single8(8, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single9(9, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single10(10, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single11(11, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single12(12, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single13(13, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single14(14, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single15(15, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single16(16, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single17(17, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single18(18, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single19(19, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single20(20, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single21(21, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single22(22, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single23(23, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single24(24, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single25(25, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single26(26, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single27(27, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single28(28, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single29(29, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single30(30, js::jit::FloatRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister single31(31, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single0(0, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single1(1, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single2(2, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single3(3, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single4(4, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single5(5, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single6(6, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single7(7, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single8(8, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single9(9, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single10(10, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single11(11, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single12(12, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single13(13, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single14(14, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single15(15, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single16(16, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single17(17, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single18(18, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single19(19, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single20(20, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single21(21, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single22(22, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single23(23, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single24(24, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single25(25, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single26(26, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single27(27, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single28(28, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single29(29, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single30(30, js::jit::FloatRegister::Single);
|
||||
static constexpr js::jit::FloatRegister single31(31, js::jit::FloatRegister::Single);
|
||||
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double0(0, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double1(2, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double2(4, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double3(6, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double4(8, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double5(10, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double6(12, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double7(14, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double8(16, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double9(18, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double10(20, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double11(22, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double12(24, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double13(26, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double14(28, js::jit::FloatRegister::Double);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister double15(30, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double0(0, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double1(2, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double2(4, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double3(6, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double4(8, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double5(10, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double6(12, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double7(14, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double8(16, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double9(18, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double10(20, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double11(22, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double12(24, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double13(26, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double14(28, js::jit::FloatRegister::Double);
|
||||
static constexpr js::jit::FloatRegister double15(30, js::jit::FloatRegister::Double);
|
||||
|
||||
static js::jit::JitCode*
|
||||
linkAndAllocate(JSContext* cx, js::jit::MacroAssembler* masm)
|
||||
|
|
|
@ -19,38 +19,38 @@
|
|||
|
||||
static const int LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 4*1024;
|
||||
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s0(0, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s1(1, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s2(2, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s3(3, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s4(4, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s5(5, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s6(6, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s7(7, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s8(8, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s9(9, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s10(10, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s11(11, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s12(12, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s13(13, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s14(14, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s15(15, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s16(16, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s17(17, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s18(18, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s19(19, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s20(20, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s21(21, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s22(22, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s23(23, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s24(24, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s25(25, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s26(26, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s27(27, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s28(28, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s29(29, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s30(30, js::jit::VFPRegister::Single);
|
||||
static MOZ_CONSTEXPR_VAR js::jit::FloatRegister s31(31, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s0(0, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s1(1, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s2(2, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s3(3, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s4(4, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s5(5, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s6(6, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s7(7, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s8(8, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s9(9, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s10(10, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s11(11, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s12(12, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s13(13, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s14(14, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s15(15, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s16(16, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s17(17, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s18(18, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s19(19, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s20(20, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s21(21, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s22(22, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s23(23, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s24(24, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s25(25, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s26(26, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s27(27, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s28(28, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s29(29, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s30(30, js::jit::VFPRegister::Single);
|
||||
static constexpr js::jit::FloatRegister s31(31, js::jit::VFPRegister::Single);
|
||||
|
||||
static js::jit::JitCode*
|
||||
linkAndAllocate(JSContext* cx, js::jit::MacroAssembler* masm)
|
||||
|
|
|
@ -60,7 +60,7 @@ class JS_FRIEND_API(Wrapper) : public BaseProxyHandler
|
|||
unsigned mFlags;
|
||||
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR Wrapper(unsigned aFlags, bool aHasPrototype = false,
|
||||
explicit constexpr Wrapper(unsigned aFlags, bool aHasPrototype = false,
|
||||
bool aHasSecurityPolicy = false)
|
||||
: BaseProxyHandler(&family, aHasPrototype, aHasSecurityPolicy),
|
||||
mFlags(aFlags)
|
||||
|
@ -163,7 +163,7 @@ WrapperOptions::proto() const
|
|||
class JS_FRIEND_API(CrossCompartmentWrapper) : public Wrapper
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR CrossCompartmentWrapper(unsigned aFlags, bool aHasPrototype = false,
|
||||
explicit constexpr CrossCompartmentWrapper(unsigned aFlags, bool aHasPrototype = false,
|
||||
bool aHasSecurityPolicy = false)
|
||||
: Wrapper(CROSS_COMPARTMENT | aFlags, aHasPrototype, aHasSecurityPolicy)
|
||||
{ }
|
||||
|
@ -222,7 +222,7 @@ class JS_FRIEND_API(CrossCompartmentWrapper) : public Wrapper
|
|||
class JS_FRIEND_API(OpaqueCrossCompartmentWrapper) : public CrossCompartmentWrapper
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR OpaqueCrossCompartmentWrapper() : CrossCompartmentWrapper(0)
|
||||
explicit constexpr OpaqueCrossCompartmentWrapper() : CrossCompartmentWrapper(0)
|
||||
{ }
|
||||
|
||||
/* Standard internal methods. */
|
||||
|
@ -286,7 +286,7 @@ template <class Base>
|
|||
class JS_FRIEND_API(SecurityWrapper) : public Base
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR SecurityWrapper(unsigned flags, bool hasPrototype = false)
|
||||
explicit constexpr SecurityWrapper(unsigned flags, bool hasPrototype = false)
|
||||
: Base(flags, hasPrototype, /* hasSecurityPolicy = */ true)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace js {
|
|||
class DeadObjectProxy : public BaseProxyHandler
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR DeadObjectProxy()
|
||||
explicit constexpr DeadObjectProxy()
|
||||
: BaseProxyHandler(&family)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace js {
|
|||
class ScriptedProxyHandler : public BaseProxyHandler
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR ScriptedProxyHandler()
|
||||
constexpr ScriptedProxyHandler()
|
||||
: BaseProxyHandler(&family)
|
||||
{ }
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ class ObjectElements
|
|||
}
|
||||
|
||||
public:
|
||||
MOZ_CONSTEXPR ObjectElements(uint32_t capacity, uint32_t length)
|
||||
constexpr ObjectElements(uint32_t capacity, uint32_t length)
|
||||
: flags(0), initializedLength(0), capacity(capacity), length(length)
|
||||
{}
|
||||
|
||||
|
@ -248,7 +248,7 @@ class ObjectElements
|
|||
IsShared
|
||||
};
|
||||
|
||||
MOZ_CONSTEXPR ObjectElements(uint32_t capacity, uint32_t length, SharedMemory shmem)
|
||||
constexpr ObjectElements(uint32_t capacity, uint32_t length, SharedMemory shmem)
|
||||
: flags(SHARED_MEMORY), initializedLength(0), capacity(capacity), length(length)
|
||||
{}
|
||||
|
||||
|
|
|
@ -2251,7 +2251,7 @@ static_assert((0 ==
|
|||
|
||||
// Define JSOP_*_LENGTH constants for all ops.
|
||||
#define DEFINE_LENGTH_CONSTANT(op, val, name, image, len, ...) \
|
||||
MOZ_CONSTEXPR_VAR size_t op##_LENGTH = len;
|
||||
constexpr size_t op##_LENGTH = len;
|
||||
FOR_EACH_OPCODE(DEFINE_LENGTH_CONSTANT)
|
||||
#undef DEFINE_LENGTH_CONSTANT
|
||||
|
||||
|
|
|
@ -1994,7 +1994,7 @@ class DebugScopeProxy : public BaseProxyHandler
|
|||
static const char family;
|
||||
static const DebugScopeProxy singleton;
|
||||
|
||||
MOZ_CONSTEXPR DebugScopeProxy() : BaseProxyHandler(&family) {}
|
||||
constexpr DebugScopeProxy() : BaseProxyHandler(&family) {}
|
||||
|
||||
static bool isFunctionScopeWithThis(const JSObject& scope)
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ class TypedArrayObjectTemplate : public TypedArrayObject
|
|||
public:
|
||||
typedef NativeType ElementType;
|
||||
|
||||
static MOZ_CONSTEXPR Scalar::Type ArrayTypeID() { return TypeIDOfType<NativeType>::id; }
|
||||
static constexpr Scalar::Type ArrayTypeID() { return TypeIDOfType<NativeType>::id; }
|
||||
static bool ArrayTypeIsUnsigned() { return TypeIsUnsigned<NativeType>(); }
|
||||
static bool ArrayTypeIsFloatingPoint() { return TypeIsFloatingPoint<NativeType>(); }
|
||||
|
||||
|
|
|
@ -3494,7 +3494,7 @@ NS_IMETHODIMP nsXPCComponents::ReportError(HandleValue error, JSContext* cx)
|
|||
class ComponentsSH : public nsIXPCScriptable
|
||||
{
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR ComponentsSH(unsigned dummy)
|
||||
explicit constexpr ComponentsSH(unsigned dummy)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ InterposeCall(JSContext* cx, JS::HandleObject wrapper,
|
|||
template<typename Base>
|
||||
class AddonWrapper : public Base {
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR AddonWrapper(unsigned flags) : Base(flags) { }
|
||||
explicit constexpr AddonWrapper(unsigned flags) : Base(flags) { }
|
||||
|
||||
virtual bool getOwnPropertyDescriptor(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
|
|
|
@ -25,7 +25,7 @@ struct ExposedPropertiesOnly;
|
|||
class ChromeObjectWrapper : public ChromeObjectWrapperBase
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR ChromeObjectWrapper() : ChromeObjectWrapperBase(0) {}
|
||||
constexpr ChromeObjectWrapper() : ChromeObjectWrapperBase(0) {}
|
||||
|
||||
virtual bool defineProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace xpc {
|
|||
template <typename Base, typename Policy>
|
||||
class FilteringWrapper : public Base {
|
||||
public:
|
||||
MOZ_CONSTEXPR explicit FilteringWrapper(unsigned flags) : Base(flags) {}
|
||||
constexpr explicit FilteringWrapper(unsigned flags) : Base(flags) {}
|
||||
|
||||
virtual bool enter(JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<jsid> id,
|
||||
js::Wrapper::Action act, bool* bp) const override;
|
||||
|
@ -63,7 +63,7 @@ class FilteringWrapper : public Base {
|
|||
*/
|
||||
class CrossOriginXrayWrapper : public SecurityXrayDOM {
|
||||
public:
|
||||
MOZ_CONSTEXPR explicit CrossOriginXrayWrapper(unsigned flags) :
|
||||
constexpr explicit CrossOriginXrayWrapper(unsigned flags) :
|
||||
SecurityXrayDOM(flags) {}
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace xpc {
|
|||
|
||||
class WaiveXrayWrapper : public js::CrossCompartmentWrapper {
|
||||
public:
|
||||
explicit MOZ_CONSTEXPR WaiveXrayWrapper(unsigned flags) : js::CrossCompartmentWrapper(flags) { }
|
||||
explicit constexpr WaiveXrayWrapper(unsigned flags) : js::CrossCompartmentWrapper(flags) { }
|
||||
|
||||
virtual bool getOwnPropertyDescriptor(JSContext* cx, JS::Handle<JSObject*> wrapper,
|
||||
JS::Handle<jsid> id,
|
||||
|
|
|
@ -61,7 +61,7 @@ enum XrayType {
|
|||
class XrayTraits
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR XrayTraits() {}
|
||||
constexpr XrayTraits() {}
|
||||
|
||||
static JSObject* getTargetObject(JSObject* wrapper) {
|
||||
return js::UncheckedUnwrap(wrapper, /* stopAtWindowProxy = */ false);
|
||||
|
@ -160,7 +160,7 @@ public:
|
|||
class DOMXrayTraits : public XrayTraits
|
||||
{
|
||||
public:
|
||||
MOZ_CONSTEXPR DOMXrayTraits() = default;
|
||||
constexpr DOMXrayTraits() = default;
|
||||
|
||||
enum {
|
||||
HasPrototype = 1
|
||||
|
@ -411,7 +411,7 @@ XrayTraits* GetXrayTraits(JSObject* obj);
|
|||
template <typename Base, typename Traits = XPCWrappedNativeXrayTraits >
|
||||
class XrayWrapper : public Base {
|
||||
public:
|
||||
MOZ_CONSTEXPR explicit XrayWrapper(unsigned flags)
|
||||
constexpr explicit XrayWrapper(unsigned flags)
|
||||
: Base(flags | WrapperFactory::IS_XRAY_WRAPPER_FLAG, Traits::HasPrototype)
|
||||
{ };
|
||||
|
||||
|
@ -499,7 +499,7 @@ class XrayWrapper : public Base {
|
|||
|
||||
class SandboxProxyHandler : public js::Wrapper {
|
||||
public:
|
||||
MOZ_CONSTEXPR SandboxProxyHandler() : js::Wrapper(0)
|
||||
constexpr SandboxProxyHandler() : js::Wrapper(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ extern const SandboxProxyHandler sandboxProxyHandler;
|
|||
// to them directly.
|
||||
class SandboxCallableProxyHandler : public js::Wrapper {
|
||||
public:
|
||||
MOZ_CONSTEXPR SandboxCallableProxyHandler() : js::Wrapper(0)
|
||||
constexpr SandboxCallableProxyHandler() : js::Wrapper(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ protected:
|
|||
* just use the static function FramePropertyDescriptor::New* below
|
||||
* instead of using this constructor directly.
|
||||
*/
|
||||
MOZ_CONSTEXPR FramePropertyDescriptorUntyped(
|
||||
constexpr FramePropertyDescriptorUntyped(
|
||||
UntypedDestructor* aDtor, UntypedDestructorWithFrame* aDtorWithFrame)
|
||||
: mDestructor(aDtor)
|
||||
, mDestructorWithFrame(aDtorWithFrame)
|
||||
|
@ -72,25 +72,25 @@ struct FramePropertyDescriptor : public FramePropertyDescriptorUntyped
|
|||
T* aPropertyValue);
|
||||
|
||||
template<Destructor Dtor>
|
||||
static MOZ_CONSTEXPR const FramePropertyDescriptor<T> NewWithDestructor()
|
||||
static constexpr const FramePropertyDescriptor<T> NewWithDestructor()
|
||||
{
|
||||
return { Destruct<Dtor>, nullptr };
|
||||
}
|
||||
|
||||
template<DestructorWithFrame Dtor>
|
||||
static MOZ_CONSTEXPR
|
||||
static constexpr
|
||||
const FramePropertyDescriptor<T> NewWithDestructorWithFrame()
|
||||
{
|
||||
return { nullptr, DestructWithFrame<Dtor> };
|
||||
}
|
||||
|
||||
static MOZ_CONSTEXPR const FramePropertyDescriptor<T> NewWithoutDestructor()
|
||||
static constexpr const FramePropertyDescriptor<T> NewWithoutDestructor()
|
||||
{
|
||||
return { nullptr, nullptr };
|
||||
}
|
||||
|
||||
private:
|
||||
MOZ_CONSTEXPR FramePropertyDescriptor(
|
||||
constexpr FramePropertyDescriptor(
|
||||
UntypedDestructor* aDtor, UntypedDestructorWithFrame* aDtorWithFrame)
|
||||
: FramePropertyDescriptorUntyped(aDtor, aDtorWithFrame)
|
||||
{}
|
||||
|
|
|
@ -232,13 +232,13 @@ inline bool NS_IsHintSubset(nsChangeHint aSubset, nsChangeHint aSuperSet) {
|
|||
// infinite recursion.
|
||||
typedef decltype(nsChangeHint(0) + nsChangeHint(0)) nsChangeHint_size_t;
|
||||
|
||||
inline nsChangeHint MOZ_CONSTEXPR
|
||||
inline nsChangeHint constexpr
|
||||
operator|(nsChangeHint aLeft, nsChangeHint aRight)
|
||||
{
|
||||
return nsChangeHint(nsChangeHint_size_t(aLeft) | nsChangeHint_size_t(aRight));
|
||||
}
|
||||
|
||||
inline nsChangeHint MOZ_CONSTEXPR
|
||||
inline nsChangeHint constexpr
|
||||
operator&(nsChangeHint aLeft, nsChangeHint aRight)
|
||||
{
|
||||
return nsChangeHint(nsChangeHint_size_t(aLeft) & nsChangeHint_size_t(aRight));
|
||||
|
@ -254,13 +254,13 @@ inline nsChangeHint& operator&=(nsChangeHint& aLeft, nsChangeHint aRight)
|
|||
return aLeft = aLeft & aRight;
|
||||
}
|
||||
|
||||
inline nsChangeHint MOZ_CONSTEXPR
|
||||
inline nsChangeHint constexpr
|
||||
operator~(nsChangeHint aArg)
|
||||
{
|
||||
return nsChangeHint(~nsChangeHint_size_t(aArg));
|
||||
}
|
||||
|
||||
inline nsChangeHint MOZ_CONSTEXPR
|
||||
inline nsChangeHint constexpr
|
||||
operator^(nsChangeHint aLeft, nsChangeHint aRight)
|
||||
{
|
||||
return nsChangeHint(nsChangeHint_size_t(aLeft) ^ nsChangeHint_size_t(aRight));
|
||||
|
@ -464,14 +464,14 @@ enum nsRestyleHint {
|
|||
// infinite recursion.
|
||||
typedef decltype(nsRestyleHint(0) + nsRestyleHint(0)) nsRestyleHint_size_t;
|
||||
|
||||
inline MOZ_CONSTEXPR nsRestyleHint operator|(nsRestyleHint aLeft,
|
||||
inline constexpr nsRestyleHint operator|(nsRestyleHint aLeft,
|
||||
nsRestyleHint aRight)
|
||||
{
|
||||
return nsRestyleHint(nsRestyleHint_size_t(aLeft) |
|
||||
nsRestyleHint_size_t(aRight));
|
||||
}
|
||||
|
||||
inline MOZ_CONSTEXPR nsRestyleHint operator&(nsRestyleHint aLeft,
|
||||
inline constexpr nsRestyleHint operator&(nsRestyleHint aLeft,
|
||||
nsRestyleHint aRight)
|
||||
{
|
||||
return nsRestyleHint(nsRestyleHint_size_t(aLeft) &
|
||||
|
@ -488,12 +488,12 @@ inline nsRestyleHint& operator&=(nsRestyleHint& aLeft, nsRestyleHint aRight)
|
|||
return aLeft = aLeft & aRight;
|
||||
}
|
||||
|
||||
inline MOZ_CONSTEXPR nsRestyleHint operator~(nsRestyleHint aArg)
|
||||
inline constexpr nsRestyleHint operator~(nsRestyleHint aArg)
|
||||
{
|
||||
return nsRestyleHint(~nsRestyleHint_size_t(aArg));
|
||||
}
|
||||
|
||||
inline MOZ_CONSTEXPR nsRestyleHint operator^(nsRestyleHint aLeft,
|
||||
inline constexpr nsRestyleHint operator^(nsRestyleHint aLeft,
|
||||
nsRestyleHint aRight)
|
||||
{
|
||||
return nsRestyleHint(nsRestyleHint_size_t(aLeft) ^
|
||||
|
|
|
@ -46,7 +46,7 @@ struct JustificationInfo
|
|||
bool mIsStartJustifiable;
|
||||
bool mIsEndJustifiable;
|
||||
|
||||
MOZ_CONSTEXPR JustificationInfo()
|
||||
constexpr JustificationInfo()
|
||||
: mInnerOpportunities(0)
|
||||
, mIsStartJustifiable(false)
|
||||
, mIsEndJustifiable(false)
|
||||
|
@ -76,7 +76,7 @@ struct JustificationAssignment
|
|||
uint8_t mGapsAtStart : 2;
|
||||
uint8_t mGapsAtEnd : 2;
|
||||
|
||||
MOZ_CONSTEXPR JustificationAssignment()
|
||||
constexpr JustificationAssignment()
|
||||
: mGapsAtStart(0)
|
||||
, mGapsAtEnd(0)
|
||||
{
|
||||
|
|
|
@ -863,7 +863,7 @@ public:
|
|||
|
||||
#define NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, dtor) \
|
||||
static const mozilla::FramePropertyDescriptor<type>* prop() { \
|
||||
/* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
|
||||
/* Use of constexpr caused startup crashes with MSVC2015u1 PGO. */ \
|
||||
static const auto descriptor = \
|
||||
mozilla::FramePropertyDescriptor<type>::NewWithDestructor<dtor>(); \
|
||||
return &descriptor; \
|
||||
|
@ -872,7 +872,7 @@ public:
|
|||
// Don't use this unless you really know what you're doing!
|
||||
#define NS_DECLARE_FRAME_PROPERTY_WITH_FRAME_IN_DTOR(prop, type, dtor) \
|
||||
static const mozilla::FramePropertyDescriptor<type>* prop() { \
|
||||
/* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
|
||||
/* Use of constexpr caused startup crashes with MSVC2015u1 PGO. */ \
|
||||
static const auto descriptor = mozilla:: \
|
||||
FramePropertyDescriptor<type>::NewWithDestructorWithFrame<dtor>(); \
|
||||
return &descriptor; \
|
||||
|
@ -880,7 +880,7 @@ public:
|
|||
|
||||
#define NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(prop, type) \
|
||||
static const mozilla::FramePropertyDescriptor<type>* prop() { \
|
||||
/* Use of MOZ_CONSTEXPR caused startup crashes with MSVC2015u1 PGO. */\
|
||||
/* Use of constexpr caused startup crashes with MSVC2015u1 PGO. */ \
|
||||
static const auto descriptor = \
|
||||
mozilla::FramePropertyDescriptor<type>::NewWithoutDestructor(); \
|
||||
return &descriptor; \
|
||||
|
|
|
@ -578,13 +578,13 @@ public:
|
|||
friend class CounterStyleManager;
|
||||
|
||||
// will be initialized by CounterStyleManager::InitializeBuiltinCounterStyles
|
||||
MOZ_CONSTEXPR BuiltinCounterStyle()
|
||||
constexpr BuiltinCounterStyle()
|
||||
: CounterStyle(NS_STYLE_LIST_STYLE_NONE)
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
MOZ_CONSTEXPR explicit BuiltinCounterStyle(int32_t aStyle)
|
||||
constexpr explicit BuiltinCounterStyle(int32_t aStyle)
|
||||
: CounterStyle(aStyle)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ struct PadType;
|
|||
class CounterStyle
|
||||
{
|
||||
protected:
|
||||
explicit MOZ_CONSTEXPR CounterStyle(int32_t aStyle)
|
||||
explicit constexpr CounterStyle(int32_t aStyle)
|
||||
: mStyle(aStyle)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -15094,11 +15094,11 @@ CSSParserImpl::ParseTextDecoration()
|
|||
bool
|
||||
CSSParserImpl::ParseTextEmphasis()
|
||||
{
|
||||
static MOZ_CONSTEXPR_VAR nsCSSProperty kTextEmphasisIDs[] = {
|
||||
static constexpr nsCSSProperty kTextEmphasisIDs[] = {
|
||||
eCSSProperty_text_emphasis_style,
|
||||
eCSSProperty_text_emphasis_color
|
||||
};
|
||||
MOZ_CONSTEXPR_VAR int32_t numProps = MOZ_ARRAY_LENGTH(kTextEmphasisIDs);
|
||||
constexpr int32_t numProps = MOZ_ARRAY_LENGTH(kTextEmphasisIDs);
|
||||
nsCSSValue values[numProps];
|
||||
|
||||
int32_t found = ParseChoice(values, kTextEmphasisIDs, numProps);
|
||||
|
|
|
@ -4266,7 +4266,7 @@ struct TextEmphasisChars
|
|||
TEXT_EMPHASIS_CHARS_ITEM("\u25b2", "\u25b3", TRIANGLE) \
|
||||
TEXT_EMPHASIS_CHARS_ITEM("\ufe45", "\ufe46", SESAME)
|
||||
|
||||
static MOZ_CONSTEXPR_VAR TextEmphasisChars kTextEmphasisChars[] =
|
||||
static constexpr TextEmphasisChars kTextEmphasisChars[] =
|
||||
{
|
||||
#define TEXT_EMPHASIS_CHARS_ITEM(filled_, open_, type_) \
|
||||
{ MOZ_UTF16(filled_), MOZ_UTF16(open_) }, // type_
|
||||
|
|
|
@ -52,21 +52,21 @@ PointerRangeSize(T* aBegin, T* aEnd)
|
|||
* Beware of the implicit trailing '\0' when using this with string constants.
|
||||
*/
|
||||
template<typename T, size_t N>
|
||||
MOZ_CONSTEXPR size_t
|
||||
constexpr size_t
|
||||
ArrayLength(T (&aArr)[N])
|
||||
{
|
||||
return N;
|
||||
}
|
||||
|
||||
template<typename T, size_t N>
|
||||
MOZ_CONSTEXPR size_t
|
||||
constexpr size_t
|
||||
ArrayLength(const Array<T, N>& aArr)
|
||||
{
|
||||
return N;
|
||||
}
|
||||
|
||||
template<typename E, E N, typename T>
|
||||
MOZ_CONSTEXPR size_t
|
||||
constexpr size_t
|
||||
ArrayLength(const EnumeratedArray<E, N, T>& aArr)
|
||||
{
|
||||
return size_t(N);
|
||||
|
@ -78,21 +78,21 @@ ArrayLength(const EnumeratedArray<E, N, T>& aArr)
|
|||
* Beware of the implicit trailing '\0' when using this with string constants.
|
||||
*/
|
||||
template<typename T, size_t N>
|
||||
MOZ_CONSTEXPR T*
|
||||
constexpr T*
|
||||
ArrayEnd(T (&aArr)[N])
|
||||
{
|
||||
return aArr + ArrayLength(aArr);
|
||||
}
|
||||
|
||||
template<typename T, size_t N>
|
||||
MOZ_CONSTEXPR T*
|
||||
constexpr T*
|
||||
ArrayEnd(Array<T, N>& aArr)
|
||||
{
|
||||
return &aArr[0] + ArrayLength(aArr);
|
||||
}
|
||||
|
||||
template<typename T, size_t N>
|
||||
MOZ_CONSTEXPR const T*
|
||||
constexpr const T*
|
||||
ArrayEnd(const Array<T, N>& aArr)
|
||||
{
|
||||
return &aArr[0] + ArrayLength(aArr);
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче