Commit d5178a70 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Simplify code generator and generated code using C99.

parent 097dbcc8
...@@ -278,14 +278,10 @@ ir_node *new_rd_{{node.name}}( ...@@ -278,14 +278,10 @@ ir_node *new_rd_{{node.name}}(
{{node|nodeparameters}} {{node|nodeparameters}}
{% endfilter %}) {% endfilter %})
{ {
ir_node *res;
{%- if node.arity == "dynamic" %}
int i;
{%- endif %}
{{node|irgassign}} {{node|irgassign}}
{{node|insdecl}} {{node|insdecl}}
res = new_ir_node( ir_node *res = new_ir_node(
{%- filter arguments %} {%- filter arguments %}
dbgi dbgi
irg irg
...@@ -295,7 +291,7 @@ ir_node *new_rd_{{node.name}}( ...@@ -295,7 +291,7 @@ ir_node *new_rd_{{node.name}}(
{{node|arity_and_ins}} {{node|arity_and_ins}}
{% endfilter %}); {% endfilter %});
{%- if node.arity == "dynamic" %} {%- if node.arity == "dynamic" %}
for (i = 0; i < arity; ++i) { for (int i = 0; i < arity; ++i) {
add_irn_n(res, in[i]); add_irn_n(res, in[i]);
} }
{%- endif %} {%- endif %}
...@@ -335,9 +331,8 @@ ir_node *new_d_{{node.name}}( ...@@ -335,9 +331,8 @@ ir_node *new_d_{{node.name}}(
{{node|nodeparameters}} {{node|nodeparameters}}
{% endfilter %}) {% endfilter %})
{ {
ir_node *res;
assert(irg_is_constrained(current_ir_graph, IR_GRAPH_CONSTRAINT_CONSTRUCTION)); assert(irg_is_constrained(current_ir_graph, IR_GRAPH_CONSTRAINT_CONSTRUCTION));
res = new_rd_{{node.name}}( ir_node *res = new_rd_{{node.name}}(
{%- filter parameters %} {%- filter parameters %}
dbgi dbgi
{{node|curblock}} {{node|curblock}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment