Bugfixes
[libfirm] / ir / ana2 / pto_name.h
1 /* -*- c -*- */
2
3 /*
4   Project:     libFIRM
5   File name:   ir/ana/pto_name.h
6   Purpose:     Names for abstract objects
7   Author:      Florian
8   Modified by:
9   Created:     Sat Nov 13 19:35:27 CET 2004
10   CVS-ID:      $Id$
11   Copyright:   (c) 1999-2004 Universität Karlsruhe
12   Licence:     This file is protected by the GPL -  GNU GENERAL PUBLIC LICENSE.
13 */
14
15
16 # ifndef _PTO_NAME_
17 # define _PTO_NAME_
18
19 # include "pto_comp.h"          /* for pto_t */
20 # include "irnode.h"
21 # include "type.h"
22 # include "qset.h"
23
24 /* ===================================================
25    Global Defines:
26    =================================================== */
27
28 /* ===================================================
29    Global Data Types:
30    =================================================== */
31 typedef enum desc_kind_enum {
32   none,
33   object,
34   array
35 } desc_kind_t;
36
37 /* abstract super class for all descriptors */
38 typedef struct desc_str
39 {
40   desc_kind_t kind;
41   type *tp;
42   ir_node *node;                /* allocation node */
43   struct desc_str *prev;        /* linked list */
44 } desc_t;
45
46 /* object descriptor */
47 typedef struct obj_desc_str
48 {
49   desc_kind_t kind;
50   type *tp;
51   ir_node *node;                /* allocation node */
52   struct desc_str *prev;        /* linked list */
53
54   int n_fields;
55   entity **fields;
56   qset_t **values;
57 } obj_desc_t;
58
59 /* array descriptor */
60 typedef struct arr_desc_str
61 {
62   desc_kind_t kind;
63   type *tp;
64   ir_node *node;                /* allocation node */
65   struct desc_str *prev;        /* linked list */
66
67   qset_t *value;
68 } arr_desc_t;
69
70 /* ===================================================
71    Global Prototypes:
72    =================================================== */
73 /* get a new descriptor for the given type at the given node */
74 desc_t *new_name (type*, ir_node*);
75
76 /* get a new descriptor for the given (presumably static) entity */
77 desc_t *new_ent_name (entity*);
78
79 /* Initialise the name module */
80 void pto_name_init (void);
81
82 /* Cleanup the name module */
83 void pto_name_cleanup (void);
84
85 /* ===================================================
86    Global Variables:
87    =================================================== */
88
89
90 # endif /* not defined _PTO_NAME_ */
91
92
93 \f
94 /*
95   $Log$
96   Revision 1.2  2004/11/24 14:53:56  liekweg
97   Bugfixes
98
99   Revision 1.1  2004/11/18 16:37:34  liekweg
100   rewritten
101
102
103 */