Commit 59564606 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Call expressions needling EXPR_NEWREF flag directly.

parent fd6ecbd7
...@@ -1071,10 +1071,23 @@ HRESULT forin_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_ ...@@ -1071,10 +1071,23 @@ HRESULT forin_statement_eval(script_ctx_t *ctx, statement_t *_stat, return_type_
TRACE("iter %s\n", debugstr_w(str)); TRACE("iter %s\n", debugstr_w(str));
if(stat->variable) if(stat->variable) {
hres = identifier_eval(ctx, identifier, 0, NULL, &exprval); hres = identifier_eval(ctx, identifier, 0, NULL, &exprval);
else }else {
hres = expr_eval(ctx, stat->expr, EXPR_NEWREF, &rt->ei, &exprval); switch(stat->expr->type) {
case EXPR_ARRAY:
hres = array_expression_eval(ctx, stat->expr, EXPR_NEWREF, &rt->ei, &exprval);
break;
case EXPR_IDENT:
hres = identifier_expression_eval(ctx, stat->expr, EXPR_NEWREF, &rt->ei, &exprval);
break;
case EXPR_MEMBER:
hres = member_expression_eval(ctx, stat->expr, EXPR_NEWREF, &rt->ei, &exprval);
break;
default:
hres = expr_eval(ctx, stat->expr, 0, &rt->ei, &exprval);
}
}
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
V_VT(&name) = VT_BSTR; V_VT(&name) = VT_BSTR;
V_BSTR(&name) = str; V_BSTR(&name) = str;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment