aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2022-02-16 13:56:50 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-13 08:04:39 +0000
commit2e2f53d50c6fd17eb87d256d57696acc650a50e1 (patch)
treeb9feda92254b0b4e2ea3aeb9f9e259c3eefed573 /gcc/ada/gcc-interface
parent6d22fb118f5c292c6c35c9177074485be0159810 (diff)
downloadgcc-2e2f53d50c6fd17eb87d256d57696acc650a50e1.zip
gcc-2e2f53d50c6fd17eb87d256d57696acc650a50e1.tar.gz
gcc-2e2f53d50c6fd17eb87d256d57696acc650a50e1.tar.bz2
[Ada] Remove dependency on tampering checks and controlled types for formal
Formal hashed sets and maps are now using a different type of hash table that does not require controlled types. This is possible because formal containers do not rely on tampering checks, as cursors do not hold a pointer to a single matching container, but are logical indexes that can be used with multiple containers. For simplicity of the package organisation, and symmetry with other versions of containers, add a formal version of hashed types in the shared Ada.Containers.Hash_Tables unit. This unit should be specialized to only include the formal version of hash tables for runtimes that do not support controlled types (so that the dependency on Ada.Containers.Helpers can be removed). The new versions of units for generic keys and operations are modified versions of the units for bounded containers, with all tampering checks removed (they were no-op in formal containers). A declaration of constant Checks is added at the start of the body, as these units cannot use the version in Ada.Containers.Helpers. gcc/ada/ * Makefile.rtl: Add new files. * libgnat/a-cfhama.adb: Use formal version of hash tables. * libgnat/a-cfhama.ads: Same. * libgnat/a-cfhase.adb: Same. * libgnat/a-cfhase.ads: Same. * libgnat/a-chtgfk.adb: New unit for formal containers, modified version of Generic_Bounded_Keys. * libgnat/a-chtgfk.ads: Same. * libgnat/a-chtgfo.adb: New unit for formal containers, modified version of Generic_Bounded_Operations. * libgnat/a-chtgfo.ads: Same. * libgnat/a-cohata.ads (Generic_Formal_Hash_Table_Types): Third version of the type for hash tables, equivalent to the bounded version without tampering checks.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions