removed
[libfirm] / ir / tr / type.h
index a288b4a..b8d0fd6 100644 (file)
@@ -1,5 +1,13 @@
 /*
- * (C) 2001 by Universitaet Karlsruhe
+ * Project:     libFIRM
+ * File name:   ir/tr/type.h
+ * Purpose:     Representation of types.
+ * Author:      Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 2001-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
  */
 
 /**
  *  on the level of the programming language, modes at the level of
  *  the target processor.
  *
- * @see  tpop.h
+ *  @see  tpop.h
  */
 
-/* $Id$ */
-
 # ifndef _TYPE_H_
 # define _TYPE_H_
 
@@ -396,15 +402,15 @@ void    remove_class_supertype(type *clss, type *supertype);
 
 /** This enumeration flags the peculiarity of entities and types. */
 typedef enum peculiarity {
-  description,     /**< Represents only a description.  The entity/type is never
-                     allocated, no code/data exists for this entity/type. */
-  inherited,       /**< Describes explicitly that other entities are
-                     inherited to the owner of this entity.
-                     Overwrites must refer to at least one other
-                     entity.  If this is a method entity there exists
-                     no irg for this entity, only for one of the
-                     overwritten ones. */
-  existent         /**< The entity/type (can) exist. */
+  peculiarity_description,     /**< Represents only a description.  The entity/type is never
+                                   allocated, no code/data exists for this entity/type. */
+  peculiarity_inherited,       /**< Describes explicitly that other entities are
+                                   inherited to the owner of this entity.
+                                   Overwrites must refer to at least one other
+                                   entity.  If this is a method entity there exists
+                                   no irg for this entity, only for one of the
+                                   overwritten ones. */
+  peculiarity_existent         /**< The entity/type (can) exist. */
 } peculiarity;
 
 /* The peculiarity of the class.  The enumeration peculiarity is defined
@@ -648,7 +654,10 @@ void  set_array_lower_bound  (type *array, int dimension, ir_node *lower_bound);
 void  set_array_lower_bound_int (type *array, int dimension, int lower_bound);
 void  set_array_upper_bound  (type *array, int dimension, ir_node *upper_bound);
 void  set_array_upper_bound_int (type *array, int dimension, int lower_bound);
+/* returns true if lower bound != Unknown */
+int       has_array_lower_bound  (type *array, int dimension);
 ir_node * get_array_lower_bound  (type *array, int dimension);
+int       has_array_upper_bound  (type *array, int dimension);
 ir_node * get_array_upper_bound  (type *array, int dimension);
 
 void set_array_order (type *array, int dimension, int order);
@@ -707,14 +716,21 @@ bool    is_enumeration_type     (type *enumeration);
 /**
  * @page pointer_type  Representation of a pointer type
  *
+ * The mode of the pointer type must be a mode_reference.
+ *
  * Pointer types:
  * - points_to:      The type of the entity this pointer points to.
  */
-/** Creates a new type pointer. */
-type *new_type_pointer           (ident *name, type *points_to);
 
-/** Creates a new type pointer with debug information. */
-type *new_d_type_pointer         (ident *name, type *points_to, dbg_info* db);
+/** Creates a new type pointer with mode mode_p. */
+#define new_type_pointer(N, P) new_type_pointer_mode(N, P, mode_P)
+//type *new_type_pointer           (ident *name, type *points_to);
+
+/** Creates a new type pointer with given pointer mode. */
+type *new_type_pointer_mode      (ident *name, type *points_to, ir_mode *ptr_mode);
+
+/** Creates a new type pointer given pointer mode and with debug information. */
+type *new_d_type_pointer         (ident *name, type *points_to, ir_mode *ptr_mode, dbg_info* db);
 
 /* --- manipulate fields of type_pointer --- */