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
6710e7ec
Commit
6710e7ec
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: Get rid of stat_eval_table.
parent
f08fcff4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
21 deletions
+11
-21
compile.c
dlls/jscript/compile.c
+10
-0
engine.h
dlls/jscript/engine.h
+0
-1
parser.y
dlls/jscript/parser.y
+1
-20
No files found.
dlls/jscript/compile.c
View file @
6710e7ec
...
...
@@ -1289,6 +1289,13 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t *
return
push_instr_uint
(
ctx
,
OP_jmp
,
pop_ctx
->
break_label
);
}
/* ECMA-262 3rd Edition 12.9 */
static
HRESULT
compile_return_statement
(
compiler_ctx_t
*
ctx
,
expression_statement_t
*
stat
)
{
stat
->
stat
.
eval
=
return_statement_eval
;
return
compile_interp_fallback
(
ctx
,
&
stat
->
stat
);
}
/* ECMA-262 3rd Edition 12.10 */
static
HRESULT
compile_with_statement
(
compiler_ctx_t
*
ctx
,
with_statement_t
*
stat
)
{
...
...
@@ -1527,6 +1534,9 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx,
case
STAT_LABEL
:
hres
=
push_instr
(
ctx
,
OP_label
)
==
-
1
?
E_OUTOFMEMORY
:
S_OK
;
/* FIXME */
break
;
case
STAT_RETURN
:
hres
=
compile_return_statement
(
ctx
,
(
expression_statement_t
*
)
stat
);
break
;
case
STAT_SWITCH
:
hres
=
compile_switch_statement
(
ctx
,
(
switch_statement_t
*
)
stat
);
break
;
...
...
dlls/jscript/engine.h
View file @
6710e7ec
...
...
@@ -412,7 +412,6 @@ typedef struct {
statement_t
*
finally_statement
;
}
try_statement_t
;
HRESULT
compiled_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
;
...
...
dlls/jscript/parser.y
View file @
6710e7ec
...
...
@@ -835,25 +835,6 @@ static BOOL allow_auto_semicolon(parser_ctx_t *ctx)
return ctx->nl || ctx->ptr == ctx->end || *(ctx->ptr-1) == '}';
}
static const statement_eval_t stat_eval_table[] = {
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
return_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
compiled_statement_eval
};
static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size)
{
statement_t *stat;
...
...
@@ -863,7 +844,7 @@ static void *new_statement(parser_ctx_t *ctx, statement_type_t type, size_t size
return NULL;
stat->type = type;
stat->eval =
stat_eval_table[type]
;
stat->eval =
NULL
;
stat->instr_off = -1;
stat->next = NULL;
...
...
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