diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-30 15:53:21 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-30 15:53:21 +0000 |
commit | d2a42b76780472036e74c398699dd5fa94124fed (patch) | |
tree | c7852aef0cf22d5feadc587c44e306ffefd2bfe5 /gcc/ada/exp_ch9.ads | |
parent | 88610da214a059632c010d8fb1532c712e6e0f62 (diff) | |
download | gcc-d2a42b76780472036e74c398699dd5fa94124fed.tar.gz |
2008-07-30 Hristian Kirtchev <kirtchev@adacore.com>
* einfo.adb: Flag245 is now used.
(Is_Primitive_Wrapper, Set_Is_Primitive_Wrapper): Relax the assertion
check to include functions.
(Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms.
(Wrapped_Entity, Set_Wrapped_Entity): Relax the assertion check to
include functions.
(Write_Entity_Flags): Move flag Is_Primitive, add Is_Private_Primitive
to the list of displayed flags.
* einfo.ads: Update comment on the usage of Is_Primitive_Wrapper and
Wrapped_Entity. These two flags are now present in functions.
New flag Is_Private_Primitive.
(Is_Private_Primitive, Set_Is_Private_Primitive): New subprograms.
* exp_ch9.adb:
(Build_Wrapper_Bodies): New subprogram.
(Build_Wrapper_Body): The spec and body have been moved to in
Build_Wrapper_ Bodies. Code cleanup.
(Build_Wrapper_Spec): Moved to the spec of Exp_Ch9. Code cleanup.
Wrappers are now generated for primitives declared between the private
and full view of a concurrent type that implements an interface.
(Build_Wrapper_Specs): New subprogram.
(Expand_N_Protected_Body): Code reformatting. Replace the wrapper body
creation mechanism with a call to Build_Wrapper_Bodies.
(Expand_N_Protected_Type_Declaration): Code reformatting. Replace the
wrapper spec creation mechanism with a call to Build_Wrapper_Specs.
(Expand_N_Task_Body): Replace the wrapper body creation
mechanism with a call to Build_Wrapper_Bodies.
(Expand_N_Task_Type_Declaration): Replace the wrapper spec
creation mechanism with a call to Build_Wrapper_Specs.
(Is_Private_Primitive_Subprogram): New subprogram.
(Overriding_Possible): Code cleanup.
(Replicate_Entry_Formals): Renamed to Replicate_Formals, code cleanup.
* exp_ch9.ads (Build_Wrapper_Spec): Moved from the body of Exp_Ch9.
* sem_ch3.adb: Add with and use clause for Exp_Ch9.
(Process_Full_View): Build wrapper specs for all primitives
that belong to a private view completed by a concurrent type
implementing an interface.
* sem_ch6.adb (Analyze_Subprogram_Body): When the current subprogram
is a primitive of a
concurrent type with a private view that implements an interface, try to
find the proper spec.
(Analyze_Subprogram_Declaration): Mark a subprogram as a private
primitive if the type of its first parameter is a non-generic tagged
private type.
(Analyze_Subprogram_Specification): Code reformatting.
(Disambiguate_Spec): New routine.
(Find_Corresponding_Spec): Add a flag to controll the output of errors.
(Is_Private_Concurrent_Primitive): New routine.
* sem_ch6.ads:
(Find_Corresponding_Spec): Add a formal to control the output of errors.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch9.ads')
-rw-r--r-- | gcc/ada/exp_ch9.ads | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch9.ads b/gcc/ada/exp_ch9.ads index a4c618a61cb..1cfa74d3635 100644 --- a/gcc/ada/exp_ch9.ads +++ b/gcc/ada/exp_ch9.ads @@ -153,6 +153,18 @@ package Exp_Ch9 is -- aggregate. It replaces the call to Init (Args) done by -- Build_Task_Allocate_Block. + function Build_Wrapper_Spec + (Loc : Source_Ptr; + Subp_Id : Entity_Id; + Obj_Typ : Entity_Id; + Formals : List_Id) return Node_Id; + -- Ada 2005 (AI-345): Build the specification of a primitive operation + -- associated with a protected or task type. This is required to implement + -- dispatching calls through interfaces. Subp_Id is the primitive to be + -- wrapped, Obj_Typ is the type of the newly added formal parameter to + -- handle object notation, Formals are the original entry formals that + -- will be explicitly replicated. + function Concurrent_Ref (N : Node_Id) return Node_Id; -- Given the name of a concurrent object (task or protected object), or -- the name of an access to a concurrent object, this function returns an |