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