Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
2572875e
Commit
2572875e
authored
Dec 27, 2014
by
Christoph Mallon
Browse files
irspec: By default do not generate serializer code if the node has no generated constructor either.
parent
8558f0f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/ir_spec.py
View file @
2572875e
...
...
@@ -95,12 +95,11 @@ class Anchor:
(
"args"
,
"argument proj of the start node"
),
(
"no_mem"
,
"the only NoMem node of this ir_graph"
),
]
mode
=
"mode_ANY"
flags
=
[
"dump_noblock"
]
pinned
=
"yes"
singleton
=
True
constructor
=
False
customSerializer
=
True
mode
=
"mode_ANY"
flags
=
[
"dump_noblock"
]
pinned
=
"yes"
singleton
=
True
constructor
=
False
@
op
class
And
(
Binop
):
...
...
@@ -136,19 +135,18 @@ class ASM:
(This format is inspired by the gcc extended asm syntax)
"""
mode
=
"mode_T"
arity
=
"variable"
input_name
=
"input"
flags
=
[
"keep"
,
"uses_memory"
]
pinned
=
"exception"
pinned_init
=
"op_pin_state_pinned"
attr_struct
=
"asm_attr"
attrs_name
=
"assem"
customSerializer
=
True
ins
=
[
mode
=
"mode_T"
arity
=
"variable"
input_name
=
"input"
flags
=
[
"keep"
,
"uses_memory"
]
pinned
=
"exception"
pinned_init
=
"op_pin_state_pinned"
attr_struct
=
"asm_attr"
attrs_name
=
"assem"
ins
=
[
(
"mem"
,
"memory dependency"
),
]
attrs
=
[
attrs
=
[
Attribute
(
"input_constraints"
,
type
=
"ir_asm_constraint*"
,
comment
=
"input constraints"
),
Attribute
(
"n_output_constraints"
,
type
=
"size_t"
,
noprop
=
True
,
...
...
@@ -194,11 +192,10 @@ class Bad:
class
Deleted
:
"""Internal node which is temporary set to nodes which are already removed
from the graph."""
mode
=
"mode_Bad"
flags
=
[
]
pinned
=
"yes"
constructor
=
False
customSerializer
=
True
# this has no serializer
mode
=
"mode_Bad"
flags
=
[
]
pinned
=
"yes"
constructor
=
False
@
op
class
Block
:
...
...
scripts/spec_util.py
View file @
2572875e
...
...
@@ -106,7 +106,7 @@ def setnodedefaults(node):
setdefault
(
node
,
"attrs"
,
[])
setdefault
(
node
,
"constructor"
,
True
)
setdefault
(
node
,
"constructor_args"
,
[])
setdefault
(
node
,
"customSerializer"
,
False
)
setdefault
(
node
,
"customSerializer"
,
not
node
.
constructor
)
setdefault
(
node
,
"block"
,
None
)
if
hasattr
(
node
,
"__doc__"
):
node
.
doc
=
trim_docstring
(
node
.
__doc__
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment