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
985c6a19
Commit
985c6a19
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 switch statement.
parent
f904bc8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
77 deletions
+0
-77
compile.c
dlls/jscript/compile.c
+0
-8
engine.c
dlls/jscript/engine.c
+0
-68
engine.h
dlls/jscript/engine.h
+0
-1
No files found.
dlls/jscript/compile.c
View file @
985c6a19
...
...
@@ -1327,11 +1327,8 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t
BOOL
have_default
=
FALSE
;
statement_t
*
stat_iter
;
case_clausule_t
*
iter
;
unsigned
off_backup
;
HRESULT
hres
;
off_backup
=
ctx
->
code_off
;
hres
=
compile_expression
(
ctx
,
stat
->
expr
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -1394,11 +1391,6 @@ static HRESULT compile_switch_statement(compiler_ctx_t *ctx, switch_statement_t
for
(
stat_iter
=
iter
->
stat
;
stat_iter
&&
(
!
iter
->
next
||
iter
->
next
->
stat
!=
stat_iter
);
stat_iter
=
stat_iter
->
next
)
{
hres
=
compile_statement
(
ctx
,
&
stat_ctx
,
stat_iter
);
if
(
hres
==
E_NOTIMPL
)
{
ctx
->
code_off
=
off_backup
;
stat
->
stat
.
eval
=
switch_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
if
(
FAILED
(
hres
))
break
;
...
...
dlls/jscript/engine.c
View file @
985c6a19
...
...
@@ -916,74 +916,6 @@ static HRESULT interp_case(exec_ctx_t *ctx)
}
/* ECMA-262 3rd Edition 12.13 */
HRESULT
switch_statement_eval
(
script_ctx_t
*
ctx
,
statement_t
*
_stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
switch_statement_t
*
stat
=
(
switch_statement_t
*
)
_stat
;
case_clausule_t
*
iter
,
*
default_clausule
=
NULL
;
statement_t
*
stat_iter
;
VARIANT
val
,
cval
;
BOOL
b
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
hres
=
expr_eval
(
ctx
,
stat
->
expr
,
&
rt
->
ei
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
for
(
iter
=
stat
->
case_list
;
iter
;
iter
=
iter
->
next
)
{
if
(
!
iter
->
expr
)
{
default_clausule
=
iter
;
continue
;
}
hres
=
expr_eval
(
ctx
,
iter
->
expr
,
&
rt
->
ei
,
&
cval
);
if
(
FAILED
(
hres
))
break
;
hres
=
equal2_values
(
&
val
,
&
cval
,
&
b
);
VariantClear
(
&
cval
);
if
(
FAILED
(
hres
)
||
b
)
break
;
}
VariantClear
(
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
iter
)
iter
=
default_clausule
;
V_VT
(
&
val
)
=
VT_EMPTY
;
if
(
iter
)
{
VARIANT
tmp
;
for
(
stat_iter
=
iter
->
stat
;
stat_iter
;
stat_iter
=
stat_iter
->
next
)
{
hres
=
stat_eval
(
ctx
,
stat_iter
,
rt
,
&
tmp
);
if
(
FAILED
(
hres
))
break
;
VariantClear
(
&
val
);
val
=
tmp
;
if
(
rt
->
type
!=
RT_NORMAL
)
break
;
}
}
if
(
FAILED
(
hres
))
{
VariantClear
(
&
val
);
return
hres
;
}
if
(
rt
->
type
==
RT_BREAK
)
rt
->
type
=
RT_NORMAL
;
*
ret
=
val
;
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.13 */
static
HRESULT
interp_throw
(
exec_ctx_t
*
ctx
)
{
TRACE
(
"
\n
"
);
...
...
dlls/jscript/engine.h
View file @
985c6a19
...
...
@@ -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
switch_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
{
...
...
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