BSD 4_4_Lite2 development
[unix-history] / usr / src / contrib / gcc-2.3.3 / objc-actions.h
CommitLineData
65e4f827
C
1/* Declarations for objc-actions.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, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20
21/*** Public Interface (procedures) ***/
22
23/* used by compile_file */
24
25void init_objc (), finish_objc ();
26
27/* used by yyparse */
28
29tree start_class ();
30tree continue_class ();
31void finish_class ();
32void start_method_def ();
33void continue_method_def ();
34void finish_method_def ();
35void add_objc_decls ();
36
37tree is_ivar ();
38int is_public ();
39tree add_instance_variable ();
40tree add_class_method ();
41tree add_instance_method ();
42tree get_super_receiver ();
43tree get_class_ivars ();
44tree get_class_reference ();
45tree get_static_reference ();
46
47tree build_message_expr ();
48tree build_selector_expr ();
49tree build_ivar_reference ();
50tree build_keyword_decl ();
51tree build_method_decl ();
52
53/* Nonzero enables objc features. */
54
55extern int doing_objc_thang;
56
57/* the following routines are used to implement statically typed objects */
58
59tree lookup_interface ();
60int objc_comptypes ();
61void objc_check_decl ();
62
63/* NeXT extensions */
64
65tree build_encode_expr ();
66
67/* used by rest_of_compilation. */
68
69void genPrototype ();
70
71/* Objective-C structures */
72
73/* KEYWORD_DECL */
74#define KEYWORD_KEY_NAME(DECL) ((DECL)->decl.name)
75#define KEYWORD_ARG_NAME(DECL) ((DECL)->decl.arguments)
76
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)
83
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)
93
94/* Define the Objective-C language-specific tree codes. */
95
96#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
97enum objc_tree_code {
98 dummy_tree_code = LAST_AND_UNUSED_TREE_CODE,
99#include "objc-tree.def"
100 LAST_OBJC_TREE_CODE
101};
102#undef DEFTREECODE