зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1267551 (part 3) - Use MOZ_MUST_USE more in js/src/builtin/. r=jonco.
--HG-- extra : rebase_source : 5d6ae9608b9673164c89fa806d6afe8f2f0c6774
This commit is contained in:
Родитель
00310fc661
Коммит
b9d8da95d4
|
@ -17,21 +17,21 @@ class AtomicsObject : public JSObject
|
|||
public:
|
||||
static const Class class_;
|
||||
static JSObject* initClass(JSContext* cx, Handle<GlobalObject*> global);
|
||||
static bool toString(JSContext* cx, unsigned int argc, Value* vp);
|
||||
static MOZ_MUST_USE bool toString(JSContext* cx, unsigned int argc, Value* vp);
|
||||
};
|
||||
|
||||
bool atomics_compareExchange(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_exchange(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_load(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_store(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_add(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_sub(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_and(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_or(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_xor(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_isLockFree(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_wait(JSContext* cx, unsigned argc, Value* vp);
|
||||
bool atomics_wake(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_compareExchange(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_exchange(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_load(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_store(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_add(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_sub(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_and(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_or(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_xor(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_isLockFree(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_wait(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool atomics_wake(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/* asm.js callouts */
|
||||
int32_t atomics_add_asm_callout(int32_t vt, int32_t offset, int32_t value);
|
||||
|
@ -45,14 +45,14 @@ int32_t atomics_xchg_asm_callout(int32_t vt, int32_t offset, int32_t value);
|
|||
class FutexRuntime
|
||||
{
|
||||
public:
|
||||
static bool initialize();
|
||||
static MOZ_MUST_USE bool initialize();
|
||||
static void destroy();
|
||||
|
||||
static void lock();
|
||||
static void unlock();
|
||||
|
||||
FutexRuntime();
|
||||
bool initInstance();
|
||||
MOZ_MUST_USE bool initInstance();
|
||||
void destroyInstance();
|
||||
|
||||
// Parameters to wake().
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
// wait() will not wake up spuriously. It will return true and
|
||||
// set *result to a return code appropriate for
|
||||
// Atomics.wait() on success, and return false on error.
|
||||
bool wait(JSContext* cx, double timeout, WaitResult* result);
|
||||
MOZ_MUST_USE bool wait(JSContext* cx, double timeout, WaitResult* result);
|
||||
|
||||
// Wake the thread represented by this Runtime.
|
||||
//
|
||||
|
|
|
@ -17,17 +17,17 @@ namespace js {
|
|||
// JSOP_EVAL which in turn calls DirectEval. Thus, even though IndirectEval is
|
||||
// the callee function object for *all* calls to eval, it is by construction
|
||||
// only ever called in the case indirect eval.
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
IndirectEval(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
// Performs a direct eval of |v| (a string containing code, or another value
|
||||
// that will be vacuously returned), which must correspond to the currently-
|
||||
// executing stack frame, which must be a script frame.
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
DirectEval(JSContext* cx, HandleValue v, MutableHandleValue vp);
|
||||
|
||||
// Performs a direct eval called from Ion code.
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
DirectEvalStringFromIon(JSContext* cx,
|
||||
HandleObject scopeObj, HandleScript callerScript,
|
||||
HandleValue newTargetValue, HandleString str,
|
||||
|
|
|
@ -38,7 +38,7 @@ InitIntlClass(JSContext* cx, HandleObject obj);
|
|||
*
|
||||
* Usage: collator = intl_Collator(locales, options)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_Collator(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -49,7 +49,7 @@ intl_Collator(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: availableLocales = intl_Collator_availableLocales()
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_Collator_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ intl_Collator_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: collations = intl_availableCollations(locale)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_availableCollations(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ intl_availableCollations(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: result = intl_CompareStrings(collator, x, y)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_CompareStrings(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
|
||||
|
@ -86,7 +86,7 @@ intl_CompareStrings(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: numberFormat = intl_NumberFormat(locales, options)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_NumberFormat(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -97,7 +97,7 @@ intl_NumberFormat(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: availableLocales = intl_NumberFormat_availableLocales()
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_NumberFormat_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -107,7 +107,7 @@ intl_NumberFormat_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: defaultNumberingSystem = intl_numberingSystem(locale)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_numberingSystem(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -118,7 +118,7 @@ intl_numberingSystem(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: formatted = intl_FormatNumber(numberFormat, x)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_FormatNumber(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
|
||||
|
@ -131,7 +131,7 @@ intl_FormatNumber(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: dateTimeFormat = intl_DateTimeFormat(locales, options)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_DateTimeFormat(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -142,7 +142,7 @@ intl_DateTimeFormat(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: availableLocales = intl_DateTimeFormat_availableLocales()
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_DateTimeFormat_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -153,7 +153,7 @@ intl_DateTimeFormat_availableLocales(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: calendars = intl_availableCalendars(locale)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_availableCalendars(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -164,7 +164,7 @@ intl_availableCalendars(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: pattern = intl_patternForSkeleton(locale, skeleton)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_patternForSkeleton(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
@ -176,7 +176,7 @@ intl_patternForSkeleton(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: formatted = intl_FormatDateTime(dateTimeFormat, x)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intl_FormatDateTime(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/**
|
||||
|
|
|
@ -37,7 +37,7 @@ class HashableValue
|
|||
|
||||
HashableValue() : value(UndefinedValue()) {}
|
||||
|
||||
bool setValue(JSContext* cx, HandleValue v);
|
||||
MOZ_MUST_USE bool setValue(JSContext* cx, HandleValue v);
|
||||
HashNumber hash() const;
|
||||
bool operator==(const HashableValue& other) const;
|
||||
HashableValue mark(JSTracer* trc) const;
|
||||
|
@ -51,7 +51,7 @@ class HashableValue
|
|||
template <>
|
||||
class RootedBase<HashableValue> {
|
||||
public:
|
||||
bool setValue(JSContext* cx, HandleValue v) {
|
||||
MOZ_MUST_USE bool setValue(JSContext* cx, HandleValue v) {
|
||||
return static_cast<JS::Rooted<HashableValue>*>(this)->get().setValue(cx, v);
|
||||
}
|
||||
Value value() const {
|
||||
|
@ -88,25 +88,27 @@ class MapObject : public NativeObject {
|
|||
static JSObject* initClass(JSContext* cx, JSObject* obj);
|
||||
static const Class class_;
|
||||
|
||||
static bool getKeysAndValuesInterleaved(JSContext* cx, HandleObject obj,
|
||||
static MOZ_MUST_USE bool getKeysAndValuesInterleaved(JSContext* cx, HandleObject obj,
|
||||
JS::MutableHandle<GCVector<JS::Value>> entries);
|
||||
static bool entries(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool has(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool entries(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool has(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MapObject* create(JSContext* cx, HandleObject proto = nullptr);
|
||||
|
||||
// Publicly exposed Map calls for JSAPI access (webidl maplike/setlike
|
||||
// interfaces, etc.)
|
||||
static uint32_t size(JSContext *cx, HandleObject obj);
|
||||
static bool get(JSContext *cx, HandleObject obj, HandleValue key, MutableHandleValue rval);
|
||||
static bool has(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
static bool delete_(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
static MOZ_MUST_USE bool get(JSContext *cx, HandleObject obj, HandleValue key,
|
||||
MutableHandleValue rval);
|
||||
static MOZ_MUST_USE bool has(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
static MOZ_MUST_USE bool delete_(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
|
||||
// Set call for public JSAPI exposure. Does not actually return map object
|
||||
// as stated in spec, expects caller to return a value. for instance, with
|
||||
// webidl maplike/setlike, should return interface object.
|
||||
static bool set(JSContext *cx, HandleObject obj, HandleValue key, HandleValue val);
|
||||
static bool clear(JSContext *cx, HandleObject obj);
|
||||
static bool iterator(JSContext *cx, IteratorKind kind, HandleObject obj, MutableHandleValue iter);
|
||||
static MOZ_MUST_USE bool set(JSContext *cx, HandleObject obj, HandleValue key, HandleValue val);
|
||||
static MOZ_MUST_USE bool clear(JSContext *cx, HandleObject obj);
|
||||
static MOZ_MUST_USE bool iterator(JSContext *cx, IteratorKind kind, HandleObject obj,
|
||||
MutableHandleValue iter);
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
|
@ -119,29 +121,29 @@ class MapObject : public NativeObject {
|
|||
static ValueMap & extract(CallReceiver call);
|
||||
static void mark(JSTracer* trc, JSObject* obj);
|
||||
static void finalize(FreeOp* fop, JSObject* obj);
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
static bool is(HandleValue v);
|
||||
static bool is(HandleObject o);
|
||||
|
||||
static bool iterator_impl(JSContext* cx, const CallArgs& args, IteratorKind kind);
|
||||
static MOZ_MUST_USE bool iterator_impl(JSContext* cx, const CallArgs& args, IteratorKind kind);
|
||||
|
||||
static bool size_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool size(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool get_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool get(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool has_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool set_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool set(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool delete_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool delete_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool keys_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool keys(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool values_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool values(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool entries_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool clear_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool clear(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool size_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool size(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool get_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool get(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool has_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool set_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool set(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool delete_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool delete_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool keys_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool keys(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool values_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool values(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool entries_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool clear_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool clear(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
class MapIteratorObject : public NativeObject
|
||||
|
@ -163,8 +165,8 @@ class MapIteratorObject : public NativeObject
|
|||
MapObject::IteratorKind kind);
|
||||
static void finalize(FreeOp* fop, JSObject* obj);
|
||||
|
||||
static bool next(JSContext* cx, Handle<MapIteratorObject*> mapIterator,
|
||||
HandleArrayObject resultPairObj);
|
||||
static MOZ_MUST_USE bool next(JSContext* cx, Handle<MapIteratorObject*> mapIterator,
|
||||
HandleArrayObject resultPairObj);
|
||||
|
||||
static JSObject* createResultPair(JSContext* cx);
|
||||
|
||||
|
@ -178,19 +180,21 @@ class SetObject : public NativeObject {
|
|||
static JSObject* initClass(JSContext* cx, JSObject* obj);
|
||||
static const Class class_;
|
||||
|
||||
static bool keys(JSContext *cx, HandleObject obj, JS::MutableHandle<GCVector<JS::Value>> keys);
|
||||
static bool values(JSContext *cx, unsigned argc, Value *vp);
|
||||
static bool add(JSContext *cx, HandleObject obj, HandleValue key);
|
||||
static bool has(JSContext *cx, unsigned argc, Value *vp);
|
||||
static MOZ_MUST_USE bool keys(JSContext *cx, HandleObject obj,
|
||||
JS::MutableHandle<GCVector<JS::Value>> keys);
|
||||
static MOZ_MUST_USE bool values(JSContext *cx, unsigned argc, Value *vp);
|
||||
static MOZ_MUST_USE bool add(JSContext *cx, HandleObject obj, HandleValue key);
|
||||
static MOZ_MUST_USE bool has(JSContext *cx, unsigned argc, Value *vp);
|
||||
|
||||
// Publicly exposed Set calls for JSAPI access (webidl maplike/setlike
|
||||
// interfaces, etc.)
|
||||
static SetObject* create(JSContext *cx, HandleObject proto = nullptr);
|
||||
static uint32_t size(JSContext *cx, HandleObject obj);
|
||||
static bool has(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
static bool clear(JSContext *cx, HandleObject obj);
|
||||
static bool iterator(JSContext *cx, IteratorKind kind, HandleObject obj, MutableHandleValue iter);
|
||||
static bool delete_(JSContext *cx, HandleObject obj, HandleValue key, bool *rval);
|
||||
static MOZ_MUST_USE bool has(JSContext *cx, HandleObject obj, HandleValue key, bool* rval);
|
||||
static MOZ_MUST_USE bool clear(JSContext *cx, HandleObject obj);
|
||||
static MOZ_MUST_USE bool iterator(JSContext *cx, IteratorKind kind, HandleObject obj,
|
||||
MutableHandleValue iter);
|
||||
static MOZ_MUST_USE bool delete_(JSContext *cx, HandleObject obj, HandleValue key, bool *rval);
|
||||
|
||||
private:
|
||||
static const ClassOps classOps_;
|
||||
|
@ -209,20 +213,20 @@ class SetObject : public NativeObject {
|
|||
static bool is(HandleValue v);
|
||||
static bool is(HandleObject o);
|
||||
|
||||
static bool iterator_impl(JSContext* cx, const CallArgs& args, IteratorKind kind);
|
||||
static MOZ_MUST_USE bool iterator_impl(JSContext* cx, const CallArgs& args, IteratorKind kind);
|
||||
|
||||
static bool size_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool size(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool has_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool add_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool add(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool delete_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool delete_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool values_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool entries_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool entries(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool clear_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool clear(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool size_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool size(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool has_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool add_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool add(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool delete_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool delete_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool values_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool entries_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool entries(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool clear_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool clear(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
class SetIteratorObject : public NativeObject
|
||||
|
@ -241,7 +245,7 @@ class SetIteratorObject : public NativeObject
|
|||
static inline bool is(HandleValue v);
|
||||
inline ValueSet::Range* range();
|
||||
inline SetObject::IteratorKind kind() const;
|
||||
static bool next_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool next_impl(JSContext* cx, const CallArgs& args);
|
||||
};
|
||||
|
||||
extern bool
|
||||
|
|
|
@ -19,13 +19,13 @@ class Value;
|
|||
namespace js {
|
||||
|
||||
// Object constructor native. Exposed only so the JIT can know its address.
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_construct(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_propertyIsEnumerable(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_valueOf(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
PlainObject*
|
||||
|
@ -36,32 +36,32 @@ PlainObject*
|
|||
ObjectCreateWithTemplate(JSContext* cx, HandlePlainObject templateObj);
|
||||
|
||||
// Object methods exposed so they can be installed in the self-hosting global.
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_create(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_defineProperty(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_getOwnPropertyNames(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_getOwnPropertyDescriptor(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_getPrototypeOf(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_hasOwnProperty(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_isExtensible(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
obj_toString(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
// Exposed so SelfHosting.cpp can use it in the OwnPropertyKeys intrinsic
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
GetOwnPropertyKeys(JSContext* cx, const JS::CallArgs& args, unsigned flags);
|
||||
|
||||
/*
|
||||
|
@ -69,7 +69,7 @@ GetOwnPropertyKeys(JSContext* cx, const JS::CallArgs& args, unsigned flags);
|
|||
* exposing a jsid to script for Object.getOwnProperty{Names,Symbols}
|
||||
* or scriptable proxy traps.
|
||||
*/
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
IdToStringOrSymbol(JSContext* cx, JS::HandleId id, JS::MutableHandleValue result);
|
||||
|
||||
#if JS_HAS_TOSOURCE
|
||||
|
@ -78,7 +78,7 @@ JSString*
|
|||
ObjectToSource(JSContext* cx, JS::HandleObject obj);
|
||||
#endif // JS_HAS_TOSOURCE
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
WatchHandler(JSContext* cx, JSObject* obj, jsid id, JS::Value old,
|
||||
JS::Value* nvp, void* closure);
|
||||
|
||||
|
|
|
@ -30,21 +30,21 @@ typedef int pid_t;
|
|||
*
|
||||
* Returns true if no profilers fail to start.
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
extern MOZ_MUST_USE JS_PUBLIC_API(bool)
|
||||
JS_StartProfiling(const char* profileName, pid_t pid);
|
||||
|
||||
/**
|
||||
* Stop any profilers that were previously started with JS_StartProfiling.
|
||||
* Returns true if no profilers fail to stop.
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
extern MOZ_MUST_USE JS_PUBLIC_API(bool)
|
||||
JS_StopProfiling(const char* profileName);
|
||||
|
||||
/**
|
||||
* Write the current profile data to the given file, if applicable to whatever
|
||||
* profiler is being used.
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
extern MOZ_MUST_USE JS_PUBLIC_API(bool)
|
||||
JS_DumpProfile(const char* outfile, const char* profileName);
|
||||
|
||||
/**
|
||||
|
@ -52,13 +52,13 @@ JS_DumpProfile(const char* outfile, const char* profileName);
|
|||
* whether any profilers failed to pause. (Profilers that do not support
|
||||
* pause/resume do not count.)
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
extern MOZ_MUST_USE JS_PUBLIC_API(bool)
|
||||
JS_PauseProfilers(const char* profileName);
|
||||
|
||||
/**
|
||||
* Resume suspended profilers
|
||||
*/
|
||||
extern JS_PUBLIC_API(bool)
|
||||
extern MOZ_MUST_USE JS_PUBLIC_API(bool)
|
||||
JS_ResumeProfilers(const char* profileName);
|
||||
|
||||
/**
|
||||
|
@ -71,23 +71,23 @@ JS_UnsafeGetLastProfilingError();
|
|||
|
||||
#ifdef MOZ_CALLGRIND
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
extern MOZ_MUST_USE JS_FRIEND_API(bool)
|
||||
js_StopCallgrind();
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
extern MOZ_MUST_USE JS_FRIEND_API(bool)
|
||||
js_StartCallgrind();
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
extern MOZ_MUST_USE JS_FRIEND_API(bool)
|
||||
js_DumpCallgrind(const char* outfile);
|
||||
|
||||
#endif /* MOZ_CALLGRIND */
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
extern MOZ_MUST_USE JS_FRIEND_API(bool)
|
||||
js_StartPerf();
|
||||
|
||||
extern JS_FRIEND_API(bool)
|
||||
extern MOZ_MUST_USE JS_FRIEND_API(bool)
|
||||
js_StopPerf();
|
||||
|
||||
#endif /* __linux__ */
|
||||
|
|
|
@ -39,8 +39,8 @@ class PromiseObject : public NativeObject
|
|||
return getFixedSlot(PROMISE_RESULT_SLOT);
|
||||
}
|
||||
|
||||
bool resolve(JSContext* cx, HandleValue resolutionValue);
|
||||
bool reject(JSContext* cx, HandleValue rejectionValue);
|
||||
MOZ_MUST_USE bool resolve(JSContext* cx, HandleValue resolutionValue);
|
||||
MOZ_MUST_USE bool reject(JSContext* cx, HandleValue rejectionValue);
|
||||
|
||||
double allocationTime() { return getFixedSlot(PROMISE_ALLOCATION_TIME_SLOT).toNumber(); }
|
||||
double resolutionTime() { return getFixedSlot(PROMISE_RESOLUTION_TIME_SLOT).toNumber(); }
|
||||
|
@ -54,7 +54,7 @@ class PromiseObject : public NativeObject
|
|||
MOZ_ASSERT(state() != JS::PromiseState::Pending);
|
||||
return resolutionTime() - allocationTime();
|
||||
}
|
||||
bool dependentPromises(JSContext* cx, MutableHandle<GCVector<Value>> values);
|
||||
MOZ_MUST_USE bool dependentPromises(JSContext* cx, MutableHandle<GCVector<Value>> values);
|
||||
double getID();
|
||||
};
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ InitReflect(JSContext* cx, js::HandleObject obj);
|
|||
|
||||
namespace js {
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
Reflect_getPrototypeOf(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
Reflect_isExtensible(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,41 +30,41 @@ enum RegExpStaticsUpdate { UpdateRegExpStatics, DontUpdateRegExpStatics };
|
|||
* |input| may be nullptr if there is no JSString corresponding to
|
||||
* |chars| and |length|.
|
||||
*/
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
ExecuteRegExpLegacy(JSContext* cx, RegExpStatics* res, RegExpObject& reobj,
|
||||
HandleLinearString input, size_t* lastIndex, bool test,
|
||||
MutableHandleValue rval);
|
||||
|
||||
/* Translation from MatchPairs to a JS array in regexp_exec()'s output format. */
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
CreateRegExpMatchResult(JSContext* cx, HandleString input, const MatchPairs& matches,
|
||||
MutableHandleValue rval);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpMatcher(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpMatcherRaw(JSContext* cx, HandleObject regexp, HandleString input,
|
||||
int32_t lastIndex, MatchPairs* maybeMatches, MutableHandleValue output);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpSearcher(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpSearcherRaw(JSContext* cx, HandleObject regexp, HandleString input,
|
||||
int32_t lastIndex, MatchPairs* maybeMatches, int32_t* result);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpTester(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpTesterRaw(JSContext* cx, HandleObject regexp, HandleString input,
|
||||
int32_t lastIndex, int32_t* endIndex);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intrinsic_GetElemBaseForLambda(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
intrinsic_GetStringDataProperty(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@ intrinsic_GetStringDataProperty(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: match = regexp_exec_no_statics(regexp, string)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_exec_no_statics(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
|
@ -84,7 +84,7 @@ regexp_exec_no_statics(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* Usage: does_match = regexp_test_no_statics(regexp, string)
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_test_no_statics(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
|
@ -94,58 +94,58 @@ regexp_test_no_statics(JSContext* cx, unsigned argc, Value* vp);
|
|||
* Dedicated function for RegExp.prototype.split optimized path.
|
||||
* sticky flag is ignored.
|
||||
*/
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_construct_no_sticky(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
IsRegExp(JSContext* cx, HandleValue value, bool* result);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpCreate(JSContext* cx, HandleValue pattern, HandleValue flags, MutableHandleValue rval);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpPrototypeOptimizable(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpPrototypeOptimizableRaw(JSContext* cx, JSObject* proto, uint8_t* result);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpInstanceOptimizable(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpInstanceOptimizableRaw(JSContext* cx, JSObject* rx, JSObject* proto, uint8_t* result);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
RegExpGetSubstitution(JSContext* cx, HandleLinearString matched, HandleLinearString string,
|
||||
size_t position, HandleObject capturesObj, HandleLinearString replacement,
|
||||
size_t firstDollarIndex, MutableHandleValue rval);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
GetFirstDollarIndex(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
GetFirstDollarIndexRaw(JSContext* cx, HandleString str, int32_t* index);
|
||||
|
||||
extern int32_t
|
||||
GetFirstDollarIndexRawFlat(JSLinearString* text);
|
||||
|
||||
// RegExp ClassSpec members used in RegExpObject.cpp.
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
extern const JSPropertySpec regexp_static_props[];
|
||||
extern const JSPropertySpec regexp_properties[];
|
||||
extern const JSFunctionSpec regexp_methods[];
|
||||
|
||||
// Used in RegExpObject::isOriginalFlagGetter.
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_global(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_ignoreCase(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_multiline(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_sticky(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
extern bool
|
||||
extern MOZ_MUST_USE bool
|
||||
regexp_unicode(JSContext* cx, unsigned argc, JS::Value* vp);
|
||||
|
||||
} /* namespace js */
|
||||
|
|
|
@ -916,8 +916,9 @@ class SimdObject : public JSObject
|
|||
{
|
||||
public:
|
||||
static const Class class_;
|
||||
static bool toString(JSContext* cx, unsigned int argc, Value* vp);
|
||||
static bool resolve(JSContext* cx, JS::HandleObject obj, JS::HandleId, bool* resolved);
|
||||
static MOZ_MUST_USE bool toString(JSContext* cx, unsigned int argc, Value* vp);
|
||||
static MOZ_MUST_USE bool resolve(JSContext* cx, JS::HandleObject obj, JS::HandleId,
|
||||
bool* resolved);
|
||||
};
|
||||
|
||||
// These classes implement the concept containing the following constraints:
|
||||
|
@ -941,7 +942,7 @@ struct Float32x4 {
|
|||
typedef float Elem;
|
||||
static const unsigned lanes = 4;
|
||||
static const SimdType type = SimdType::Float32x4;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
double d;
|
||||
if (!ToNumber(cx, v, &d))
|
||||
return false;
|
||||
|
@ -957,7 +958,7 @@ struct Float64x2 {
|
|||
typedef double Elem;
|
||||
static const unsigned lanes = 2;
|
||||
static const SimdType type = SimdType::Float64x2;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToNumber(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -969,7 +970,7 @@ struct Int8x16 {
|
|||
typedef int8_t Elem;
|
||||
static const unsigned lanes = 16;
|
||||
static const SimdType type = SimdType::Int8x16;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToInt8(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -981,7 +982,7 @@ struct Int16x8 {
|
|||
typedef int16_t Elem;
|
||||
static const unsigned lanes = 8;
|
||||
static const SimdType type = SimdType::Int16x8;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToInt16(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -993,7 +994,7 @@ struct Int32x4 {
|
|||
typedef int32_t Elem;
|
||||
static const unsigned lanes = 4;
|
||||
static const SimdType type = SimdType::Int32x4;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToInt32(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -1005,7 +1006,7 @@ struct Uint8x16 {
|
|||
typedef uint8_t Elem;
|
||||
static const unsigned lanes = 16;
|
||||
static const SimdType type = SimdType::Uint8x16;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToUint8(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -1017,7 +1018,7 @@ struct Uint16x8 {
|
|||
typedef uint16_t Elem;
|
||||
static const unsigned lanes = 8;
|
||||
static const SimdType type = SimdType::Uint16x8;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToUint16(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -1029,7 +1030,7 @@ struct Uint32x4 {
|
|||
typedef uint32_t Elem;
|
||||
static const unsigned lanes = 4;
|
||||
static const SimdType type = SimdType::Uint32x4;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
return ToUint32(cx, v, out);
|
||||
}
|
||||
static Value ToValue(Elem value) {
|
||||
|
@ -1041,7 +1042,7 @@ struct Bool8x16 {
|
|||
typedef int8_t Elem;
|
||||
static const unsigned lanes = 16;
|
||||
static const SimdType type = SimdType::Bool8x16;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
*out = ToBoolean(v) ? -1 : 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -1054,7 +1055,7 @@ struct Bool16x8 {
|
|||
typedef int16_t Elem;
|
||||
static const unsigned lanes = 8;
|
||||
static const SimdType type = SimdType::Bool16x8;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
*out = ToBoolean(v) ? -1 : 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -1067,7 +1068,7 @@ struct Bool32x4 {
|
|||
typedef int32_t Elem;
|
||||
static const unsigned lanes = 4;
|
||||
static const SimdType type = SimdType::Bool32x4;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
*out = ToBoolean(v) ? -1 : 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -1080,7 +1081,7 @@ struct Bool64x2 {
|
|||
typedef int64_t Elem;
|
||||
static const unsigned lanes = 2;
|
||||
static const SimdType type = SimdType::Bool64x2;
|
||||
static bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
static MOZ_MUST_USE bool Cast(JSContext* cx, JS::HandleValue v, Elem* out) {
|
||||
*out = ToBoolean(v) ? -1 : 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -1105,7 +1106,7 @@ template<typename V>
|
|||
bool IsVectorObject(HandleValue v);
|
||||
|
||||
template<typename V>
|
||||
bool ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out);
|
||||
MOZ_MUST_USE bool ToSimdConstant(JSContext* cx, HandleValue v, jit::SimdConstant* out);
|
||||
|
||||
JSObject*
|
||||
InitSimdClass(JSContext* cx, HandleObject obj);
|
||||
|
@ -1118,73 +1119,73 @@ extern const JSJitInfo JitInfo_SimdFloat32x4_extractLane;
|
|||
} // namespace jit
|
||||
|
||||
#define DECLARE_SIMD_FLOAT32X4_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_float32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
FLOAT32X4_FUNCTION_LIST(DECLARE_SIMD_FLOAT32X4_FUNCTION)
|
||||
#undef DECLARE_SIMD_FLOAT32X4_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_FLOAT64X2_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_float64x2_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
FLOAT64X2_FUNCTION_LIST(DECLARE_SIMD_FLOAT64X2_FUNCTION)
|
||||
#undef DECLARE_SIMD_FLOAT64X2_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_INT8X16_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_int8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
INT8X16_FUNCTION_LIST(DECLARE_SIMD_INT8X16_FUNCTION)
|
||||
#undef DECLARE_SIMD_INT8X16_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_INT16X8_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_int16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
INT16X8_FUNCTION_LIST(DECLARE_SIMD_INT16X8_FUNCTION)
|
||||
#undef DECLARE_SIMD_INT16X8_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_INT32x4_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_int32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
INT32X4_FUNCTION_LIST(DECLARE_SIMD_INT32x4_FUNCTION)
|
||||
#undef DECLARE_SIMD_INT32x4_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_UINT8X16_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_uint8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
UINT8X16_FUNCTION_LIST(DECLARE_SIMD_UINT8X16_FUNCTION)
|
||||
#undef DECLARE_SIMD_UINT8X16_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_UINT16X8_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_uint16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
UINT16X8_FUNCTION_LIST(DECLARE_SIMD_UINT16X8_FUNCTION)
|
||||
#undef DECLARE_SIMD_UINT16X8_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_UINT32x4_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_uint32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
UINT32X4_FUNCTION_LIST(DECLARE_SIMD_UINT32x4_FUNCTION)
|
||||
#undef DECLARE_SIMD_UINT32x4_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_BOOL8X16_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_bool8x16_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
BOOL8X16_FUNCTION_LIST(DECLARE_SIMD_BOOL8X16_FUNCTION)
|
||||
#undef DECLARE_SIMD_BOOL8X16_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_BOOL16X8_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_bool16x8_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
BOOL16X8_FUNCTION_LIST(DECLARE_SIMD_BOOL16X8_FUNCTION)
|
||||
#undef DECLARE_SIMD_BOOL16X8_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_BOOL32X4_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_bool32x4_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
BOOL32X4_FUNCTION_LIST(DECLARE_SIMD_BOOL32X4_FUNCTION)
|
||||
#undef DECLARE_SIMD_BOOL32X4_FUNCTION
|
||||
|
||||
#define DECLARE_SIMD_BOOL64x2_FUNCTION(Name, Func, Operands) \
|
||||
extern bool \
|
||||
extern MOZ_MUST_USE bool \
|
||||
simd_bool64x2_##Name(JSContext* cx, unsigned argc, Value* vp);
|
||||
BOOL64X2_FUNCTION_LIST(DECLARE_SIMD_BOOL64x2_FUNCTION)
|
||||
#undef DECLARE_SIMD_BOOL64x2_FUNCTION
|
||||
|
|
|
@ -39,18 +39,18 @@ class SymbolObject : public NativeObject
|
|||
setFixedSlot(PRIMITIVE_VALUE_SLOT, SymbolValue(symbol));
|
||||
}
|
||||
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
// Static methods.
|
||||
static bool for_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool keyFor(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool for_(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool keyFor(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
// Methods defined on Symbol.prototype.
|
||||
static bool toString_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool toString(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool valueOf_impl(JSContext* cx, const CallArgs& args);
|
||||
static bool valueOf(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool toPrimitive(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool toString_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool toString(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool valueOf_impl(JSContext* cx, const CallArgs& args);
|
||||
static MOZ_MUST_USE bool valueOf(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool toPrimitive(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
static const JSPropertySpec properties[];
|
||||
static const JSFunctionSpec methods[];
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
namespace js {
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
DefineTestingFunctions(JSContext* cx, HandleObject obj, bool fuzzingSafe, bool disableOOMFunctions);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
testingFunc_assertFloat32(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
bool
|
||||
MOZ_MUST_USE bool
|
||||
testingFunc_assertRecoveredOnBailout(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
} /* namespace js */
|
||||
|
|
|
@ -175,7 +175,7 @@ class TypeDescr : public NativeObject
|
|||
}
|
||||
|
||||
// Whether id is an 'own' property of objects with this descriptor.
|
||||
bool hasProperty(const JSAtomState& names, jsid id);
|
||||
MOZ_MUST_USE bool hasProperty(const JSAtomState& names, jsid id);
|
||||
|
||||
// Type descriptors may contain a list of their references for use during
|
||||
// scanning. Marking code is optimized to use this list to mark inline
|
||||
|
@ -187,7 +187,7 @@ class TypeDescr : public NativeObject
|
|||
// The list is three consecutive arrays of int32_t offsets, with each array
|
||||
// terminated by -1. The arrays store offsets of string, object, and value
|
||||
// references in the descriptor, in that order.
|
||||
bool hasTraceList() const {
|
||||
MOZ_MUST_USE bool hasTraceList() const {
|
||||
return !getFixedSlot(JS_DESCR_SLOT_TRACE_LIST).isUndefined();
|
||||
}
|
||||
const int32_t* traceList() const {
|
||||
|
@ -256,7 +256,7 @@ class ScalarTypeDescr : public SimpleTypeDescr
|
|||
return Type(getReservedSlot(JS_DESCR_SLOT_TYPE).toInt32());
|
||||
}
|
||||
|
||||
static bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
// Enumerates the cases of ScalarTypeDescr::Type which have
|
||||
|
@ -307,7 +307,7 @@ class ReferenceTypeDescr : public SimpleTypeDescr
|
|||
return typeName(type());
|
||||
}
|
||||
|
||||
static bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
#define JS_FOR_EACH_REFERENCE_TYPE_REPR(macro_) \
|
||||
|
@ -340,7 +340,7 @@ class SimdTypeDescr : public ComplexTypeDescr
|
|||
static const Class class_;
|
||||
static int32_t size(SimdType t);
|
||||
static int32_t alignment(SimdType t);
|
||||
static bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool call(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool is(const Value& v);
|
||||
|
||||
SimdType type() const;
|
||||
|
@ -349,7 +349,7 @@ class SimdTypeDescr : public ComplexTypeDescr
|
|||
bool IsTypedObjectClass(const Class* clasp); // Defined below
|
||||
bool IsTypedObjectArray(JSObject& obj);
|
||||
|
||||
bool CreateUserSizeAndAlignmentProperties(JSContext* cx, HandleTypeDescr obj);
|
||||
MOZ_MUST_USE bool CreateUserSizeAndAlignmentProperties(JSContext* cx, HandleTypeDescr obj);
|
||||
|
||||
class ArrayTypeDescr;
|
||||
|
||||
|
@ -387,7 +387,7 @@ class ArrayMetaTypeDescr : public NativeObject
|
|||
|
||||
// This is the function that gets called when the user
|
||||
// does `new ArrayType(elem)`. It produces an array type object.
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -436,7 +436,7 @@ class StructMetaTypeDescr : public NativeObject
|
|||
|
||||
// This is the function that gets called when the user
|
||||
// does `new StructType(...)`. It produces a struct type object.
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
class StructTypeDescr : public ComplexTypeDescr
|
||||
|
@ -449,7 +449,7 @@ class StructTypeDescr : public ComplexTypeDescr
|
|||
|
||||
// Set `*out` to the index of the field named `id` and returns true,
|
||||
// or return false if no such field exists.
|
||||
bool fieldIndex(jsid id, size_t* out) const;
|
||||
MOZ_MUST_USE bool fieldIndex(jsid id, size_t* out) const;
|
||||
|
||||
// Return the name of the field at index `index`.
|
||||
JSAtom& fieldName(size_t index) const;
|
||||
|
@ -489,44 +489,47 @@ class TypedObject : public JSObject
|
|||
{
|
||||
static const bool IsTypedObjectClass = true;
|
||||
|
||||
static bool obj_getArrayElement(JSContext* cx,
|
||||
Handle<TypedObject*> typedObj,
|
||||
Handle<TypeDescr*> typeDescr,
|
||||
uint32_t index,
|
||||
MutableHandleValue vp);
|
||||
static MOZ_MUST_USE bool obj_getArrayElement(JSContext* cx,
|
||||
Handle<TypedObject*> typedObj,
|
||||
Handle<TypeDescr*> typeDescr,
|
||||
uint32_t index,
|
||||
MutableHandleValue vp);
|
||||
|
||||
protected:
|
||||
static const ObjectOps objectOps_;
|
||||
|
||||
HeapPtrShape shape_;
|
||||
|
||||
static bool obj_lookupProperty(JSContext* cx, HandleObject obj,
|
||||
HandleId id, MutableHandleObject objp,
|
||||
MutableHandleShape propp);
|
||||
static MOZ_MUST_USE bool obj_lookupProperty(JSContext* cx, HandleObject obj,
|
||||
HandleId id, MutableHandleObject objp,
|
||||
MutableHandleShape propp);
|
||||
|
||||
static bool obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
Handle<PropertyDescriptor> desc,
|
||||
ObjectOpResult& result);
|
||||
static MOZ_MUST_USE bool obj_defineProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
Handle<PropertyDescriptor> desc,
|
||||
ObjectOpResult& result);
|
||||
|
||||
static bool obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id, bool* foundp);
|
||||
static MOZ_MUST_USE bool obj_hasProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
bool* foundp);
|
||||
|
||||
static bool obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
|
||||
HandleId id, MutableHandleValue vp);
|
||||
static MOZ_MUST_USE bool obj_getProperty(JSContext* cx, HandleObject obj, HandleValue receiver,
|
||||
HandleId id, MutableHandleValue vp);
|
||||
|
||||
static bool obj_getElement(JSContext* cx, HandleObject obj, HandleValue receiver,
|
||||
uint32_t index, MutableHandleValue vp);
|
||||
static MOZ_MUST_USE bool obj_getElement(JSContext* cx, HandleObject obj, HandleValue receiver,
|
||||
uint32_t index, MutableHandleValue vp);
|
||||
|
||||
static bool obj_setProperty(JSContext* cx, HandleObject obj, HandleId id, HandleValue v,
|
||||
HandleValue receiver, ObjectOpResult& result);
|
||||
static MOZ_MUST_USE bool obj_setProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
HandleValue v, HandleValue receiver,
|
||||
ObjectOpResult& result);
|
||||
|
||||
static bool obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj, HandleId id,
|
||||
MutableHandle<PropertyDescriptor> desc);
|
||||
static MOZ_MUST_USE bool obj_getOwnPropertyDescriptor(JSContext* cx, HandleObject obj,
|
||||
HandleId id,
|
||||
MutableHandle<PropertyDescriptor> desc);
|
||||
|
||||
static bool obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
ObjectOpResult& result);
|
||||
static MOZ_MUST_USE bool obj_deleteProperty(JSContext* cx, HandleObject obj, HandleId id,
|
||||
ObjectOpResult& result);
|
||||
|
||||
static bool obj_enumerate(JSContext* cx, HandleObject obj, AutoIdVector& properties,
|
||||
bool enumerableOnly);
|
||||
static MOZ_MUST_USE bool obj_enumerate(JSContext* cx, HandleObject obj,
|
||||
AutoIdVector& properties, bool enumerableOnly);
|
||||
|
||||
public:
|
||||
TypedProto& typedProto() const {
|
||||
|
@ -558,7 +561,7 @@ class TypedObject : public JSObject
|
|||
return typedMem() + offset;
|
||||
}
|
||||
|
||||
inline bool opaque() const;
|
||||
inline MOZ_MUST_USE bool opaque() const;
|
||||
|
||||
// Creates a new typed object whose memory is freshly allocated and
|
||||
// initialized with zeroes (or, in the case of references, an appropriate
|
||||
|
@ -568,11 +571,11 @@ class TypedObject : public JSObject
|
|||
|
||||
// User-accessible constructor (`new TypeDescriptor(...)`). Note that the
|
||||
// callee here is the type descriptor.
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/* Accessors for self hosted code. */
|
||||
static bool GetBuffer(JSContext* cx, unsigned argc, Value* vp);
|
||||
static bool GetByteOffset(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool GetBuffer(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool GetByteOffset(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
Shape** addressOfShapeFromGC() { return shape_.unsafeUnbarrieredForTracing(); }
|
||||
};
|
||||
|
@ -723,14 +726,14 @@ class InlineOpaqueTypedObject : public InlineTypedObject
|
|||
*
|
||||
* Constructs a new, unattached instance of `Handle`.
|
||||
*/
|
||||
bool NewOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool NewOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: NewDerivedTypedObject(typeObj, owner, offset)
|
||||
*
|
||||
* Constructs a new, unattached instance of `Handle`.
|
||||
*/
|
||||
bool NewDerivedTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool NewDerivedTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: AttachTypedObject(typedObj, newDatum, newOffset)
|
||||
|
@ -738,7 +741,7 @@ bool NewDerivedTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
|||
* Moves `typedObj` to point at the memory referenced by `newDatum` with
|
||||
* the offset `newOffset`.
|
||||
*/
|
||||
bool AttachTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool AttachTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: SetTypedObjectOffset(typedObj, offset)
|
||||
|
@ -746,41 +749,41 @@ bool AttachTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
|||
* Changes the offset for `typedObj` within its buffer to `offset`.
|
||||
* `typedObj` must already be attached.
|
||||
*/
|
||||
bool SetTypedObjectOffset(JSContext*, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool SetTypedObjectOffset(JSContext*, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: ObjectIsTypeDescr(obj)
|
||||
*
|
||||
* True if `obj` is a type object.
|
||||
*/
|
||||
bool ObjectIsTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool ObjectIsTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: ObjectIsTypedObject(obj)
|
||||
*
|
||||
* True if `obj` is a transparent or opaque typed object.
|
||||
*/
|
||||
bool ObjectIsTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool ObjectIsTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: ObjectIsOpaqueTypedObject(obj)
|
||||
*
|
||||
* True if `obj` is an opaque typed object.
|
||||
*/
|
||||
bool ObjectIsOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool ObjectIsOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: ObjectIsTransparentTypedObject(obj)
|
||||
*
|
||||
* True if `obj` is a transparent typed object.
|
||||
*/
|
||||
bool ObjectIsTransparentTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool ObjectIsTransparentTypedObject(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/* Predicates on type descriptor objects. In all cases, 'obj' must be a type descriptor. */
|
||||
|
||||
bool TypeDescrIsSimpleType(JSContext*, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool TypeDescrIsSimpleType(JSContext*, unsigned argc, Value* vp);
|
||||
|
||||
bool TypeDescrIsArrayType(JSContext*, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool TypeDescrIsArrayType(JSContext*, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: TypedObjectIsAttached(obj)
|
||||
|
@ -788,21 +791,21 @@ bool TypeDescrIsArrayType(JSContext*, unsigned argc, Value* vp);
|
|||
* Given a TypedObject `obj`, returns true if `obj` is
|
||||
* "attached" (i.e., its data pointer is nullptr).
|
||||
*/
|
||||
bool TypedObjectIsAttached(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool TypedObjectIsAttached(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: TypedObjectTypeDescr(obj)
|
||||
*
|
||||
* Given a TypedObject `obj`, returns the object's type descriptor.
|
||||
*/
|
||||
bool TypedObjectTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool TypedObjectTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: ClampToUint8(v)
|
||||
*
|
||||
* Same as the C function ClampDoubleToUint8. `v` must be a number.
|
||||
*/
|
||||
bool ClampToUint8(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool ClampToUint8(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: GetTypedObjectModule()
|
||||
|
@ -813,7 +816,7 @@ bool ClampToUint8(JSContext* cx, unsigned argc, Value* vp);
|
|||
* to access them; eventually this should be linked into the module
|
||||
* system.
|
||||
*/
|
||||
bool GetTypedObjectModule(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool GetTypedObjectModule(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: GetSimdTypeDescr(simdTypeRepr)
|
||||
|
@ -823,7 +826,7 @@ bool GetTypedObjectModule(JSContext* cx, unsigned argc, Value* vp);
|
|||
*
|
||||
* The SIMD pseudo-module must have been initialized for this to be safe.
|
||||
*/
|
||||
bool GetSimdTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
MOZ_MUST_USE bool GetSimdTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
||||
|
||||
/*
|
||||
* Usage: Store_int8(targetDatum, targetOffset, value)
|
||||
|
@ -844,7 +847,7 @@ bool GetSimdTypeDescr(JSContext* cx, unsigned argc, Value* vp);
|
|||
#define JS_STORE_SCALAR_CLASS_DEFN(_constant, T, _name) \
|
||||
class StoreScalar##T { \
|
||||
public: \
|
||||
static bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static MOZ_MUST_USE bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static const JSJitInfo JitInfo; \
|
||||
};
|
||||
|
||||
|
@ -864,11 +867,11 @@ class StoreScalar##T { \
|
|||
#define JS_STORE_REFERENCE_CLASS_DEFN(_constant, T, _name) \
|
||||
class StoreReference##T { \
|
||||
private: \
|
||||
static bool store(JSContext* cx, T* heap, const Value& v, \
|
||||
TypedObject* obj, jsid id); \
|
||||
static MOZ_MUST_USE bool store(JSContext* cx, T* heap, const Value& v, \
|
||||
TypedObject* obj, jsid id); \
|
||||
\
|
||||
public: \
|
||||
static bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static MOZ_MUST_USE bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static const JSJitInfo JitInfo; \
|
||||
};
|
||||
|
||||
|
@ -883,7 +886,7 @@ class StoreReference##T { \
|
|||
#define JS_LOAD_SCALAR_CLASS_DEFN(_constant, T, _name) \
|
||||
class LoadScalar##T { \
|
||||
public: \
|
||||
static bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static MOZ_MUST_USE bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static const JSJitInfo JitInfo; \
|
||||
};
|
||||
|
||||
|
@ -901,7 +904,7 @@ class LoadReference##T { \
|
|||
static void load(T* heap, MutableHandleValue v); \
|
||||
\
|
||||
public: \
|
||||
static bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static MOZ_MUST_USE bool Func(JSContext* cx, unsigned argc, Value* vp); \
|
||||
static const JSJitInfo JitInfo; \
|
||||
};
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ class WeakSetObject : public NativeObject
|
|||
static const JSFunctionSpec methods[];
|
||||
|
||||
static WeakSetObject* create(JSContext* cx, HandleObject proto = nullptr);
|
||||
static bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
|
||||
};
|
||||
|
||||
extern JSObject*
|
||||
|
|
Загрузка…
Ссылка в новой задаче