diff options
author | shebs <shebs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-03 22:05:57 +0000 |
---|---|---|
committer | shebs <shebs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-03 22:05:57 +0000 |
commit | 99ff41609b678c4b1b24b40c2f459db54a694dfe (patch) | |
tree | a9086dda614a021f61ce4b8b7024b034cf3e5ecc /gcc/c-parse.in | |
parent | 6fc632f6b524b4e35d7f625d94b2f87cbec48c85 (diff) | |
download | gcc-99ff41609b678c4b1b24b40c2f459db54a694dfe.tar.gz |
2001-10-03 Ziemowit Laski <zlaski@apple.com>
* c-parse.in (objc_inherit_code, objc_pq_context,
objc_public_flag): Make static.
(objc_interface_context, objc_implementation_context,
objc_method_context, objc_ivar_chain, objc_ivar_context): Move to
global tree array in objc/objc-act.[ch].
(methoddef): Remove unnecessary code.
* objc/objc-act.c: (hashed_attribute, hashed_entry, imp_entry):
Hoist struct definitions to objc-act.h.
(nst_method_hash_list, cls_method_hash_list, imp_list, imp_count,
cat_count): Place declaration in objc-act.h.
(objc_tree_index): Move enumeration to objc-act.h.
(objc_global_trees): Place declaration and macro accessors in
objc-act.h.
(implementation_context): Remove duplicate; use
objc_implementation_context instead:
(method_context): Remove duplicate; use objc_method_context
instead.
(objc_ellipsis_node, objc_method_prototype_template,
implemented_classes, function_type): Move global vars to
objc_global_trees.
(init_objc): Use LAST_BASE_TREE_CODE instead of LAST_CODE.
(build_message_expr): Move actual construction of ObjC message
send nodes to finish_message_expr.
(finish_message_expr): New routine, contains code formerly in
build_message_expr.
* objc/objc-act.h (finish_message_expr): New prototype.
(objc_ivar_chain, objc_method_context, objc_ellipsis_node): Remove
declarations; these vars are now part of objc_global_trees.
(objc_tree_index, objc_global_trees): Move definitions from
objc-act.c.
* objc/objc-tree.def: Update copyright info.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46000 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parse.in')
-rw-r--r-- | gcc/c-parse.in | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 85c2815409d..28ac2b5a550 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -281,23 +281,16 @@ static tree declspec_stack; } while (0) ifobjc -/* Objective-C specific information */ - -tree objc_interface_context; -tree objc_implementation_context; -tree objc_method_context; -tree objc_ivar_chain; -tree objc_ivar_context; -enum tree_code objc_inherit_code; -int objc_receiver_context; -int objc_public_flag; -int objc_pq_context; +/* Objective-C specific parser/lexer information */ + +static enum tree_code objc_inherit_code; +static int objc_pq_context = 0, objc_public_flag = 0; /* The following flag is needed to contextualize ObjC lexical analysis. In some cases (e.g., 'int NSObject;'), it is undesirable to bind an identifier to an ObjC class, even if a class with that name exists. */ -int objc_need_raw_identifier; +static int objc_need_raw_identifier; #define OBJC_NEED_RAW_IDENTIFIER(VAL) objc_need_raw_identifier = VAL end ifobjc @@ -324,13 +317,6 @@ c_parse_init () ggc_add_tree_root (¤t_declspecs, 1); ggc_add_tree_root (&prefix_attributes, 1); ggc_add_tree_root (&all_prefix_attributes, 1); -ifobjc - ggc_add_tree_root (&objc_interface_context, 1); - ggc_add_tree_root (&objc_implementation_context, 1); - ggc_add_tree_root (&objc_method_context, 1); - ggc_add_tree_root (&objc_ivar_chain, 1); - ggc_add_tree_root (&objc_ivar_context, 1); -end ifobjc } %} @@ -2948,7 +2934,6 @@ methoddef: else add_instance_method (objc_implementation_context, $3); start_method_def ($3); - objc_method_context = $3; } optarglist { @@ -2957,7 +2942,6 @@ methoddef: compstmt_or_error { finish_method_def (); - objc_method_context = NULL_TREE; } ; |