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
0bf61fb6
Commit
0bf61fb6
authored
Mar 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Return double instead of VARIANT from stack_pop_number.
parent
0d287ff0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
18 deletions
+13
-18
engine.c
dlls/jscript/engine.c
+13
-18
No files found.
dlls/jscript/engine.c
View file @
0bf61fb6
...
...
@@ -145,20 +145,15 @@ static void stack_popn(exec_ctx_t *ctx, unsigned n)
VariantClear
(
stack_pop
(
ctx
));
}
static
HRESULT
stack_pop_number
(
exec_ctx_t
*
ctx
,
VARIANT
*
r
)
static
HRESULT
stack_pop_number
(
exec_ctx_t
*
ctx
,
double
*
r
)
{
VARIANT
*
v
;
double
n
;
HRESULT
hres
;
v
=
stack_pop
(
ctx
);
hres
=
to_number
(
ctx
->
script
,
v
,
ctx
->
ei
,
&
n
);
hres
=
to_number
(
ctx
->
script
,
v
,
ctx
->
ei
,
r
);
VariantClear
(
v
);
if
(
FAILED
(
hres
))
return
hres
;
num_set_val
(
r
,
n
);
return
S_OK
;
return
hres
;
}
static
HRESULT
stack_pop_object
(
exec_ctx_t
*
ctx
,
IDispatch
**
r
)
...
...
@@ -1569,7 +1564,7 @@ static HRESULT interp_add(exec_ctx_t *ctx)
/* ECMA-262 3rd Edition 11.6.2 */
static
HRESULT
interp_sub
(
exec_ctx_t
*
ctx
)
{
VARIANT
l
,
r
;
double
l
,
r
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
...
...
@@ -1582,13 +1577,13 @@ static HRESULT interp_sub(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push_number
(
ctx
,
num_val
(
&
l
)
-
num_val
(
&
r
)
);
return
stack_push_number
(
ctx
,
l
-
r
);
}
/* ECMA-262 3rd Edition 11.5.1 */
static
HRESULT
interp_mul
(
exec_ctx_t
*
ctx
)
{
VARIANT
l
,
r
;
double
l
,
r
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
...
...
@@ -1601,13 +1596,13 @@ static HRESULT interp_mul(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push_number
(
ctx
,
num_val
(
&
l
)
*
num_val
(
&
r
)
);
return
stack_push_number
(
ctx
,
l
*
r
);
}
/* ECMA-262 3rd Edition 11.5.2 */
static
HRESULT
interp_div
(
exec_ctx_t
*
ctx
)
{
VARIANT
l
,
r
;
double
l
,
r
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
...
...
@@ -1620,13 +1615,13 @@ static HRESULT interp_div(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push_number
(
ctx
,
num_val
(
&
l
)
/
num_val
(
&
r
)
);
return
stack_push_number
(
ctx
,
l
/
r
);
}
/* ECMA-262 3rd Edition 11.5.3 */
static
HRESULT
interp_mod
(
exec_ctx_t
*
ctx
)
{
VARIANT
l
,
r
;
double
l
,
r
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
...
...
@@ -1639,7 +1634,7 @@ static HRESULT interp_mod(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push_number
(
ctx
,
fmod
(
num_val
(
&
l
),
num_val
(
&
r
)
));
return
stack_push_number
(
ctx
,
fmod
(
l
,
r
));
}
/* ECMA-262 3rd Edition 11.4.2 */
...
...
@@ -1862,7 +1857,7 @@ static HRESULT interp_typeof(exec_ctx_t *ctx)
/* ECMA-262 3rd Edition 11.4.7 */
static
HRESULT
interp_minus
(
exec_ctx_t
*
ctx
)
{
VARIANT
n
;
double
n
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
...
...
@@ -1871,7 +1866,7 @@ static HRESULT interp_minus(exec_ctx_t *ctx)
if
(
FAILED
(
hres
))
return
hres
;
return
stack_push_number
(
ctx
,
-
n
um_val
(
&
n
)
);
return
stack_push_number
(
ctx
,
-
n
);
}
/* ECMA-262 3rd Edition 11.4.6 */
...
...
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