Makefile.in (ggc-common.o): Update.
* Makefile.in (ggc-common.o): Update. * c-decl.c (lang_mark_tree): Rename c_mark_tree. * c-lang.c (LANG_HOOKS_MARK_TREE): Redefine. * c-tree.h (c_mark_tree): New. * ggc-common.c: Include langhooks.h. (gcc_mark_trees): Use new langhook. * ggc-callbacks.c: Delete file. * ggc.h (lang_mark_tree): Remove. * langhooks-def.h (LANG_HOOKS_MARK_TREE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook. ada: * misc.c (LANG_HOOKS_MARK_TREE): Redefine. (lang_mark_tree): Make static, rename. cp: * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine. * cp-tree.h (cxx_mark_tree): New. * decl.c (lang_mark_tree): Rename cxx_mark_tree. f: * com.c (LANG_HOOKS_MARK_TREE): Redefine. (lang_mark_tree): Rename ffe_mark_tree, make static. java: * decl.c (lang_mark_tree): Rename java_mark_tree. * java-tree.h (java_mark_tree): New. * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine. objc: * objc-lang.c (LANG_HOOKS_MARK_TREE): Redefine. From-SVN: r51369
This commit is contained in:
parent
90b2d2afa1
commit
4f0ade925d
@ -1,3 +1,19 @@
|
||||
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* Makefile.in (ggc-common.o): Update.
|
||||
* c-decl.c (lang_mark_tree): Rename c_mark_tree.
|
||||
* c-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
* c-tree.h (c_mark_tree): New.
|
||||
* ggc-common.c: Include langhooks.h.
|
||||
(gcc_mark_trees): Use new langhook.
|
||||
* ggc-callbacks.c: Delete file.
|
||||
* ggc.h (lang_mark_tree): Remove.
|
||||
* langhooks-def.h (LANG_HOOKS_MARK_TREE): New.
|
||||
(LANG_HOOKS_INITIALIZER): Update.
|
||||
* langhooks.h (struct lang_hooks): New hook.
|
||||
objc:
|
||||
* objc-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
|
||||
2002-03-25 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* doc/cpp.texi: Exclude entire Top node from printed manual.
|
||||
|
@ -1296,7 +1296,7 @@ dumpvers: dumpvers.c
|
||||
version.o: version.c version.h
|
||||
|
||||
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
|
||||
flags.h $(GGC_H) varray.h hash.h $(HASHTAB_H) $(TM_P_H)
|
||||
flags.h $(GGC_H) varray.h hash.h $(HASHTAB_H) $(TM_P_H) langhooks.h
|
||||
|
||||
ggc-simple.o: ggc-simple.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
|
||||
$(GGC_H) varray.h $(TIMEVAR_H) $(TM_P_H)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* misc.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
(lang_mark_tree): Make static, rename.
|
||||
|
||||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* misc.c (maybe_build_cleanup): Remove.
|
||||
|
@ -86,6 +86,7 @@ static const char *gnat_printable_name PARAMS ((tree, int));
|
||||
static tree gnat_eh_runtime_type PARAMS ((tree));
|
||||
static int gnat_eh_type_covers PARAMS ((tree, tree));
|
||||
static void gnat_parse_file PARAMS ((void));
|
||||
static void gnat_mark_tree PARAMS ((tree));
|
||||
|
||||
/* Structure giving our language-specific hooks. */
|
||||
|
||||
@ -101,6 +102,8 @@ static void gnat_parse_file PARAMS ((void));
|
||||
#define LANG_HOOKS_DECODE_OPTION gnat_decode_option
|
||||
#undef LANG_HOOKS_PARSE_FILE
|
||||
#define LANG_HOOKS_PARSE_FILE gnat_parse_file
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE gnat_mark_tree
|
||||
#undef LANG_HOOKS_HONOR_READONLY
|
||||
#define LANG_HOOKS_HONOR_READONLY 1
|
||||
#undef LANG_HOOKS_GET_ALIAS_SET
|
||||
@ -271,8 +274,8 @@ gnat_init_options ()
|
||||
gnat_argc = 1;
|
||||
}
|
||||
|
||||
void
|
||||
lang_mark_tree (t)
|
||||
static void
|
||||
gnat_mark_tree (t)
|
||||
tree t;
|
||||
{
|
||||
switch (TREE_CODE (t))
|
||||
|
@ -7149,7 +7149,7 @@ c_dup_lang_specific_decl (decl)
|
||||
/* Mark the language specific bits in T for GC. */
|
||||
|
||||
void
|
||||
lang_mark_tree (t)
|
||||
c_mark_tree (t)
|
||||
tree t;
|
||||
{
|
||||
if (TREE_CODE (t) == IDENTIFIER_NODE)
|
||||
|
@ -50,6 +50,8 @@ static void c_post_options PARAMS ((void));
|
||||
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
|
||||
#undef LANG_HOOKS_SAFE_FROM_P
|
||||
#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE c_mark_tree
|
||||
#undef LANG_HOOKS_PARSE_FILE
|
||||
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
|
||||
#undef LANG_HOOKS_STATICP
|
||||
|
@ -178,6 +178,7 @@ extern tree pushdecl PARAMS ((tree));
|
||||
extern void c_init_decl_processing PARAMS ((void));
|
||||
extern void c_dup_lang_specific_decl PARAMS ((tree));
|
||||
extern void c_print_identifier PARAMS ((FILE *, tree, int));
|
||||
extern void c_mark_tree PARAMS ((tree));
|
||||
extern tree build_array_declarator PARAMS ((tree, tree, int, int));
|
||||
extern tree build_enumerator PARAMS ((tree, tree));
|
||||
extern int c_decode_option PARAMS ((int, char **));
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
* cp-tree.h (cxx_mark_tree): New.
|
||||
* decl.c (lang_mark_tree): Rename cxx_mark_tree.
|
||||
|
||||
2002-03-25 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cp-tree.h (cxx_maybe_build_cleanup): New.
|
||||
|
@ -59,6 +59,8 @@ static bool ok_to_generate_alias_set_for_type PARAMS ((tree));
|
||||
#define LANG_HOOKS_UNSAVE_EXPR_NOW cxx_unsave_expr_now
|
||||
#undef LANG_HOOKS_MAYBE_BUILD_CLEANUP
|
||||
#define LANG_HOOKS_MAYBE_BUILD_CLEANUP cxx_maybe_build_cleanup
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE cxx_mark_tree
|
||||
#undef LANG_HOOKS_PRINT_STATISTICS
|
||||
#define LANG_HOOKS_PRINT_STATISTICS cxx_print_statistics
|
||||
#undef LANG_HOOKS_PRINT_XNODE
|
||||
|
@ -3668,6 +3668,7 @@ extern void insert_block PARAMS ((tree));
|
||||
extern void set_block PARAMS ((tree));
|
||||
extern tree pushdecl PARAMS ((tree));
|
||||
extern void cxx_init_decl_processing PARAMS ((void));
|
||||
extern void cxx_mark_tree PARAMS ((tree));
|
||||
extern int toplevel_bindings_p PARAMS ((void));
|
||||
extern int namespace_bindings_p PARAMS ((void));
|
||||
extern void keep_next_level PARAMS ((int));
|
||||
|
@ -14624,7 +14624,7 @@ mark_cp_function_context (f)
|
||||
}
|
||||
|
||||
void
|
||||
lang_mark_tree (t)
|
||||
cxx_mark_tree (t)
|
||||
tree t;
|
||||
{
|
||||
enum tree_code code = TREE_CODE (t);
|
||||
|
@ -1,3 +1,8 @@
|
||||
Tue Mar 26 07:30:51 2002 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* com.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
(lang_mark_tree): Rename ffe_mark_tree, make static.
|
||||
|
||||
Mon Mar 25 19:27:11 2002 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* com.c (maybe_build_cleanup): Remove.
|
||||
|
@ -14205,6 +14205,7 @@ static const char *ffe_init PARAMS ((const char *));
|
||||
static void ffe_finish PARAMS ((void));
|
||||
static void ffe_init_options PARAMS ((void));
|
||||
static void ffe_print_identifier PARAMS ((FILE *, tree, int));
|
||||
static void ffe_mark_tree (tree);
|
||||
|
||||
#undef LANG_HOOKS_NAME
|
||||
#define LANG_HOOKS_NAME "GNU F77"
|
||||
@ -14218,6 +14219,8 @@ static void ffe_print_identifier PARAMS ((FILE *, tree, int));
|
||||
#define LANG_HOOKS_DECODE_OPTION ffe_decode_option
|
||||
#undef LANG_HOOKS_PARSE_FILE
|
||||
#define LANG_HOOKS_PARSE_FILE ffe_parse_file
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE ffe_mark_tree
|
||||
#undef LANG_HOOKS_PRINT_IDENTIFIER
|
||||
#define LANG_HOOKS_PRINT_IDENTIFIER ffe_print_identifier
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
@ -15126,9 +15129,9 @@ unsigned_type (type)
|
||||
return type;
|
||||
}
|
||||
|
||||
void
|
||||
lang_mark_tree (t)
|
||||
union tree_node *t ATTRIBUTE_UNUSED;
|
||||
static void
|
||||
ffe_mark_tree (t)
|
||||
tree t;
|
||||
{
|
||||
if (TREE_CODE (t) == IDENTIFIER_NODE)
|
||||
{
|
||||
|
@ -1,36 +0,0 @@
|
||||
/* Empty GC callbacks to be used by languages that don't support GC.
|
||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA. */
|
||||
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "rtl.h"
|
||||
#include "tree.h"
|
||||
#include "tm_p.h"
|
||||
#include "ggc.h"
|
||||
|
||||
void ATTRIBUTE_NORETURN
|
||||
lang_mark_tree (t)
|
||||
union tree_node *t ATTRIBUTE_UNUSED;
|
||||
{
|
||||
/* If this function is called, we are doing GC. But, this file is
|
||||
only included in compilers for languages that don't support GC. */
|
||||
abort ();
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "hashtab.h"
|
||||
#include "varray.h"
|
||||
#include "ggc.h"
|
||||
#include "langhooks.h"
|
||||
|
||||
/* Statistics about the allocation. */
|
||||
static ggc_statistics *ggc_stats;
|
||||
@ -436,7 +437,7 @@ ggc_mark_trees ()
|
||||
break;
|
||||
|
||||
case IDENTIFIER_NODE:
|
||||
lang_mark_tree (t);
|
||||
(*lang_hooks.mark_tree) (t);
|
||||
continue;
|
||||
|
||||
default:
|
||||
@ -470,7 +471,7 @@ ggc_mark_trees ()
|
||||
if (DECL_SAVED_INSNS (t))
|
||||
ggc_mark_struct_function (DECL_SAVED_INSNS (t));
|
||||
}
|
||||
lang_mark_tree (t);
|
||||
(*lang_hooks.mark_tree) (t);
|
||||
break;
|
||||
|
||||
case 't': /* A type node. */
|
||||
@ -487,7 +488,7 @@ ggc_mark_trees ()
|
||||
ggc_mark_tree (TYPE_MAIN_VARIANT (t));
|
||||
ggc_mark_tree (TYPE_BINFO (t));
|
||||
ggc_mark_tree (TYPE_CONTEXT (t));
|
||||
lang_mark_tree (t);
|
||||
(*lang_hooks.mark_tree) (t);
|
||||
break;
|
||||
|
||||
case 'b': /* A lexical block. */
|
||||
@ -518,7 +519,7 @@ ggc_mark_trees ()
|
||||
}
|
||||
|
||||
case 'x':
|
||||
lang_mark_tree (t);
|
||||
(*lang_hooks.mark_tree) (t);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -179,10 +179,6 @@ extern int ggc_marked_p PARAMS ((const void *));
|
||||
|
||||
/* Callbacks to the languages. */
|
||||
|
||||
/* This is the language's opportunity to mark nodes held through
|
||||
the lang_specific hooks in the tree. */
|
||||
extern void lang_mark_tree PARAMS ((union tree_node *));
|
||||
|
||||
/* The FALSE_LABEL_STACK, declared in except.h, has language-dependent
|
||||
semantics. If a front-end needs to mark the false label stack, it
|
||||
should set this pointer to a non-NULL value. Otherwise, no marking
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-03-26 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* decl.c (lang_mark_tree): Rename java_mark_tree.
|
||||
* java-tree.h (java_mark_tree): New.
|
||||
* java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
|
||||
|
||||
2002-03-25 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
* lex.c: Change java_perform_atof to take normal parameters
|
||||
|
@ -1835,7 +1835,7 @@ end_java_method ()
|
||||
/* Mark language-specific parts of T for garbage-collection. */
|
||||
|
||||
void
|
||||
lang_mark_tree (t)
|
||||
java_mark_tree (t)
|
||||
tree t;
|
||||
{
|
||||
if (TREE_CODE (t) == IDENTIFIER_NODE)
|
||||
|
@ -1038,6 +1038,7 @@ struct lang_type
|
||||
|
||||
extern void java_set_yydebug PARAMS ((int));
|
||||
extern void java_parse_file PARAMS ((void));
|
||||
extern void java_mark_tree PARAMS ((tree));
|
||||
extern void add_assume_compiled PARAMS ((const char *, int));
|
||||
extern tree lookup_class PARAMS ((tree));
|
||||
extern tree lookup_java_constructor PARAMS ((tree, tree));
|
||||
|
@ -223,6 +223,8 @@ static int dependency_tracking = 0;
|
||||
#define LANG_HOOKS_SET_YYDEBUG java_set_yydebug
|
||||
#undef LANG_HOOKS_PARSE_FILE
|
||||
#define LANG_HOOKS_PARSE_FILE java_parse_file
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE java_mark_tree
|
||||
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL java_dup_lang_specific_decl
|
||||
#undef LANG_HOOKS_DECL_PRINTABLE_NAME
|
||||
|
@ -83,6 +83,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
|
||||
#define LANG_HOOKS_DUP_LANG_SPECIFIC_DECL lhd_do_nothing_t
|
||||
#define LANG_HOOKS_UNSAVE_EXPR_NOW lhd_unsave_expr_now
|
||||
#define LANG_HOOKS_MAYBE_BUILD_CLEANUP lhd_return_null_tree
|
||||
#define LANG_HOOKS_MARK_TREE lhd_do_nothing_t
|
||||
#define LANG_HOOKS_HONOR_READONLY false
|
||||
#define LANG_HOOKS_PRINT_STATISTICS lhd_do_nothing
|
||||
#define LANG_HOOKS_PRINT_XNODE lhd_print_tree_nothing
|
||||
@ -178,6 +179,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
|
||||
LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, \
|
||||
LANG_HOOKS_UNSAVE_EXPR_NOW, \
|
||||
LANG_HOOKS_MAYBE_BUILD_CLEANUP, \
|
||||
LANG_HOOKS_MARK_TREE, \
|
||||
LANG_HOOKS_HONOR_READONLY, \
|
||||
LANG_HOOKS_PRINT_STATISTICS, \
|
||||
LANG_HOOKS_PRINT_XNODE, \
|
||||
|
@ -184,6 +184,9 @@ struct lang_hooks
|
||||
for the passed TARGET_EXPR. Return NULL if there is none. */
|
||||
tree (*maybe_build_cleanup) PARAMS ((tree));
|
||||
|
||||
/* Mark nodes held through the lang_specific hooks in the tree. */
|
||||
void (*mark_tree) PARAMS ((tree));
|
||||
|
||||
/* Nonzero if TYPE_READONLY and TREE_READONLY should always be honored. */
|
||||
bool honor_readonly;
|
||||
|
||||
|
@ -46,6 +46,8 @@ static void objc_post_options PARAMS ((void));
|
||||
#define LANG_HOOKS_POST_OPTIONS objc_post_options
|
||||
#undef LANG_HOOKS_PARSE_FILE
|
||||
#define LANG_HOOKS_PARSE_FILE c_common_parse_file
|
||||
#undef LANG_HOOKS_MARK_TREE
|
||||
#define LANG_HOOKS_MARK_TREE c_mark_tree
|
||||
#undef LANG_HOOKS_STATICP
|
||||
#define LANG_HOOKS_STATICP c_staticp
|
||||
#undef LANG_HOOKS_DUP_LANG_SPECIFIC_DECL
|
||||
|
Loading…
Reference in New Issue
Block a user