[PATCH v4 2/6] jscript: Enumerate with and block scopes.

Jacek Caban jacek at codeweavers.com
Fri Jun 18 05:16:45 CDT 2021


Hi Paul,


Patches look mostly good to me now, I have one doubt through:

On 6/17/21 11:25 PM, Paul Gofman wrote:
>       case STAT_WITH: {
>           with_statement_t*with_stat = (with_statement_t*)stat;
> +        statement_ctx_t stat_ctx = {0, TRUE};
>   
>           hres = visit_expression(ctx, with_stat->expr);
>           if(FAILED(hres))
>               return hres;
>   
> -        hres = visit_statement(ctx, with_stat->statement);
> +        if (ctx->parser->script->version >= SCRIPTLANGUAGEVERSION_ES5)
> +        {
> +            if (!alloc_local_scope(ctx, &with_stat->scope_index))
> +                return E_OUTOFMEMORY;
> +
> +            stat_ctx.scope_index = with_stat->scope_index;
> +        }


Do we need to alloc local scope for with statement? They only use passed 
object for the scope and, unless I'm missing something, we should never 
need this local scope anyway.

Thanks,
Jacek



More information about the wine-devel mailing list