Commit d9a4392d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use quiet NaNs in jsval.

parent 73276d79
......@@ -35,8 +35,8 @@
#endif
#ifdef JSVAL_DOUBLE_LAYOUT_PTR32
/* NaN exponent and our 0x80000 marker */
#define JSV_VAL(x) (0x7ff80000|x)
/* NaN exponent, quiet bit 0x80000 and our 0x10000 marker */
#define JSV_VAL(x) (0x7ff90000|x)
#else
#define JSV_VAL(x) x
#endif
......@@ -150,10 +150,10 @@ static inline jsval_t jsval_number(double n)
if((ret.u.s.tag & 0x7ff00000) == 0x7ff00000) {
/* isinf */
if(ret.u.s.tag & 0xfffff) {
ret.u.s.tag = 0x7ff00000;
ret.u.s.tag = 0x7ff80000;
ret.u.s.u.as_uintptr = ~0;
}else if(ret.u.s.u.as_uintptr) {
ret.u.s.tag = 0x7ff00000;
ret.u.s.tag = 0x7ff80000;
}
}
#else
......@@ -191,7 +191,7 @@ static inline BOOL is_string(jsval_t v)
static inline BOOL is_number(jsval_t v)
{
#ifdef JSVAL_DOUBLE_LAYOUT_PTR32
return (v.u.s.tag & 0x7ff80000) != 0x7ff80000;
return (v.u.s.tag & 0x7ff10000) != 0x7ff10000;
#else
return v.type == JSV_NUMBER;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment