- moved pass constructors from irtools to irpass
[libfirm] / ir / external / read_t.h
index 5128069..e58c8db 100644 (file)
@@ -1,58 +1,51 @@
-/* -*- c -*- */
 /*
- * Project:     libFIRM
- * File name:   ir/external/read.h
- * Purpose:     Read descriptions of external effects
- * Author:      Florian
- * Modified by: Boris Boesler
- * Created:     11.10.2004
- * CVS-ID:      $Id$
- * Copyright:   (c) 1999-2004 Universität Karlsruhe
- * Licence:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
  */
 
-#ifndef _READ_T_H_
-#define _READ_T_H_
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include <libxml/xmlmemory.h>
-#include <libxml/parser.h>
-#include <libxml/encoding.h>
-
-#include "type.h"
-#include "entity.h"
-#include "ident.h"
-
-# define MY_ENCODING "ISO-8859-1"
-
-# define CHECK(ptr,msg)     assert (ptr && msg)
-
-# define NODE_NAME(n, m) (0 == xmlStrcmp (n->name, (const xmlChar*) #m))
-# define CHECK_NAME(n, m) assert (0 == xmlStrcmp (n->name, (const xmlChar*) #m))
-
-# define NEW(T)     (T*) malloc (sizeof (T))
+/**
+ * @file
+ * @brief    Read descriptions of external effects, private header
+ * @author   Florian, Boris Boesler
+ * @date     11.10.2004
+ * @version  $Id$
+ */
+#ifndef FIRM_EXTERNAL_READ_T_H
+#define FIRM_EXTERNAL_READ_T_H
 
+#include "firm_types.h"
 
 /* first, the xml structures */
 
 typedef struct type_str
 {
-  const ident *type_ident;
-  const ident *id;              /* id for references */
-  type *f_tp;                   /* firm type */
+  ident *type_ident;
+  ident *id;                    /* id for references */
+  ir_type *f_tp;                /* firm type */
   struct type_str *prev;
 } type_t;
 
 typedef struct entity_str
 {
-  const ident *ent_ident;        /* name of entity */
-  const ident *tp_ident;         /* name of type/class */
-  const ident *id;               /* id for references */
-  const ident *owner;            /* id of owner */
-  entity *f_ent;                 /* firm entity */
+  ident *ent_ident;            /* name of entity */
+  ident *tp_ident;             /* name of type/class */
+  ident *id;                   /* id for references */
+  ident *owner;                /* id of owner */
+  ir_entity *f_ent;            /* firm entity */
   struct entity_str *prev;
 } entity_t;
 
@@ -74,7 +67,7 @@ typedef enum eff_node_kind {
 
 typedef struct arg_str
 {
-  const ident *type_ident;
+  ident *type_ident;
   int num;
 } arg_t;
 
@@ -90,28 +83,28 @@ typedef struct select_str
 
 typedef struct load_str
 {
-  const ident *ptrrefid;     /* id of valref node enclosed in select, or -1 */
+  ident *ptrrefid;     /* id of valref node enclosed in select, or -1 */
   entity_t *ent;
 } load_t;
 
 typedef struct store_str
 {
-  const ident *ptrrefid;     /* id of ptr valref node enclosed in select, or -1 */
-  const ident *valrefid;     /* id of val valref node enclosed in select, or -1 */
+  ident *ptrrefid;     /* id of ptr valref node enclosed in select, or -1 */
+  ident *valrefid;     /* id of val valref node enclosed in select, or -1 */
   entity_t *ent;
 } store_t;
 
 typedef struct alloc_str
 {
-  const ident *tp_id;
+  ident *tp_id;
 } alloc_t;
 
 typedef struct call_str
 {
-  const ident *valrefid;     /* id of enclosed valref node, or -1 */
-  entity_t *ent;             /* called entity */
+  ident *valrefid;     /* id of enclosed valref node, or -1 */
+  entity_t *ent;       /* called entity */
   int n_args;
-  const ident **args;
+  ident **args;
 } call_t;
 
 typedef struct unknown_str
@@ -122,25 +115,25 @@ typedef struct unknown_str
 typedef struct join_str
 {
   int n_ins;
-  const ident **ins;
+  ident **ins;
 } join_t;
 
 typedef struct ret_str
 {
-  const ident *ret_id;
+  ident *ret_id;
 } ret_t;                     /* returned value, or NO_ID */
 
 typedef struct raise_str
 {
-  const ident *valref;       /* what was that one for? */
-  const ident *tp_id;
+  ident *valref;       /* what was that one for? */
+  ident *tp_id;
 } raise_t;
 
 /* dummy type for all other effects */
 typedef struct eff_str
 {
   eff_node_kind_t kind;
-  const ident *id;           /* identifier to access this node */
+  ident *id;           /* identifier to access this node */
   union {
     arg_t arg;
     valref_t valref;
@@ -160,8 +153,8 @@ typedef struct eff_str
 
 typedef struct proc_str
 {
-  const ident *proc_ident;   /* name of procedure */
-  const ident *ownerid;
+  ident *proc_ident;         /* name of procedure */
+  ident *ownerid;
   int n_effs;
   eff_t **effs;
   struct proc_str *next;
@@ -171,18 +164,30 @@ typedef struct proc_str
 
 typedef struct mod_str
 {
-  const ident *id;
+  ident *id;
   type_t *types;             /* types in module *//* @@@ TODO hash set */
   entity_t *entities;        /* entities in module *//* @@@ TODO hash set */
   proc_t *procs;             /* methods with effects */
   struct mod_str *next;      /* unused - only one module possible */
 } module_t;
 
-
-#endif /* defined _READ_T_H_ */
+#endif
 
 /*
   $Log$
+  Revision 1.5  2007/02/02 12:38:35  matze
+  entity is ir_entity now
+
+  Revision 1.4  2006/12/15 12:37:40  matze
+  fix warnings
+
+  Revision 1.3  2006/06/09 11:26:35  firm
+  renamed type to ir_type
+
+  Revision 1.2  2004/12/10 15:14:16  beck
+  Removed unused header files
+  move xml macros to read.c, freeing the header from libxml depency
+
   Revision 1.1  2004/10/25 13:52:24  boesler
   seperated read.h (public interface) and read_t.h (types)