Jacek Caban : jscript: Added '>>=' expression implementation.

Alexandre Julliard julliard at winehq.org
Fri Sep 19 07:14:53 CDT 2008


Module: wine
Branch: master
Commit: bc641097a90410c4a845d1ad17a3a82b561e13ec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc641097a90410c4a845d1ad17a3a82b561e13ec

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Sep 19 00:45:20 2008 +0200

jscript: Added '>>=' expression implementation.

---

 dlls/jscript/engine.c      |   10 +++++++---
 dlls/jscript/tests/lang.js |    3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 2b9a2bb..3efec65 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -2880,10 +2880,14 @@ HRESULT assign_lshift_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWOR
     return assign_oper_eval(ctx, expr->expression1, expr->expression2, lshift_eval, ei, ret);
 }
 
-HRESULT assign_rshift_expression_eval(exec_ctx_t *ctx, expression_t *expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
+/* ECMA-262 3rd Edition    11.13.2 */
+HRESULT assign_rshift_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    binary_expression_t *expr = (binary_expression_t*)_expr;
+
+    TRACE("\n");
+
+    return assign_oper_eval(ctx, expr->expression1, expr->expression2, rshift_eval, ei, ret);
 }
 
 HRESULT assign_rrshift_expression_eval(exec_ctx_t *ctx, expression_t *expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js
index 5e725be..250093d 100644
--- a/dlls/jscript/tests/lang.js
+++ b/dlls/jscript/tests/lang.js
@@ -249,6 +249,9 @@ ok(tmp === 2.5, "tmp !=== 2.5");
 tmp = 8;
 ok((tmp <<= 1) === 16, "tmp <<= 1 !== 16");
 
+tmp = 8;
+ok((tmp >>= 1) === 4, "tmp >>= 1 !== 4");
+
 tmp = 3 || ok(false, "second or expression called");
 ok(tmp === 3, "3 || (...) is not 3");
 




More information about the wine-cvs mailing list