1------------------------------------------------------------------------------
2--                                                                          --
3--                         GNAT COMPILER COMPONENTS                         --
4--                                                                          --
5--                                S T A N D                                 --
6--                                                                          --
7--                                 B o d y                                  --
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.                                     --
17--                                                                          --
18-- As a special exception under Section 7 of GPL version 3, you are granted --
19-- additional permissions described in the GCC Runtime Library Exception,   --
20-- version 3.1, as published by the Free Software Foundation.               --
21--                                                                          --
22-- You should have received a copy of the GNU General Public License and    --
23-- a copy of the GCC Runtime Library Exception along with this program;     --
24-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
25-- <http://www.gnu.org/licenses/>.                                          --
26--                                                                          --
27-- GNAT was originally developed  by the GNAT team at  New York University. --
28-- Extensive contributions were provided by Ada Core Technologies Inc.      --
29--                                                                          --
30------------------------------------------------------------------------------
31
32with System;  use System;
33with Tree_IO; use Tree_IO;
34
35package body Stand is
36
37   ---------------
38   -- Tree_Read --
39   ---------------
40
41   procedure Tree_Read is
42   begin
43      Tree_Read_Data (Standard_Entity'Address,
44                       Standard_Entity_Array_Type'Size / Storage_Unit);
45
46      Tree_Read_Int (Int (Standard_Package_Node));
47      Tree_Read_Int (Int (Last_Standard_Node_Id));
48      Tree_Read_Int (Int (Last_Standard_List_Id));
49      Tree_Read_Int (Int (Standard_Void_Type));
50      Tree_Read_Int (Int (Standard_Exception_Type));
51      Tree_Read_Int (Int (Standard_A_String));
52      Tree_Read_Int (Int (Any_Id));
53      Tree_Read_Int (Int (Any_Type));
54      Tree_Read_Int (Int (Any_Access));
55      Tree_Read_Int (Int (Any_Array));
56      Tree_Read_Int (Int (Any_Boolean));
57      Tree_Read_Int (Int (Any_Character));
58      Tree_Read_Int (Int (Any_Composite));
59      Tree_Read_Int (Int (Any_Discrete));
60      Tree_Read_Int (Int (Any_Fixed));
61      Tree_Read_Int (Int (Any_Integer));
62      Tree_Read_Int (Int (Any_Numeric));
63      Tree_Read_Int (Int (Any_Real));
64      Tree_Read_Int (Int (Any_Scalar));
65      Tree_Read_Int (Int (Any_String));
66      Tree_Read_Int (Int (Universal_Integer));
67      Tree_Read_Int (Int (Universal_Real));
68      Tree_Read_Int (Int (Universal_Fixed));
69      Tree_Read_Int (Int (Standard_Integer_8));
70      Tree_Read_Int (Int (Standard_Integer_16));
71      Tree_Read_Int (Int (Standard_Integer_32));
72      Tree_Read_Int (Int (Standard_Integer_64));
73      Tree_Read_Int (Int (Standard_Unsigned_64));
74      Tree_Read_Int (Int (Standard_Short_Short_Unsigned));
75      Tree_Read_Int (Int (Standard_Short_Unsigned));
76      Tree_Read_Int (Int (Standard_Unsigned));
77      Tree_Read_Int (Int (Standard_Long_Unsigned));
78      Tree_Read_Int (Int (Standard_Long_Long_Unsigned));
79      Tree_Read_Int (Int (Abort_Signal));
80      Tree_Read_Int (Int (Standard_Op_Rotate_Left));
81      Tree_Read_Int (Int (Standard_Op_Rotate_Right));
82      Tree_Read_Int (Int (Standard_Op_Shift_Left));
83      Tree_Read_Int (Int (Standard_Op_Shift_Right));
84      Tree_Read_Int (Int (Standard_Op_Shift_Right_Arithmetic));
85   end Tree_Read;
86
87   ----------------
88   -- Tree_Write --
89   ----------------
90
91   procedure Tree_Write is
92   begin
93      Tree_Write_Data (Standard_Entity'Address,
94                       Standard_Entity_Array_Type'Size / Storage_Unit);
95
96      Tree_Write_Int (Int (Standard_Package_Node));
97      Tree_Write_Int (Int (Last_Standard_Node_Id));
98      Tree_Write_Int (Int (Last_Standard_List_Id));
99      Tree_Write_Int (Int (Standard_Void_Type));
100      Tree_Write_Int (Int (Standard_Exception_Type));
101      Tree_Write_Int (Int (Standard_A_String));
102      Tree_Write_Int (Int (Any_Id));
103      Tree_Write_Int (Int (Any_Type));
104      Tree_Write_Int (Int (Any_Access));
105      Tree_Write_Int (Int (Any_Array));
106      Tree_Write_Int (Int (Any_Boolean));
107      Tree_Write_Int (Int (Any_Character));
108      Tree_Write_Int (Int (Any_Composite));
109      Tree_Write_Int (Int (Any_Discrete));
110      Tree_Write_Int (Int (Any_Fixed));
111      Tree_Write_Int (Int (Any_Integer));
112      Tree_Write_Int (Int (Any_Numeric));
113      Tree_Write_Int (Int (Any_Real));
114      Tree_Write_Int (Int (Any_Scalar));
115      Tree_Write_Int (Int (Any_String));
116      Tree_Write_Int (Int (Universal_Integer));
117      Tree_Write_Int (Int (Universal_Real));
118      Tree_Write_Int (Int (Universal_Fixed));
119      Tree_Write_Int (Int (Standard_Integer_8));
120      Tree_Write_Int (Int (Standard_Integer_16));
121      Tree_Write_Int (Int (Standard_Integer_32));
122      Tree_Write_Int (Int (Standard_Integer_64));
123      Tree_Write_Int (Int (Standard_Unsigned_64));
124      Tree_Write_Int (Int (Standard_Short_Short_Unsigned));
125      Tree_Write_Int (Int (Standard_Short_Unsigned));
126      Tree_Write_Int (Int (Standard_Unsigned));
127      Tree_Write_Int (Int (Standard_Long_Unsigned));
128      Tree_Write_Int (Int (Standard_Long_Long_Unsigned));
129      Tree_Write_Int (Int (Abort_Signal));
130      Tree_Write_Int (Int (Standard_Op_Rotate_Left));
131      Tree_Write_Int (Int (Standard_Op_Rotate_Right));
132      Tree_Write_Int (Int (Standard_Op_Shift_Left));
133      Tree_Write_Int (Int (Standard_Op_Shift_Right));
134      Tree_Write_Int (Int (Standard_Op_Shift_Right_Arithmetic));
135   end Tree_Write;
136
137end Stand;
138