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

irspec: Turn the negative flag customSerializer into a positive one called serializer.

parent 2572875e
...@@ -211,7 +211,7 @@ class Block: ...@@ -211,7 +211,7 @@ class Block:
Attribute("entity", type="ir_entity*", init="NULL", Attribute("entity", type="ir_entity*", init="NULL",
comment="entity representing this block"), comment="entity representing this block"),
] ]
customSerializer = True serializer = False
init = ''' init = '''
res->attr.block.backedge = new_backedge_arr(get_irg_obstack(irg), arity); res->attr.block.backedge = new_backedge_arr(get_irg_obstack(irg), arity);
...@@ -644,7 +644,7 @@ class Phi: ...@@ -644,7 +644,7 @@ class Phi:
attr_struct = "phi_attr" attr_struct = "phi_attr"
init = ''' init = '''
res->attr.phi.u.backedge = new_backedge_arr(get_irg_obstack(irg), arity);''' res->attr.phi.u.backedge = new_backedge_arr(get_irg_obstack(irg), arity);'''
customSerializer = True serializer = False
@op @op
class Pin: class Pin:
......
...@@ -106,7 +106,7 @@ def setnodedefaults(node): ...@@ -106,7 +106,7 @@ def setnodedefaults(node):
setdefault(node, "attrs", []) setdefault(node, "attrs", [])
setdefault(node, "constructor", True) setdefault(node, "constructor", True)
setdefault(node, "constructor_args", []) setdefault(node, "constructor_args", [])
setdefault(node, "customSerializer", not node.constructor) setdefault(node, "serializer", node.constructor)
setdefault(node, "block", None) setdefault(node, "block", None)
if hasattr(node, "__doc__"): if hasattr(node, "__doc__"):
node.doc = trim_docstring(node.__doc__) node.doc = trim_docstring(node.__doc__)
......
{{warning}} {{warning}}
{%- for node in nodes|hasnot('customSerializer') %} {%- for node in nodes|has('serializer') %}
static ir_node *read_{{node.name}}(read_env_t *env) static ir_node *read_{{node.name}}(read_env_t *env)
{ {
{%- if not node.block %} {%- if not node.block %}
...@@ -63,7 +63,7 @@ static ir_node *read_{{node.name}}(read_env_t *env) ...@@ -63,7 +63,7 @@ static ir_node *read_{{node.name}}(read_env_t *env)
} }
{% endfor %} {% endfor %}
{%- for node in nodes|hasnot('customSerializer') %} {%- for node in nodes|has('serializer') %}
static void write_{{node.name}}(write_env_t *env, const ir_node *node) static void write_{{node.name}}(write_env_t *env, const ir_node *node)
{ {
write_symbol(env, "{{node.name}}"); write_symbol(env, "{{node.name}}");
...@@ -94,14 +94,14 @@ static void write_{{node.name}}(write_env_t *env, const ir_node *node) ...@@ -94,14 +94,14 @@ static void write_{{node.name}}(write_env_t *env, const ir_node *node)
static void register_generated_node_readers(void) static void register_generated_node_readers(void)
{ {
{%- for node in nodes|hasnot('customSerializer') %} {%- for node in nodes|has('serializer') %}
register_node_reader("{{node.name}}", read_{{node.name}}); register_node_reader("{{node.name}}", read_{{node.name}});
{%- endfor %} {%- endfor %}
} }
static void register_generated_node_writers(void) static void register_generated_node_writers(void)
{ {
{%- for node in nodes|hasnot('customSerializer') %} {%- for node in nodes|has('serializer') %}
register_node_writer(op_{{node.name}}, write_{{node.name}}); register_node_writer(op_{{node.name}}, write_{{node.name}});
{%- endfor %} {%- endfor %}
} }
Markdown is supported
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