diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 9d1081ee144..0f1e3af0a52 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -1313,11 +1313,8 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t * static HRESULT compile_with_statement(compiler_ctx_t *ctx, with_statement_t *stat) { statement_ctx_t stat_ctx = {0, TRUE, FALSE, -1, -1}; - unsigned off_backup; HRESULT hres; - off_backup = ctx->code_off; - hres = compile_expression(ctx, stat->expr); if(FAILED(hres)) return hres; @@ -1326,11 +1323,6 @@ static HRESULT compile_with_statement(compiler_ctx_t *ctx, with_statement_t *sta return E_OUTOFMEMORY; hres = compile_statement(ctx, &stat_ctx, stat->statement); - if(hres == E_NOTIMPL) { - ctx->code_off = off_backup; - stat->stat.eval = with_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 0d977659e5a..30222b8edc9 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -1067,44 +1067,6 @@ HRESULT return_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type return S_OK; } -/* ECMA-262 3rd Edition 12.10 */ -HRESULT with_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret) -{ - with_statement_t *stat = (with_statement_t*)_stat; - IDispatch *disp; - jsdisp_t *obj; - VARIANT val; - HRESULT hres; - - TRACE("\n"); - - hres = expr_eval(ctx, stat->expr, &rt->ei, &val); - if(FAILED(hres)) - return hres; - - hres = to_object(ctx, &val, &disp); - VariantClear(&val); - if(FAILED(hres)) - return hres; - - obj = iface_to_jsdisp((IUnknown*)disp); - IDispatch_Release(disp); - if(!obj) { - FIXME("disp id not jsdisp\n"); - return E_NOTIMPL; - } - - hres = scope_push(ctx->exec_ctx->scope_chain, obj, &ctx->exec_ctx->scope_chain); - jsdisp_release(obj); - if(FAILED(hres)) - return hres; - - hres = stat_eval(ctx, stat->statement, rt, ret); - - scope_pop(&ctx->exec_ctx->scope_chain); - return hres; -} - /* ECMA-262 3rd Edition 12.10 */ HRESULT interp_push_scope(exec_ctx_t *ctx) { diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 1b827b2b97f..4f088b5a5cf 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -419,7 +419,6 @@ HRESULT forin_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 with_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIANT*) DECLSPEC_HIDDEN; HRESULT switch_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;