Commit 1b6897ce by Arnaud Charlet

[multiple changes]

2012-01-30  Thomas Quinot  <quinot@adacore.com>

	* exp_aggr.adb (Expand_Record_Aggregate): After creating the
	_parent aggregate for an extension aggregate, check whether it
	requires delayed (top-down) expansion.

2012-01-30  Vincent Pucci  <pucci@adacore.com>

	* sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
	* snames.ads-tmpl: Name_Item and Name_Symbols added.
	* s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
	and change the position of parameter Symbols in every Put routine.
	* s-dimmks.ads: Convert long float type Mks_Type into long
	long float.
	* s-llflex.ads: Modifications in comments.

2012-01-30  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch12.adb (Earlier): Do not use the
	top level source locations of the two input nodes.

From-SVN: r183701
parent 50decc81
2012-01-30 Thomas Quinot <quinot@adacore.com>
* exp_aggr.adb (Expand_Record_Aggregate): After creating the
_parent aggregate for an extension aggregate, check whether it
requires delayed (top-down) expansion.
2012-01-30 Vincent Pucci <pucci@adacore.com>
* sem_dim.adb (Expand_Put_Call_With_Dimension_Symbol): Rewritten.
* snames.ads-tmpl: Name_Item and Name_Symbols added.
* s-diflio.adb, s-diflio.ads, s-diinio.adb, s-diinio.ads: Rename
and change the position of parameter Symbols in every Put routine.
* s-dimmks.ads: Convert long float type Mks_Type into long
long float.
* s-llflex.ads: Modifications in comments.
2012-01-30 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Earlier): Do not use the
top level source locations of the two input nodes.
2012-01-30 Robert Dewar <dewar@adacore.com>
* einfo.ads, sem_prag.adb, sem_attr.adb, aspects.ads,
......
......@@ -5658,6 +5658,13 @@ package body Exp_Aggr is
Expand_Record_Aggregate
(Parent_Aggr, Tag_Value, Parent_Expr);
-- The ancestor part may be a nested aggregate that has
-- delayed expansion: recheck now.
if Component_Not_OK_For_Backend then
Convert_To_Assignments (N, Typ);
end if;
end;
-- For a root type, the tag component is added (unless compiling
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -38,40 +38,40 @@ package body System.Dim_Float_IO is
---------
procedure Put
(File : File_Type;
Item : Num_Dim_Float;
Unit : String := "";
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
(File : File_Type;
Item : Num_Dim_Float;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "")
is
begin
Num_Dim_Float_IO.Put (File, Item, Fore, Aft, Exp);
Ada.Text_IO.Put (File, Unit);
Ada.Text_IO.Put (File, Symbols);
end Put;
procedure Put
(Item : Num_Dim_Float;
Unit : String := "";
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
(Item : Num_Dim_Float;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "")
is
begin
Num_Dim_Float_IO.Put (Item, Fore, Aft, Exp);
Ada.Text_IO.Put (Unit);
Ada.Text_IO.Put (Symbols);
end Put;
procedure Put
(To : out String;
Item : Num_Dim_Float;
Unit : String := "";
Aft : Field := Default_Aft;
Exp : Field := Default_Exp)
(To : out String;
Item : Num_Dim_Float;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "")
is
begin
Num_Dim_Float_IO.Put (To, Item, Aft, Exp);
To := To & Unit;
To := To & Symbols;
end Put;
end System.Dim_Float_IO;
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -48,26 +48,26 @@ package System.Dim_Float_IO is
Default_Exp : Field := 3;
procedure Put
(File : File_Type;
Item : Num_Dim_Float;
Unit : String := "";
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
(File : File_Type;
Item : Num_Dim_Float;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "");
procedure Put
(Item : Num_Dim_Float;
Unit : String := "";
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
(Item : Num_Dim_Float;
Fore : Field := Default_Fore;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "");
procedure Put
(To : out String;
Item : Num_Dim_Float;
Unit : String := "";
Aft : Field := Default_Aft;
Exp : Field := Default_Exp);
(To : out String;
Item : Num_Dim_Float;
Aft : Field := Default_Aft;
Exp : Field := Default_Exp;
Symbols : String := "");
pragma Inline (Put);
......
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -38,40 +38,40 @@ package body System.Dim_Integer_IO is
---------
procedure Put
(File : File_Type;
Item : Num_Dim_Integer;
Unit : String := "";
Width : Field := Default_Width;
Base : Number_Base := Default_Base)
(File : File_Type;
Item : Num_Dim_Integer;
Width : Field := Default_Width;
Base : Number_Base := Default_Base;
Symbols : String := "")
is
begin
Num_Dim_Integer_IO.Put (File, Item, Width, Base);
Ada.Text_IO.Put (File, Unit);
Ada.Text_IO.Put (File, Symbols);
end Put;
procedure Put
(Item : Num_Dim_Integer;
Unit : String := "";
Width : Field := Default_Width;
Base : Number_Base := Default_Base)
(Item : Num_Dim_Integer;
Width : Field := Default_Width;
Base : Number_Base := Default_Base;
Symbols : String := "")
is
begin
Num_Dim_Integer_IO.Put (Item, Width, Base);
Ada.Text_IO.Put (Unit);
Ada.Text_IO.Put (Symbols);
end Put;
procedure Put
(To : out String;
Item : Num_Dim_Integer;
Unit : String := "";
Base : Number_Base := Default_Base)
(To : out String;
Item : Num_Dim_Integer;
Base : Number_Base := Default_Base;
Symbols : String := "")
is
begin
Num_Dim_Integer_IO.Put (To, Item, Base);
To := To & Unit;
To := To & Symbols;
end Put;
end System.Dim_Integer_IO;
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -47,23 +47,23 @@ package System.Dim_Integer_IO is
Default_Base : Number_Base := 10;
procedure Put
(File : File_Type;
Item : Num_Dim_Integer;
Unit : String := "";
Width : Field := Default_Width;
Base : Number_Base := Default_Base);
(File : File_Type;
Item : Num_Dim_Integer;
Width : Field := Default_Width;
Base : Number_Base := Default_Base;
Symbols : String := "");
procedure Put
(Item : Num_Dim_Integer;
Unit : String := "";
Width : Field := Default_Width;
Base : Number_Base := Default_Base);
(Item : Num_Dim_Integer;
Width : Field := Default_Width;
Base : Number_Base := Default_Base;
Symbols : String := "");
procedure Put
(To : out String;
Item : Num_Dim_Integer;
Unit : String := "";
Base : Number_Base := Default_Base);
(To : out String;
Item : Num_Dim_Integer;
Base : Number_Base := Default_Base;
Symbols : String := "");
pragma Inline (Put);
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -44,7 +44,7 @@ package System.Dim_Mks is
-- Dimensioned type Mks_Type
type Mks_Type is new Long_Float
type Mks_Type is new Long_Long_Float
with
Dimension_System => ((Meter, 'm'),
(Kilogram, "kg"),
......
......@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
-- Copyright (C) 2011, Free Software Foundation, Inc. --
-- Copyright (C) 2011-2012, 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- --
......@@ -29,8 +29,8 @@
-- --
------------------------------------------------------------------------------
-- This package contains an instantiation of the functions "**" and Sqrt
-- between two long long floats.
-- This package contains an instantiation of the exponentiation between two
-- long long floats.
with Ada.Numerics.Long_Long_Elementary_Functions;
......
......@@ -7142,13 +7142,12 @@ package body Sem_Ch12 is
end if;
-- At this point either both nodes came from source or we approximated
-- their source locations through neighbouring source statements.
-- their source locations through neighbouring source statements. There
-- is no need to look at the top level locations of P1 and P2 because
-- both nodes are in the same list and whether the enclosing context is
-- instantiated is irrelevant.
if Top_Level_Location (Sloc (P1)) < Top_Level_Location (Sloc (P2)) then
return True;
else
return False;
end if;
return Sloc (P1) < Sloc (P2);
end Earlier;
----------------------
......
......@@ -228,7 +228,9 @@ package Snames is
Name_Dim_Float_IO : constant Name_Id := N + $; -- Ada 12
Name_Dim_Integer_IO : constant Name_Id := N + $; -- Ada 12
Name_Generic_Elementary_Functions : constant Name_Id := N + $; -- Ada 12
Name_Item : constant Name_Id := N + $; -- Ada 12
Name_Sqrt : constant Name_Id := N + $; -- Ada 12
Name_Symbols : constant Name_Id := N + $; -- Ada 12
-- Some miscellaneous names used for error detection/recovery
......
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