PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

[PSyIR]: Container.get_routine_psyir() does not support interfaces

Open arporter opened this issue 1 year ago • 4 comments

The PSyIR has support for GenericInterfaceSymbol s but currently Container.get_routine_psyir() expects a 1:1 mapping between the name it is supplied with and the Routine it returns. In this issue we'll generalise it so that it always returns a list of Routine objects.

arporter avatar May 14 '24 09:05 arporter

I'll also take this opportunity to implement #2585 since that's useful here and it's not a lot of code.

arporter avatar May 14 '24 09:05 arporter

On reflection, I'm not sure that this is a good idea - semantically the idea that we ask a Container for a particular routine and can get back a list of Routines with different names is confusing. The question then is, what do we do if the supplied name corresponds to an interface?

arporter avatar May 14 '24 12:05 arporter

Possibly, we should stick to the current implementation of get_routine_psyir but move the resolve_routine out of ModuleInfo and into Container?

arporter avatar May 14 '24 13:05 arporter

Possibly, we should stick to the current implementation of get_routine_psyir but move the resolve_routine out of ModuleInfo and into Container?

Agreed, that sounds like a good idea.

hiker avatar May 15 '24 12:05 hiker

Closing this as Container has resolve_routine and find_routine_psyir

arporter avatar Sep 17 '24 15:09 arporter