Home | History | Annotate | Download | only in runtime

Lines Matching full:jsvalue

33 #include "JSValue.h"
62 * A JSValue* is either a pointer to a cell (a heap-allocated object) or an immediate (a type-tagged
63 * value masquerading as a pointer). The low two bits in a JSValue* are available for type tagging
139 friend class JSValue;
141 friend JSValue jsNumber(ExecState* exec, double d);
142 friend JSValue jsNumber(ExecState*, char i);
143 friend JSValue jsNumber(ExecState*, unsigned char i);
144 friend JSValue jsNumber(ExecState*, short i);
145 friend JSValue jsNumber(ExecState*, unsigned short i);
146 friend JSValue jsNumber(ExecState* exec, int i);
147 friend JSValue jsNumber(ExecState* exec, unsigned i);
148 friend JSValue jsNumber(ExecState* exec, long i);
149 friend JSValue jsNumber(ExecState* exec, unsigned long i);
150 friend JSValue jsNumber(ExecState* exec, long long i);
151 friend JSValue jsNumber(ExecState* exec, unsigned long long i);
152 friend JSValue jsNumber(JSGlobalData* globalData, double d);
153 friend JSValue jsNumber(JSGlobalData* globalData, short i);
154 friend JSValue jsNumber(JSGlobalData* globalData, unsigned short i);
155 friend JSValue jsNumber(JSGlobalData* globalData, int i);
156 friend JSValue jsNumber(JSGlobalData* globalData, unsigned i);
157 friend JSValue jsNumber(JSGlobalData* globalData, long i);
158 friend JSValue jsNumber(JSGlobalData* globalData, unsigned long i);
159 friend JSValue jsNumber(JSGlobalData* globalData, long long i);
160 friend JSValue jsNumber(JSGlobalData* globalData, unsigned long long i);
195 static ALWAYS_INLINE bool isImmediate(JSValue v)
200 static ALWAYS_INLINE bool isNumber(JSValue v)
205 static ALWAYS_INLINE bool isIntegerNumber(JSValue v)
215 static ALWAYS_INLINE bool isDouble(JSValue v)
221 static ALWAYS_INLINE bool isPositiveIntegerNumber(JSValue v)
227 static ALWAYS_INLINE bool isBoolean(JSValue v)
232 static ALWAYS_INLINE bool isUndefinedOrNull(JSValue v)
238 static JSValue from(char);
239 static JSValue from(signed char);
240 static JSValue from(unsigned char);
241 static JSValue from(short);
242 static JSValue from(unsigned short);
243 static JSValue from(int);
244 static JSValue from(unsigned);
245 static JSValue from(long);
246 static JSValue from(unsigned long);
247 static JSValue from(long long);
248 static JSValue from(unsigned long long);
249 static JSValue from(double);
251 static ALWAYS_INLINE bool isEitherImmediate(JSValue v1, JSValue v2)
256 static ALWAYS_INLINE bool areBothImmediate(JSValue v1, JSValue v2)
261 static ALWAYS_INLINE bool areBothImmediateIntegerNumbers(JSValue v1, JSValue v2)
270 static double toDouble(JSValue);
271 static bool toBoolean(JSValue);
273 static bool getUInt32(JSValue, uint32_t&);
274 static bool getTruncatedInt32(JSValue, int32_t&);
275 static bool getTruncatedUInt32(JSValue, uint32_t&);
277 static int32_t getTruncatedInt32(JSValue);
278 static uint32_t getTruncatedUInt32(JSValue);
280 static JSValue trueImmediate();
281 static JSValue falseImmediate();
282 static JSValue undefinedImmediate();
283 static JSValue nullImmediate();
284 static JSValue zeroImmediate();
285 static JSValue oneImmediate();
297 static ALWAYS_INLINE JSValue makeValue(intptr_t integer)
299 return JSValue::makeImmediate(integer);
306 static ALWAYS_INLINE JSValue makeInt(uint32_t value)
308 static ALWAYS_INLINE JSValue makeInt(int32_t value)
315 static ALWAYS_INLINE JSValue makeDouble(double value)
321 static ALWAYS_INLINE JSValue makeBool(bool b)
326 static ALWAYS_INLINE JSValue makeUndefined()
331 static ALWAYS_INLINE JSValue makeNull()
337 static JSValue fromNumberOutsideIntegerRange(T);
340 static ALWAYS_INLINE double doubleValue(JSValue v)
346 static ALWAYS_INLINE int32_t intValue(JSValue v)
351 static ALWAYS_INLINE uint32_t uintValue(JSValue v)
356 static ALWAYS_INLINE bool boolValue(JSValue v)
361 static ALWAYS_INLINE intptr_t rawValue(JSValue v)
367 ALWAYS_INLINE JSValue JSImmediate::trueImmediate() { return makeBool(true); }
368 ALWAYS_INLINE JSValue JSImmediate::falseImmediate() { return makeBool(false); }
369 ALWAYS_INLINE JSValue JSImmediate::undefinedImmediate() { return makeUndefined(); }
370 ALWAYS_INLINE JSValue JSImmediate::nullImmediate() { return makeNull(); }
371 ALWAYS_INLINE JSValue JSImmediate::zeroImmediate() { return makeInt(0); }
372 ALWAYS_INLINE JSValue JSImmediate::oneImmediate() { return makeInt(1); }
380 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue v)
387 ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue v)
394 ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValue v)
403 inline JSValue
409 inline JSValue JSImmediate::fromNumberOutsideIntegerRange(T)
411 return JSValue();
415 ALWAYS_INLINE JSValue JSImmediate::from(char i)
420 ALWAYS_INLINE JSValue JSImmediate::from(signed char i)
425 ALWAYS_INLINE JSValue JSImmediate::from(unsigned char i)
430 ALWAYS_INLINE JSValue JSImmediate::from(short i)
435 ALWAYS_INLINE JSValue JSImmediate::from(unsigned short i)
440 ALWAYS_INLINE JSValue JSImmediate::from(int i)
449 ALWAYS_INLINE JSValue JSImmediate::from(unsigned i)
456 ALWAYS_INLINE JSValue JSImmediate::from(long i)
463 ALWAYS_INLINE JSValue JSImmediate::from(unsigned long i)
470 ALWAYS_INLINE JSValue JSImmediate::from(long long i)
473 return JSValue();
477 ALWAYS_INLINE JSValue JSImmediate::from(unsigned long long i)
484 ALWAYS_INLINE JSValue JSImmediate::from(double d)
495 ALWAYS_INLINE int32_t JSImmediate::getTruncatedInt32(JSValue v)
501 ALWAYS_INLINE double JSImmediate::toDouble(JSValue v)
524 ALWAYS_INLINE bool JSImmediate::getUInt32(JSValue v, uint32_t& i)
530 ALWAYS_INLINE bool JSImmediate::getTruncatedInt32(JSValue v, int32_t& i)
536 ALWAYS_INLINE bool JSImmediate::getTruncatedUInt32(JSValue v, uint32_t& i)
541 inline JSValue::JSValue(JSNullTag)
546 inline JSValue::JSValue(JSUndefinedTag)
551 inline JSValue::JSValue(JSTrueTag)
556 inline JSValue::JSValue(JSFalseTag)
561 inline bool JSValue::isUndefinedOrNull() const
566 inline bool JSValue::isBoolean() const
571 inline bool JSValue::isTrue() const
576 inline bool JSValue::isFalse() const
581 inline bool JSValue::getBoolean(bool& v) const
591 inline bool JSValue::getBoolean() const
596 inline bool JSValue::isCell() const
601 inline bool JSValue::isInt32() const
606 inline int32_t JSValue::asInt32() const
612 inline bool JSValue::isUInt32() const
617 inline uint32_t JSValue::asUInt32() const
625 static ALWAYS_INLINE bool canDoFastBitwiseOperations(JSValue v1, JSValue v2)
630 static ALWAYS_INLINE JSValue equal(JSValue v1, JSValue v2)
636 static ALWAYS_INLINE JSValue notEqual(JSValue v1, JSValue v2)
642 static ALWAYS_INLINE JSValue andImmediateNumbers(JSValue v1, JSValue v2)
648 static ALWAYS_INLINE JSValue xorImmediateNumbers(JSValue v1, JSValue v2)
654 static ALWAYS_INLINE JSValue orImmediateNumbers(JSValue v1, JSValue v2)
660 static ALWAYS_INLINE bool canDoFastRshift(JSValue v1, JSValue v2)
665 static ALWAYS_INLINE bool canDoFastUrshift(JSValue v1, JSValue v2)
670 static ALWAYS_INLINE JSValue rightShiftImmediateNumbers(JSValue val, JSValue shift)
680 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v)
687 static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue v1, JSValue v2)
694 static ALWAYS_INLINE JSValue addImmediateNumbers(JSValue v1, JSValue v2)
700 static ALWAYS_INLINE JSValue subImmediateNumbers(JSValue v1, JSValue v2)
706 static ALWAYS_INLINE JSValue incImmediateNumber(JSValue v)
712 static ALWAYS_INLINE JSValue decImmediateNumber(JSValue v)