]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ast.h
linecounting issue in the lexer
[xonotic/gmqcc.git] / ast.h
diff --git a/ast.h b/ast.h
index 989fae727b72965561444bf0289426d4f4f49496..ba42e70c969c3ebd94c67232979e327a9278b6cc 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -309,8 +309,9 @@ struct ast_member_s
     ast_expression_common expression;
     ast_expression *owner;
     unsigned int    field;
+    const char     *name;
 };
-ast_member* ast_member_new(lex_ctx ctx, ast_expression *owner, unsigned int field);
+ast_member* ast_member_new(lex_ctx ctx, ast_expression *owner, unsigned int field, const char *name);
 void ast_member_delete(ast_member*);
 
 bool ast_member_codegen(ast_member*, ast_function*, bool lvalue, ir_value**);
@@ -398,9 +399,6 @@ struct ast_ternary_s
     /* It's all just 'expressions', since an ast_block is one too. */
     ast_expression *on_true;
     ast_expression *on_false;
-    /* After a ternary expression we find ourselves in a new IR block
-     * and start with a PHI node */
-    ir_value       *phi_out;
 };
 ast_ternary* ast_ternary_new(lex_ctx ctx, ast_expression *cond, ast_expression *ontrue, ast_expression *onfalse);
 void ast_ternary_delete(ast_ternary*);
@@ -552,6 +550,15 @@ struct ast_function_s
     ir_block    *breakblock;
     ir_block    *continueblock;
 
+#if 0
+    /* In order for early-out logic not to go over
+     * excessive jumps, we remember their target
+     * blocks...
+     */
+    ir_block    *iftrue;
+    ir_block    *iffalse;
+#endif
+
     size_t       labelcount;
     /* in order for thread safety - for the optional
      * channel abesed multithreading... keeping a buffer