]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ir.h
Merge branch 'master' of github.com:graphitemaster/gmqcc
[xonotic/gmqcc.git] / ir.h
diff --git a/ir.h b/ir.h
index 9fa8ab5ab62d2ee49323af529e7ed2a1e6508410..42f6ce578ea958bd5e4cf409da8561eef2fc91b5 100644 (file)
--- a/ir.h
+++ b/ir.h
@@ -27,8 +27,8 @@ enum {
     IR_FLAG_INCLUDE_DEF             = 1 << 3,
     IR_FLAG_ERASABLE                = 1 << 4,
     IR_FLAG_BLOCK_COVERAGE          = 1 << 5,
-
-    IR_FLAG_SPLIT_VECTOR            = 1 << 6,
+    IR_FLAG_NOREF                   = 1 << 6,
+    IR_FLAG_SPLIT_VECTOR            = 1 << 7,
 
     IR_FLAG_LAST,
     IR_FLAG_MASK_NO_OVERLAP      = (IR_FLAG_HAS_ARRAYS | IR_FLAG_HAS_UNINITIALIZED),
@@ -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;
-    ir_block **m_entries = nullptr;
-    ir_block **m_exits = nullptr;
+    std::vector<ir_instr *> m_instr;
+    std::vector<ir_block *> m_entries;
+    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;