Geoff Keating [Wed, 9 Feb 2000 01:57:21 +0000 (01:57 +0000)]
dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.
* dwarf2.h (DW_CFA_GNU_negative_offset_extended): New constant.
* dwarf2out.c (dwarf_cfi_name): Print name of new constant.
(reg_save): Use DW_CFA_GNU_negative_offset_extended when needed.
(output_cfi): Handle output of DW_CFA_GNU_negative_offset_extended.
* frame.c (execute_cfa_insn): Handle
DW_CFA_GNU_negative_offset_extended.
Zack Weinberg [Tue, 8 Feb 2000 21:27:02 +0000 (21:27 +0000)]
Makefile.in (GEN_PROTOS_OBJS): Remove libcpp.a.
* Makefile.in (GEN_PROTOS_OBJS): Remove libcpp.a.
(gen_protos.o): Don't depend on cpplib.h or cpphash.h.
(fix-header.o): Don't depend on cpphash.h.
* scan.c (hashstr): New function.
* scan.h: Prototype it.
* fix-header.c: Don't include cpphash.h. Use hashstr.
* gen-protos.c: Don't include cpphash.h or cpplib.h. Use
hashstr. Report hash table statistics. Add private
definition of xrealloc.
Tom Tromey [Tue, 8 Feb 2000 00:26:58 +0000 (00:26 +0000)]
Runtime.java (_load): Declare.
* java/lang/Runtime.java (_load): Declare.
(load, loadLibrary): Wrote in terms of _load.
* java/lang/natRuntime.cc (load): Call JNI_OnLoad if it appears in
library.
(loadLibrary): Likewise.
Include <jni.h>.
(_load): New method.
(loadLibrary, load): Removed.
* libjava.lang/instinit2.out: New file.
* libjava.lang/instinit2.java: New file.
* libjava.lang/instinit.out: New file.
* libjava.lang/instinit.java: New file.
* libjava.lang/anonarray2.out: New file.
* libjava.lang/anonarray2.java: New file.
* libjava.lang/anonarray.out: New file.
* libjava.lang/anonarray.java: New file.
* libjava.lang/nested_with_ctor.out: New file.
* libjava.lang/nested_with_ctor.java: New file.
* libjava.lang/anfi.out: New file.
* libjava.lang/anfi.java: New file.
* libjava.lang/stub.out: New file.
* libjava.lang/stub.java: New file.
* cp-tree.h (struct saved_scope): Add incomplete field.
(namespace_scope_incomplete): New macro.
* decl.c (pushdecl): Use it.
(hack_incomplete_structures): Use it. See through artificial
binding levels.
(mark_saved_scope): Mark it.
Implement access control for nested types.
* search.c (type_access_control): New fn.
(accessible_p): Now we do perform access control for types.
* semantics.c (deferred_type_access_control): New fn.
(initial_deferred_type_access_control): New fn.
(begin_function_definition): Call it. Add lookups parm.
* decl.c (struct binding_level): Add this_class field.
(pushlevel_class): Set it.
(mark_binding_level): Mark it.
(lookup_name_real): Use it. Call type_access_control.
(mark_saved_scope): Mark lookups field.
* cp-tree.h (flagged_type_tree): Add lookups field.
(struct saved_scope): Add lookups field.
(type_lookups): New macro.
* parse.y (declmods): Now <ftype>.
(parse_decl): Add lookups parm. Call
initial_deferred_type_access_control.
(lang_extdef): Clear type_lookups.
(typed_declspecs, declmods, typespec): Set lookups field.
(initdcl): Call deferred_type_access_control.
(fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
component_decl_1, named_parm): Adjust.
* friend.c (is_friend): Nested classes are friends of their
enclosing classes.
* class.c (currently_open_derived_class): New fn.
* method.c (hack_identifier): Use it.
Zack Weinberg [Mon, 7 Feb 2000 18:34:05 +0000 (18:34 +0000)]
[multiple changes]
2000-02-07 Zack Weinberg <zack@wolery.cumb.org>
* cppfiles.c (deps_output): Count spacers in deps_column.
2000-02-07 Neil Booth <NeilB@earthling.net>
* cppinit.c (initialize_dependency_output): If there is no
suffix, don't try to look for known suffixes. Use strrchr.
(cpp_start_read): Remove duplicate initialization.
* cpperror.c (cpp_print_containing_files): Take starting
buffer as argument.
(cpp_file_line_for_message): Rename to cpp_print_file_and_line.
(v_cpp_message): Now called directly by all entry points.
Remove -1 case.
(cpp_pfatal_with_name, cpp_message): Delete.
(cpp_notice_from_errno, cpp_ice): New functions.
(cpp_notice): Is now for reporting error conditions, just
without an associated file.
(cpp_error, cpp_error_with_line): Don't do anything if
opts->inhibit_errors is on.
(cpp_pedwarn_with_file_and_line): Take column argument also.
* cppalloc.c, cppfiles.c: Use fprintf not cpp_notice for
non-error messages. Include intl.h.
* cppinit.c, cppmain.c: Likewise. Also, use
cpp_notice_from_errno instead of cpp_perror_with_name or
cpp_pfatal_with_name, and cpp_notice instead of cpp_message.
* cppexp.c, cpphash.c, cppinit.c, cpplib.c: Use cpp_ice to
report internal errors.
* cpplib.c (do_define): Switch bcopy to memcpy.
Give cpp_pedwarn_with_file_and_line a dummy column argument.
* flow.c (flow_delete_insn, make_edge, remove_edge): Export.
* basic-block.h: Declare them.
* emit-rtl.h (active_insn_p): New.
(next_active_insn, prev_active_insn): Use it.
* rtl.h: Declare it.
* function.c (emit_return_into_block): New.
(thread_prologue_and_epilogue_insns): Insert return insns instead
of epilogues when possible.
* jump.c (jump_optimize_1): Remove code to insert a return insn
on the fallthru to the exit block.
Zack Weinberg [Sun, 6 Feb 2000 08:24:22 +0000 (08:24 +0000)]
cppfiles.c (read_and_prescan): Bump input pointer before possibly branching off to the backslash code.
* cppfiles.c (read_and_prescan) [case SPECCASE_QUESTION]: Bump
input pointer before possibly branching off to the backslash
code.
* cpphash.c (macroexpand): Correctly delete \r escapes when
stringifying parameters.
* cpplib.c (copy_rest_of_line): Go directly to skip_block_comment
if we can; bail out early if we hit a line comment.
(handle_directive): Treat '# 123' in an .S file just like
'# <punctuation>'. Discard the shifted '#' if we hit '#\n'.
Return 1 for '# not_a_directive'.
(get_directive_token): Pop macro buffers here, so that
cpp_get_token can't sneakily move past a newline.
Add sanity checks.
(cpp_get_token): goto randomchar if handle_directive returns 0.
Zack Weinberg [Sun, 6 Feb 2000 06:57:21 +0000 (06:57 +0000)]
tinfo.h: Remove apostrophes from C++ comment (xgettext thinks this file is plain C).
* cp/tinfo.h: Remove apostrophes from C++ comment (xgettext
thinks this file is plain C).
* i386/osf1elf.h: Add missing backslash to multiline string.
* po/POTFILES.in: Remove stupid.c.
* exgettext: s/VPROTO/VPARAMS/ now that we are no longer using
VPROTO.
Zack Weinberg [Sat, 5 Feb 2000 04:56:11 +0000 (04:56 +0000)]
recog.h: Remove NO_MD_PROTOTYPES ifdefs.
* recog.h: Remove NO_MD_PROTOTYPES ifdefs.
* genflags.c: Use the max_operand_1 logic from genemit.c to
calculate how many arguments gen_insn prototypes have. Remove
NO_MD_PROTOTYPES ifdefs from the generated file.
* genoutput.c: Don't define NO_MD_PROTOTYPES in the generated
file. Cast gen_insn initializers to insn_gen_fn.
* config/alpha/vms.h: Don't define NO_MD_PROTOTYPES.
* gcc.texi: Remove documentation of NO_MD_PROTOTYPES.
Bruce Korb [Fri, 4 Feb 2000 21:42:00 +0000 (21:42 +0000)]
genfixes (machname.h): Move the functionality from gen-machine.h into this file.
2000-02-04 Bruce Korb <bkorb@gnu.org>
* fixinc/genfixes(machname.h):
Move the functionality from gen-machine.h into this file.
UNdef MN_NAME_PAT if there are no names to change.
Also, be a little kinder when AutoGen is not present.
* fixinc/Makefile.in(machname.h):
Change the generation rule to use genfixes.
* fixinc/fixfixes.c(machine_name):
machine_name_fix's functionality now dependent upon whether
MN_NAME_PAT is defined.
* fixinc/fixtests.c(machine_name):
ditto.
* fixinc/fixlib.c(mn_get_regexps): conditional on definition
of MN_NAME_PAT.
Jan Hubicka [Fri, 4 Feb 2000 21:40:37 +0000 (22:40 +0100)]
i386.c (SAVE_REGS_FIRST): Remove.
* i386.c (SAVE_REGS_FIRST): Remove.
(ix86_initial_elimination_offset): Handle only SAVE_REGS_FIRST mode.
(ix86_compute_frame_size): Likewise.
(ix86_expand_prologue): Likewise. Use pro_epilogue_adjust_stack.
(ix86_emit_restore_regs): Remove.
(ix86_emit_epilogue_esp_adjustment): Use pro_epilogue_adjust_stack
when a frame pointer is in use.
(ix86_expand_epilogue): Handle only SAVE_REGS_FIRST mode. Use mov
instead of pop to restore a register when profitable; emit leave
when profitable.
(ix86_attr_length_default): Handle pro_epilogue_adjust_stack
as a TYPE_LEA insn.
(ix86_adjust_cost): Handle pro_epilogue_adjust_stack as TYPE_ALU.
* i386.md (prologue_allocate_stack): Remove.
(epilogue_deallocate_stack): Remove.
(pro_epilogue_adjust_stack): New.
Co-Authored-By: Richard Henderson <rth@cygnus.com>
From-SVN: r31792
function.c (diddle_return_value): Rework to use a callback function.
* function.c (diddle_return_value): Rework to use a callback function.
Use current_function_return_rtx if it's been set up.
(do_clobber_return_reg, clobber_return_register): New.
(do_use_return_reg, use_return_register): New.
(expand_function_end): Use them.
* stmt.c (expand_null_return): Likewise.
* function.h: Declare them.
* flow.c (mark_regs_live_at_end): Use diddle_return_value.
(mark_reg): Change arguments as appropriate for callback.
* integrate.c (expand_inline_function): Revert 19 Jan change.
* defineclass.cc (handleMethodsBegin): Allocate _Jv_MethodBase
pointers.
(handleMethodsEnd): Fixed error messages. Create a _Jv_JNIMethod
if the method is native.
* resolve.cc (ncode): Don't handle native methods.
(_Jv_JNIMethod::ncode): New method.
(_Jv_PrepareClass): Handle native methods.
* jni.cc (call): Renamed from _Jv_JNI_conversion_call.
Include AbstractMethodError.h.
(add_char): New function.
(mangled_name): Likewise.
* include/java-interp.h (class _Jv_JNIMethod): New class.
(class _Jv_MethodBase): New class.
(class _Jv_InterpMethod): Derive from _Jv_MethodBase.
(_Jv_InterpClass): Changed `interpreted_methods' field to type
`_Jv_MethodBase'.
* include/jvm.h (_Jv_FindSymbolInExecutable): Declare.
* java/lang/natRuntime.cc (libraries_size, libraries_count,
libraries): New globals.
(add_library): New function.
(_Jv_FindSymbolInExecutable): New function.
* java/lang/natClassLoader.cc (initiated_classes, loaded_classes):
Now static.
Andrew Haley [Fri, 4 Feb 2000 16:59:35 +0000 (16:59 +0000)]
Throwable.java (CPlusPlusDemangler): New class.
2000-02-04 Andrew Haley <aph@cygnus.com>
* java/lang/Throwable.java (CPlusPlusDemangler): New class.
(printStackTrace): Use a CPlusPlusDemangler to demangle names.
* java/lang/natThrowable.cc (printRawStackTrace): Rename
printStackTrace to printRawStackTrace.
Tom Tromey [Thu, 3 Feb 2000 18:26:51 +0000 (18:26 +0000)]
Calendar.java (toString): New method.
* java/util/Calendar.java (toString): New method.
* java/util/SimpleTimeZone.java (clone): New method.
(toString): New method.
* java/util/TimeZone.java (clone): New method.
* java/text/SimpleDateFormat.java (clone): New method.
* java/text/NumberFormat.java (clone): New method.
(equals): New method.
* java/text/Format.java (clone): New method.
* java/text/DateFormatSymbols.java (DateFormatSymbols): New
constructor.
(clone): New method.
* java/text/DateFormat.java (clone): New method.
* java/text/Collator.java (clone): New method.
Scott Bambrough [Thu, 3 Feb 2000 06:46:30 +0000 (06:46 +0000)]
gjavah.c (D_NAN_MASK): Alternate definition required when HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
2000-01-31 Scott Bambrough <scottb@netwinder.org>
* gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
(java_float_finite): Convert to use union Word from javaop.h.
(java_double_finite): Convert to use union DWord from javaop.h.
Tom Tromey [Thu, 3 Feb 2000 06:13:46 +0000 (06:13 +0000)]
gjavah.c (options): Added `jni' entry.
* gjavah.c (options): Added `jni' entry.
(help): Document -jni.
(flag_jni): New global.
(process_file): Handle JNI output. Don't print text from
-prepend, -add, etc, when generating stubs. Only remove `.class'
suffix if it actually exists.
(main): Create a `.c' file when run with `--jni --stubs'. Create
correct output file name with `--jni'.
(print_include): Mangle header name differently in JNI case.
(HANDLE_METHOD): In JNI mode, call print_method_info to generate
method list.
(print_method_info): Handle JNI case. Put signature info into
method name. Handle case when STREAM is NULL.
(print_name_for_stub_or_jni): New function.
(print_stub_or_jni): Renamed from `print_stub'. Handle JNI.
(print_cxx_classname): Handle JNI.
(print_full_cxx_name): Likewise.
(decode_signature_piece): Likewise.
(overloaded_jni_method_exists_p): New function.
(struct method_name): Added `signature' and `sig_length' fields.
(HANDLE_END_FIELD): Do nothing in JNI mode.
Zack Weinberg [Wed, 2 Feb 2000 21:41:35 +0000 (21:41 +0000)]
cpplib.h (cpp_reader): Add new flag, no_directives.
* cpplib.h (cpp_reader): Add new flag, no_directives.
* cpphash.c (macarg): Set it.
* cpplib.c (handle_directive): If no_directives is on and we
find a directive, issue an error and discard the line.