gcc/gcc/ada/get_scos.ads

59 lines
3.5 KiB
Ada
Raw Normal View History

------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
[multiple changes] 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_res.adb: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-02 Javier Miranda <miranda@adacore.com> * exp_atag.adb, exp_atags.ads (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr by the tagged type Entity. Required to use this routine in the VM targets since we do not have available the Tag entity in the VM platforms. * exp_ch6.adb (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * exp_ch7.adb (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * sem_aux.adb (Enclosing_Dynamic_Scope): Add missing support to handle the full view of enclosing scopes. Required to handle enclosing scopes that are synchronized types whose full view is a task type. * exp_disp.adb (Build_VM_TSDs): Minor code improvement to avoid generating and analyzing lists with empty nodes. (Make_Disp_Asynchronous_Select_Body): Add support for VM targets. (Make_Disp_Conditional_Select_Body): Add support for VM targets. (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets. (Make_Disp_Timed_Select_Body): Add support for VM targets. (Make_Select_Specific_Data_Table): Add support for VM targets. (Make_VM_TSD): Generate code to initialize the SSD structure of the TSD. 2011-08-02 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_ALI): when ALFA mode is set, write local cross-references section in ALI. * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub (enclosing subprogram), Slc (location of Sub) and Sun (unit number of Sub). (Enclosing_Subprogram_Or_Package): new function to return the enclosing subprogram or package entity of a node (Is_Local_Reference_Type): new function returns True for references selected in local cross-references. (Lt): function extracted from Lt in Output_References (Write_Entity_Name): function extracted from Output_References (Generate_Definition): generate reference with type 'D' for definition of objects (object declaration and parameter specification), with appropriate locations and units, for use in local cross-references. (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created references of type 'I' for initialization in object definition. (Output_References): move part of function Lt and procedure Write_Entity_Name outside of the body. Ignore references of types 'D' and 'I' introduced for local cross-references. (Output_Local_References): new procedure to output the local cross-references sections. (Lref_Entity_Status): new array defining whether an entity is a local * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference with 'I' type when initialization expression is present. * get_scos.adb, get_scos.ads: Correct comments and typos From-SVN: r177168
2011-08-02 16:50:56 +02:00
-- G E T _ S C O S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2009-2011, 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- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the function used to read SCO information from an ALI
-- file and populate the tables defined in package SCOs with the result.
generic
-- These subprograms provide access to the ALI file. Locating, opening and
-- providing access to the ALI file is the callers' responsibility.
with function Getc return Character is <>;
-- Get next character, positioning the ALI file ready to read the following
[multiple changes] 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_res.adb: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-02 Javier Miranda <miranda@adacore.com> * exp_atag.adb, exp_atags.ads (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr by the tagged type Entity. Required to use this routine in the VM targets since we do not have available the Tag entity in the VM platforms. * exp_ch6.adb (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * exp_ch7.adb (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * sem_aux.adb (Enclosing_Dynamic_Scope): Add missing support to handle the full view of enclosing scopes. Required to handle enclosing scopes that are synchronized types whose full view is a task type. * exp_disp.adb (Build_VM_TSDs): Minor code improvement to avoid generating and analyzing lists with empty nodes. (Make_Disp_Asynchronous_Select_Body): Add support for VM targets. (Make_Disp_Conditional_Select_Body): Add support for VM targets. (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets. (Make_Disp_Timed_Select_Body): Add support for VM targets. (Make_Select_Specific_Data_Table): Add support for VM targets. (Make_VM_TSD): Generate code to initialize the SSD structure of the TSD. 2011-08-02 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_ALI): when ALFA mode is set, write local cross-references section in ALI. * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub (enclosing subprogram), Slc (location of Sub) and Sun (unit number of Sub). (Enclosing_Subprogram_Or_Package): new function to return the enclosing subprogram or package entity of a node (Is_Local_Reference_Type): new function returns True for references selected in local cross-references. (Lt): function extracted from Lt in Output_References (Write_Entity_Name): function extracted from Output_References (Generate_Definition): generate reference with type 'D' for definition of objects (object declaration and parameter specification), with appropriate locations and units, for use in local cross-references. (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created references of type 'I' for initialization in object definition. (Output_References): move part of function Lt and procedure Write_Entity_Name outside of the body. Ignore references of types 'D' and 'I' introduced for local cross-references. (Output_Local_References): new procedure to output the local cross-references sections. (Lref_Entity_Status): new array defining whether an entity is a local * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference with 'I' type when initialization expression is present. * get_scos.adb, get_scos.ads: Correct comments and typos From-SVN: r177168
2011-08-02 16:50:56 +02:00
-- character (equivalent to calling Nextc, then Skipc). If the end of file
-- is encountered, the value Types.EOF is returned.
with function Nextc return Character is <>;
-- Look at the next character, and return it, leaving the position of the
-- file unchanged, so that a subsequent call to Getc or Nextc will return
-- this same character. If the file is positioned at the end of file, then
-- Types.EOF is returned.
with procedure Skipc is <>;
-- Skip past the current character (which typically was read with Nextc),
-- and position to the next character, which will be returned by the next
-- call to Getc or Nextc.
procedure Get_SCOs;
-- Load SCO information from ALI file text format into internal SCO tables
-- (SCOs.SCO_Table and SCOs.SCO_Unit_Table). On entry the input file is
-- positioned to the initial 'C' of the first SCO line in the ALI file.
-- On return, the file is positioned either to the end of file, or to the
-- first character of the line following the SCO information (which will
-- never start with a 'C').
--
[multiple changes] 2011-08-02 Robert Dewar <dewar@adacore.com> * sem_res.adb: Minor reformatting. * sem_prag.adb: Minor reformatting. 2011-08-02 Javier Miranda <miranda@adacore.com> * exp_atag.adb, exp_atags.ads (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr by the tagged type Entity. Required to use this routine in the VM targets since we do not have available the Tag entity in the VM platforms. * exp_ch6.adb (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * exp_ch7.adb (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke Build_VM_TSDs if package Ada.Tags has not been previously loaded. * sem_aux.adb (Enclosing_Dynamic_Scope): Add missing support to handle the full view of enclosing scopes. Required to handle enclosing scopes that are synchronized types whose full view is a task type. * exp_disp.adb (Build_VM_TSDs): Minor code improvement to avoid generating and analyzing lists with empty nodes. (Make_Disp_Asynchronous_Select_Body): Add support for VM targets. (Make_Disp_Conditional_Select_Body): Add support for VM targets. (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets. (Make_Disp_Timed_Select_Body): Add support for VM targets. (Make_Select_Specific_Data_Table): Add support for VM targets. (Make_VM_TSD): Generate code to initialize the SSD structure of the TSD. 2011-08-02 Yannick Moy <moy@adacore.com> * lib-writ.adb (Write_ALI): when ALFA mode is set, write local cross-references section in ALI. * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub (enclosing subprogram), Slc (location of Sub) and Sun (unit number of Sub). (Enclosing_Subprogram_Or_Package): new function to return the enclosing subprogram or package entity of a node (Is_Local_Reference_Type): new function returns True for references selected in local cross-references. (Lt): function extracted from Lt in Output_References (Write_Entity_Name): function extracted from Output_References (Generate_Definition): generate reference with type 'D' for definition of objects (object declaration and parameter specification), with appropriate locations and units, for use in local cross-references. (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created references of type 'I' for initialization in object definition. (Output_References): move part of function Lt and procedure Write_Entity_Name outside of the body. Ignore references of types 'D' and 'I' introduced for local cross-references. (Output_Local_References): new procedure to output the local cross-references sections. (Lref_Entity_Status): new array defining whether an entity is a local * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference with 'I' type when initialization expression is present. * get_scos.adb, get_scos.ads: Correct comments and typos From-SVN: r177168
2011-08-02 16:50:56 +02:00
-- If a format error is detected in the input, then an exception is raised
-- (Ada.IO_Exceptions.Data_Error), with the file positioned to the error.