Changeset 385


Ignore:
Timestamp:
Jan 10, 2015, 4:20:32 PM (5 years ago)
Author:
Maxim Reznik
Message:

Generate Gela.Property_Visiters

Location:
trunk/ada-2012
Files:
4 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/semantic/gela-debug_properties.adb

    r384 r385  
    22with Gela.Compilations;
    33with Gela.Elements.Defining_Names;
     4with Gela.Environments;
    45with Gela.Interpretations;
    56with Gela.Lexical_Types;
     7with Gela.Plain_Environments.Debug;
    68with Gela.Property_Visiters;
    79with Gela.Semantic_Types;
     
    1416
    1517      type Property is (Up, Down, Env_In, Env_Out);
    16       pragma Unreferenced (Env_In, Env_Out);
     18      pragma Unreferenced (Env_Out);
    1719
    1820      type Property_Flags is array (Property) of Boolean;
     
    2729         Element : Gela.Elements.Element_Access;
    2830         Value   : Gela.Interpretations.Interpretation_Index);
     31
     32      overriding procedure On_Env_In
     33        (Self    : in out Property_Visiter;
     34         Element : Gela.Elements.Element_Access;
     35         Value   : Gela.Semantic_Types.Env_Index);
    2936
    3037      overriding procedure On_Up
     
    8390         IM.Visit (Value, IV);
    8491      end On_Down;
     92
     93      overriding procedure On_Env_In
     94        (Self    : in out Property_Visiter;
     95         Element : Gela.Elements.Element_Access;
     96         Value   : Gela.Semantic_Types.Env_Index)
     97      is
     98         Comp : constant Gela.Compilations.Compilation_Access :=
     99           Element.Enclosing_Compilation;
     100         Env : constant Gela.Environments.Environment_Set_Access :=
     101           Comp.Context.Environment_Set;
     102      begin
     103         if Self.Flags (Env_In) = False then
     104            return;
     105         end if;
     106
     107         Put_Line
     108           ("env_in:" &
     109              Gela.Semantic_Types.Env_Index'Image (Value));
     110
     111         Gela.Plain_Environments.Debug
     112           (Gela.Plain_Environments.Plain_Environment_Set_Access (Env),
     113            Value);
     114      end On_Env_In;
    85115
    86116      overriding procedure On_Up
  • trunk/ada-2012/tools/ag/ag_driver.adb

    r254 r385  
    2020with AG_Tools.Input;
    2121with AG_Tools.Element_Generators;
     22with AG_Tools.Prop_Visiters;
    2223
    2324procedure AG_Driver is
     
    263264   Generate_2;
    264265   Generate_Visiter;
     266   AG_Tools.Prop_Visiters.Generate (G);
    265267   AG_Tools.Element_Generators.Generate_Elements (G);
    266268   AG_Tools.Element_Generators.Generate_Factory (G);
Note: See TracChangeset for help on using the changeset viewer.