diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-10-05 02:49:16 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2001-10-05 02:49:16 +0000 |
commit | 588d3ade1368851d1f6a239bcc7a76539ae13649 (patch) | |
tree | 2f6c9d765b33ae23a613a61116ed9e165f3ee6d9 /gcc/tree.h | |
parent | 25af8512559873d4b6e67d27a07f504a585b6037 (diff) | |
download | gcc-588d3ade1368851d1f6a239bcc7a76539ae13649.zip gcc-588d3ade1368851d1f6a239bcc7a76539ae13649.tar.gz gcc-588d3ade1368851d1f6a239bcc7a76539ae13649.tar.bz2 |
Makefile.in (OBJS): Added tree-inline.o.
* Makefile.in (OBJS): Added tree-inline.o.
(c-common.o): Depend on tree-inline.h.
(tree-inline.o): New target.
* c-common.c: Include tree-inline.h.
(c_mark_lang_decl): Don't mark saved_tree.
(c_common_lang_init): Set lang_anon_aggr_type_p.
* c-common.h (walk_tree_fn, DECL_SAVED_TREE): Moved to tree.h.
(struct c_lang_decl): Moved saved_tree to tree_decl.
* ggc-common.c: Mark saved_tree and inlined_fns of FUNCTION_DECLs.
* integrate.h (function_attribute_inlinable_p): Declare it.
* integrate.c (function_attribute_inlinable_p): Export it.
* tree-inline.c: New file. Define variables declared in...
* tree-inline.h: New file. Declare functions to be moved to
tree-inline.c. Define macros and declare types and hooks for
language-specific tree inlining.
(flag_inline_trees): Moved definition from cp/decl2.c.
* tree.h (walk_tree_fn, DECL_SAVED_TREE): Moved from c-common.h.
(TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved from cp/cp-tree.h.
(struct tree_decl): Moved saved_tree from c_lang_decl and
inlined_fns from C++'s lang_decl.
From-SVN: r46021
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -560,6 +560,10 @@ extern void tree_class_check_failed PARAMS ((const tree, int, when the node is a type). */ #define TREE_READONLY(NODE) ((NODE)->common.readonly_flag) +/* Non-zero if NODE is a _DECL with TREE_READONLY set. */ +#define TREE_READONLY_DECL_P(NODE) \ + (TREE_READONLY (NODE) && DECL_P (NODE)) + /* Value of expression is constant. Always appears in all ..._CST nodes. May also appear in an arithmetic expression, an ADDR_EXPR or a CONSTRUCTOR @@ -1547,6 +1551,14 @@ struct tree_type /* In a FUNCTION_DECL, nonzero if the function cannot be inlined. */ #define DECL_UNINLINABLE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.uninlinable) +/* In a FUNCTION_DECL, the saved representation of the body of the + entire function. Usually a COMPOUND_STMT, but in C++ this may also + be a RETURN_INIT, CTOR_INITIALIZER, or TRY_BLOCK. */ +#define DECL_SAVED_TREE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.saved_tree) + +/* List of FUNCION_DECLs inlined into this function's body. */ +#define DECL_INLINED_FNS(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inlined_fns) + /* Nonzero in a FUNCTION_DECL means this is a built-in function that is not specified by ansi C and that users are supposed to be allowed to redefine for any purpose whatever. */ @@ -1769,6 +1781,13 @@ struct tree_decl int i; } u2; + /* In a FUNCTION_DECL, this is DECL_SAVED_TREE. */ + tree saved_tree; + + /* In a FUNCTION_DECL, these are function data which is to be kept + as long as FUNCTION_DECL is kept. */ + tree inlined_fns; + tree vindex; HOST_WIDE_INT pointer_alias_set; /* Points to a structure whose details depend on the language in use. */ @@ -3050,6 +3069,10 @@ extern void dwarf2out_return_save PARAMS ((const char *, long)); extern void dwarf2out_return_reg PARAMS ((const char *, unsigned)); +/* The type of a function that walks over tree structure. */ + +typedef tree (*walk_tree_fn) PARAMS ((tree *, int *, void *)); + /* Redefine abort to report an internal error w/o coredump, and reporting the location of the error in the source file. This logic |