summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-25 22:49:01 +0330
committerA404M <ahmadmahmoudiprogrammer@gmail.com>2025-04-25 22:49:01 +0330
commit6edcfb23ffd49e937395b710f7c6213b2c0d93cf (patch)
treeb51679b4d46651af3d71f83b33c49b646c795731 /src/compiler
parent378bd7e143ddde38a070966cc0b61c2f8d5c7ee7 (diff)
performance improvement
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/ast-tree.c7
1 files changed, 7 insertions, 0 deletions
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;