Bug 964016 - Part 4: Replace JS_ALWAYS_INLINE with MOZ_ALWAYS_INLINE. r=luke

This commit is contained in:
Chris Peterson 2014-01-24 20:14:56 -08:00
Родитель a56cc4a28b
Коммит ac4837ccb1
60 изменённых файлов: 431 добавлений и 435 удалений

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

@ -92,7 +92,7 @@ CallMethodIfWrapped(JSContext *cx, IsAcceptableThis test, NativeImpl impl, CallA
// tail position in a JSNative. Do not call it from any other place.
//
template<IsAcceptableThis Test, NativeImpl Impl>
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallNonGenericMethod(JSContext *cx, CallArgs args)
{
HandleValue thisv = args.thisv();
@ -102,7 +102,7 @@ CallNonGenericMethod(JSContext *cx, CallArgs args)
return detail::CallMethodIfWrapped(cx, Test, Impl, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallNonGenericMethod(JSContext *cx, IsAcceptableThis Test, NativeImpl Impl, CallArgs args)
{
HandleValue thisv = args.thisv();

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

@ -39,7 +39,7 @@ class SpecialId;
// to #include jsfun.h.
extern JS_FRIEND_DATA(const js::Class* const) FunctionClassPtr;
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
SPECIALID_TO_JSID(const SpecialId &sid);
/*
@ -58,7 +58,7 @@ class SpecialId
uintptr_t bits_;
/* Needs access to raw bits. */
friend JS_ALWAYS_INLINE jsid SPECIALID_TO_JSID(const SpecialId &sid);
friend MOZ_ALWAYS_INLINE jsid SPECIALID_TO_JSID(const SpecialId &sid);
friend class PropertyId;
static const uintptr_t TYPE_VOID = JSID_TYPE_VOID;
@ -113,7 +113,7 @@ class SpecialId
}
};
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
SPECIALID_TO_JSID(const SpecialId &sid)
{
jsid id;
@ -124,13 +124,13 @@ SPECIALID_TO_JSID(const SpecialId &sid)
return id;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_SPECIAL(jsid id)
{
return JSID_IS_OBJECT(id) || JSID_IS_EMPTY(id) || JSID_IS_VOID(id);
}
static JS_ALWAYS_INLINE SpecialId
static MOZ_ALWAYS_INLINE SpecialId
JSID_TO_SPECIALID(jsid id)
{
JS_ASSERT(JSID_IS_SPECIAL(id));
@ -635,13 +635,13 @@ JS_STATIC_ASSERT(offsetof(JSClass, hasInstance) == offsetof(Class, hasInstance))
JS_STATIC_ASSERT(offsetof(JSClass, trace) == offsetof(Class, trace));
JS_STATIC_ASSERT(sizeof(JSClass) == sizeof(Class));
static JS_ALWAYS_INLINE const JSClass *
static MOZ_ALWAYS_INLINE const JSClass *
Jsvalify(const Class *c)
{
return (const JSClass *)c;
}
static JS_ALWAYS_INLINE const Class *
static MOZ_ALWAYS_INLINE const Class *
Valueify(const JSClass *c)
{
return (const Class *)c;

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

@ -432,7 +432,7 @@ UnmarkGrayGCThingRecursively(void *thing, JSGCTraceKind kind);
* data). During incremental GC, since the gray bits haven't been computed yet,
* we conservatively mark the object black.
*/
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
ExposeGCThingToActiveJS(void *thing, JSGCTraceKind kind)
{
JS_ASSERT(kind != JSTRACE_SHAPE);
@ -453,14 +453,14 @@ ExposeGCThingToActiveJS(void *thing, JSGCTraceKind kind)
UnmarkGrayGCThingRecursively(thing, kind);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
ExposeValueToActiveJS(const Value &v)
{
if (v.isMarkable())
ExposeGCThingToActiveJS(v.toGCThing(), v.gcKind());
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
ExposeObjectToActiveJS(JSObject *obj)
{
ExposeGCThingToActiveJS(obj, JSTRACE_OBJECT);
@ -469,7 +469,7 @@ ExposeObjectToActiveJS(JSObject *obj)
/*
* If a GC is currently marking, mark the object black.
*/
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MarkGCThingAsLive(JSRuntime *rt_, void *thing, JSGCTraceKind kind)
{
shadow::Runtime *rt = shadow::Runtime::asShadowRuntime(rt_);
@ -484,7 +484,7 @@ MarkGCThingAsLive(JSRuntime *rt_, void *thing, JSGCTraceKind kind)
IncrementalReferenceBarrier(thing, kind);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MarkStringAsLive(Zone *zone, JSString *string)
{
JSRuntime *rt = JS::shadow::Zone::asShadowZone(zone)->runtimeFromMainThread();

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

@ -113,7 +113,7 @@ struct Zone
namespace js {
namespace gc {
static JS_ALWAYS_INLINE uintptr_t *
static MOZ_ALWAYS_INLINE uintptr_t *
GetGCThingMarkBitmap(const void *thing)
{
JS_ASSERT(thing);
@ -123,7 +123,7 @@ GetGCThingMarkBitmap(const void *thing)
return reinterpret_cast<uintptr_t *>(addr);
}
static JS_ALWAYS_INLINE JS::shadow::Runtime *
static MOZ_ALWAYS_INLINE JS::shadow::Runtime *
GetGCThingRuntime(const void *thing)
{
JS_ASSERT(thing);
@ -133,7 +133,7 @@ GetGCThingRuntime(const void *thing)
return *reinterpret_cast<JS::shadow::Runtime **>(addr);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
GetGCThingMarkWordAndMask(const void *thing, uint32_t color,
uintptr_t **wordp, uintptr_t *maskp)
{
@ -146,7 +146,7 @@ GetGCThingMarkWordAndMask(const void *thing, uint32_t color,
*wordp = &bitmap[bit / nbits];
}
static JS_ALWAYS_INLINE JS::shadow::ArenaHeader *
static MOZ_ALWAYS_INLINE JS::shadow::ArenaHeader *
GetGCThingArena(void *thing)
{
uintptr_t addr = uintptr_t(thing);
@ -154,7 +154,7 @@ GetGCThingArena(void *thing)
return reinterpret_cast<JS::shadow::ArenaHeader *>(addr);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsInsideNursery(const JS::shadow::Runtime *runtime, const void *p)
{
#ifdef JSGC_GENERATIONAL
@ -170,20 +170,20 @@ IsInsideNursery(const JS::shadow::Runtime *runtime, const void *p)
namespace JS {
static JS_ALWAYS_INLINE Zone *
static MOZ_ALWAYS_INLINE Zone *
GetGCThingZone(void *thing)
{
JS_ASSERT(thing);
return js::gc::GetGCThingArena(thing)->zone;
}
static JS_ALWAYS_INLINE Zone *
static MOZ_ALWAYS_INLINE Zone *
GetObjectZone(JSObject *obj)
{
return GetGCThingZone(obj);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GCThingIsMarkedGray(void *thing)
{
#ifdef JSGC_GENERATIONAL
@ -201,7 +201,7 @@ GCThingIsMarkedGray(void *thing)
return *word & mask;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsIncrementalBarrierNeededOnGCThing(shadow::Runtime *rt, void *thing, JSGCTraceKind kind)
{
if (!rt->needsBarrier_)

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

@ -46,32 +46,32 @@ struct jsid
// Objective-C++ which, apparently, wants to be able to #include jsapi.h.
#define id iden
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_STRING(jsid id)
{
return (JSID_BITS(id) & JSID_TYPE_MASK) == 0;
}
static JS_ALWAYS_INLINE JSString *
static MOZ_ALWAYS_INLINE JSString *
JSID_TO_STRING(jsid id)
{
JS_ASSERT(JSID_IS_STRING(id));
return (JSString *)JSID_BITS(id);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_ZERO(jsid id)
{
return JSID_BITS(id) == 0;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_INT(jsid id)
{
return !!(JSID_BITS(id) & JSID_TYPE_INT);
}
static JS_ALWAYS_INLINE int32_t
static MOZ_ALWAYS_INLINE int32_t
JSID_TO_INT(jsid id)
{
JS_ASSERT(JSID_IS_INT(id));
@ -81,13 +81,13 @@ JSID_TO_INT(jsid id)
#define JSID_INT_MIN 0
#define JSID_INT_MAX INT32_MAX
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
INT_FITS_IN_JSID(int32_t i)
{
return i >= 0;
}
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
INT_TO_JSID(int32_t i)
{
jsid id;
@ -96,21 +96,21 @@ INT_TO_JSID(int32_t i)
return id;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_OBJECT(jsid id)
{
return (JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_OBJECT &&
(size_t)JSID_BITS(id) != JSID_TYPE_OBJECT;
}
static JS_ALWAYS_INLINE JSObject *
static MOZ_ALWAYS_INLINE JSObject *
JSID_TO_OBJECT(jsid id)
{
JS_ASSERT(JSID_IS_OBJECT(id));
return (JSObject *)(JSID_BITS(id) & ~(size_t)JSID_TYPE_MASK);
}
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
OBJECT_TO_JSID(JSObject *obj)
{
jsid id;
@ -120,19 +120,19 @@ OBJECT_TO_JSID(JSObject *obj)
return id;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_GCTHING(jsid id)
{
return JSID_IS_STRING(id) || JSID_IS_OBJECT(id);
}
static JS_ALWAYS_INLINE void *
static MOZ_ALWAYS_INLINE void *
JSID_TO_GCTHING(jsid id)
{
return (void *)(JSID_BITS(id) & ~(size_t)JSID_TYPE_MASK);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_VOID(const jsid id)
{
JS_ASSERT_IF(((size_t)JSID_BITS(id) & JSID_TYPE_MASK) == JSID_TYPE_VOID,
@ -140,7 +140,7 @@ JSID_IS_VOID(const jsid id)
return ((size_t)JSID_BITS(id) == JSID_TYPE_VOID);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_EMPTY(const jsid id)
{
return ((size_t)JSID_BITS(id) == JSID_TYPE_OBJECT);

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

@ -83,7 +83,7 @@ extern JS_PUBLIC_DATA(uint32_t) OOM_counter; /* data race, who cares. */
#ifdef JS_OOM_DO_BACKTRACES
#define JS_OOM_BACKTRACE_SIZE 32
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
PrintBacktrace()
{
void* OOM_trace[JS_OOM_BACKTRACE_SIZE];
@ -369,10 +369,10 @@ static inline void js_free(void* p)
mozilla::Forward<P12>(p12)))\
}\
JS_DECLARE_NEW_METHODS(js_new, js_malloc, static JS_ALWAYS_INLINE)
JS_DECLARE_NEW_METHODS(js_new, js_malloc, static MOZ_ALWAYS_INLINE)
template <class T>
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
js_delete(T *p)
{
if (p) {
@ -382,7 +382,7 @@ js_delete(T *p)
}
template<class T>
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
js_delete_poison(T *p)
{
if (p) {
@ -393,21 +393,21 @@ js_delete_poison(T *p)
}
template <class T>
static JS_ALWAYS_INLINE T *
static MOZ_ALWAYS_INLINE T *
js_pod_malloc()
{
return (T *)js_malloc(sizeof(T));
}
template <class T>
static JS_ALWAYS_INLINE T *
static MOZ_ALWAYS_INLINE T *
js_pod_calloc()
{
return (T *)js_calloc(sizeof(T));
}
template <class T>
static JS_ALWAYS_INLINE T *
static MOZ_ALWAYS_INLINE T *
js_pod_malloc(size_t numElems)
{
if (numElems & mozilla::tl::MulOverflowMask<sizeof(T)>::value)
@ -416,7 +416,7 @@ js_pod_malloc(size_t numElems)
}
template <class T>
static JS_ALWAYS_INLINE T *
static MOZ_ALWAYS_INLINE T *
js_pod_calloc(size_t numElems)
{
if (numElems & mozilla::tl::MulOverflowMask<sizeof(T)>::value)

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

@ -306,13 +306,13 @@ CompileRegExpObject(JSContext *cx, RegExpObjectBuilder &builder, CallArgs args)
return true;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsRegExp(HandleValue v)
{
return v.isObject() && v.toObject().is<RegExpObject>();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
regexp_compile_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsRegExp(args.thisv()));
@ -351,7 +351,7 @@ regexp_construct(JSContext *cx, unsigned argc, Value *vp)
return CompileRegExpObject(cx, builder, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
regexp_toString_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsRegExp(args.thisv()));

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

@ -791,7 +791,7 @@ static const JSFunctionSpec sModuleFunctions[] = {
JS_FS_END
};
static JS_ALWAYS_INLINE JSString*
static MOZ_ALWAYS_INLINE JSString*
NewUCString(JSContext* cx, const AutoString& from)
{
return JS_NewUCStringCopyN(cx, from.begin(), from.length());
@ -802,7 +802,7 @@ NewUCString(JSContext* cx, const AutoString& from)
*
* Note: |align| must be a power of 2.
*/
static JS_ALWAYS_INLINE size_t
static MOZ_ALWAYS_INLINE size_t
Align(size_t val, size_t align)
{
// Ensure that align is a power of two.
@ -1423,7 +1423,7 @@ JS_STATIC_ASSERT(NumericLimits<double>::is_signed);
// where the trivial POD constructor will do.
template<class TargetType, class FromType>
struct ConvertImpl {
static JS_ALWAYS_INLINE TargetType Convert(FromType d) {
static MOZ_ALWAYS_INLINE TargetType Convert(FromType d) {
return TargetType(d);
}
};
@ -1433,7 +1433,7 @@ struct ConvertImpl {
// double is greater than 2^63 - 1. Help it along a little.
template<>
struct ConvertImpl<uint64_t, double> {
static JS_ALWAYS_INLINE uint64_t Convert(double d) {
static MOZ_ALWAYS_INLINE uint64_t Convert(double d) {
return d > 0x7fffffffffffffffui64 ?
uint64_t(d - 0x8000000000000000ui64) + 0x8000000000000000ui64 :
uint64_t(d);
@ -1449,7 +1449,7 @@ struct ConvertImpl<uint64_t, double> {
// Simulate x86 overflow behavior
template<>
struct ConvertImpl<uint64_t, double> {
static JS_ALWAYS_INLINE uint64_t Convert(double d) {
static MOZ_ALWAYS_INLINE uint64_t Convert(double d) {
return d >= 0xffffffffffffffff ?
0x8000000000000000 : uint64_t(d);
}
@ -1457,7 +1457,7 @@ struct ConvertImpl<uint64_t, double> {
template<>
struct ConvertImpl<int64_t, double> {
static JS_ALWAYS_INLINE int64_t Convert(double d) {
static MOZ_ALWAYS_INLINE int64_t Convert(double d) {
return d >= 0x7fffffffffffffff ?
0x8000000000000000 : int64_t(d);
}
@ -1465,13 +1465,13 @@ struct ConvertImpl<int64_t, double> {
#endif
template<class TargetType, class FromType>
static JS_ALWAYS_INLINE TargetType Convert(FromType d)
static MOZ_ALWAYS_INLINE TargetType Convert(FromType d)
{
return ConvertImpl<TargetType, FromType>::Convert(d);
}
template<class TargetType, class FromType>
static JS_ALWAYS_INLINE bool IsAlwaysExact()
static MOZ_ALWAYS_INLINE bool IsAlwaysExact()
{
// Return 'true' if TargetType can always exactly represent FromType.
// This means that:
@ -1500,7 +1500,7 @@ static JS_ALWAYS_INLINE bool IsAlwaysExact()
// TargetType 'j'. Default case where both types are the same signedness.
template<class TargetType, class FromType, bool TargetSigned, bool FromSigned>
struct IsExactImpl {
static JS_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
static MOZ_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
JS_STATIC_ASSERT(NumericLimits<TargetType>::is_exact);
return FromType(j) == i;
}
@ -1509,7 +1509,7 @@ struct IsExactImpl {
// Specialization where TargetType is unsigned, FromType is signed.
template<class TargetType, class FromType>
struct IsExactImpl<TargetType, FromType, false, true> {
static JS_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
static MOZ_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
JS_STATIC_ASSERT(NumericLimits<TargetType>::is_exact);
return i >= 0 && FromType(j) == i;
}
@ -1518,7 +1518,7 @@ struct IsExactImpl<TargetType, FromType, false, true> {
// Specialization where TargetType is signed, FromType is unsigned.
template<class TargetType, class FromType>
struct IsExactImpl<TargetType, FromType, true, false> {
static JS_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
static MOZ_ALWAYS_INLINE bool Test(FromType i, TargetType j) {
JS_STATIC_ASSERT(NumericLimits<TargetType>::is_exact);
return TargetType(i) >= 0 && FromType(j) == i;
}
@ -1527,7 +1527,7 @@ struct IsExactImpl<TargetType, FromType, true, false> {
// Convert FromType 'i' to TargetType 'result', returning true iff 'result'
// is an exact representation of 'i'.
template<class TargetType, class FromType>
static JS_ALWAYS_INLINE bool ConvertExact(FromType i, TargetType* result)
static MOZ_ALWAYS_INLINE bool ConvertExact(FromType i, TargetType* result)
{
// Require that TargetType is integral, to simplify conversion.
JS_STATIC_ASSERT(NumericLimits<TargetType>::is_exact);
@ -1549,7 +1549,7 @@ static JS_ALWAYS_INLINE bool ConvertExact(FromType i, TargetType* result)
// where IntegerType is unsigned.
template<class Type, bool IsSigned>
struct IsNegativeImpl {
static JS_ALWAYS_INLINE bool Test(Type i) {
static MOZ_ALWAYS_INLINE bool Test(Type i) {
return false;
}
};
@ -1557,14 +1557,14 @@ struct IsNegativeImpl {
// Specialization where Type is signed.
template<class Type>
struct IsNegativeImpl<Type, true> {
static JS_ALWAYS_INLINE bool Test(Type i) {
static MOZ_ALWAYS_INLINE bool Test(Type i) {
return i < 0;
}
};
// Determine whether Type 'i' is negative.
template<class Type>
static JS_ALWAYS_INLINE bool IsNegative(Type i)
static MOZ_ALWAYS_INLINE bool IsNegative(Type i)
{
return IsNegativeImpl<Type, NumericLimits<Type>::is_signed>::Test(i);
}
@ -5405,7 +5405,7 @@ PrepareReturnType(JSContext* cx, jsval type)
return result;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsEllipsis(JSContext* cx, jsval v, bool* isEllipsis)
{
*isEllipsis = false;

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

@ -171,7 +171,7 @@ DeflateStringToUTF8Buffer(JSContext *maybecx, const jschar *src, size_t srclen,
** Function and struct API definitions
*******************************************************************************/
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
ASSERT_OK(bool ok)
{
JS_ASSERT(ok);

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

@ -214,7 +214,7 @@ class InlineMap
return inl + inlNext;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
Ptr lookup(const K &key) {
if (usingMap())
return Ptr(map.lookup(key));
@ -227,7 +227,7 @@ class InlineMap
return Ptr(nullptr);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
AddPtr lookupForAdd(const K &key) {
if (usingMap())
return AddPtr(map.lookupForAdd(key));
@ -245,7 +245,7 @@ class InlineMap
return AddPtr(inl + inlNext, false);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool add(AddPtr &p, const K &key, const V &value) {
JS_ASSERT(!p);
@ -269,7 +269,7 @@ class InlineMap
return map.add(p.mapAddPtr, key, value);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool put(const K &key, const V &value) {
AddPtr p = lookupForAdd(key);
if (p) {

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

@ -28,7 +28,7 @@ namespace detail {
static const size_t LIFO_ALLOC_ALIGN = 8;
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
char *
AlignPtr(void *orig)
{
@ -124,7 +124,7 @@ class BumpChunk
}
// Try to perform an allocation of size |n|, return null if not possible.
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
void *tryAlloc(size_t n) {
char *aligned = AlignPtr(bump);
char *newBump = aligned + n;
@ -258,7 +258,7 @@ class LifoAlloc
freeAll();
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
void *alloc(size_t n) {
JS_OOM_POSSIBLY_FAIL();
@ -272,7 +272,7 @@ class LifoAlloc
return latest->allocInfallible(n);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
void *allocInfallible(size_t n) {
void *result;
if (latest && (result = latest->tryAlloc(n)))
@ -287,7 +287,7 @@ class LifoAlloc
// Ensures that enough space exists to satisfy N bytes worth of
// allocation requests, not necessarily contiguous. Note that this does
// not guarantee a successful single allocation of N bytes.
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool ensureUnusedApproximate(size_t n) {
size_t total = 0;
for (BumpChunk *chunk = latest; chunk; chunk = chunk->next()) {
@ -394,12 +394,12 @@ class LifoAlloc
// Doesn't perform construction; useful for lazily-initialized POD types.
template <typename T>
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
T *newPod() {
return static_cast<T *>(alloc(sizeof(T)));
}
JS_DECLARE_NEW_METHODS(new_, alloc, JS_ALWAYS_INLINE)
JS_DECLARE_NEW_METHODS(new_, alloc, MOZ_ALWAYS_INLINE)
// A mutable enumeration of the allocated data.
class Enum

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

@ -14,7 +14,7 @@ namespace js {
namespace detail {
template<typename T>
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
CopyNonEmptyArray(T *dst, const T *src, size_t nelems)
{
JS_ASSERT(nelems != 0);
@ -26,7 +26,7 @@ CopyNonEmptyArray(T *dst, const T *src, size_t nelems)
/* Helper function for MergeSort. */
template<typename T, typename Comparator>
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
MergeArrayRuns(T *dst, const T *src, size_t run1, size_t run2, Comparator c)
{
JS_ASSERT(run1 >= 1);

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

@ -179,7 +179,7 @@ struct BytecodeEmitter
bool isAliasedName(ParseNode *pn);
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool makeAtomIndex(JSAtom *atom, jsatomid *indexp) {
AtomIndexAddPtr p = atomIndices->lookupForAdd(atom);
if (p) {

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

@ -202,7 +202,7 @@ class DefinitionSingle
struct AtomDefnMapPtr : public AtomThingMapPtr<AtomDefnMap>
{
template <typename ParseHandler>
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
typename ParseHandler::DefinitionNode lookupDefn(JSAtom *atom) {
AtomDefnMap::Ptr p = map_->lookup(atom);
return p ? p.value().get<ParseHandler>() : ParseHandler::nullDefinition();

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

@ -5401,7 +5401,7 @@ Precedence(ParseNodeKind pnk) {
}
template <typename ParseHandler>
JS_ALWAYS_INLINE typename ParseHandler::Node
MOZ_ALWAYS_INLINE typename ParseHandler::Node
Parser<ParseHandler>::orExpr1()
{
// Shift-reduce parser for the left-associative binary operator part of
@ -5467,7 +5467,7 @@ Parser<ParseHandler>::orExpr1()
}
template <typename ParseHandler>
JS_ALWAYS_INLINE typename ParseHandler::Node
MOZ_ALWAYS_INLINE typename ParseHandler::Node
Parser<ParseHandler>::condExpr1()
{
Node condition = orExpr1();

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

@ -134,7 +134,7 @@ TokenStream::SourceCoords::SourceCoords(ExclusiveContext *cx, uint32_t ln)
lineStartOffsets_.infallibleAppend(maxPtr);
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
TokenStream::SourceCoords::add(uint32_t lineNum, uint32_t lineStartOffset)
{
uint32_t lineIndex = lineNumToIndex(lineNum);
@ -160,7 +160,7 @@ TokenStream::SourceCoords::add(uint32_t lineNum, uint32_t lineStartOffset)
}
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
TokenStream::SourceCoords::fill(const TokenStream::SourceCoords &other)
{
JS_ASSERT(lineStartOffsets_.back() == MAX_PTR);
@ -176,7 +176,7 @@ TokenStream::SourceCoords::fill(const TokenStream::SourceCoords &other)
(void)lineStartOffsets_.append(other.lineStartOffsets_[i]);
}
JS_ALWAYS_INLINE uint32_t
MOZ_ALWAYS_INLINE uint32_t
TokenStream::SourceCoords::lineIndexOf(uint32_t offset) const
{
uint32_t iMin, iMax, iMid;
@ -348,7 +348,7 @@ TokenStream::~TokenStream()
# define fast_getc getc
#endif
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
TokenStream::updateLineInfoForEOL()
{
prevLinebase = linebase;
@ -357,7 +357,7 @@ TokenStream::updateLineInfoForEOL()
srcCoords.add(lineno, linebase - userbuf.base());
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
TokenStream::updateFlagsForEOL()
{
flags.isDirtyLine = false;
@ -888,7 +888,7 @@ TokenStream::getSourceMappingURL(bool isMultiline, bool shouldWarnDeprecated)
"sourceMappingURL", &sourceMapURL_);
}
JS_ALWAYS_INLINE Token *
MOZ_ALWAYS_INLINE Token *
TokenStream::newToken(ptrdiff_t adjust)
{
cursor = (cursor + 1) & ntokensMask;
@ -901,7 +901,7 @@ TokenStream::newToken(ptrdiff_t adjust)
return tp;
}
JS_ALWAYS_INLINE JSAtom *
MOZ_ALWAYS_INLINE JSAtom *
TokenStream::atomize(ExclusiveContext *cx, CharBuffer &cb)
{
return AtomizeChars(cx, cb.begin(), cb.length());

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

@ -539,7 +539,7 @@ class MOZ_STACK_CLASS TokenStream
// returns TOK_EOL. In that case, no token with TOK_EOL is actually
// created, just a TOK_EOL TokenKind is returned, and currentToken()
// shouldn't be consulted. (This is the only place TOK_EOL is produced.)
JS_ALWAYS_INLINE TokenKind peekTokenSameLine(Modifier modifier = None) {
MOZ_ALWAYS_INLINE TokenKind peekTokenSameLine(Modifier modifier = None) {
const Token &curr = currentToken();
// If lookahead != 0, we have scanned ahead at least one token, and

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

@ -182,14 +182,14 @@ template <typename T>
class BarrieredCell : public gc::Cell
{
public:
JS_ALWAYS_INLINE JS::Zone *zone() const { return tenuredZone(); }
JS_ALWAYS_INLINE JS::shadow::Zone *shadowZone() const { return JS::shadow::Zone::asShadowZone(zone()); }
JS_ALWAYS_INLINE JS::Zone *zoneFromAnyThread() const { return tenuredZoneFromAnyThread(); }
JS_ALWAYS_INLINE JS::shadow::Zone *shadowZoneFromAnyThread() const {
MOZ_ALWAYS_INLINE JS::Zone *zone() const { return tenuredZone(); }
MOZ_ALWAYS_INLINE JS::shadow::Zone *shadowZone() const { return JS::shadow::Zone::asShadowZone(zone()); }
MOZ_ALWAYS_INLINE JS::Zone *zoneFromAnyThread() const { return tenuredZoneFromAnyThread(); }
MOZ_ALWAYS_INLINE JS::shadow::Zone *shadowZoneFromAnyThread() const {
return JS::shadow::Zone::asShadowZone(zoneFromAnyThread());
}
static JS_ALWAYS_INLINE void readBarrier(T *thing) {
static MOZ_ALWAYS_INLINE void readBarrier(T *thing) {
#ifdef JSGC_INCREMENTAL
// Off thread Ion compilation never occurs when barriers are active.
js::AutoThreadSafeAccess ts(thing);
@ -204,7 +204,7 @@ class BarrieredCell : public gc::Cell
#endif
}
static JS_ALWAYS_INLINE bool needWriteBarrierPre(JS::Zone *zone) {
static MOZ_ALWAYS_INLINE bool needWriteBarrierPre(JS::Zone *zone) {
#ifdef JSGC_INCREMENTAL
return JS::shadow::Zone::asShadowZone(zone)->needsBarrier();
#else
@ -212,9 +212,9 @@ class BarrieredCell : public gc::Cell
#endif
}
static JS_ALWAYS_INLINE bool isNullLike(T *thing) { return !thing; }
static MOZ_ALWAYS_INLINE bool isNullLike(T *thing) { return !thing; }
static JS_ALWAYS_INLINE void writeBarrierPre(T *thing) {
static MOZ_ALWAYS_INLINE void writeBarrierPre(T *thing) {
#ifdef JSGC_INCREMENTAL
if (isNullLike(thing) || !thing->shadowRuntimeFromAnyThread()->needsBarrier())
return;
@ -254,7 +254,7 @@ ShadowZoneOfString(JSString *str)
return JS::shadow::Zone::asShadowZone(reinterpret_cast<const js::gc::Cell *>(str)->tenuredZone());
}
JS_ALWAYS_INLINE JS::Zone *
MOZ_ALWAYS_INLINE JS::Zone *
ZoneOfValue(const JS::Value &value)
{
JS_ASSERT(value.isMarkable());
@ -279,7 +279,7 @@ ShadowZoneOfStringFromAnyThread(JSString *str)
reinterpret_cast<const js::gc::Cell *>(str)->tenuredZoneFromAnyThread());
}
JS_ALWAYS_INLINE JS::Zone *
MOZ_ALWAYS_INLINE JS::Zone *
ZoneOfValueFromAnyThread(const JS::Value &value)
{
JS_ASSERT(value.isMarkable());

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

@ -117,7 +117,7 @@ DeclMarker(TypeObject, types::TypeObject)
/* Return true if the pointer is nullptr, or if it is a tagged pointer to
* nullptr.
*/
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsNullTaggedPointer(void *p)
{
return uintptr_t(p) < 32;

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

@ -68,7 +68,7 @@ class RelocationOverlay
} /* namespace js */
template <typename T>
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
js::Nursery::getForwardedPointer(T **ref)
{
JS_ASSERT(ref);

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

@ -290,7 +290,7 @@ class MinorCollectionTracer : public JSTracer
AutoEnterOOMUnsafeRegion oomUnsafeRegion;
/* Insert the given relocation entry into the list of things to visit. */
JS_ALWAYS_INLINE void insertIntoFixupList(RelocationOverlay *entry) {
MOZ_ALWAYS_INLINE void insertIntoFixupList(RelocationOverlay *entry) {
*tail = entry;
tail = &entry->next_;
*tail = nullptr;
@ -455,7 +455,7 @@ js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc, TenureCountCache &t
}
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
js::Nursery::traceObject(MinorCollectionTracer *trc, JSObject *obj)
{
const Class *clasp = obj->getClass();
@ -474,20 +474,20 @@ js::Nursery::traceObject(MinorCollectionTracer *trc, JSObject *obj)
markSlots(trc, dynStart, dynEnd);
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
js::Nursery::markSlots(MinorCollectionTracer *trc, HeapSlot *vp, uint32_t nslots)
{
markSlots(trc, vp, vp + nslots);
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
js::Nursery::markSlots(MinorCollectionTracer *trc, HeapSlot *vp, HeapSlot *end)
{
for (; vp != end; ++vp)
markSlot(trc, vp);
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
js::Nursery::markSlot(MinorCollectionTracer *trc, HeapSlot *slotp)
{
if (!slotp->isObject())

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

@ -74,7 +74,7 @@ class Nursery
bool isEmpty() const;
template <typename T>
JS_ALWAYS_INLINE bool isInside(const T *p) const {
MOZ_ALWAYS_INLINE bool isInside(const T *p) const {
return gc::IsInsideNursery((JS::shadow::Runtime *)runtime_, p);
}
@ -124,7 +124,7 @@ class Nursery
* returns false and leaves |*ref| unset.
*/
template <typename T>
JS_ALWAYS_INLINE bool getForwardedPointer(T **ref);
MOZ_ALWAYS_INLINE bool getForwardedPointer(T **ref);
/* Forward a slots/elements pointer stored in an Ion frame. */
void forwardBufferPointer(HeapSlot **pSlotsElems);
@ -202,17 +202,17 @@ class Nursery
return reinterpret_cast<NurseryChunkLayout *>(start())[index];
}
JS_ALWAYS_INLINE uintptr_t start() const {
MOZ_ALWAYS_INLINE uintptr_t start() const {
JS_ASSERT(runtime_);
return ((JS::shadow::Runtime *)runtime_)->gcNurseryStart_;
}
JS_ALWAYS_INLINE uintptr_t heapEnd() const {
MOZ_ALWAYS_INLINE uintptr_t heapEnd() const {
JS_ASSERT(runtime_);
return ((JS::shadow::Runtime *)runtime_)->gcNurseryEnd_;
}
JS_ALWAYS_INLINE void setCurrentChunk(int chunkno) {
MOZ_ALWAYS_INLINE void setCurrentChunk(int chunkno) {
JS_ASSERT(chunkno < NumNurseryChunks);
JS_ASSERT(chunkno < numActiveChunks_);
currentChunk_ = chunkno;
@ -221,16 +221,16 @@ class Nursery
currentEnd_ = chunk(chunkno).end();
}
JS_ALWAYS_INLINE uintptr_t allocationEnd() const {
MOZ_ALWAYS_INLINE uintptr_t allocationEnd() const {
JS_ASSERT(numActiveChunks_ > 0);
return chunk(numActiveChunks_ - 1).end();
}
JS_ALWAYS_INLINE bool isFullyGrown() const {
MOZ_ALWAYS_INLINE bool isFullyGrown() const {
return numActiveChunks_ == NumNurseryChunks;
}
JS_ALWAYS_INLINE uintptr_t currentEnd() const {
MOZ_ALWAYS_INLINE uintptr_t currentEnd() const {
JS_ASSERT(runtime_);
JS_ASSERT(currentEnd_ == chunk(currentChunk_).end());
return currentEnd_;
@ -258,10 +258,10 @@ class Nursery
* |dst| in Tenured.
*/
void collectToFixedPoint(gc::MinorCollectionTracer *trc, TenureCountCache &tenureCounts);
JS_ALWAYS_INLINE void traceObject(gc::MinorCollectionTracer *trc, JSObject *src);
JS_ALWAYS_INLINE void markSlots(gc::MinorCollectionTracer *trc, HeapSlot *vp, uint32_t nslots);
JS_ALWAYS_INLINE void markSlots(gc::MinorCollectionTracer *trc, HeapSlot *vp, HeapSlot *end);
JS_ALWAYS_INLINE void markSlot(gc::MinorCollectionTracer *trc, HeapSlot *slotp);
MOZ_ALWAYS_INLINE void traceObject(gc::MinorCollectionTracer *trc, JSObject *src);
MOZ_ALWAYS_INLINE void markSlots(gc::MinorCollectionTracer *trc, HeapSlot *vp, uint32_t nslots);
MOZ_ALWAYS_INLINE void markSlots(gc::MinorCollectionTracer *trc, HeapSlot *vp, HeapSlot *end);
MOZ_ALWAYS_INLINE void markSlot(gc::MinorCollectionTracer *trc, HeapSlot *slotp);
void *moveToTenured(gc::MinorCollectionTracer *trc, JSObject *src);
size_t moveObjectToTenured(JSObject *dst, JSObject *src, gc::AllocKind dstKind);
size_t moveElementsToTenured(JSObject *dst, JSObject *src, gc::AllocKind dstKind);

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

@ -21,7 +21,7 @@ using mozilla::ReentrancyGuard;
/*** SlotEdge ***/
JS_ALWAYS_INLINE HeapSlot *
MOZ_ALWAYS_INLINE HeapSlot *
StoreBuffer::SlotEdge::slotLocation() const
{
if (kind == HeapSlot::Element) {
@ -34,14 +34,14 @@ StoreBuffer::SlotEdge::slotLocation() const
return &object->getSlotRef(offset);
}
JS_ALWAYS_INLINE void *
MOZ_ALWAYS_INLINE void *
StoreBuffer::SlotEdge::deref() const
{
HeapSlot *loc = slotLocation();
return (loc && loc->isGCThing()) ? loc->toGCThing() : nullptr;
}
JS_ALWAYS_INLINE void *
MOZ_ALWAYS_INLINE void *
StoreBuffer::SlotEdge::location() const
{
return (void *)slotLocation();
@ -53,7 +53,7 @@ StoreBuffer::SlotEdge::inRememberedSet(const Nursery &nursery) const
return !nursery.isInside(object) && nursery.isInside(deref());
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
StoreBuffer::SlotEdge::isNullEdge() const
{
return !deref();

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

@ -291,12 +291,12 @@ class StoreBuffer
return object != other.object || offset != other.offset || kind != other.kind;
}
JS_ALWAYS_INLINE HeapSlot *slotLocation() const;
MOZ_ALWAYS_INLINE HeapSlot *slotLocation() const;
JS_ALWAYS_INLINE void *deref() const;
JS_ALWAYS_INLINE void *location() const;
MOZ_ALWAYS_INLINE void *deref() const;
MOZ_ALWAYS_INLINE void *location() const;
bool inRememberedSet(const Nursery &nursery) const;
JS_ALWAYS_INLINE bool isNullEdge() const;
MOZ_ALWAYS_INLINE bool isNullEdge() const;
void mark(JSTracer *trc);
};

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

@ -36,7 +36,7 @@ CheckNonAddressThing(uintptr_t *w, Rooted<T> *rootp)
return w >= (uintptr_t*)rootp->address() && w < (uintptr_t*)(rootp->address() + 1);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
CheckStackRootThing(uintptr_t *w, Rooted<void *> *rootp, ThingRootKind kind)
{
if (kind == THING_ROOT_BINDINGS)

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

@ -858,7 +858,7 @@ typedef void
/************************************************************************/
static JS_ALWAYS_INLINE jsval
static MOZ_ALWAYS_INLINE jsval
JS_NumberValue(double d)
{
int32_t i;
@ -887,7 +887,7 @@ INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str);
* Returns true iff the given jsval is immune to GC and can be used across
* multiple JSRuntimes without requiring any conversion API.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSVAL_IS_UNIVERSAL(jsval v)
{
return !JSVAL_IS_GCTHING(v);
@ -1076,7 +1076,7 @@ ToStringSlow(JSContext *cx, JS::HandleValue v);
namespace JS {
/* ES5 9.3 ToNumber. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToNumber(JSContext *cx, HandleValue v, double *out)
{
AssertArgumentsAreSane(cx, v);
@ -1092,7 +1092,7 @@ ToNumber(JSContext *cx, HandleValue v, double *out)
return js::ToNumberSlow(cx, v, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToBoolean(HandleValue v)
{
if (v.isBoolean())
@ -1110,7 +1110,7 @@ ToBoolean(HandleValue v)
return js::ToBooleanSlow(v);
}
JS_ALWAYS_INLINE JSString*
MOZ_ALWAYS_INLINE JSString*
ToString(JSContext *cx, HandleValue v)
{
if (v.isString())
@ -1154,7 +1154,7 @@ ToUint64Slow(JSContext *cx, JS::HandleValue v, uint64_t *out);
namespace JS {
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToUint16(JSContext *cx, JS::HandleValue v, uint16_t *out)
{
AssertArgumentsAreSane(cx, v);
@ -1167,7 +1167,7 @@ ToUint16(JSContext *cx, JS::HandleValue v, uint16_t *out)
return js::ToUint16Slow(cx, v, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToInt32(JSContext *cx, JS::HandleValue v, int32_t *out)
{
AssertArgumentsAreSane(cx, v);
@ -1180,7 +1180,7 @@ ToInt32(JSContext *cx, JS::HandleValue v, int32_t *out)
return js::ToInt32Slow(cx, v, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToUint32(JSContext *cx, JS::HandleValue v, uint32_t *out)
{
AssertArgumentsAreSane(cx, v);
@ -1193,7 +1193,7 @@ ToUint32(JSContext *cx, JS::HandleValue v, uint32_t *out)
return js::ToUint32Slow(cx, v, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToInt64(JSContext *cx, JS::HandleValue v, int64_t *out)
{
AssertArgumentsAreSane(cx, v);
@ -1207,7 +1207,7 @@ ToInt64(JSContext *cx, JS::HandleValue v, int64_t *out)
return js::ToInt64Slow(cx, v, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToUint64(JSContext *cx, JS::HandleValue v, uint64_t *out)
{
AssertArgumentsAreSane(cx, v);
@ -2028,19 +2028,19 @@ JS_RemoveExtraGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data);
* Use the following macros to check if a particular jsval is a traceable
* thing and to extract the thing and its kind to pass to JS_CallTracer.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSVAL_IS_TRACEABLE(jsval v)
{
return JSVAL_IS_TRACEABLE_IMPL(JSVAL_TO_IMPL(v));
}
static JS_ALWAYS_INLINE void *
static MOZ_ALWAYS_INLINE void *
JSVAL_TO_TRACEABLE(jsval v)
{
return JSVAL_TO_GCTHING(v);
}
static JS_ALWAYS_INLINE JSGCTraceKind
static MOZ_ALWAYS_INLINE JSGCTraceKind
JSVAL_TRACE_KIND(jsval v)
{
JS_ASSERT(JSVAL_IS_GCTHING(v));
@ -4102,21 +4102,21 @@ JS_FlattenString(JSContext *cx, JSString *str);
extern JS_PUBLIC_API(const jschar *)
JS_GetFlatStringChars(JSFlatString *str);
static JS_ALWAYS_INLINE JSFlatString *
static MOZ_ALWAYS_INLINE JSFlatString *
JSID_TO_FLAT_STRING(jsid id)
{
JS_ASSERT(JSID_IS_STRING(id));
return (JSFlatString *)(JSID_BITS(id));
}
static JS_ALWAYS_INLINE JSFlatString *
static MOZ_ALWAYS_INLINE JSFlatString *
JS_ASSERT_STRING_IS_FLAT(JSString *str)
{
JS_ASSERT(JS_GetFlatStringChars((JSFlatString *)str));
return (JSFlatString *)str;
}
static JS_ALWAYS_INLINE JSString *
static MOZ_ALWAYS_INLINE JSString *
JS_FORGET_STRING_FLATNESS(JSFlatString *fstr)
{
return (JSString *)fstr;

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

@ -871,13 +871,13 @@ AddLengthProperty(ExclusiveContext *cx, HandleObject obj)
}
#if JS_HAS_TOSOURCE
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsArray(HandleValue v)
{
return v.isObject() && v.toObject().is<ArrayObject>();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
array_toSource_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsArray(args.thisv()));
@ -3140,7 +3140,7 @@ EnsureNewArrayElements(ExclusiveContext *cx, JSObject *obj, uint32_t length)
}
template<bool allocateCapacity>
static JS_ALWAYS_INLINE ArrayObject *
static MOZ_ALWAYS_INLINE ArrayObject *
NewArray(ExclusiveContext *cxArg, uint32_t length,
JSObject *protoArg, NewObjectKind newKind = GenericObject)
{

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

@ -230,7 +230,7 @@ AtomIsInterned(JSContext *cx, JSAtom *atom)
* as a new JSAtom's storage without copying. The contract is that the caller no
* longer owns the memory and this method is responsible for freeing the memory.
*/
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static JSAtom *
AtomizeAndTakeOwnership(ExclusiveContext *cx, jschar *tbchars, size_t length, InternBehavior ib)
{
@ -280,7 +280,7 @@ AtomizeAndTakeOwnership(ExclusiveContext *cx, jschar *tbchars, size_t length, In
}
/* |tbchars| must not point into an inline or short string. */
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static JSAtom *
AtomizeAndCopyChars(ExclusiveContext *cx, const jschar *tbchars, size_t length, InternBehavior ib)
{

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

@ -27,7 +27,7 @@ namespace js {
JS_STATIC_ASSERT(sizeof(HashNumber) == 4);
static JS_ALWAYS_INLINE js::HashNumber
static MOZ_ALWAYS_INLINE js::HashNumber
HashId(jsid id)
{
return mozilla::HashGeneric(JSID_BITS(id));

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

@ -119,7 +119,7 @@ IndexToId(ExclusiveContext *cx, uint32_t index, MutableHandleId idp)
return IndexToIdSlow(cx, index, idp);
}
static JS_ALWAYS_INLINE JSFlatString *
static MOZ_ALWAYS_INLINE JSFlatString *
IdToString(JSContext *cx, jsid id)
{
if (JSID_IS_STRING(id))

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

@ -37,14 +37,14 @@ const Class BooleanObject::class_ = {
JS_ConvertStub
};
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsBoolean(HandleValue v)
{
return v.isBoolean() || (v.isObject() && v.toObject().is<BooleanObject>());
}
#if JS_HAS_TOSOURCE
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
bool_toSource_impl(JSContext *cx, CallArgs args)
{
HandleValue thisv = args.thisv();
@ -71,7 +71,7 @@ bool_toSource(JSContext *cx, unsigned argc, Value *vp)
}
#endif
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
bool_toString_impl(JSContext *cx, CallArgs args)
{
HandleValue thisv = args.thisv();
@ -89,7 +89,7 @@ bool_toString(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsBoolean, bool_toString_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
bool_valueOf_impl(JSContext *cx, CallArgs args)
{
HandleValue thisv = args.thisv();

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

@ -208,7 +208,7 @@ assertSameCompartment(ThreadSafeContext *cx,
#undef START_ASSERT_SAME_COMPARTMENT
STATIC_PRECONDITION_ASSUME(ubound(args.argv_) >= argc)
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallJSNative(JSContext *cx, Native native, const CallArgs &args)
{
JS_CHECK_RECURSION(cx, return false);
@ -226,7 +226,7 @@ CallJSNative(JSContext *cx, Native native, const CallArgs &args)
}
STATIC_PRECONDITION_ASSUME(ubound(args.argv_) >= argc)
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallNativeImpl(JSContext *cx, NativeImpl impl, const CallArgs &args)
{
#ifdef DEBUG
@ -242,7 +242,7 @@ CallNativeImpl(JSContext *cx, NativeImpl impl, const CallArgs &args)
}
STATIC_PRECONDITION(ubound(args.argv_) >= argc)
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallJSNativeConstructor(JSContext *cx, Native native, const CallArgs &args)
{
#ifdef DEBUG
@ -282,7 +282,7 @@ CallJSNativeConstructor(JSContext *cx, Native native, const CallArgs &args)
return true;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallJSPropertyOp(JSContext *cx, PropertyOp op, HandleObject receiver, HandleId id, MutableHandleValue vp)
{
JS_CHECK_RECURSION(cx, return false);
@ -294,7 +294,7 @@ CallJSPropertyOp(JSContext *cx, PropertyOp op, HandleObject receiver, HandleId i
return ok;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
CallJSPropertyOpSetter(JSContext *cx, StrictPropertyOp op, HandleObject obj, HandleId id,
bool strict, MutableHandleValue vp)
{

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

@ -1386,7 +1386,7 @@ DateObject::cachedLocalTime(DateTimeInfo *dtInfo)
return getReservedSlot(LOCAL_TIME_SLOT).toDouble();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsDate(HandleValue v)
{
return v.isObject() && v.toObject().is<DateObject>();
@ -1395,7 +1395,7 @@ IsDate(HandleValue v)
/*
* See ECMA 15.9.5.4 thru 15.9.5.23
*/
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getTime_impl(JSContext *cx, CallArgs args)
{
args.rval().set(args.thisv().toObject().as<DateObject>().UTCTime());
@ -1409,7 +1409,7 @@ date_getTime(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getTime_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getYear_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1434,7 +1434,7 @@ date_getYear(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getYear_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getFullYear_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1451,7 +1451,7 @@ date_getFullYear(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getFullYear_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCFullYear_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1469,7 +1469,7 @@ date_getUTCFullYear(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCFullYear_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getMonth_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1486,7 +1486,7 @@ date_getMonth(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getMonth_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCMonth_impl(JSContext *cx, CallArgs args)
{
double d = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1501,7 +1501,7 @@ date_getUTCMonth(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCMonth_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getDate_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1518,7 +1518,7 @@ date_getDate(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getDate_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCDate_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1536,7 +1536,7 @@ date_getUTCDate(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCDate_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getDay_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1553,7 +1553,7 @@ date_getDay(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getDay_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCDay_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1571,7 +1571,7 @@ date_getUTCDay(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCDay_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getHours_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1588,7 +1588,7 @@ date_getHours(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getHours_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCHours_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1606,7 +1606,7 @@ date_getUTCHours(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCHours_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getMinutes_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1623,7 +1623,7 @@ date_getMinutes(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getMinutes_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCMinutes_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1643,7 +1643,7 @@ date_getUTCMinutes(JSContext *cx, unsigned argc, Value *vp)
/* Date.getSeconds is mapped to getUTCSeconds */
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCSeconds_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1662,7 +1662,7 @@ date_getUTCSeconds(JSContext *cx, unsigned argc, Value *vp)
/* Date.getMilliseconds is mapped to getUTCMilliseconds */
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getUTCMilliseconds_impl(JSContext *cx, CallArgs args)
{
double result = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -1680,7 +1680,7 @@ date_getUTCMilliseconds(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getUTCMilliseconds_impl>(cx, args);
}
/* static */ JS_ALWAYS_INLINE bool
/* static */ MOZ_ALWAYS_INLINE bool
DateObject::getTimezoneOffset_impl(JSContext *cx, CallArgs args)
{
DateObject *dateObj = &args.thisv().toObject().as<DateObject>();
@ -1704,7 +1704,7 @@ date_getTimezoneOffset(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, DateObject::getTimezoneOffset_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setTime_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1759,7 +1759,7 @@ GetMinsOrDefault(JSContext *cx, const CallArgs &args, unsigned i, double t, doub
}
/* ES5 15.9.5.28. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setMilliseconds_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1789,7 +1789,7 @@ date_setMilliseconds(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.29. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCMilliseconds_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1819,7 +1819,7 @@ date_setUTCMilliseconds(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.30. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setSeconds_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1856,7 +1856,7 @@ date_setSeconds(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setSeconds_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCSeconds_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1893,7 +1893,7 @@ date_setUTCSeconds(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setUTCSeconds_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setMinutes_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1935,7 +1935,7 @@ date_setMinutes(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setMinutes_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCMinutes_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -1977,7 +1977,7 @@ date_setUTCMinutes(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setUTCMinutes_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setHours_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2024,7 +2024,7 @@ date_setHours(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setHours_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCHours_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2071,7 +2071,7 @@ date_setUTCHours(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setUTCHours_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setDate_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2103,7 +2103,7 @@ date_setDate(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_setDate_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCDate_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2155,7 +2155,7 @@ GetMonthOrDefault(JSContext *cx, const CallArgs &args, unsigned i, double t, dou
}
/* ES5 15.9.5.38. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setMonth_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2192,7 +2192,7 @@ date_setMonth(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.39. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCMonth_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2245,7 +2245,7 @@ ThisUTCTimeOrZero(Handle<DateObject*> dateObj)
}
/* ES5 15.9.5.40. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setFullYear_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2287,7 +2287,7 @@ date_setFullYear(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.41. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setUTCFullYear_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2329,7 +2329,7 @@ date_setUTCFullYear(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 Annex B.2.5. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_setYear_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2414,7 +2414,7 @@ print_iso_string(char* buf, size_t size, double utctime)
}
/* ES5 B.2.6. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toGMTString_impl(JSContext *cx, CallArgs args)
{
double utctime = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -2440,7 +2440,7 @@ date_toGMTString(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_toGMTString_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toISOString_impl(JSContext *cx, CallArgs args)
{
double utctime = args.thisv().toObject().as<DateObject>().UTCTime().toNumber();
@ -2720,7 +2720,7 @@ ToLocaleStringHelper(JSContext *cx, Handle<DateObject*> dateObj, MutableHandleVa
}
/* ES5 15.9.5.5. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toLocaleString_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2735,7 +2735,7 @@ date_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.6. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toLocaleDateString_impl(JSContext *cx, CallArgs args)
{
/*
@ -2762,7 +2762,7 @@ date_toLocaleDateString(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.7. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toLocaleTimeString_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2777,7 +2777,7 @@ date_toLocaleTimeString(JSContext *cx, unsigned argc, Value *vp)
}
#endif /* !EXPOSE_INTL_API */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toLocaleFormat_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());
@ -2815,7 +2815,7 @@ date_toLocaleFormat(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.4. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toTimeString_impl(JSContext *cx, CallArgs args)
{
return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
@ -2830,7 +2830,7 @@ date_toTimeString(JSContext *cx, unsigned argc, Value *vp)
}
/* ES5 15.9.5.3. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toDateString_impl(JSContext *cx, CallArgs args)
{
return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
@ -2845,7 +2845,7 @@ date_toDateString(JSContext *cx, unsigned argc, Value *vp)
}
#if JS_HAS_TOSOURCE
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toSource_impl(JSContext *cx, CallArgs args)
{
StringBuffer sb(cx);
@ -2871,7 +2871,7 @@ date_toSource(JSContext *cx, unsigned argc, Value *vp)
}
#endif
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_toString_impl(JSContext *cx, CallArgs args)
{
return date_format(cx, args.thisv().toObject().as<DateObject>().UTCTime().toNumber(),
@ -2885,7 +2885,7 @@ date_toString(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsDate, date_toString_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
date_valueOf_impl(JSContext *cx, CallArgs args)
{
Rooted<DateObject*> dateObj(cx, &args.thisv().toObject().as<DateObject>());

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

@ -481,7 +481,7 @@ GetObjectParent(JSObject *obj)
return reinterpret_cast<shadow::Object*>(obj)->shape->base->parent;
}
static JS_ALWAYS_INLINE JSCompartment *
static MOZ_ALWAYS_INLINE JSCompartment *
GetObjectCompartment(JSObject *obj)
{
return reinterpret_cast<shadow::Object*>(obj)->shape->base->compartment;
@ -1659,7 +1659,7 @@ inline int CheckIsParallelNative(JSParallelNative parallelNative);
} \
JS_JITINFO_NATIVE_PARALLEL(infoName, wrapperName##_ParallelNativeThreadSafeWrapper)
static JS_ALWAYS_INLINE const JSJitInfo *
static MOZ_ALWAYS_INLINE const JSJitInfo *
FUNCTION_VALUE_TO_JITINFO(const JS::Value& v)
{
JS_ASSERT(js::GetObjectClass(&v.toObject()) == js::FunctionClassPtr);
@ -1669,7 +1669,7 @@ FUNCTION_VALUE_TO_JITINFO(const JS::Value& v)
/* Statically asserted in jsfun.h. */
static const unsigned JS_FUNCTION_INTERPRETED_BIT = 0x1;
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SET_JITINFO(JSFunction * func, const JSJitInfo *info)
{
js::shadow::Function *fun = reinterpret_cast<js::shadow::Function *>(func);
@ -1682,7 +1682,7 @@ SET_JITINFO(JSFunction * func, const JSJitInfo *info)
* eliminate Gecko's dependencies on it!
*/
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
JSID_FROM_BITS(size_t bits)
{
jsid id;
@ -1717,7 +1717,7 @@ bool IdMatchesAtom(jsid id, JSAtom *atom);
* Thus, it is only the rare third case which needs this function, which
* handles any JSAtom* that is known not to be representable with an int jsid.
*/
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
NON_INTEGER_ATOM_TO_JSID(JSAtom *atom)
{
JS_ASSERT(((size_t)atom & 0x7) == 0);
@ -1727,19 +1727,19 @@ NON_INTEGER_ATOM_TO_JSID(JSAtom *atom)
}
/* All strings stored in jsids are atomized, but are not necessarily property names. */
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_ATOM(jsid id)
{
return JSID_IS_STRING(id);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
JSID_IS_ATOM(jsid id, JSAtom *atom)
{
return id == JSID_FROM_BITS((size_t)atom);
}
static JS_ALWAYS_INLINE JSAtom *
static MOZ_ALWAYS_INLINE JSAtom *
JSID_TO_ATOM(jsid id)
{
return (JSAtom *)JSID_TO_STRING(id);
@ -1749,7 +1749,7 @@ JS_STATIC_ASSERT(sizeof(jsid) == sizeof(void*));
namespace js {
static JS_ALWAYS_INLINE JS::Value
static MOZ_ALWAYS_INLINE JS::Value
IdToValue(jsid id)
{
if (JSID_IS_STRING(id))

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

@ -569,7 +569,7 @@ class ArenaLists
return false;
}
JS_ALWAYS_INLINE void *allocateFromFreeList(AllocKind thingKind, size_t thingSize) {
MOZ_ALWAYS_INLINE void *allocateFromFreeList(AllocKind thingKind, size_t thingSize) {
return freeLists[thingKind].allocate(thingSize);
}

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

@ -757,13 +757,13 @@ js::IteratorConstructor(JSContext *cx, unsigned argc, Value *vp)
return true;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsIterator(HandleValue v)
{
return v.isObject() && v.toObject().hasClass(&PropertyIteratorObject::class_);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
iterator_next_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsIterator(args.thisv()));
@ -1698,7 +1698,7 @@ SendToGenerator(JSContext *cx, JSGeneratorOp op, HandleObject obj,
return ok;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
star_generator_next(JSContext *cx, CallArgs args)
{
RootedObject thisObj(cx, &args.thisv().toObject());
@ -1720,7 +1720,7 @@ star_generator_next(JSContext *cx, CallArgs args)
args.rval());
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
star_generator_throw(JSContext *cx, CallArgs args)
{
RootedObject thisObj(cx, &args.thisv().toObject());
@ -1735,7 +1735,7 @@ star_generator_throw(JSContext *cx, CallArgs args)
args.rval());
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
legacy_generator_next(JSContext *cx, CallArgs args)
{
RootedObject thisObj(cx, &args.thisv().toObject());
@ -1755,7 +1755,7 @@ legacy_generator_next(JSContext *cx, CallArgs args)
args.rval());
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
legacy_generator_throw(JSContext *cx, CallArgs args)
{
RootedObject thisObj(cx, &args.thisv().toObject());
@ -1799,7 +1799,7 @@ CloseLegacyGenerator(JSContext *cx, HandleObject obj)
return CloseLegacyGenerator(cx, obj, &rval);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
legacy_generator_close(JSContext *cx, CallArgs args)
{
RootedObject thisObj(cx, &args.thisv().toObject());
@ -1808,7 +1808,7 @@ legacy_generator_close(JSContext *cx, CallArgs args)
}
template<typename T>
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsObjectOfType(HandleValue v)
{
return v.isObject() && v.toObject().is<T>();

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

@ -488,7 +488,7 @@ Number(JSContext *cx, unsigned argc, Value *vp)
return true;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsNumber(HandleValue v)
{
return v.isNumber() || (v.isObject() && v.toObject().is<NumberObject>());
@ -503,7 +503,7 @@ Extract(const Value &v)
}
#if JS_HAS_TOSOURCE
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toSource_impl(JSContext *cx, CallArgs args)
{
double d = Extract(args.thisv());
@ -541,7 +541,7 @@ ToCStringBuf::~ToCStringBuf()
js_free(dbuf);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static JSFlatString *
LookupDtoaCache(ThreadSafeContext *cx, double d)
{
@ -556,7 +556,7 @@ LookupDtoaCache(ThreadSafeContext *cx, double d)
return nullptr;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static void
CacheNumber(ThreadSafeContext *cx, double d, JSFlatString *str)
{
@ -567,7 +567,7 @@ CacheNumber(ThreadSafeContext *cx, double d, JSFlatString *str)
comp->dtoaCache.cache(10, d, str);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static JSFlatString *
LookupInt32ToString(ThreadSafeContext *cx, int32_t si)
{
@ -578,7 +578,7 @@ LookupInt32ToString(ThreadSafeContext *cx, int32_t si)
}
template <typename T>
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
static T *
BackfillInt32InBuffer(int32_t si, T *buffer, size_t size, size_t *length)
{
@ -683,7 +683,7 @@ template <AllowGC allowGC>
static JSString * JS_FASTCALL
js_NumberToStringWithBase(ThreadSafeContext *cx, double d, int base);
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toString_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));
@ -720,7 +720,7 @@ js_num_toString(JSContext *cx, unsigned argc, Value *vp)
}
#if !EXPOSE_INTL_API
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toLocaleString_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));
@ -854,7 +854,7 @@ num_toLocaleString(JSContext *cx, unsigned argc, Value *vp)
}
#endif /* !EXPOSE_INTL_API */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_valueOf_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));
@ -909,7 +909,7 @@ DToStrResult(JSContext *cx, double d, JSDToStrMode mode, int precision, CallArgs
* In the following three implementations, we allow a larger range of precision
* than ECMA requires; this is permitted by ECMA-262.
*/
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toFixed_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));
@ -932,7 +932,7 @@ num_toFixed(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsNumber, num_toFixed_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toExponential_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));
@ -958,7 +958,7 @@ num_toExponential(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsNumber, num_toExponential_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
num_toPrecision_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsNumber(args.thisv()));

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

@ -148,7 +148,7 @@ extern bool
StringToNumber(ThreadSafeContext *cx, JSString *str, double *result);
/* ES5 9.3 ToNumber, overwriting *vp with the appropriate number value. */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToNumber(JSContext *cx, JS::MutableHandleValue vp)
{
#ifdef DEBUG
@ -193,7 +193,7 @@ js_num_valueOf(JSContext *cx, unsigned argc, js::Value *vp);
namespace js {
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ValueFitsInInt32(const Value &v, int32_t *pi)
{
if (v.isInt32()) {
@ -212,7 +212,7 @@ ValueFitsInInt32(const Value &v, int32_t *pi)
* indexes will be reported not to be indexes by this method. Users must
* consider this possibility when using this method.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsDefinitelyIndex(const Value &v, uint32_t *indexp)
{
if (v.isInt32() && v.toInt32() >= 0) {
@ -286,7 +286,7 @@ ToNumberSlow(ExclusiveContext *cx, Value v, double *dp);
// Variant of ToNumber which takes an ExclusiveContext instead of a JSContext.
// ToNumber is part of the API and can't use ExclusiveContext directly.
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ToNumber(ExclusiveContext *cx, const Value &v, double *out)
{
if (v.isNumber()) {
@ -329,7 +329,7 @@ NonObjectToInt32(ThreadSafeContext *cx, const Value &v, int32_t *out)
bool
NonObjectToUint32Slow(ThreadSafeContext *cx, const Value &v, uint32_t *out);
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
NonObjectToUint32(ThreadSafeContext *cx, const Value &v, uint32_t *out)
{
if (v.isInt32()) {

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

@ -3916,7 +3916,7 @@ js::DefineNativeProperty(ExclusiveContext *cx, HandleObject obj, HandleId id, Ha
* - Otherwise no property was resolved. Set *propp = nullptr and
* *recursedp = false and return true.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
CallResolveOp(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
MutableHandleObject objp, MutableHandleShape propp, bool *recursedp)
{
@ -3988,7 +3988,7 @@ CallResolveOp(JSContext *cx, HandleObject obj, HandleId id, unsigned flags,
}
template <AllowGC allowGC>
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
LookupOwnPropertyWithFlagsInline(ExclusiveContext *cx,
typename MaybeRooted<JSObject*, allowGC>::HandleType obj,
typename MaybeRooted<jsid, allowGC>::HandleType id,
@ -4062,7 +4062,7 @@ NativeLookupOwnProperty(ExclusiveContext *cx, HandleObject obj, HandleId id, uns
}
template <AllowGC allowGC>
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
LookupPropertyWithFlagsInline(ExclusiveContext *cx,
typename MaybeRooted<JSObject*, allowGC>::HandleType obj,
typename MaybeRooted<jsid, allowGC>::HandleType id,
@ -4297,7 +4297,7 @@ js::HasOwnProperty<NoGC>(JSContext *cx, LookupGenericOp lookup,
FakeMutableHandle<JSObject*> objp, FakeMutableHandle<Shape*> propp);
template <AllowGC allowGC>
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
NativeGetInline(JSContext *cx,
typename MaybeRooted<JSObject*, allowGC>::HandleType obj,
typename MaybeRooted<JSObject*, allowGC>::HandleType receiver,
@ -4432,7 +4432,7 @@ js::NativeSet<ParallelExecution>(ForkJoinSlice *slice,
HandleShape shape, bool strict, MutableHandleValue vp);
template <AllowGC allowGC>
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GetPropertyHelperInline(JSContext *cx,
typename MaybeRooted<JSObject*, allowGC>::HandleType obj,
typename MaybeRooted<JSObject*, allowGC>::HandleType receiver,
@ -4558,7 +4558,7 @@ baseops::GetPropertyNoGC(JSContext *cx, JSObject *obj, JSObject *receiver, jsid
return GetPropertyHelperInline<NoGC>(cx, obj, receiver, id, vp);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
LookupPropertyPureInline(JSObject *obj, jsid id, JSObject **objp, Shape **propp)
{
if (!obj->isNative())
@ -4600,7 +4600,7 @@ LookupPropertyPureInline(JSObject *obj, jsid id, JSObject **objp, Shape **propp)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
NativeGetPureInline(JSObject *pobj, Shape *shape, Value *vp)
{
JS_ASSERT(pobj->isNative());
@ -4697,7 +4697,7 @@ js::GetPropertyPure(ThreadSafeContext *cx, JSObject *obj, jsid id, Value *vp)
}
static bool
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
GetElementPure(ThreadSafeContext *cx, JSObject *obj, uint32_t index, Value *vp)
{
if (index <= JSID_INT_MAX)

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

@ -833,7 +833,7 @@ class JSObject : public js::ObjectImpl
}
inline void finish(js::FreeOp *fop);
JS_ALWAYS_INLINE void finalize(js::FreeOp *fop);
MOZ_ALWAYS_INLINE void finalize(js::FreeOp *fop);
static inline bool hasProperty(JSContext *cx, js::HandleObject obj,
js::HandleId id, bool *foundp, unsigned flags = 0);
@ -1215,13 +1215,13 @@ class JSObject : public js::ObjectImpl
* const& instead of * as a syntactic way to assert non-null. This leads to an
* abundance of address-of operators to identity. Hence this overload.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
operator==(const JSObject &lhs, const JSObject &rhs)
{
return &lhs == &rhs;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
operator!=(const JSObject &lhs, const JSObject &rhs)
{
return &lhs != &rhs;
@ -1561,7 +1561,7 @@ extern JSObject *
ToObjectSlow(JSContext *cx, HandleValue vp, bool reportScanStack);
/* For object conversion in e.g. native functions. */
JS_ALWAYS_INLINE JSObject *
MOZ_ALWAYS_INLINE JSObject *
ToObject(JSContext *cx, HandleValue vp)
{
if (vp.isObject())
@ -1570,7 +1570,7 @@ ToObject(JSContext *cx, HandleValue vp)
}
/* For converting stack values to objects. */
JS_ALWAYS_INLINE JSObject *
MOZ_ALWAYS_INLINE JSObject *
ToObjectFromStack(JSContext *cx, HandleValue vp)
{
if (vp.isObject())

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

@ -696,13 +696,13 @@ PropDesc::PropDesc(const Value &getter, const Value &setter,
MOZ_ASSERT(setter.isUndefined() || js_IsCallable(setter));
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsFunctionObject(const js::Value &v)
{
return v.isObject() && v.toObject().is<JSFunction>();
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsFunctionObject(const js::Value &v, JSFunction **fun)
{
if (v.isObject() && v.toObject().is<JSFunction>()) {
@ -712,20 +712,20 @@ IsFunctionObject(const js::Value &v, JSFunction **fun)
return false;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsNativeFunction(const js::Value &v)
{
JSFunction *fun;
return IsFunctionObject(v, &fun) && fun->isNative();
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsNativeFunction(const js::Value &v, JSFunction **fun)
{
return IsFunctionObject(v, fun) && (*fun)->isNative();
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
IsNativeFunction(const js::Value &v, JSNative native)
{
JSFunction *fun;
@ -740,7 +740,7 @@ IsNativeFunction(const js::Value &v, JSNative native)
*
* TODO: a per-thread shape-based cache would be faster and simpler.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ClassMethodIsNative(JSContext *cx, JSObject *obj, const Class *clasp, jsid methodid, JSNative native)
{
JS_ASSERT(!obj->is<ProxyObject>());
@ -757,7 +757,7 @@ ClassMethodIsNative(JSContext *cx, JSObject *obj, const Class *clasp, jsid metho
}
/* ES5 9.1 ToPrimitive(input). */
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ToPrimitive(JSContext *cx, MutableHandleValue vp)
{
if (vp.isPrimitive())
@ -788,7 +788,7 @@ ToPrimitive(JSContext *cx, MutableHandleValue vp)
}
/* ES5 9.1 ToPrimitive(input, PreferredType). */
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ToPrimitive(JSContext *cx, JSType preferredType, MutableHandleValue vp)
{
JS_ASSERT(preferredType != JSTYPE_VOID); /* Use the other ToPrimitive! */
@ -1062,13 +1062,13 @@ IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx)
return ObjectClassIs(obj, classValue, cx);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ValueMightBeSpecial(const Value &propval)
{
return propval.isObject();
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ValueIsSpecial(JSObject *obj, MutableHandleValue propval, MutableHandle<SpecialId> sidp,
JSContext *cx)
{
@ -1084,7 +1084,7 @@ DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, H
JSObject **ctorp = nullptr,
gc::AllocKind ctorKind = JSFunction::FinalizeKind);
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
NewObjectMetadata(ExclusiveContext *cxArg, JSObject **pmetadata)
{
// The metadata callback is invoked before each created object, except when

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

@ -110,13 +110,13 @@ FOR_EACH_OPCODE(ENUMERATE_OPCODE)
* Immediate operand getters, setters, and bounds.
*/
static JS_ALWAYS_INLINE uint8_t
static MOZ_ALWAYS_INLINE uint8_t
GET_UINT8(jsbytecode *pc)
{
return (uint8_t) pc[1];
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SET_UINT8(jsbytecode *pc, uint8_t u)
{
pc[1] = (jsbytecode) u;
@ -135,13 +135,13 @@ SET_UINT8(jsbytecode *pc, uint8_t u)
#define JUMP_OFFSET_MIN INT32_MIN
#define JUMP_OFFSET_MAX INT32_MAX
static JS_ALWAYS_INLINE int32_t
static MOZ_ALWAYS_INLINE int32_t
GET_JUMP_OFFSET(jsbytecode *pc)
{
return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4];
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SET_JUMP_OFFSET(jsbytecode *pc, int32_t off)
{
pc[1] = (jsbytecode)(off >> 24);
@ -152,13 +152,13 @@ SET_JUMP_OFFSET(jsbytecode *pc, int32_t off)
#define UINT32_INDEX_LEN 4
static JS_ALWAYS_INLINE uint32_t
static MOZ_ALWAYS_INLINE uint32_t
GET_UINT32_INDEX(const jsbytecode *pc)
{
return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4];
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SET_UINT32_INDEX(jsbytecode *pc, uint32_t index)
{
pc[1] = (jsbytecode)(index >> 24);

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

@ -426,7 +426,7 @@ const Class StringObject::class_ = {
* calling CheckObjectCoercible(this), then returning ToString(this), as all
* String.prototype.* methods do (other than toString and valueOf).
*/
static JS_ALWAYS_INLINE JSString *
static MOZ_ALWAYS_INLINE JSString *
ThisToStringForStringProto(JSContext *cx, CallReceiver call)
{
JS_CHECK_RECURSION(cx, return nullptr);
@ -458,7 +458,7 @@ ThisToStringForStringProto(JSContext *cx, CallReceiver call)
return str;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsString(HandleValue v)
{
return v.isString() || (v.isObject() && v.toObject().is<StringObject>());
@ -484,7 +484,7 @@ str_quote(JSContext *cx, unsigned argc, Value *vp)
return true;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
str_toSource_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsString(args.thisv()));
@ -517,7 +517,7 @@ str_toSource(JSContext *cx, unsigned argc, Value *vp)
#endif /* JS_HAS_TOSOURCE */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
str_toString_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsString(args.thisv()));
@ -539,7 +539,7 @@ js_str_toString(JSContext *cx, unsigned argc, Value *vp)
* Java-like string native methods.
*/
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ValueToIntegerRange(JSContext *cx, HandleValue v, int32_t *out)
{
if (v.isInt32()) {
@ -954,20 +954,20 @@ js_BoyerMooreHorspool(const jschar *text, uint32_t textlen,
struct MemCmp {
typedef uint32_t Extent;
static JS_ALWAYS_INLINE Extent computeExtent(const jschar *, uint32_t patlen) {
static MOZ_ALWAYS_INLINE Extent computeExtent(const jschar *, uint32_t patlen) {
return (patlen - 1) * sizeof(jschar);
}
static JS_ALWAYS_INLINE bool match(const jschar *p, const jschar *t, Extent extent) {
static MOZ_ALWAYS_INLINE bool match(const jschar *p, const jschar *t, Extent extent) {
return memcmp(p, t, extent) == 0;
}
};
struct ManualCmp {
typedef const jschar *Extent;
static JS_ALWAYS_INLINE Extent computeExtent(const jschar *pat, uint32_t patlen) {
static MOZ_ALWAYS_INLINE Extent computeExtent(const jschar *pat, uint32_t patlen) {
return pat + patlen;
}
static JS_ALWAYS_INLINE bool match(const jschar *p, const jschar *t, Extent extent) {
static MOZ_ALWAYS_INLINE bool match(const jschar *p, const jschar *t, Extent extent) {
for (; p != extent; ++p, ++t) {
if (*p != *t)
return false;
@ -1022,7 +1022,7 @@ UnrolledMatch(const jschar *text, uint32_t textlen, const jschar *pat, uint32_t
return -1;
}
static JS_ALWAYS_INLINE int
static MOZ_ALWAYS_INLINE int
StringMatch(const jschar *text, uint32_t textlen,
const jschar *pat, uint32_t patlen)
{

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

@ -147,7 +147,7 @@ ToStringSlow(ExclusiveContext *cx, typename MaybeRooted<Value, allowGC>::HandleT
* known not to be a string, use ToStringSlow instead.
*/
template <AllowGC allowGC>
static JS_ALWAYS_INLINE JSString *
static MOZ_ALWAYS_INLINE JSString *
ToString(JSContext *cx, JS::HandleValue v)
{
#ifdef DEBUG
@ -232,7 +232,7 @@ js_strcmp(const jschar *lhs, const jschar *rhs);
extern jschar *
js_strchr_limit(const jschar *s, jschar c, const jschar *limit);
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
js_strncpy(jschar *dst, const jschar *src, size_t nelem)
{
return mozilla::PodCopy(dst, src, nelem);

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

@ -94,10 +94,6 @@
#define JS_NO_FASTCALL
#endif
#ifndef JS_ALWAYS_INLINE
#define JS_ALWAYS_INLINE MOZ_ALWAYS_INLINE
#endif
/***********************************************************************
** MACROS: JS_BEGIN_MACRO
** JS_END_MACRO

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

@ -18,7 +18,7 @@
#include "js/Utility.h"
static JS_ALWAYS_INLINE void *
static MOZ_ALWAYS_INLINE void *
js_memcpy(void *dst_, const void *src_, size_t len)
{
char *dst = (char *) dst_;
@ -143,7 +143,7 @@ InitConst(const T &t)
}
template <class T, class U>
JS_ALWAYS_INLINE T &
MOZ_ALWAYS_INLINE T &
ImplicitCast(U &u)
{
T &t = u;
@ -192,7 +192,7 @@ AlignBytes(T bytes, U alignment)
return bytes + ComputeByteAlignment(bytes, alignment);
}
static JS_ALWAYS_INLINE size_t
static MOZ_ALWAYS_INLINE size_t
UnsignedPtrDiff(const void *bigger, const void *smaller)
{
return size_t(bigger) - size_t(smaller);

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

@ -123,13 +123,13 @@ GetKeyArg(JSContext *cx, CallArgs &args)
return &args[0].toObject();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsWeakMap(HandleValue v)
{
return v.isObject() && v.toObject().is<WeakMapObject>();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
WeakMap_has_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsWeakMap(args.thisv()));
@ -161,7 +161,7 @@ WeakMap_has(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsWeakMap, WeakMap_has_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
WeakMap_clear_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsWeakMap(args.thisv()));
@ -182,7 +182,7 @@ WeakMap_clear(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsWeakMap, WeakMap_clear_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
WeakMap_get_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsWeakMap(args.thisv()));
@ -218,7 +218,7 @@ WeakMap_get(JSContext *cx, unsigned argc, Value *vp)
return CallNonGenericMethod<IsWeakMap, WeakMap_get_impl>(cx, args);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
WeakMap_delete_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsWeakMap(args.thisv()));
@ -292,7 +292,7 @@ WeakMapPostWriteBarrier(JSRuntime *rt, ObjectValueMap *weakMap, JSObject *key)
#endif
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
WeakMap_set_impl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsWeakMap(args.thisv()));

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

@ -55,23 +55,23 @@ class DateObject : public JSObject
// slots will be set to the UTC time without conversion.
void fillLocalTimeSlots(DateTimeInfo *dtInfo);
static JS_ALWAYS_INLINE bool getTime_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getYear_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getFullYear_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCFullYear_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getMonth_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCMonth_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getDate_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCDate_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getDay_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCDay_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getHours_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCHours_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getMinutes_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCMinutes_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCSeconds_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getUTCMilliseconds_impl(JSContext *cx, CallArgs args);
static JS_ALWAYS_INLINE bool getTimezoneOffset_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getTime_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getYear_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getFullYear_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCFullYear_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getMonth_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCMonth_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getDate_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCDate_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getDay_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCDay_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getHours_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCHours_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getMinutes_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCMinutes_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCSeconds_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getUTCMilliseconds_impl(JSContext *cx, CallArgs args);
static MOZ_ALWAYS_INLINE bool getTimezoneOffset_impl(JSContext *cx, CallArgs args);
};
} // namespace js

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

@ -107,7 +107,7 @@ GuardFunApplyArgumentsOptimization(JSContext *cx, AbstractFramePtr frame, Handle
* undefined and null, throw an error and return nullptr, attributing the
* problem to the value at |spindex| on the stack.
*/
JS_ALWAYS_INLINE JSObject *
MOZ_ALWAYS_INLINE JSObject *
ValuePropertyBearer(JSContext *cx, StackFrame *fp, HandleValue v, int spindex)
{
if (v.isObject())
@ -289,7 +289,7 @@ DefVarOrConstOperation(JSContext *cx, HandleObject varobj, HandlePropertyName dn
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
NegOperation(JSContext *cx, HandleScript script, jsbytecode *pc, HandleValue val,
MutableHandleValue res)
{
@ -311,7 +311,7 @@ NegOperation(JSContext *cx, HandleScript script, jsbytecode *pc, HandleValue val
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ToIdOperation(JSContext *cx, HandleScript script, jsbytecode *pc, HandleValue objval,
HandleValue idval, MutableHandleValue res)
{
@ -332,7 +332,7 @@ ToIdOperation(JSContext *cx, HandleScript script, jsbytecode *pc, HandleValue ob
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GetObjectElementOperation(JSContext *cx, JSOp op, JSObject *objArg, bool wasObject,
HandleValue rref, MutableHandleValue res)
{
@ -404,7 +404,7 @@ GetObjectElementOperation(JSContext *cx, JSOp op, JSObject *objArg, bool wasObje
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GetElemOptimizedArguments(JSContext *cx, AbstractFramePtr frame, MutableHandleValue lref,
HandleValue rref, MutableHandleValue res, bool *done)
{
@ -430,7 +430,7 @@ GetElemOptimizedArguments(JSContext *cx, AbstractFramePtr frame, MutableHandleVa
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GetElementOperation(JSContext *cx, JSOp op, MutableHandleValue lref, HandleValue rref,
MutableHandleValue res)
{
@ -455,7 +455,7 @@ GetElementOperation(JSContext *cx, JSOp op, MutableHandleValue lref, HandleValue
return GetObjectElementOperation(cx, op, obj, isObject, rref, res);
}
static JS_ALWAYS_INLINE JSString *
static MOZ_ALWAYS_INLINE JSString *
TypeOfOperation(const Value &v, JSRuntime *rt)
{
JSType type = js::TypeOfValue(v);
@ -469,7 +469,7 @@ TypeOfObjectOperation(JSObject *obj, JSRuntime *rt)
return TypeName(type, rt->atomState);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
InitElemOperation(JSContext *cx, HandleObject obj, HandleValue idval, HandleValue val)
{
JS_ASSERT(!val.isMagic(JS_ELEMENTS_HOLE));
@ -481,7 +481,7 @@ InitElemOperation(JSContext *cx, HandleObject obj, HandleValue idval, HandleValu
return JSObject::defineGeneric(cx, obj, id, val, nullptr, nullptr, JSPROP_ENUMERATE);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
InitArrayElemOperation(JSContext *cx, jsbytecode *pc, HandleObject obj, uint32_t index, HandleValue val)
{
JSOp op = JSOp(*pc);
@ -542,27 +542,27 @@ InitArrayElemOperation(JSContext *cx, jsbytecode *pc, HandleObject obj, uint32_t
return true; \
JS_END_MACRO
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
LessThanOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, bool *res) {
RELATIONAL_OP(<);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
LessThanOrEqualOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, bool *res) {
RELATIONAL_OP(<=);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GreaterThanOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, bool *res) {
RELATIONAL_OP(>);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
GreaterThanOrEqualOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, bool *res) {
RELATIONAL_OP(>=);
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitNot(JSContext *cx, HandleValue in, int *out)
{
int i;
@ -572,7 +572,7 @@ BitNot(JSContext *cx, HandleValue in, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitXor(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
{
int left, right;
@ -582,7 +582,7 @@ BitXor(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitOr(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
{
int left, right;
@ -592,7 +592,7 @@ BitOr(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitAnd(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
{
int left, right;
@ -602,7 +602,7 @@ BitAnd(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitLsh(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
{
int32_t left, right;
@ -612,7 +612,7 @@ BitLsh(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
BitRsh(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
{
int32_t left, right;
@ -622,7 +622,7 @@ BitRsh(JSContext *cx, HandleValue lhs, HandleValue rhs, int *out)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
UrshOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *out)
{
uint32_t left;

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

@ -1186,7 +1186,7 @@ ComputeImplicitThis(JSContext *cx, HandleObject obj, MutableHandleValue vp)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
AddOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, Value *res)
{
if (lhs.isInt32() && rhs.isInt32()) {
@ -1241,7 +1241,7 @@ AddOperation(JSContext *cx, MutableHandleValue lhs, MutableHandleValue rhs, Valu
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
SubOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
{
double d1, d2;
@ -1251,7 +1251,7 @@ SubOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
MulOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
{
double d1, d2;
@ -1261,7 +1261,7 @@ MulOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
DivOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
{
double d1, d2;
@ -1271,7 +1271,7 @@ DivOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
ModOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
{
int32_t l, r;
@ -1290,7 +1290,7 @@ ModOperation(JSContext *cx, HandleValue lhs, HandleValue rhs, Value *res)
return true;
}
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
SetObjectElementOperation(JSContext *cx, Handle<JSObject*> obj, HandleId id, const Value &value,
bool strict, JSScript *script = nullptr, jsbytecode *pc = nullptr)
{

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

@ -36,7 +36,7 @@ class Shape;
* in debug builds and crash in release builds. Instead, we use a safe-for-crash
* pointer.
*/
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
Debug_SetValueRangeToCrashOnTouch(Value *beg, Value *end)
{
#ifdef DEBUG
@ -45,7 +45,7 @@ Debug_SetValueRangeToCrashOnTouch(Value *beg, Value *end)
#endif
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
Debug_SetValueRangeToCrashOnTouch(Value *vec, size_t len)
{
#ifdef DEBUG
@ -53,7 +53,7 @@ Debug_SetValueRangeToCrashOnTouch(Value *vec, size_t len)
#endif
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
Debug_SetValueRangeToCrashOnTouch(HeapValue *vec, size_t len)
{
#ifdef DEBUG
@ -1543,7 +1543,7 @@ class ObjectImpl : public gc::BarrieredCell<ObjectImpl>
namespace gc {
template <>
JS_ALWAYS_INLINE Zone *
MOZ_ALWAYS_INLINE Zone *
BarrieredCell<ObjectImpl>::zone() const
{
const ObjectImpl* obj = static_cast<const ObjectImpl*>(this);
@ -1553,7 +1553,7 @@ BarrieredCell<ObjectImpl>::zone() const
}
template <>
JS_ALWAYS_INLINE Zone *
MOZ_ALWAYS_INLINE Zone *
BarrieredCell<ObjectImpl>::zoneFromAnyThread() const
{
const ObjectImpl* obj = static_cast<const ObjectImpl*>(this);

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

@ -673,7 +673,7 @@ struct MallocProvider
return (T *)calloc_(numElems * sizeof(T));
}
JS_DECLARE_NEW_METHODS(new_, malloc_, JS_ALWAYS_INLINE)
JS_DECLARE_NEW_METHODS(new_, malloc_, MOZ_ALWAYS_INLINE)
};
namespace gc {
@ -2023,64 +2023,64 @@ PerThreadData::removeActiveCompilation()
/************************************************************************/
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(Value *vec, size_t len)
{
mozilla::PodZero(vec, len);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(Value *beg, Value *end)
{
mozilla::PodZero(beg, end - beg);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(jsid *beg, jsid *end)
{
for (jsid *id = beg; id != end; ++id)
*id = INT_TO_JSID(0);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(jsid *vec, size_t len)
{
MakeRangeGCSafe(vec, vec + len);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(Shape **beg, Shape **end)
{
mozilla::PodZero(beg, end - beg);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
MakeRangeGCSafe(Shape **vec, size_t len)
{
mozilla::PodZero(vec, len);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SetValueRangeToUndefined(Value *beg, Value *end)
{
for (Value *v = beg; v != end; ++v)
v->setUndefined();
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SetValueRangeToUndefined(Value *vec, size_t len)
{
SetValueRangeToUndefined(vec, vec + len);
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SetValueRangeToNull(Value *beg, Value *end)
{
for (Value *v = beg; v != end; ++v)
v->setNull();
}
static JS_ALWAYS_INLINE void
static MOZ_ALWAYS_INLINE void
SetValueRangeToNull(Value *vec, size_t len)
{
SetValueRangeToNull(vec, vec + len);

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

@ -1545,7 +1545,7 @@ js_IsDebugScopeSlow(ProxyObject *proxy)
/*****************************************************************************/
/* static */ JS_ALWAYS_INLINE void
/* static */ MOZ_ALWAYS_INLINE void
DebugScopes::proxiedScopesPostWriteBarrier(JSRuntime *rt, ObjectWeakMap *map,
const EncapsulatedPtr<JSObject> &key)
{
@ -1591,7 +1591,7 @@ class DebugScopes::MissingScopesRef : public gc::BufferableRef
};
#endif
/* static */ JS_ALWAYS_INLINE void
/* static */ MOZ_ALWAYS_INLINE void
DebugScopes::missingScopesPostWriteBarrier(JSRuntime *rt, MissingScopeMap *map,
const ScopeIterKey &key)
{
@ -1601,7 +1601,7 @@ DebugScopes::missingScopesPostWriteBarrier(JSRuntime *rt, MissingScopeMap *map,
#endif
}
/* static */ JS_ALWAYS_INLINE void
/* static */ MOZ_ALWAYS_INLINE void
DebugScopes::liveScopesPostWriteBarrier(JSRuntime *rt, LiveScopeMap *map, ScopeObject *key)
{
#ifdef JSGC_GENERATIONAL

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

@ -729,7 +729,7 @@ class DebugScopes
/* The map from (non-debug) scopes to debug scopes. */
typedef WeakMap<EncapsulatedPtrObject, RelocatablePtrObject> ObjectWeakMap;
ObjectWeakMap proxiedScopes;
static JS_ALWAYS_INLINE void proxiedScopesPostWriteBarrier(JSRuntime *rt, ObjectWeakMap *map,
static MOZ_ALWAYS_INLINE void proxiedScopesPostWriteBarrier(JSRuntime *rt, ObjectWeakMap *map,
const EncapsulatedPtrObject &key);
/*
@ -742,7 +742,7 @@ class DebugScopes
RuntimeAllocPolicy> MissingScopeMap;
MissingScopeMap missingScopes;
class MissingScopesRef;
static JS_ALWAYS_INLINE void missingScopesPostWriteBarrier(JSRuntime *rt, MissingScopeMap *map,
static MOZ_ALWAYS_INLINE void missingScopesPostWriteBarrier(JSRuntime *rt, MissingScopeMap *map,
const ScopeIterKey &key);
/*
@ -757,7 +757,7 @@ class DebugScopes
DefaultHasher<ScopeObject *>,
RuntimeAllocPolicy> LiveScopeMap;
LiveScopeMap liveScopes;
static JS_ALWAYS_INLINE void liveScopesPostWriteBarrier(JSRuntime *rt, LiveScopeMap *map,
static MOZ_ALWAYS_INLINE void liveScopesPostWriteBarrier(JSRuntime *rt, LiveScopeMap *map,
ScopeObject *key);
public:

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

@ -246,7 +246,7 @@ InterpreterStack::allocateFrame(JSContext *cx, size_t size)
return buffer;
}
JS_ALWAYS_INLINE StackFrame *
MOZ_ALWAYS_INLINE StackFrame *
InterpreterStack::getCallFrame(JSContext *cx, const CallArgs &args, HandleScript script,
StackFrame::Flags *flags, Value **pargv)
{
@ -280,7 +280,7 @@ InterpreterStack::getCallFrame(JSContext *cx, const CallArgs &args, HandleScript
return reinterpret_cast<StackFrame *>(argv + 2 + nformal);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
InterpreterStack::pushInlineFrame(JSContext *cx, FrameRegs &regs, const CallArgs &args,
HandleScript script, InitialFrameFlags initial)
{
@ -312,7 +312,7 @@ InterpreterStack::pushInlineFrame(JSContext *cx, FrameRegs &regs, const CallArgs
return true;
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
InterpreterStack::popInlineFrame(FrameRegs &regs)
{
StackFrame *fp = regs.fp();

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

@ -20,7 +20,7 @@
namespace js {
template <AllowGC allowGC>
static JS_ALWAYS_INLINE JSInlineString *
static MOZ_ALWAYS_INLINE JSInlineString *
NewShortString(ThreadSafeContext *cx, JS::Latin1Chars chars)
{
size_t len = chars.length();
@ -39,7 +39,7 @@ NewShortString(ThreadSafeContext *cx, JS::Latin1Chars chars)
}
template <AllowGC allowGC>
static JS_ALWAYS_INLINE JSInlineString *
static MOZ_ALWAYS_INLINE JSInlineString *
NewShortString(ExclusiveContext *cx, JS::StableTwoByteChars chars)
{
size_t len = chars.length();
@ -62,7 +62,7 @@ NewShortString(ExclusiveContext *cx, JS::StableTwoByteChars chars)
}
template <AllowGC allowGC>
static JS_ALWAYS_INLINE JSInlineString *
static MOZ_ALWAYS_INLINE JSInlineString *
NewShortString(ExclusiveContext *cx, JS::TwoByteChars chars)
{
size_t len = chars.length();
@ -101,7 +101,7 @@ StringWriteBarrierPostRemove(js::ThreadSafeContext *maybecx, JSString **strp)
} /* namespace js */
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
JSString::validateLength(js::ThreadSafeContext *maybecx, size_t length)
{
if (MOZ_UNLIKELY(length > JSString::MAX_LENGTH)) {
@ -112,7 +112,7 @@ JSString::validateLength(js::ThreadSafeContext *maybecx, size_t length)
return true;
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSRope::init(js::ThreadSafeContext *cx, JSString *left, JSString *right, size_t length)
{
d.lengthAndFlags = buildLengthAndFlags(length, ROPE_FLAGS);
@ -123,7 +123,7 @@ JSRope::init(js::ThreadSafeContext *cx, JSString *left, JSString *right, size_t
}
template <js::AllowGC allowGC>
JS_ALWAYS_INLINE JSRope *
MOZ_ALWAYS_INLINE JSRope *
JSRope::new_(js::ThreadSafeContext *cx,
typename js::MaybeRooted<JSString*, allowGC>::HandleType left,
typename js::MaybeRooted<JSString*, allowGC>::HandleType right,
@ -145,7 +145,7 @@ JSRope::markChildren(JSTracer *trc)
js::gc::MarkStringUnbarriered(trc, &d.s.u2.right, "right child");
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSDependentString::init(js::ThreadSafeContext *cx, JSLinearString *base, const jschar *chars,
size_t length)
{
@ -156,7 +156,7 @@ JSDependentString::init(js::ThreadSafeContext *cx, JSLinearString *base, const j
js::StringWriteBarrierPost(cx, reinterpret_cast<JSString **>(&d.s.u2.base));
}
JS_ALWAYS_INLINE JSLinearString *
MOZ_ALWAYS_INLINE JSLinearString *
JSDependentString::new_(js::ExclusiveContext *cx,
JSLinearString *baseArg, const jschar *chars, size_t length)
{
@ -225,7 +225,7 @@ JSFlatString::toPropertyName(JSContext *cx)
return atom->asPropertyName();
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSStableString::init(const jschar *chars, size_t length)
{
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
@ -233,7 +233,7 @@ JSStableString::init(const jschar *chars, size_t length)
}
template <js::AllowGC allowGC>
JS_ALWAYS_INLINE JSStableString *
MOZ_ALWAYS_INLINE JSStableString *
JSStableString::new_(js::ThreadSafeContext *cx, const jschar *chars, size_t length)
{
JS_ASSERT(chars[length] == jschar(0));
@ -248,13 +248,13 @@ JSStableString::new_(js::ThreadSafeContext *cx, const jschar *chars, size_t leng
}
template <js::AllowGC allowGC>
JS_ALWAYS_INLINE JSInlineString *
MOZ_ALWAYS_INLINE JSInlineString *
JSInlineString::new_(js::ThreadSafeContext *cx)
{
return (JSInlineString *)js_NewGCString<allowGC>(cx);
}
JS_ALWAYS_INLINE jschar *
MOZ_ALWAYS_INLINE jschar *
JSInlineString::init(size_t length)
{
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
@ -263,7 +263,7 @@ JSInlineString::init(size_t length)
return d.inlineStorage;
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSInlineString::resetLength(size_t length)
{
d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS);
@ -271,13 +271,13 @@ JSInlineString::resetLength(size_t length)
}
template <js::AllowGC allowGC>
JS_ALWAYS_INLINE JSShortString *
MOZ_ALWAYS_INLINE JSShortString *
JSShortString::new_(js::ThreadSafeContext *cx)
{
return js_NewGCShortString<allowGC>(cx);
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSExternalString::init(const jschar *chars, size_t length, const JSStringFinalizer *fin)
{
JS_ASSERT(fin);
@ -287,7 +287,7 @@ JSExternalString::init(const jschar *chars, size_t length, const JSStringFinaliz
d.s.u2.externalFinalizer = fin;
}
JS_ALWAYS_INLINE JSExternalString *
MOZ_ALWAYS_INLINE JSExternalString *
JSExternalString::new_(JSContext *cx, const jschar *chars, size_t length,
const JSStringFinalizer *fin)
{
@ -325,7 +325,7 @@ js::StaticStrings::getLength2(jschar c1, jschar c2)
return length2StaticTable[index];
}
JS_ALWAYS_INLINE void
MOZ_ALWAYS_INLINE void
JSString::finalize(js::FreeOp *fop)
{
/* Shorts are in a different arena. */

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

@ -135,7 +135,7 @@ JSString::equals(const char *s)
}
#endif /* DEBUG */
static JS_ALWAYS_INLINE bool
static MOZ_ALWAYS_INLINE bool
AllocChars(ThreadSafeContext *maybecx, size_t length, jschar **chars, size_t *capacity)
{
/*

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

@ -251,12 +251,12 @@ class JSString : public js::gc::BarrieredCell<JSString>
public:
/* All strings have length. */
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
size_t length() const {
return d.lengthAndFlags >> LENGTH_SHIFT;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool empty() const {
return d.lengthAndFlags <= FLAGS_MASK;
}
@ -299,67 +299,67 @@ class JSString : public js::gc::BarrieredCell<JSString>
/* Type query and debug-checked casts */
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isRope() const {
return (d.lengthAndFlags & FLAGS_MASK) == ROPE_FLAGS;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSRope &asRope() const {
JS_ASSERT(isRope());
return *(JSRope *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isLinear() const {
return !isRope();
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSLinearString &asLinear() const {
JS_ASSERT(JSString::isLinear());
return *(JSLinearString *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isDependent() const {
return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSDependentString &asDependent() const {
JS_ASSERT(isDependent());
return *(JSDependentString *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isFlat() const {
return isLinear() && !isDependent();
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSFlatString &asFlat() const {
JS_ASSERT(isFlat());
return *(JSFlatString *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isExtensible() const {
return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSExtensibleString &asExtensible() const {
JS_ASSERT(isExtensible());
return *(JSExtensibleString *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isInline() const {
return isFlat() && !isExtensible() && (d.u1.chars == d.inlineStorage);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSInlineString &asInline() const {
JS_ASSERT(isInline());
return *(JSInlineString *)this;
@ -367,7 +367,7 @@ class JSString : public js::gc::BarrieredCell<JSString>
bool isShort() const;
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSStableString &asStable() const {
JS_ASSERT(!isInline());
return *(JSStableString *)this;
@ -376,23 +376,23 @@ class JSString : public js::gc::BarrieredCell<JSString>
/* For hot code, prefer other type queries. */
bool isExternal() const;
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSExternalString &asExternal() const {
JS_ASSERT(isExternal());
return *(JSExternalString *)this;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isUndepended() const {
return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS;
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
bool isAtom() const {
return (d.lengthAndFlags & ATOM_BIT);
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JSAtom &asAtom() const {
js::AutoThreadSafeAccess ts(this);
JS_ASSERT(isAtom());
@ -500,7 +500,7 @@ class JSLinearString : public JSString
JSLinearString &asLinear() const MOZ_DELETE;
public:
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
const jschar *chars() const {
JS_ASSERT(JSString::isLinear());
return d.u1.chars;
@ -545,7 +545,7 @@ class JSFlatString : public JSLinearString
bool isIndexSlow(uint32_t *indexp) const;
public:
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
const jschar *charsZ() const {
JS_ASSERT(JSString::isFlat());
return chars();
@ -573,7 +573,7 @@ class JSFlatString : public JSLinearString
* Once a JSFlatString sub-class has been added to the atom state, this
* operation changes the string to the JSAtom type, in place.
*/
JS_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoAtom() {
MOZ_ALWAYS_INLINE JSAtom *morphAtomizedStringIntoAtom() {
d.lengthAndFlags = buildLengthAndFlags(length(), ATOM_BIT);
return &asAtom();
}
@ -592,13 +592,13 @@ class JSStableString : public JSFlatString
static inline JSStableString *new_(js::ThreadSafeContext *cx,
const jschar *chars, size_t length);
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JS::StableCharPtr chars() const {
JS_ASSERT(!JSString::isInline());
return JS::StableCharPtr(d.u1.chars, length());
}
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
JS::StableTwoByteChars range() const {
JS_ASSERT(!JSString::isInline());
return JS::StableTwoByteChars(d.u1.chars, length());
@ -672,7 +672,7 @@ class JSExtensibleString : public JSFlatString
JSExtensibleString &asExtensible() const MOZ_DELETE;
public:
JS_ALWAYS_INLINE
MOZ_ALWAYS_INLINE
size_t capacity() const {
JS_ASSERT(JSString::isExtensible());
return d.s.u2.capacity;
@ -735,7 +735,7 @@ class JSShortString : public JSInlineString
/* Only called by the GC for strings with the FINALIZE_SHORT_STRING kind. */
JS_ALWAYS_INLINE void finalize(js::FreeOp *fop);
MOZ_ALWAYS_INLINE void finalize(js::FreeOp *fop);
};
JS_STATIC_ASSERT(sizeof(JSShortString) == 2 * sizeof(JSString));
@ -966,7 +966,7 @@ class PropertyName : public JSAtom
JS_STATIC_ASSERT(sizeof(PropertyName) == sizeof(JSString));
static JS_ALWAYS_INLINE jsid
static MOZ_ALWAYS_INLINE jsid
NameToId(PropertyName *name)
{
return NON_INTEGER_ATOM_TO_JSID(name);
@ -996,7 +996,7 @@ class AutoNameVector : public AutoVectorRooter<PropertyName *>
/* Avoid requiring vm/String-inl.h just to call getChars. */
JS_ALWAYS_INLINE const jschar *
MOZ_ALWAYS_INLINE const jschar *
JSString::getChars(js::ExclusiveContext *cx)
{
if (JSLinearString *str = ensureLinear(cx))
@ -1004,7 +1004,7 @@ JSString::getChars(js::ExclusiveContext *cx)
return nullptr;
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
JSString::getChar(js::ExclusiveContext *cx, size_t index, jschar *code)
{
JS_ASSERT(index < length());
@ -1038,7 +1038,7 @@ JSString::getChar(js::ExclusiveContext *cx, size_t index, jschar *code)
return true;
}
JS_ALWAYS_INLINE const jschar *
MOZ_ALWAYS_INLINE const jschar *
JSString::getCharsZ(js::ExclusiveContext *cx)
{
if (JSFlatString *str = ensureFlat(cx))
@ -1046,28 +1046,28 @@ JSString::getCharsZ(js::ExclusiveContext *cx)
return nullptr;
}
JS_ALWAYS_INLINE const jschar *
MOZ_ALWAYS_INLINE const jschar *
JSString::pureChars() const
{
JS_ASSERT(hasPureChars());
return asLinear().chars();
}
JS_ALWAYS_INLINE const jschar *
MOZ_ALWAYS_INLINE const jschar *
JSString::pureCharsZ() const
{
JS_ASSERT(hasPureCharsZ());
return asFlat().charsZ();
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
JSString::copyNonPureChars(js::ThreadSafeContext *cx, js::ScopedJSFreePtr<jschar> &out) const
{
JS_ASSERT(!hasPureChars());
return asRope().copyNonPureChars(cx, out);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
JSString::copyNonPureCharsZ(js::ThreadSafeContext *cx, js::ScopedJSFreePtr<jschar> &out) const
{
JS_ASSERT(!hasPureChars());
@ -1076,7 +1076,7 @@ JSString::copyNonPureCharsZ(js::ThreadSafeContext *cx, js::ScopedJSFreePtr<jscha
return asRope().copyNonPureCharsZ(cx, out);
}
JS_ALWAYS_INLINE JSLinearString *
MOZ_ALWAYS_INLINE JSLinearString *
JSString::ensureLinear(js::ExclusiveContext *cx)
{
return isLinear()
@ -1084,7 +1084,7 @@ JSString::ensureLinear(js::ExclusiveContext *cx)
: asRope().flatten(cx);
}
JS_ALWAYS_INLINE JSFlatString *
MOZ_ALWAYS_INLINE JSFlatString *
JSString::ensureFlat(js::ExclusiveContext *cx)
{
return isFlat()
@ -1094,7 +1094,7 @@ JSString::ensureFlat(js::ExclusiveContext *cx)
: asRope().flatten(cx);
}
JS_ALWAYS_INLINE JSStableString *
MOZ_ALWAYS_INLINE JSStableString *
JSString::ensureStable(js::ExclusiveContext *maybecx)
{
if (isRope()) {

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

@ -125,13 +125,13 @@ ToClampedIndex(JSContext *cx, HandleValue v, uint32_t length, uint32_t *out)
* can be created implicitly by constructing a TypedArrayObject with a size.
*/
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
IsArrayBuffer(HandleValue v)
{
return v.isObject() && v.toObject().hasClass(&ArrayBufferObject::class_);
}
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
ArrayBufferObject::byteLengthGetterImpl(JSContext *cx, CallArgs args)
{
JS_ASSERT(IsArrayBuffer(args.thisv()));

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

@ -1613,21 +1613,21 @@ class MOZ_STACK_CLASS CallMethodHelper
jsval* const mArgv;
const uint32_t mArgc;
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
GetArraySizeFromParam(uint8_t paramIndex, uint32_t* result) const;
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
GetInterfaceTypeFromParam(uint8_t paramIndex,
const nsXPTType& datum_type,
nsID* result) const;
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
GetOutParamSource(uint8_t paramIndex, MutableHandleValue srcp) const;
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
GatherAndConvertResults();
JS_ALWAYS_INLINE bool
MOZ_ALWAYS_INLINE bool
QueryInterfaceFastPath();
nsXPTCVariant*
@ -1645,19 +1645,19 @@ class MOZ_STACK_CLASS CallMethodHelper
return const_cast<CallMethodHelper*>(this)->GetDispatchParam(paramIndex);
}
JS_ALWAYS_INLINE bool InitializeDispatchParams();
MOZ_ALWAYS_INLINE bool InitializeDispatchParams();
JS_ALWAYS_INLINE bool ConvertIndependentParams(bool* foundDependentParam);
JS_ALWAYS_INLINE bool ConvertIndependentParam(uint8_t i);
JS_ALWAYS_INLINE bool ConvertDependentParams();
JS_ALWAYS_INLINE bool ConvertDependentParam(uint8_t i);
MOZ_ALWAYS_INLINE bool ConvertIndependentParams(bool* foundDependentParam);
MOZ_ALWAYS_INLINE bool ConvertIndependentParam(uint8_t i);
MOZ_ALWAYS_INLINE bool ConvertDependentParams();
MOZ_ALWAYS_INLINE bool ConvertDependentParam(uint8_t i);
JS_ALWAYS_INLINE void CleanupParam(nsXPTCMiniVariant& param, nsXPTType& type);
MOZ_ALWAYS_INLINE void CleanupParam(nsXPTCMiniVariant& param, nsXPTType& type);
JS_ALWAYS_INLINE bool HandleDipperParam(nsXPTCVariant* dp,
const nsXPTParamInfo& paramInfo);
MOZ_ALWAYS_INLINE bool HandleDipperParam(nsXPTCVariant* dp,
const nsXPTParamInfo& paramInfo);
JS_ALWAYS_INLINE nsresult Invoke();
MOZ_ALWAYS_INLINE nsresult Invoke();
public:
@ -1681,7 +1681,7 @@ public:
~CallMethodHelper();
JS_ALWAYS_INLINE bool Call();
MOZ_ALWAYS_INLINE bool Call();
};