einfo.adb: Flag245 is now used.
authorHristian Kirtchev <kirtchev@adacore.com>
Wed, 30 Jul 2008 15:53:21 +0000 (17:53 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 30 Jul 2008 15:53:21 +0000 (17:53 +0200)
commitd44202ba07e54a1d61bebb53abc6133139e75e7d
treec7852aef0cf22d5feadc587c44e306ffefd2bfe5
parentdc829590914f5ae29de5f246319f5c37127c8ccd
einfo.adb: Flag245 is now used.

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.

From-SVN: r138324
gcc/ada/einfo.adb
gcc/ada/einfo.ads
gcc/ada/exp_ch9.adb
gcc/ada/exp_ch9.ads
gcc/ada/sem_ch3.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_ch6.ads