Jacek Caban : jscript: Always use bytecode for with statement.
Alexandre Julliard
julliard at winehq.org
Thu Dec 29 12:15:44 CST 2011
Module: wine
Branch: master
Commit: 1c0fe6002de00ac96f42f706bf9fb041028b9217
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1c0fe6002de00ac96f42f706bf9fb041028b9217
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Dec 29 11:06:13 2011 +0100
jscript: Always use bytecode for with statement.
---
dlls/jscript/compile.c | 8 --------
dlls/jscript/engine.c | 38 --------------------------------------
dlls/jscript/engine.h | 1 -
3 files changed, 0 insertions(+), 47 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index 9d1081e..0f1e3af 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 0d97765..30222b8 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -1068,44 +1068,6 @@ HRESULT return_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type
}
/* 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)
{
IDispatch *disp;
diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h
index 1b827b2..4f088b5 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;
More information about the wine-cvs
mailing list