/*
* Project: libFIRM
- * File name: ir/tr/type.c
+ * File name: ir/tr/type_identify.c
* Purpose: Representation of types.
* Author: Goetz Lindenmaier
* Modified by:
*/
/**
- * file type.c - implementation of the datastructure to hold
- * type information.
+ * @file type_identify.c
+ *
* (C) 2004 by Universitaet Karlsruhe
* Goetz Lindenmaier
*
#include "irprog_t.h"
#include "mangle.h"
#include "pset.h"
+#include "irtools.h"
/* The hash set for types. */
static pset *type_table = NULL;
static compare_types_func_t *compare_types_func;
int compare_names (const void *tp1, const void *tp2) {
- type *t1 = (type *) tp1;
- type *t2 = (type *) tp2;
+ ir_type *t1 = (ir_type *) tp1;
+ ir_type *t2 = (ir_type *) tp2;
return (t1 != t2 &&
(t1->type_op != t2->type_op ||
/* stuff for comparing two types. */
int compare_strict (const void *tp1, const void *tp2) {
- type *t1 = (type *) tp1;
- type *t2 = (type *) tp2;
+ ir_type *t1 = (ir_type *) tp1;
+ ir_type *t2 = (ir_type *) tp2;
return t1 != t2;
}
/* stuff to compute a hash value for a type. */
-int firm_hash_name (type *tp) {
- unsigned h = (unsigned)tp->type_op;
- h = 9*h + (unsigned)tp->name;
+int firm_hash_name (ir_type *tp) {
+ unsigned h = (unsigned)PTR_TO_INT(tp->type_op);
+ h = 9*h + (unsigned)PTR_TO_INT(tp->name);
return h;
}
/* The function that hashes a type. */
-type *mature_type(type *tp) {
- type *o;
+ir_type *mature_type(ir_type *tp) {
+ ir_type *o;
assert(type_table);
/* The function that hashes a type. */
-type *mature_type_free(type *tp) {
- type *o;
+ir_type *mature_type_free(ir_type *tp) {
+ ir_type *o;
assert(type_table);
}
/* The function that hashes a type. */
-type *mature_type_free_entities(type *tp) {
- type *o;
+ir_type *mature_type_free_entities(ir_type *tp) {
+ ir_type *o;
assert(type_table);