1 /* Declarations for objc-actions.c.
2 Copyright (C) 1990 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /*** Public Interface (procedures) ***/
23 /* used by compile_file */
25 void init_objc (), finish_objc ();
30 tree continue_class ();
32 void start_method_def ();
33 void continue_method_def ();
34 void finish_method_def ();
35 void add_objc_decls ();
39 tree add_instance_variable ();
40 tree add_class_method ();
41 tree add_instance_method ();
42 tree get_super_receiver ();
43 tree get_class_ivars ();
44 tree get_class_reference ();
45 tree get_static_reference ();
47 tree build_message_expr ();
48 tree build_selector_expr ();
49 tree build_ivar_reference ();
50 tree build_keyword_decl ();
51 tree build_method_decl ();
53 /* Nonzero enables objc features. */
55 extern int doing_objc_thang;
57 /* the following routines are used to implement statically typed objects */
59 tree lookup_interface ();
60 int objc_comptypes ();
61 void objc_check_decl ();
65 tree build_encode_expr ();
67 /* used by rest_of_compilation. */
71 /* Objective-C structures */
74 #define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name)
75 #define KEYWORD_ARG_NAME(DECL) ((DECL)->decl.arguments)
77 /* INSTANCE_METHOD_DECL, CLASS_METHOD_DECL */
78 #define METHOD_SEL_NAME(DECL) ((DECL)->decl.name)
79 #define METHOD_SEL_ARGS(DECL) ((DECL)->decl.arguments)
80 #define METHOD_ADD_ARGS(DECL) ((DECL)->decl.result)
81 #define METHOD_DEFINITION(DECL) ((DECL)->decl.initial)
82 #define METHOD_ENCODING(DECL) ((DECL)->decl.context)
84 /* INTERFACE_TYPE, IMPLEMENTATION_TYPE, CATEGORY_TYPE */
85 #define CLASS_NAME(CLASS) ((CLASS)->type.name)
86 #define CLASS_SUPER_NAME(CLASS) ((CLASS)->type.binfo)
87 #define CLASS_IVARS(CLASS) ((CLASS)->type.maxval)
88 #define CLASS_RAW_IVARS(CLASS) ((CLASS)->type.noncopied_parts)
89 #define CLASS_NST_METHODS(CLASS) ((CLASS)->type.next_variant)
90 #define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.main_variant)
91 #define CLASS_STATIC_TEMPLATE(CLASS) ((CLASS)->type.context)
92 #define CLASS_CATEGORY_LIST(CLASS) ((CLASS)->type.minval)
94 /* Define the Objective-C language-specific tree codes. */
96 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
98 dummy_tree_code = LAST_AND_UNUSED_TREE_CODE,
99 #include "objc-tree.def"