source: trunk/third/gcc/objc-act.h @ 8834

Revision 8834, 4.3 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r8833, which included commits to RCS files with non-trunk default branches.
Line 
1/* Declarations for objc-act.c.
2   Copyright (C) 1990 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING.  If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
20
21
22/*** Public Interface (procedures) ***/
23
24/* used by yyparse */
25
26void finish_file                                PROTO((void));
27tree start_class                                PROTO((enum tree_code, tree, tree, tree));
28tree continue_class                             PROTO((tree));
29void finish_class                               PROTO((tree));
30void start_method_def                           PROTO((tree));
31void continue_method_def                        PROTO((void));
32void finish_method_def                          PROTO((void));
33tree start_protocol                             PROTO((enum tree_code, tree, tree));
34void finish_protocol                            PROTO((tree));
35void add_objc_decls                             PROTO((void));
36
37tree is_ivar                                    PROTO((tree, tree));
38int is_private                                  PROTO((tree));
39int is_public                                   PROTO((tree, tree));
40tree add_instance_variable                      PROTO((tree, int, tree, tree, tree));
41tree add_class_method                           PROTO((tree, tree));
42tree add_instance_method                        PROTO((tree, tree));
43tree get_super_receiver                         PROTO((void));
44tree get_class_ivars                            PROTO((tree));
45tree get_class_reference                        PROTO((tree));
46tree get_static_reference                       PROTO((tree, tree));
47tree get_object_reference                       PROTO((tree));
48tree build_message_expr                         PROTO((tree));
49tree build_selector_expr                        PROTO((tree));
50tree build_ivar_reference                       PROTO((tree));
51tree build_keyword_decl                         PROTO((tree, tree, tree));
52tree build_method_decl                          PROTO((enum tree_code, tree, tree, tree));
53tree build_protocol_expr                        PROTO((tree));
54tree build_objc_string_object                   PROTO((tree));
55
56extern tree objc_ivar_chain;
57extern tree objc_method_context;
58
59void objc_declare_alias                         PROTO((tree, tree));
60void objc_declare_class                         PROTO((tree));
61
62extern int objc_receiver_context;
63
64/* the following routines are used to implement statically typed objects */
65
66int objc_comptypes                              PROTO((tree, tree, int));
67void objc_check_decl                            PROTO((tree));
68
69/* NeXT extensions */
70
71tree build_encode_expr                          PROTO((tree));
72
73/* Objective-C structures */
74
75/* KEYWORD_DECL */
76#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name)
77#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl.arguments)
78
79/* INSTANCE_METHOD_DECL, CLASS_METHOD_DECL */
80#define METHOD_SEL_NAME(DECL) ((DECL)->decl.name)
81#define METHOD_SEL_ARGS(DECL) ((DECL)->decl.arguments)
82#define METHOD_ADD_ARGS(DECL) ((DECL)->decl.result)
83#define METHOD_DEFINITION(DECL) ((DECL)->decl.initial)
84#define METHOD_ENCODING(DECL) ((DECL)->decl.context)
85
86/* CLASS_INTERFACE_TYPE, CLASS_IMPLEMENTATION_TYPE,
87   CATEGORY_INTERFACE_TYPE, CATEGORY_IMPLEMENTATION_TYPE,
88   PROTOCOL_INTERFACE_TYPE */
89#define CLASS_NAME(CLASS) ((CLASS)->type.name)
90#define CLASS_SUPER_NAME(CLASS) ((CLASS)->type.context)
91#define CLASS_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0)
92#define CLASS_RAW_IVARS(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1)
93#define CLASS_NST_METHODS(CLASS) ((CLASS)->type.minval)
94#define CLASS_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
95#define CLASS_STATIC_TEMPLATE(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 2)
96#define CLASS_CATEGORY_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 3)
97#define CLASS_PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 4)
98#define PROTOCOL_NAME(CLASS) ((CLASS)->type.name)
99#define PROTOCOL_LIST(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 0)
100#define PROTOCOL_NST_METHODS(CLASS) ((CLASS)->type.minval)
101#define PROTOCOL_CLS_METHODS(CLASS) ((CLASS)->type.maxval)
102#define PROTOCOL_FORWARD_DECL(CLASS) TREE_VEC_ELT (TYPE_BINFO (CLASS), 1)
103#define TYPE_PROTOCOL_LIST(TYPE) ((TYPE)->type.context)
104
105/* Define the Objective-C or Objective-C++ language-specific tree codes.  */
106
107#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
108enum objc_tree_code {
109#ifdef OBJCPLUS
110  dummy_tree_code = LAST_CPLUS_TREE_CODE,
111#else
112  dummy_tree_code = LAST_AND_UNUSED_TREE_CODE,
113#endif
114#include "objc-tree.def"
115  LAST_OBJC_TREE_CODE
116};
117#undef DEFTREECODE
Note: See TracBrowser for help on using the repository browser.