yosys/frontends
Martin Povišer 22b99413e8 ast/simplify: Make in_lvalue/in_param into props of AST nodes
Instead of passing around in_lvalue/in_param flags to simplify, we make
the flags into properties of the AST nodes themselves. After the tree
is first parsed, we once do

  ast->fixup_hierarchy_flags(true)

to walk the full hierarchy and set the flags to their initial correct
values. Then as long as one is using ->clone(), ->cloneInto() and the
AstNode constructor (with children passed to it) to modify the tree, the
flags will be kept in sync automatically. On the other hand if we are
modifying the children list of an existing node, we may need to call

  node->fixup_hierarchy_flags()

to do a localized fixup. That fixup will update the flags on the node's
children, and will propagate the change down the tree if necessary.

clone() doesn't always retain the flags of the subtree being cloned. It
will produce a tree with a consistent setting of the flags, but the
root doesn't have in_param/in_lvalue set unless it's intrinsic to the
type of node being cloned (e.g. AST_PARAMETER). cloneInto() will make
sure the cloned subtree has the flags consistent with the new placement
in a hierarchy.

Add asserts to make sure the old and new way of determining the flags
agree.
2023-09-26 13:32:15 +02:00
..
aiger Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
ast ast/simplify: Make in_lvalue/in_param into props of AST nodes 2023-09-26 13:32:15 +02:00
blif fix whitespace 2022-10-10 16:31:29 +02:00
json fix handling of escaped chars in json backend and frontend 2022-02-18 17:13:09 +01:00
liberty print filename in liberty log_header 2023-01-11 21:31:46 +01:00
rpc Fitting help messages to 80 character width 2022-08-24 10:40:57 +12:00
rtlil Specify minimum bison version 3.0+ 2021-10-01 21:18:33 -06:00
verific Set src attribute for verific with full info 2023-09-19 12:00:10 +02:00
verilog fix width of post-increment/decrement expressions 2023-09-18 23:46:06 -04:00