Method call interception in cling

Hi! Is there any ability in cling to configure hooks for method calls (with provision of call context)?

E.g., somebody wants to associate groups of additional actions with constructor calls of some ROOT classes and run them optionally only when it’s explicitly preconfigured. Could he/she tune cling somehow (using already defined hooks or writing extra plugin to add them or wrapping cling method call logic in another way…) to trigger general block of code with that metalogic each time when new object initialized and pass this-pointer to this dispatching code to check its type by TObject::InheritsFrom()?

I never dived into llvm infrastructure and compilers theory generally before, so any related references will be invaluable!

Hi! We don’t have that in cling, and while it could be added I’d like to just point out that it should not cost too many CPU cycles if this feature is not used. Maybe you propose a PR and we go from there?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.