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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Jun 21 18:52:34 BST 2023


--- Comment #222 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Dmitry Selyutin from comment #219)
> Ah yes, this path sequence is almost dropped iff someone can suggest how to
> solve #217 in an elegant fashion. 

not a problem.

> As for formatter — yes, I also have a
> feeling this will be extended,

yeahno then it is a bad idea.  us "dictating" the format is a nonstarter.

> perhaps enum values should be replaced with
> separate classes.

as markos said this is taking too long.

path is not a necessary argument to pass given that the walker itself
is supposed to perform the tracking.

can we please move off of "hypothetical" development and move on
to "practical use" and see how it works out, then revisit if it
turns out to be necessary based on actual real-world usage?

(In reply to Dmitry Selyutin from comment #217)
> The code which yields only last path component looks much better.

yes.  we went over that last week.  it should be instanceid.

> Considering this statement, can we ensure that the users are capable of
> reconstructing the whole path if needed?
> for (node, parent, path, kind) in walker(root):
>     magic(...)
> How can the magic call construct the whole tree as it was done when we kept
> the whole paths?

not the API's problem, that is the walker's problem.

we went over this last week already (walker performs stack.push and pop).

this is standard practice for walker/visitor APIs.

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

More information about the libre-soc-bugs mailing list