diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-18 12:46:40 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-04-18 12:46:40 +0200 |
commit | 87feba051d2870479fab45d2a8671bc4e6d7817f (patch) | |
tree | 6b79a0b34a4ee6a589bdc031cfa4e17af7e81b98 /gcc/ada/sem_ch12.ads | |
parent | 3e20cb680fae4486f196dcc807237d573ad6d207 (diff) | |
download | gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.zip gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.tar.gz gcc-87feba051d2870479fab45d2a8671bc4e6d7817f.tar.bz2 |
[multiple changes]
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* namet.adb, namet.ads, exp_unst.adb: Minor reformatting.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_eval.adb (Choice_Matches): Check the expression
against the predicate values when the choice denotes a
subtype with a static predicate.
(Eval_Membership_Op): Code cleanup. Remove the suspicious guard which
tests for predicates.
(Is_OK_Static_Subtype): A subtype with a dynamic predicate
is not static. (Is_Static_Subtype): A subtype with a dynamic
predicate is not static.
* sem_eval.ads (Is_OK_Static_Subtype): Update the comment on usage.
(Is_Static_Subtype): Update the comment on usage.
2016-04-18 Hristian Kirtchev <kirtchev@adacore.com>
* sem_prag.adb (Analyze_Input_Item): Allow
generic formals to appear as initialization items.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch13.adb (Analyze_Stream_TSS_Definition,
Has_Good_Profile): Additional error message to indicate that
the second parameter of the subprogram must be a first subtype.
2016-04-18 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Subprogram_Body_Helper, Is_Inline_Pragma):
Use the pragma lookahead that determines whether a subprogram
is to be inlined, when some level of backend optimization is
required.
* sem_ch12.ads, sem_ch12.adb (Add_Pending_Instantiation): Factorize
code used to create an instance body when needed for inlining.
* exp_ch6.adb (Expand_Call): When a call is to be inlined, and the
call appears within an instantiation that is not a compilation
unit, add a pending instantiation for the enclosing instance,
so the backend can inline in turn the calls contained in the
inlined body.
From-SVN: r235124
Diffstat (limited to 'gcc/ada/sem_ch12.ads')
-rw-r--r-- | gcc/ada/sem_ch12.ads | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/sem_ch12.ads b/gcc/ada/sem_ch12.ads index faf8917..c95396a 100644 --- a/gcc/ada/sem_ch12.ads +++ b/gcc/ada/sem_ch12.ads @@ -37,6 +37,10 @@ package Sem_Ch12 is procedure Analyze_Formal_Subprogram_Declaration (N : Node_Id); procedure Analyze_Formal_Package_Declaration (N : Node_Id); + procedure Add_Pending_Instantiation (Inst : Node_Id; Act_Decl : Node_Id); + -- Add an entry in the table of instance bodies that must be analyzed + -- when inlining requires its body or the body of a nested instance. + function Build_Function_Wrapper (Formal_Subp : Entity_Id; Actual_Subp : Entity_Id) return Node_Id; @@ -113,12 +117,12 @@ package Sem_Ch12 is -- of G, we compile the body of I2, but not that of I1. However, when we -- compile U as the main unit, we compile both bodies. This will lead to -- link-time errors if the compilation of I1 generates public symbols, - -- because those in I2 will receive different names in both cases. - -- This forces us to analyze the body of I1 even when U is not the main - -- unit. We don't want this additional mechanism to generate an error - -- when the body of the generic for I1 is not present, and this is the - -- reason for the presence of the flag Body_Optional, which is exchanged - -- between the current procedure and Load_Parent_Of_Generic. + -- because those in I2 will receive different names in both cases. This + -- forces us to analyze the body of I1 even when U is not the main unit. + -- We don't want this additional mechanism to generate an error when the + -- body of the generic for I1 is not present, and this is the reason for + -- the presence of the flag Body_Optional, which is exchanged between the + -- current procedure and Load_Parent_Of_Generic. procedure Instantiate_Subprogram_Body (Body_Info : Pending_Body_Info; |