diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-13 10:37:33 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-13 10:37:33 +0000 |
commit | 52b3bcf2efa74aba858df98905b42b9535c9a565 (patch) | |
tree | f5ced87e3f9f879a7bb3f9307840a47ec4111780 /gcc/ada/s-stopoo.ads | |
parent | c310752724a6c7b262a7c91275bae6579f607e0e (diff) | |
download | gcc-52b3bcf2efa74aba858df98905b42b9535c9a565.tar.gz |
2011-10-13 Bob Duff <duff@adacore.com>
* exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
that gets passed in the same cases where BIP_Alloc_Form is passed
(caller-unknown-size results). BIP_Storage_Pool is used when
BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
to the user-defined storage pool is passed at the call site,
and this pool is used in callee to allocate the result.
* exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
the additional BIP_Storage_Pool actual.
(Expand_N_Extended_Return_Statement): Allocate the function
result using the user-defined storage pool, if BIP_Alloc_Form =
User_Storage_Pool.
* sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
* exp_ch4.adb: Don't overwrite storage pool set by
Expand_N_Extended_Return_Statement.
* s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
for use in build-in-place function calls within allocators
where the access type has a user-defined storage pool.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-stopoo.ads')
-rw-r--r-- | gcc/ada/s-stopoo.ads | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/s-stopoo.ads b/gcc/ada/s-stopoo.ads index 1c4d12754a0..e2d66ff747d 100644 --- a/gcc/ada/s-stopoo.ads +++ b/gcc/ada/s-stopoo.ads @@ -65,6 +65,14 @@ private type Root_Storage_Pool is abstract new Ada.Finalization.Limited_Controlled with null record; + type Root_Storage_Pool_Ptr is access all Root_Storage_Pool'Class; + for Root_Storage_Pool_Ptr'Storage_Size use 0; + -- Type of the BIP_Storage_Pool extra parameter (see Exp_Ch6). The + -- Storage_Size clause is necessary, because otherwise we have a + -- chicken&egg problem; we can't be creating collection finalization code + -- in this low-level package, because that involves Pool_Global, which + -- imports this package. + -- ??? Are these two still needed? It might be possible to use Subpools. -- Allocate_Any_Controlled / Deallocate_Any_Controlled for non-controlled -- objects. |