]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
for arrays, ast_value will contain several ir_values, ir_v will point to the [0]...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 09:51:40 +0000 (10:51 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 11 Nov 2012 09:51:40 +0000 (10:51 +0100)
ast.c
ast.h

diff --git a/ast.c b/ast.c
index 2f218e37a4a776bc33dbeec92bf166a7be515110..f10dbb2f4f0688513a182a0d214e743f99cdc1e6 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -312,7 +312,9 @@ ast_value* ast_value_new(lex_ctx ctx, const char *name, int t)
     self->uses    = 0;
     memset(&self->constval, 0, sizeof(self->constval));
 
-    self->ir_v    = NULL;
+    self->ir_v           = NULL;
+    self->ir_values      = NULL;
+    self->ir_value_count = 0;
 
     return self;
 }
diff --git a/ast.h b/ast.h
index 76f2c26d5596e703219b1543e348b9a0d776d035..1d9efb33d4b9d4313caf34bc9c5900d9e988e083 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -162,6 +162,8 @@ struct ast_value_s
     size_t uses;
 
     ir_value *ir_v;
+    ir_value **ir_values;
+    size_t   ir_value_count;
 };
 
 ast_value* ast_value_new(lex_ctx ctx, const char *name, int qctype);