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
2dcb8d41
Commit
2dcb8d41
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 while statement.
parent
c6932d80
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
68 deletions
+2
-68
compile.c
dlls/jscript/compile.c
+1
-8
engine.c
dlls/jscript/engine.c
+1
-59
engine.h
dlls/jscript/engine.h
+0
-1
No files found.
dlls/jscript/compile.c
View file @
2dcb8d41
...
...
@@ -1015,11 +1015,9 @@ static HRESULT compile_if_statement(compiler_ctx_t *ctx, if_statement_t *stat)
static
HRESULT
compile_while_statement
(
compiler_ctx_t
*
ctx
,
while_statement_t
*
stat
)
{
statement_ctx_t
stat_ctx
=
{
0
,
FALSE
,
FALSE
};
unsigned
off_backup
,
jmp_off
;
unsigned
jmp_off
;
HRESULT
hres
;
off_backup
=
ctx
->
code_off
;
stat_ctx
.
break_label
=
alloc_label
(
ctx
);
if
(
stat_ctx
.
break_label
==
-
1
)
return
E_OUTOFMEMORY
;
...
...
@@ -1050,11 +1048,6 @@ static HRESULT compile_while_statement(compiler_ctx_t *ctx, while_statement_t *s
}
hres
=
compile_statement
(
ctx
,
&
stat_ctx
,
stat
->
statement
);
if
(
hres
==
E_NOTIMPL
)
{
ctx
->
code_off
=
off_backup
;
stat
->
stat
.
eval
=
while_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.c
View file @
2dcb8d41
...
...
@@ -56,11 +56,6 @@ struct _except_frame_t {
except_frame_t
*
next
;
};
static
inline
HRESULT
stat_eval
(
script_ctx_t
*
ctx
,
statement_t
*
stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
return
stat
->
eval
(
ctx
,
stat
,
rt
,
ret
);
}
static
HRESULT
expr_eval
(
script_ctx_t
*
,
expression_t
*
,
jsexcept_t
*
,
VARIANT
*
);
static
HRESULT
stack_push
(
exec_ctx_t
*
ctx
,
VARIANT
*
v
)
...
...
@@ -671,59 +666,6 @@ static HRESULT interp_var_set(exec_ctx_t *ctx)
return
hres
;
}
/* ECMA-262 3rd Edition 12.6.2 */
HRESULT
while_statement_eval
(
script_ctx_t
*
ctx
,
statement_t
*
_stat
,
return_type_t
*
rt
,
VARIANT
*
ret
)
{
while_statement_t
*
stat
=
(
while_statement_t
*
)
_stat
;
VARIANT
val
,
tmp
;
VARIANT_BOOL
b
;
BOOL
test_expr
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
V_VT
(
&
val
)
=
VT_EMPTY
;
test_expr
=
!
stat
->
do_while
;
while
(
1
)
{
if
(
test_expr
)
{
hres
=
expr_eval
(
ctx
,
stat
->
expr
,
&
rt
->
ei
,
&
tmp
);
if
(
FAILED
(
hres
))
break
;
hres
=
to_boolean
(
&
tmp
,
&
b
);
VariantClear
(
&
tmp
);
if
(
FAILED
(
hres
)
||
!
b
)
break
;
}
else
{
test_expr
=
TRUE
;
}
hres
=
stat_eval
(
ctx
,
stat
->
statement
,
rt
,
&
tmp
);
if
(
FAILED
(
hres
))
break
;
VariantClear
(
&
val
);
val
=
tmp
;
if
(
rt
->
type
==
RT_CONTINUE
)
rt
->
type
=
RT_NORMAL
;
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.6.4 */
static
HRESULT
interp_forin
(
exec_ctx_t
*
ctx
)
{
...
...
@@ -2649,7 +2591,7 @@ static HRESULT interp_tree(exec_ctx_t *ctx)
TRACE
(
"
\n
"
);
hres
=
stat_
eval
(
ctx
->
parser
->
script
,
instr
->
arg1
.
stat
,
ctx
->
rt
,
&
v
);
hres
=
instr
->
arg1
.
stat
->
eval
(
ctx
->
parser
->
script
,
instr
->
arg1
.
stat
,
ctx
->
rt
,
&
v
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.h
View file @
2dcb8d41
...
...
@@ -413,7 +413,6 @@ typedef struct {
}
try_statement_t
;
HRESULT
compiled_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
while_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
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
;
...
...
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