diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2018-05-22 13:26:11 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-22 13:26:11 +0000 |
commit | 3b26fe826601cd43b8a4e7b1b29114034bd3eabb (patch) | |
tree | 5a1b1b59602fcad68dcf6ee7a934106b6adb7f06 /gcc/builtins.c | |
parent | 59ec5d9be29535f41ecd7840fcb11708edd584f3 (diff) | |
download | gcc-3b26fe826601cd43b8a4e7b1b29114034bd3eabb.zip gcc-3b26fe826601cd43b8a4e7b1b29114034bd3eabb.tar.gz gcc-3b26fe826601cd43b8a4e7b1b29114034bd3eabb.tar.bz2 |
[Ada] In-place initialization for Initialize_Scalars
This patch cleans up the implementation of routine Get_Simple_Init_Val. It also
eliminates potentially large and unnecessary tree replications in the context
of object default initialization.
No change in behavior, no test needed.
2018-05-22 Hristian Kirtchev <kirtchev@adacore.com>
gcc/ada/
* exp_ch3.adb (Build_Array_Init_Proc): Update the call to
Needs_Simple_Initialization.
(Build_Init_Statements): Update the call to Get_Simple_Init_Val.
(Check_Subtype_Bounds): Renamed to Extract_Subtype_Bounds. Update the
profile and comment on usage.
(Default_Initialize_Object): Do not use New_Copy_Tree to set the proper
Sloc of a value obtained from aspect Default_Value because this could
potentially replicate large trees. The proper Sloc is now set in
Get_Simple_Init_Val.
(Get_Simple_Init_Val): Reorganized by breaking the various cases into
separate routines. Eliminate the use of global variables.
(Init_Component): Update the call to Get_Simple_Init_Val.
(Needs_Simple_Initialization): Update the parameter profile and all
uses of T.
(Simple_Init_Defaulted_Type): Copy the value of aspect Default_Value
and set the proper Sloc.
* exp_ch3.ads (Get_Simple_Init_Val): Update the parameter profile and
comment on usage.
(Needs_Simple_Initialization): Update the parameter profile.
From-SVN: r260526
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions