]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.c
gitignore: be more clever
[xonotic/gmqcc.git] / ir.c
diff --git a/ir.c b/ir.c
index 05f21d5c700365ad2e03183b23c627752e5dfa72..a641310644dc950712894eef33cfe9965c9c1d09 100644 (file)
--- a/ir.c
+++ b/ir.c
@@ -485,7 +485,7 @@ ir_function* ir_function_new(ir_builder* owner, int outtype)
     self->values = NULL;
     self->locals = NULL;
 
-    self->max_varargs = NULL;
+    self->max_varargs = 0;
 
     self->code_function_def = -1;
     self->allocated_locals = 0;
@@ -2310,8 +2310,6 @@ bool ir_function_allocate_locals(ir_function *self)
     /* Locals need to know their new position */
     for (i = 0; i < vec_size(self->locals); ++i) {
         v = self->locals[i];
-        if (i >= vec_size(self->params) && !vec_size(v->life))
-            continue;
         if (v->locked || !opt_gt)
             v->code.local = lockalloc.positions[v->code.local];
         else
@@ -2320,8 +2318,6 @@ bool ir_function_allocate_locals(ir_function *self)
     /* Take over the actual slot positions on values */
     for (i = 0; i < vec_size(self->values); ++i) {
         v = self->values[i];
-        if (!vec_size(v->life))
-            continue;
         if (v->locked || !opt_gt)
             v->code.local = lockalloc.positions[v->code.local];
         else