Home | History | Annotate | Download | only in runtime

Lines Matching refs:JSValue

63     class JSValue {
71 static EncodedJSValue encode(JSValue value);
72 static JSValue decode(EncodedJSValue ptr);
75 static JSValue makeImmediate(intptr_t value);
85 JSValue();
86 JSValue(JSNullTag);
87 JSValue(JSUndefinedTag);
88 JSValue(JSTrueTag);
89 JSValue(JSFalseTag);
90 JSValue(JSCell* ptr);
91 JSValue(const JSCell* ptr);
94 JSValue(EncodeAsDoubleTag, ExecState*, double);
95 JSValue(ExecState*, double);
96 JSValue(ExecState*, char);
97 JSValue(ExecState*, unsigned char);
98 JSValue(ExecState*, short);
99 JSValue(ExecState*, unsigned short);
100 JSValue(ExecState*, int);
101 JSValue(ExecState*, unsigned);
102 JSValue(ExecState*, long);
103 JSValue(ExecState*, unsigned long);
104 JSValue(ExecState*, long long);
105 JSValue(ExecState*, unsigned long long);
106 JSValue(JSGlobalData*, double);
107 JSValue(JSGlobalData*, int);
108 JSValue(JSGlobalData*, unsigned);
111 bool operator==(const JSValue& other) const;
112 bool operator!=(const JSValue& other) const;
151 JSValue toPrimitive(ExecState*, PreferredPrimitiveType = NoPreference) const;
152 bool getPrimitiveNumber(ExecState*, double& number, JSValue&);
159 JSValue toJSNumber(ExecState*) const; // Fast path for when you expect that the value is an immediate number.
181 JSValue get(ExecState*, const Identifier& propertyName) const;
182 JSValue get(ExecState*, const Identifier& propertyName, PropertySlot&) const;
183 JSValue get(ExecState*, unsigned propertyName) const;
184 JSValue get(ExecState*, unsigned propertyName, PropertySlot&) const;
185 void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
186 void put(ExecState*, unsigned propertyName, JSValue);
193 static bool equal(ExecState* exec, JSValue v1, JSValue v2);
194 static bool equalSlowCase(ExecState* exec, JSValue v1, JSValue v2);
195 static bool equalSlowCaseInline(ExecState* exec, JSValue v1, JSValue v2);
196 static bool strictEqual(ExecState* exec, JSValue v1, JSValue v2);
197 static bool strictEqualSlowCase(ExecState* exec, JSValue v1, JSValue v2);
198 static bool strictEqualSlowCaseInline(ExecState* exec, JSValue v1, JSValue v2);
200 JSValue getJSNumber(); // JSValue() if this is not a JSNumber or number object
211 JSValue(HashTableDeletedValueTag);
213 inline const JSValue asValue() const { return *this; }
260 static EncodedJSValue emptyValue() { return JSValue::encode(JSValue()); }
261 static void constructDeletedValue(EncodedJSValue& slot) { slot = JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
262 static bool isDeletedValue(EncodedJSValue value) { return value == JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
268 static void constructDeletedValue(EncodedJSValue& slot) { slot = JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
269 static bool isDeletedValue(EncodedJSValue value) { return value == JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
274 inline JSValue jsNull()
276 return JSValue(JSValue::JSNull);
279 inline JSValue jsUndefined()
281 return JSValue(JSValue::JSUndefined);
284 inline JSValue jsBoolean(bool b)
286 return b ? JSValue(JSValue::JSTrue) : JSValue(JSValue::JSFalse);
289 ALWAYS_INLINE JSValue jsDoubleNumber(ExecState* exec, double d)
291 return JSValue(JSValue::EncodeAsDouble, exec, d);
294 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, double d)
296 return JSValue(exec, d);
299 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, char i)
301 return JSValue(exec, i);
304 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned char i)
306 return JSValue(exec, i);
309 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, short i)
311 return JSValue(exec, i);
314 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned short i)
316 return JSValue(exec, i);
319 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, int i)
321 return JSValue(exec, i);
324 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned i)
326 return JSValue(exec, i);
329 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long i)
331 return JSValue(exec, i);
334 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long i)
336 return JSValue(exec, i);
339 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, long long i)
341 return JSValue(exec, i);
344 ALWAYS_INLINE JSValue jsNumber(ExecState* exec, unsigned long long i)
346 return JSValue(exec, i);
349 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, double d)
351 return JSValue(globalData, d);
354 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, int i)
356 return JSValue(globalData, i);
359 ALWAYS_INLINE JSValue jsNumber(JSGlobalData* globalData, unsigned i)
361 return JSValue(globalData, i);
364 inline bool operator==(const JSValue a, const JSCell* b) { return a == JSValue(b); }
365 inline bool operator==(const JSCell* a, const JSValue b) { return JSValue(a) == b; }
367 inline bool operator!=(const JSValue a, const JSCell* b) { return a != JSValue(b); }
368 inline bool operator!=(const JSCell* a, const JSValue b) { return JSValue(a) != b; }
388 // FIXME: We should deprecate this and just use JSValue::asCell() instead.
389 JSCell* asCell(JSValue);
391 inline JSCell* asCell(JSValue value)
396 ALWAYS_INLINE int32_t JSValue::toInt32(ExecState* exec) const
404 inline uint32_t JSValue::toUInt32(ExecState* exec) const
412 inline int32_t JSValue::toInt32(ExecState* exec, bool& ok) const
421 inline uint32_t JSValue::toUInt32(ExecState* exec, bool& ok) const
431 inline JSValue jsNaN(ExecState* exec)
433 return JSValue(exec, nonInlineNaN());
436 // JSValue member functions.
437 inline EncodedJSValue JSValue::encode(JSValue value)
442 inline JSValue JSValue::decode(EncodedJSValue encodedJSValue)
444 JSValue v;
452 inline JSValue::JSValue()
458 inline JSValue::JSValue(JSNullTag)
464 inline JSValue::JSValue(JSUndefinedTag)
470 inline JSValue::JSValue(JSTrueTag)
476 inline JSValue::JSValue(JSFalseTag)
482 inline JSValue::JSValue(HashTableDeletedValueTag)
488 inline JSValue::JSValue(JSCell* ptr)
500 inline JSValue::JSValue(const JSCell* ptr)
512 inline JSValue::operator bool() const
518 inline bool JSValue::operator==(const JSValue& other) const
523 inline bool JSValue::operator!=(const JSValue& other) const
528 inline bool JSValue::isUndefined() const
533 inline bool JSValue::isNull() const
538 inline bool JSValue::isUndefinedOrNull() const
543 inline bool JSValue::isCell() const
548 inline bool JSValue::isInt32() const
553 inline bool JSValue::isUInt32() const
558 inline bool JSValue::isDouble() const
563 inline bool JSValue::isTrue() const
568 inline bool JSValue::isFalse() const
573 inline uint32_t JSValue::tag() const
578 inline int32_t JSValue::payload() const
583 inline int32_t JSValue::asInt32() const
589 inline uint32_t JSValue::asUInt32() const
595 inline double JSValue::asDouble() const
601 ALWAYS_INLINE JSCell* JSValue::asCell() const
607 ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, ExecState*, double d)
612 inline JSValue::JSValue(ExecState* exec, double d)
619 *this = JSValue(exec, static_cast<int32_t>(d));
622 inline JSValue::JSValue(ExecState* exec, char i)
624 *this = JSValue(exec, static_cast<int32_t>(i));
627 inline JSValue::JSValue(ExecState* exec, unsigned char i)
629 *this = JSValue(exec, static_cast<int32_t>(i));
632 inline JSValue::JSValue(ExecState* exec, short i)
634 *this = JSValue(exec, static_cast<int32_t>(i));
637 inline JSValue::JSValue(ExecState* exec, unsigned short i)
639 *this = JSValue(exec, static_cast<int32_t>(i));
642 inline JSValue::JSValue(ExecState*, int i)
648 inline JSValue::JSValue(ExecState* exec, unsigned i)
651 *this = JSValue(exec, static_cast<double>(i));
654 *this = JSValue(exec, static_cast<int32_t>(i));
657 inline JSValue::JSValue(ExecState* exec, long i)
660 *this = JSValue(exec, static_cast<double>(i));
663 *this = JSValue(exec, static_cast<int32_t>(i));
666 inline JSValue::JSValue(ExecState* exec, unsigned long i)
669 *this = JSValue(exec, static_cast<double>(i));
672 *this = JSValue(exec, static_cast<uint32_t>(i));
675 inline JSValue::JSValue(ExecState* exec, long long i)
678 *this = JSValue(exec, static_cast<double>(i));
681 *this = JSValue(exec, static_cast<int32_t>(i));
684 inline JSValue::JSValue(ExecState* exec, unsigned long long i)
687 *this = JSValue(exec, static_cast<double>(i));
690 *this = JSValue(exec, static_cast<uint32_t>(i));
693 inline JSValue::JSValue(JSGlobalData* globalData, double d)
700 *this = JSValue(globalData, static_cast<int32_t>(d));
703 inline JSValue::JSValue(JSGlobalData*, int i)
709 inline JSValue::JSValue(JSGlobalData* globalData, unsigned i)
712 *this = JSValue(globalData, static_cast<double>(i));
715 *this = JSValue(globalData, static_cast<int32_t>(i));
718 inline bool JSValue::isNumber() const
723 inline bool JSValue::isBoolean() const
728 inline bool JSValue::getBoolean(bool& v) const
742 inline bool JSValue::getBoolean() const
748 inline double JSValue::uncheckedGetNumber() const
754 ALWAYS_INLINE JSValue JSValue::toJSNumber(ExecState* exec) const
759 inline bool JSValue::getNumber(double& result) const
774 // JSValue member functions.
775 inline EncodedJSValue JSValue::encode(JSValue value)
780 inline JSValue JSValue::decode(EncodedJSValue ptr)
782 return JSValue(reinterpret_cast<JSCell*>(ptr));
785 inline JSValue JSValue::makeImmediate(intptr_t value)
787 return JSValue(reinterpret_cast<JSCell*>(value));
790 inline intptr_t JSValue::immediateValue()
796 inline JSValue::JSValue()
802 inline JSValue::JSValue(HashTableDeletedValueTag)
807 inline JSValue::JSValue(JSCell* ptr)
815 inline JSValue::JSValue(const JSCell* ptr)
823 inline JSValue::operator bool() const
828 inline bool JSValue::operator==(const JSValue& other) const
833 inline bool JSValue::operator!=(const JSValue& other) const
838 inline bool JSValue::isUndefined() const
843 inline bool JSValue::isNull() const