This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r273066 - in /trunk/gcc/ada: ChangeLog sem_elab...


Author: pmderodat
Date: Thu Jul  4 08:06:54 2019
New Revision: 273066

URL: https://gcc.gnu.org/viewcvs?rev=273066&root=gcc&view=rev
Log:
[Ada] Management of internal data structures in Sem_Elab

This patch modifies the timing of Sem_Elab's internal data structure
creation and destruction, and adds the concept of "active" elaboration
compiler phase.

The elaboration phase of the compiler is active after the frontend
initializes Sem_Elab. It is at this point that all internal data
structures of Sem_Elab are created and become ready to accept data.

The elaboration phase of the compiler is completed after all elaboration
scenarios are examined, all ABE checks are intalled, and diagnostics are
emitted. It is at this point that all internal data structures of
Sem_Elab are destroyed. Further attempts to reintroduce data into
Sem_Elab by subsequent compiler phases are cut off.

Compilation using GCC unaffected.

2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

	* sem_elab.adb: Add new type Elaboration_Phase_Status along with
	a global to keep track of the elaboration phase status.
	Initialize all internal data structures to Nil for services
	Elaborated_Units, Internal_Representation, and Scenario_Storage.
	(Build_Call_Marker): Do not create a call marker when the
	elaboration phase is not active.
	(Build_Variable_Reference_Marker): Do not create a call marker
	when the elaboration phase is not active.
	(Check_Elaboration_Scenarios): Destroy all internal structures
	when the elaboration phase does not have to run. Do not execute
	when the elaboration phase is not active.
	(Elaboration_Phase_Active): New routine.
	(Finalize_All_Data_Structures): New routine.
	(Initialize): Initialize all internal data structures and signal
	that the elaboration phase has started.
	(Initialize_All_Data_Structures): New routine.
	(Initialize_Elaborated_Units): Initialize all internal data
	structures.
	(Initialize_Internal_Representation): Initialize all internal
	data structures.
	(Initialize_Scenario_Storage): Initialize all internal data
	structures.
	(Kill_Elaboration_Scenario): Do not execute when the elaboration
	phase is not active.
	(Set_Elaboration_Phase): New routine.
	(Update_Elaboration_Scenario): Do not execute when the
	elaboration phase is not active.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/sem_elab.adb


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]