summaryrefslogtreecommitdiff
path: root/gcc/cp/dump.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-23 01:14:40 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-23 01:14:40 +0000
commit2b82dde2bca844ab4e3e4d076f93a536634d5da8 (patch)
treed353106ea48473adbbbe826b110e6044aa4595b7 /gcc/cp/dump.c
parent04081d719effb3a75a47f72bda3045bbf8c648a3 (diff)
downloadgcc-2b82dde2bca844ab4e3e4d076f93a536634d5da8.tar.gz
* cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
(BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise. (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset a tree, not an int. (THUNK_GENERATE_WITH_VTABLE_P): New macro. (make_thunk): Change prototype. (emit_thunk): Rename to use_thunk. (mangle_thunk): Change prototype. * class.c (get_derived_offset): Simplify. (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and BV_GENERATE_THUNK_WITH_VTABLE_P. (build_primary_vtable): Simplify. (add_virtual_function): Use BV_FN, rather than TREE_VALUE. (dfs_find_base): Remove. (update_vtable_entry_for_fn): Correct bug in finding the base where a virtual function was first declared. Figure out whether or not to emit a vcall-thunk with the vtables in which it appears. Correct logic for deciding whether to use an ordinary thunk, or a vcall thunk. (finish_struct_1): Remove unnecssary code. (build_vtbl_initializer): Use ssize_int for the running counter of negative indices. (build_vtbl_initializer): Only use vcall thunks where necessary. Mark thunks as needing to be emitted with their vtables, or not. (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in indices. Use size_binop. (dfs_build_vcall_offset_vtbl_entries): Don't rely on BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use size_binop. (build_rtti_vtbl_entries): Adjust call to build_vtable_entry. (build_vtable_entry): Mark thunks as needing to be emitted with their vtables, or not. * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk. * decl2.c (mark_vtable_entries): Use use_thunk instead of emit_thunk. * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk information. * error.c (dump_expr): Use BV_FN. * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree, not an int. * method.c (make_thunk): Likewise. (emit_thunk): Rename to use_thunk. Allow callers to decide whether or not to actually emit the thunk. Adjust for changes in representation of vcall offsets. * search.c (dfs_get_pure_virtuals): Use BV_FN. * semantics.c (emit_associated_thunks): New function. (expand_body): Use it. * ir.texi: Adjust decriptions of thunks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/dump.c')
-rw-r--r--gcc/cp/dump.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index ca3baa0a3c2..9b711062070 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -566,7 +566,7 @@ dequeue_and_dump (di)
dump_string(di, "extern");
else
dump_string (di, "static");
- if (TREE_CODE (t) == FUNCTION_DECL)
+ if (!DECL_THUNK_P (t))
{
if (DECL_FUNCTION_MEMBER_P (t))
dump_string (di, "member");
@@ -578,13 +578,6 @@ dequeue_and_dump (di)
dump_string (di, "operator");
if (DECL_CONV_FN_P (t))
dump_string (di, "conversion");
- if (DECL_THUNK_P (t))
- {
- dump_string (di, "thunk");
- dump_int (di, "dlta", THUNK_DELTA (t));
- dump_int (di, "vcll", THUNK_VCALL_OFFSET (t));
- dump_child ("fn", DECL_INITIAL (t));
- }
if (DECL_GLOBAL_CTOR_P (t) || DECL_GLOBAL_DTOR_P (t))
{
if (DECL_GLOBAL_CTOR_P (t))
@@ -600,8 +593,10 @@ dequeue_and_dump (di)
}
else
{
+ dump_string (di, "thunk");
dump_int (di, "dlta", THUNK_DELTA (t));
- dump_child ("init", DECL_INITIAL (t));
+ dump_child ("vcll", THUNK_VCALL_OFFSET (t));
+ dump_child ("fn", DECL_INITIAL (t));
}
break;