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
132ff14d
Commit
132ff14d
authored
Mar 25, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 25, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Store function description in call_frame_t.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89ad1094
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
engine.c
dlls/jscript/engine.c
+5
-7
engine.h
dlls/jscript/engine.h
+1
-2
No files found.
dlls/jscript/engine.c
View file @
132ff14d
...
@@ -825,12 +825,13 @@ static HRESULT interp_end_finally(exec_ctx_t *ctx)
...
@@ -825,12 +825,13 @@ static HRESULT interp_end_finally(exec_ctx_t *ctx)
static
HRESULT
interp_func
(
exec_ctx_t
*
ctx
)
static
HRESULT
interp_func
(
exec_ctx_t
*
ctx
)
{
{
unsigned
func_idx
=
get_op_uint
(
ctx
,
0
);
unsigned
func_idx
=
get_op_uint
(
ctx
,
0
);
call_frame_t
*
frame
=
ctx
->
script
->
call_ctx
;
jsdisp_t
*
dispex
;
jsdisp_t
*
dispex
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"%d
\n
"
,
func_idx
);
TRACE
(
"%d
\n
"
,
func_idx
);
hres
=
create_source_function
(
ctx
->
script
,
ctx
->
script
->
call_ctx
->
bytecode
,
ctx
->
func_code
->
funcs
+
func_idx
,
hres
=
create_source_function
(
ctx
->
script
,
frame
->
bytecode
,
frame
->
function
->
funcs
+
func_idx
,
ctx
->
scope_chain
,
&
dispex
);
ctx
->
scope_chain
,
&
dispex
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
@@ -2453,7 +2454,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
...
@@ -2453,7 +2454,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
{
{
exec_ctx_t
*
exec_ctx
=
ctx
->
call_ctx
->
exec_ctx
;
exec_ctx_t
*
exec_ctx
=
ctx
->
call_ctx
->
exec_ctx
;
except_frame_t
*
prev_except_frame
;
except_frame_t
*
prev_except_frame
;
function_code_t
*
prev_func
;
unsigned
prev_ip
,
prev_top
;
unsigned
prev_ip
,
prev_top
;
scope_chain_t
*
prev_scope
;
scope_chain_t
*
prev_scope
;
call_frame_t
*
frame
;
call_frame_t
*
frame
;
...
@@ -2467,10 +2467,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
...
@@ -2467,10 +2467,8 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
prev_scope
=
exec_ctx
->
scope_chain
;
prev_scope
=
exec_ctx
->
scope_chain
;
prev_except_frame
=
exec_ctx
->
except_frame
;
prev_except_frame
=
exec_ctx
->
except_frame
;
prev_ip
=
exec_ctx
->
ip
;
prev_ip
=
exec_ctx
->
ip
;
prev_func
=
exec_ctx
->
func_code
;
exec_ctx
->
ip
=
func
->
instr_off
;
exec_ctx
->
ip
=
func
->
instr_off
;
exec_ctx
->
except_frame
=
NULL
;
exec_ctx
->
except_frame
=
NULL
;
exec_ctx
->
func_code
=
func
;
while
(
exec_ctx
->
ip
!=
-
1
)
{
while
(
exec_ctx
->
ip
!=
-
1
)
{
op
=
frame
->
bytecode
->
instrs
[
exec_ctx
->
ip
].
op
;
op
=
frame
->
bytecode
->
instrs
[
exec_ctx
->
ip
].
op
;
...
@@ -2491,7 +2489,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
...
@@ -2491,7 +2489,6 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, function_code_t *func, jsval_t
exec_ctx
->
ip
=
prev_ip
;
exec_ctx
->
ip
=
prev_ip
;
exec_ctx
->
except_frame
=
prev_except_frame
;
exec_ctx
->
except_frame
=
prev_except_frame
;
exec_ctx
->
func_code
=
prev_func
;
assert
(
ctx
->
call_ctx
==
frame
);
assert
(
ctx
->
call_ctx
==
frame
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
ctx
->
call_ctx
=
frame
->
prev_frame
;
...
@@ -2550,7 +2547,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
...
@@ -2550,7 +2547,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
return
hres
;
return
hres
;
}
}
static
HRESULT
setup_call_frame
(
exec_ctx_t
*
ctx
,
bytecode_t
*
bytecode
)
static
HRESULT
setup_call_frame
(
exec_ctx_t
*
ctx
,
bytecode_t
*
bytecode
,
function_code_t
*
function
)
{
{
call_frame_t
*
frame
;
call_frame_t
*
frame
;
...
@@ -2559,6 +2556,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode)
...
@@ -2559,6 +2556,7 @@ static HRESULT setup_call_frame(exec_ctx_t *ctx, bytecode_t *bytecode)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
frame
->
bytecode
=
bytecode
;
frame
->
bytecode
=
bytecode
;
frame
->
function
=
function
;
frame
->
exec_ctx
=
ctx
;
frame
->
exec_ctx
=
ctx
;
frame
->
prev_frame
=
ctx
->
script
->
call_ctx
;
frame
->
prev_frame
=
ctx
->
script
->
call_ctx
;
...
@@ -2601,7 +2599,7 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, js
...
@@ -2601,7 +2599,7 @@ HRESULT exec_source(exec_ctx_t *ctx, bytecode_t *code, function_code_t *func, js
}
}
}
}
hres
=
setup_call_frame
(
ctx
,
code
);
hres
=
setup_call_frame
(
ctx
,
code
,
func
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
...
dlls/jscript/engine.h
View file @
132ff14d
...
@@ -192,6 +192,7 @@ struct _parser_ctx_t;
...
@@ -192,6 +192,7 @@ struct _parser_ctx_t;
typedef
struct
_call_frame_t
{
typedef
struct
_call_frame_t
{
bytecode_t
*
bytecode
;
bytecode_t
*
bytecode
;
function_code_t
*
function
;
struct
_call_frame_t
*
prev_frame
;
struct
_call_frame_t
*
prev_frame
;
exec_ctx_t
*
exec_ctx
;
exec_ctx_t
*
exec_ctx
;
...
@@ -200,12 +201,10 @@ typedef struct _call_frame_t {
...
@@ -200,12 +201,10 @@ typedef struct _call_frame_t {
struct
_exec_ctx_t
{
struct
_exec_ctx_t
{
LONG
ref
;
LONG
ref
;
struct
_parser_ctx_t
*
parser
;
script_ctx_t
*
script
;
script_ctx_t
*
script
;
scope_chain_t
*
scope_chain
;
scope_chain_t
*
scope_chain
;
jsdisp_t
*
var_disp
;
jsdisp_t
*
var_disp
;
IDispatch
*
this_obj
;
IDispatch
*
this_obj
;
function_code_t
*
func_code
;
BOOL
is_global
;
BOOL
is_global
;
jsval_t
*
stack
;
jsval_t
*
stack
;
...
...
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