diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 076b76889c..636cdffaaa 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1432,12 +1432,10 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) { statement_ctx_t try_ctx = {0, FALSE, TRUE, -1, -1}, catch_ctx = {0, TRUE, FALSE, -1, -1}; statement_ctx_t finally_ctx = {2, FALSE, FALSE, -1, -1}; - unsigned off_backup, push_except; + unsigned push_except; BSTR ident; HRESULT hres; - off_backup = ctx->code_off; - push_except = push_instr(ctx, OP_push_except); if(push_except == -1) return E_OUTOFMEMORY; @@ -1456,11 +1454,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) try_ctx.stack_use = 2; hres = compile_statement(ctx, &try_ctx, stat->try_statement); - if(hres == E_NOTIMPL) { - ctx->code_off = off_backup; - stat->stat.eval = try_statement_eval; - return compile_interp_fallback(ctx, &stat->stat); - } if(FAILED(hres)) return hres; @@ -1477,11 +1470,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) instr_ptr(ctx, push_except)->arg1.uint = ctx->code_off; hres = compile_statement(ctx, &catch_ctx, stat->catch_block->statement); - if(hres == E_NOTIMPL) { - ctx->code_off = off_backup; - stat->stat.eval = try_statement_eval; - return compile_interp_fallback(ctx, &stat->stat); - } if(FAILED(hres)) return hres; @@ -1499,11 +1487,6 @@ static HRESULT compile_try_statement(compiler_ctx_t *ctx, try_statement_t *stat) return E_OUTOFMEMORY; hres = compile_statement(ctx, stat->catch_block ? NULL : &finally_ctx, stat->finally_statement); - if(hres == E_NOTIMPL) { - ctx->code_off = off_backup; - stat->stat.eval = try_statement_eval; - return compile_interp_fallback(ctx, &stat->stat); - } if(FAILED(hres)) return hres; diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 746002f19d..62fdf23c55 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -943,69 +943,6 @@ static HRESULT interp_throw_type(exec_ctx_t *ctx) return throw_type_error(ctx->parser->script, ctx->ei, hres, str); } -/* ECMA-262 3rd Edition 12.14 */ -static HRESULT catch_eval(script_ctx_t *ctx, catch_block_t *block, return_type_t *rt, VARIANT *ret) -{ - jsdisp_t *var_disp; - VARIANT ex, val; - HRESULT hres; - - ex = rt->ei.var; - memset(&rt->ei, 0, sizeof(jsexcept_t)); - - hres = create_dispex(ctx, NULL, NULL, &var_disp); - if(SUCCEEDED(hres)) { - hres = jsdisp_propput_name(var_disp, block->identifier, &ex, &rt->ei, NULL/*FIXME*/); - if(SUCCEEDED(hres)) { - hres = scope_push(ctx->exec_ctx->scope_chain, var_disp, &ctx->exec_ctx->scope_chain); - if(SUCCEEDED(hres)) { - hres = stat_eval(ctx, block->statement, rt, &val); - scope_pop(&ctx->exec_ctx->scope_chain); - } - } - - jsdisp_release(var_disp); - } - - VariantClear(&ex); - if(FAILED(hres)) - return hres; - - *ret = val; - return S_OK; -} - -/* ECMA-262 3rd Edition 12.14 */ -HRESULT try_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret) -{ - try_statement_t *stat = (try_statement_t*)_stat; - VARIANT val; - HRESULT hres; - - TRACE("\n"); - - hres = stat_eval(ctx, stat->try_statement, rt, &val); - if(FAILED(hres)) { - TRACE("EXCEPTION\n"); - if(!stat->catch_block) - return hres; - - hres = catch_eval(ctx, stat->catch_block, rt, &val); - if(FAILED(hres)) - return hres; - } - - if(stat->finally_statement) { - VariantClear(&val); - hres = stat_eval(ctx, stat->finally_statement, rt, &val); - if(FAILED(hres)) - return hres; - } - - *ret = val; - return S_OK; -} - /* ECMA-262 3rd Edition 12.14 */ static HRESULT interp_push_except(exec_ctx_t *ctx) { diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 385778ed72..424000e9af 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -417,7 +417,6 @@ HRESULT while_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) 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; -HRESULT try_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; typedef struct { enum {