PR rtl-optimization/82913
[official-gcc.git] / gcc / ada / treeprs.adt
blobb65d6c26b58d728cd2acaa075b062ccf9a6fcdf6
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              T R E E P R S                               --
6 --                                                                          --
7 --                             T e m p l a t e                              --
8 --                                                                          --
9 --          Copyright (C) 1992-2013, Free Software Foundation, Inc.         --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 3,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT; see file COPYING3.  If not, go to --
19 -- http://www.gnu.org/licenses for a complete copy of the license.          --
20 --                                                                          --
21 -- GNAT was originally developed  by the GNAT team at  New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
23 --                                                                          --
24 ------------------------------------------------------------------------------
25 --  This file is a template used as input to the utility program XTreeprs,
26 --  which reads this template, and the spec of Sinfo (sinfo.ads) and generates
27 --  the spec for the Treeprs package (file treeprs.ads)
29 --  This package contains the declaration of the string used by the Tree_Print
30 --  package. It must be updated whenever the arrangements of the field names
31 --  in package Sinfo is changed. The utility program XTREEPRS is used to
32 --  do this update correctly using the template treeprs.adt as input.
34 with Sinfo; use Sinfo;
36 package Treeprs is
38    --------------------------------
39    -- String Data for Node Print --
40    --------------------------------
42    --  String data for print out. The Pchars array is a long string with the
43    --  the entry for each node type consisting of a single blank, followed by
44    --  a series of entries, one for each Op or Flag field used for the node.
45    --  Each entry has a single character which identifies the field, followed
46    --  by the synonym name. The starting location for a given node type is
47    --  found from the corresponding entry in the Pchars_Pos_Array.
49    --  The following characters identify the field. These are characters which
50    --  could never occur in a field name, so they also mark the end of the
51    --  previous name.
53    --  Note the following definitions do not include Flag0. This will have to
54    --  be addressed if we ever need to use Flag0 (it's not currently used).
56    subtype Fchar is Character range '#' .. '9';
58    F_Field1     : constant Fchar := '#'; -- Character'Val (16#23#)
59    F_Field2     : constant Fchar := '$'; -- Character'Val (16#24#)
60    F_Field3     : constant Fchar := '%'; -- Character'Val (16#25#)
61    F_Field4     : constant Fchar := '&'; -- Character'Val (16#26#)
62    F_Field5     : constant Fchar := '''; -- Character'Val (16#27#)
63    F_Flag1      : constant Fchar := '('; -- Character'Val (16#28#)
64    F_Flag2      : constant Fchar := ')'; -- Character'Val (16#29#)
65    F_Flag3      : constant Fchar := '*'; -- Character'Val (16#2A#)
66    F_Flag4      : constant Fchar := '+'; -- Character'Val (16#2B#)
67    F_Flag5      : constant Fchar := ','; -- Character'Val (16#2C#)
68    F_Flag6      : constant Fchar := '-'; -- Character'Val (16#2D#)
69    F_Flag7      : constant Fchar := '.'; -- Character'Val (16#2E#)
70    F_Flag8      : constant Fchar := '/'; -- Character'Val (16#2F#)
71    F_Flag9      : constant Fchar := '0'; -- Character'Val (16#30#)
72    F_Flag10     : constant Fchar := '1'; -- Character'Val (16#31#)
73    F_Flag11     : constant Fchar := '2'; -- Character'Val (16#32#)
74    F_Flag12     : constant Fchar := '3'; -- Character'Val (16#33#)
75    F_Flag13     : constant Fchar := '4'; -- Character'Val (16#34#)
76    F_Flag14     : constant Fchar := '5'; -- Character'Val (16#35#)
77    F_Flag15     : constant Fchar := '6'; -- Character'Val (16#36#)
78    F_Flag16     : constant Fchar := '7'; -- Character'Val (16#37#)
79    F_Flag17     : constant Fchar := '8'; -- Character'Val (16#38#)
80    F_Flag18     : constant Fchar := '9'; -- Character'Val (16#39#)
82    --  Note this table does not include entity field and flags whose access
83    --  functions are in Einfo (these are handled by the Print_Entity_Info
84    --  procedure in Treepr, which uses the routines in Einfo to get the proper
85    --  symbolic information). In addition, the following fields are handled by
86    --  Treepr, and do not appear in the Pchars array:
88    --    Analyzed
89    --    Cannot_Be_Constant
90    --    Chars
91    --    Comes_From_Source
92    --    Error_Posted
93    --    Etype
94    --    Is_Controlling_Actual
95    --    Is_Overloaded
96    --    Is_Static_Expression
97    --    Left_Opnd
98    --    Must_Check_Expr
99    --    Must_Not_Freeze
100    --    No_Overflow_Expr
101    --    Paren_Count
102    --    Raises_Constraint_Error
103    --    Right_Opnd
105 !!TEMPLATE INSERTION POINT
107 end Treeprs;