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
0841b60b
Commit
0841b60b
authored
Jun 04, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Inline add_eval implementation.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ea9b5073
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
27 deletions
+16
-27
engine.c
dlls/jscript/engine.c
+16
-27
No files found.
dlls/jscript/engine.c
View file @
0841b60b
...
@@ -1734,21 +1734,27 @@ static HRESULT interp_in(script_ctx_t *ctx)
...
@@ -1734,21 +1734,27 @@ static HRESULT interp_in(script_ctx_t *ctx)
}
}
/* ECMA-262 3rd Edition 11.6.1 */
/* ECMA-262 3rd Edition 11.6.1 */
static
HRESULT
add_eval
(
script_ctx_t
*
ctx
,
jsval_t
lval
,
jsval_t
rval
,
jsval_t
*
ret
)
static
HRESULT
interp_add
(
script_ctx_t
*
ctx
)
{
{
jsval_t
r
,
l
;
jsval_t
l
,
r
,
lval
,
rval
,
ret
;
HRESULT
hres
;
HRESULT
hres
;
rval
=
stack_pop
(
ctx
);
lval
=
stack_pop
(
ctx
);
TRACE
(
"%s + %s
\n
"
,
debugstr_jsval
(
lval
),
debugstr_jsval
(
rval
));
hres
=
to_primitive
(
ctx
,
lval
,
&
l
,
NO_HINT
);
hres
=
to_primitive
(
ctx
,
lval
,
&
l
,
NO_HINT
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
to_primitive
(
ctx
,
rval
,
&
r
,
NO_HINT
);
if
(
FAILED
(
hres
))
jsval_release
(
l
);
}
jsval_release
(
lval
);
jsval_release
(
rval
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
to_primitive
(
ctx
,
rval
,
&
r
,
NO_HINT
);
if
(
FAILED
(
hres
))
{
jsval_release
(
l
);
return
hres
;
}
if
(
is_string
(
l
)
||
is_string
(
r
))
{
if
(
is_string
(
l
)
||
is_string
(
r
))
{
jsstr_t
*
lstr
,
*
rstr
=
NULL
;
jsstr_t
*
lstr
,
*
rstr
=
NULL
;
...
@@ -1761,7 +1767,7 @@ static HRESULT add_eval(script_ctx_t *ctx, jsval_t lval, jsval_t rval, jsval_t *
...
@@ -1761,7 +1767,7 @@ static HRESULT add_eval(script_ctx_t *ctx, jsval_t lval, jsval_t rval, jsval_t *
ret_str
=
jsstr_concat
(
lstr
,
rstr
);
ret_str
=
jsstr_concat
(
lstr
,
rstr
);
if
(
ret_str
)
if
(
ret_str
)
*
ret
=
jsval_string
(
ret_str
);
ret
=
jsval_string
(
ret_str
);
else
else
hres
=
E_OUTOFMEMORY
;
hres
=
E_OUTOFMEMORY
;
}
}
...
@@ -1776,29 +1782,12 @@ static HRESULT add_eval(script_ctx_t *ctx, jsval_t lval, jsval_t rval, jsval_t *
...
@@ -1776,29 +1782,12 @@ static HRESULT add_eval(script_ctx_t *ctx, jsval_t lval, jsval_t rval, jsval_t *
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
to_number
(
ctx
,
r
,
&
nr
);
hres
=
to_number
(
ctx
,
r
,
&
nr
);
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
*
ret
=
jsval_number
(
nl
+
nr
);
ret
=
jsval_number
(
nl
+
nr
);
}
}
}
}
jsval_release
(
r
);
jsval_release
(
r
);
jsval_release
(
l
);
jsval_release
(
l
);
return
hres
;
}
/* ECMA-262 3rd Edition 11.6.1 */
static
HRESULT
interp_add
(
script_ctx_t
*
ctx
)
{
jsval_t
l
,
r
,
ret
;
HRESULT
hres
;
r
=
stack_pop
(
ctx
);
l
=
stack_pop
(
ctx
);
TRACE
(
"%s + %s
\n
"
,
debugstr_jsval
(
l
),
debugstr_jsval
(
r
));
hres
=
add_eval
(
ctx
,
l
,
r
,
&
ret
);
jsval_release
(
l
);
jsval_release
(
r
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
...
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