jscript: Use compiler for hanling empty statements.

This commit is contained in:
Jacek Caban 2011-12-19 15:00:06 +01:00 committed by Alexandre Julliard
parent cf2fc11e31
commit 7c3160ae02
4 changed files with 3 additions and 11 deletions

View File

@ -928,6 +928,8 @@ 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_EMPTY:
return push_instr(ctx, OP_undefined) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
case STAT_EXPR:
return compile_expression_statement(ctx, (expression_statement_t*)stat);
case STAT_IF:

View File

@ -703,15 +703,6 @@ HRESULT var_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t
return S_OK;
}
/* ECMA-262 3rd Edition 12.3 */
HRESULT empty_statement_eval(script_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret)
{
TRACE("\n");
V_VT(ret) = VT_EMPTY;
return S_OK;
}
/* ECMA-262 3rd Edition 12.6.2 */
HRESULT while_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
{

View File

@ -399,7 +399,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 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;
HRESULT forin_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN;

View File

@ -839,7 +839,7 @@ static const statement_eval_t stat_eval_table[] = {
compiled_statement_eval,
break_statement_eval,
continue_statement_eval,
empty_statement_eval,
compiled_statement_eval,
compiled_statement_eval,
for_statement_eval,
forin_statement_eval,