Commit Graph

23393 Commits

Author SHA1 Message Date
Jason Merrill
607eef6e92 new
From-SVN: r28766
1999-08-19 17:18:22 -04:00
Alexandre Petit-Bianco
79d133336a re GNATS gcj/17 (Internal error: segfault on import-classname clash)
Thu Aug 19 10:26:18 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (method_header): Return a null pointer if the current
        class node is null.
        (finish_method_declaration): Return if the current function decl
        is null.
        (source_start_java_method): Likewise.
        (java_method_add_stmt): Likewise.

This fixes the net PR #17.

From-SVN: r28765
1999-08-19 13:37:04 -07:00
Jason Merrill
852be00c00 new
From-SVN: r28764
1999-08-19 14:45:07 -04:00
Jason Merrill
b736d71688 tweak
From-SVN: r28763
1999-08-19 14:44:59 -04:00
John Wehle
7790df190a alias.c: Include tree.h.
* alias.c: Include tree.h.
	(nonlocal_reference_p, mark_constant_function): New functions.
	* flow.c (life_analysis): Call mark_constant_function.
	* rtl.h (mark_constant_function): Declare it.

From-SVN: r28762
1999-08-19 15:53:10 +00:00
Nick Clifton
4406229e16 Fix test for unrecognisable switches.
From-SVN: r28761
1999-08-19 14:03:05 +00:00
Mark Mitchell
40242ccfbd cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
* cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
	* decl2.c (build_expr_from_tree): Handle it.
	* error.c (dump_expr): Likewise.
	* pt.c (for_each_template_parm): Likewise.
	(tsubst_copy): Likewise.
	* tree.c (search_tree): Likewise.
	* semantics.c (finish_pseudo_destructor_call): Create it.

From-SVN: r28760
1999-08-19 08:06:17 +00:00
Jeff Law
4c44366adb Daily bump.
From-SVN: r28759
1999-08-19 01:45:08 -06:00
Alexandre Petit-Bianco
5cbdba6424 [multiple changes]
Wed Aug 18 13:17:15 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* class.c (emit_register_class): Removed unnecessary call to
 	start_sequence.
	* parse.y (labeled_block_contains_loop_p): Removed unused local
 	variable.

Tue Aug 17 22:51:44 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (java_refold): Added prototype.

