diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 16:20:11 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 16:20:11 +0200 |
commit | bfa2e39d898414995b43b089dc52b323bc487c1d (patch) | |
tree | ee697022c3766e0c8817321a8434e832b19cf8e4 /gcc/ada/exp_ch6.ads | |
parent | a0347839daf7ab6b9c9ce1c8323bb25d402e6ac5 (diff) | |
download | gcc-bfa2e39d898414995b43b089dc52b323bc487c1d.zip gcc-bfa2e39d898414995b43b089dc52b323bc487c1d.tar.gz gcc-bfa2e39d898414995b43b089dc52b323bc487c1d.tar.bz2 |
[multiple changes]
2011-08-30 Yannick Moy <moy@adacore.com>
* exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
expansion in Alfa mode.
* exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
* exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
Alfa mode.
* gnat1drv.adb (Adjust_Global_Switches): Update Comment.
* sem_res.adb: Ditto.
2011-08-30 Thomas Quinot <quinot@adacore.com>
* g-socket.ads: Minor documentation adjustment.
From-SVN: r178317
Diffstat (limited to 'gcc/ada/exp_ch6.ads')
-rw-r--r-- | gcc/ada/exp_ch6.ads | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.ads b/gcc/ada/exp_ch6.ads index 1896ce2..95a10ec 100644 --- a/gcc/ada/exp_ch6.ads +++ b/gcc/ada/exp_ch6.ads @@ -37,6 +37,36 @@ package Exp_Ch6 is procedure Expand_N_Subprogram_Body_Stub (N : Node_Id); procedure Expand_N_Subprogram_Declaration (N : Node_Id); + 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_Call (N : Node_Id); -- This procedure contains common processing for Expand_N_Function_Call, -- Expand_N_Procedure_Statement, and Expand_N_Entry_Call. |