OSDN Git Service

2009-09-13 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / objc / objc-act.h
index 47ee83e..f0970f9 100644 (file)
@@ -1,12 +1,12 @@
 /* Declarations for objc-act.c.
-   Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004, 2005
+   Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GCC is distributed in the hope that it will be useful,
@@ -15,25 +15,25 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
 
 #ifndef GCC_OBJC_ACT_H
 #define GCC_OBJC_ACT_H
 
 /* For enum gimplify_status */
-#include "tree-gimple.h"
+#include "gimple.h"
 
 /*** Language hooks ***/
 
 bool objc_init (void);
 const char *objc_printable_name (tree, int);
-tree objc_get_callee_fndecl (tree);
 void objc_finish_file (void);
 tree objc_fold_obj_type_ref (tree, tree);
-int objc_types_compatible_p (tree, tree);
-enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
+int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *);
+tree objc_eh_runtime_type (tree);
+tree objc_eh_personality (void);
 
 /* NB: The remaining public functions are prototyped in c-common.h, for the
    benefit of stub-objc.c and objc-act.c.  */
@@ -45,16 +45,16 @@ enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
 #define OBJC_INFO_SLOT_ELTS            2
 
 /* KEYWORD_DECL */
-#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name)
-#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl.arguments)
+#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl_minimal.name)
+#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl_non_common.arguments)
 
 /* INSTANCE_METHOD_DECL, CLASS_METHOD_DECL */
-#define METHOD_SEL_NAME(DECL) ((DECL)->decl.name)
-#define METHOD_SEL_ARGS(DECL) ((DECL)->decl.arguments)
-#define METHOD_ADD_ARGS(DECL) ((DECL)->decl.result)
-#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) ((DECL)->decl.lang_flag_0)
-#define METHOD_DEFINITION(DECL) ((DECL)->decl.initial)
-#define METHOD_ENCODING(DECL) ((DECL)->decl.context)
+#define METHOD_SEL_NAME(DECL) ((DECL)->decl_minimal.name)
+#define METHOD_SEL_ARGS(DECL) ((DECL)->decl_non_common.arguments)
+#define METHOD_ADD_ARGS(DECL) ((DECL)->decl_non_common.result)
+#define METHOD_ADD_ARGS_ELLIPSIS_P(DECL) ((DECL)->decl_common.lang_flag_0)
+#define METHOD_DEFINITION(DECL) ((DECL)->decl_common.initial)
+#define METHOD_ENCODING(DECL) ((DECL)->decl_minimal.context)
 
 /* CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE,
    CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE,
@@ -123,36 +123,16 @@ enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
 #define OBJC_TYPE_NAME(TYPE) TYPE_NAME(TYPE)
 #define OBJC_SET_TYPE_NAME(TYPE, NAME) (TYPE_NAME (TYPE) = NAME)
 
-/* Define the Objective-C or Objective-C++ language-specific tree codes.  */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
-enum objc_tree_code {
-#if defined (GCC_CP_TREE_H)
-  LAST_BASE_TREE_CODE = LAST_CPLUS_TREE_CODE,
-#else 
-#if defined (GCC_C_TREE_H)
-  LAST_BASE_TREE_CODE = LAST_C_TREE_CODE,
-#else
-  #error You must include <c-tree.h> or <cp/cp-tree.h> before <objc/objc-act.h>
-#endif
-#endif
-#include "objc-tree.def"
-  LAST_OBJC_TREE_CODE
-};
-#undef DEFTREECODE
-
 /* Hash tables to manage the global pool of method prototypes.  */
 
 typedef struct hashed_entry    *hash;
 typedef struct hashed_attribute        *attr;
 
-struct hashed_attribute GTY(())
-{
+struct GTY(()) hashed_attribute {
   attr next;
   tree value;
 };
-struct hashed_entry GTY(())
-{
+struct GTY(()) hashed_entry {
   attr list;
   hash next;
   tree key;
@@ -165,8 +145,7 @@ extern GTY ((length ("SIZEHASHTABLE"))) hash *cls_method_hash_list;
 
 /* Objective-C/Objective-C++ @implementation list.  */
 
-struct imp_entry GTY(())
-{
+struct GTY(()) imp_entry {
   struct imp_entry *next;
   tree imp_context;
   tree imp_template;
@@ -190,7 +169,6 @@ enum objc_tree_index
     OCTI_STATIC_NST_DECL,
     OCTI_SELF_ID,
     OCTI_UCMD_ID,
-    OCTI_UNUSED_LIST,
 
     OCTI_SELF_DECL,
     OCTI_UMSG_DECL,
@@ -265,6 +243,7 @@ enum objc_tree_index
     OCTI_CNST_STR_TYPE,
     OCTI_CNST_STR_GLOB_ID,
     OCTI_STRING_CLASS_DECL,
+    OCTI_INTERNAL_CNST_STR_TYPE,
     OCTI_SUPER_DECL,
     OCTI_UMSG_NONNIL_DECL,
     OCTI_UMSG_NONNIL_STRET_DECL,
@@ -305,7 +284,6 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX];
 
 #define self_id                        objc_global_trees[OCTI_SELF_ID]
 #define ucmd_id                        objc_global_trees[OCTI_UCMD_ID]
-#define unused_list            objc_global_trees[OCTI_UNUSED_LIST]
 
 #define self_decl              objc_global_trees[OCTI_SELF_DECL]
 #define umsg_decl              objc_global_trees[OCTI_UMSG_DECL]
@@ -453,6 +431,7 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX];
 #define constant_string_global_id              \
                                objc_global_trees[OCTI_CNST_STR_GLOB_ID]
 #define string_class_decl      objc_global_trees[OCTI_STRING_CLASS_DECL]
+#define internal_const_str_type        objc_global_trees[OCTI_INTERNAL_CNST_STR_TYPE]
 #define UOBJC_SUPER_decl       objc_global_trees[OCTI_SUPER_DECL]
 
 #endif /* GCC_OBJC_ACT_H */