jscript: Use bytecode for '*=' expression implementation.

This commit is contained in:
Jacek Caban 2011-12-06 10:41:34 +01:00 committed by Alexandre Julliard
parent b7ceca1399
commit 0ff59f444b
4 changed files with 3 additions and 30 deletions

View File

@ -481,6 +481,8 @@ static HRESULT compile_expression(compiler_ctx_t *ctx, expression_t *expr)
return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_add);
case EXPR_ASSIGNSUB:
return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_sub);
case EXPR_ASSIGNMUL:
return compile_assign_expression(ctx, (binary_expression_t*)expr, OP_mul);
case EXPR_BITNEG:
return compile_unary_expression(ctx, (unary_expression_t*)expr, OP_bneg);
case EXPR_BOR:

View File

@ -2420,24 +2420,6 @@ static HRESULT interp_sub(exec_ctx_t *ctx)
return stack_push_number(ctx, num_val(&l)-num_val(&r));
}
/* ECMA-262 3rd Edition 11.5.1 */
static HRESULT mul_eval(script_ctx_t *ctx, VARIANT *lval, VARIANT *rval, jsexcept_t *ei, VARIANT *retv)
{
VARIANT lnum, rnum;
HRESULT hres;
hres = to_number(ctx, lval, ei, &lnum);
if(FAILED(hres))
return hres;
hres = to_number(ctx, rval, ei, &rnum);
if(FAILED(hres))
return hres;
num_set_val(retv, num_val(&lnum) * num_val(&rnum));
return S_OK;
}
/* ECMA-262 3rd Edition 11.5.1 */
static HRESULT interp_mul(exec_ctx_t *ctx)
{
@ -3383,16 +3365,6 @@ HRESULT assign_rrshift_expression_eval(script_ctx_t *ctx, expression_t *_expr, D
return assign_oper_eval(ctx, expr->expression1, expr->expression2, rshift2_eval, ei, ret);
}
/* ECMA-262 3rd Edition 11.13.2 */
HRESULT assign_mul_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, mul_eval, ei, ret);
}
/* ECMA-262 3rd Edition 11.13.2 */
HRESULT assign_div_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flags, jsexcept_t *ei, exprval_t *ret)
{

View File

@ -575,7 +575,6 @@ HRESULT right2_shift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_
HRESULT assign_lshift_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN;
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_mul_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN;
HRESULT assign_div_expression_eval(script_ctx_t*,expression_t*,DWORD,jsexcept_t*,exprval_t*) DECLSPEC_HIDDEN;
HRESULT assign_mod_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;

View File

@ -1346,7 +1346,7 @@ static const expression_eval_t expression_eval_table[] = {
assign_rrshift_expression_eval,
compiled_expression_eval,
compiled_expression_eval,
assign_mul_expression_eval,
compiled_expression_eval,
assign_div_expression_eval,
assign_mod_expression_eval,
assign_and_expression_eval,