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
c6932d80
Commit
c6932d80
authored
Dec 29, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Always use bytecode for try statement.
parent
985c6a19
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
82 deletions
+1
-82
compile.c
dlls/jscript/compile.c
+1
-18
engine.c
dlls/jscript/engine.c
+0
-63
engine.h
dlls/jscript/engine.h
+0
-1
No files found.
dlls/jscript/compile.c
View file @
c6932d80
...
...
@@ -1432,12 +1432,10 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat)
{
statement_ctx_t
try_ctx
=
{
0
,
FALSE
,
TRUE
,
-
1
,
-
1
},
catch_ctx
=
{
0
,
TRUE
,
FALSE
,
-
1
,
-
1
};
statement_ctx_t
finally_ctx
=
{
2
,
FALSE
,
FALSE
,
-
1
,
-
1
};
unsigned
off_backup
,
push_except
;
unsigned
push_except
;
BSTR
ident
;
HRESULT
hres
;
off_backup
=
ctx
->
code_off
;
push_except
=
push_instr
(
ctx
,
OP_push_except
);
if
(
push_except
==
-
1
)
return
E_OUTOFMEMORY
;
...
...
@@ -1456,11 +1454,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat)
try_ctx
.
stack_use
=
2
;
hres
=
compile_statement
(
ctx
,
&
try_ctx
,
stat
->
try_statement
);
if
(
hres
==
E_NOTIMPL
)
{
ctx
->
code_off
=
off_backup
;
stat
->
stat
.
eval
=
try_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1477,11 +1470,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat)
instr_ptr
(
ctx
,
push_except
)
->
arg1
.
uint
=
ctx
->
code_off
;
hres
=
compile_statement
(
ctx
,
&
catch_ctx
,
stat
->
catch_block
->
statement
);
if
(
hres
==
E_NOTIMPL
)
{
ctx
->
code_off
=
off_backup
;
stat
->
stat
.
eval
=
try_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1499,11 +1487,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat)
return
E_OUTOFMEMORY
;
hres
=
compile_statement
(
ctx
,
stat
->
catch_block
?
NULL
:
&
finally_ctx
,
stat
->
finally_statement
);
if
(
hres
==
E_NOTIMPL
)
{
ctx
->
code_off
=
off_backup
;
stat
->
stat
.
eval
=
try_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.c
View file @
c6932d80
...
...
@@ -944,69 +944,6 @@ static HRESULT interp_throw_type(exec_ctx_t *ctx)
}
/* ECMA-262 3rd Edition 12.14 */
static
HRESULT
catch_eval
(
script_ctx_t
*
ctx
,
catch_block_t
*
block
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
jsdisp_t
*
var_disp
;
VARIANT
ex
,
val
;
HRESULT
hres
;
ex
=
rt
->
ei
.
var
;
memset
(
&
rt
->
ei
,
0
,
sizeof
(
jsexcept_t
));
hres
=
create_dispex
(
ctx
,
NULL
,
NULL
,
&
var_disp
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
jsdisp_propput_name
(
var_disp
,
block
->
identifier
,
&
ex
,
&
rt
->
ei
,
NULL
/*FIXME*/
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
scope_push
(
ctx
->
exec_ctx
->
scope_chain
,
var_disp
,
&
ctx
->
exec_ctx
->
scope_chain
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
stat_eval
(
ctx
,
block
->
statement
,
rt
,
&
val
);
scope_pop
(
&
ctx
->
exec_ctx
->
scope_chain
);
}
}
jsdisp_release
(
var_disp
);
}
VariantClear
(
&
ex
);
if
(
FAILED
(
hres
))
return
hres
;
*
ret
=
val
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.14 */
HRESULT
try_statement_eval
(
script_ctx_t
*
ctx
,
statement_t
*
_stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
try_statement_t
*
stat
=
(
try_statement_t
*
)
_stat
;
VARIANT
val
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
stat_eval
(
ctx
,
stat
->
try_statement
,
rt
,
&
val
);
if
(
FAILED
(
hres
))
{
TRACE
(
"EXCEPTION
\n
"
);
if
(
!
stat
->
catch_block
)
return
hres
;
hres
=
catch_eval
(
ctx
,
stat
->
catch_block
,
rt
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
}
if
(
stat
->
finally_statement
)
{
VariantClear
(
&
val
);
hres
=
stat_eval
(
ctx
,
stat
->
finally_statement
,
rt
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
}
*
ret
=
val
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.14 */
static
HRESULT
interp_push_except
(
exec_ctx_t
*
ctx
)
{
const
unsigned
arg1
=
ctx
->
parser
->
code
->
instrs
[
ctx
->
ip
].
arg1
.
uint
;
...
...
dlls/jscript/engine.h
View file @
c6932d80
...
...
@@ -417,7 +417,6 @@ HRESULT while_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*)
HRESULT
continue_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
break_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
return_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
try_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
typedef
struct
{
enum
{
...
...
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