]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.h
value position allocation, fixing a possible endless loop in ir_values_overlap
[xonotic/gmqcc.git] / ir.h
diff --git a/ir.h b/ir.h
index a7f0076ccaf6ada0d6cbc85850d5b9af8377839e..3cb045c5d8a42092aa457d5f1b2b9398ec35284f 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -58,6 +58,8 @@ typedef struct ir_value_s {
     struct {
         int32_t globaladdr;
         int32_t name;
+        /* filled by the local-allocator */
+        int32_t slot;
     } code;
 
     /* For the temp allocator */
@@ -93,7 +95,7 @@ bool ir_value_life_merge_into(ir_value*, const ir_value*);
 /* check if a value lives at a specific point */
 bool ir_value_lives(ir_value*, size_t);
 /* check if the life-range of 2 values overlaps */
-bool ir_values_overlap(ir_value*, ir_value*);
+bool ir_values_overlap(const ir_value*, const ir_value*);
 
 void ir_value_dump(ir_value*, int (*oprintf)(const char*,...));
 void ir_value_dump_life(ir_value *self, int (*oprintf)(const char*,...));