Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
53ade93c
Commit
53ade93c
authored
Oct 15, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added NaN value implementation.
parent
ad1c1c61
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
global.c
dlls/jscript/global.c
+13
-2
jscript.h
dlls/jscript/jscript.h
+10
-0
lang.js
dlls/jscript/tests/lang.js
+3
-0
No files found.
dlls/jscript/global.c
View file @
53ade93c
...
...
@@ -108,8 +108,19 @@ static HRESULT constructor_call(DispatchEx *constr, LCID lcid, WORD flags, DISPP
static
HRESULT
JSGlobal_NaN
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
num_set_nan
(
retv
);
break
;
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
HRESULT
JSGlobal_Infinity
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/jscript.h
View file @
53ade93c
...
...
@@ -242,6 +242,16 @@ static inline void num_set_val(VARIANT *v, DOUBLE d)
}
}
static
inline
void
num_set_nan
(
VARIANT
*
v
)
{
V_VT
(
v
)
=
VT_R8
;
#ifdef NAN
V_R8
(
v
)
=
NAN
;
#else
V_UI8
(
v
)
=
(
ULONGLONG
)
0x7ff80000
<<
32
;
#endif
}
const
char
*
debugstr_variant
(
const
VARIANT
*
);
HRESULT
WINAPI
JScriptFactory_CreateInstance
(
IClassFactory
*
,
IUnknown
*
,
REFIID
,
void
**
);
...
...
dlls/jscript/tests/lang.js
View file @
53ade93c
...
...
@@ -785,7 +785,10 @@ if (true)
else
ok
(
true
,
"else should be associated with nearest if statement"
);
ok
(
isNaN
(
NaN
)
===
true
,
"isNaN(NaN) !== true"
);
ok
(
isNaN
(
0.5
)
===
false
,
"isNaN(0.5) !== false"
);
ok
(
isNaN
()
===
true
,
"isNaN() !== true"
);
ok
(
isNaN
(
NaN
,
0
)
===
true
,
"isNaN(NaN, 0) !== true"
);
ok
(
isNaN
(
0.5
,
NaN
)
===
false
,
"isNaN(0.5, NaN) !== false"
);
reportSuccess
();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment