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
ccba279b
Commit
ccba279b
authored
Dec 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use compiler for handling expression statements.
parent
2f3e27f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
compile.c
dlls/jscript/compile.c
+19
-0
engine.c
dlls/jscript/engine.c
+0
-0
engine.h
dlls/jscript/engine.h
+1
-2
parser.y
dlls/jscript/parser.y
+1
-1
No files found.
dlls/jscript/compile.c
View file @
ccba279b
...
...
@@ -865,11 +865,30 @@ static HRESULT compile_block_statement(compiler_ctx_t *ctx, statement_t *iter)
return
S_OK
;
}
/* ECMA-262 3rd Edition 12.4 */
static
HRESULT
compile_expression_statement
(
compiler_ctx_t
*
ctx
,
expression_statement_t
*
stat
)
{
BOOL
no_ret
=
FALSE
;
HRESULT
hres
;
hres
=
compile_expression_noret
(
ctx
,
stat
->
expr
,
&
no_ret
);
if
(
FAILED
(
hres
))
return
hres
;
/* FIXME: that's a big potential optimization */
if
(
no_ret
&&
!
push_instr
(
ctx
,
OP_undefined
)
==
-
1
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
compile_statement
(
compiler_ctx_t
*
ctx
,
statement_t
*
stat
)
{
switch
(
stat
->
type
)
{
case
STAT_BLOCK
:
return
compile_block_statement
(
ctx
,
((
block_statement_t
*
)
stat
)
->
stat_list
);
case
STAT_EXPR
:
return
compile_expression_statement
(
ctx
,
(
expression_statement_t
*
)
stat
);
default:
return
compile_interp_fallback
(
ctx
,
stat
);
}
...
...
dlls/jscript/engine.c
View file @
ccba279b
This diff is collapsed.
Click to expand it.
dlls/jscript/engine.h
View file @
ccba279b
...
...
@@ -229,7 +229,7 @@ struct _exec_ctx_t {
unsigned
top
;
unsigned
ip
;
jsexcept_t
ei
;
jsexcept_t
*
ei
;
return_type_t
*
rt
;
/* FIXME */
};
...
...
@@ -400,7 +400,6 @@ typedef struct {
HRESULT
compiled_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
var_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
empty_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
expression_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
if_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
for_statement_eval
(
script_ctx_t
*
,
statement_t
*
,
return_type_t
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/parser.y
View file @
ccba279b
...
...
@@ -840,7 +840,7 @@ static const statement_eval_t stat_eval_table[] = {
break_statement_eval,
continue_statement_eval,
empty_statement_eval,
expression
_statement_eval,
compiled
_statement_eval,
for_statement_eval,
forin_statement_eval,
if_statement_eval,
...
...
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