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
db0fee5e
Commit
db0fee5e
authored
Mar 28, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Merge setup_call_frame into exec_source.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d66b5bf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
46 deletions
+36
-46
engine.c
dlls/jscript/engine.c
+36
-46
No files found.
dlls/jscript/engine.c
View file @
db0fee5e
...
...
@@ -2443,7 +2443,7 @@ static HRESULT unwind_exception(script_ctx_t *ctx)
return
hres
;
}
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
function_code_t
*
func
,
jsval_t
*
ret
)
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
jsval_t
*
ret
)
{
call_frame_t
*
frame
;
jsop_t
op
;
...
...
@@ -2526,10 +2526,42 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
return
hres
;
}
static
HRESULT
setup_call_fram
e
(
script_ctx_t
*
ctx
,
DWORD
flags
,
bytecode_t
*
bytecode
,
function_code_t
*
function
,
scope_chain_t
*
scope
,
IDispatch
*
this_obj
,
jsdisp_t
*
variable_obj
)
HRESULT
exec_sourc
e
(
script_ctx_t
*
ctx
,
DWORD
flags
,
bytecode_t
*
bytecode
,
function_code_t
*
function
,
scope_chain_t
*
scope
,
IDispatch
*
this_obj
,
jsdisp_t
*
variable_obj
,
jsval_t
*
ret
)
{
call_frame_t
*
frame
;
jsval_t
val
;
unsigned
i
;
HRESULT
hres
;
for
(
i
=
0
;
i
<
function
->
func_cnt
;
i
++
)
{
jsdisp_t
*
func_obj
;
if
(
!
function
->
funcs
[
i
].
name
)
continue
;
hres
=
create_source_function
(
ctx
,
bytecode
,
function
->
funcs
+
i
,
scope
,
&
func_obj
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
function
->
funcs
[
i
].
event_target
)
hres
=
bind_event_target
(
ctx
,
function
->
funcs
+
i
,
func_obj
);
else
hres
=
jsdisp_propput_name
(
variable_obj
,
function
->
funcs
[
i
].
name
,
jsval_obj
(
func_obj
));
jsdisp_release
(
func_obj
);
if
(
FAILED
(
hres
))
return
hres
;
}
for
(
i
=
0
;
i
<
function
->
var_cnt
;
i
++
)
{
if
(
!
(
flags
&
EXEC_GLOBAL
)
||
!
lookup_global_members
(
ctx
,
function
->
variables
[
i
],
NULL
))
{
DISPID
id
=
0
;
hres
=
jsdisp_get_id
(
variable_obj
,
function
->
variables
[
i
],
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
/* ECMA-262 3rd Edition 11.2.3.7 */
if
(
this_obj
)
{
...
...
@@ -2569,50 +2601,8 @@ static HRESULT setup_call_frame(script_ctx_t *ctx, DWORD flags, bytecode_t *byte
frame
->
prev_frame
=
ctx
->
call_ctx
;
ctx
->
call_ctx
=
frame
;
return
S_OK
;
}
HRESULT
exec_source
(
script_ctx_t
*
ctx
,
DWORD
flags
,
bytecode_t
*
code
,
function_code_t
*
func
,
scope_chain_t
*
scope
,
IDispatch
*
this_obj
,
jsdisp_t
*
variable_obj
,
jsval_t
*
ret
)
{
jsval_t
val
;
unsigned
i
;
HRESULT
hres
=
S_OK
;
for
(
i
=
0
;
i
<
func
->
func_cnt
;
i
++
)
{
jsdisp_t
*
func_obj
;
if
(
!
func
->
funcs
[
i
].
name
)
continue
;
hres
=
create_source_function
(
ctx
,
code
,
func
->
funcs
+
i
,
scope
,
&
func_obj
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
func
->
funcs
[
i
].
event_target
)
hres
=
bind_event_target
(
ctx
,
func
->
funcs
+
i
,
func_obj
);
else
hres
=
jsdisp_propput_name
(
variable_obj
,
func
->
funcs
[
i
].
name
,
jsval_obj
(
func_obj
));
jsdisp_release
(
func_obj
);
if
(
FAILED
(
hres
))
return
hres
;
}
for
(
i
=
0
;
i
<
func
->
var_cnt
;
i
++
)
{
if
(
!
(
flags
&
EXEC_GLOBAL
)
||
!
lookup_global_members
(
ctx
,
func
->
variables
[
i
],
NULL
))
{
DISPID
id
=
0
;
hres
=
jsdisp_get_id
(
variable_obj
,
func
->
variables
[
i
],
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
hres
=
setup_call_frame
(
ctx
,
flags
,
code
,
func
,
scope
,
this_obj
,
variable_obj
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
enter_bytecode
(
ctx
,
func
,
&
val
);
hres
=
enter_bytecode
(
ctx
,
&
val
);
if
(
FAILED
(
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