OSDN Git Service

* cp-tree.h (lang_decl_flags): Remove init_priority.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Oct 2002 16:07:32 +0000 (16:07 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 31 Oct 2002 16:07:32 +0000 (16:07 +0000)
(lang_decl): Add delta.
(GLOBAL_INIT_PRIORITY): Remove.
(THUNK_DELTA): Revise definition.
* decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
* dump.c (cp_dump_tree): Don't dump it.

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

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/dump.c

index d53fd4d..0f7653c 100644 (file)
@@ -1,3 +1,12 @@
+2002-10-31  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.h (lang_decl_flags): Remove init_priority.
+       (lang_decl): Add delta.
+       (GLOBAL_INIT_PRIORITY): Remove.
+       (THUNK_DELTA): Revise definition.
+       * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
+       * dump.c (cp_dump_tree): Don't dump it.
+
 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/8160
index d9bde84..f74c58e 100644 (file)
@@ -1747,10 +1747,6 @@ struct lang_decl_flags GTY(())
     /* For VAR_DECL in function, this is DECL_DISCRIMINATOR.  */
     int discriminator;
 
-    /* In a namespace-scope FUNCTION_DECL, this is
-       GLOBAL_INIT_PRIORITY.  */
-    int init_priority;
-
     /* In a FUNCTION_DECL for which DECL_THUNK_P holds, this is
        THUNK_VCALL_OFFSET.  */
     tree GTY((tag ("2"))) vcall_offset;
@@ -1775,6 +1771,10 @@ struct lang_decl GTY(())
        /* In a FUNCTION_DECL, this is DECL_CLONED_FUNCTION.  */
        tree cloned_function;
        
+       /* In a FUNCTION_DECL for which THUNK_P holds, this is
+          THUNK_DELTA.  */
+       HOST_WIDE_INT delta;
+
        /* In an overloaded operator, this is the value of
           DECL_OVERLOADED_OPERATOR_P.  */
        enum tree_code operator_code;
@@ -2689,13 +2689,6 @@ struct lang_decl GTY(())
 #define DECL_GLOBAL_DTOR_P(NODE) \
   (DECL_LANG_SPECIFIC (NODE)->decl_flags.global_dtor_p)
 
-/* If DECL_GLOBAL_CTOR_P or DECL_GLOBAL_DTOR_P holds, this macro
-   returns the initialization priority for the function.  Constructors
-   with lower numbers should be run first.  Destructors should be run
-   in the reverse order of constructors.  */
-#define GLOBAL_INIT_PRIORITY(NODE) \
-  (LANG_DECL_U2_CHECK (NODE, 1)->init_priority)
-
 /* Accessor macros for C++ template decl nodes.  */
 
 /* The DECL_TEMPLATE_PARMS are a list.  The TREE_PURPOSE of each node
@@ -2935,7 +2928,8 @@ struct lang_decl GTY(())
 
 /* An integer indicating how many bytes should be subtracted from the
    `this' pointer when this function is called.  */
-#define THUNK_DELTA(DECL) (DECL_CHECK (DECL)->decl.u1.i)
+#define THUNK_DELTA(DECL) \
+  (DECL_LANG_SPECIFIC (DECL)->u.f.delta)
 
 /* A tree indicating how many bytes should be subtracted from the
    vtable for the `this' pointer to find the vcall offset.  (The vptr
index afa65a0..9461174 100644 (file)
@@ -2144,7 +2144,6 @@ start_objects (method_type, initp)
   else
     DECL_GLOBAL_DTOR_P (current_function_decl) = 1;
   DECL_LANG_SPECIFIC (current_function_decl)->decl_flags.u2sel = 1;
-  GLOBAL_INIT_PRIORITY (current_function_decl) = initp;
 
   body = begin_compound_stmt (/*has_no_scope=*/0);
 
index 0b404a1..c4472b0 100644 (file)
@@ -323,7 +323,6 @@ cp_dump_tree (dump_info, t)
                dump_string (di, "global init");
              if (DECL_GLOBAL_DTOR_P (t))
                dump_string (di, "global fini");
-             dump_int (di, "prio", GLOBAL_INIT_PRIORITY (t));
            }
          if (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (t))
            dump_string (di, "pseudo tmpl");