aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/nlists.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-17 17:50:40 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-17 17:50:40 +0200
commit955871d37fc3f6022ac6bd19dfd8a7134cbcdfac (patch)
treec9f3f6e4c77ca57ccafa67fbb4e7460cecb5e071 /gcc/ada/nlists.adb
parentb53c1b9ce2c05a9c982bcbdb8434ae167f014161 (diff)
downloadgcc-955871d37fc3f6022ac6bd19dfd8a7134cbcdfac.zip
gcc-955871d37fc3f6022ac6bd19dfd8a7134cbcdfac.tar.gz
gcc-955871d37fc3f6022ac6bd19dfd8a7134cbcdfac.tar.bz2
[multiple changes]
2010-06-17 Robert Dewar <dewar@adacore.com> * exp_ch4.ads: Minor code reorganization (specs in alpha order). 2010-06-17 Robert Dewar <dewar@adacore.com> * debug.adb: New debug flag -gnatd.X to use Expression_With_Actions node when expanding short circuit form with actions present for right opnd. * exp_ch4.adb: Minor reformatting (Expand_Short_Circuit_Operator): Use new Expression_With_Actions node if right opeand has actions present, and debug flag -gnatd.X is set. * exp_util.adb (Insert_Actions): Handle case of Expression_With_Actions node. * nlists.adb (Prepend_List): New procedure (Prepend_List_To): New procedure * nlists.ads (Prepend_List): New procedure (Prepend_List_To): New procedure * sem.adb: Add processing for Expression_With_Actions * sem_ch4.adb (Analyze_Expression_With_Actions): New procedure * sem_ch4.ads (Analyze_Expression_With_Actions): New procedure * sem_res.adb: Add processing for Expression_With_Actions. * sem_scil.adb: Add processing for Expression_With_Actions * sinfo.ads, sinfo.adb (N_Expression_With_Actions): New node. * sprint.ads, sprint.adb: Add processing for Expression_With_Actions 2010-06-17 Doug Rupp <rupp@adacore.com> * sem_intr.adb (Check_Intrinsic_Operator): Check that the types involved both have underlying integer types. * exp_intr.adb (Expand_Binary_Operator) New subprogram to expand a call to an intrinsic operator when the operand types or sizes are not identical. * s-auxdec-vms_64.ads: Revert "+" "-" ops back to Address now that 64/32 Address/Integer works. From-SVN: r160929
Diffstat (limited to 'gcc/ada/nlists.adb')
-rw-r--r--gcc/ada/nlists.adb71
1 files changed, 71 insertions, 0 deletions
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb
index 09bd85a..fe4d27c 100644
--- a/gcc/ada/nlists.adb
+++ b/gcc/ada/nlists.adb
@@ -1055,6 +1055,77 @@ package body Nlists is
Set_List_Link (Node, To);
end Prepend;
+ ------------------
+ -- Prepend_List --
+ ------------------
+
+ procedure Prepend_List (List : List_Id; To : List_Id) is
+
+ procedure Prepend_List_Debug;
+ pragma Inline (Prepend_List_Debug);
+ -- Output debug information if Debug_Flag_N set
+
+ ------------------------
+ -- Prepend_List_Debug --
+ ------------------------
+
+ procedure Prepend_List_Debug is
+ begin
+ if Debug_Flag_N then
+ Write_Str ("Prepend list ");
+ Write_Int (Int (List));
+ Write_Str (" to list ");
+ Write_Int (Int (To));
+ Write_Eol;
+ end if;
+ end Prepend_List_Debug;
+
+ -- Start of processing for Prepend_List
+
+ begin
+ if Is_Empty_List (List) then
+ return;
+
+ else
+ declare
+ F : constant Node_Id := First (To);
+ L : constant Node_Id := Last (List);
+ N : Node_Id;
+
+ begin
+ pragma Debug (Prepend_List_Debug);
+
+ N := L;
+ loop
+ Set_List_Link (N, To);
+ N := Prev (N);
+ exit when No (N);
+ end loop;
+
+ if No (F) then
+ Set_Last (To, L);
+ else
+ Set_Next (L, F);
+ end if;
+
+ Set_Prev (F, L);
+ Set_First (To, First (List));
+
+ Set_First (List, Empty);
+ Set_Last (List, Empty);
+ end;
+ end if;
+ end Prepend_List;
+
+ ---------------------
+ -- Prepend_List_To --
+ ---------------------
+
+ procedure Prepend_List_To (To : List_Id; List : List_Id) is
+ begin
+ Prepend_List (List, To);
+ end Prepend_List_To;
+
----------------
-- Prepend_To --
----------------