From 6edcfb23ffd49e937395b710f7c6213b2c0d93cf Mon Sep 17 00:00:00 2001 From: A404M Date: Fri, 25 Apr 2025 22:49:01 +0330 Subject: performance improvement --- src/compiler/ast-tree.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/compiler') diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c index 47b3d54..965fca8 100644 --- a/src/compiler/ast-tree.c +++ b/src/compiler/ast-tree.c @@ -4494,6 +4494,13 @@ bool setTypesAstVariable(AstTreeVariable *variable, .variables = _helper.variables, }; + // previously done + if ((variable->type != NULL && variable->type->type != NULL) && + ((variable->value != NULL && variable->value->type != NULL) || + (variable->initValue != NULL && variable->initValue->type != NULL))) { + return true; + } + if (variable->type != NULL) { if (!setAllTypes(variable->type, helper, NULL, NULL)) { return false; -- cgit v1.2.3