diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-08 23:37:11 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-08 23:37:11 +0000 |
commit | 5ded8c6f262065518f04c441d1ea847fa38c5b38 (patch) | |
tree | e8e5667e9ce5aa5fc7514d5caa37a74c88e3f391 /gcc/print-tree.c | |
parent | 6c3c4d74d98659fda5994e5b843fa6b6842ce8aa (diff) | |
download | gcc-5ded8c6f262065518f04c441d1ea847fa38c5b38.tar.gz |
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (TREE_H): Add treestruct.def.
(c-decl.o): Add pointer-set.h
* c-decl.c (diagnose_mismatched_decls): Don't attempt to look at
visibility on regular DECL's.
(merge_decls): Fix the copying of decl nodes of various types for
the new structures. Don't update RTL, section name, weak status,
etc, on DECL's without RTL.
(grokdeclarator): DECL_ARG_TYPE_AS_WRITTEN is gone.
Don't check volatile on non-variable types.
(store_parm_decls_oldstyle): Use pointer_set instead of DECL_WEAK
to check whether we have seen arguments.
* c-objc-common.c (c_tree_printer): Reverse order of tests so that
flag is checked before field (flag is common, field is not).
* dwarf2out.c (decl_ultimate_origin): Only DECL's with
TS_DECL_COMMON could have an origin.
(add_location_or_const_value_attribute): Don't check section name
on non-var/function decls.
(dwarf2out_var_location): Reverse order of tests.
* emit-rtl.c (set_reg_attrs_for_parm): DECL_CHECK is dead, replace
with DECL_WRTL_CHECK.
* expmed.c (make_tree): rtl is now in decl_with_rtl.
* fold-const.c (fold_binary): Don't check weakness on
non-var/function decls.
(tree_expr_nonzero_p): Ditto.
(fold_checksum_tree): Use tree_decl_extra as sizeof
buffer.
* ggc-page.c (extra_order_size_table): Add sizes for
tree_decl_non_common, tree_parm_decl, tree_var_decl, and
tree_field_decl.
* gimplify.c (gimplify_bind_expr): Only set
DECL_SEEN_IN_BIND_EXPR_P on VAR_DECL.
* integrate.c (copy_decl_for_inlining): Don't set RTL on decl's
without RTL.
* langhooks-def.h (LANG_HOOK_INIT_TS): New.
* langhooks.h (init_ts). New langhook.
* passes.c (rest_of_decl_compilation): Reverse order of tests.
* print-tree.c (print_node): Update to only print fields that
exist in the structures the passed decl has.
* toplev.c (wrapup_global_declarations): Don't reset
DECL_DEFER_OUTPUT on DECL's that don't contain it.
* tree-browser.c (browse_tree): DECL_ARG_TYPE_AS_WRITTEN removed.
* tree-inline.c (remap_decl): Ditto.
* tree-outof-ssa.c (create_temp): Reverse order of tests.
* tree-pretty-print.c (print_declaration): Don't print
DECL_REGISTER on things that don't contain it.
* tree-vrp.c (expr_computes_nonzero): Don't check weakness on
non-var/function decls.
* tree.c (tree_contains_struct): New structure.
(init_priority_for_decl): New hashtable.
(tree_int_map): New structure.
(tree_int_map_eq): New function.
(tree_int_map_marked_p): Ditto.
(tree_int_map_hash): Ditto.
(tree_map): Move to tree.h.
(tree_map_eq): Externalize.
(tree_map_hash): Ditto.
(tree_map_marked_p): Ditto.
(init_ttree): Set up tree_contains_struct and call langhook.
(decl_assembler_name): Use DECL_NON_COMMON_CHECK..
(tree_code_size): Update for new structures.
(tree_node_structure): Update for new structures.
(make_node_stat): Don't try to set DECL_IN_SYSTEM_HEADER on decls
without the field.
(copy_node_stat): Copy init priority.
(build_decl_stat): Ditto for visibility.
(ts_enum_names): New.
(tree_contains_struct_check_failed): New function.
(decl_init_priority_lookup): Ditto.
(decl_init_priority_insert): Ditto.
* treestruct.def: New file.
* tree.h (CODE_CONTAINS_STRUCT): New macro.
(CONTAINS_STRUCT_CHECK): Ditto.
(tree_contains_struct_check_failed): New prototype.
(DECL_CHECK): Removed.
(DECL_MINIMAL_CHECK): New.
(DECL_COMMON_CHECK): Ditto.
(DECL_WRTL_CHECK): Ditto.
(DECL_NON_COMMON_CHECK): Ditto.
(DECL_WITH_VIS_CHECK): Ditto.
(VAR_OR_FUNCTION_DECL_P): Ditto
(struct tree_decl_minimal): New structure.
(struct tree_decl_common): Ditto.
(struct tree_decl_with_rtl): Ditto.
(struct tree_decl_with_vis): Ditto.
(struct tree_decl_non_common): Ditto.
(struct tree_field_decl): Ditto.
(struct tree_parm_decl): Ditto.
(struct tree_var_decl): Ditto.
(struct tree_function_decl): Ditto.
(struct tree_const_decl): Ditto.
(struct tree_result_decl): Ditto.
(union tree_node): Add new structures.
* var-tracking.c (track_expr_p): Reverse order of tests.
* doc/c-tree.texi: Add documentation on DECL node internal structure.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* utils.c (create_param_decl): DECL_ARG_TYPE_AS_WRITTEN is
removed.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* Make-lang.in: Add gt-cp-lang.h.
(cp-lang.o): Ditto.
* class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
the field.
* config-lang.in: Add cp-lang.c to gtfiles.
* cp-lang.c: Include hashtab.h.
(cp_init_ts): New function.
(LANG_HOOK_INIT_TS): Use macro.
(decl_shadowed_for_var_lookup): New function.
(decl_shadowed_for_var_insert): Ditto.
* cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
(NON_THUNK_FUNCTION_CHECK): Ditto.
(DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
(DECL_INIT_PRIORITY): Ditto.
(DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
(DECL_SHADOWED_FOR_VAR): Use hashtable.
(SET_DECL_SHADOWED_FOR_VAR): Ditto.
* decl.c (duplicate_decls): Update for new/updated structures.
(poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
* decl2.c (start_static_initialization_or_destruction): Deal with
priority.
* pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
SET_DECL_RTL.
* tree.c (handle_init_priority_attribute): Handle priority.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* objc-act.c (objc_push_parm): DECL_ARG_TYPE_AS_WRITTEN is
removed.
* objc-act.h (KEYWORD_ARG_NAME): Use decl_non_common.
(KEYWORD_KEY_NAME): Use decl_minimal.
(METHOD_SEL_NAME): Ditto..
(METHOD_SEL_ARGS): Use decl_non_common.
(METHOD_ADD_ARGS): Ditto.
(METHOD_ADD_ARGS_ELLIPSIS_P): Use decl_common.
(METHOD_DEFINITION): Ditto.
(METHOD_ENCODING): Ditto.
* objc-lang.c: (objc_init_ts): New function.
2005-07-08 Daniel Berlin <dberlin@dberlin.org>
* trans-decl.c (create_function_arglist): DECL_ARG_TYPE_AS_WRITTEN
is removed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101799 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-tree.c')
-rw-r--r-- | gcc/print-tree.c | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/gcc/print-tree.c b/gcc/print-tree.c index b251933da66..9bd79f4452e 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -167,11 +167,13 @@ print_node (FILE *file, const char *prefix, tree node, int indent) int len; int i; expanded_location xloc; + enum tree_code code; if (node == 0) return; - - class = TREE_CODE_CLASS (TREE_CODE (node)); + + code = TREE_CODE (node); + class = TREE_CODE_CLASS (code); /* Don't get too deep in nesting. If the user wants to see deeper, it is easy to use the address of a lowest-level node @@ -319,21 +321,23 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (DECL_IGNORED_P (node)) fputs (" ignored", file); if (DECL_ABSTRACT (node)) - fputs (" abstract", file); - if (DECL_IN_SYSTEM_HEADER (node)) - fputs (" in_system_header", file); - if (DECL_COMMON (node)) - fputs (" common", file); + fputs (" abstract", file); if (DECL_EXTERNAL (node)) fputs (" external", file); - if (DECL_WEAK (node)) - fputs (" weak", file); - if (DECL_REGISTER (node) && TREE_CODE (node) != FIELD_DECL - && TREE_CODE (node) != FUNCTION_DECL - && TREE_CODE (node) != LABEL_DECL) - fputs (" regdecl", file); if (DECL_NONLOCAL (node)) fputs (" nonlocal", file); + if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)) + { + if (DECL_WEAK (node)) + fputs (" weak", file); + if (DECL_IN_SYSTEM_HEADER (node)) + fputs (" in_system_header", file); + } + if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL) + && TREE_CODE (node) != LABEL_DECL + && TREE_CODE (node) != FUNCTION_DECL + && DECL_REGISTER (node)) + fputs (" regdecl", file); if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node)) fputs (" suppress-debug", file); @@ -357,6 +361,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (TREE_CODE (node) == VAR_DECL && DECL_IN_TEXT_SECTION (node)) fputs (" in-text-section", file); + if (TREE_CODE (node) == VAR_DECL && DECL_COMMON (node)) + fputs (" common", file); if (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL_P (node)) { enum tls_model kind = DECL_TLS_MODEL (node); @@ -384,7 +390,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (DECL_VIRTUAL_P (node)) fputs (" virtual", file); - if (DECL_DEFER_OUTPUT (node)) + if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS) && DECL_DEFER_OUTPUT (node)) fputs (" defer-output", file); if (DECL_PRESERVE_P (node)) @@ -450,13 +456,20 @@ print_node (FILE *file, const char *prefix, tree node, int indent) } print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4); + print_node_brief (file, "attributes", DECL_ATTRIBUTES (node), indent + 4); - print_node_brief (file, "abstract_origin", - DECL_ABSTRACT_ORIGIN (node), indent + 4); - - print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4); - print_node (file, "result", DECL_RESULT_FLD (node), indent + 4); + + if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL)) + { + print_node_brief (file, "abstract_origin", + DECL_ABSTRACT_ORIGIN (node), indent + 4); + } + if (CODE_CONTAINS_STRUCT (code, TS_DECL_NON_COMMON)) + { + print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4); + print_node (file, "result", DECL_RESULT_FLD (node), indent + 4); + } print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4); lang_hooks.print_decl (file, node, indent); @@ -470,8 +483,6 @@ print_node (FILE *file, const char *prefix, tree node, int indent) if (TREE_CODE (node) == PARM_DECL) { print_node (file, "arg-type", DECL_ARG_TYPE (node), indent + 4); - print_node (file, "arg-type-as-written", - DECL_ARG_TYPE_AS_WRITTEN (node), indent + 4); if (DECL_INCOMING_RTL (node) != 0) { |