]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.h
introduce another vinstr temp
[xonotic/gmqcc.git] / ir.h
diff --git a/ir.h b/ir.h
index 3b063b604cb2a7d0b890192438f03f9a9a41e1c3..c81d1a24032454972fcfddbb5965992547cb6f4c 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -148,9 +148,9 @@ struct ir_block {
     lex_ctx_t m_context;
     bool m_final = false; /* once a jump is added we're done */
 
-    ir_instr **m_instr = nullptr;
+    std::vector<ir_instr *> m_instr;
     std::vector<ir_block *> m_entries;
-    ir_block **m_exits = nullptr;
+    std::vector<ir_block *> m_exits;
     std::vector<ir_value *> m_living;
 
     /* For the temp-allocation */
@@ -201,11 +201,11 @@ struct ir_function {
 
     ir_builder *m_owner;
 
-    std::string m_name;
-    qc_type     m_outtype;
-    int        *m_params  = nullptr;
-    ir_flag_t   m_flags   = 0;
-    int         m_builtin = 0;
+    std::string      m_name;
+    qc_type          m_outtype;
+    std::vector<int> m_params;
+    ir_flag_t        m_flags   = 0;
+    int              m_builtin = 0;
 
     std::vector<std::unique_ptr<ir_block>> m_blocks;
 
@@ -249,7 +249,7 @@ ir_block*       ir_function_create_block(lex_ctx_t ctx, ir_function*, const char
 
 /* builder */
 #define IR_HT_SIZE          1024
-#define IR_MAX_VINSTR_TEMPS 1
+#define IR_MAX_VINSTR_TEMPS 2
 
 struct ir_builder {
     ir_builder(const std::string& modulename);