sem_util.ads, [...] (Is_Expanded_Priority_Attribute): New predicate to determine that in a context with full run-time...
2016-04-20 Ed Schonberg <schonberg@adacore.com> * sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute): New predicate to determine that in a context with full run-time, a function call is an expansion of a reference to attribute Priority. * sem_ch5.adb (Analyze_Function_Call): use it. * exp_ch5.adb (Expand_N_Subprogram_Call): use it. From-SVN: r235265
This commit is contained in:
parent
75a957f5db
commit
f73dc37f75
5 changed files with 30 additions and 12 deletions
|
@ -1,3 +1,12 @@
|
|||
2016-04-20 Ed Schonberg <schonberg@adacore.com>
|
||||
|
||||
* sem_util.ads, sem_util.adb (Is_Expanded_Priority_Attribute):
|
||||
New predicate to determine that in a context with full run-time,
|
||||
a function call is an expansion of a reference to attribute
|
||||
Priority.
|
||||
* sem_ch5.adb (Analyze_Function_Call): use it.
|
||||
* exp_ch5.adb (Expand_N_Subprogram_Call): use it.
|
||||
|
||||
2016-04-20 Hristian Kirtchev <kirtchev@adacore.com>
|
||||
|
||||
* einfo.adb Flag286 is now used as Is_Exception_Handler.
|
||||
|
|
|
@ -1695,12 +1695,8 @@ package body Exp_Ch5 is
|
|||
-- previously expanded into a call to the Get_Ceiling run-time
|
||||
-- subprogram. In restricted profiles this is not available.
|
||||
|
||||
if Nkind (Ent) = N_Function_Call
|
||||
and then not Configurable_Run_Time_Mode
|
||||
and then (Entity (Name (Ent)) = RTE (RE_Get_Ceiling)
|
||||
or else
|
||||
Entity (Name (Ent)) = RTE (RO_PE_Get_Ceiling))
|
||||
then
|
||||
if Is_Expanded_Priority_Attribute (Ent) then
|
||||
|
||||
-- Look for the enclosing concurrent type
|
||||
|
||||
Conctyp := Current_Scope;
|
||||
|
|
|
@ -41,7 +41,6 @@ with Nmake; use Nmake;
|
|||
with Opt; use Opt;
|
||||
with Restrict; use Restrict;
|
||||
with Rident; use Rident;
|
||||
with Rtsfind; use Rtsfind;
|
||||
with Sem; use Sem;
|
||||
with Sem_Aux; use Sem_Aux;
|
||||
with Sem_Case; use Sem_Case;
|
||||
|
@ -440,11 +439,7 @@ package body Sem_Ch5 is
|
|||
-- objects have been previously expanded into calls to the
|
||||
-- Get_Ceiling run-time subprogram.
|
||||
|
||||
or else
|
||||
(Nkind (Ent) = N_Function_Call
|
||||
and then (Entity (Name (Ent)) = RTE (RE_Get_Ceiling)
|
||||
or else
|
||||
Entity (Name (Ent)) = RTE (RO_PE_Get_Ceiling)))
|
||||
or else Is_Expanded_Priority_Attribute (Ent)
|
||||
then
|
||||
-- The enclosing subprogram cannot be a protected function
|
||||
|
||||
|
|
|
@ -12123,6 +12123,19 @@ package body Sem_Util is
|
|||
and then Nkind (Unit_Declaration_Node (Id)) = N_Entry_Declaration;
|
||||
end Is_Entry_Declaration;
|
||||
|
||||
------------------------------------
|
||||
-- Is_Expanded_Priority_Attribute --
|
||||
------------------------------------
|
||||
|
||||
function Is_Expanded_Priority_Attribute (E : Entity_Id) return Boolean is
|
||||
begin
|
||||
return
|
||||
Nkind (E) = N_Function_Call
|
||||
and then not Configurable_Run_Time_Mode
|
||||
and then (Entity (Name (E)) = RTE (RE_Get_Ceiling)
|
||||
or else Entity (Name (E)) = RTE (RO_PE_Get_Ceiling));
|
||||
end Is_Expanded_Priority_Attribute;
|
||||
|
||||
----------------------------
|
||||
-- Is_Expression_Function --
|
||||
----------------------------
|
||||
|
|
|
@ -1376,6 +1376,11 @@ package Sem_Util is
|
|||
function Is_Entry_Declaration (Id : Entity_Id) return Boolean;
|
||||
-- Determine whether entity Id is the spec entity of an entry [family]
|
||||
|
||||
function Is_Expanded_Priority_Attribute (E : Entity_Id) return Boolean;
|
||||
-- Check whether a function in a call is an expanded priority attribute,
|
||||
-- which is transformed into an Rtsfind call to Get_Ceiling. This expansion
|
||||
-- does not take place in a configurable runtime.
|
||||
|
||||
function Is_Expression_Function (Subp : Entity_Id) return Boolean;
|
||||
-- Determine whether subprogram [body] Subp denotes an expression function
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue