diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2007-06-06 12:49:08 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-06-06 12:49:08 +0200 |
commit | cb65368d57a94a8b9b2e4a5c098cf3777f4d8dad (patch) | |
tree | 1d03d1d13e6397e09f20b29ba0b7da5ce2876a78 /gcc/ada/s-stoele.adb | |
parent | 4ce7ff881ab27cda15543985de467fd6c9611676 (diff) | |
download | gcc-cb65368d57a94a8b9b2e4a5c098cf3777f4d8dad.zip gcc-cb65368d57a94a8b9b2e4a5c098cf3777f4d8dad.tar.gz gcc-cb65368d57a94a8b9b2e4a5c098cf3777f4d8dad.tar.bz2 |
s-stoele.ads, [...]: Move inline_always subprograms earlier than their first call.
2007-04-20 Eric Botcazou <ebotcazou@adacore.com>
* s-stoele.ads, s-stoele.adb: Move inline_always subprograms earlier
than their first call.
Add type Dummy_Communication_Block used in the generation of the pre-
defined dispatching primitive _disp_asynchronous_select.
(Storage_Element): Put Pragma Universal_Aliasing on it.
From-SVN: r125467
Diffstat (limited to 'gcc/ada/s-stoele.adb')
-rw-r--r-- | gcc/ada/s-stoele.adb | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/gcc/ada/s-stoele.adb b/gcc/ada/s-stoele.adb index 4d4f959..3a4f973 100644 --- a/gcc/ada/s-stoele.adb +++ b/gcc/ada/s-stoele.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2007, 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- -- @@ -31,13 +31,30 @@ -- -- ------------------------------------------------------------------------------ -with Unchecked_Conversion; +with Ada.Unchecked_Conversion; + package body System.Storage_Elements is pragma Suppress (All_Checks); - function To_Address is new Unchecked_Conversion (Storage_Offset, Address); - function To_Offset is new Unchecked_Conversion (Address, Storage_Offset); + function To_Address is + new Ada.Unchecked_Conversion (Storage_Offset, Address); + function To_Offset is + new Ada.Unchecked_Conversion (Address, Storage_Offset); + + -- Conversion to/from integers + -- Those functions must be place first because they are inlined_always + -- and are used in other subprograms defined in this unit. + + function To_Integer (Value : Address) return Integer_Address is + begin + return Integer_Address (Value); + end To_Integer; + + function To_Address (Value : Integer_Address) return Address is + begin + return Address (Value); + end To_Address; -- Address arithmetic @@ -74,17 +91,4 @@ package body System.Storage_Elements is ((-To_Integer (Left)) mod Integer_Address (-Right)); end if; end "mod"; - - -- Conversion to/from integers - - function To_Address (Value : Integer_Address) return Address is - begin - return Address (Value); - end To_Address; - - function To_Integer (Value : Address) return Integer_Address is - begin - return Integer_Address (Value); - end To_Integer; - end System.Storage_Elements; |