Commit e0552ad8 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use bytecode for labeled continue and break statements.

parent b82a6982
...@@ -1294,10 +1294,8 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_ ...@@ -1294,10 +1294,8 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_
return JS_E_INVALID_CONTINUE; return JS_E_INVALID_CONTINUE;
} }
if(stat->identifier) { if(stat->identifier)
stat->stat.eval = continue_statement_eval; return push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
return compile_interp_fallback(ctx, &stat->stat);
}
hres = pop_to_stat(ctx, pop_ctx); hres = pop_to_stat(ctx, pop_ctx);
if(FAILED(hres)) if(FAILED(hres))
...@@ -1325,10 +1323,8 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t * ...@@ -1325,10 +1323,8 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t *
return JS_E_INVALID_BREAK; return JS_E_INVALID_BREAK;
} }
if(stat->identifier) { if(stat->identifier)
stat->stat.eval = break_statement_eval; return push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
return compile_interp_fallback(ctx, &stat->stat);
}
hres = pop_to_stat(ctx, pop_ctx); hres = pop_to_stat(ctx, pop_ctx);
if(FAILED(hres)) if(FAILED(hres))
......
...@@ -644,26 +644,6 @@ static HRESULT interp_forin(exec_ctx_t *ctx) ...@@ -644,26 +644,6 @@ static HRESULT interp_forin(exec_ctx_t *ctx)
return S_OK; 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 */ /* ECMA-262 3rd Edition 12.10 */
HRESULT interp_push_scope(exec_ctx_t *ctx) HRESULT interp_push_scope(exec_ctx_t *ctx)
{ {
......
...@@ -411,9 +411,6 @@ typedef struct { ...@@ -411,9 +411,6 @@ typedef struct {
statement_t *finally_statement; statement_t *finally_statement;
} try_statement_t; } 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 { typedef struct {
enum { enum {
EXPRVAL_VARIANT, EXPRVAL_VARIANT,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment