i386-protos.h (x86_emit_floatuns): Declare.
[official-gcc.git] / gcc / ada / elists.h
blobdcfae8c80e5ca0144e1d4418e7d988c853cbcb8a
1 /****************************************************************************
2 * *
3 * GNAT COMPILER COMPONENTS *
4 * *
5 * E L I S T S *
6 * *
7 * C Header File *
8 * *
9 * *
10 * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
11 * *
12 * GNAT is free software; you can redistribute it and/or modify it under *
13 * terms of the GNU General Public License as published by the Free Soft- *
14 * ware Foundation; either version 2, or (at your option) any later ver- *
15 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
16 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
18 * for more details. You should have received a copy of the GNU General *
19 * Public License distributed with GNAT; see file COPYING. If not, write *
20 * to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
21 * MA 02111-1307, USA. *
22 * *
23 * GNAT was originally developed by the GNAT team at New York University. *
24 * Extensive contributions were provided by Ada Core Technologies Inc. *
25 * *
26 ****************************************************************************/
28 /* This is the C header corresponding to the Ada package specification for
29 Elists. It also contains the implementations of inlined functions from the
30 package body for Elists. It was generated manually from elists.ads and
31 elists.adb and must be kept synchronized with changes in these files.
33 Note that only routines for reading the tree are included, since the
34 tree transformer is not supposed to modify the tree in any way. */
36 /* The following are the structures used to hold element lists */
38 struct Elist_Header
40 Elmt_Id first;
41 Elmt_Id last;
44 struct Elmt_Item
46 Node_Id node;
47 Int next;
50 /* The element list headers and element descriptors themselves are stored in
51 two arrays. The pointers to these arrays are passed as a parameter to the
52 tree transformer procedure and stored in the global variables Elists_Ptr
53 and Elmts_Ptr. */
55 extern struct Elist_Header *Elists_Ptr;
56 extern struct Elmt_Item *Elmts_Ptr;
58 /* Element List Access Functions: */
60 static Node_Id Node PARAMS ((Elmt_Id));
61 static Elmt_Id First_Elmt PARAMS ((Elist_Id));
62 static Elmt_Id Last_Elmt PARAMS ((Elist_Id));
63 static Elmt_Id Next_Elmt PARAMS ((Elmt_Id));
64 static Boolean Is_Empty_Elmt_List PARAMS ((Elist_Id));
66 INLINE Node_Id
67 Node (Elmt)
68 Elmt_Id Elmt;
70 return Elmts_Ptr[Elmt - First_Elmt_Id].node;
73 INLINE Elmt_Id
74 First_Elmt (List)
75 Elist_Id List;
77 return Elists_Ptr[List - First_Elist_Id].first;
80 INLINE Elmt_Id
81 Last_Elmt (List)
82 Elist_Id List;
84 return Elists_Ptr[List - First_Elist_Id].last;
87 INLINE Elmt_Id
88 Next_Elmt (Node)
89 Elmt_Id Node;
91 Int N = Elmts_Ptr[Node - First_Elmt_Id].next;
93 if (IN (N, Elist_Range))
94 return No_Elmt;
95 else
96 return N;
99 INLINE Boolean
100 Is_Empty_Elmt_List (Id)
101 Elist_Id Id;
103 return Elists_Ptr[Id - First_Elist_Id].first == No_Elmt;