Compound statements are linked lists. Remove unused "global_symbols" "public_symbols" "qualified_symbols". Reduce max hash map load.

This commit is contained in:
Christoffer Lerno
2022-01-05 19:40:44 +01:00
parent 869aa7ed76
commit 8a840746f6
17 changed files with 202 additions and 190 deletions

View File

@@ -1543,11 +1543,12 @@ static Expr* parse_expr_block(ParseContext *context, Expr *left)
assert(!left && "Had left hand side");
Expr *expr = EXPR_NEW_TOKEN(EXPR_EXPR_BLOCK, context->tok);
advance_and_verify(context, TOKEN_LBRAPIPE);
AstId *next = &expr->expr_block.first_stmt;
while (!try_consume(context, TOKEN_RBRAPIPE))
{
Ast *stmt = parse_stmt(context);
if (!ast_ok(stmt)) return poisoned_expr;
vec_add(expr->expr_block.stmts, stmt);
ast_append(&next, stmt);
}
RANGE_EXTEND_PREV(expr);
return expr;