Module: wine Branch: master Commit: c74641acf23a991a9c570f7ff483e7959d3fd8bd URL: http://source.winehq.org/git/wine.git/?a=commit;h=c74641acf23a991a9c570f7ff4...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Dec 6 10:42:21 2011 +0100
jscript: Use bytecode for '|=' expression.
---
dlls/jscript/compile.c | 2 ++ dlls/jscript/engine.c | 29 ----------------------------- dlls/jscript/engine.h | 1 - dlls/jscript/parser.y | 2 +- 4 files changed, 3 insertions(+), 31 deletions(-)
diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index 9a0a471..22d5a5f 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -499,6 +499,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr) return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_div); case EXPR_ASSIGNMOD: return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_mod); + case EXPR_ASSIGNOR: + return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_or); case EXPR_BITNEG: return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_bneg); case EXPR_BOR: diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index 9e9c04d..9816b64 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -2151,25 +2151,6 @@ static HRESULT interp_jmp_z(exec_ctx_t *ctx) }
/* ECMA-262 3rd Edition 11.10 */ -static HRESULT bitor_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept_t *ei, VARIANT *retv) -{ - INT li, ri; - HRESULT hres; - - hres = to_int32(ctx, lval, ei, &li); - if(FAILED(hres)) - return hres; - - hres = to_int32(ctx, rval, ei, &ri); - if(FAILED(hres)) - return hres; - - V_VT(retv) = VT_I4; - V_I4(retv) = li|ri; - return S_OK; -} - -/* ECMA-262 3rd Edition 11.10 */ static HRESULT interp_or(exec_ctx_t *ctx) { INT l, r; @@ -3385,16 +3366,6 @@ HRESULT assign_and_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD }
/* ECMA-262 3rd Edition 11.13.2 */ -HRESULT assign_or_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) -{ - binary_expression_t *expr = (binary_expression_t*)_expr; - - TRACE("\n"); - - return assign_oper_eval(ctx, expr->expression1, expr->expression2, bitor_eval, ei, ret); -} - -/* ECMA-262 3rd Edition 11.13.2 */ HRESULT assign_xor_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret) { binary_expression_t *expr = (binary_expression_t*)_expr; diff --git a/dlls/jscript/engine.h b/dlls/jscript/engine.h index 330dc34..49c7aa8 100644 --- a/dlls/jscript/engine.h +++ b/dlls/jscript/engine.h @@ -577,7 +577,6 @@ HRESULT assign_lshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept HRESULT assign_rshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_rrshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_and_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; -HRESULT assign_or_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; HRESULT assign_xor_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN;
HRESULT compiled_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN; diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y index 8051c8a..0192eff 100644 --- a/dlls/jscript/parser.y +++ b/dlls/jscript/parser.y @@ -1350,7 +1350,7 @@ static const expression_eval_t expression_eval_table[] = { compiled_expression_eval, compiled_expression_eval, assign_and_expression_eval, - assign_or_expression_eval, + compiled_expression_eval, assign_xor_expression_eval, compiled_expression_eval, array_expression_eval,