|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 8192 (0x2000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Declaration_Table, seg_0045dc
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
--| @SUMMARY Provides a mapping mechanism to store declarations and client --| state associated with the declaration for later retrieval. It provides --| overload analysis and for the construction of unique names for reference --| to overloaded entities. Finally it provides a list of a external units --| referenced by the declarations in the database. with Unbounded_String; with Map_Generic; with String_Map_Generic; with Ada_Program; generic Size : Integer; type Global_State is private; type Declaration_State is private; pragma Must_Be_Constrained (Yes => Declaration_State); with procedure Update_State (Of_Decl : Ada_Program.Declaration; Decl_State : in out Declaration_State; Global : in out Global_State); package Declaration_Table is type Database is private; procedure Initialize (Db : in out Database); --| @DESCRIPTION This procedure will store declarations and their analysis --| state in the database for future iteration. If the declaration --| already exits and duplicate with separate state may be added with --| Insert_duplications. Otherwise the state is only updated. --| A list of unique parent compilation units is also computed and added --| to the database. procedure Add (The_Declaration : Ada_Program.Declaration; To : in out Database; Global : in out Global_State); type Declaration_Iterator is private; procedure Init (From_Db : Database; Iter : in out Declaration_Iterator); function Done (Iter : Declaration_Iterator) return Boolean; procedure Next (Iter : in out Declaration_Iterator); function Declaration (Iter : Declaration_Iterator) return Ada_Program.Element; function Analysis (Iter : Declaration_Iterator) return Declaration_State; function Simple_Name (Iter : Declaration_Iterator) return String; function Is_Overloaded (Iter : Declaration_Iterator) return Boolean; --| @DESCRIPTION Returns a unique name in the face of overloading by --| appending an "_N" the the base simple name. function Unique_Simple_Name (Iter : Declaration_Iterator) return String; type Parent_Comp_Unit_Iterator is private; procedure Init (From_Db : Database; Iter : in out Parent_Comp_Unit_Iterator); function Done (Iter : Parent_Comp_Unit_Iterator) return Boolean; function Parent (Iter : Parent_Comp_Unit_Iterator) return Ada_Program.Compilation_Unit; function Simple_Name (Iter : Parent_Comp_Unit_Iterator) return String; procedure Next (Iter : in out Parent_Comp_Unit_Iterator); private package Unbounded is new Unbounded_String (80); type Decl_Info is record Decl_Number : Positive; Decl : Ada_Program.Declaration; Is_Overloaded : Boolean; Unique_Simple_Name : Unbounded.Variable_String; Parent : Ada_Program.Compilation_Unit; Analysis_State : Declaration_State; end record; function Hash (Key : Long_Integer) return Integer; package Decl_Map is new Map_Generic (Size, Long_Integer, Decl_Info, Hash); package Parent_Map is new Map_Generic (Size, Long_Integer, Ada_Program.Element, Hash); package Simple_Name_Map is new String_Map_Generic (Size, Natural); type Database is record Last_Decl_Number : Natural := 0; Decls : Decl_Map.Map; Simple_Names : Simple_Name_Map.Map; Parents : Parent_Map.Map; Parent_Iter : Parent_Map.Iterator; end record; type Decl_List is array (1 .. Size) of Decl_Info; type Declaration_Iterator is record Size : Positive; Current : Positive; Data : Decl_List; end record; type Parent_Comp_Unit_Iterator is new Database; end Declaration_Table;
nblk1=7 nid=0 hdr6=e [0x00] rec0=1c rec1=00 rec2=01 rec3=03a [0x01] rec0=12 rec1=00 rec2=02 rec3=0a0 [0x02] rec0=01 rec1=00 rec2=07 rec3=002 [0x03] rec0=17 rec1=00 rec2=03 rec3=016 [0x04] rec0=01 rec1=00 rec2=06 rec3=012 [0x05] rec0=19 rec1=00 rec2=04 rec3=04a [0x06] rec0=0b rec1=00 rec2=05 rec3=000 tail 0x2170022f2815c6571b3dc 0x42a00088462061e03