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
932ffa0d
Commit
932ffa0d
authored
Mar 25, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 26, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Store return value in call_frame_t.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8fb19f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
engine.c
dlls/jscript/engine.c
+12
-11
engine.h
dlls/jscript/engine.h
+2
-2
No files found.
dlls/jscript/engine.c
View file @
932ffa0d
...
...
@@ -305,7 +305,6 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, BOOL is_global, exec_ctx_t **r
ctx
->
ref
=
1
;
ctx
->
is_global
=
is_global
;
ctx
->
ret
=
jsval_undefined
();
script_addref
(
script_ctx
);
ctx
->
script
=
script_ctx
;
...
...
@@ -321,7 +320,6 @@ void exec_release(exec_ctx_t *ctx)
if
(
ctx
->
script
)
script_release
(
ctx
->
script
);
jsval_release
(
ctx
->
ret
);
heap_free
(
ctx
);
}
...
...
@@ -2361,10 +2359,12 @@ static HRESULT interp_ret(script_ctx_t *ctx)
static
HRESULT
interp_setret
(
script_ctx_t
*
ctx
)
{
call_frame_t
*
frame
=
ctx
->
call_ctx
;
TRACE
(
"
\n
"
);
jsval_release
(
ctx
->
call_ctx
->
exec_ctx
->
ret
);
ctx
->
call_ctx
->
exec_ctx
->
ret
=
stack_pop
(
ctx
);
jsval_release
(
frame
->
ret
);
frame
->
ret
=
stack_pop
(
ctx
);
return
S_OK
;
}
...
...
@@ -2390,6 +2390,7 @@ static void release_call_frame(call_frame_t *frame)
IDispatch_Release
(
frame
->
this_obj
);
if
(
frame
->
scope
)
scope_release
(
frame
->
scope
);
jsval_release
(
frame
->
ret
);
heap_free
(
frame
);
}
...
...
@@ -2447,7 +2448,6 @@ static HRESULT unwind_exception(script_ctx_t *ctx)
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
function_code_t
*
func
,
jsval_t
*
ret
)
{
exec_ctx_t
*
exec_ctx
=
ctx
->
call_ctx
->
exec_ctx
;
call_frame_t
*
frame
;
jsop_t
op
;
HRESULT
hres
=
S_OK
;
...
...
@@ -2484,14 +2484,14 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
assert
(
ctx
->
stack_top
==
frame
->
stack_base
);
assert
(
frame
->
scope
==
frame
->
base_scope
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
release_call_frame
(
frame
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
SUCCEEDED
(
hres
))
{
*
ret
=
frame
->
ret
;
frame
->
ret
=
jsval_undefined
();
}
*
ret
=
exec_ctx
->
ret
;
exec_ctx
->
ret
=
jsval_undefined
();
return
S_OK
;
release_call_frame
(
frame
);
return
hres
;
}
static
HRESULT
bind_event_target
(
script_ctx_t
*
ctx
,
function_code_t
*
func
,
jsdisp_t
*
func_obj
)
...
...
@@ -2556,6 +2556,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode, function_
frame
->
function
=
function
;
frame
->
ip
=
function
->
instr_off
;
frame
->
stack_base
=
ctx
->
script
->
stack_top
;
frame
->
ret
=
jsval_undefined
();
if
(
scope
)
frame
->
base_scope
=
frame
->
scope
=
scope_addref
(
scope
);
...
...
dlls/jscript/engine.h
View file @
932ffa0d
...
...
@@ -198,6 +198,8 @@ typedef struct _call_frame_t {
scope_chain_t
*
scope
;
scope_chain_t
*
base_scope
;
jsval_t
ret
;
IDispatch
*
this_obj
;
jsdisp_t
*
variable_obj
;
...
...
@@ -213,8 +215,6 @@ struct _exec_ctx_t {
script_ctx_t
*
script
;
BOOL
is_global
;
jsval_t
ret
;
};
static
inline
void
exec_addref
(
exec_ctx_t
*
ctx
)
...
...
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