mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 01:20:31 +08:00
[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
This commit is contained in:
parent
207aaeda9d
commit
844ec03891
@ -1,3 +1,12 @@
|
||||
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>
|
||||
|
||||
* s-taprop-vms.adb (Create_Task): set thread name.
|
||||
|
@ -122,11 +122,11 @@ private
|
||||
-- The following operations are either relatively simple compared to the
|
||||
-- expense of returning unconstrained arrays, or are just function wrappers
|
||||
-- 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.
|
||||
|
||||
-- Confusing comment above, why does the front end always inline
|
||||
-- these functions ???
|
||||
-- Note: We use an extended return statement in their implementation to
|
||||
-- allow the frontend to inline these functions.
|
||||
|
||||
pragma Inline ("+");
|
||||
pragma Inline ("-");
|
||||
|
@ -4251,8 +4251,8 @@ package body Exp_Ch6 is
|
||||
return;
|
||||
|
||||
-- Skip inlining if the function returns an unconstrained type using
|
||||
-- an extended return statement since this part of the new model of
|
||||
-- inlining which is not yet supported by the current implementation.
|
||||
-- an extended return statement since this part of the new inlining
|
||||
-- model which is not yet supported by the current implementation. ???
|
||||
|
||||
elsif Is_Unc
|
||||
and then
|
||||
|
@ -46,6 +46,7 @@ package body GNAT.Traceback.Symbolic is
|
||||
begin
|
||||
if Traceback'Length = 0 then
|
||||
return "";
|
||||
|
||||
else
|
||||
declare
|
||||
Img : String := System.Address_Image (Traceback (Traceback'First));
|
||||
|
@ -33,17 +33,15 @@ with Ada.Numerics; use Ada.Numerics;
|
||||
|
||||
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
|
||||
(Index : Integer;
|
||||
Order : Positive;
|
||||
First : Integer) return Integer;
|
||||
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 --
|
||||
@ -67,9 +65,9 @@ package body System.Generic_Array_Operations is
|
||||
begin
|
||||
if A'Length (1) /= A'Length (2) then
|
||||
raise Constraint_Error with "matrix is not square";
|
||||
else
|
||||
return A'Length (1);
|
||||
end if;
|
||||
|
||||
return A'Length (1);
|
||||
end Square_Matrix_Length;
|
||||
|
||||
---------------------
|
||||
@ -111,6 +109,10 @@ package body System.Generic_Array_Operations is
|
||||
-- Elementary row operation that subtracts Factor * M (Source, <>) from
|
||||
-- M (Target, <>)
|
||||
|
||||
-------------
|
||||
-- Sub_Row --
|
||||
-------------
|
||||
|
||||
procedure Sub_Row
|
||||
(M : in out Matrix;
|
||||
Target : Integer;
|
||||
@ -255,6 +257,10 @@ package body System.Generic_Array_Operations is
|
||||
procedure Swap (X, Y : in out Scalar);
|
||||
-- Exchange the values of X and Y
|
||||
|
||||
----------
|
||||
-- Swap --
|
||||
----------
|
||||
|
||||
procedure Swap (X, Y : in out Scalar) is
|
||||
T : constant Scalar := X;
|
||||
begin
|
||||
@ -418,8 +424,8 @@ package body System.Generic_Array_Operations is
|
||||
begin
|
||||
return R : Result_Matrix (Left'Range (1), Left'Range (2)) do
|
||||
if Left'Length (1) /= Right'Length (1)
|
||||
or else
|
||||
Left'Length (2) /= Right'Length (2)
|
||||
or else
|
||||
Left'Length (2) /= Right'Length (2)
|
||||
then
|
||||
raise Constraint_Error with
|
||||
"matrices are of different dimension in elementwise operation";
|
||||
@ -443,14 +449,15 @@ package body System.Generic_Array_Operations is
|
||||
------------------------------------------------
|
||||
|
||||
function Matrix_Matrix_Scalar_Elementwise_Operation
|
||||
(X : X_Matrix;
|
||||
Y : Y_Matrix;
|
||||
Z : Z_Scalar) return Result_Matrix is
|
||||
(X : X_Matrix;
|
||||
Y : Y_Matrix;
|
||||
Z : Z_Scalar) return Result_Matrix
|
||||
is
|
||||
begin
|
||||
return R : Result_Matrix (X'Range (1), X'Range (2)) do
|
||||
if X'Length (1) /= Y'Length (1)
|
||||
or else
|
||||
X'Length (2) /= Y'Length (2)
|
||||
or else
|
||||
X'Length (2) /= Y'Length (2)
|
||||
then
|
||||
raise Constraint_Error with
|
||||
"matrices are of different dimension in elementwise operation";
|
||||
@ -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
|
||||
begin
|
||||
if X'Length (1) /= Y'Length (1)
|
||||
or else X'Length (2) /= Y'Length (2)
|
||||
or else
|
||||
X'Length (2) /= Y'Length (2)
|
||||
then
|
||||
raise Constraint_Error with
|
||||
"matrices are of different dimension in update operation";
|
||||
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- 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 --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
@ -781,6 +781,7 @@ package body System.Task_Primitives.Operations is
|
||||
Ada.Unchecked_Conversion (System.Aux_DEC.Short_Address, Thread_Body);
|
||||
|
||||
Task_Name : String (1 .. System.Parameters.Max_Task_Image_Length + 1);
|
||||
|
||||
begin
|
||||
-- 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
|
||||
@ -811,6 +812,7 @@ package body System.Task_Primitives.Operations is
|
||||
pragma Assert (Result = 0);
|
||||
|
||||
if T.Common.Task_Image_Len > 0 then
|
||||
|
||||
-- Set thread name to ease debugging
|
||||
|
||||
Task_Name (1 .. T.Common.Task_Image_Len) :=
|
||||
|
@ -443,15 +443,6 @@ package body System.Vax_Float_Operations is
|
||||
return X - Y;
|
||||
end Sub_G;
|
||||
|
||||
------------
|
||||
-- T_To_G --
|
||||
------------
|
||||
|
||||
function T_To_G (X : T) return G is
|
||||
begin
|
||||
return G (X);
|
||||
end T_To_G;
|
||||
|
||||
------------
|
||||
-- T_To_D --
|
||||
------------
|
||||
@ -461,6 +452,15 @@ package body System.Vax_Float_Operations is
|
||||
return G_To_D (T_To_G (X));
|
||||
end T_To_D;
|
||||
|
||||
------------
|
||||
-- T_To_G --
|
||||
------------
|
||||
|
||||
function T_To_G (X : T) return G is
|
||||
begin
|
||||
return G (X);
|
||||
end T_To_G;
|
||||
|
||||
-------------
|
||||
-- Valid_D --
|
||||
-------------
|
||||
|
@ -1654,9 +1654,10 @@ package body Sem_Ch5 is
|
||||
(Original_Bound : Node_Id;
|
||||
Analyzed_Bound : Node_Id) return Node_Id
|
||||
is
|
||||
Assign : Node_Id;
|
||||
Decl : Node_Id;
|
||||
Id : Entity_Id;
|
||||
Assign : Node_Id;
|
||||
Decl : Node_Id;
|
||||
Id : Entity_Id;
|
||||
|
||||
begin
|
||||
-- If the bound is a constant or an object, no need for a separate
|
||||
-- declaration. If the bound is the result of previous expansion
|
||||
|
@ -9893,7 +9893,7 @@ package body Sem_Ch6 is
|
||||
end if;
|
||||
|
||||
-- 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
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user