[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 28 23:20:56 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1094

--- Comment #238 from Dmitry Selyutin <ghostmansd at gmail.com> ---
After discussion, I've decided to reimplement arguments detection. From now on,
we always expect at least 2 positional arguments: a dispatcher instance and a
node. However, the caller can pass any additional arguments, be it positionals
or keywords. The detection is done via inspect.

Also, the concrete hook now wraps the original function; therefore
ConcreteHook.__call__ refers to the original method we wrapped. Example for
Walker.dispatch_unordered_sequence (irrelevant details snipped):

class ConcreteHook(Hook)
 |  ConcreteHook(*typeids)
 |  
 |  Methods defined here:
 |  
 |  __call__ = dispatch_unordered_sequence(self, node)

https://git.libre-soc.org/?p=mdis.git;a=commitdiff;h=02ef49949991a739662a663ebe64ef00215c4e4d
https://git.libre-soc.org/?p=mdis.git;a=commitdiff;h=0364578c804080d24f4e8b656c58c83f9d0abb51
https://git.libre-soc.org/?p=mdis.git;a=commitdiff;h=e132cae998a7dce910efe4c2f160e7cc3c93e5ee
https://git.libre-soc.org/?p=mdis.git;a=commitdiff;h=f91c0f7cfeb121688b26191f7a1cadcfaa1ceea2

Is it sufficient to mark this task as completed, or we have other ideas?

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


More information about the libre-soc-bugs mailing list