From 8edffa1263dc1660c8c383467974933179931cfa Mon Sep 17 00:00:00 2001 From: Kimplul Date: Thu, 16 Jan 2025 08:28:31 +0200 Subject: avoid resets --- src/actualize.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/actualize.c') diff --git a/src/actualize.c b/src/actualize.c index 5aee29b..ebbffbb 100644 --- a/src/actualize.c +++ b/src/actualize.c @@ -729,21 +729,6 @@ static int should_implement_list(struct scope *scope, struct ast *params, return 0; } -static int _reset(struct ast *node, void *data) -{ - UNUSED(data); - ast_clear_flags(node, AST_FLAG_INIT | AST_FLAG_ACTUAL); - /* clear type info */ - node->t = NULL; - node->scope = NULL; - return 0; -} - -static int reset(struct ast *body) -{ - return ast_visit(_reset, NULL, body, NULL); -} - static int expand_type(struct scope *scope, struct ast *expd, struct ast *params, struct type *types) { @@ -756,8 +741,6 @@ static int expand_type(struct scope *scope, struct ast *expd, default: abort(); } - reset(expd); - foreach_node(n, params) { struct ast *p = clone_ast(n); var_type(p) = clone_type(types); -- cgit v1.3