diff options
author | Neil Booth <neil@cat.daikokuya.demon.co.uk> | 2001-05-16 06:22:15 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-05-16 06:22:15 +0000 |
commit | 4c521bad98510915b9bae91033f03a525a7fe5bd (patch) | |
tree | 1e5d0fbc2d1d0260932b68eec0147527bb4f696d /gcc/objc | |
parent | fca790eb60478652025f6604d5b57152cb5160c9 (diff) | |
download | gcc-4c521bad98510915b9bae91033f03a525a7fe5bd.zip gcc-4c521bad98510915b9bae91033f03a525a7fe5bd.tar.gz gcc-4c521bad98510915b9bae91033f03a525a7fe5bd.tar.bz2 |
c-common.h (RID_FIRST_PQ): New.
* c-common.h (RID_FIRST_PQ): New.
* c-parse.in (objc_pq_context): New.
(objc parser): Set objc_pq_context rather than calling
remember_protocol_qualifiers and forget_protocol_qualifiers.
Don't call save_and_forget_protocol_qualifiers.
(yylexname): Handle objc protocol qualifiers here.
* stringpool.c (struct str_header): Replace with sp_hashnode.
(SP_EMPTY, SP_LEN, SP_TREE, SP_STR, SP_VALID): New.
(alloc_string): Rename alloc_ident. Use the SP_ accessors.
Allocate an IDENTIFIER_NODE for each identifier.
(FORALL_STRINGS, set_identifier): Delete.
(FORALL_IDS, expand_string_table, stringpool_statistics): Update.
(ggc_alloc_string): Use an obstack.
(get_identifier, maybe_get_identifier, mark_string_hash): Update.
* tree.h: Update comments.
(set_identifier): Delete.
* objc/objc-act.c (N_PQ, saved_pq, saved_not_pq,
save_and_forget_protocol_qualifiers, forget_protocol_qualifiers,
remember_protocol_qualifiers): Delete.
From-SVN: r42132
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-act.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index b6ea821..6f04357 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -8661,46 +8661,3 @@ lookup_objc_ivar (id) else return 0; } - -/* Parser callbacks. - Some ObjC keywords are reserved only in a particular context: - in out inout bycopy byref oneway. - We have to save and restore the IDENTIFIER_NODEs that describe - them as keywords, when appropriate. */ - -#define N_PQ 6 -static tree saved_pq[N_PQ]; -static tree saved_not_pq[N_PQ]; -static const char *const pq_strings[N_PQ] = { - "bycopy", "byref", "in", "inout", "oneway", "out" -}; - -void -save_and_forget_protocol_qualifiers () -{ - int i; - for (i = 0; i < N_PQ; i++) - saved_pq[i] = set_identifier (pq_strings[i], NULL_TREE); - - ggc_add_tree_root (saved_pq, N_PQ); - ggc_add_tree_root (saved_not_pq, N_PQ); -} - -void -forget_protocol_qualifiers () -{ - int i; - for (i = 0; i < N_PQ; i++) - { - set_identifier (pq_strings[i], saved_not_pq[i]); - saved_not_pq[i] = NULL_TREE; - } -} - -void -remember_protocol_qualifiers () -{ - int i; - for (i = 0; i < N_PQ; i++) - saved_not_pq[i] = set_identifier (pq_strings[i], saved_pq[i]); -} |