Open JulienRemy opened 4 months ago
This will require me to edit the documentation, including (but maybe not limited to) https://psyclone-dev.readthedocs.io/en/latest/psyir_symbols.html#datatypes
@arporter @sergisiso This works fine in practice on our project. I’ll need to add some more specific tests, see what’s up with the master branch conflicts (Aidan’s routines things?) and refactor this thing for sure so it’s going to stay a draft until next week at least. But if you have time for a broad overview at some point I’m definitely interested in it :) Don’t bother with the details, but if something doesn’t agree with what you’d want in there, feel very free to point it out and I’ll rework it. Most especially: I’m not so sure the way I’m getting the fparser attributes in the frontend is very clean at times.
This adds the following object- and inheritance-oriented features:
extends
attribute inStructureType
for inheritance of derived types, which avoids relying onUnsupportedFortranType
and itsdeclaration: str
attribute,procedure_components
attribute inStructureType
for procedures in acontains
block of a derived type, including visibility and initial value,class
(versustype
) in routine declarations, by introducing a boolean attribute inDataTypeSymbol
.Note that as this makes some derived types supported there is for now a workaround using
FortranWriter
in bothGOceanKernelMetadata
andLFRicKernelMetadata
, which rely onUnsupportedFortranType().declaration
and fparser, see #2643.