OSDN Git Service

* except.c (TYPE_HASH): Delete.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Aug 2001 18:11:18 +0000 (18:11 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 18 Aug 2001 18:11:18 +0000 (18:11 +0000)
* objc/objc-act.c (HASHFUNCTION): Cast to size_t, not
HOST_WIDE_INT.

* tree.c (TYPE_HASH): Delete.

* tree.h (TYPE_HASH): Define.

ch:
* tree.c (TYPE_HASH): Moved to ../tree.h.

cp:
* decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
GNU_xref_start_scope and GNU_xref_end_scope.

* tree.c (TYPE_HASH): Moved to ../tree.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45004 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ch/ChangeLog
gcc/ch/tree.c
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/tree.c
gcc/except.c
gcc/objc/objc-act.c
gcc/tree.c
gcc/tree.h

index 33aba00..1c9c6a3 100644 (file)
@@ -1,3 +1,14 @@
+2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * except.c (TYPE_HASH): Delete.
+       
+       * objc/objc-act.c (HASHFUNCTION): Cast to size_t, not
+       HOST_WIDE_INT.
+
+       * tree.c (TYPE_HASH): Delete.
+
+       * tree.h (TYPE_HASH): Define.
+
 2001-08-18  Graham Stott  <grahams@redhat.com>
 
        * config/mips/mips.md (adddi3_internal_2+1): Remove contraints from
index 31d6d49..e9f1939 100644 (file)
@@ -1,3 +1,7 @@
+2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * tree.c (TYPE_HASH): Moved to ../tree.h.
+
 2001-08-11  Zack Weinberg  <zackw@panix.com>
 
        * lex.c: Don't include setjmp.h.
index 53485db..0347d66 100644 (file)
@@ -26,10 +26,6 @@ Boston, MA 02111-1307, USA.  */
 #include "ch-tree.h"
 #include "toplev.h"
 
-/* Here is how primitive or already-canonicalized types' 
-   hash codes are made.  */
-#define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777)
-
 extern struct obstack permanent_obstack;
 /* This is special sentinel used to communicate from build_string_type
    to layout_chill_range_type for the index range of a string. */
index 441735e..3fa4455 100644 (file)
@@ -1,3 +1,10 @@
+2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
+       GNU_xref_start_scope and GNU_xref_end_scope.
+
+       * tree.c (TYPE_HASH): Moved to ../tree.h.
+
 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
 
        * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
index c854874..234977a 100644 (file)
@@ -824,7 +824,7 @@ pushlevel (tag_transparent)
     newlevel = make_binding_level ();
 
   push_binding_level (newlevel, tag_transparent, keep_next_level_flag);
-  GNU_xref_start_scope ((HOST_WIDE_INT) newlevel);
+  GNU_xref_start_scope ((size_t) newlevel);
   keep_next_level_flag = 0;
 }
 
@@ -1279,8 +1279,8 @@ poplevel (keep, reverse, functionbody)
      rather than the end.  This hack is no longer used.  */
   my_friendly_assert (keep == 0 || keep == 1, 0);
 
-  GNU_xref_end_scope ((HOST_WIDE_INT) current_binding_level,
-                     (HOST_WIDE_INT) current_binding_level->level_chain,
+  GNU_xref_end_scope ((size_t) current_binding_level,
+                     (size_t) current_binding_level->level_chain,
                      current_binding_level->parm_flag,
                      current_binding_level->keep);
 
@@ -1705,8 +1705,8 @@ poplevel_class ()
        shadowed = TREE_CHAIN (shadowed))
     pop_binding (TREE_PURPOSE (shadowed), TREE_TYPE (shadowed));
 
-  GNU_xref_end_scope ((HOST_WIDE_INT) class_binding_level,
-                     (HOST_WIDE_INT) class_binding_level->level_chain,
+  GNU_xref_end_scope ((size_t) class_binding_level,
+                     (size_t) class_binding_level->level_chain,
                      class_binding_level->parm_flag,
                      class_binding_level->keep);
 
@@ -14168,8 +14168,8 @@ finish_method (decl)
       DECL_CONTEXT (link) = NULL_TREE;
     }
 
-  GNU_xref_end_scope ((HOST_WIDE_INT) current_binding_level,
-                     (HOST_WIDE_INT) current_binding_level->level_chain,
+  GNU_xref_end_scope ((size_t) current_binding_level,
+                     (size_t) current_binding_level->level_chain,
                      current_binding_level->parm_flag,
                      current_binding_level->keep);
 
index 3642890..7759c50 100644 (file)
@@ -411,10 +411,6 @@ break_out_calls (exp)
 
 }
 \f
-/* Here is how primitive or already-canonicalized types' hash
-   codes are made.  MUST BE CONSISTENT WITH tree.c !!! */
-#define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777)
-
 /* Construct, lay out and return the type of methods belonging to class
    BASETYPE and whose arguments are described by ARGTYPES and whose values
    are described by RETTYPE.  If each type exists already, reuse it.  */
index 599f188..12e65e7 100644 (file)
@@ -1475,9 +1475,6 @@ duplicate_eh_regions (ifun, map)
 }
 
 \f
-/* ??? Move from tree.c to tree.h.  */
-#define TYPE_HASH(TYPE) ((size_t) (TYPE) & 0777777)
-
 static int
 t2r_eq (pentry, pdata)
      const PTR pentry;
index c0b14b5..3ff7045 100644 (file)
@@ -5481,7 +5481,7 @@ build_ivar_reference (id)
 #define SIZEHASHTABLE          257
 
 /* make positive */
-#define HASHFUNCTION(key)      ((HOST_WIDE_INT) key & 0x7fffffff)
+#define HASHFUNCTION(key)      ((size_t) key & 0x7fffffff)
 
 static void
 hash_init ()
index 9ce1905..0e87251 100644 (file)
@@ -136,10 +136,6 @@ static int next_decl_uid;
 /* Unique id for next type created.  */
 static int next_type_uid = 1;
 
-/* Here is how primitive or already-canonicalized types' hash
-   codes are made.  */
-#define TYPE_HASH(TYPE) ((unsigned long) (TYPE) & 0777777)
-
 /* Since we cannot rehash a type after it is in the table, we have to
    keep the hash code.  */
 
index e5c0c2a..5298bc3 100644 (file)
@@ -327,6 +327,10 @@ extern void tree_class_check_failed PARAMS ((const tree, int,
    In VECTOR_TYPE nodes, this is the type of the elements.  */
 #define TREE_TYPE(NODE) ((NODE)->common.type)
 
+/* Here is how primitive or already-canonicalized types' hash codes
+   are made.  */
+#define TYPE_HASH(TYPE) ((size_t) (TYPE) & 0777777)
+
 /* Nodes are chained together for many purposes.
    Types are chained together to record them for being output to the debugger
    (see the function `chain_type').