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
cb317ed5
Commit
cb317ed5
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: Moved more return object logic to enter_bytecode loop.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c1526a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
36 deletions
+28
-36
engine.c
dlls/jscript/engine.c
+28
-36
No files found.
dlls/jscript/engine.c
View file @
cb317ed5
...
...
@@ -2392,7 +2392,7 @@ static void release_call_frame(call_frame_t *frame)
heap_free
(
frame
);
}
static
HRESULT
unwind_exception
(
script_ctx_t
*
ctx
)
static
HRESULT
unwind_exception
(
script_ctx_t
*
ctx
,
HRESULT
exception_hres
)
{
call_frame_t
*
frame
=
ctx
->
call_ctx
;
except_frame_t
*
except_frame
;
...
...
@@ -2400,6 +2400,17 @@ static HRESULT unwind_exception(script_ctx_t *ctx)
BSTR
ident
;
HRESULT
hres
;
if
(
!
frame
->
except_frame
)
{
while
(
frame
->
scope
!=
frame
->
base_scope
)
scope_pop
(
&
frame
->
scope
);
stack_popn
(
ctx
,
ctx
->
stack_top
-
frame
->
stack_base
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
release_call_frame
(
frame
);
return
exception_hres
;
}
except_frame
=
frame
->
except_frame
;
frame
->
except_frame
=
except_frame
->
next
;
...
...
@@ -2444,7 +2455,7 @@ static HRESULT unwind_exception(script_ctx_t *ctx)
return
hres
;
}
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
jsval_t
*
r
et
)
static
HRESULT
enter_bytecode
(
script_ctx_t
*
ctx
,
jsval_t
*
r
)
{
call_frame_t
*
frame
;
jsop_t
op
;
...
...
@@ -2454,40 +2465,30 @@ static HRESULT enter_bytecode(script_ctx_t *ctx, jsval_t *ret)
frame
=
ctx
->
call_ctx
;
while
(
frame
->
ip
!=
-
1
)
{
while
(
1
)
{
op
=
frame
->
bytecode
->
instrs
[
frame
->
ip
].
op
;
hres
=
op_funcs
[
op
](
ctx
);
if
(
FAILED
(
hres
))
{
TRACE
(
"EXCEPTION %08x
\n
"
,
hres
);
if
(
!
frame
->
except_frame
)
break
;
hres
=
unwind_exception
(
ctx
);
hres
=
unwind_exception
(
ctx
,
hres
);
if
(
FAILED
(
hres
))
break
;
return
hres
;
}
else
if
(
frame
->
ip
==
-
1
)
{
assert
(
ctx
->
stack_top
==
frame
->
stack_base
);
assert
(
frame
->
scope
==
frame
->
base_scope
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
if
(
r
)
*
r
=
steal_ret
(
frame
);
release_call_frame
(
frame
);
break
;
}
else
{
frame
->
ip
+=
op_move
[
op
];
}
}
assert
(
ctx
->
call_ctx
==
frame
);
if
(
FAILED
(
hres
))
{
while
(
frame
->
scope
!=
frame
->
base_scope
)
scope_pop
(
&
frame
->
scope
);
stack_popn
(
ctx
,
ctx
->
stack_top
-
frame
->
stack_base
);
}
assert
(
ctx
->
stack_top
==
frame
->
stack_base
);
assert
(
frame
->
scope
==
frame
->
base_scope
);
ctx
->
call_ctx
=
frame
->
prev_frame
;
if
(
SUCCEEDED
(
hres
))
*
ret
=
steal_ret
(
frame
);
release_call_frame
(
frame
);
return
hres
;
return
S_OK
;
}
static
HRESULT
bind_event_target
(
script_ctx_t
*
ctx
,
function_code_t
*
func
,
jsdisp_t
*
func_obj
)
...
...
@@ -2528,10 +2529,9 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
}
HRESULT
exec_source
(
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
*
r
et
)
IDispatch
*
this_obj
,
jsdisp_t
*
variable_obj
,
jsval_t
*
r
)
{
call_frame_t
*
frame
;
jsval_t
val
;
unsigned
i
;
HRESULT
hres
;
...
...
@@ -2603,13 +2603,5 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi
frame
->
prev_frame
=
ctx
->
call_ctx
;
ctx
->
call_ctx
=
frame
;
hres
=
enter_bytecode
(
ctx
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
ret
)
*
ret
=
val
;
else
jsval_release
(
val
);
return
S_OK
;
return
enter_bytecode
(
ctx
,
r
);
}
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