Tue Aug 17 21:48:41 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>

        * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
        (java_stabilize_reference): Removed unnecessary `else'.
        (java_complete_lhs): Set flag to remember boolean. Call
        java_refold. Added comments.
        (java_decl_equiv): New function.
        (binop_compound_p): Likewise.
        (java_refold): Likewise.
        (patch_unaryop): Striped static field access assigned to decl and
        op. Changed promotion scheme for ++/-- operators.
        (search_loop): New function.
        (labeled_block_contains_loop_p): Likewise.
        (patch_loop_statement): Call labeled_block_contains_loop_p. Added
        comment.
        (patch_bc_statement): Call search_loop. Fixed comment.

Mostly bug fixes in some forms of compound expressions and
break/continue target lookup.

From-SVN: r28758
1999-08-18 17:53:20 -07:00
J"orn Rennecke
0aa487d534 loop.c (recombine_givs): Set ix field after sorting.
* loop.c (recombine_givs): Set ix field after sorting.
	(recombine_givs): Remove bogus index / giv lockstep looping.

From-SVN: r28757
1999-08-18 23:35:14 +01:00
Mark Mitchell
dfe2b0b3b5 search.c (setup_class_bindings): Robustify.
* search.c (setup_class_bindings): Robustify.
	* typeck.c (common_type): Use same_type_p, not pointer equality,
	to compare types.

From-SVN: r28756
1999-08-18 22:11:10 +00:00
Mark Mitchell
4ce3d53730 cp-tree.h (build_lang_field_decl): Remove.
* cp-tree.h (build_lang_field_decl): Remove.
	* class.c (build_vtable): Replace calls to build_lang_field_decl
	with build_lang_decl.
	(prepare_fresh_vtable): Likewise.
	(finish_struct_1): Likewise.
	(init_class_processing): Likewise.
	* decl.c (push_using_decl): Likewise.
	(init_decl_processsing): Likewise.
	(grokvardecl): Likewise.
	(build_ptrmemfunc_type): Likewise.
	(grokdeclarator): Likewise.
	(build_enumerator): Likewise.
	* decl2.c (grok_x_components): Likewise.
	(do_class_using_decl): Likewise.
	* except.c (call_eh_info): Likewise.
	* init.c (init_init_processing): Likewise.
	* rtti.c (expand_class_decl): Likewise.
	* tree.c (build_base_fields): Likewise.
	(build_vbase_pointer_fields): Likewise.
	* lex.c (build_lang_decl): Build declarations on the permanent
	obstack if we're building statmeent trees.
	(retrofit_lang_decl): Handle both the full lang_decl and also the
	smaller lang_decl_flags here.
	(build_lang_field_decl): Remove.
	* pt.c (push_template_decl_real): Issue errors for variable
	declarations that are not static members.

From-SVN: r28755
1999-08-18 20:44:14 +00:00
Richard Henderson
88049523ae tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
* tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
        (mapcar): Likewise.

From-SVN: r28754
1999-08-18 13:05:08 -07:00
Tom Tromey
5a0eb8326f ThreadGroup.java: Fixed now-erroneous comment.
* java/lang/ThreadGroup.java: Fixed now-erroneous comment.
	* java/lang/natThread.cc (finish_): Call ThreadGroup.remove.

From-SVN: r28753
1999-08-18 19:51:23 +00:00
Bernd Schmidt
b30f05db01 Combined compare & jump infrastructure
From-SVN: r28752
1999-08-18 17:51:27 +00:00
Bernd Schmidt
9bb2199881 Indentation fixes
From-SVN: r28751
1999-08-18 17:16:40 +00:00
Bernd Schmidt
3648099b8b Make insn-recog.c include function.h
From-SVN: r28750
1999-08-18 16:46:53 +00:00
Tom Tromey
4c9d8fa8c5 * include/javaprims.h ("Java"): Regenerated namespace decls.
From-SVN: r28749
1999-08-18 16:34:28 +00:00
Kresten Krab Thorup
eb4534a636 natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed from _Jv_InternClassStrings.
* java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Renamed
	from _Jv_InternClassStrings.

	* prims.cc (_Jv_RunMain): New function.
	(JvRunMain): Remove gij-support.

	* gij.cc (main): Use _Jv_RunMain.

	* java/util/zip/ZipFile.java: Call readDirectory in constructor.

	* interpret.cc (PUSHA, PUSHI, PUSHF, PUSHL, PUSHD): Don't store
	argument in temp variable.
	(continue1): For all op_x2y insns, use temp variable for
	intermediate value.  Also remove some comments.

	* java/lang/natClass.cc (newInstance): Call _Jv_InitClass.
	(forName): Don't call _Jv_InitClass.

	* java/lang/Class.java (getResource,getResourceAsStream): Implement.

	* java/util/zip/ZipEntry.java (ZipEntry(ZipEntry)): New construcor.

	* java/util/jar/JarInputStream.java: New file.

	* java/util/jar/JarEntry.java: New file.

	* java/util/jar/JarFile.java: New file.

	* java/net/URLClassLoader.java: New file.

	* java/net/JarURLConnection.java: New file.

	* gnu/gcj/protocol/jar/Handler.java: New file.

	* gnu/gcj/protocol/jar/Connection.java: New file.

	* java/security/SecureClassLoader.java: New file.

	* java/lang/ClassLoader.java (parent): New variable.
	(ClassLoader (ClassLoader)): new constructor.
	(findClass): New method.
	(loadClass): Add default 1.2 implementation.
	(getSystemResourceAsBytes, getResourceAsBytes): Removed.
	(readfully): Removed.

	* gnu/gcj/runtime/VMClassLoader.java: Moved from java/lang.
	(findSystemClass): New method.
	(VMClassLoader): Constructor rewritten.
	(init): New method.
	All other methods removed.

	* java/lang/natClassLoader.cc: Change use of java::lang::VMClassLoader
	to gnu::gcj::runtime::VMClassLoader.
	(_Jv_InternClassStrings): Use _Jv_ResolvePoolEntry.  Also handle
	class entries.
	(VMClassLoader::findSystemClass): renamed from findBootClass.

	* Makefile.am: Add new files.
	(FirstThread.h, ThreadGroup.h): Add _Jv_Main friend.

	* Makefile.in: Rebuilt.

From-SVN: r28748
1999-08-18 14:16:42 +00:00
Geoff Keating
312f625598 cse.c (cse_insn): Call never_reached_warning when a jump is changed to be unconditional.
* cse.c (cse_insn): Call never_reached_warning when a jump is
changed to be unconditional.
* flags.h: Declare warn_notreached.
* flow.c (delete_block): Call never_reached_warning when
a block is deleted.
* jump.c (delete_barrier_successors): Call never_reached_warning
when we delete everything after a BARRIER.
(never_reached_warning): New function.
* rtl.h: Declare never_reached_warning.
* toplev.c (warn_notreached): New variable.
(lang_independent_options): Set warn_notreached
when -Wunreachable-code.
(compile_file): We need line numbers for -Wunreachable-code.

Also modify documentation to suit.

From-SVN: r28747
1999-08-18 10:43:26 +00:00
Jeff Law
075ff1b238 Daily bump.
From-SVN: r28745
1999-08-18 01:45:10 -06:00
Jan Hubicka
77f3d48acf Jan Hubicka <hubicka@freesoft.cz>
* haifa-sched.c (insn_unit): Fix typo on out of range test.
        * sched.c (insn_unit): Likewise.

From-SVN: r28744
1999-08-17 22:06:43 -07:00
Andreas Schwab
0e403ec3e0 * combine.c (distribute_notes): Handle REG_EH_RETHROW.
From-SVN: r28743
1999-08-17 21:57:50 -07:00
Tom Tromey
212f5d3026 natThread.cc (sleep): Turn 0 millis and 0 nanos into 1 nano.
* java/lang/natThread.cc (sleep): Turn 0 millis and 0 nanos into 1
	nano.
	* include/quick-threads.h (_Jv_CondWait): Don't round to 0
	inappropriately.

From-SVN: r28742
1999-08-18 03:48:37 +00:00
Mark Mitchell
1b12a13e40 cp-tree.h (back_end_hook): New variable.
* cp-tree.h (back_end_hook): New variable.
	* decl2.c (back_end_hook): Define it.
	(finish_file): If it's non-NULL, call it.

From-SVN: r28741
1999-08-17 23:07:54 +00:00
Rainer Orth
47359a8efa gc_priv.h: Merged IRIX thread changes from include/private/gc_priv.h.
Tue Aug 10 00:08:29 1999  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* gc_priv.h: Merged IRIX thread changes from
	include/private/gc_priv.h.

From-SVN: r28740
1999-08-17 22:46:02 +00:00
Mark Mitchell
cfe507bee8 decl.c (add_decl_to_level): New function.
* decl.c (add_decl_to_level): New function.
	(push_local_binding): Use it.
	(find_binding): Fix typo in comment.
	(pushdecl): Use add_decl_to_level.  Put templates on the
	corresponding namespace-scope binding levels.
	* dump.c (dequeue_and_dump): Print the specializations of a
	template.
	* pt.c (push_template_decl_real): Don't push a template multiple
	times.

From-SVN: r28738
1999-08-17 22:35:19 +00:00
Tom Tromey
db4b04f1f4 From Bryce McKinlay:
* libjava.lang/Array_2.java: New file.
	* libjava.lang/Array_2.out: New file.

From-SVN: r28737
1999-08-17 22:05:56 +00:00
Andrew MacLeod
57ad447995 flow.c (create_edge_list): Use xmalloc, not malloc.
Tue Aug 17 17:39:43 EDT 1999  Andrew MacLeod  <amacleod@cygnus.com>

	* flow.c (create_edge_list): Use xmalloc, not malloc.

From-SVN: r28736
1999-08-17 21:44:26 +00:00
Loren J. Rittle
c78896f083 Do not trash single-line C-style comments
From-SVN: r28735
1999-08-17 18:32:32 +00:00
Jeff Law
6baa5e2921 Daily bump.
From-SVN: r28734
1999-08-17 01:45:09 -06:00
Mark Mitchell
43f887f9f6 cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
* cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
	(CALL_DECLARATOR_QUALS): Likewise.
	(CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
	* decl.c (grokdeclarator): Adjust to use them.
	* decl2.c (grokfield): Likewise.
	(reparse_absdcl_as_casts): Likewise.
	* lex.c (make_call_declarator): Likewise.
	(set_quals_and_spec): Likewise.
	* pt.c (tsubst): Likewise.
	* tree.c (mapcar): Remove special hack to handle third operand of
	a CALL_EXPR.

From-SVN: r28733
1999-08-17 07:20:23 +00:00
Andrew MacLeod
410538ea80 basic-block.h (struct edge_list): Stucture to maintain a vector of edges.
* basic-block.h (struct edge_list): Stucture to maintain a vector
	of edges.
	(EDGE_INDEX_NO_EDGE, EDGE_INDEX, INDEX_EDGE_PRED_BB, INDEX_EDGE_SUCC_BB,
	 INDEX_EDGE, NUM_EDGES): New Macros for accessing edge list.
	(create_edge_list, free_edge-List, print_edge_list, verify_edge_list):
	New function prototypes.
	* flow.c (create_edge_list): Function to create an edge list.
	(free_edge_list): Discards memory used by an edge list.
	(print_edge_list): Debug output showing an edge list.
	(verify_edge_list): Internal consistency check for an edge list.

From-SVN: r28732
1999-08-16 22:14:51 +00:00
Mark Mitchell
b0d065155d cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
* cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
	* class.c (build_vtable): Use build_lang_field_decl to build the
	VAR_DECLs for vtables.
	(prepare_fresh_vtable): Likewise.
	* decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
	CAN_HAVE_FULL_LANG_DECL_P.
	(push_using_decl): Use build_lang_decl to build USING_DECLs.
	(grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
	* lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
	(build_lang_field_decl): Likewise.
	(copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
	to copy.

From-SVN: r28731
1999-08-16 22:08:42 +00:00
Gavin Romig-Koch
58e787081d make me the mips maintainer, fix my name
From-SVN: r28730
1999-08-16 21:43:19 +00:00
Mark Mitchell
558475f07c cp-tree.def (STMT_EXPR): New tree node.
* cp-tree.def (STMT_EXPR): New tree node.
	* cp-tree.h (STMT_EXPR_STMT): New macro.
	(store_return_init): Change prototype.
	(finish_named_return_value): New function.
	(expand_stmt): Likewise.
	(expand_body): Likewise.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(expanding_p): New variable.
	(last_expr_type): Likewise.
	(building_stmt_tree): New macro.
	* decl.c (start_function): Use building_stmt_tree, not
	processing_template_decl, where appropriate.
	(store_parm_decls): Likewise.
	(store_return_init): Move most of the body to semantics.c.
	(finish_function): Use building_stmt_tree.
	(finish_stmt): Clear last_expr_type here.
	(cp_function): Add expanding_p, last_tree, last_expr_type.
	(push_cp_function_context): Save them.
	(pop_cp_function_context): Restore them.
	* decl2.c (setup_vtbl_ptr): Move to semantics.c.
	* error.c (dump_expr): Handle STMT_EXPR.
	* except.c (expand_start_catch_block): Use building_stmt_tree.
	Use add_decl_stmt.
	* expr.c (cplus_expand_expr): Handle STMT_EXPR.
	(do_case): Move add_tree call to semantics.c.
	* parse.y (return_init): Use finish_named_return_value.
	(for.init.statement): Use finish_expr_stmt.
	* parse.c: Regenerated.
	* pt.c (do_pushlevel): Move to semantics.c.
	(do_poplevel): Likewise.
	(tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
	(tsubst_expr): Don't expand all the way to RTL here.  Handle
	RETURN_INIT and CTOR_INITIALIZER.
	(instantiate_decl): Call expand_body after tsubst'ing into
	DECL_SAVED_TREE.
	* semantics.c (expand_stmts): New function.
	(expanding_p): New variable.
	(last_expr_type): Likewise.
	(finish_expr_stmt): Use building_stmt_tree.
	(begin_if_stmt): Likewise.
	(finish_if_stmt_cond): Likewise.
	(finish_then_clause): Likewise.
	(begin_else_clause): Likewise.
	(finish_else_clause): Likewise.
	(begin_while_stmt): Likewise.
	(finish_while_stmt_cond): Likewise.
	(finish_while_stmt): Likewise.
	(finish_do_body): Likewise.
	(finish_do_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(fnish_for_init_stmt): Likewise.
	(finish_for_cond): Likewise.
	(finish_for_expr): Likewise.
	(finish_for_stmt): Likewise.
	(finish_break_stmt): Likewise.
	(finish_continue_stmt): Likewise.
	(finish_switch_cond): Likewise.
	(finish_switch_stmt): Likewise.
	(finish_case_label): Call add_tree here if necessary.
	(finish_goto_statement): Use building_stmt_tree.
	(begin_try_block): Likewise.
	(begin_function_try_block): Likewise.
	(finish_try_block): Likewise.
	(finish_function_try_block): Likewise.
	(finish_handler_sequence): Likewise.
	(finish_function_handler_sequence): Likewise.
	(begin_handler): Likewise.
	(finish_handler_parms): Likewise.
	(finish_handler): Likewise.
	(begin_compound_stmt): Likewise.
	(finish_compound_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(finish_named_return_value): New function.
	(setup_vtbl_ptr): Moved here from decl2.c.
	(do_pushlevel): Moved here from pt.c.
	(do_poplevel): Likewise.
	(begin_stmt_expr): Use building_stmt_tree.
	(finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
	when building_stmt_tree.
	(begin_stmt_tree): New function.
	(finish_stmt_tree): Likewise.
	(expand_stmt): Likewise.
	(expand_body): Likewise.
	* tree.c (build_cplus_method_type): Make sure the argument types
	end up on the same obstack as the METHOD_TYPE.
	(search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
	THROW_EXPR, STMT_EXPR.
	(mapcar): Break out common cases.  Handle COMPOUND_EXPR,
	MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
	sorry, if an unsupported node is encountered.
	* typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
	(c_expand_return): Don't call add_tree here.

From-SVN: r28729
1999-08-16 19:01:36 +00:00
Mark Mitchell
63ebc27560 tree.c (type_hash_add): Use permalloc to allocate nodes in the hashtable.
* tree.c (type_hash_add): Use permalloc to allocate nodes in the
	hashtable.

From-SVN: r28728
1999-08-16 18:53:23 +00:00
Tom Tromey
086920c39f configure: Rebuilt.
* configure: Rebuilt.
	* configure.in: Set DIVIDESPEC to empty string if compiler does
	not support -fuse-divide-subroutine.

From-SVN: r28727
1999-08-16 17:01:52 +00:00
Gerald Pfeifer
ecdea017a4 gcc_update: New file.
* gcc_update: New file.
	* egcs_update: Renamed to gcc_update.

From-SVN: r28726
1999-08-16 16:49:21 +00:00
J"orn Rennecke
87d9d86059 * mips.h (CLASS_CANNOT_CHANGE_SIZE): Define.
From-SVN: r28725
1999-08-16 17:05:47 +01:00
Gerald Pfeifer
861313f2d4 * config/i386/freebsd.h (HANDLE_PRAGMA_PACK_PUSH_POP): Define.
From-SVN: r28724
1999-08-16 15:56:44 +00:00
Nick Clifton
88924698f1 Allow machine dependent reorganisation pass to place information into the RTL
dump file if it so wishes.

From-SVN: r28723
1999-08-16 10:06:19 +00:00
Jeff Law
6c26cda2b5 Daily bump.
From-SVN: r28719
1999-08-16 01:45:12 -06:00
Mark Mitchell
497fa9d355 Fix typo in last change
From-SVN: r28718
1999-08-16 00:59:19 +00:00
Jim Wilson
0c61f5414d Fix misuses of MAX_MACHINE_MODE that can result in an infinite loop.
* explow.c (hard_function_value): Use VOIDmode instead of
	MAX_MACHINE_MODE.
	* stmt.c (expand_return): Likewise.
	* stor-layout.c (get_best_mode): Likewise.

From-SVN: r28717
1999-08-15 13:08:12 -07:00
Jim Wilson
d3ca5cdd6c Fix bug preventing use of match_par_dup in a call insn pattern.
* genemit.c (gen_expand): If next is MATCH_PAR_DUP, then output
	emit call instead of emit_insn call.

From-SVN: r28716
1999-08-15 12:45:38 -07:00
Mark Mitchell
e0942dcd7e pt.c (check_default_tmpl_args): Don't check in local scopes.
* pt.c (check_default_tmpl_args): Don't check in local scopes.
	(tsubst_decl): Make sure the declaration is on a saveable
	obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
	variable.
	(tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.

From-SVN: r28715
1999-08-15 16:59:17 +00:00
Anthony Green
66e064294f expr.c (java_lang_expand_expr): Mark static array data as referenced.
* expr.c (java_lang_expand_expr): Mark static array data as
        referenced.

From-SVN: r28714
1999-08-15 08:31:56 +00:00
Jeff Law
7ede7de669 Daily bump.
From-SVN: r28713
1999-08-15 01:45:09 -06:00
Mumit Khan
f4ab28e3c6 Mumit Khan <khan@xraylith.wisc.edu>
* configure.in: Handle --disable/enable-win32-registry.
        * install.texi: Document --disable/enable-win32-registry.
        * acconfig.h (ENABLE_WIN32_REGISTRY): New macro.
        (WIN32_REGISTRY_KEY): New macro.
        * prefix.c: Use to enable/disable win32-specific code.
        (lookup_key): Use versioned key.
        * configure: Regenerate.
        * config.in: Likewise.

From-SVN: r28712
1999-08-14 15:04:44 -07:00