diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2001-12-17 22:43:55 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2001-12-17 22:43:55 +0000 |
commit | 3b27886e3f68a942f551a2689831ae6a5d1b172b (patch) | |
tree | d63648bac97b145754a00dc4c1d8593cc1d3ae79 /gcc/objc | |
parent | 9e78e45a8dc2e9bf2886872e4907828ecc1cee57 (diff) | |
download | gcc-3b27886e3f68a942f551a2689831ae6a5d1b172b.zip gcc-3b27886e3f68a942f551a2689831ae6a5d1b172b.tar.gz gcc-3b27886e3f68a942f551a2689831ae6a5d1b172b.tar.bz2 |
Makefile.in: Update dependencies.
* Makefile.in: Update dependencies.
* c-lang.c: Remove unnecessary includes.
(deferred_fns, start_cdtor, finish_cdtor, defer_fn): Move to
c-objc-common.c.
(finish_file): Move body to c_common_finish_file.
* c-objc-common.c: Include varray.h and ggc.h.
(deferred_fns, start_cdtor, finish_cdtor, defer_fn,
expand_deferred_fns, c_objc_common_finish_file): Moved from c-lang.c.
(c_objc_common_init): Initialize deferred function array.
* c-tree.h (c_objc_common_finish_file,
static_ctors, static_dtors): New.
objc:
* Make-lang.in: Update dependencies.
* objc/objc-act.c: Don't include varray.h.
(defer_fn, deferred_fns): Move to c-objc-common.c.
(objc_init): Similarly for initialization of it.
(finish_file): Move some to c-objc-common.c, use
c_objc_common_finish_file.
From-SVN: r48134
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/Make-lang.in | 2 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 28 |
2 files changed, 2 insertions, 28 deletions
diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index 6f48a91..602948e 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -85,7 +85,7 @@ $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in objc-act.o : $(srcdir)/objc/objc-act.c \ $(CONFIG_H) $(TREE_H) $(RTL_H) $(SYSTEM_H) $(EXPR_H) $(TARGET_H) \ - $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h $(VARRAY_H) \ + $(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \ $(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \ $(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \ $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 31eb05f..96e1323 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -58,7 +58,6 @@ Boston, MA 02111-1307, USA. */ #include "cpplib.h" #include "debug.h" #include "target.h" -#include "varray.h" /* This is the default way of generating a method name. */ /* I am not sure it is really correct. @@ -449,8 +448,6 @@ static int generating_instance_variables = 0; static int print_struct_values = 0; -static varray_type deferred_fns; - /* Some platforms pass small structures through registers versus through an invisible pointer. Determine at what size structure is the transition point between the two possibilities. */ @@ -565,36 +562,13 @@ objc_init (filename) objc_act_parse_init (); - VARRAY_TREE_INIT (deferred_fns, 32, "deferred_fns"); - ggc_add_tree_varray_root (&deferred_fns, 1); - return filename; } -/* Register a function tree, so that its optimization and conversion - to RTL is only done at the end of the compilation. */ - -int -defer_fn (fn) - tree fn; -{ - VARRAY_PUSH_TREE (deferred_fns, fn); - - return 1; -} - void finish_file () { - size_t i; - - for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_fns); i++) - /* Don't output the same function twice. We may run into such - situations when an extern inline function is later given a - non-extern-inline definition. */ - if (! TREE_ASM_WRITTEN (VARRAY_TREE (deferred_fns, i))) - c_expand_deferred_function (VARRAY_TREE (deferred_fns, i)); - VARRAY_FREE (deferred_fns); + c_objc_common_finish_file (); finish_objc (); /* Objective-C finalization */ |