partial merge for isgnature stuff

From-SVN: r7680
This commit is contained in:
Gerald Baumgartner 1994-07-08 20:22:37 +00:00 committed by Mike Stump
parent a98b1078b7
commit 311862c8be
4 changed files with 58 additions and 1 deletions

View File

@ -1,3 +1,15 @@
Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
* cp-tree.h (walk_sigtables): Created extern declaration.
* decl2.c (walk_sigtables): Created function, patterned after
walk_vtables, even though we only need it to write out sigtables.
(finish_sigtable_vardecl): Created function.
(finish_vtable_vardecl): Changed 0 to NULL_PTR.
(finish_file): Call walk_sigtables.
* sig.c (build_signature_table_constructor): Mark class member
function pointed to from signature table entry as addressable.
Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
* except.c (init_exception_processing): Setup interim_eh_hook to

View File

@ -1984,6 +1984,7 @@ extern void finish_builtin_type PROTO((tree, char *, tree *, int, tree));
extern tree coerce_new_type PROTO((tree));
extern tree coerce_delete_type PROTO((tree));
extern void walk_vtables PROTO((void (*)(), void (*)()));
extern void walk_sigtables PROTO((void (*)(), void (*)()));
extern void finish_file PROTO((void));
extern void warn_if_unknown_interface PROTO((void));
extern tree grok_x_components PROTO((tree, tree));

View File

@ -2439,7 +2439,7 @@ finish_vtable_vardecl (prev, vars)
}
#endif /* DWARF_DEBUGGING_INFO */
rest_of_decl_compilation (vars, 0, 1, 1);
rest_of_decl_compilation (vars, NULL_PTR, 1, 1);
}
else if (TREE_USED (vars) && flag_vtable_thunks)
assemble_external (vars);
@ -2474,6 +2474,48 @@ walk_vtables (typedecl_fn, vardecl_fn)
}
}
static void
finish_sigtable_vardecl (prev, vars)
tree prev, vars;
{
/* We don't need to mark sigtable entries as addressable here as is done
for vtables. Since sigtables, unlike vtables, are always written out,
that was already done in build_signature_table_constructor. */
rest_of_decl_compilation (vars, NULL_PTR, 1, 1);
/* We know that PREV must be non-zero here. */
TREE_CHAIN (prev) = TREE_CHAIN (vars);
}
void
walk_sigtables (typedecl_fn, vardecl_fn)
register void (*typedecl_fn)();
register void (*vardecl_fn)();
{
tree prev, vars;
for (prev = 0, vars = getdecls (); vars; vars = TREE_CHAIN (vars))
{
register tree type = TREE_TYPE (vars);
if (TREE_CODE (vars) == TYPE_DECL
&& type != error_mark_node
&& IS_SIGNATURE (type))
{
if (typedecl_fn) (*typedecl_fn) (prev, vars);
}
else if (TREE_CODE (vars) == VAR_DECL
&& TREE_TYPE (vars) != error_mark_node
&& IS_SIGNATURE (TREE_TYPE (vars)))
{
if (vardecl_fn) (*vardecl_fn) (prev, vars);
}
else
prev = vars;
}
}
extern int parse_time, varconst_time;
#define TIMEVAR(VAR, BODY) \
@ -2756,6 +2798,7 @@ finish_file ()
#endif
walk_vtables ((void (*)())0, finish_vtable_vardecl);
walk_sigtables ((void (*)())0, finish_sigtable_vardecl);
for (vars = getdecls (); vars; vars = TREE_CHAIN (vars))
{

View File

@ -591,6 +591,7 @@ build_signature_table_constructor (sig_ty, rhs)
offset = integer_zero_node;
pfn = build_unary_op (ADDR_EXPR, rhs_method, 0);
TREE_TYPE (pfn) = ptr_type_node;
TREE_ADDRESSABLE (rhs_method) = 1;
}
tbl_entry = tree_cons (NULL_TREE, code,