Commit 5a8a6763 by Robert Dewar Committed by Arnaud Charlet

freeze.adb: Minor reformatting.

2013-10-10  Robert Dewar  <dewar@adacore.com>

	* freeze.adb: Minor reformatting.
	* sem_ch13.adb (Freeze_Entity_Checks): New procedure
	(Analyze_Freeze_Entity): Call Freeze_Entity_Checks
	(Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
	* sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
	* sprint.ads: Add syntax for freeze generic entity node.

2013-10-10  Robert Dewar  <dewar@adacore.com>

	* einfo.adb, einfo.ads: Minor comment updates.

From-SVN: r203368
parent 3cd4a210
2013-10-10 Robert Dewar <dewar@adacore.com> 2013-10-10 Robert Dewar <dewar@adacore.com>
* freeze.adb: Minor reformatting.
* sem_ch13.adb (Freeze_Entity_Checks): New procedure
(Analyze_Freeze_Entity): Call Freeze_Entity_Checks
(Analyze_Freeze_Generic_Entity): Call Freeze_Entity_Checks.
* sinfo.ads: Add syntax for sprint for Freeze_Generic_Entity.
* sprint.ads: Add syntax for freeze generic entity node.
2013-10-10 Robert Dewar <dewar@adacore.com>
* einfo.adb, einfo.ads: Minor comment updates.
2013-10-10 Robert Dewar <dewar@adacore.com>
* lib-writ.adb (Write_Unit_Information): Fatal error if linker * lib-writ.adb (Write_Unit_Information): Fatal error if linker
options are detected in a predefined generic unit. options are detected in a predefined generic unit.
......
...@@ -9017,10 +9017,6 @@ package body Einfo is ...@@ -9017,10 +9017,6 @@ package body Einfo is
Generic_Subprogram_Kind => Generic_Subprogram_Kind =>
Write_Str ("Contract"); Write_Str ("Contract");
-- The Subprogram_Kind and Generic_Subrpogram_Kind entries
-- here are odd, since the assertions for [Set_]Contract do not
-- allow these possibilities ???
when others => when others =>
Write_Str ("Field24???"); Write_Str ("Field24???");
end case; end case;
......
...@@ -1022,9 +1022,9 @@ package Einfo is ...@@ -1022,9 +1022,9 @@ package Einfo is
-- 'COUNT when it applies to a family member. -- 'COUNT when it applies to a family member.
-- Contract (Node24) -- Contract (Node24)
-- Defined in entries, and in subprogram and generic subprogram entities. -- Defined in entry and entry family entities, subprogram body entities,
-- Points to the contract of the entity, holding both pre- and -- subprograms, and generic subprograms. Points to the contract of the
-- postconditions as well as test-cases. -- entity, holding both preconditions, postconditions, and test cases.
-- Entry_Parameters_Type (Node15) -- Entry_Parameters_Type (Node15)
-- Defined in entries. Points to the access-to-record type that is -- Defined in entries. Points to the access-to-record type that is
...@@ -5306,7 +5306,7 @@ package Einfo is ...@@ -5306,7 +5306,7 @@ package Einfo is
-- Accept_Address (Elist21) -- Accept_Address (Elist21)
-- Scope_Depth_Value (Uint22) -- Scope_Depth_Value (Uint22)
-- Protection_Object (Node23) (protected kind) -- Protection_Object (Node23) (protected kind)
-- Contract (Node24) (for entry only) -- Contract (Node24)
-- PPC_Wrapper (Node25) -- PPC_Wrapper (Node25)
-- Extra_Formals (Node28) -- Extra_Formals (Node28)
-- Default_Expressions_Processed (Flag108) -- Default_Expressions_Processed (Flag108)
...@@ -5567,6 +5567,7 @@ package Einfo is ...@@ -5567,6 +5567,7 @@ package Einfo is
-- Alias (Node18) -- Alias (Node18)
-- Extra_Accessibility_Of_Result (Node19) -- Extra_Accessibility_Of_Result (Node19)
-- Last_Entity (Node20) -- Last_Entity (Node20)
-- Contract (Node24)
-- Overridden_Operation (Node26) -- Overridden_Operation (Node26)
-- Subprograms_For_Type (Node29) -- Subprograms_For_Type (Node29)
-- Has_Invariants (Flag232) -- Has_Invariants (Flag232)
...@@ -5863,6 +5864,7 @@ package Einfo is ...@@ -5863,6 +5864,7 @@ package Einfo is
-- Corresponding_Protected_Entry (Node18) -- Corresponding_Protected_Entry (Node18)
-- Last_Entity (Node20) -- Last_Entity (Node20)
-- Scope_Depth_Value (Uint22) -- Scope_Depth_Value (Uint22)
-- Contract (Node24)
-- Extra_Formals (Node28) -- Extra_Formals (Node28)
-- SPARK_Mode_Pragmas (Node32) -- SPARK_Mode_Pragmas (Node32)
-- Scope_Depth (synth) -- Scope_Depth (synth)
......
...@@ -2793,6 +2793,12 @@ package body Freeze is ...@@ -2793,6 +2793,12 @@ package body Freeze is
then then
return No_List; return No_List;
-- Generic types need no freeze node and have no delayed semantic
-- checks.
elsif Is_Generic_Type (E) then
return No_List;
-- Do not freeze a global entity within an inner scope created during -- Do not freeze a global entity within an inner scope created during
-- expansion. A call to subprogram E within some internal procedure -- expansion. A call to subprogram E within some internal procedure
-- (a stream attribute for example) might require freezing E, but the -- (a stream attribute for example) might require freezing E, but the
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7336,6 +7336,8 @@ package Sinfo is ...@@ -7336,6 +7336,8 @@ package Sinfo is
-- trigger these checks. The Freeze_Generic_Entity node plays no other -- trigger these checks. The Freeze_Generic_Entity node plays no other
-- role, and is ignored by the expander and the back-end. -- role, and is ignored by the expander and the back-end.
-- Sprint syntax: freeze_generic entity-name
-- N_Freeze_Generic_Entity -- N_Freeze_Generic_Entity
-- Sloc points near freeze point -- Sloc points near freeze point
-- Entity (Node4-Sem) -- Entity (Node4-Sem)
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- S p e c -- -- S p e c --
-- -- -- --
-- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2013, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -57,6 +57,7 @@ package Sprint is ...@@ -57,6 +57,7 @@ package Sprint is
-- Expression with range check {expression} -- Expression with range check {expression}
-- Free statement free expr [storage_pool = xxx] -- Free statement free expr [storage_pool = xxx]
-- Freeze entity with freeze actions freeze entityname [ actions ] -- Freeze entity with freeze actions freeze entityname [ actions ]
-- Freeze generic entity freeze_generic entityname
-- Implicit call to run time routine $routine-name -- Implicit call to run time routine $routine-name
-- Implicit exportation $pragma import (...) -- Implicit exportation $pragma import (...)
-- Implicit importation $pragma export (...) -- Implicit importation $pragma export (...)
......
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