Commit 844ec038 by Arnaud Charlet

[multiple changes]

2012-03-07  Robert Dewar  <dewar@adacore.com>

	* sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
	s-gearop.adb, sem_ch6.adb, s-bbthre.adb, g-trasym.adb: Minor
	reformatting.

2012-03-07  Javier Miranda  <miranda@adacore.com>

	* a-ngrear.ads: Add documentation.

From-SVN: r185053
parent 207aaeda
2012-03-07 Robert Dewar <dewar@adacore.com>
* sem_ch5.adb, s-vaflop.adb, s-taprop-vms.adb, exp_ch6.adb,
s-gearop.adb, sem_ch6.adb, g-trasym.adb: Minor reformatting.
2012-03-07 Javier Miranda <miranda@adacore.com>
* a-ngrear.ads: Add documentation.
2012-03-07 Tristan Gingold <gingold@adacore.com> 2012-03-07 Tristan Gingold <gingold@adacore.com>
* s-taprop-vms.adb (Create_Task): set thread name. * s-taprop-vms.adb (Create_Task): set thread name.
......
...@@ -122,11 +122,11 @@ private ...@@ -122,11 +122,11 @@ private
-- The following operations are either relatively simple compared to the -- The following operations are either relatively simple compared to the
-- expense of returning unconstrained arrays, or are just function wrappers -- expense of returning unconstrained arrays, or are just function wrappers
-- calling procedures implementing the actual operation. By having the -- calling procedures implementing the actual operation. By having the
-- front end always inline these, the expense of the unconstrained returns -- front end inline these, the expense of the unconstrained returns
-- can be avoided. -- can be avoided.
-- Confusing comment above, why does the front end always inline -- Note: We use an extended return statement in their implementation to
-- these functions ??? -- allow the frontend to inline these functions.
pragma Inline ("+"); pragma Inline ("+");
pragma Inline ("-"); pragma Inline ("-");
......
...@@ -4251,8 +4251,8 @@ package body Exp_Ch6 is ...@@ -4251,8 +4251,8 @@ package body Exp_Ch6 is
return; return;
-- Skip inlining if the function returns an unconstrained type using -- Skip inlining if the function returns an unconstrained type using
-- an extended return statement since this part of the new model of -- an extended return statement since this part of the new inlining
-- inlining which is not yet supported by the current implementation. -- model which is not yet supported by the current implementation. ???
elsif Is_Unc elsif Is_Unc
and then and then
......
...@@ -46,6 +46,7 @@ package body GNAT.Traceback.Symbolic is ...@@ -46,6 +46,7 @@ package body GNAT.Traceback.Symbolic is
begin begin
if Traceback'Length = 0 then if Traceback'Length = 0 then
return ""; return "";
else else
declare declare
Img : String := System.Address_Image (Traceback (Traceback'First)); Img : String := System.Address_Image (Traceback (Traceback'First));
......
...@@ -33,17 +33,15 @@ with Ada.Numerics; use Ada.Numerics; ...@@ -33,17 +33,15 @@ with Ada.Numerics; use Ada.Numerics;
package body System.Generic_Array_Operations is package body System.Generic_Array_Operations is
-- The local function Check_Unit_Last computes the index of the last
-- element returned by Unit_Vector or Unit_Matrix. A separate function is
-- needed to allow raising Constraint_Error before declaring the function
-- result variable. The result variable needs to be declared first, to
-- allow front-end inlining.
function Check_Unit_Last function Check_Unit_Last
(Index : Integer; (Index : Integer;
Order : Positive; Order : Positive;
First : Integer) return Integer; First : Integer) return Integer;
pragma Inline_Always (Check_Unit_Last); pragma Inline_Always (Check_Unit_Last);
-- Compute index of last element returned by Unit_Vector or Unit_Matrix.
-- A separate function is needed to allow raising Constraint_Error before
-- declaring the function result variable. The result variable needs to be
-- declared first, to allow front-end inlining.
-------------- --------------
-- Diagonal -- -- Diagonal --
...@@ -67,9 +65,9 @@ package body System.Generic_Array_Operations is ...@@ -67,9 +65,9 @@ package body System.Generic_Array_Operations is
begin begin
if A'Length (1) /= A'Length (2) then if A'Length (1) /= A'Length (2) then
raise Constraint_Error with "matrix is not square"; raise Constraint_Error with "matrix is not square";
end if; else
return A'Length (1); return A'Length (1);
end if;
end Square_Matrix_Length; end Square_Matrix_Length;
--------------------- ---------------------
...@@ -111,6 +109,10 @@ package body System.Generic_Array_Operations is ...@@ -111,6 +109,10 @@ package body System.Generic_Array_Operations is
-- Elementary row operation that subtracts Factor * M (Source, <>) from -- Elementary row operation that subtracts Factor * M (Source, <>) from
-- M (Target, <>) -- M (Target, <>)
-------------
-- Sub_Row --
-------------
procedure Sub_Row procedure Sub_Row
(M : in out Matrix; (M : in out Matrix;
Target : Integer; Target : Integer;
...@@ -255,6 +257,10 @@ package body System.Generic_Array_Operations is ...@@ -255,6 +257,10 @@ package body System.Generic_Array_Operations is
procedure Swap (X, Y : in out Scalar); procedure Swap (X, Y : in out Scalar);
-- Exchange the values of X and Y -- Exchange the values of X and Y
----------
-- Swap --
----------
procedure Swap (X, Y : in out Scalar) is procedure Swap (X, Y : in out Scalar) is
T : constant Scalar := X; T : constant Scalar := X;
begin begin
...@@ -445,7 +451,8 @@ package body System.Generic_Array_Operations is ...@@ -445,7 +451,8 @@ package body System.Generic_Array_Operations is
function Matrix_Matrix_Scalar_Elementwise_Operation function Matrix_Matrix_Scalar_Elementwise_Operation
(X : X_Matrix; (X : X_Matrix;
Y : Y_Matrix; Y : Y_Matrix;
Z : Z_Scalar) return Result_Matrix is Z : Z_Scalar) return Result_Matrix
is
begin begin
return R : Result_Matrix (X'Range (1), X'Range (2)) do return R : Result_Matrix (X'Range (1), X'Range (2)) do
if X'Length (1) /= Y'Length (1) if X'Length (1) /= Y'Length (1)
...@@ -817,7 +824,8 @@ package body System.Generic_Array_Operations is ...@@ -817,7 +824,8 @@ package body System.Generic_Array_Operations is
procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix) is procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix) is
begin begin
if X'Length (1) /= Y'Length (1) if X'Length (1) /= Y'Length (1)
or else X'Length (2) /= Y'Length (2) or else
X'Length (2) /= Y'Length (2)
then then
raise Constraint_Error with raise Constraint_Error with
"matrices are of different dimension in update operation"; "matrices are of different dimension in update operation";
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2011, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- -- -- --
-- GNARL is free software; you can redistribute it and/or modify it under -- -- GNARL 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -781,6 +781,7 @@ package body System.Task_Primitives.Operations is ...@@ -781,6 +781,7 @@ package body System.Task_Primitives.Operations is
Ada.Unchecked_Conversion (System.Aux_DEC.Short_Address, Thread_Body); Ada.Unchecked_Conversion (System.Aux_DEC.Short_Address, Thread_Body);
Task_Name : String (1 .. System.Parameters.Max_Task_Image_Length + 1); Task_Name : String (1 .. System.Parameters.Max_Task_Image_Length + 1);
begin begin
-- Since the initial signal mask of a thread is inherited from the -- Since the initial signal mask of a thread is inherited from the
-- creator, we need to set our local signal mask to mask all signals -- creator, we need to set our local signal mask to mask all signals
...@@ -811,6 +812,7 @@ package body System.Task_Primitives.Operations is ...@@ -811,6 +812,7 @@ package body System.Task_Primitives.Operations is
pragma Assert (Result = 0); pragma Assert (Result = 0);
if T.Common.Task_Image_Len > 0 then if T.Common.Task_Image_Len > 0 then
-- Set thread name to ease debugging -- Set thread name to ease debugging
Task_Name (1 .. T.Common.Task_Image_Len) := Task_Name (1 .. T.Common.Task_Image_Len) :=
......
...@@ -444,22 +444,22 @@ package body System.Vax_Float_Operations is ...@@ -444,22 +444,22 @@ package body System.Vax_Float_Operations is
end Sub_G; end Sub_G;
------------ ------------
-- T_To_G -- -- T_To_D --
------------ ------------
function T_To_G (X : T) return G is function T_To_D (X : T) return D is
begin begin
return G (X); return G_To_D (T_To_G (X));
end T_To_G; end T_To_D;
------------ ------------
-- T_To_D -- -- T_To_G --
------------ ------------
function T_To_D (X : T) return D is function T_To_G (X : T) return G is
begin begin
return G_To_D (T_To_G (X)); return G (X);
end T_To_D; end T_To_G;
------------- -------------
-- Valid_D -- -- Valid_D --
......
...@@ -1657,6 +1657,7 @@ package body Sem_Ch5 is ...@@ -1657,6 +1657,7 @@ package body Sem_Ch5 is
Assign : Node_Id; Assign : Node_Id;
Decl : Node_Id; Decl : Node_Id;
Id : Entity_Id; Id : Entity_Id;
begin begin
-- If the bound is a constant or an object, no need for a separate -- If the bound is a constant or an object, no need for a separate
-- declaration. If the bound is the result of previous expansion -- declaration. If the bound is the result of previous expansion
......
...@@ -9893,7 +9893,7 @@ package body Sem_Ch6 is ...@@ -9893,7 +9893,7 @@ package body Sem_Ch6 is
end if; end if;
-- Internally generated subprograms, such as type-specific functions, -- Internally generated subprograms, such as type-specific functions,
-- don't get assertions checks. -- don't get assertion checks.
if Get_TSS_Name (Designator) /= TSS_Null then if Get_TSS_Name (Designator) /= TSS_Null then
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment