]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Merge branch 'union-replacement' into cooking
authorDale Weiler <killfieldengine@gmail.com>
Wed, 29 May 2013 03:43:49 +0000 (03:43 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 29 May 2013 03:43:49 +0000 (03:43 +0000)
Conflicts:
ast.c

1  2 
ast.c
ast.h
parser.c

diff --cc ast.c
index 96f768fc578a2017c6993ba9b052e4fb4b73c38d,b104073889e8878e13fb4edd3f4f4f05c35a393a..01a08e5966072e3222a283c337483a718f453ed0
--- 1/ast.c
--- 2/ast.c
+++ b/ast.c
          return NULL;                                                \
      }                                                               \
      ast_node_init((ast_node*)self, ctx, TYPE_##T);                  \
-     ( (ast_node*)self )->node.destroy = (ast_node_delete*)destroyfn
+     ( (ast_node*)self )->destroy = (ast_node_delete*)destroyfn
  
 +/*
 + * forward declarations, these need not be in ast.h for obvious
 + * static reasons.
 + */
 +static bool ast_member_codegen(ast_member*, ast_function*, bool lvalue, ir_value**);
 +static void ast_array_index_delete(ast_array_index*);
 +static bool ast_array_index_codegen(ast_array_index*, ast_function*, bool lvalue, ir_value**);
 +static void ast_store_delete(ast_store*);
 +static bool ast_store_codegen(ast_store*, ast_function*, bool lvalue, ir_value**);
 +static void ast_ifthen_delete(ast_ifthen*);
 +static bool ast_ifthen_codegen(ast_ifthen*, ast_function*, bool lvalue, ir_value**);
 +static void ast_ternary_delete(ast_ternary*);
 +static bool ast_ternary_codegen(ast_ternary*, ast_function*, bool lvalue, ir_value**);
 +static void ast_loop_delete(ast_loop*);
 +static bool ast_loop_codegen(ast_loop*, ast_function*, bool lvalue, ir_value**);
 +static void ast_breakcont_delete(ast_breakcont*);
 +static bool ast_breakcont_codegen(ast_breakcont*, ast_function*, bool lvalue, ir_value**);
 +static void ast_switch_delete(ast_switch*);
 +static bool ast_switch_codegen(ast_switch*, ast_function*, bool lvalue, ir_value**);
 +static void ast_label_delete(ast_label*);
 +static void ast_label_register_goto(ast_label*, ast_goto*);
 +static bool ast_label_codegen(ast_label*, ast_function*, bool lvalue, ir_value**);
 +static bool ast_goto_codegen(ast_goto*, ast_function*, bool lvalue, ir_value**);
 +static void ast_goto_delete(ast_goto*);
 +static void ast_call_delete(ast_call*);
 +static bool ast_call_codegen(ast_call*, ast_function*, bool lvalue, ir_value**);
 +static bool ast_block_codegen(ast_block*, ast_function*, bool lvalue, ir_value**);
 +static void ast_unary_delete(ast_unary*);
 +static bool ast_unary_codegen(ast_unary*, ast_function*, bool lvalue, ir_value**);
 +static void ast_entfield_delete(ast_entfield*);
 +static bool ast_entfield_codegen(ast_entfield*, ast_function*, bool lvalue, ir_value**);
 +static void ast_return_delete(ast_return*);
 +static bool ast_return_codegen(ast_return*, ast_function*, bool lvalue, ir_value**);
 +static void ast_binstore_delete(ast_binstore*);
 +static bool ast_binstore_codegen(ast_binstore*, ast_function*, bool lvalue, ir_value**);
 +static void ast_binary_delete(ast_binary*);
 +static bool ast_binary_codegen(ast_binary*, ast_function*, bool lvalue, ir_value**);
  
  /* It must not be possible to get here. */
  static GMQCC_NORETURN void _ast_node_destroy(ast_node *self)
@@@ -1170,12 -1132,12 +1170,12 @@@ static const char* ast_function_label(a
   * But I can't imagine a pituation where the output is truly unnecessary.
   */
  
- static void _ast_codegen_output_type(ast_expression_common *self, ir_value *out)
 -void _ast_codegen_output_type(ast_expression *self, ir_value *out)
++static void _ast_codegen_output_type(ast_expression *self, ir_value *out)
  {
      if (out->vtype == TYPE_FIELD)
-         out->fieldtype = self->next->expression.vtype;
+         out->fieldtype = self->next->vtype;
      if (out->vtype == TYPE_FUNCTION)
-         out->outtype = self->next->expression.vtype;
+         out->outtype = self->next->vtype;
  }
  
  #define codegen_output_type(a,o) (_ast_codegen_output_type(&((a)->expression),(o)))
diff --cc ast.h
Simple merge
diff --cc parser.c
Simple merge