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