[Libre-soc-bugs] [Bug 1094] insndb instruction database visitor-walker is needed

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Jun 20 01:17:55 BST 2023


--- Comment #203 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---

* sorry i am only able to pay brief attention so i saw the [] and
  assumed it had been committed.
* __code__ and co_* etc. have been part of python since around 2.0.
  it's not going away, not with 25+ years of code in the world
  that would break.
* forcing visitors of leaf nodes to have to ignore a parameter that
  is meaningless i do not think is a good idea and i am looking for
* another option: the decorator-of-visitors stores in the registry
  whether the path option is wanted or not.
* alternative option: leaf-nodes on basic types never receive a
  path argument. they're just not necessary, so why have it?
* alternative option: there are *two* functions: one for leaf-nodes
  (mostly primitive types or any non-iterable class) that never need a
  path, and one for those that are iterable
* refinement: auto-identification of leaf-nodes vs tree-nodes:
  if the tree-iteration yields something of zero length, then it's
  pretty obvious that it's a leaf-node and the alternative function
  dedicated to leaf-nodes may be called.
* walking down individual bits is unnecessary and if someone
  ever wanted it they should sub-class int and provide a bit-enumerator
  (__iter__).  (nmigen does actually genuinely do this so it is not

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list