+Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl2.c (finish_file): Also use sentries for vars with
+ DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
+ created).
+
+ * lex.c (handle_cp_pragma): Disable #pragma
+ interface/implementation if SUPPORTS_ONE_ONLY > 1.
+
+Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
+
+ * method.c (emit_thunk): Wrap default case in
+ temporary/permanent_allocation.
+
+ * method.c (make_thunk): Use DECL_ONE_ONLY.
+ (emit_thunk): Call assemble_end_function.
+
Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
if (TYPE_NEEDS_DESTRUCTOR (type) && ! TREE_STATIC (vars)
&& ! DECL_EXTERNAL (decl))
{
+ int protect = (TREE_PUBLIC (decl) && (DECL_COMMON (decl)
+#ifdef DECL_ONE_ONLY
+ || DECL_ONE_ONLY (decl)
+#endif
+ || DECL_WEAK (decl)));
+
temp = build_cleanup (decl);
- if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
+ if (protect)
{
tree sentry = get_sentry (DECL_ASSEMBLER_NAME (decl));
sentry = build_unary_op (PREDECREMENT_EXPR, sentry, 0);
expand_expr_stmt (temp);
- if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
+ if (protect)
expand_end_cond ();
}
}
if (TREE_CODE (decl) == VAR_DECL)
{
+ int protect = (TREE_PUBLIC (decl) && (DECL_COMMON (decl)
+#ifdef DECL_ONE_ONLY
+ || DECL_ONE_ONLY (decl)
+#endif
+ || DECL_WEAK (decl)));
+
/* Set these global variables so that GDB at least puts
us near the declaration which required the initialization. */
input_filename = DECL_SOURCE_FILE (decl);
DECL_CLASS_CONTEXT (current_function_decl) = DECL_CONTEXT (decl);
DECL_STATIC_FUNCTION_P (current_function_decl) = 1;
- if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
+ if (protect)
{
tree sentry = get_sentry (DECL_ASSEMBLER_NAME (decl));
sentry = build_unary_op (PREINCREMENT_EXPR, sentry, 0);
else
expand_assignment (decl, init, 0, 0);
- if (DECL_COMMON (decl) && TREE_PUBLIC (decl))
+ if (protect)
expand_end_cond ();
DECL_CLASS_CONTEXT (current_function_decl) = NULL_TREE;
}
main_filename = TREE_STRING_POINTER (yylval.ttype);
}
+
+#ifdef SUPPORTS_ONE_ONLY
+ if (SUPPORTS_ONE_ONLY > 1)
+ return 1;
+#endif
while (token != END_OF_LINE)
{
token = real_yylex ();
}
+#ifdef SUPPORTS_ONE_ONLY
+ if (SUPPORTS_ONE_ONLY > 1)
+ return 1;
+#endif
+
if (write_virtuals == 3)
{
struct impl_files *ifiles = impl_file_chain;
#include "hard-reg-set.h"
#include "flags.h"
+#ifndef SUPPORTS_ONE_ONLY
+#define SUPPORTS_ONE_ONLY 0
+#endif
+
/* TREE_LIST of the current inline functions that need to be
processed. */
struct pending_inline *pending_inlines;
DECL_INITIAL (thunk) = function;
THUNK_DELTA (thunk) = delta;
DECL_EXTERNAL (thunk) = 1;
- TREE_PUBLIC (thunk) = 0;
+#ifdef DECL_ONE_ONLY
+ if (SUPPORTS_ONE_ONLY)
+ {
+ DECL_ONE_ONLY (thunk) = 1;
+ TREE_PUBLIC (thunk) = 1;
+ }
+ else
+#endif
+ TREE_PUBLIC (thunk) = 0;
/* So that finish_file can write out any thunks that need to be: */
pushdecl_top_level (thunk);
}
TREE_ASM_WRITTEN (thunk_fndecl) = 1;
+ TREE_ADDRESSABLE (function) = 1;
+ mark_used (function);
+
decl_printable_name = thunk_printable_name;
if (current_function_decl)
abort ();
current_function_decl = thunk_fndecl;
- TREE_ADDRESSABLE (function) = 1;
- mark_used (function);
#ifdef ASM_OUTPUT_MI_THUNK
assemble_start_function (thunk_fndecl, fnname);
ASM_OUTPUT_MI_THUNK (asm_out_file, thunk_fndecl, delta, function);
+ assemble_end_function (thunk_fndecl, fnname);
#else
init_function_start (thunk_fndecl, input_filename, lineno);
pushlevel (0);
expand_start_bindings (1);
+ temporary_allocation ();
+
/* Start updating where the next arg would go. */
INIT_CUMULATIVE_ARGS (args_so_far, TREE_TYPE (function), NULL_RTX, 0);
stack_args_size.constant = 0;
/* Cancel the effect of rtl_in_current_obstack. */
- resume_temporary_allocation ();
+ permanent_allocation (1);
+#endif /* ASM_OUTPUT_MI_THUNK */
decl_printable_name = save_decl_printable_name;
-#endif /* ASM_OUTPUT_MI_THUNK */
current_function_decl = 0;
}
\f