Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

6.3.2 Inline Expansion of Subprograms

1
[Subprograms may be expanded in line at the call site.] 
Paragraphs 2 through 4 were moved to Annex J, “Obsolescent Features”. 

Static Semantics

5/3
{AI05-0229-1} For a callable entity or a generic subprogram, the following language-defined representation aspect may be specified:
5.1/3
 Inline
The type of aspect Inline is Boolean. When aspect Inline is True for a callable entity, inline expansion is desired for all calls to that entity. When aspect Inline is True for a generic subprogram, inline expansion is desired for all calls to all instances of that generic subprogram.
5.2/3
If directly specified, the aspect_definition shall be a static expression. [This aspect is never inherited;] if not directly specified, the aspect is False.
5.a/3
Aspect Description for Inline: For efficiency, Inline calls are requested for a subprogram.
5.b/3
This paragraph was deleted.{AI05-0229-1}
5.c/3
This paragraph was deleted.
5.d/3
This paragraph was deleted.
5.e/3
Ramification: {AI05-0229-1} The meaning of a subprogram can be changed by inline expansion as requested by aspect Inline only in the presence of failing checks (see 11.6).

Implementation Permissions

6/3
{AI05-0229-1} For each call, an implementation is free to follow or to ignore the recommendation determined by the Inline aspect. 
6.a
Ramification: Note, in particular, that the recommendation cannot always be followed for a recursive call, and is often infeasible for entries. Note also that the implementation can inline calls even when no such desire was expressed via the Inline aspect, so long as the semantics of the program remains unchanged. 

Incompatibilities With Ada 83

7.a/3
This paragraph was deleted.{AI95-00309-01} {AI05-0229-1}

Extensions to Ada 83

7.b/3
This paragraph was deleted.{AI05-0229-1}

Extensions to Ada 95

7.c/3
This paragraph was deleted.{AI95-00309-01} {AI05-0229-1}

Extensions to Ada 2005

7.d/3
{AI05-0229-1} Aspect Inline is new; pragma Inline is now obsolescent. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe