Bernd Schmidt [Mon, 9 Aug 1999 14:00:21 +0000 (14:00 +0000)]
Include function.h in most files.
Include function.h in most files. Remove most of the global variables
duplicated in function.h. Add accessor macros for them which access
current_function. Delete INLINE_HEADER rtx and related code, replace
with code using struct function to store inlining related data.
Jason Merrill [Mon, 9 Aug 1999 10:45:00 +0000 (10:45 +0000)]
semantics.c (begin_function_try_block, [...]): New fns.
* semantics.c (begin_function_try_block, finish_function_try_block,
finish_function_handler_sequence): New fns.
* parse.y (function_try_block): Use them.
* pt.c (instantiate_decl): Likewise.
* cp-tree.h: Declare in_function_try_handler.
* decl.c: Define it.
(start_function): Clear it.
(struct cp_function, push_cp_function_context): Save it.
(pop_cp_function_context): Restore it.
* parse.y (function_try_block): Set and clear it.
* except.c (expand_end_catch_block): Rethrow if we reach the end
of a function-try-block handler in a ctor or dtor.
* typeck.c (c_expand_return): Complain about returning from a
function-try-block handler of a ctor.
* parse.y (function_try_block): Call end_protect_partials
before expand_start_all_catch.
* Makefile.in: Rebuilt.
* Makefile.am (libffi_files): Identify the libffi object files for
inclusion in libgcj.
(LIBFFIINCS): Define.
* interpret.cc (gnu::gcj::runtime::MethodInvocation::continue1):
Dummy definition for configurations without an interpreter.
* java/net/natPlainSocketImpl.cc (getOption): Disamiguate call to
java::lang::Boolean constructor.
* include/java-interp.h: Always include java-cpool.h.
* java/lang/natClassLoader.cc (getVMClassLoader0): Always return 0
when INTERPRETER not defined.
* java/lang/Class.h (finalize): Define.
* gnu/gcj/util/path/DirectoryPathEntry.java (getURL): Catch
IOException from File.getCanonicalPath.
(getStream): Likewise.
* NEWS: More news.
* THANKS: More thanks.
1999-08-09 Kresten Krab Thorup <krab@gnu.org>
* resolve.cc (get_ffi_type_from_signature): Generate uint16 for
jchar type.
(_Jv_PrepareClass): Allow non-abstract classes to
have abstract subclasses.
(_Jv_ResolvePoolEntry): Revert subclass check for protected
fields and methods.
* interpret.cc (continue1/perform_invoke): Don't sign extend
uint16 return val.
(continue1/lshl,lshr): Push long, not int.
(continue1/ulshr): Use UINT64, not long long.
* defineclass.cc (handleFieldsEnd): Handle case when all fields
are static.
* java/lang/natClass.cc (forName): Add call to _Jv_InitClass.
* java/lang/FirstThread.java (run): Add top-level exception
handler.
(run0): Renamed from run.
* java/lang/ClassLoader.java: File replaced.
* java/lang/VMClassLoader.java: New file.
* java/lang/natClassLoader.cc: New file.
* gnu/gcj/runtime/MethodInvocation.java: New file.
* gnu/gcj/util/path/SearchPath.java: New file.
* gnu/gcj/util/path/PathEntry.java: New file.
* gnu/gcj/util/path/DirectoryPathEntry.java: New file.
* gnu/gcj/util/path/ZipPathEntry.java: New file.
* gnu/gcj/util/path/URLPathEntry.java: New file.
* gnu/gcj/util/path/CacheEntry.java: New file.
* include/java-interp.h: New file.
* include/java-cpool.h: New file.
* include/java-insns.h: New file.
* defineclass.cc: New file.
* interpret.cc: New file.
* resolve.cc: New file.
* java/lang/natClass.cc (loaded_classes, _Jv_RegisterClass,
_Jv_RegisterClasses, _Jv_FindClassInCache, _Jv_FindClass,
_Jv_NewClass, _Jv_FindArrayClass): Moved to natClassLoader.cc.
(finalize): New.
(STATE_NOTHING, STATE_RESOLVED, STATE_IN_PROGRESS, STATE_DONE,
STATE_ERROR): Moved to java/lang/Class.h and renamed with JV_
prefix.
(initializeClass): Use new JV_ prefixed names. Also, call
ClassLoader::resolveClass instead of _Jv_ResolveClass.
* java/lang/Class.h (JV_STATE_PRELOADING, JV_STATE_LOADING,
JV_STATE_LOADED, JV_STATE_COMPILED, JV_STATE_PREPARED,
JV_STATE_LINKED): New.
(_Jv_WaitForState, _Jv_RegisterInitiatingLoader,
_Jv_UnregisterClass, _Jv_InternClassStrings): New friends.
(_Jv_IsInterpretedClass, _Jv_InitField, _Jv_LookupDeclaredMethod,
_Jv_DetermineVTableIndex, _Jv_ResolvePoolEntry, _Jv_PrepareClass,
_Jv_ClassReader, _Jv_InterpClass, _Jv_InterpMethod,
_Jv_InterpMethodInvocation): New friends for interpreter.
(finalize): New.
(CONSTANT_Class, CONSTANT_String, etc.): Moved to
include/java-cpool.h and renamed with JV_ prefix.
* include/jvm.h (_Jv_makeUtf8Const, _Jv_makeUtf8TypeConst): New
decls.
(_Jv_UnregisterClass): New decl.
* java/lang/natClassLoader.cc (_Jv_FindArrayClass): Added
class loader argument.
(_Jv_FindClass): Use class loader.
* prims.cc (_Jv_makeUtf8Const): New function.
(_Jv_NewObjectArray): Change use of _Jv_FindArrayClass.
(_Jv_NewPrimArray): Ditto.
(_Jv_FindClassFromSignature): Ditto.
* java/lang/reflect/natArray.cc (newInstance): Ditto.
* java/lang/reflect/natMethod.cc (getType): Ditto.
* include/java-field.h (_Jv_Field::isRef): Make robust for
non-resolved contexts.
* boehm.cc (_Jv_MarkObj): Mark interpreter-related fields.
Also, don't mark class->next field.
* lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
read_line_number): Add static prototype.
(opname_tab, assignop_tab, operator_name_string): Constify a char*.
(real_yylex): Move label `letter' into the scope where it is used.
* method.c (build_mangled_template_parm_index, build_overload_int,
build_decl_overload_real, get_id_2): Constify a char*.
* search.c (check_final_overrider): Make static.
* typeck.c (composite_pointer_type): Constify a char*.
* function.c (init_function_start): Clear prologue & epilogue.
(prologue_epilogue_contains): New function.
* alias.c (init_alias_analysis): Use it.
* rtl.h (prologue_epilogue_contains): Declare it.
* jump.c (onlyjump_p): New function.
* rtl.h: Declare it.
* flow.c (delete_unreachable_blocks): Use onlyjump_p instead
of condjump_p in calling tidy_fallthru_edge and merge_blocks.
liteelf.h: New file to support sparclite-elf target
* config/sparc/liteelf.h: New file to support sparclite-elf target
* config/sparc/t-sp86x: New file to support sparc86x targets
* config/sparc/sp86x-aout.h: New file to support sparc86x-aout target
* config/sparc/sp86x-elf.h: New file to support sparc86x-elf target
* configure.in: Support above target triplets
* configure: Regenerated
Andreas Schwab [Sat, 7 Aug 1999 06:02:05 +0000 (06:02 +0000)]
iostream.cc: Add missing calls to isfx and setup a cleanup region for the locked stream.
* iostream.cc: Add missing calls to isfx and setup a cleanup
region for the locked stream.
* iostream.h: Likewise.
* isgetline.cc: Likewise.
* isgetsb.cc: Likewise.
* isscan.cc: Likewise.
Jason Merrill [Sat, 7 Aug 1999 01:01:54 +0000 (01:01 +0000)]
decl.c (lookup_name_real): Set the complain flag if we're looking for a namespace member.
* decl.c (lookup_name_real): Set the complain flag if we're
looking for a namespace member.
* lex.c (real_yylex): We can have a number with no digits.
* cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
* search.c (binfo_from_vbase): New fn.
* cp-tree.h: Declare it.
* cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
from pointer to member of virtual base.
* typeck.c (get_delta_difference): Likewise.
John Wehle [Fri, 6 Aug 1999 20:55:42 +0000 (20:55 +0000)]
jump.c (delete_prior_computation): New function, broken out of delete_computation.
* jump.c (delete_prior_computation): New function, broken
out of delete_computation. Check for side effects with
side_effects_p instead of FIND_REG_INC_NOTE. Handle
multi-word hard registers.
(delete_computation): Use it. Check for side effects with
side_effects_p instead of FIND_REG_INC_NOTE. Synthesize a
missing REG_DEAD note for a register which is both set and
used by an insn.
Alexandre Oliva [Fri, 6 Aug 1999 20:44:44 +0000 (20:44 +0000)]
pt.c (tsubst): Use build_index_type to build in-template array index type.
* pt.c (tsubst): Use build_index_type to build in-template array
index type. Fixes g++.oliva/dwarf1.C.
* decl.c (grokdeclarator): Likewise, just for consistency, as it
doesn't seem to trigger the bug without it.
Mark Mitchell [Fri, 6 Aug 1999 18:20:27 +0000 (18:20 +0000)]
error.c (dump_expr): Handle EXACT_DIV_EXPR.
* error.c (dump_expr): Handle EXACT_DIV_EXPR.
(dump_binary_op): Bulletproof.
* lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
* tree.c (search_tree): Don't enumerate all the nodes of classes
`1', `2', and `<'; handle them generically. Don't be sorry about
"unrecognized tree codes"; just abort.
(no_linkage_check): Don't do linkage checks for templates.
rs6000.c (current_file_function_operand): Return zero for weak functions.
* rs6000.c (current_file_function_operand): Return zero for
weak functions.
(rs6000_encode_section_info): Do not set SYMBOL_REF_FLAG for
weak symbols.
* rs6000.h (ENCODE_SECTION_NIFO): Do not set SYMBOL_REF_FLAG
for weak symbols.
Zack Weinberg [Wed, 4 Aug 1999 20:39:33 +0000 (20:39 +0000)]
cpphash.c (macroexpand): Delete leading whitespace when arg is concatenated before.
Wed Aug 4 13:29:23 1999 Zack Weinberg <zack@bitmover.com>
* cpphash.c (macroexpand): Delete leading whitespace when arg
is concatenated before.
(unsafe_chars): Correct test for whether + and - can extend a
token.
* cppinit.c (cpp_start_read): Do dependencies for
-include/-imacros files also.
* cpplib.c (cpp_scan_buffer): In no-output mode, don't bother
tokenizing non-directive lines.
(cpp_expand_to_buffer): Temporarily disable no-output mode.
* cppmain.c: In no-output mode, just call cpp_scan_buffer for
the input file.
Jason Merrill [Wed, 4 Aug 1999 19:55:31 +0000 (15:55 -0400)]
c-lex.c: Sync with C++ frontend.
* c-lex.c: Sync with C++ frontend.
(linemode): New variable.
(parse_float): imag, conversion_errno, and type are output only.
(yylex): Adjust. Move initial '.' case into main switch.
Use linemode.
(handle_generic_pragma): Just deal with tokens.
(readescape): Use ISXDIGIT and ISGRAPH.
* c-parse.in: Add END_OF_LINE token.
* c-lex.c (lang_init): Generalize.
(nextchar): Remove. Replace uses with UNGETC.
(skip_white_space): Handle linemode here. Optimize for cpplib.
(skip_white_space_on_line): Remove.
(extend_token_buffer_to): New fn.
(extend_token_buffer): Use it.
(read_line_number, check_newline): Just deal with tokens.
(token_getch, token_put_back): New fns.
(yylex): Use them. More cpplib optimizations. Simplify.
* c-lex.c (init_parse): Set cpp_token to CPP_DIRECTIVE.
(consume_string): Make this smart about USE_CPPLIB.
(check_newline): Rewrite to be intelligent about USE_CPPLIB.
(yylex): Rewrite to be intelligent about USE_CPPLIB.
Also, clean up cases where we redundantly set token_buffer[0].
(read_line_number): New fn.
(ignore_escape_flag): New variable.
Jeffrey A Law [Wed, 4 Aug 1999 19:27:02 +0000 (19:27 +0000)]
pa.md (divsi3, [...]): Clobber a new dummy operand.
* pa.md (divsi3, udivsi3, modsi3, umodsi3 expanders): Clobber a new
dummy operand. Allocate a new pseudo for the dummy operand.
(divsi3, udivsi3, modis3, umodsi3 patterns): Corresponding changes.
arm.c (typedef minipool_node): Renamed from pool_node.
* arm.c (typedef minipool_node): Renamed from pool_node.
(minipool_vector, minipool_size, minipool_vector_label): Similarly.
(add_minipool_constant): New function.
(dump_minipool): New function.
(find_barrier): Remove special case for getting the insn size of
an insn that references the constant pool.
(minipool_fixup): New structure.
(push_minipool_barrier): New function.
(push_minipool_fix): New function.
(note_invalid_constants): New function.
(add_pool_constant, dump_table, fixit, broken_move): Delete.
(arm_reorg): Rewrite code to fix up the constant pool into a
series of mini-pools embedded in the insn stream.
(arm_output_epilogue): New function, made mainly from the body
of output_func_epilogue.
(output_func_epilogue): Move insn generation part of epilogue code
to arm_output_epilogue.
* arm.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Delete.
* arm.md (pool_range): New attribute.
(zero_extendqidi2): Add attribute pool_range.
(zero_extend_hisi_insn, load_extendqisi, extendhisi_insn,
extendqihi_insn, extendqisi_insn, movdi, movsi_insn, pic_load_addr,
pic_load_addr_based_insn, movhi_insn_arch4, movhi_insn_littleend,
movhi_insn_bigend, loadhi_si_bigend, movsf_hard_insn, movsf_soft_insn,
movdf_hard_insn, movdf_soft_insn, movxf_hard_insn): Likewise.
(epilogue): New expand.
(epilogue_insn): New insn. Call arm_output_epilogue.
* arm.c (arm_poke_function_name): Undo change of July 17. Tidy up.
* arm.h (TARGET_SWITCHES): Add missing doc string for TARGET_DEFAULT.
Nathan Sidwell [Wed, 4 Aug 1999 09:07:51 +0000 (09:07 +0000)]
cp-tree.h (empty_except_spec): New global var.
* cp-tree.h (empty_except_spec): New global var.
(compexcepttypes): Remove prototype.
(comp_except_specs): Prototype new global function.
(add_exception_specifier): Prototype new global function.
* decl.c (empty_except_spec): Define new global var.
(duplicate_decls): Use comp_except_specs, reword error message.
(init_decl_processing): Initialize empty_except_spec.
Adjust build_exception_variant calls.
* parse.y (exception_specification_opt): Use empty_except_spec.
(ansi_raise_identifier): Call check_for_new_type.
(ansi_raise_identifiers): Use add_exception_specifier.
* pt.c (tsubst): Use add_exception_specifier to build exception
specifier.
* search.c (check_final_overrider): New static function, broken
out of get_matching_virtual. Check throw specifiers, reword
diagnostics.
(get_matching_virtual): Use check_final_overrider.
* tree.c (build_exception_variant): Use comp_except_specs.
* typeck.c (compexcepttypes): Remove.
(comp_except_types): New static function, helper for
comp_except_specs. Compare two types as exception specifiers.
(comp_except_specs): New global function, compare two exception
specifiers.
(comptypes): Adjust for comp_except_specs.
* typeck2.c (add_exception_specifier): New global function.