X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fobjc%2Fobjc-act.h;h=d5d63141e93eebaf33b42dd5d3155141ba4ea45f;hp=5738bc9aedebee1712c8284aa548b8f5fb072dbd;hb=66eb9e7effb32fd1fe991395f3defa18eeb3c56b;hpb=43bf5d72a08229da09c59460922275147fe59e48 diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 5738bc9aede..d5d63141e93 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -1,5 +1,5 @@ /* Declarations for objc-act.c. - Copyright (C) 1990, 2000, 2001, 2002, 2003 + Copyright (C) 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -22,14 +22,14 @@ Boston, MA 02111-1307, USA. */ #ifndef GCC_OBJC_ACT_H #define GCC_OBJC_ACT_H -/*** Public Interface (procedures) ***/ +/*** Language hooks ***/ bool objc_init (void); const char *objc_printable_name (tree, int); +void objc_finish_file (void); /* used by yyparse */ -void finish_file (void); tree start_class (enum tree_code, tree, tree, tree); tree continue_class (tree); void finish_class (tree); @@ -40,15 +40,12 @@ tree start_protocol (enum tree_code, tree, tree); void finish_protocol (tree); tree objc_build_throw_stmt (tree); -tree objc_build_try_catch_finally_stmt (int, int); -void objc_build_synchronized_prologue (tree); -tree objc_build_synchronized_epilogue (void); -tree objc_build_try_prologue (void); -void objc_build_try_epilogue (int); -void objc_build_catch_stmt (tree); -void objc_build_catch_epilogue (void); -tree objc_build_finally_prologue (void); -tree objc_build_finally_epilogue (void); +void objc_begin_try_stmt (location_t, tree); +void objc_begin_catch_clause (tree); +void objc_finish_catch_clause (void); +void objc_build_finally_clause (location_t, tree); +void objc_finish_try_stmt (void); +void objc_build_synchronized (location_t, tree, tree); tree is_ivar (tree, tree); int is_private (tree); @@ -57,18 +54,18 @@ tree add_instance_variable (tree, int, tree, tree, tree); tree objc_add_method (tree, tree, int); tree get_super_receiver (void); void objc_clear_super_receiver (void); -tree get_class_ivars_from_name (tree); -tree get_class_reference (tree); +tree objc_get_class_ivars (tree); +tree objc_get_class_reference (tree); tree get_static_reference (tree, tree); -tree get_object_reference (tree); -tree build_message_expr (tree); +tree get_protocol_reference (tree); +tree objc_build_message_expr (tree); tree finish_message_expr (tree, tree, tree); -tree build_selector_expr (tree); +tree objc_build_selector_expr (tree); tree build_ivar_reference (tree); -tree build_keyword_decl (tree, tree, tree); +tree objc_build_keyword_decl (tree, tree, tree); tree build_method_decl (enum tree_code, tree, tree, tree); -tree build_protocol_expr (tree); -tree build_objc_string_object (tree); +tree objc_build_protocol_expr (tree); +tree objc_build_string_object (tree); void objc_declare_alias (tree, tree); void objc_declare_class (tree); @@ -81,12 +78,12 @@ void objc_check_decl (tree); /* NeXT extensions */ -tree build_encode_expr (tree); +tree objc_build_encode_expr (tree); /* Objective-C structures */ -#define CLASS_BINFO_ELTS 6 -#define PROTOCOL_BINFO_ELTS 2 +#define CLASS_LANG_SLOT_ELTS 6 +#define PROTOCOL_LANG_SLOT_ELTS 2 /* KEYWORD_DECL */ #define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name) @@ -104,19 +101,19 @@ tree build_encode_expr (tree); PROTOCOL_INTERFACE_TYPE */ #define CLASS_NAME(CLASS) ((CLASS)->type.name) #define CLASS_SUPER_NAME(CLASS) (TYPE_CHECK (CLASS)->type.context) -#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) -#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) +#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) +#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval) #define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval) -#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 2) -#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 3) -#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 4) -#define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 5) +#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 2) +#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 3) +#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 4) +#define CLASS_OWN_IVARS(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 5) #define PROTOCOL_NAME(CLASS) ((CLASS)->type.name) -#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0) +#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 0) #define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval) #define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval) -#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1) +#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_LANG_SLOT_1 (CLASS), 1) #define PROTOCOL_DEFINED(CLASS) TREE_USED (CLASS) /* We need to distinguish TYPE_PROTOCOL_LISTs from TYPE_CONTEXTs, both of which are stored in the same accessor slot. */ @@ -128,7 +125,7 @@ tree build_encode_expr (tree); /* Set by `continue_class' and checked by `objc_is_public'. */ -#define TREE_STATIC_TEMPLATE(record_type) (TREE_PUBLIC (record_type)) +#define TREE_STATIC_TEMPLATE(record_type) (TREE_PRIVATE (record_type)) #define TYPED_OBJECT(type) \ (TREE_CODE (type) == RECORD_TYPE && TREE_STATIC_TEMPLATE (type)) #define OBJC_TYPE_NAME(type) TYPE_NAME(type) @@ -282,7 +279,6 @@ enum objc_tree_index OCTI_LOCAL_EXCEPTION_DECL, OCTI_RETHROW_EXCEPTION_DECL, OCTI_EVAL_ONCE_DECL, - OCTI_EXCEPTION_BLK_STACK, OCTI_CATCH_TYPE, OCTI_MAX @@ -312,17 +308,17 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX]; #define objc_get_meta_class_decl \ objc_global_trees[OCTI_GET_MCLASS_DECL] -#define super_type objc_global_trees[OCTI_SUPER_TYPE] -#define selector_type objc_global_trees[OCTI_SEL_TYPE] -#define id_type objc_global_trees[OCTI_ID_TYPE] +#define objc_super_type objc_global_trees[OCTI_SUPER_TYPE] +#define objc_selector_type objc_global_trees[OCTI_SEL_TYPE] +#define objc_id_type objc_global_trees[OCTI_ID_TYPE] #define objc_class_type objc_global_trees[OCTI_CLS_TYPE] -#define instance_type objc_global_trees[OCTI_NST_TYPE] -#define protocol_type objc_global_trees[OCTI_PROTO_TYPE] +#define objc_instance_type objc_global_trees[OCTI_NST_TYPE] +#define objc_protocol_type objc_global_trees[OCTI_PROTO_TYPE] /* Type checking macros. */ #define IS_ID(TYPE) \ - (TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (id_type)) + (TYPE_MAIN_VARIANT (TYPE) == TYPE_MAIN_VARIANT (objc_id_type)) #define IS_PROTOCOL_QUALIFIED_ID(TYPE) \ (IS_ID (TYPE) && TYPE_PROTOCOL_LIST (TYPE)) #define IS_SUPER(TYPE) \ @@ -402,8 +398,6 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX]; #define objc_caught_exception objc_global_trees[OCTI_LOCAL_EXCEPTION_DECL] #define objc_rethrow_exception objc_global_trees[OCTI_RETHROW_EXCEPTION_DECL] #define objc_eval_once objc_global_trees[OCTI_EVAL_ONCE_DECL] -#define objc_exception_block_stack \ - objc_global_trees[OCTI_EXCEPTION_BLK_STACK] #define objc_catch_type objc_global_trees[OCTI_CATCH_TYPE] #define objc_method_template objc_global_trees[OCTI_METH_TEMPL]