jscript: Use bytecode for labeled continue and break statements.

This commit is contained in:
Jacek Caban 2011-12-30 11:16:24 +01:00 committed by Alexandre Julliard
parent b82a6982a9
commit e0552ad8c3
3 changed files with 4 additions and 31 deletions

View File

@ -1294,10 +1294,8 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_
return JS_E_INVALID_CONTINUE;
}
if(stat->identifier) {
stat->stat.eval = continue_statement_eval;
return compile_interp_fallback(ctx, &stat->stat);
}
if(stat->identifier)
return push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
hres = pop_to_stat(ctx, pop_ctx);
if(FAILED(hres))
@ -1325,10 +1323,8 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t *
return JS_E_INVALID_BREAK;
}
if(stat->identifier) {
stat->stat.eval = break_statement_eval;
return compile_interp_fallback(ctx, &stat->stat);
}
if(stat->identifier)
return push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
hres = pop_to_stat(ctx, pop_ctx);
if(FAILED(hres))

View File

@ -644,26 +644,6 @@ static HRESULT interp_forin(exec_ctx_t *ctx)
return S_OK;
}
/* ECMA-262 3rd Edition 12.7 */
HRESULT continue_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
{
branch_statement_t *stat = (branch_statement_t*)_stat;
assert(stat->identifier != NULL);
FIXME("identifier not implemented\n");
return E_NOTIMPL;
}
/* ECMA-262 3rd Edition 12.8 */
HRESULT break_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
{
branch_statement_t *stat = (branch_statement_t*)_stat;
assert(stat->identifier != NULL);
FIXME("identifier not implemented\n");
return E_NOTIMPL;
}
/* ECMA-262 3rd Edition 12.10 */
HRESULT interp_push_scope(exec_ctx_t *ctx)
{

View File

@ -411,9 +411,6 @@ typedef struct {
statement_t *finally_statement;
} try_statement_t;
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;
typedef struct {
enum {
EXPRVAL_VARIANT,