This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Type-bound procedure and procedure pointer component calls


Janus Weil wrote:
2008/8/26 Daniel Kraft <d@domob.eu>:
here's the promised experimental patch implementing the approach sketched
below.  It handles basic calls to NOPASS type-bound procedures (the
typebound_call_1.f03 test included in the patch).

Apart from this, is it of course quite rough; no module IO, no passed-object
handling and nearly no error checking for calls, no dynamic dispatch (of
course)...  But I hope you get the idea of how the general design could be.

Janus, what do you think in respect to PPCs?  I think it should be "rather"
easy to extend the current patch to support those:

Extend gfc_match_varspec and the gfc_ref structure to match them and store
their data and then hook either into the resolving methods to handle your
implementation or make the static-resolving conditional and handle
EXEC_COMPCALL/EXPR_COMPCALL in the PPC case during trans somehow.

What do you think?

I haven't looked at your patch in great detail, but at first glance it looks fine. Since you chose to start with a static implementation of TBPs, I think we have to keep things pretty much separated at resolution and translation stage. Therefore I will introduce another EXEC_CALL_PPC and EXPR_PPC (or similar) for the handling of procedure pointer components, hoping that these will not interfere too much neither with your implementation of TBPs nor with the existing ordinary subroutine calls. I will see how far I get ...

Hi Janus,


I don't think this is necessary (and it may well mess things up additionally to what I already did); I thought about making the resolution optional; that is:

On resolving a COMPCALL, if it is a TBP go into my code-path and replace the expression/gfc_code by an ordinary call; if it is a PPC, just leave it in and add the appropriate trans-code to handle the remaining COMPCALLs that are PPCs or TBPs to be dispatched dynamically (in the future).

Or does this not work for you?

Cheers,
Daniel

--
Done:     Arc-Bar-Cav-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
To go:    Hea-Kni-Mon-Pri-Ran-Rog-Tou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]