Changeset 397


Ignore:
Timestamp:
Feb 8, 2015, 7:58:55 AM (6 years ago)
Author:
Maxim Reznik
Message:

Declare incomplete types. Add new tests

Location:
trunk/ada-2012
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/ag/down.ag

    r395 r397  
    10131013Rules for access_to_object_definition. :
    10141014(.
    1015       ${subtype_indication.Down} := 0;  --  FIXME
     1015      --  3.2.2 (8)
     1016      Gela.Pass_Utils.Resolve.Shall_Be_Subtype
     1017        (Self.Compilation,
     1018         ${access_to_object_definition.env_in},
     1019         ${subtype_indication.Up},
     1020         ${subtype_indication.Down});
    10161021.)
    10171022
  • trunk/ada-2012/src/ag/env_in.ag

    r394 r397  
    19271927Rules for incomplete_type_declaration. :
    19281928(.
    1929       ${Discriminant_Part.env_in} := ${incomplete_type_declaration.env_in};
     1929      ${Discriminant_Part.env_in} :=
     1930        Gela.Pass_Utils.Add_Name_Create_Region
     1931          (Self.Compilation,
     1932           ${incomplete_type_declaration.env_in},
     1933           ${Names.full_name},
     1934           Gela.Elements.Defining_Names.Defining_Name_Access (Names),
     1935           Gela.Elements.Element_Access (Node));
    19301936.)
    19311937
  • trunk/ada-2012/src/ag/env_out.ag

    r389 r397  
    657657Rules for incomplete_type_declaration. :
    658658(.
    659       ${incomplete_type_declaration.env_out} := ${incomplete_type_declaration.env_in};
     659      ${incomplete_type_declaration.env_out} :=
     660        Gela.Pass_Utils.Leave_Declarative_Region
     661          (Self.Compilation,
     662           ${Discriminant_Part.env_out:Discriminant_Part_Env_In},
     663           Gela.Elements.Defining_Names.Defining_Name_Access (Names));
    660664.)
    661665
  • trunk/ada-2012/src/asis/asis-extensions-flat_kinds.adb

    r391 r397  
    775775     (Self : in out Visiter;
    776776      Node : not null Gela.Elements.Incomplete_Type_Declarations.
    777         Incomplete_Type_Declaration_Access)
    778    is null;
     777        Incomplete_Type_Declaration_Access);
    779778
    780779   overriding procedure Incomplete_Type_Definition
    781780     (Self : in out Visiter;
    782781      Node : not null Gela.Elements.Incomplete_Type_Definitions.
    783         Incomplete_Type_Definition_Access)
    784    is null;
     782        Incomplete_Type_Definition_Access);
    785783
    786784   overriding procedure Interface_Type_Definition
     
    17561754   end If_Statement;
    17571755
     1756   overriding procedure Incomplete_Type_Declaration
     1757     (Self : in out Visiter;
     1758      Node : not null Gela.Elements.Incomplete_Type_Declarations.
     1759        Incomplete_Type_Declaration_Access)
     1760   is
     1761      pragma Unreferenced (Node);
     1762   begin
     1763      Self.Result := An_Incomplete_Type_Declaration;
     1764   end Incomplete_Type_Declaration;
     1765
     1766   overriding procedure Incomplete_Type_Definition
     1767     (Self : in out Visiter;
     1768      Node : not null Gela.Elements.Incomplete_Type_Definitions.
     1769        Incomplete_Type_Definition_Access)
     1770   is
     1771      pragma Unreferenced (Node);
     1772   begin
     1773      Self.Result := An_Incomplete_Type_Definition;
     1774   end Incomplete_Type_Definition;
     1775
    17581776   overriding procedure Known_Discriminant_Part
    17591777     (Self : in out Visiter;
  • trunk/ada-2012/tests/asis/def_name/list.txt

    r396 r397  
    66./A/A29003A.ADA +3628525875
    77./A/A2A031A.ADA +2866251805
    8 ./A/A33003A.ADA 540739767
     8./A/A33003A.ADA +158333631
    99./A/A34017C.ADA 276208521
    1010./A/A35101B.ADA 4131699407
Note: See TracChangeset for help on using the changeset viewer.