Jacek Caban : jscript: Added continue statement implementation.
Alexandre Julliard
julliard at winehq.org
Thu Sep 18 07:55:54 CDT 2008
Module: wine
Branch: master
Commit: 99335680630f0a48e999a2426b835dfb248e1459
URL: http://source.winehq.org/git/wine.git/?a=commit;h=99335680630f0a48e999a2426b835dfb248e1459
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Sep 17 23:35:57 2008 +0200
jscript: Added continue statement implementation.
---
dlls/jscript/engine.c | 17 ++++++++++++++---
dlls/jscript/tests/lang.js | 11 +++++++++++
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 36286da..8d92533 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -707,10 +707,21 @@ HRESULT forin_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_t *
return E_NOTIMPL;
}
-HRESULT continue_statement_eval(exec_ctx_t *ctx, statement_t *stat, return_type_t *rt, VARIANT *ret)
+/* ECMA-262 3rd Edition 12.7 */
+HRESULT continue_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t *rt, VARIANT *ret)
{
- FIXME("\n");
- return E_NOTIMPL;
+ branch_statement_t *stat = (branch_statement_t*)_stat;
+
+ TRACE("\n");
+
+ if(stat->identifier) {
+ FIXME("indentifier not implemented\n");
+ return E_NOTIMPL;
+ }
+
+ rt->type = RT_CONTINUE;
+ V_VT(ret) = VT_EMPTY;
+ return S_OK;
}
/* ECMA-262 3rd Edition 12.8 */
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index 6acc82c..74a84ef 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -582,4 +582,15 @@ do {
} while(false);
ok(tmp === 1, "tmp !== 4");
+tmp = 0;
+while(tmp < 4) {
+ tmp++;
+ if(tmp === 2) {
+ continue;
+ ok(false, "break did not break");
+ }
+ ok(tmp <= 4 && tmp != 2, "tmp = " + tmp);
+}
+ok(tmp === 4, "tmp !== 4");
+
reportSuccess();
More information about the wine-cvs
mailing list