Jacek Caban : jscript: Use bytecode for labelled statement stub.
Alexandre Julliard
julliard at winehq.org
Tue Dec 27 11:27:56 CST 2011
Module: wine
Branch: master
Commit: a6530f4032da470fe9dfa7de9555a355d4ea6654
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a6530f4032da470fe9dfa7de9555a355d4ea6654
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Dec 27 11:16:51 2011 +0100
jscript: Use bytecode for labelled statement stub.
---
dlls/jscript/compile.c | 2 ++
dlls/jscript/engine.c | 2 +-
dlls/jscript/engine.h | 2 +-
dlls/jscript/parser.y | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index e54c16a..5f25598 100644
--- a/dlls/jscript/compile.c
+++ b/dlls/jscript/compile.c
@@ -1246,6 +1246,8 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_t *stat)
return compile_for_statement(ctx, (for_statement_t*)stat);
case STAT_IF:
return compile_if_statement(ctx, (if_statement_t*)stat);
+ case STAT_LABEL:
+ return push_instr(ctx, OP_label) == -1 ? E_OUTOFMEMORY : S_OK; /* FIXME */
case STAT_SWITCH:
return compile_switch_statement(ctx, (switch_statement_t*)stat);
case STAT_VAR:
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 99c492f..fbeee6f 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -1067,7 +1067,7 @@ HRESULT interp_pop_scope(exec_ctx_t *ctx)
}
/* ECMA-262 3rd Edition 12.12 */
-HRESULT labelled_statement_eval(script_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret)
+HRESULT interp_label(exec_ctx_t *ctx)
{
FIXME("\n");
return E_NOTIMPL;
diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h
index 263548e..7dbaeb2 100644
--- a/dlls/jscript/engine.h
+++ b/dlls/jscript/engine.h
@@ -71,6 +71,7 @@ typedef struct _func_stack {
X(int, 1, ARG_INT, 0) \
X(jmp, 0, ARG_ADDR, 0) \
X(jmp_z, 0, ARG_ADDR, 0) \
+ X(label, 0, 0,0) \
X(lshift, 1, 0,0) \
X(lt, 1, 0,0) \
X(lteq, 1, 0,0) \
@@ -410,7 +411,6 @@ HRESULT continue_statement_eval(script_ctx_t*,statement_t*,return_type_t*,VARIAN
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 labelled_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 throw_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;
diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index aaec649..02d35bd 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -844,7 +844,7 @@ static const statement_eval_t stat_eval_table[] = {
compiled_statement_eval,
forin_statement_eval,
compiled_statement_eval,
- labelled_statement_eval,
+ compiled_statement_eval,
return_statement_eval,
compiled_statement_eval,
throw_statement_eval,
More information about the wine-cvs
mailing list