Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eb203a14
Commit
eb203a14
authored
Jun 03, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Remove NaN related FIXMEs.
parent
931554dd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
8 deletions
+18
-8
date.c
dlls/jscript/date.c
+1
-4
global.c
dlls/jscript/global.c
+2
-2
jscript.h
dlls/jscript/jscript.h
+7
-0
string.c
dlls/jscript/string.c
+2
-2
api.js
dlls/jscript/tests/api.js
+6
-0
No files found.
dlls/jscript/date.c
View file @
eb203a14
...
...
@@ -81,11 +81,8 @@ static const WCHAR setUTCFullYearW[] = {'s','e','t','U','T','C','F','u','l','l',
/* ECMA-262 3rd Edition 15.9.1.14 */
static
inline
DOUBLE
time_clip
(
DOUBLE
time
)
{
/* FIXME: Handle inf */
if
(
8.64e15
<
time
||
time
<
-
8.64e15
)
{
FIXME
(
"return NaN
\n
"
);
return
0
.
0
;
return
ret_nan
();
}
return
floor
(
time
);
...
...
dlls/jscript/global.c
View file @
eb203a14
...
...
@@ -351,8 +351,8 @@ static HRESULT JSGlobal_parseInt(DispatchEx *dispex, LCID lcid, WORD flags, DISP
HRESULT
hres
;
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"NAN
\n
"
);
return
E_NOTIMPL
;
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
arg_cnt
(
dp
)
>=
2
)
{
...
...
dlls/jscript/jscript.h
View file @
eb203a14
...
...
@@ -255,6 +255,13 @@ static inline void num_set_nan(VARIANT *v)
#endif
}
static
inline
DOUBLE
ret_nan
()
{
VARIANT
v
;
num_set_nan
(
&
v
);
return
V_R8
(
&
v
);
}
static
inline
void
num_set_inf
(
VARIANT
*
v
,
BOOL
positive
)
{
V_VT
(
v
)
=
VT_R8
;
...
...
dlls/jscript/string.c
View file @
eb203a14
...
...
@@ -254,8 +254,8 @@ static HRESULT String_charCodeAt(DispatchEx *dispex, LCID lcid, WORD flags, DISP
return
hres
;
if
(
V_VT
(
&
v
)
!=
VT_I4
||
V_I4
(
&
v
)
<
0
||
V_I4
(
&
v
)
>=
length
)
{
FIXME
(
"NAN
\n
"
);
return
E_FAIL
;
if
(
retv
)
num_set_nan
(
&
v
);
return
S_OK
;
}
idx
=
V_I4
(
&
v
);
...
...
dlls/jscript/tests/api.js
View file @
eb203a14
...
...
@@ -934,6 +934,12 @@ var date = new Date();
date
=
new
Date
(
100
);
ok
(
date
.
getTime
()
===
100
,
"date.getTime() = "
+
date
.
getTime
());
ok
(
Date
.
prototype
.
getTime
()
===
0
,
"date.prototype.getTime() = "
+
Date
.
prototype
.
getTime
());
date
=
new
Date
(
8.64e15
);
ok
(
date
.
getTime
()
===
8.64e15
,
"date.getTime() = "
+
date
.
getTime
());
date
=
new
Date
(
8.64e15
+
1
);
ok
(
isNaN
(
0
+
date
.
getTime
()),
"date.getTime() is not NaN"
);
date
=
new
Date
(
Infinity
);
ok
(
isNaN
(
0
+
date
.
getTime
()),
"date.getTime() is not NaN"
);
ok
(
typeof
(
Math
.
PI
)
===
"number"
,
"typeof(Math.PI) = "
+
typeof
(
Math
.
PI
));
ok
(
Math
.
floor
(
Math
.
PI
*
100
)
===
314
,
"Math.PI = "
+
Math
.
PI
);
...
...
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