r256490 - in /trunk/gcc/ada: ChangeLog ali.adb ...

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Thu Jan 11 08:51:00 GMT 2018


Author: pmderodat
Date: Thu Jan 11 08:51:13 2018
New Revision: 256490

URL: https://gcc.gnu.org/viewcvs?rev=256490&root=gcc&view=rev
Log:
[Ada] Encoding of with clauses in ALI files

This patch modifies the encodings of with clauses in ALI files to adhere to the
existing API. The encodigs are as follows:

   * Explicit with clauses are encoded on a 'W' line (same as before).

   * Implicit with clauses for ancestor units are encoded on a 'W' line (same
     as before).

   * Limited_with clauses are encoded on a 'Y' line (same as before).

   * ABE and RTSfind-related with clauses are encoded on a 'Z' line.

------------
-- Source --
------------

--  case_10_func.adb

function Case_10_Func return Boolean is
begin
   return True;
end Case_10_Func;

--  case_10_gen_func.ads

generic
function Case_10_Gen_Func return Boolean;

--  case_10_gen_func.adb

function Case_10_Gen_Func return Boolean is
begin
   return True;
end Case_10_Gen_Func;

--  case_10_tasks.ads

package Case_10_Tasks is
   task type Task_Typ is
   end Task_Typ;
end Case_10_Tasks;

--  case_10_tasks.adb

package body Case_10_Tasks is
   task body Task_Typ is begin null; end Task_Typ;
end Case_10_Tasks;

--  case_10_gen.ads

with Case_10_Func;
with Case_10_Gen_Func;
with Case_10_Tasks;

generic
package Case_10_Gen is
   Val : constant Boolean := Case_10_Func;

   function Inst is new Case_10_Gen_Func;

   Tsk : Case_10_Tasks.Task_Typ;
end Case_10_Gen;

--  case_10.ads

with Case_10_Gen;

package Case_10 is
   package Inst is new Case_10_Gen;
end Case_10;

----------------------------
-- Compilation and output --
----------------------------

$ gcc -c case_10.ads
$ grep "W " case_10.ali | sort
$ grep "Z " case_10.ali | sort
W case_10_gen%s		case_10_gen.ads		case_10_gen.ali
Z case_10_func%b	case_10_func.adb	case_10_func.ali
Z case_10_gen_func%s	case_10_gen_func.adb	case_10_gen_func.ali  ED
Z case_10_tasks%s	case_10_tasks.adb	case_10_tasks.ali  AD
Z system.soft_links%s	s-soflin.adb		s-soflin.ali
Z system.tasking%s	s-taskin.adb		s-taskin.ali
Z system.tasking.stages%s  s-tassta.adb		s-tassta.ali

2018-01-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* ali.adb: Document the remaining letters available for ALI lines.
	(Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
	* ali.ads: Update type With_Record. Field
	Implicit_With_From_Instantiation is no longer in use. Add field
	Implicit_With.
	* csinfo.adb (CSinfo): Remove the setup for attribute
	Implicit_With_From_Instantiation.
	* lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
	either implicitly or explicitly withed.
	(Is_Implicit_With_Clause): New routine.
	(Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
	confusion with the with clause attribute by the same name.
	(Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
	* rtsfind.adb (Maybe_Add_With): Code cleanup.
	* sem_ch8.adb (Present_System_Aux): Code cleanup.
	* sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
	for a parent unit.
	(Implicit_With_On_Parent): Mark the with clause as generated for a
	parent unit.
	* sem_ch12.adb (Inherit_Context): With clauses inherited by an
	instantiation are no longer marked as Implicit_With_From_Instantiation
	because they are already marked as implicit.
	* sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
	which marks implicit with clauses as related to an instantiation.
	* sinfo.adb (Implicit_With_From_Instantiation): Removed.
	(Parent_With): New routine.
	(Set_Implicit_With_From_Instantiation): Removed.
	(Set_Parent_With): New routine.
	* sinfo.ads: Update the documentation of attribute Implicit_With.
	Remove attribute Implicit_With_From_Instantiation along with
	occurrences in nodes.  Add attribute Parent_With along with occurrences
	in nodes.
	(Implicit_With_From_Instantiation): Removed along with pragma Inline.
	(Parent_With): New routine along with pragma Inline.
	(Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
	(Set_Parent_With): New routine along with pragma Inline.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/ali.adb
    trunk/gcc/ada/ali.ads
    trunk/gcc/ada/csinfo.adb
    trunk/gcc/ada/lib-writ.adb
    trunk/gcc/ada/rtsfind.adb
    trunk/gcc/ada/sem_ch10.adb
    trunk/gcc/ada/sem_ch12.adb
    trunk/gcc/ada/sem_ch8.adb
    trunk/gcc/ada/sem_elab.adb
    trunk/gcc/ada/sinfo.adb
    trunk/gcc/ada/sinfo.ads



More information about the Gcc-cvs mailing list