diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 16:16:43 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 16:16:43 +0200 |
commit | a0347839daf7ab6b9c9ce1c8323bb25d402e6ac5 (patch) | |
tree | 2db1e0cb72d8d1ba511a2bda1908f6e9d51f3808 /gcc/ada/exp_ch6.adb | |
parent | 5b8ca141c207d428a24416d2e5a5e6a324e8770f (diff) | |
download | gcc-a0347839daf7ab6b9c9ce1c8323bb25d402e6ac5.zip gcc-a0347839daf7ab6b9c9ce1c8323bb25d402e6ac5.tar.gz gcc-a0347839daf7ab6b9c9ce1c8323bb25d402e6ac5.tar.bz2 |
exp_ch9.adb, [...]: Minor reformatting.
2011-08-30 Robert Dewar <dewar@adacore.com>
* exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
2011-08-30 Yannick Moy <moy@adacore.com>
* exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
Revert change which introduced files for "light"
expansion, to be replaced by a single file for Alfa expansion.
From-SVN: r178316
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 6780f6e8..b390db4 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -156,6 +156,36 @@ package body Exp_Ch6 is -- the values are not changed for the call, we know immediately that -- we have an infinite recursion. + procedure Expand_Actuals (N : Node_Id; Subp : Entity_Id); + -- For each actual of an in-out or out parameter which is a numeric + -- (view) conversion of the form T (A), where A denotes a variable, + -- we insert the declaration: + -- + -- Temp : T[ := T (A)]; + -- + -- prior to the call. Then we replace the actual with a reference to Temp, + -- and append the assignment: + -- + -- A := TypeA (Temp); + -- + -- after the call. Here TypeA is the actual type of variable A. For out + -- parameters, the initial declaration has no expression. If A is not an + -- entity name, we generate instead: + -- + -- Var : TypeA renames A; + -- Temp : T := Var; -- omitting expression for out parameter. + -- ... + -- Var := TypeA (Temp); + -- + -- For other in-out parameters, we emit the required constraint checks + -- before and/or after the call. + -- + -- For all parameter modes, actuals that denote components and slices of + -- packed arrays are expanded into suitable temporaries. + -- + -- For non-scalar objects that are possibly unaligned, add call by copy + -- code (copy in for IN and IN OUT, copy out for OUT and IN OUT). + procedure Expand_Ctrl_Function_Call (N : Node_Id); -- N is a function call which returns a controlled object. Transform the -- call into a temporary which retrieves the returned object from the |