Jacek Caban : jscript: Use bytecode for labeled continue and break statements.
Alexandre Julliard
julliard at winehq.org
Fri Dec 30 10:27:01 CST 2011
Module: wine
Branch: master
Commit: e0552ad8c3bcb43d467e84af62ada70722b577fd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0552ad8c3bcb43d467e84af62ada70722b577fd
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Dec 30 11:16:24 2011 +0100
jscript: Use bytecode for labeled continue and break statements.
---
dlls/jscript/compile.c | 12 ++++--------
dlls/jscript/engine.c | 20 --------------------
dlls/jscript/engine.h | 3 ---
3 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index dca023c..8500076 100644
--- a/dlls/jscript/compile.c
+++ b/dlls/jscript/compile.c
@@ -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))
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 013ce0a..dce9410 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -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)
{
diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h
index a56bc43..04d2698 100644
--- a/dlls/jscript/engine.h
+++ b/dlls/jscript/engine.h
@@ -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,
More information about the wine-cvs
mailing list