[Ada] Part of implementation of AI12-0212: container aggregates
authorEd Schonberg <schonberg@adacore.com>
Tue, 26 May 2020 19:39:38 +0000 (15:39 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 10 Jul 2020 09:16:18 +0000 (05:16 -0400)
commit745f56989ead5d32b4016e39bf2656f23e2b16e7
tree5bd171fd34ae57a8e0bd9d2d71f2111add18f5c6
parent2f9821a09ac0c5f07ce621ef6a32acfdfa2e485e
[Ada] Part of implementation of AI12-0212: container aggregates

gcc/ada/

* aspects.ads: Add Aspect_Aggregate.
* exp_aggr.adb (Expand_Container_Aggregate): Expand positional
container aggregates into separate initialization and insertion
operations.
* sem_aggr.ads (Resolve_Container_Aggregate): New subprogram.
* sem_aggr.adb (Resolve_Container_Aggregate): Parse aspect
aggregate, establish element types and key types if present, and
resolve aggregate components.
* sem_ch13.ads (Parse_Aspect_Aggregate): Public subprogram used
in validation, resolution and expansion of container aggregates
* sem_ch13.adb
(Parse_Aspect_Aggregate): Retrieve names of primitives specified
in aspect specification.
(Validate_Aspect_Aggregate): Check legality of specified
operations given in aspect specification, before nane
resolution.
(Resolve_Aspect_Aggregate): At freeze point resolve operations
and verify that given operations have the required profile.
* sem_res.adb (Resolve): Call Resolve_Aspect_Aggregate if aspect
is present for type.
* snames.ads-tmpl: Add names used in aspect Aggregate: Empty,
Add_Named, Add_Unnamed, New_Indexed, Assign_Indexed.
gcc/ada/aspects.ads
gcc/ada/exp_aggr.adb
gcc/ada/sem_aggr.adb
gcc/ada/sem_aggr.ads
gcc/ada/sem_ch13.adb
gcc/ada/sem_ch13.ads
gcc/ada/sem_res.adb
gcc/ada/snames.ads-tmpl