comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: Interfaces, Inlining, and Dispatching
Date: Mon, 17 Apr 2017 07:53:58 +0200
Date: 2017-04-17T07:53:58+02:00	[thread overview]
Message-ID: <od1l3q$gth$1@dont-email.me> (raw)
In-Reply-To: <0a9b7c30-cb2b-4bd5-ae34-4b141275ce9d@googlegroups.com>

On 16.04.17 17:59, Jere wrote:
> As I am messing around with interface types I am trying to figure
> out some things:
>
> 1.  Is it possible for compilers to inline interface procedure
> implementations if the type being used is known at compile time?
> I.E: not using a class wide type or class wide access type to
> invoke the procedure.
>
> 2.  If so, do current compilers implement this?
>
> 3.  Assuming another part of the code use a separate implementation
> but dispatches from a class wide type or access type, will this
> revoke the inlining in the other code mentioned in question 1?
> I.E. Can the compiler have an inline version for statically
> dispatched procedure calls and a non inline version for dynamically
> dispatched calls?
>
> 4.  If so, do current compilers implement this?

Editing the program so that it can be compiled, and then
choosing one of the freely available compilers has answered
questions 3 and 4 for me. I believe that strictly speaking,
an Inline aspect must apply to a subprogram if the compiler
is to remove the call in favor of inlining. I don't see,
both physically by looking at generated code, and logically
by guessing, mostly, that a compiler isn't allowed to translate
a subprogram in ways that preserve the intended semantics.


      reply	other threads:[~2017-04-17  5:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-16 15:59 Interfaces, Inlining, and Dispatching Jere
2017-04-17  5:53 ` G.B. [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox