diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/ada/table.adb | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/ada/table.adb')
-rw-r--r-- | gcc/ada/table.adb | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/gcc/ada/table.adb b/gcc/ada/table.adb index 9794047..cd7cbef 100644 --- a/gcc/ada/table.adb +++ b/gcc/ada/table.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -33,7 +33,6 @@ with Debug; use Debug; with Opt; use Opt; with Output; use Output; with System; use System; -with Tree_IO; use Tree_IO; with System.Memory; use System.Memory; @@ -60,10 +59,6 @@ package body Table is -- in Max. Works correctly to do an initial allocation if the table -- is currently null. - function Tree_Get_Table_Address return Address; - -- Return Null_Address if the table length is zero, - -- Table (First)'Address if not. - pragma Warnings (Off); -- Turn off warnings. The following unchecked conversions are only used -- internally in this package, and cannot never result in any instances @@ -400,60 +395,6 @@ package body Table is end if; end Set_Last; - ---------------------------- - -- Tree_Get_Table_Address -- - ---------------------------- - - function Tree_Get_Table_Address return Address is - begin - if Length = 0 then - return Null_Address; - else - return Table (First)'Address; - end if; - end Tree_Get_Table_Address; - - --------------- - -- Tree_Read -- - --------------- - - -- Note: we allocate only the space required to accommodate the data - -- actually written, which means that a Tree_Write/Tree_Read sequence - -- does an implicit Release. - - procedure Tree_Read is - begin - Tree_Read_Int (Max); - Last_Val := Max; - Length := Max - Min + 1; - Reallocate; - - Tree_Read_Data - (Tree_Get_Table_Address, - (Last_Val - Int (First) + 1) * - - -- Note the importance of parenthesizing the following division - -- to avoid the possibility of intermediate overflow. - - (Table_Type'Component_Size / Storage_Unit)); - end Tree_Read; - - ---------------- - -- Tree_Write -- - ---------------- - - -- Note: we write out only the currently valid data, not the entire - -- contents of the allocated array. See note above on Tree_Read. - - procedure Tree_Write is - begin - Tree_Write_Int (Int (Last)); - Tree_Write_Data - (Tree_Get_Table_Address, - (Last_Val - Int (First) + 1) * - (Table_Type'Component_Size / Storage_Unit)); - end Tree_Write; - begin Init; end Table; |