Mark memory using nodes with "uses_memory".
[libfirm] / ir / ident / ident_t.h
index ae48cd9..74332f7 100644 (file)
@@ -1,50 +1,45 @@
 /*
- * Project:     libFIRM
- * File name:   ir/common/ident_t.h
- * Purpose:     Hash table to store names -- private header.
- * Author:      Goetz Lindenmaier
- * Modified by:
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 1999-2003 Universität Karlsruhe
- * Licence:     This file 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 _IDENT_T_H_
-# define _IDENT_T_H_
-
-# include "ident.h"
-# include "set.h"
-
-void id_init (int initial_n_idents);
-void id_finish (void);
-
-#define ID_HASH(str, len) \
-  (((  ((unsigned char *)(str))[0] * 33 \
-     + ((unsigned char *)(str))[(len)>>1]) * 31 \
-    + ((unsigned char *)(str))[(len)-1]) * 9 \
-   + (len))
-
-
-/* ------------------------ *
- * inline functions         *
- * ------------------------ */
-extern set *__id_set;
+/**
+ * @file
+ * @brief    Hash table to store names -- private header.
+ * @author   Goetz Lindenmaier
+ */
+#ifndef FIRM_IDENT_IDENT_T_H
+#define FIRM_IDENT_IDENT_T_H
 
-static INLINE ident *
-__id_from_str(const char *str, int len)
-{
-  assert(len > 0);
-  return set_hinsert0(__id_set, str, len, ID_HASH(str, len));
-}
+#include "ident.h"
 
-static INLINE const char * __get_id_str(ident *id) { return (const char *)id->dptr; }
+/**
+ * Initialize the ident module.
+ */
+void init_ident(void);
 
-static INLINE int __get_id_strlen(ident *id) { return id->size; }
+/**
+ * Finishes the ident module, frees all entries.
+ */
+void finish_ident(void);
 
+/** initializes the name mangling code */
+void firm_init_mangle(void);
 
-#define id_from_str(str, len)    __id_from_str(str, len)
-#define get_id_str(id)           __get_id_str(id)
-#define get_id_strlen(id)        __get_id_strlen(id)
+void firm_finish_mangle(void);
 
-# endif /* _IDENT_T_H_ */
+#endif