1 2005-04-19 Julian Brown <julian@codesourcery.com>
3 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
4 indirect dispatch with PIC.
6 2005-04-18 Andrew Haley <aph@redhat.com>
8 * java-except.h (struct eh_range.handler): Remove unused field.
9 (handle_nested_ranges): Remove function declaration.
10 (sanity_check_exception_range): Add function declaration.
11 * verify.c (verify_jvm_instructions): Remove call to
13 * verify-glue.c (verify_jvm_instructions_new): Call
14 sanity_check_exception_range.
15 * except.c (link_handler, eh_range_freelist, link_handler,
16 handle_nested_ranges): Remove.
17 (add_handler): Rewrite.
18 (sanity_check_exception_range): New function.
19 (print_ranges): New function.
21 2005-04-13 Julian Brown <julian@codesourcery.com>
23 * decl.c (finish_method): Give methods once-only linkage.
25 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
27 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
29 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
31 * java-tree.h: Don't use PARAMS().
33 2005-04-07 Per Bothner <per@bothner.com>
35 * class.c (push_class): By default, suppress debug output.
36 (finish_class): Enable debug output for classes we're emitting.
38 2005-04-07 Andrew Haley <aph@redhat.com>
40 * gcj.texi: Correct gcj-dbtool instructions.
42 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
44 * gcj.texi: Fix a typo.
45 * lang.c: Fix a comment typo.
47 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
49 * gcj.texi (Invoking gij): Add descriptions of new -X options.
50 Mention recognized-and-ignored compatibility options.
51 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
53 (About CNI): Add Memory allocation section.
55 2005-04-01 Tom Tromey <tromey@redhat.com>
57 * decl.c (java_init_decl_processing): Fix types of
58 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
59 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
60 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
62 2005-03-31 Jan Hubicka <jh@suse.cz>
64 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
65 * class.c: Include cgraph.h
66 (make_local_functoin_alias): Mark aslias as needed.
67 * resource.c: Include cgraph.h
68 (compile_resource_data): Go via cgraph interface.
70 2005-03-30 Ian Lance Taylor <ian@airs.com>
72 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
74 2005-03-30 Tom Tromey <tromey@redhat.com>
76 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
77 inner_class_info_index==0 or outer_class_info_index==0.
79 2005-03-29 Tom Tromey <tromey@redhat.com>
81 * gcj.texi (libgcj Runtime Properties): Document
82 gnu.gcj.runtime.endorsed.dirs.
84 2005-03-24 Anthony Green <green@redhat.com>
86 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
89 2005-03-23 Tom Tromey <tromey@redhat.com>
91 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
92 (parse_version): Use it.
94 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
96 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
98 2005-03-18 Andrew Haley <aph@redhat.com>
101 * decl.c (update_aliases): Don't update variables that are about
103 (maybe_poplevels): Add comment.
105 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
108 * jcf-parse.c (duplicate_class_warning): New function.
109 (java_parse_file): Call duplicate_class_warning if
110 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
111 (parse_zip_file_entries): Likewise. Also set
112 CLASS_FROM_CURRENTLY_COMPILED_P.
114 2005-03-16 Andrew Haley <aph@redhat.com>
116 * expr.c (expand_java_arrayload): Don't generate a
117 NullPointerException based on the type of the node.
118 (build_java_array_length_access): Likewise.
120 2005-03-15 Zack Weinberg <zack@codesourcery.com>
122 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
124 2005-03-11 Tom Tromey <tromey@redhat.com>
126 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
127 (libgcj Runtime Properties): Document the default .db.
129 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
132 * parse.y (checks_throws_clauses): Check exceptions list even when
133 the base class does not come from a source file being compiled.
134 (java_complete_lhs): Remove unused variable 'wfl'.
136 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
139 * decl.c (finish_method): Emit _Jv_InitClass for private static
140 methods inside inner classes as well.
142 2005-03-08 Julian Brown <julian@codesourcery.com>
143 * Revert patch from 2005-03-08 for causing bootstrap failure on
146 2005-03-08 Julian Brown <julian@codesourcery.com>
148 * decl.c (finish_method): Give methods once-only linkage.
150 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
152 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
154 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
156 * verify-glue.c (vfy_is_assignable_from): Perform static check using
157 can_widen_reference_to if the C++ ABI is in use.
158 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
159 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
160 type_isresolved, init_state, set_pc, state_get_pc,
161 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
162 (verify_fail): Report the current PC from the verifier context.
163 (free_state): Remove #if 0 block to enable this function.
164 (free_verifier_context): Call free_state on state_list iterator
165 values before freeing them.
166 * expr.c (pop_type_0): Pop correct type for error message when stack
167 contains a multi-word type.
169 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
171 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
172 for known NULL array length access.
174 2005-03-07 Tom Tromey <tromey@redhat.com>
176 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
178 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
180 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
181 typeck.c: Update copyright.
183 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
186 * xref.c, xref.h: Remove file.
187 * Make-lang.in (java/xref.o): Remove.
188 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
189 * lang.c (flag_emit_xref): Remove definition.
190 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
191 * typeck.c (convert): Remove use of do_not_fold.
192 * parse.y (do_not_fold): Remove definition.
193 (parser grammar): Remove xref code.
194 (maybe_create_class_interface_decl, create_class): Likewise.
195 (register_fields, method_header, finish_method_declaration): Likewise.
196 (declare_local_variables, source_end_java_method): Likewise.
197 (java_complete_expand_classes): Do not set do_not_fold.
198 (java_complete_expand_method): Remove xref code.
199 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
200 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
201 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
202 (patch_synchronized_statement, patch_throw_statement): Likewise.
203 (maybe_build_class_init_for_field): Likewise.
205 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
207 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
208 instead of IS_NON_TYPE_CODE_CLASS.
210 2005-03-04 Andrew Haley <aph@redhat.com>
213 * class.c (set_method_index): Don't set method_index if it is
215 (layout_class_method): Don't complain about "non-static method foo
216 overrides static method" in the case of indirect dispatch.
218 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
220 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
222 * Make-lang.in: Don't elide warnings in jcf-io.c.
224 2005-03-01 Per Bothner <per@bothner.com>
227 * check-init.c (wfl): Remove static.
228 (final_assign_error, check_init): Replace calls to parse_error_context
230 (check_init): Save, set, and restore input_location for each exp.
232 2005-03-01 Per Bothner <per@bothner.com>
234 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
235 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
236 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
238 2005-03-01 Per Bothner <per@bothner.com>
240 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
242 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
245 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
248 2005-02-22 Tom Tromey <tromey@redhat.com>
251 * verify-impl.c (EITHER): New define.
252 (types_compatible): Handle it.
253 (check_field_constant): Use it.
255 2005-02-18 Tom Tromey <tromey@redhat.com>
258 * verify-impl.c (types_equal): Fixed test.
261 * verify-glue.c (vfy_class_has_field): New function.
262 * verify.h (vfy_class_has_field): Declare.
263 * verify-impl.c (check_field_constant): Added 'putfield'
265 (verify_instructions_0): Updated.
266 (types_equal): New function.
268 2005-02-14 Tom Tromey <tromey@redhat.com>
271 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
272 stack effect of multianewarray.
274 2005-02-14 Andrew Haley <aph@redhat.com>
277 * expr.c (expand_byte_code): Call promote_arguments().
278 (promote_arguments): New function.
279 * decl.c (check_local_unnamed_variable): Remove special case for
281 (find_local_variable): Promote all boolean types to int
282 when searching for local variable decls.
284 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
286 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
287 parse-scan.y: Update copyright.
289 2005-02-11 Per Bothner <per@bothner.com>
292 * parse-scan.y (input_location): Remove variable.
293 (main_input_filename): New - replaces input_filename, which isn't
294 settable if USE_MAPPED_LOCATION.
295 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
296 so we don't reference input_location or wfl_operator in that case.
297 * jv-scan.c (expand_location): Remove - no longer used.
298 (main): Set main_input_filename rather than input_filename.
300 2005-02-09 Richard Henderson <rth@redhat.com>
302 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
303 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
305 2005-02-08 Marcin Dalecki <martin@dalecki.de>
307 * expr.c (add_type_assertion): Use the proper enumeration type,
308 since this is what htab_find_slot() is expecting.
310 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
312 * gcj.texi: Update copyright dates.
314 2005-02-02 Tom Tromey <tromey@redhat.com>
316 * gcj.texi (libgcj Runtime Properties): Default library_control
319 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
322 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
323 (modifiers) when square brackets are present in a declaration for
325 * jv-scan.c (main): Set input_filename and input_line.
327 2005-02-01 Tom Tromey <tromey@redhat.com>
330 * gjavah.c (get_field_name): Don't override name for JNI header.
332 2005-02-01 Roger Sayle <roger@eyesopen.com>
334 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
335 of unsigned types using iushr and lushr JVM bytecodes.
337 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
340 * gjavah.c (jni_print_float): Do not emit floating-point
341 initialiser for a static final field.
342 (jni_print_double): Likewise.
344 2005-02-01 Mark Mitchell <mark@codesourcery.com>
347 2005-01-31 Mark Mitchell <mark@codesourcery.com>
348 * gjavah.c (print_field_info): Mark static data members of
349 floating-point type with "__extension__".
351 2005-01-31 Mark Mitchell <mark@codesourcery.com>
353 * gjavah.c (print_field_info): Mark static data members of
354 floating-point type with "__extension__".
356 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
359 * parse.y (build_string_concatenation): Remove redundant if.
360 (patch_conditional_expr): Attempt to patch_string() the condition
361 of a ?: as well, in addition to its other operands.
363 2005-01-25 Tom Tromey <tromey@redhat.com>
365 * Make-lang.in (java/java-tree-inline.o): Removed.
367 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
370 * parse.y (patch_binop): Allow comparisons against NULL only
371 if the other operand is of a reference type.
373 2005-01-24 Tom Tromey <tromey@redhat.com>
375 * java-tree.h (gcj_abi_version): Declare.
376 * class.c (make_class_data): Push gcj_abi_version into "next"
377 field. Renamed field.
378 * decl.c (gcj_abi_version): New global.
379 (parse_version): New function.
380 (java_init_decl_processing): Call it. Renamed 'next' field.
382 (GCJ_BINARYCOMPAT_ADDITION): New define.
384 2005-01-24 Roger Sayle <roger@eyesopen.com>
387 * jcf-write.c (generate_bytecode_insns): Conversions between
388 integer types of the same precision shouldn't generate widening
389 or narrowing conversion bytecodes.
391 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
393 * java-except.h, java-tree.h: Remove unused prototypes.
395 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
398 * jcf-write.c (perform_relocations): Don't call memcpy if source
399 and destination are the same.
401 2005-01-17 Tom Tromey <tromey@redhat.com>
403 * verify-impl.c (get_short): Sign extend.
406 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
408 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
411 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
413 * verify.c: Revert to the version before the BC-ABI merge.
415 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
418 * check-init.c (check_init): Take care of references that do not
419 have an explicit final variable declaration (e.g. array length
420 access) for pre/post in/de-crement operators.
422 2005-01-08 Mark Wielaard <mark@klomp.org>
424 * parse.y (process_imports): Allocate (and free) original_name only
425 when not already defined.
426 * jcf-parse.c (read_class): Free results of find_class() and
428 (java_parse_file): Keep pointer to head of file_list and free when
429 done. Free result of lrealpath().
431 2005-01-05 Tom Tromey <tromey@redhat.com>
433 * gcj.texi (Standard Properties): java.ext.dirs is now used.
435 2004-12-20 Andrew Haley <aph@redhat.com>
437 * typeck.c: Use fold_convert for ints and booleans.
439 2004-12-17 Andrew Haley <aph@redhat.com>
442 * typeck.c (convert): Use a CONVERT_EXPR when converting to
443 BOOLEAN_TYPE or CHAR_TYPE.
444 (convert_to_boolean, convert_to_char) : Remove.
445 * convert.h (convert_to_boolean, convert_to_char) : Remove.
446 * expr.c (expand_load_internal): Do type conversion if type is not
449 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
452 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
455 2004-12-07 Andrew Haley <aph@redhat.com>
458 * jcf-parse.c (load_class): Remove sanity test for missing inner
461 2004-12-06 Tom Tromey <tromey@redhat.com>
463 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
464 (java.uninstall): Likewise.
465 (java.maintainer-clean): Likewise.
466 (.INTERMEDIATE): Likewise.
467 (java.install-man): Likewise.
468 (gcj-dbtool.pod): New target.
469 * gcj.texi (Code Generation): Document -findirect-dispatch.
470 (libgcj Runtime Properties): Document
471 gnu.gcj.precompiled.db.path.
472 (Top): Link to "Invoking gcj-dbtool".
474 2004-12-06 Tom Tromey <tromey@redhat.com>
477 * java-tree.h (extract_field_decl): Declare.
478 * parse.y (extract_field_decl): Renamed from
479 strip_out_static_field_access_decl. No longer static.
480 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
482 2004-12-03 Tom Tromey <tromey@redhat.com>
484 * lang.c (flag_new_verifier): Define.
485 (java_post_options): Set flag_new_verifier if indirect dispatch
487 * lang.opt (fnew-verifier): Removed.
489 2004-12-03 Tom Tromey <tromey@redhat.com>
492 * Make-lang.in (java.install-common): Only install transformed
493 gcjh if gcj-cross exists.
495 2004-12-03 Andrew Haley <aph@redhat.com>
498 * except.c (link_handler): Patch 'outer' field of siblings of the
499 range we're demoting.
501 2004-12-03 Andrew Haley <aph@redhat.com>
504 * class.c (layout_class_method): Don't fail to override a method
505 simply because it has DECL_ARTIFICIAL set.
507 2004-12-02 Tom Tromey <tromey@redhat.com>
510 * parse.y (craft_constructor): Special case null_pointer_node.
512 2004-12-02 Tom Tromey <tromey@redhat.com>
515 * java-gimplify.c (java_gimplify_expr): Don't call
516 SET_EXPR_LOCATION unless wrapped tree is an expression.
518 2004-11-27 Per Bothner <per@bothner.com>
520 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
521 Fix fencepost error in 'i', which got executed one too many times.
522 Also, fold memcpy into explicit loop, as originally intended.
523 Also, free temporary 'buf' which otherwise leaks.
525 2004-11-27 Per Bothner <per@bothner.com>
527 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
528 local static variables if not USE_MAPPED_LOCATION.
530 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
532 * class.c, decl.c, expr.c: Fix comment typos.
534 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
537 * decl.c (end_java_method): Call
538 attach_init_test_initialization_flags on all the init_decls.
539 * parse.y (attach_init_test_initialization_flags): Move to ...
540 * expr.c (attach_init_test_initialization_flags): here and
541 support BIND_EXPR also.
542 * java-tree.h (attach_init_test_initialization_flags): Prototype.
543 * jcf-parse.c (parse_class_file): Don't disable class init
546 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
548 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
551 2004-11-24 Richard Henderson <rth@redhat.com>
553 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
554 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
556 2004-11-24 Tom Tromey <tromey@redhat.com>
558 * verify.c (defer_merging): Don't use C++-style comment.
559 * verify.h (java_opcode): Added java_opcode_end.
560 * class.c (build_class_ref): Remove C++ comment and old FIXME.
562 * verify-impl.c (vfy_push_type): Removed bogus "return".
563 (initialize_stack): Use vfy_alloc and vfy_free.
564 (verify_instructions_0): Likewise.
566 * Merged gcj-abi-2-dev-branch to trunk.
568 2004-11-24 Andrew Haley <aph@redhat.com>
570 * jcf-parse.c (parse_class_file): Set file_start_location.
572 2004-11-10 Tom Tromey <tromey@redhat.com>
574 * class.c (make_field_value): Don't call build_static_field_ref.
575 (build_static_field_ref): Don't emit direct references when using
578 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
579 -verbose:class into man page synopsis.
581 2004-11-09 Tom Tromey <tromey@redhat.com>
583 * expr.c (build_java_arraystore_check): Still generate check if
584 element type is itself an array.
586 2004-11-08 Tom Tromey <tromey@redhat.com>
588 * java-tree.h (soft_check_assignment_node): Removed.
589 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
590 * decl.c (java_init_decl_processing): Don't initialize
591 soft_check_assignment_node.
593 2004-11-05 Tom Tromey <tromey@redhat.com>
595 * class.c (layout_class_methods): Don't add Miranda methods when
596 using indirect dispatch.
598 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
600 * class.c (make_class_data): Call emit_assertion_table to set the
601 'assertion_table' field.
602 (build_signature_for_libgcj): Move here from expr.c.
603 (add_assertion_table_entry): New function. Callback for assertion
605 (emit_assertion_table): New. Take class argument, and generate
606 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
607 * decl.c (init_decl_processing): Define assertion_entry_type record.
608 Push 'assertion_table' class field instead of 'verify'.
609 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
610 (type_assertion_hash): Include 'assertion_code' in hash.
611 (add_type_assertion): Rewritten. Take class and assertion_code
612 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
613 (can_widen_reference_to): Use new add_type_assertion() arguments.
614 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
615 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
616 (verify_identifier_node): Removed.
617 (assertion_entry_type, assertion_table_type): New.
618 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
619 assertion code definitions.
620 (struct type_assertion): Add assertion_code. Rename 'source_type' and
621 'target_type' to 'op1' and 'op2'.
622 (add_type_assertion): Declare.
623 (lang_printable_name_wls): Remove unused definition.
624 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
625 to emit runtime assertion.
626 (vfy_note_stack_type): Clean up non-C90 declarations.
627 (vfy_note_local_type): Likewise.
628 * verify.h (vfy_is_assignable_from): Declare.
629 * verify-impl.c (is_assignable_from_slow): Remove unused function.
630 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
631 instead of is_assignable_from_slow().
632 (types_compatible): Reinstate ref_compatible() call.
634 2004-11-04 Tom Tromey <tromey@redhat.com>
636 * class.c (build_static_field_ref): Reverted previous patch.
638 * class.c (build_static_field_ref): Don't emit direct references
639 when using indirect dispatch.
641 2004-11-03 Tom Tromey <tromey@redhat.com>
643 * expr.c (expand_java_arrayload): Set lhs_type_node.
644 (expand_java_arraystore): Set rhs_type_node.
646 2004-11-02 Tom Tromey <tromey@redhat.com>
648 * jcf-parse.c (compute_class_name): Use filename length from zip
649 directory, not strlen.
651 * expr.c (expand_invoke): Mark new interface methods as abstract.
653 2004-11-01 Tom Tromey <tromey@redhat.com>
655 * verify-impl.c (push_jump): Removed check for uninitialized
657 (push_exception_jump): Likewise.
658 (handle_ret_insn): Likewise.
659 (handle_jsr_insn): Likewise.
660 (state_check_no_uninitialized_objects): Removed.
662 * decl.c (check_local_unnamed_variable): Recognize
663 promoted-to-int parameters when using the new verifier.
664 * expr.c (expand_java_arraystore): Explicitly request array type
665 when using new verifier.
666 (expand_java_arrayload): Likewise.
667 (invoke_build_dtable): Don't pass object_type_node as
668 expression argument to build_java_indirect_ref.
669 (build_java_check_indexed_type): Do nothing.
670 (build_java_arraystore_check): Handle case where array doesn't
672 (build_java_array_length_access): Likewise.
673 (expand_invoke): Handle case where interface overrides a method
675 (pop_type_0): Always succeed for reference types.
676 (process_jvm_instruction): Don't pop a value in a dead
678 (pop_arguments): Convert arguments to correct types.
680 2004-10-29 Andrew Haley <aph@redhat.com>
682 * jcf-parse.c (give_name_to_class): Remove line that was
685 2004-10-29 Andrew Haley <aph@redhat.com>
687 * jcf-parse.c (set_source_filename): Add code to build new sfname.
689 2004-10-20 Andrew Haley <aph@redhat.com>
691 * decl.c (end_java_method): Don't expand if flag_syntax_only.
693 2004-10-26 Tom Tromey <tromey@redhat.com>
695 * verify.h (vfy_notify_verified): Removed.
696 * verify-glue.c (vfy_notify_verified): Removed.
698 2004-10-26 Tom Tromey <tromey@redhat.com>
700 * verify-impl.c (debug_print_state): Declare `i' before code.
701 (merge_types): Modify `t' when it is null_type.
703 2004-10-26 Tom Tromey <tromey@redhat.com>
705 * verify-impl.c (type_print): Renamed from print. Now static and
707 (debug_print_state): Use type_print.
709 2004-10-25 Tom Tromey <tromey@redhat.com>
711 * expr.c (build_invokeinterface): Compute correct offset for
712 index into interface methods.
714 2004-10-20 Tom Tromey <tromey@redhat.com>
716 * java-tree.h (verify_jvm_instructions_new): Declare.
718 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
721 * verify-impl.c (verify_instructions): Correctly handle wide
723 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
724 (vfy_get_component_type): Strip pointer types.
725 (vfy_find_class): Use get_type_from_signature. Strip pointer
727 Include java-except.h.
729 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
731 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
732 vfy_push_type_t, set_variable, add_new_state, merge_into,
733 handle_jsr_insn, branch_prepass, check_class_constant,
734 check_wide_constant, get_one_type, compute_static_types,
735 verify_instructions_0): Clean up C99 declarations after statements.
737 2004-10-20 Tom Tromey <tromey@redhat.com>
739 * verify-impl.c (merge_refs): Compare reference against iterator,
742 * verify-glue.c (vfy_tag): Mask off resolved flag.
744 2004-10-19 Tom Tromey <tromey@redhat.com>
746 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
747 (init_state_with_stack): Initialize `this_type' in state.
748 (verify_method): Use debug_print.
749 * verify-glue.c (vfy_is_primitive): Removed debugging print.
750 (vfy_note_stack_depth): Reverted last patch.
751 (vfy_note_stack_type): Note pointer to Object, not Object.
752 (vfy_note_local_type): Likewise.
754 * verify.h (vfy_note_instruction_seen): Declare.
755 * verify-glue.c (verify_jvm_instructions_new): Set
756 BCODE_EXCEPTION_TARGET on target instruction.
757 (vfy_note_instruction_seen): New function.
758 * verify-impl.c (FLAG_INSN_SEEN): New define.
759 (verify_instructions_0): Set flag on instruction. Save state for
761 (verify_instructions): Call vfy_note_instruction_seen.
763 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
764 (verify_jvm_instructions_new): Call method_init_exceptions,
765 add_handler, and handle_nested_ranges.
766 * verify-impl.c (verify_method): Return 1 on success.
767 (verify_instructions_0): Save the state at PC=0.
769 * verify-impl.c (init_type_from_class): Set is_resolved and
770 ref_next on new ref_intersection.
771 (init_type_from_string): Likewise.
773 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
775 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
776 if flag_new_verifier is set.
777 * java-tree.h (flag_new_verifier): Declare.
778 * lang.opt (fnew-verifier): New option.
779 * verify-impl.c: Work around namespace pollution by undef'ing
781 (struct verifier_context): Make 'bytecode' const.
782 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
783 (types_compatible): For the BC-ABI, always consider reference types
785 (check_class_constant): Use vfr->current_class.
786 (check_constant): Likewise.
787 (check_wide_constant): Likewise.
788 (check_field_constant): Check for 'L' at start of type name.
789 (get_one_type): Return pointer instead of type. Set type result in
790 caller via passed type pointer.
791 (compute_argument_types): Update to use new get_one_type arguments.
792 (compute_return_type): Likewise.
793 (make_verifier_context): New. Allocate and initialize 'vfr'.
794 (free_verifier_context): New. Free 'vfr' and its contents.
795 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
796 and free_verifier_context.
798 2004-10-15 Tom Tromey <tromey@redhat.com>
800 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
801 * verify.h (vfy_fail): Fixed formatting.
803 * verify-impl.c (vfr): Fixed comment formatting.
804 (collapse_type): New function.
805 (verify_instructions): Notify compiler about type map.
806 * verify.h (vfy_note_stack_depth): Updated.
807 (vfy_note_stack_type): Likewise.
808 (vfy_note_local_type): Likewise.
809 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
811 * verify-glue.c (vfy_note_stack_depth): Correctly size type
812 state. Added `method' argument.
813 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
815 (vfy_note_local_type): New function.
816 (vfy_unsuitable_type): Likewise.
817 (vfy_return_address_type): Likewise.
818 (vfy_null_type): Likewise.
820 * verify.h (VFY_IN_GCC): Removed.
821 (VFY_WANT_TYPEMAP): Removed.
822 * verify-impl.c (verify_instructions_0): Removed useless "\".
823 (struct state) <next>: Uncomment.
825 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
827 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
830 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
832 * Make-lang.in (verify.o): Re-enabled this target.
833 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
834 (vfy_get_interface): Likewise.
835 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
836 * verify.h (verify_jvm_instructions_new): Declare.
837 * verify-impl.c (free_state): Temporarily comment out unused
840 2004-10-06 Tom Tromey <tromey@redhat.com>
842 * java-tree.h (JV_STATE_READ): New enum value.
844 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
846 * verify.h: New file.
848 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
850 * verify-impl.c, verify-glue.c, verify.h: New files.
851 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
853 2004-09-24 Andrew Haley <aph@redhat.com>
855 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
856 for a slot if it's of pointer type.
858 2004-09-14 Tom Tromey <tromey@redhat.com>
860 * class.c (make_class_data): Correctly initialize "state" field.
861 Initialize "engine" field.
862 * decl.c (java_init_decl_processing): Add "engine" field.
864 2004-09-10 Andrew Haley <aph@redhat.com>
867 * expr.c (build_invokeinterface): Use fast method for interface
869 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
871 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
872 (emit_symbol_table): Add new arg, element_size.
873 * decl.c (java_init_decl_processing): Initialize Class.itable.
874 * class.c (GEN_TABLE): New macro.
875 (gen_indirect_dispatch_tables): Use it. Add itable.
876 (make_class_data): Add new arg for emit_symbol_table().
878 (add_miranda_methods): Make sure search_class has been parsed.
879 (emit_symbol_table): Add new arg, element_size.
881 2004-09-06 Andrew Haley <aph@redhat.com>
883 * verify.c (merge_types): Return Object for all merges of
885 * expr.c (add_type_assertion): Don't generate assertions when
886 source type is array of Object.
888 2004-09-03 Andrew Haley <aph@redhat.com>
890 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
892 * lang.c (java_post_options): Force flag_verify_invocations if
893 we're not using indirect dispatch.
895 * expr.c (pop_type_0): Move test for interfaces before call to
896 can_widen_reference_to().
897 (build_signature_for_libgcj): Remove generation of canonical array
899 (add_type_assertion): Canonicalize both arrays.
900 Don't assert that type X can be assigned to Object.
901 Don't assert that type X an be assigned to type X.
902 Don't assert that Object can be assigned to type X.
903 (can_widen_reference_to): Warn whenever we generate an assertion.
904 (process_jvm_instruction): Use throwable_type_node for the type of
907 2004-09-01 Andrew Haley <aph@redhat.com>
909 * decl.c (java_init_decl_processing): Change
910 verify_identifier_node to "__verify".
911 * expr.c (add_type_assertion): Use verify_identifier_node for name.
912 * java-tree.h (verify_identifier_node): Change to "__verify".
914 * expr.c (build_signature_for_libgcj): New function.
915 (add_type_assertion): Use it to construct signatures for
916 source_type and target_type.
918 2004-08-27 Andrew Haley <aph@redhat.com>
920 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
921 (verify_identifier_node): New.
922 (TYPE_VERIFY_METHOD): New.
923 (struct type_assertion): New type.
924 * expr.c (type_assertion_eq): New function.
925 (type_assertion_hash): New function.
926 (add_type_assertion): New function.
927 (can_widen_reference_to): Call add_type_assertion().
928 * decl.c (java_init_decl_processing): Add verify_identifier_node.
929 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
930 (finish_class): Output TYPE_VERIFY_METHOD (type).
932 * decl.c (end_java_method): Nullify unused fields.
934 2004-08-17 Andrew Haley <aph@redhat.com>
936 * verify.c (defer_merging): Quieten.
937 * jcf-parse.c (load_class): Only try to open a class file if it's
938 java.lang.Object or if it's part of the current compilation.
939 Check that the class we just tried to load is the class we just
941 (java_parse_file): Set flag_verify_invocations off if we're
942 compiling from .class.
943 (parse_zip_file_entries): Abort if we try to read a dummy class.
944 * expr.c (can_widen_reference_to): Quieten.
945 (build_invokevirtual): Abort if we try to invokevirtual an
947 (expand_invoke): Don't build a non-interface call to an interface.
948 (build_instanceof): Don't do premature optimization if
949 flag_verify_invocations is not set.
950 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
952 (build_static_field_ref): Add correct type conversion for
954 (add_miranda_methods): Disable generation of Miranda methods for
956 (layout_class_method): Don't complain about non-static method
957 overrides static method with dummy classes.
959 2004-08-13 Tom Tromey <tromey@redhat.com>
961 * class.c (build_static_field_ref): Re-enable atable lookups for
964 * parse.y (strip_out_static_field_access_decl): Indentation fix.
966 2004-08-11 Tom Tromey <tromey@redhat.com>
968 * gcj.texi (libgcj Runtime Properties): Document new properties.
970 2004-08-06 Andrew Haley <aph@redhat.com>
972 * jcf-parse.c (load_class): Check that we really have loaded the
973 class we're looking for.
975 2004-07-19 Andrew Haley <aph@redhat.com>
977 * verify.c (verify_jvm_instructions): Comment change only.
979 * typeck.c (build_java_array_type): Add size field to array name.
981 * java-tree.h (LOCAL_SLOT_P): New.
982 (update_aliases): Add PC argument.
983 (pushdecl_function_level): New function.
985 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
986 MODIFY_EXPR, and SAVE_EXPR.
987 (java_gimplify_modify_expr): New function.
989 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
990 (expand_iinc): Pass PC to update_aliases().
991 (STORE_INTERNAL): Likewise.
992 (process_jvm_instruction): Likewise.
994 * decl.c (base_decl_map): New variable.
995 (uniq): New variable.
996 (update_aliases): Rewrite with more thorough checking.
997 (debug_variable_p): New function.
998 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
999 (check_local_named_variable): Delete whole function.
1000 (initialize_local_variable): New function.
1001 (check_local_unnamed_variable): Add checks and comments.
1002 (find_local_variable): Rewrite.
1003 (java_replace_reference): New function.
1004 (function_binding_level): New variable.
1005 (pushdecl_function_level): New function.
1006 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1007 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1008 (start_java_method): Reset uniq. Create base_decl_map. Set
1009 function_binding_level.
1010 (end_java_method): Null unused fields to save memory.
1012 2004-06-29 Andrew Haley <aph@redhat.com>
1014 * except.c (expand_start_java_handler): Push a new binding level.
1015 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1016 register_exception_range() to register where we'll do it.
1017 (expand_end_java_handler): Remove old bogus code. Replace with
1018 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1019 the top of the expression we're curently building.
1020 (maybe_end_try): Delete.
1021 * decl.c (binding_level.exception_range): New field.
1022 (clear_binding_level): Add field exception_range. Reformat.
1023 (poplevel): Call expand_end_java_handler().
1024 (poplevel): Call java_add_stmt only if functionbody is false.
1025 (maybe_poplevels): Don't call maybe_end_try() from here.
1026 (end_java_method): Clear no longer used trees in function decl.
1027 (register_exception_range): New function.
1028 * java-tree.h (register_exception_range, struct eh_range): Declare.
1030 2004-06-22 Andrew Haley <aph@redhat.com>
1032 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1034 * check-init.c (get_variable_decl): Teach check-init about
1035 FIELD_DECLs addressed via the otable.
1036 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1039 2004-05-28 Andrew Haley <aph@redhat.com>
1041 * jcf-parse.c (load_class): Don't try to read a class that we've
1044 * expr.c (build_invokeinterface): Use the old-fashioned way of
1045 doing indirect dispatch: look up interfaces by name.
1046 * java-tree.h (enum java_tree_index): Add
1047 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1048 * decl.c (java_init_decl_processing): Add
1049 soft_lookupinterfacemethodbyname_node.
1051 * gjavah.c (print_method_info): Final methods have vtable entries,
1052 so gjavah needs to output them.
1053 * class.c (layout_class_method): Generate vtable entries for final
1055 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1056 dispatch, even if a method is final.
1058 2004-05-25 Andrew Haley <aph@redhat.com>
1060 * class.c (build_symbol_entry): Convert the names of constructors
1061 to init_identifier_node when generating an entry for the indirect
1064 * expr.c (build_known_method_ref): Generate indirect calls for
1065 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1067 2004-05-24 Andrew Haley <aph@redhat.com>
1069 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1070 atable element is of the right type.
1072 * class.c (build_static_field_ref): Cast pointer to correct type
1075 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
1077 * Merged with HEAD as of 20040514. Diff against
1078 gcj-abi-2-merge-20040514.
1080 2004-04-16 Andrew Haley <aph@redhat.com>
1082 * verify.c (check_pending_block): Disable subroutine checks.
1083 (defer_merging): New function.
1084 (merge_types): If types are dummy, use defer_merging to combine them.
1085 (verify_jvm_instructions): If invocation is invokeinterface and
1086 target is dummy, assume target really is an interface.
1088 * parse.y (patch_invoke): Break out call to java_create_object.
1090 * lang.c (flag_verify_invocations): New.
1092 * jcf-parse.c (load_class): If we've already failed to load a
1093 class, don't try again.
1094 (load_class): If we can't find a .class file, don't fail, but emit
1096 (parse_class_file): Don't act on dummy methods.
1098 * java-tree.h (flag_verify_invocations): New.
1100 (lang_type.dummy_class): New field.
1101 (java_create_object): New function.
1102 (METHOD_DUMMY): New.
1104 * expr.c (build_field_ref): Widen field offset.
1105 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1106 that each of its elements is compatible with the one we're
1108 (pop_type_0): Issue a warning to say that we need to generate a
1110 (java_create_object): New function.
1111 (build_field_ref): Only generate hard refs if we're not using
1113 (expand_java_field_op): If we're using !verify_invocations and we
1114 see a missing field, generate a decl for it.
1116 (expand_invoke): If a class doesn't have the method we seek and
1117 we're using !flag_verify_invocations, generate a decl for the
1120 (build_known_method_ref): Always use indirect dispatch via the
1121 atable for static methods.
1123 (expand_java_NEW): Break out object creation into new function,
1126 (can_widen_reference_to): Issue a warning to say that we need to
1127 generate a runtime check.
1129 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1130 (make_method_value): Also use index for interfaces.
1131 (make_class_data): Skip dummy field for inherited data.
1132 Don't build method array for dummy methods.
1133 Set size_in_byte to -1 when using inirect dispatch
1134 Don't build a hard class ref if we don't have a hard ref to our
1135 superclass, or if we're using inirect dispatch.
1136 Null out dispatch tables.
1138 (layout_class_method): Don't complain about non-static method
1139 overrides static method is method is artificial.
1141 (build_static_field_ref): Disable atable references to static
1142 fields for the time being.
1144 (layout_class_methods): Check for CLASS_INTERFACE as
1145 well as CLASS_ABSTRACT.
1147 2004-11-24 Steven Bosscher <stevenb@suse.de>
1149 * class.c (make_class_data): Don't check flag_inline_functions.
1150 * lang.c (flag_really_inline): Remove unused flag.
1151 (java_handle_option): Don't set it here. Remove special handling
1152 of flag_inline_functions for Java.
1153 (java_init): Don't set flag_inline_trees here. Already done...
1154 (java_post_options): ...here. Don't clear flag_inline_functions.
1156 2004-11-24 Steven Bosscher <stevenb@suse.de>
1158 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1159 (java_gimplify_exit_block_expr): New function.
1160 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1162 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1163 (EXIT_BLOCK_EXPR): Likewise.
1164 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1165 (LABELED_BLOCK_BODY): Likewise.
1166 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1167 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1168 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
1170 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1171 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1172 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
1173 second operand of EXIT_BLOCK_EXPR.
1174 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1176 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1178 2004-11-23 Ben Elliston <bje@au.ibm.com>
1180 * xref.h (xref_flag_value): Remove.
1181 (xref_set_data, xref_get_data): Likewise.
1182 (xref_set_current_fp): Likewise.
1183 (XREF_NONE): Likewise.
1184 (XREF_GET_DATA): Likewise.
1185 * xref.c (xref_flag_value): Remove.
1186 (xref_set_data, xref_get_data): Likewise.
1187 (xref_set_current_fp): Likewise.
1189 2004-11-23 Ben Elliston <bje@au.ibm.com>
1191 * gjavah.c (output_directory): Make static.
1192 (temp_directory): Likewise.
1194 2004-11-15 Tom Tromey <tromey@redhat.com>
1196 * decl.c (instn_ptr_type_node): Removed.
1197 (lineNumbers_ptr_type_node): Removed.
1198 (jint_type): Removed.
1199 (jint_ptr_type): Removed.
1201 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
1204 * check-init.c (check_init): Ignore DECL_EXPR.
1205 * expr.c (always_initialize_class_p): Reenable.
1206 (build_class_init): Use a variable to store the decl. Also use
1207 boolean_false_node instead of integer_zero_node.
1208 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1211 2004-11-08 Tom Tromey <tromey@redhat.com>
1214 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1215 generating a JNI header.
1216 (print_field_info): Handle JNI headers.
1217 (jni_print_float): Likewise.
1218 (jni_print_double): Likewise.
1220 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
1222 * decl.c (end_java_method): Remove duplicated code.
1224 2004-11-06 Zack Weinberg <zack@codesourcery.com>
1225 Gerald Pfeifer <gerald@pfeifer.com>
1227 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1230 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
1233 * class.c: Reinstate 2004-08-18 patch.
1234 (make_local_function_alias): Don't create an alias for extern (native)
1237 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
1240 * class.c (make_local_function_alias): Revert 2004-08-18 change.
1241 (make_method_value): Likewise.
1243 2004-10-21 Andrew Haley <aph@redhat.com>
1246 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1248 2004-10-20 Andrew Haley <aph@redhat.com>
1250 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1251 Remove duplicated code block.
1253 2004-10-18 Steven Bosscher <stevenb@suse.de>
1255 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1256 New rules to work around old Bison warnings.
1258 2004-10-17 Steven Bosscher <stevenb@suse.de>
1260 * class.c (ident_subst): Always alloca buffer.
1261 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1262 opcode after including javaop.def.
1263 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1264 conditional expression that exits, to avoid warnings.
1265 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1266 a user of an extension.
1267 * win32-host.c: Move check down to have non-empty file when
1268 WIN32 is not defined.
1270 * Make-lang.in (java-warn): Add STRICT_WARN.
1271 (java/jcf-io.o-warn): Don't have Werror for this file.
1272 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1274 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
1276 * expr.c (expr_add_location): Move declaration to before all
1278 * parse.y (java_expand_classes): Ditto.
1279 * lex.c (java_peek_unicode): Ditto.
1281 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1283 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1284 if possible, else convert `foo' to 'foo'.
1285 * class.c: Likewise.
1288 * jcf-io.c: Likewise.
1289 * jcf-parse.c: Likewise.
1292 * parse.h: Likewise.
1294 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1296 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1297 rename parameter 'msg' to 'msgid' in function declaration.
1298 (issue_warning_error_from_context): Likewise.
1299 (yyerror): Rename parameter 'msg' to 'msgid'.
1300 (all over): Use new quoting style for diagnostics.
1302 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1304 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1305 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1308 2004-10-14 Matt Austern <austern@apple.com>
1310 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1313 2004-10-13 Tom Tromey <tromey@redhat.com>
1316 * lang.opt (--extdirs): Document.
1317 * jvspec.c (lang_specific_driver): Recognize -encoding and
1320 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
1322 * parse.y (issue_warning_error_from_context): Use va_list *
1323 instead of va_list parameter.
1324 (parse_error_context): Update call.
1325 (parse_warning_context): Likewise.
1327 2004-10-05 Zack Weinberg <zack@codesourcery.com>
1329 * parse.y, parse-scan.y: Add list of diagnostic messages to
1330 insulate translation template from version of yacc/bison used
1331 to compile the grammar.
1333 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
1335 Prepare for %q, %< and %> in diagnostic message strings.
1336 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1337 Name second parameter 'msgid'.
1338 * parse.y: Additionally include pretty-print.h and diagnostic.h.
1339 (issue_warning_error_from_context): Use pretty-printer functions
1340 instead of vsprintf for constructing formatted messages. Rename
1341 parameter 'msg' to 'msgid'.
1342 (parse_error_context): Rename parameter 'msg' to 'msgid'.
1343 (parse_warning_context): Likewise.
1345 2004-10-05 Andrew Haley <aph@redhat.com>
1348 * jcf-parse.c (parse_zip_file_entries): If a class has a
1349 superclass and a TYPE_SIZE of zero, lay it out.
1351 2004-09-30 Andrew Haley <aph@redhat.com>
1354 * jcf-parse.c (compute_class_name): Rewrite.
1356 2004-10-01 Jan Hubicka <jh@suse.cz>
1358 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1360 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1362 * lex.c: Fix a comment typo.
1364 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1366 * java-tree.h: Fix a comment typo.
1368 2004-09-30 Per Bothner <per@bothner.com>
1370 Simplify lexer. Implement --enable-mapped-location support.
1371 * jcf-parse.c (parse_class_file): Use linemap_line_start.
1372 (parse_source_file_1): Pass filename as extra parameter, so we can call
1373 linemap_add and set input_location here, rather than in both callers.
1374 (read_class): Pass copied filename to parse_source_file_1.
1375 Don't initialize wfl_operator - only needed for source compilation.
1376 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
1377 * lex.h: Remove a bunch of debugging macros.
1378 * lex.h (struct_java_line, struct java_error): Remove types.
1379 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
1380 (struct java_lc_s): Remove prev_col field.
1381 (struct java_lexer): New fields next_unicode, next_columns, and
1382 avail_unicode. New position field, and maybe token_start field.
1383 Don't need hit_eof field - use next_unicode == -1 instead.
1384 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
1385 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
1386 * parse.h: Various changes for USE_MAPPED_LOCATION.
1387 (EXPR_WFL_EMIT_LINE_NOTE): XXX
1388 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1389 (struct parser_ctxt): New file_start_location field.
1390 Remove p_line, c_line fields since we no longer save lines.
1391 Remove elc, lineno, and current_jcf fields - no longer used.
1392 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
1393 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1394 source_location and is probably not needed anymore anyway.
1395 Use new expr_add_Location function.
1396 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1397 (java_pop_parser_context): Minor cleanup.
1398 (java_parser_context_save_global, java_parser_context_restore_global,
1399 java_pop_parser_context): Save/restore input_location as a unit.
1400 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1401 a source_location instead of a wfl context node.
1402 (check_class_interface_creation): input_filename is not addressable.
1403 (create_artificial_method): Calling java_parser_context_save_global
1404 and java_parser_context_restore_global is overkill. Instead,
1405 temporarily set input_location from class decl.
1406 (java_layout_seen_class_methods): Set input_location from method decl.
1407 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1408 (finish_loop_body): Likewise.
1409 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1410 (java_sprint_unicode): Take a character, not index in line.
1411 (java_sneak_uncode): Replaced by java_peek_unicode.
1412 (java_unget_unicode): No longer used.
1413 (java_allocate_new_line. java_store_unicode): Removed, since we
1414 no longer remember "lines".
1415 (java_new_lexer): Update for new data structures.
1416 (java_read_char): Move unget_value checking to java_read_unicode.
1417 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1418 efficient functions that are used directly when lexing.
1419 (java_read_unicode_collapsing_terminators): No longer needed.
1420 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1421 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1422 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1423 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1424 combine switch branches, and test for common token kinds earlier.
1425 (java_lex_error): Rewrite.
1426 * jv-scan.c (expand_location): New function, copied from tree.c.
1427 (main): Set ctxp->filename instead of setting input_filename directly.
1429 2004-09-30 Per Bothner <per@bothner.com>
1431 More cleanup for --enable-mapped-location.
1432 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1433 input_location here. Instead do it in give_name_to_class.
1434 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1435 * expr.c (expand_byte_code): Call linemap_line_start.
1436 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1437 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1438 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1439 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1440 to USE_MAPPED_LOCATION case.
1442 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1443 * jcf-parse.c (java_parse_file): Don't set input_filename.
1444 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1445 Create a list of TRANSLATION_UNIT_DECL.
1446 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1447 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1448 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1449 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1450 (file_start_location): New static.
1451 (set_source_filename): Avoid extra access to input_filename macro.
1452 Concatenate new name with class's package prefix.
1453 (set_source_filename, give_name_to_class): Update.
1454 (give_name_to_class): Set class's "line 0" input_location here.
1455 (parse_class_file): Set input_location as a unit.
1457 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1459 2004-09-29 Per Bothner <per@bothner.com>
1461 * java-tree.h: Redefine some macros and add some declaration
1462 to handle the USE_MAPPED_LOCATION case.
1463 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1464 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1465 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1466 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1468 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1469 * decl.c (finish_method, java_add_stmt): Likewise.
1470 * java-gimplify.c (java-gimplify.c): Likewise.
1471 * jcf-write.c (generate_bytecode_insns): Likewise.
1472 * lang.c (java_post_options): Likewise - call linemap_add.
1474 2004-09-29 Andrew Haley <aph@redhat.com>
1477 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1478 result of TRUNC_MOD_EXPR.
1479 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1480 * decl.c (java_init_decl_processing): Mark
1481 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1483 2004-09-28 Tom Tromey <tromey@redhat.com>
1486 * class.c (add_miranda_methods): Load superinterface if not
1489 2004-09-28 Andrew Haley <aph@redhat.com>
1492 * jcf-parse.c (load_class): Don't try to read a class that we've
1495 2004-09-28 Andrew Haley <aph@redhat.com>
1497 * jcf-parse.c (load_class): Back out previous broken patch.
1499 2004-09-28 Andrew Haley <aph@redhat.com>
1502 * jcf-parse.c (load_class): Don't try to read a class that we've
1504 Check that we really did read the right class.
1506 2004-09-25 Tom Tromey <tromey@redhat.com>
1509 * parse.y (create_artificial_method): Use add_method_1.
1511 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1513 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1515 * gcj.texi: Fix typos.
1517 2004-09-24 Tom Tromey <tromey@redhat.com>
1520 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1521 in error parts of rule.
1522 (unary_expression): Don't call error_if_numeric_overflow when $1
1525 2004-09-24 Tom Tromey <tromey@redhat.com>
1528 * parse.y (resolve_qualified_expression_name): Set
1529 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1530 * expr.c (force_evaluation_order): Check for empty argument list
1531 after stripping COMPOUND_EXPR.
1533 2004-09-23 Andrew Haley <aph@redhat.com>
1536 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1539 2004-09-23 Tom Tromey <tromey@redhat.com>
1542 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1543 where operand is null.
1545 2004-09-23 Tom Tromey <tromey@redhat.com>
1548 * parse.y (not_accessible_p): Allow access to protected members
1549 even when class is not static.
1551 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1553 * Make-lang.in: Revert the gcc-none.o change.
1555 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1557 * parse.y (patch_anonymous_class): VEC_space returns true if there
1560 2004-09-21 Matt Austern <austern@apple.com>
1563 * gjavah.c (free_method_name_list): Fix function definition so
1564 it's a proper C prototype.
1566 2004-09-21 Tom Tromey <tromey@redhat.com>
1569 * gjavah.c (free_method_name_list): New method.
1572 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1573 Zack Weinberg <zack@codesourcery.com>
1575 * java-tree.def: Use tree_code_class enumeration constants
1576 instead of code letters.
1577 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1578 new tree-class enumeration constants.
1580 2004-09-13 Tom Tromey <tromey@redhat.com>
1583 * class.c (layout_class_method): Put synthetic methods into the
1586 2004-09-11 Andrew Pinski <apinski@apple.com>
1588 * Make-lang.in (java/ggc-none.c): Change dependency
1589 for ggc.h into $(GGC_H).
1591 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1593 * Make-lang.in (java/win32-host.o): Add dependency on
1595 * win32-host.c: Add includes for coretypes.h, jcf.h
1597 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1599 * Make-lang.in (GCJH_OBJS): Change dependency from
1600 ggc-none.o to java/ggc-none.o
1601 (JCFDUMP_OBJS): Likewise.
1602 (java/ggc-none.o): New target.
1604 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1606 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1607 * class.c (build_utf8_ref, build_static_field_ref,
1608 make_field_value, make_method_value, get_dispatch_table,
1609 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1610 * constants.c (get_tag_node, build_ref_from_constant_pool,
1611 build_constants_constructor): Likewise.
1612 * decl.c (java_init_decl_processing): Likewise.
1613 * expr.c (build_java_array_length_access, build_newarray,
1614 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1615 build_java_binop, build_field_ref, expand_java_add_case,
1616 expand_java_call, build_known_method_ref, build_invokevirtual,
1617 build_invokeinterface, build_jni_stub): Likewise.
1618 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1619 * jcf-parse.c (get_constant): Likewise.
1620 * lex.c (do_java_lex): Likewise.
1621 * parse.y (patch_binop, patch_unaryop, patch_cast,
1622 build_newarray_node, patch_newarray): Likewise.
1623 * resource.c (compile_resource_data): Likewise.
1624 * typeck.c (build_prim_array_type): Likewise.
1626 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1628 * decl.c (java_init_decl_processing): Adjust
1629 initialize_sizetypes call.
1631 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1633 * jv-scan.c (fancy_abort): Add.
1635 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1637 * expr.c (build_java_arrayaccess): Use convert to change
1640 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1642 * class.c (make_local_function_alias): Allocate extra space for 'L'
1643 in name buffer. Reported by Thomas Neumann.
1645 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1647 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1648 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1649 * lex.c (do_java_lex): Adjust.
1650 (error_if_numeric_overflow): Likewise.
1652 2004-08-18 Andrew Pinski <apinski@apple.com>
1654 * class.c (make_local_function_alias): Only make a new decl if we
1655 support alias attribute on all decls.
1657 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1659 * class.c (make_local_function_alias): New function. Create local
1660 alias for public method DECL.
1661 (make_method_value): Use make_local_function_alias.
1662 * parse.y (craft_constructor): Don't special-case anonymous classes.
1663 Always set ctor_name to init_identifier_node.
1664 (lookup_method_invoke): Call layout_class_method when creating
1665 anonymous class constructor.
1667 2004-08-18 Richard Henderson <rth@redhat.com>
1669 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1670 default case. Treat '<' similarly. Update for
1671 is_gimple_formal_tmp_var name change.
1673 2004-08-17 Andrew Haley <aph@redhat.com>
1675 * lang.c (lang_printable_name): Obey verbose flag.
1676 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1677 lang_printable_name().
1678 (verify_constructor_circularity, get_printable_method_name,
1679 check_abstract_method_definitions, java_check_regular_methods,
1680 java_check_abstract_methods, check_inner_class_access,
1681 fix_constructors, patch_method_invocation, patch_return):
1683 * expr.c (pop_type_0): Likewise.
1685 * java-tree.h (lang_printable_name_wls): Delete.
1687 2004-08-16 Tom Tromey <tromey@redhat.com>
1690 * parse.y (primary): Changed for initialized and uninitialized
1692 (array_access): Handle array_creation_initialized.
1693 (array_creation_expression): Split into
1694 array_creation_initialized and array_creation_uninitialized.
1696 2004-08-16 Andrew Haley <aph@redhat.com>
1698 * jcf-write.c (find_constant_index): Canonicalize NaNs when
1699 generating bytecode.
1701 2004-08-16 Elliot Lee <sopwith@redhat.com>
1704 * jcf-parse.c (java_parse_file): Handle filenames with embedded
1705 spaces, and quoted filelists.
1707 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1709 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1710 * class.c (build_utf8_ref, build_static_field_ref,
1711 make_field_value, make_method_value, get_dispatch_table,
1712 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1713 * constants.c (get_tag_node, build_ref_from_constant_pool,
1714 build_constants_constructor): Likewise.
1715 * decl.c (java_init_decl_processing): Likewise.
1716 * expr.c (build_java_array_length_access, build_newarray,
1717 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1718 build_java_binop, build_field_ref, expand_java_add_case,
1719 expand_java_call, build_known_method_ref, build_invokevirtual,
1720 build_invokeinterface, build_jni_stub): Likewise.
1721 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1722 * jcf-parse.c (get_constant): Likewise.
1723 * lex.c (do_java_lex): Likewise.
1724 * parse.y (patch_binop, patch_unaryop, patch_cast,
1725 build_null_of_type, patch_newarray): Likewise.
1726 * resource.c (compile_resource_data): Likewise.
1727 * typeck.c (build_prim_array_type): Likewise.
1729 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
1731 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1732 Don't create BLOCK here or call java_gimplify_block.
1734 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
1736 * java-tree.h (flag_deprecated): Removed.
1737 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1738 * parse.y (check_deprecation): Check warn_deprecated instead of
1741 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
1743 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1744 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1745 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1746 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1747 flag_force_classes_archive_check, flag_optimize_sci,
1748 flag_indirect_dispatch): Remove explicit declarations.
1749 * lang.opt: Add implicit declare/define/assign. Remove obsolete
1752 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
1755 * Make-lang.in (java.install-man): Install from either build
1756 tree or source tree, whichever has the file first.
1758 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1760 * jcf-parse.c (get_constant): Adjust force_fit_type call.
1761 * lex.h (SET_LVAL_NODE_TYPE): Remove.
1762 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1763 (do_java_lex): Likewise. Adjust force_fit_type call.
1765 2004-08-04 Roger Sayle <roger@eyesopen.com>
1766 Andrew Haley <aph@redhat.com>
1768 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1769 checking trees as they're being built.
1770 (convert): Call convert_ieee_real_to_integer if we're
1771 converting a constant, even if we're writing a class file.
1773 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
1776 * parse.y (fold_constant_for_init): Call resolve_field_access with
1777 correct current_class context.
1779 2004-08-01 Roger Sayle <roger@eyesopen.com>
1781 * decl.c (update_aliases, initialize_local_variable): Replace calls
1782 to build with calls to buildN.
1783 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1784 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1785 * parse.h (BUILD_THROW): Likewise.
1786 * parse.y (switch_expression, synchronized_statement,
1787 catch_clause_parameter, array_creation_expression,
1788 conditional_expression, make_qualified_name,
1789 resolve_qualified_expression_name, patch_method_invocation,
1790 patch_invoke, build_method_invocation, build_new_invocation,
1791 build_assignment, patch_assignment, build_binop, patch_binop,
1792 build_string_concatenation, build_incdec, patch_unaryop,
1793 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1794 patch_return, build_if_else_statement, build_labeled_block,
1795 build_new_loop, build_loop_body, build_bc_statement,
1796 build_assertion, encapsulate_with_try_catch, build_try_statement,
1797 build_try_finally_statement, patch_synchronized_statement,
1798 emit_test_initialization): Likewise, replace build with buildN.
1800 2004-07-28 Eric Christopher <echristo@redhat.com>
1802 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1803 (java_unsafe_for_reeval): Ditto.
1805 2004-07-26 <hp@bitrange.com>
1807 * parse.y (build_super_invocation): Adjust declaration order to
1808 avoid declaration after statement.
1810 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1812 * decl.c: Rename all identifiers named `class' to `cl'.
1814 2004-07-25 Richard Henderson <rth@redhat.com>
1816 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1818 2004-07-23 Mike Stump <mrs@apple.com>
1820 * boehm.c (set_bit): Improve type safety wrt unsignedness.
1821 * gjavah.c (throwable_p, decode_signature_piece,
1822 print_full_cxx_name, print_include, add_namelet, add_class_decl,
1823 process_file): Likewise.
1824 * jcf-dump.c (main): Likewise.
1825 * jcf-io.c (read_zip_member): Likewise.
1826 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1827 give_name_to_class, get_class_constant): Likewise.
1828 * jcf-write.c (find_constant_wide, push_long_const,
1829 generate_classfile): Likewise.
1830 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1831 * parse.y (read_import_dir): Likewise.
1832 * typeck.c (parse_signature_type): Likewise.
1833 * verify.c (verify_jvm_instructions): Likewise.
1834 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1836 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1838 * Make-lang.in: Replace rmic and rmiregistry references with
1839 grmic and grmiregistry.
1840 * gcj.texi: Likewise.
1842 2004-07-20 Andrew Haley <aph@redhat.com>
1845 * verify.c (verify_jvm_instructions): Comment change only.
1847 * typeck.c (build_java_array_type): Add size field to array name.
1849 * java-tree.h (LOCAL_SLOT_P): New.
1850 (update_aliases): Add PC argument.
1851 (pushdecl_function_level): New function.
1853 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1854 MODIFY_EXPR, and SAVE_EXPR.
1855 (java_gimplify_modify_expr): New function.
1857 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1858 (expand_iinc): Pass PC to update_aliases().
1859 (STORE_INTERNAL): Likewise.
1860 (process_jvm_instruction): Likewise.
1862 * decl.c (base_decl_map): New variable.
1863 (uniq): New variable.
1864 (update_aliases): Rewrite with more thorough checking.
1865 (debug_variable_p): New function.
1866 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1867 (check_local_named_variable): Delete whole function.
1868 (initialize_local_variable): New function.
1869 (check_local_unnamed_variable): Add checks and comments.
1870 (find_local_variable): Rewrite.
1871 (java_replace_reference): New function.
1872 (function_binding_level): New variable.
1873 (pushdecl_function_level): New function.
1874 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1875 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1876 (start_java_method): Reset uniq. Create base_decl_map. Set
1877 function_binding_level.
1878 (end_java_method): Null unused fields to save memory.
1880 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
1882 * class.c (add_interface_do): Remove.
1883 (set_super_info, interface_of_p, maybe_add_interface,
1884 add_interface, make_class_data, layout_class,
1885 add_miranda_methods): Adjust BINFO accessors and addition.
1886 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
1888 * jcf-write.c (generate_classfile): Likewise.
1889 * parse.y (patch_anonymous_class, check_inner_circular_reference,
1890 check_circular_reference, java_complete_class,
1891 check_abstract_method_definitions,
1892 java_check_abstract_method_definitions,
1893 check_interface_throws_clauses, java_check_abstract_methods,
1894 lookup_java_interface_method2,
1895 find_applicable_accessible_methods_list): Adjust BINFO accessors
1897 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
1899 2004-07-18 Roger Sayle <roger@eyesopen.com>
1901 * builtins.c (max_builtin, min_builtin,
1902 java_build_function_call_expr): Replace calls to build with buildN.
1903 * class.c (build_class_ref, build_static_field_ref,
1904 get_dispatch_table, make_class_data, layout_class_method): Likewise.
1905 * constants.c (build_ref_from_constant_pool): Likewise.
1906 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
1907 add_stmt_to_compound): Likewise.
1908 * except.c (build_exception_object_ref, expand_end_java_handler):
1910 * java-gimplify.c (java_gimplify_case_expr,
1911 java_gimplify_default_expr, java_gimplify_block,
1912 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
1913 * jcf-write.c (generate_bytecode_insns): Likewise.
1914 * typeck.c (convert_ieee_real_to_integer): Likewise.
1916 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
1918 * java-tree.h (builtin_function): Declare.
1920 2004-07-16 Steven Bosscher <stevenb@suse.de>
1922 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
1923 abuse restore_line_number_status.
1925 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
1928 * jcf-parse.c (java_emit_static_constructor): Specify default
1931 2004-07-13 Per Bothner <per@bothner.com>
1933 * java-tree.h (all_class_filename): Remove useless macro.
1934 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
1935 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
1936 * parse.y (java_parser_context_restore_global): Replace
1937 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
1938 * jcf-parse.c (read_class, java_parse_file): Likewise.
1940 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
1943 gjavah.c (print_field_info): Emit constant only if field is static.
1945 2004-07-11 Roger Sayle <roger@eyesopen.com>
1947 * expr.c (java_truthvalue_conversion, flush_quick_stack,
1948 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
1949 build_java_ret, build_java_throw_out_of_bounds_exception,
1950 build_java_array_length_access, java_check_reference,
1951 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
1952 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
1953 expand_java_arrayload, build_java_monitor, expand_java_return,
1954 expand_load_internal, expand_java_NEW, build_get_class,
1955 build_instanceof, expand_java_CHECKCAST, expand_iinc,
1956 build_java_soft_divmod, build_java_binop, build_field_ref,
1957 expand_compare, expand_java_goto, expand_java_switch,
1958 expand_java_add_case, build_class_init, build_known_method_ref,
1959 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
1960 expand_invoke, build_jni_stub, expand_java_field_op,
1961 java_expand_expr, expand_byte_code, STORE_INTERNAL,
1962 force_evaluation_order, emit_init_test_initialization): Convert
1963 calls to "build" into calls to the prefered "buildN" functions.
1965 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
1967 * java-tree.h (set_block): Remove.
1968 * lang.c (java_clear_binding_stack): New.
1969 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
1970 * decl.c (struct binding_level): Remove this_block.
1971 (clear_binding_level): Likewise.
1972 (poplevel): Don't handle this_block.
1973 (set_block): Remove.
1975 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
1977 * class.c (common_enclosing_context_p): Remove statement with no
1980 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
1983 * parse.y (create_anonymous_class): Remove 'location' argument. Use
1984 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
1985 (craft_constructor): Inherit access flags for implicit constructor
1986 from the enclosing class.
1987 (create_class): Fix comment typo.
1988 (resolve_qualified_expression_name): Pass type of qualifier to
1989 not_accessible_p, not the type in which target field was found.
1990 (not_accessible_p): Handle inner classes. Expand protected
1991 qualifier-subtype check to enclosing instances, but don't apply this
1992 check to static members. Allow protected access to inner classes
1993 of a subtype. Allow private access within common enclosing context.
1994 (build_super_invocation): Get WFL line number info from current
1996 (build_incomplete_class_ref): Update for new create_anonymous_class
1998 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
1999 common_enclosing_instance_p.
2000 * class.c (common_enclosing_context_p): New. Determine if types
2001 share a common enclosing context, even across static contexts.
2002 (common_enclosing_instance_p): Renamed from
2003 common_enclosing_context_p. Determines if types share a common
2004 non-static enclosing instance.
2005 * java-tree.h (common_enclosing_instance_p): Declare.
2006 * jcf-write.c (get_method_access_flags): New. Surpress private flag
2007 for inner class constructors.
2008 (generate_classfile): Use get_method_access_flags.
2010 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2012 * class.c (interface_of_p): Check for null TYPE_BINFO.
2014 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
2016 * class.c (make_class): Do not create binfo here.
2017 (set_super_info): Create it here.
2018 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2020 2004-07-08 Richard Henderson <rth@redhat.com>
2022 * expr.c (case_identity, get_primitive_array_vtable,
2023 java_expand_expr, emit_init_test_initialization): Remove.
2024 * java-tree.h (java_expand_expr): Remove.
2025 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2027 2004-07-07 Per Bothner <per@bothner.com>
2029 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
2030 get internal error due to mismatched types.
2032 * gcj.texi (Invoking gij): Document new -verbose:class flag.
2034 * gcj.texi (Linking): New node. Document -lgij usage.
2036 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2038 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2039 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2040 * java/class.c (set_super_info, class_depth, interface_of_p,
2041 maybe_add_interface, add_interface, make_class_data,
2042 layout_class, add_miranda_methods): Adjust BINFO macros.
2043 * expr.c (can_widen_reference_to, lookup_field): Likewise.
2044 * jcf-write.c (generate_classfile): Likewise.
2045 * parse.y (patch_anonymous_class,
2046 check_inner_circular_reference, check_circular_reference,
2047 java_complete_class, check_abstract_method_definitions,
2048 java_check_abstract_method_definitions,
2049 check_interface_throws_clauses, java_check_abstract_methods,
2050 lookup_java_interface_method2,
2051 find_applicable_accessible_methods_list): Likewise.
2052 * typeck.c (find_method_in_interface): Likewise.
2053 * verify.c (merge_types): Likewise.
2055 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2057 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2058 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2060 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2062 * class.c (make_class): Use make_tree_binfo.
2063 (set_super_info, add_interface_do): Likewise.
2064 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2066 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2068 * verify.c: Correct array element access formatting thinko.
2070 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2072 * verify.c: Insert a short blurb at the start referring to the JVMS.
2073 (merge_type_state): Remove redundant nested if statement.
2074 (verify_jvm_instructions): Ensure current_subr is initialised to
2076 Minor formatting fixes all over the place.
2078 2004-07-02 Richard Henderson <rth@redhat.com>
2080 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2082 2004-07-01 Richard Henderson <rth@redhat.com>
2084 * class.c (registerClass_libfunc): Remove.
2085 (init_class_processing): Don't set it.
2086 (emit_register_classes): Take list_p parameter. Fill it in
2087 with _Jv_RegisterClass calls.
2088 * decl.c (java_init_decl_processing): Don't call
2089 init_resource_processing.
2090 * jcf-parse.c (java_emit_static_constructor): New.
2091 (java_parse_file): Call it.
2092 * resource.c (registerResource_libfunc): Remove.
2093 (init_resource_processing): Remove.
2094 (write_resource_constructor): Take list_p parameter. Fill it in
2095 with _Jv_RegisterResource calls.
2096 * java-tree.h: Update prototypes.
2098 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
2101 * class.c (layout_class_method): Do not override package-private
2102 method if its in a different package.
2103 (split_qualified_name): Move here from parse.y. Rename from
2104 breakdown_qualified. Add comment.
2105 (in_same_package): Move here from parse.y. Add comment.
2106 * java-tree.h (break_down_qualified, in_same_package): Declare.
2107 (in_same_package): Likewise.
2108 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2111 2004-06-29 Andrew Haley <aph@redhat.com>
2113 * except.c (expand_start_java_handler): Push a new binding level.
2114 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
2115 register_exception_range() to register where we'll do it.
2116 (expand_end_java_handler): Remove old bogus code. Replace with
2117 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2118 the top of the expression we're curently building.
2119 (maybe_end_try): Delete.
2120 * decl.c (binding_level.exception_range): New field.
2121 (clear_binding_level): Add field exception_range. Reformat.
2122 (poplevel): Call expand_end_java_handler().
2123 (poplevel): Call java_add_stmt only if functionbody is false.
2124 (maybe_poplevels): Don't call maybe_end_try() from here.
2125 (end_java_method): Clear no longer used trees in function decl.
2126 (register_exception_range): New function.
2127 * java-tree.h (register_exception_range, struct eh_range): Declare.
2129 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
2131 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2133 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
2136 * expr.c (class_has_finalize_method): Fix method name indentation.
2137 (expand_java_call): Remove K&R style parameter declaration.
2138 (expand_invoke): Fix statement indentation.
2139 (expand_java_field_op): Likewise.
2140 * parse-scan.y: Fix typo.
2141 (reset_report): Fix method name indentation.
2142 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2144 * verify.c (verify_jvm_instructions): Document parameters, insert
2146 * lang.c (lang_init_source): Fix method name indentation.
2147 * class.c (common_enclosing_context_p): Likewise.
2148 (emit_symbol_table): Fix parameter list indentation.
2149 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2150 parameter declaration.
2151 * constants.c: Fix copyright notice indentation.
2152 * typeck.c (find_method_in_superclasses): Fix parameter list
2154 (find_method_in_interfaces): Likewise.
2155 * zextract.c (makelong): Fix method name indentation.
2157 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2160 * parse.y (create_interface): Set correct access modifiers for
2162 * jcf-write.c (get_classfile_modifiers): New function.
2163 (generate_classfile): Use get_classfile_modifiers, not
2166 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2168 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2169 dependency to current parser context, not NULL_TREE, for top-level
2171 (jdep_resolve_class): Enable member access check for all inner
2174 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2176 * parse.y (qualify_and_find): Pass type decl, not identifier, to
2179 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2182 * expr.c (expand_java_field_op): Ensure that target class for static
2183 field access has been loaded.
2185 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2186 Ranjit Mathew <rmathew@hotmail.com>
2188 PR java/1207, java/16178
2189 * jcf-parse.c (load_class): Return immediately if passed a type decl
2190 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2191 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2192 before calling load_class.
2193 (qualify_and_find): Likewise.
2194 (find_in_imports_on_demand): Likewise.
2195 (find_applicable_accessible_methods_list): Likewise.
2197 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
2199 * parse.y (java_layout_seen_class_methods): Don't call load_class
2200 on class defined by source parser.
2202 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
2204 * parse.y (set_nested_class_simple_name_value): Removed.
2205 (java_complete_expand_class): Remove calls to
2206 set_nested_class_simple_name_value.
2208 2004-06-22 Andrew Haley <aph@redhat.com>
2209 Ranjit Mathew <rmathew@hotmail.com>
2211 Fixes PR java/16113.
2212 * decl.c (force_poplevels): Remove call to expand_end_bindings.
2214 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
2216 * parse.y (create_class): Correct diagnostic message about
2217 java.lang.Object extending anything else.
2219 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2221 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2222 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2223 * constants.c (build_ref_from_constant_pool): Likewise.
2224 * expr.c (build_java_array_length_access): Likewise.
2225 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2226 (invoke_build_dtable, build_invokevirtual): Likewise.
2227 (build_invokeinterface, java_expand_expr): Likewise.
2228 (emit_init_test_initialization): Likewise.
2229 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2230 * parse.y (make_qualifed_name, build_array_ref): Likewise.
2232 2004-06-21 Andrew Haley <aph@redhat.com>
2234 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2237 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2239 * jcf.h (struct JCF): Change java_source, right_zip and finished
2241 * lex.h (struct java_lexer): Change hit_eof, read_anything,
2242 byte_swap and use_fallback to unsigned int.
2243 * parse.h (struct _jdep): Change flag0 to unsigned int.
2245 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
2248 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2249 before trying to lay out its methods.
2250 * jcf-parse.c (read_class): Track parsed files using canonical paths
2251 obtained via lrealpath from libiberty.
2252 (java_parse_file): Likewise.
2253 (parse_source_file_1): Rename formal parameter to reflect its
2254 modified purpose. Minor formatting fix.
2256 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2258 * class.c (emit_register_classes): Make the function uninlinable,
2259 do not set current_function_cannot_inline.
2260 * resource.c (write_resource_constructor): Do not reset
2261 flag_inline_functions around rest_of_compilation.
2263 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
2266 * expr.c (java_truthvalue_conversion): Handle
2267 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2268 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2269 i.e. return the expression.
2271 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
2273 * gjavah.c: Include version.h
2275 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
2277 * jcf-write.c (generate_bytecode_conditional): Correct handling
2278 of unordered conditionals. Add comment.
2280 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
2281 Per Bothner <per@bothner.com>
2283 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2284 local variable was initialised upon declaration.
2285 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2286 variable was final and initialised upon declaration.
2287 * check-init.c (check_final_reassigned): Give error only if a blank
2288 final is not definitely unassigned or if an initialised final is
2290 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2291 assignment expressions. Remove case MODIFY_EXPR, label do_default.
2292 (check_init): Perform initialised-variable-removing-optimisation
2293 only on non-final local variables.
2295 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2297 * jcf-write.c (generate_bytecode_conditional): Handle binops
2298 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2300 (generate_bytecode_insns): Likewise.
2302 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2304 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2305 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2307 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2309 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2310 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2312 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2314 * decl.c (struct binding_level): Add GTY marker. Compile
2315 binding_depth unconditionally.
2316 (current_binding_level, free_binding_level, global_binding_level):
2318 (clear_binding_level): Unconditionally set binding_depth.
2319 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2321 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2323 * lex.c (java_new_lexer): Set 'encoding'.
2324 (java_read_char): Improve error message for unrecognized characters.
2325 * lex.h (struct java_lexer): New field 'encoding'.
2327 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2329 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2331 2004-05-21 Mark Wielaard <mark@klomp.org>
2333 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2336 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
2338 * typeck.c: Remove non-printable character 160.
2340 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
2342 * check-init.c: Correct minor typos.
2344 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2346 * Make-lang.in, expr.c, java-gimplify.c: Rename
2347 tree-simple.[ch] to tree-gimple.[ch].
2349 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
2351 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2353 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2355 Merge from tree-ssa-20020619-branch. See
2356 ChangeLog.tree-ssa for details.
2358 * Make-lang.in, builtins.c, check-init.c, class.c,
2359 constants.c, decl.c, except.c, expr.c, java-except.h,
2360 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2361 lang.c, lang.opt, parse.y, resource.c: Merged.
2362 * java-gimplify.c: New file.
2364 2004-05-10 Andrew Haley <aph@redhat.com>
2366 * parse.y (create_class): Set TYPE_VFIELD.
2367 * decl.c (java_init_decl_processing): Likewise.
2369 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2370 * class.c (make_method_value): Replace DECL_VINDEX with call to
2372 (get_dispatch_vector): Likewise.
2373 (layout_class_method): Likewise.
2374 Replace set of DECL_VINDEX with call to set_method_index().
2375 (set_method_index): New function.
2376 (get_method_index): New function.
2377 * java-tree.h (set_method_index): New function decl.
2378 (get_method_index): New function decl.
2380 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
2382 * parse.y (check_pkg_class_access): Add new argument
2383 and use it when cl is NULL to call lookup_cl on it.
2384 (parser_check_super_interface): Do not call lookup_cl.
2385 Pass this_decl to check_pkg_class_access and NULL
2386 instead of lookup_cl.
2387 (parser_check_super): Update for change in
2388 check_pkg_class_access.
2389 (do_resolve_class): Likewise.
2390 (process_imports): Likewise.
2391 (find_in_imports_on_demand): Likewise.
2392 (resolve_qualified_expression_name): Likewise.
2394 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2396 Fixes PR java/9685, PR java/15073
2397 * parse.y (accessibility_string): New method.
2398 (not_accessible_field_error): Use accessibility_string()
2399 instead of java_accstring_lookup().
2400 (resolve_qualified_expression_name): Check with
2401 check_pkg_class_access() before allowing access using
2404 Use check_pkg_class_access() instead of not_accessible_p()
2405 for unqualified types.
2406 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2407 REFERENCE for package-private access checking.
2408 (patch_method_invocation): Use accessibility_string() instead
2409 of java_accstring_lookup().
2411 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2414 * gjavah.c (struct method_name): Add member is_native.
2415 (overloaded_jni_method_exists_p): Match candidate method only if
2417 (print_method_info): Initialise is_native flag from the method's
2420 2004-04-30 Roger Sayle <roger@eyesopen.com>
2422 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2423 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2425 2004-04-22 Roger Sayle <roger@eyesopen.com>
2427 * resource.c (write_resource_constructor): Guard call to possibly
2428 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2430 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2432 * class.c (make_class_data): Add new field aux_info.
2433 * decl.c (java_init_decl_processing): Push type and decl for
2436 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2438 * expr.c (expand_java_NEW): Don't use size argument for
2439 _Jv_AllocObject calls.
2440 * parse.y (patch_invoke): Likewise.
2442 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2444 * expr.c (build_invokeinterface): Remove unused variables to
2447 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2449 * class.c (get_interface_method_index): New function. Return dispatch
2450 index for interface method.
2451 (make_method_value): For interface methods, set index field to
2452 iface dispatch index, not DECL_VINDEX.
2453 * expr.c (build_invokeinterface): Use get_interface_method_index.
2455 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2457 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2459 2004-03-31 Andrew Haley <aph@redhat.com>
2462 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2464 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2466 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2467 form of GTY markers.
2469 2004-03-25 Marcus Meissner <meissner@suse.de>
2472 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2474 2004-03-23 Tom Tromey <tromey@redhat.com>
2477 * jcf-write.c (make_class_file_name): Don't report if mkdir
2480 2004-03-23 Tom Tromey <tromey@redhat.com>
2482 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2484 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2486 * class.c, gjavah.c, lang.c: Fix comment typos.
2487 * gcj.texi: Fix typos.
2489 2004-03-19 Per Bothner <per@bothner.com>
2491 * gcj.texi (Code Generation): Document new flags and assert defaults.
2493 * class.c (assume_compiled_node_struct): Rename type to
2494 class_flag_node_struct, as it is now also used for enable_assertions.
2495 Rename assume_compiled_node typedef. Rename excludep field to value.
2496 (find_assume_compiled_node): Rename function to find_class_flag_node.
2497 Minor optimization - avoid needless strlen.
2498 (add_assume_compiled): Some tweaking and optimization.
2499 Rename and generalize to add_class_flag takem an extra parameter.
2500 (add_assume_compled): New just calls add_class_flag.
2501 (add_enable_assert, enable_assertions): New functions.
2502 (enable_assert_tree): New static.
2503 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2504 * lang.opt (fenable-assertions, fenable-assertions=,
2505 fdisable-assertions, fdisable-assertions=): New options.
2506 * lang.c (java_handle_option): Handle new options.
2507 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2508 class in an interface - create helper class nested in outer interface.
2509 (build_assertion): Short-circuit if enable_assertions is false.
2511 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2513 * java-tree.h: Changes throughout to add checking to macros
2514 and numerous whitespace changes.
2515 (VAR_OR_FIELD_CHECK): New macro.
2516 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2517 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2519 2004-03-16 Per Bothner <per@bothner.com>
2521 * jcf-jump.c (options): New --print-constants option.
2522 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2524 * jcf-dump.c (flag_print_constant_pool): Default to off.
2525 (print_constant_terse_with_index): New helper function.
2526 (various places): Check flag_print_constant_pool where missing.
2527 (main): If verbose set flag_print_constant_pool.
2528 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2530 2004-03-15 Andrew Haley <aph@redhat.com>
2533 * parse.y (java_complete_lhs): Check that final variable has an
2536 2004-03-12 Andrew Haley <aph@redhat.com>
2539 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2542 2004-02-29 Roger Sayle <roger@eyesopen.com>
2544 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2547 2004-02-27 Per Bothner <per@bothner.com>
2549 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2550 suggestion: Use build_incomplete_class_ref.
2551 This fixes PR java/13508, java/11714.
2553 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2555 * java/parse.h: Update copyright.
2557 2004-02-26 Andrew Haley <aph@redhat.com>
2560 * parse.y (check_interface_throws_clauses): Check for
2561 !METHOD_INVISIBLE (iface_method).
2562 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2563 well as CLASS_ABSTRACT.
2565 2004-02-25 Per Bothner <per@bothner.com>
2567 * parse.y (build_assertion): If we're in an inner class, create the
2568 class$ helper routine in the outer class.
2570 2004-02-19 Richard Henderson <rth@redhat.com>
2572 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2574 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2576 * Make-lang.in (java.install-man): Add extra dependencies.
2578 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2580 * Make-lang.in: Install man pages under the same names
2581 (possibly transformed) as the program they document.
2583 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2585 * gjavah.c: Include "intl.h".
2586 (error): New function.
2587 (main): Call gcc_init_libintl.
2588 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2589 print_stub_or_jni, process_file, main): Use error rather than
2591 (print_method_info, usage, help, version, main): Mark strings for
2592 translation with _. Avoid splitting up sentences. Send
2593 information messages to stdout.
2594 * jcf-dump.c: Include "intl.h".
2595 (main): Call gcc_init_libintl.
2596 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2597 Mark error, usage and version messages for translation with _.
2598 Avoid splitting up sentences.
2599 * jv-scan.c: Include "intl.h".
2600 (fatal_error, warning): Change parameter s to msgid. Translate
2602 (main): Call gcc_init_libintl.
2603 (usage, help, version): Mark error, usage and version messages for
2604 translation with _. Avoid splitting up sentences.
2605 * jvgenmain.c: Include "intl.h".
2606 (main): Call gcc_init_libintl.
2607 (usage, main): Mark error messages for translation with _.
2608 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2609 JVGENMAIN_OBJS): Add intl.o.
2610 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2611 java/jvgenmain.o): Update dependencies.
2613 2004-02-08 Per Bothner <per@bothner.com>
2615 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2616 class don't use not_accessible_field_error, which can get confused.
2618 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2620 Make-lang.in (po-generated): Delete.
2622 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2624 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2626 * decl.c: Include target.h.
2627 (start_java_method): Replace PROMOTE_PROTOTYPES with
2628 targetm.calls.promote_prototypes.
2629 * expr.c: Include target.h.
2630 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2631 targetm.calls.promote_prototypes.
2632 * parse.y: Include target.h.
2633 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2634 with targetm.calls.promote_prototypes.
2636 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2638 * typeck.c: Update copyright.
2640 2004-02-02 Tom Tromey <tromey@redhat.com>
2642 * decl.c (java_init_decl_processing): Remove duplicate
2645 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2647 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2649 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2651 * expr.c (build_field_ref): Move variable
2654 2004-01-28 Andrew Haley <aph@redhat.com>
2656 * expr.c (build_field_ref): Widen field offset.
2658 2004-01-27 Andrew Haley <aph@redhat.com>
2661 * parse.y (check_interface_throws_clauses): Make sure class_decl
2664 2004-01-22 Jeff Sturm <jsturm@one-point.com>
2667 * parse.y (patch_assignment): Don't modify lhs_type for
2668 reference assignments.
2670 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2672 * Make-lang.in: Replace $(docdir) with doc.
2673 (java.info, java.srcinfo, java.man, java.srcman): New rules.
2674 (java.install-man): Revamp rule.
2676 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2678 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2679 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2680 instead of deferred backquote.
2682 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
2684 * typeck.c (find_method_in_interfaces): Move variable
2687 2004-01-16 Andrew Haley <aph@redhat.com>
2690 * typeck.c (shallow_find_method): New.
2691 (find_method_in_superclasses): New.
2692 (find_method_in_interfaces): New.
2693 (lookup_do): Rewrite.
2694 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2696 * jcf-parse.c (read_class): Save and restore output_class.
2697 * decl.c (java_expand_body): Set output_class from fndecl.
2699 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
2701 * class.c (gen_indirect_dispatch_tables): Fix string length
2704 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2706 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2707 (java.srcextra): Copy above back to source directory if requested.
2708 (po-generated): Delete reference to $(parsedir).
2709 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2712 2004-01-14 Jan Hubicka <jh@suse.cz>
2714 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2717 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2719 * java-tree.h (java_expand_expr): Change prototype.
2720 * expr.c (java_expand_expr): Add alt_rtl parameter.
2722 2004-01-09 Andrew Haley <aph@redhat.com>
2725 * parse.y (java_fix_constructors): Set output_class.
2726 (java_reorder_fields): Likewise.
2727 (java_layout_classes): Likewise.
2728 (java_expand_classes): Generate indirect dispatch tables.
2729 (java_expand_classes): Set output_class.
2730 (java_finish_classes): Likewise.
2731 * lang.c (java_init): Turn on always_initialize_class_p if we're
2732 using indirect dis[atch.
2733 (java_decl_ok_for_sibcall): Use output_class, not current_class.
2734 (java_get_callee_fndecl): Use class local atable.
2736 (always_initialize_class_p): Decl moved to java-tree.h.
2737 (HANDLE_CLASS_INFO): Set output_class.
2738 (read_class): Likewise.
2739 (parse_class_file): Call gen_indirect_dispatch_tables.
2740 (parse_zip_file_entries): Set output_class.
2741 (java_parse_file): Set output_class. Don't emit symbol tables.
2742 * java-tree.h (output_class): New.
2743 Remove global declarations for otable, atable, and ctable.
2744 (always_initialize_class_p): moved here from decl.c.
2746 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2747 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2748 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2749 (struct lang_type): Add otable_methods, otable_decl,
2750 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2751 ctable_decl, catch_classes, type_to_runtime_map.
2752 * expr.c (build_field_ref): Make otable, atable, and ctable class
2753 local rather than global.
2754 (build_known_method_ref): Likewise.
2755 (build_invokeinterface): Likewise.
2756 (java_expand_expr): Pass runtime type (rather than actual type) to
2758 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2759 this class. Look up each class in that map to delete duplicates.
2760 (expand_end_java_handler): Pass runtime type (rather than actual
2761 type) to expand_start_catch.
2762 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2764 (java_init_decl_processing): Rearrange things. Remove global
2765 declarations of otable, atable, and ctable.
2766 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2767 (java_expand_body): Set output_class.
2768 * constants.c (build_constant_data_ref): Use output_class, not
2770 (alloc_name_constant): Likewise.
2771 * class.c (gen_indirect_dispatch_tables): New.
2772 (build_class_ref): Generate hard reference to superclass, even if
2773 using indirect dispatch.
2774 (build_static_field_ref): Use class local atable.
2775 (make_class_data): Generate hard reference to superclass, even if
2776 using indirect dispatch.
2777 Generate symbolic references to interfaces when using indirect
2779 (make_class_data): Emit otable, atable, and ctable.
2780 Make otable, atable, and ctable class local rather than global.
2781 (emit_catch_table): Make otable, atable, and ctable class local
2784 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
2786 * parse.y (catch_clause_parameter): Fix typo.
2789 * parse.y: (catch_clause_parameter): Return early if $3, aka
2790 formal_parameter, is null.
2792 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
2794 * class.c: Remove uses of "register" specifier in
2795 declarations of arguments and local variables.
2798 * gjavah.c: Likewise.
2799 * jcf-dump.c: Likewise.
2800 * jcf-io.c: Likewise.
2801 * jcf-parse.c: Likewise.
2802 * jcf-write.c: Likewise.
2803 * keyword.h: Likewise.
2804 * parse.y: Likewise.
2805 * typeck.c: Likewise.
2806 * verify.c: Likewise.
2808 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2810 * Make-lang.in (GCJ_CROSS_NAME): Delete.
2811 (java.install_common, java.install-man): Adjust for above.
2812 (java.uninstall): Likewise.
2814 2003-12-03 Michael Koch <konqueror@gmx.de>
2816 * class.c (make_class_data):
2817 Push field value to 'hack_signers' instead of 'signers'.
2818 * decl.c (java_init_decl_processing):
2819 Push field 'hack_signers' instead of 'signers'.
2821 2003-12-03 Zack Weinberg <zack@codesourcery.com>
2823 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2826 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
2829 * parse.y (qualify_ambiguous_name): Remove lots of broken
2830 field access processing - there's no need to do that here,
2831 because we have resolve_field_access. Remove
2832 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2833 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2836 2003-12-01 Jeff Sturm <jsturm@one-point.com>
2839 * parse.y (java_complete_lhs): Save location prior to patching
2842 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
2845 * resource.c (write_resource_constructor): Append
2846 "_resource" to constructor identifier name.
2848 2003-11-25 Jeff Sturm <jsturm@one-point.com>
2851 * constants.c (cpool_for_class): New function.
2852 (outgoing_cpool): Remove global variable.
2853 (alloc_name_constant): Use cpool_for_class.
2854 (build_constants_constructor): Likewise.
2855 * decl.c (java_expand_body): Set current_class.
2856 * java-tree.h (outgoing_cpool) Remove declaration.
2857 (init_outgoing_cpool): Likewise.
2858 * jcf-parse.c (init_outgoing_cpool): Remove function.
2859 (parse_class_file): Don't call init_outgoing_cpool.
2860 * parse.y (java_complete_expand_methods): Don't call
2861 init_outgoing_cpool. Don't save outgoing_cpool.
2862 (java_expand_classes): Don't restore outgoing_cpool.
2863 (java_finish_classes): Likewise.
2865 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
2867 * Make-lang.in: (java.install-common) Add
2868 symlink for $(target_noncanonical)-gcjh for
2871 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2873 * Make-lang.in (java.extraclean): Delete.
2875 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
2877 * Make-lang.in (check-java): Add.
2879 2003-11-19 Jeff Sturm <jsturm@one-point.com>
2882 * except.c (prepare_eh_table_type): Allocate variable-sized
2883 buffer `buf' with alloca.
2885 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2889 decl.c (java_init_decl_processing): Don't initialize
2890 class_not_found_type_node, no_class_def_found_type_node.
2892 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
2893 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
2894 (class_not_found_type_node, no_class_def_found_type_node):
2897 parse.y (build_dot_class_method_invocation): Add this_class
2898 argument. Qualify method invocations to a different class.
2899 (create_new_parser_context): Initialize saved_data_ctx to 0.
2900 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
2901 (build_dot_class_method): Don't load classes. Register
2903 (build_incomplete_class_ref): Special cases for interfaces
2904 and inner classes. Move build_dot_class_method call to here...
2905 (patch_incomplete_class_ref): ...from here. Pass current_class
2906 to build_dot_class_method_invocation.
2907 (build_assertion): Pass class_type to
2908 build_dot_class_method_invocation.
2909 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
2911 2003-11-17 Jeff Sturm <jsturm@one-point.com>
2914 * java-tree.h (BLOCK_EMPTY_P): Define.
2915 * parse.y (java_complete_lhs): Check for empty blocks
2916 in TRY_FINALLY_EXPR case.
2918 2003-11-17 Andrew Haley <aph@redhat.com>
2920 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
2921 (struct lang_decl_var:freed): New variable.
2922 * decl.c (poplevel): Mark local vars that have gone out of scope.
2923 (push_jvm_slot): Don't use the RTL of a var that has gone out of
2926 2003-11-16 Jason Merrill <jason@redhat.com>
2928 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
2929 and TAGS files that include them for each front end.
2931 2003-11-15 Tom Tromey <tromey@redhat.com>
2933 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
2935 2003-11-12 Jason Merrill <jason@redhat.com>
2937 PR optimization/12547
2938 * lang.c (java_tree_inlining_walk_subtrees): Just walk
2939 BLOCK_EXPR_BODY directly.
2941 2003-11-12 Andrew Haley <aph@redhat.com>
2944 * parse.y (fold_constant_for_init): Check that we really do have a
2948 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
2949 init_test_decls being inlined.
2952 * parse.y (do_resolve_class): Check return value from
2953 breakdown_qualified().
2955 2003-11-11 Tom Tromey <tromey@redhat.com>
2958 * parse.y (merge_string_cste): Handle case where we have a
2959 pointer that happens to be zero, not null_pointer_node.
2961 2003-11-10 Tom Tromey <tromey@redhat.com>
2963 * jcf-parse.c (classify_zip_file): Correctly compare
2964 filename_length against length of manifest file's name.
2966 2003-11-08 Tom Tromey <tromey@redhat.com>
2969 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
2971 2003-11-06 Andrew Haley <aph@redhat.com>
2973 * expr.c (java_stack_swap): Make sure destination stack slots are
2974 of the correct type.
2976 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
2978 * Make-lang.in (dvi): Move targets to $(docobjdir).
2979 (gcj.dvi): Simplify rule and adjust target.
2980 (gcj.info): Simplify rule.
2981 (gcj.pod): New intermediate rule.
2982 (gcjh.pod): Likewise.
2983 (jv-scan.pod): Likewise.
2984 (jcf-dump.pod): Likewise.
2985 (gij.pod): Likewise.
2986 (jv-convert.pod): Likewise.
2987 (rmic.pod): Likewise.
2988 (rmiregistry.pod): Likewise.
2991 (jv-scan.1): Delete.
2992 (jcf-dump.1): Delete.
2994 (jv-convert.1): Delete.
2996 (rmiregistry.1): Delete.
2998 2003-11-02 Jeff Sturm <jsturm@one-point.com>
3000 Fixes PR java/12866.
3001 * parse.y (resolve_qualified_expression_name): Move test
3002 for outer field access methods from here...
3003 (check_thrown_exceptions) ...to here.
3005 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
3007 * .cvsignore: Delete.
3009 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
3011 * verify.c (verify_jvm_instructions): Don't warn about legal
3012 eh binding regions generated for example by jdk 1.4.1.
3014 2003-10-24 David S. Miller <davem@redhat.com>
3016 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3018 2003-10-22 Andrew Haley <aph@redhat.com>
3020 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3021 (java_get_callee_fndecl): New.
3023 * jcf-parse.c (java_parse_file): Call emit_catch_table().
3025 * java-tree.h (ctable_decl): New.
3026 (catch_classes): New.
3027 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3029 * decl.c (java_init_decl_processing): Add catch_class_type.
3031 Add catch_classes field.
3033 * class.c (build_indirect_class_ref): Break out from
3035 (make_field_value): Check flag_indirect_dispatch.
3036 (make_class_data): Ditto.
3037 Tidy uses of PUSH_FIELD_VALUE.
3038 Add field catch_classes.
3039 (make_catch_class_record): New.
3041 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3043 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3045 * jcf-write.c: Follow spelling conventions.
3046 * parse.y: Likewise.
3048 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3050 * ChangeLog: Fix typos.
3051 * expr.c: Fix comment typos.
3052 * jcf-write.c: Likewise.
3055 * mangle.c: Likewise.
3056 * parse-scan.y: Likewise.
3057 * parse.y: Likewise.
3059 2003-10-22 Tom Tromey <tromey@redhat.com>
3061 * expr.c (expand_byte_code): Only warn about dead bytecode when
3062 extra_warnings is set.
3064 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
3066 Fix for PR java/12586.
3067 * mangle.c (find_compression_record_match): Don't iterate through
3068 package namespace elements unless they all match compression_table
3071 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
3073 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3074 (generate-manpages): Likewise.
3075 (java.maintainer-clean): Likewise.
3076 (gcj.info): Likewise.
3079 (jv-scan.1): Likewise.
3080 (jcf-dump.1): Likewise.
3082 (jv-convert.1): Likewise.
3084 (rmiregistry.1): Likewise.
3085 (java.install-man): Likewise.
3086 (parse-scan.o): Move and define complete compile line.
3087 (parse.o): Likewise.
3088 (jcf-tree-inline.o): Move.
3090 2003-10-20 Mark Mitchell <mark@codesourcery.com>
3092 * Make-lang.in (info): Update dependencies.
3093 (java.install-info): Remove.
3094 ($(srcdir)/java/gcj.info): Replace with ...
3095 ($(docobjdir)/gcj.info): ... this.
3097 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
3099 * Make-lang.in: Replace uses of $(target_alias) with
3100 $(target_noncanonical).
3102 2003-10-09 Tom Tromey <tromey@redhat.com>
3104 * decl.c (java_init_decl_processing): Declare signers field.
3105 * class.c (make_class_data): Set signers field.
3107 2003-10-09 Jason Merrill <jason@redhat.com>
3109 * parse.y (patch_assignment): Use make_node to create a BLOCK.
3110 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3113 2003-10-06 Mark Mitchell <mark@codesourcery.com>
3115 * Make-lang.in (java.info): Replace with ...
3117 (java.dvi): Replace with ...
3119 (java.generated-manpages): Replace with ...
3121 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
3123 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3125 2003-10-01 Andrew Haley <aph@redhat.com>
3127 * jcf-parse.c (java_parse_file): Write otable and atable.
3128 * java-tree.h (atable_methods): New.
3130 (atable_syms_decl): New.
3131 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3132 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3133 (symbol_*type): Rename method_symbol* to symbol*type.
3134 (emit_offset_symbol_table): Delete.
3135 (emit_symbol_table): New.
3136 (get_symbol_table_index): New.
3138 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3139 (build_known_method_ref): Likewise.
3140 (get_symbol_table_index): Rename from get_offset_table_index.
3141 Parameterize to allow re-use by differing types of symbol table.
3142 (build_invokevirtual): Pass table to get_offset_table_index.
3143 * decl.c (java_init_decl_processing): Push types and decls for
3144 atable and atable_syyms.
3145 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3146 (make_class_data): Add new fields atable and atable_syms.
3147 (emit_symbol_table): Rename from emit_offset_symbol_table.
3148 Parameterize to allow re-use by different types of symbol table.
3149 (build_symbol_entry): Renamed from build_method_symbols_entry.
3151 2003-09-30 Roger Sayle <roger@eyesopen.com>
3153 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3154 semantics for SAVE_EXPR, by caching the result in a temporary.
3156 2003-09-28 Richard Henderson <rth@redhat.com>
3158 * check-init.c (check_init): Save and restore input_location
3159 instead of file and line separately.
3160 * decl.c (java_expand_body): Likewise.
3161 * jcf-write.c (generate_bytecode_insns): Likewise.
3162 * parse.y (safe_layout_class): Likewise.
3163 * jcf-parse.c (read_class, parse_class_file): Likewise.
3164 (java_parse_file): Use %H for warning locator.
3166 2003-09-28 Roger Sayle <roger@eyesopen.com>
3168 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3169 with void-type branches instead of using a COMPOUND_EXPR.
3171 2003-09-28 Jeff Sturm <jsturm@one-point.com>
3173 * decl.c (java_optimize_inline, dump_function): Remove.
3174 * java-tree.h (java_optimize_inline): Remove declaration.
3175 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3176 * parse.y (source_end_java_method, java_expand_classes):
3177 Likewise. Remove dead code.
3179 2003-09-27 Roger Sayle <roger@eyesopen.com>
3181 * lang.c (java_init_options): Set flag_evaluation_order.
3182 * expr.c (force_evaluation_order): Don't attempt to force
3183 evaluation order of binary operations using save_expr.
3184 * parse.y (java_complete_lhs): No longer need to call
3185 force_evaluation_order when constructing binary operators.
3187 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3188 Bryce McKinlay <bryce@mckinlay.net.nz>
3191 * parse.y (not_accessible_field_error): New function.
3192 (resolve_expression_name): Check field access permissions.
3193 (resolve_qualified_expression_name): Use
3194 not_accessible_field_error.
3195 (resolve_qualified_expression_name): Likewise.
3197 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3199 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3201 2003-09-23 Roger Sayle <roger@eyesopen.com>
3203 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3204 with equal operands without side-effects.
3206 2003-09-22 Jeff Sturm <jsturm@one-point.com>
3208 * decl.c (java_init_decl_processing): Don't emit otable decls
3209 if flag_indirect_dispatch is not set.
3211 2003-09-21 Richard Henderson <rth@redhat.com>
3213 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3216 2003-09-21 Richard Henderson <rth@redhat.com>
3218 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3219 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3221 2003-09-20 Richard Henderson <rth@redhat.com>
3223 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3225 2003-09-18 Roger Sayle <roger@eyesopen.com>
3227 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3228 * check-init.c (check_init): Likewise.
3230 2003-09-18 Roger Sayle <roger@eyesopen.com>
3232 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3234 2003-09-16 Andrew Haley <aph@redhat.com>
3236 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3238 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
3241 * mangle.c (find_compression_record_match): Skip
3242 over a "6JArray" (the array template mangled string)
3244 (mangle_array_type): Correct minor typo.
3245 (atms): Move definition to the beginning.
3247 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
3249 * class.c (add_miranda_methods): Ensure super-interfaces are laid
3250 out. Fix for PR java/12254.
3252 2003-09-11 Richard Henderson <rth@redhat.com>
3254 * parse.y (source_end_java_method): Update for new
3255 cgraph_finalize_function argument.
3257 2003-09-09 Richard Henderson <rth@redhat.com>
3259 * parse.y (source_end_java_method): Update call to
3260 cgraph_finalize_function.
3262 2003-09-03 Jeff Sturm <jsturm@one-point.com>
3264 * decl.c (java_expand_body): New function.
3265 * expr.c (build_class_init): Set DECL_IGNORED_P.
3266 * java-tree.h (start_complete_expand_method,
3267 java_expand_body): Declare.
3268 * jcf-parse.c (cgraph.h): Include.
3269 (java_parse_file): Handle flag_unit_at_a_time.
3270 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3271 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3272 (java_estimate_num_insns): Use walk_tree_without_duplicates.
3273 (java_start_inlining): New function.
3274 * parse.h (java_finish_classes): Declare.
3275 * parse.y: Include cgraph.h.
3276 (block): Don't special-case empty block production.
3277 (craft_constructor): Set DECL_INLINE.
3278 (source_end_java_method): Handle flag_unit_at_a_time.
3279 Replace inline code with call to java_expand_body.
3280 (start_complete_expand_method): Remove static modifier.
3281 (java_expand_method_bodies): Patch function tree for
3282 class initialization and/or synchronization as needed.
3283 Don't begin RTL expansion yet.
3284 (java_expand_classes): Check flag_unit_at_a_time before
3285 calling finish_class.
3286 (java_finish_classes): New function.
3287 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3288 (patch_assignment): Set DECL_CONTEXT on temporary variable.
3289 (emit_test_initialization): Set DECL_IGNORED_P.
3291 2003-09-03 Roger Sayle <roger@eyesopen.com>
3293 * builtins.c (enum builtin_type): Delete unused enumeration.
3294 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3296 2003-08-28 Tom Tromey <tromey@redhat.com>
3298 * gcj.texi (Extensions): Document gcjlib URLs.
3300 2003-08-20 Tom Tromey <tromey@redhat.com>
3302 * gcj.texi (Extensions): Added xref.
3303 (libgcj Runtime Properties): Document
3304 gnu.gcj.runtime.VMClassLoader.library_control.
3306 2003-08-20 Andrew Haley <aph@redhat.com>
3308 * except.c (prepare_eh_table_type): Use new encoding for exception
3309 handlers when using -fno-assume-compiled.
3311 2003-08-13 Tom Tromey <tromey@redhat.com>
3313 * gcj.texi (Invoking gij): Document -X and -?.
3315 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
3317 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3318 GCJH_OBJS, JCFDUMP_OBJS
3319 * win32-host.c: Removed the unnecessary and broken dependency
3322 2003-08-11 Tom Tromey <tromey@redhat.com>
3324 * parse.y (java_check_regular_methods): Typo fixes. Call
3325 check_interface_throws_clauses. Use
3326 check_concrete_throws_clauses.
3327 (check_interface_throws_clauses): New function.
3328 (check_concrete_throws_clauses): New function.
3329 (hack_is_accessible_p): New function.
3330 (find_most_specific_methods_list): Added FIXME.
3331 * typeck.c (lookup_do): Use `flags' argument to decide what to
3333 (lookup_argument_method_generic): New function.
3334 (lookup_argument_method2): Removed.
3335 * jcf.h (ACC_INVISIBLE): New define.
3336 * jcf-write.c (generate_classfile): Skip invisible methods.
3337 * class.c (add_miranda_methods): New function.
3338 (layout_class_methods): Use it.
3339 (get_access_flags_from_decl): Use ACC_INVISIBLE.
3340 * java-tree.h (METHOD_INVISIBLE): New define.
3341 (lang_decl_func) [invisible]: New field.
3342 (lookup_argument_method_generic): Declare.
3343 (SEARCH_INTERFACE): New define.
3344 (SEARCH_SUPER): Likewise.
3345 (SEARCH_ONLY_INTERFACE): Likewise.
3346 (SEARCH_VISIBLE): Likewise.
3347 (lookup_argument_method2): Removed declaration.
3349 2003-08-05 Tom Tromey <tromey@redhat.com>
3351 Fix for PR java/11600:
3352 * parse.y (java_complete_lhs): See whether we're calling a method
3354 (check_thrown_exceptions): Added `is_array_call' argument;
3355 fixed `clone' checking; updated all callers.
3357 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
3359 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3361 2003-08-03 Tom Tromey <tromey@redhat.com>
3363 * java-tree.h (METHOD_TRANSIENT): Removed.
3364 * decl.c (pushdecl): Removed some dead code.
3365 * class.c (get_access_flags_from_decl): Can't have transient
3367 (add_method_1): Can't have a transient method.
3369 2003-07-28 Andreas Jaeger <aj@suse.de>
3371 * jvspec.c: Convert to ISO C90 prototypes.
3373 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
3375 * decl.c (force_poplevels): Fix warning call.
3377 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3379 * expr.c (expand_java_field_op): Don't use xxx_with_decl
3380 (expand_java_field_op): Likewise.
3381 * class.c (layout_class_method): Likewise
3382 (emit_register_classes): Likewise.
3383 * decl.c (pushdecl): Likewise.
3384 (poplevel): Likewise.
3385 (force_poplevels): Likewise.
3386 (give_name_to_locals): Likewise.
3387 * check-init.c (check_for_initialization): Likewise.
3389 2003-07-24 Jason Merrill <jason@redhat.com>
3391 * java-tree.h: Move boolean_type_node et al to the back end.
3393 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3395 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3398 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
3400 * lang.opt: Don't show -MD_ and -MDD_.
3402 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
3404 * lang-options.h: Remove.
3405 * lang.opt: Add help text.
3407 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
3409 * expr.c: Remove the last argument to expand_assignment().
3411 2003-07-09 Jan Hubicka <jh@suse.cz>
3413 * java-tree.h (DECL_NUM_STMTS): Rename to...
3414 (DECL_ESTIMATED_INSNS): ... this.
3415 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3416 New static functions.
3417 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3418 * parser.y (add_stmt_to_compound): Do not account statements.
3420 2003-07-08 Mark Wielaard <mark@klomp.org>
3422 * gcj.texi: CNI now expands to Compiled Native Interface.
3424 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3426 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3428 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3430 * expr.c (expand_byte_code): Adjist emit_line_note call.
3432 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3434 * lang.c (java_handle_option): Don't handle filenames.
3436 2003-07-02 Zack Weinberg <zack@codesourcery.com>
3438 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3441 * jcf-write.c: Don't default-define DIR_SEPARATOR.
3442 * jcf.h: Delete COMPARE_FILENAMES definition.
3444 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
3446 * lang.c (java_init_options): Update prototype.
3448 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3450 * decl.c (poplevel): Adjust define_label call.
3452 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3454 * gjavah.c (flag_jni): Make non-static.
3455 * parse-scan.y (ctxp): Make non-static.
3457 * class.c (build_method_symbols_entry)
3458 * expr.c (get_offset_table_index)
3459 * jcf-parse.c (jcf_parse):
3460 Mark the definition static, matching the forward declaration.
3462 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
3464 * lang.c (java_handle_option): Don't check for missing arguments.
3466 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3468 * class.c (push_class): Use a location_t to save place.
3469 (emit_register_classes): Set input_location. Adjust
3470 expand_function_end call.
3471 * resource.c (write_resource_constructor): Likewise.
3472 * decl.c (end_java_method): Adjust expand_function_end call.
3473 * parse.y (source_end_java_method): Likewise.
3475 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3477 * lang.c (java_handle_option): Likewise.
3479 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
3481 * lang.c (java_handle_option): Special-casing of optional
3482 joined arguments no longer needed.
3483 * lang.opt: Update switches that take optional argument.
3485 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3487 * lang.opt: Declare Java.
3488 * lang.c (java_init_options): Update.
3490 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3492 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3494 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3496 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3497 * lang.c (java_handle_option): -MD and -MMD have an underscore.
3498 * lang.opt: -MD and -MMD have an underscore.
3500 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3502 * class.c (emit_register_classes): Adjust init_function_start
3504 * decl.c (complete_start_java_method): Likewise.
3505 * resource.c (write_resource_constructor): Likewise.
3507 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3509 * Make-lang.in: Update to use options.c and options.h.
3510 * lang.c: Include options.h not j-options.h.
3511 (java_handle_option): Abort on unrecognized option.
3512 (java_init_options): Request Java switches.
3514 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
3516 * Make-lang.in: Handle mostlyclean.
3518 2003-06-11 Tom Tromey <tromey@redhat.com>
3520 * lang.c (java_handle_option): Update dependency_tracking for
3523 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3526 2003-06-10 Andrew Haley <aph@redhat.com>
3528 * resource.c (write_resource_constructor): Use expand_expr to
3529 generate the address of the label attached to a resource.
3530 * Make-lang.in (java/resource.o): Add expr.h
3532 2003-06-10 Andrew Haley <aph@redhat.com>
3534 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3535 (java_decl_ok_for_sibcall): New.
3537 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
3539 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3540 (java/j-options.c, java/j-options.h): New.
3541 * java-tree.h (resource_name, compile_resource_file,
3542 compile_resource_data): Constify.
3543 * jcf-write.c (jcf_write_base_directory): Similarly.
3544 * jcf.h (jcf_write_base_directory): Similarly.
3545 * lang.c: Include j-options.h.
3546 (cl_options_count, cl_options, string_option, java_decode_option,
3547 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3548 process_option_with_no): Remove.
3549 (resource_name): Constify.
3550 (LANG_HOOKS_HANDLE_OPTION): Override.
3551 (java_handle_option): New.
3552 (java_init): Don't call jcf_path_init.
3553 (java_init_options): Call jcf_path_init.
3555 * resource.c (compile_resource_data, compile_resource_file): Constify.
3557 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
3559 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3560 (struct lang_decl_func): Add last_line field.
3561 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3562 DECL_SOURCE_LINE_LAST): Remove.
3563 * parse.y (missing_return_error, finish_method_declaration,
3564 lookup_cl, start_artificial_method_body, source_end_java_method,
3565 start_complete_expand_method): Adjust.
3567 2003-06-08 Tom Tromey <tromey@redhat.com>
3569 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3570 fno-assume-compiled.
3572 2003-06-08 Roger Sayle <roger@eyesopen.com>
3574 * builtins.c (define_builtin_type, builtin_types): Delete.
3575 (define_builtin): Rewritten to take just the built-in code,
3576 the function's name, type and fallback library function name.
3577 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3578 (initialize_builtins): Overhaul to define the GCC builtins
3579 used by gcj manually, providing the Java run-time's
3580 implementations as the fallback library function.
3582 2003-06-08 Anthony Green <green@redhat.com>
3584 * parse.y (patch_cast): Fix conversions from floating-point to
3587 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
3589 * Make-lang.in: Update.
3590 * lang.c: Include opts.h. Define cl_options_count and cl_options.
3592 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3594 * lang.c (java_init_options): Update.
3596 2003-06-05 Jan Hubicka <jh@suse.cz>
3598 * Make-lang.in: Add support for stageprofile and stagefeedback
3600 2003-05-31 Roger Sayle <roger@eyesopen.com>
3602 * lang.c (java_init_options): Prescribe wrap-around two's
3603 complement arithmetic overflow by setting flag_wrapv.
3605 2003-05-29 Roger Sayle <roger@eyesopen.com>
3607 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3608 (builtin_record): Add an additional builtin_code field to
3609 record which GCC built-in corresponds to the Java function.
3610 (java_builtins): Add new entries for atan, atan2, exp, log,
3612 (max_builtin, min_builtin, abs_builtin): Perform constant
3613 folding on the resulting tree.
3614 (java_build_function_call_expr): Likewise, perform constant
3615 folding on the resulting tree.
3616 (initialize_builtins): The NULL creators are now allowed in
3617 the java_builtins table, which is now terminated by an entry
3618 with builtin_code == END_BUILTINS.
3619 (check_for_builtin): Likewise. If the matching creator is
3620 NULL, construct the call using java_build_function_call_expr
3621 directly with the decl for the corresponding builtin_code.
3623 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
3625 * win32-host.c: Normalize copyright boilerplate.
3627 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3629 * parse.y (print_int_node): Use string concatentation on
3630 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3631 function calls into one.
3633 2003-05-13 Zack Weinberg <zack@codesourcery.com>
3635 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3636 fatal_io_error with calls to fatal_error; add ": %m" to the end of
3637 all the affected error messages.
3639 2003-05-13 Richard Henderson <rth@redhat.com>
3641 * class.c (layout_class_method): Set DECL_EXTERNAL.
3642 * decl.c (java_mark_decl_local, java_mark_class_local): New.
3643 * java-tree.h (java_mark_class_local): Declare.
3644 * jcf-parse.c (parse_class_file): Use it.
3645 * parse.y (java_expand_classes): Likewise.
3647 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
3649 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3650 * lex.h: #include input.h.
3651 * jv-scan.c (input_filename): Remove.
3653 2003-05-02 Tom Tromey <tromey@redhat.com>
3656 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3657 (handle_inner_classes): New function.
3659 2003-05-01 Tom Tromey <tromey@redhat.com>
3662 * parse.y (finish_for_loop): Do nothing if update expression is a
3663 EXPR_WFL_NODE wrapping nothing.
3664 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3666 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
3668 * lex.h (input_lineno): Remove declaration.
3669 * parse-scan.y: #include input.h.
3670 (input_filename): Remove declaration.
3671 (input_location): Add definition.
3672 (input_line): Remove definition.
3674 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3676 * lex.h (lineno): Rename to ...
3677 (input_line): ... here
3678 * parse-scan.y (lineno): Rename to ...
3679 (input_line): ... here.
3680 (reset_report): Rename lineno to input_line.
3681 * check-init.c (check_init): Likewise.
3682 * class.c (push_class): Likewise.
3683 * decl.c (complete_start_java_method, end_java_method): Likewise.
3684 * expr.c (expand_byte_code): Likewise.
3685 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3686 * jcf-write.c (generate_bytecode_insns): Likewise.
3687 * lex.c (java_init_lex, java_allocate_new_line,
3688 do_java_lex): Likewise.
3689 * parse.h (YYNOT_TWICE): Likewise.
3690 * parse.y (empty_statement, expression_statement,
3691 java_pop_parser_context, java_parser_context_save_global,
3692 yyerror, register_fields, method_header, safe_layout_class,
3693 find_in_imports_on_demand, create_artificial_method,
3694 source_end_java_method, start_complete_expand_method,
3695 build_thisn_assign, java_complete_lhs,
3696 maybe_absorb_scoping_block): Likewise.
3698 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
3700 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3701 '/' when computing java source filename
3703 2003-04-13 Tom Tromey <tromey@redhat.com>
3705 * gjavah.c (print_c_decl): Indentation fix.
3707 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3709 * class.c (make_field_value, make_method_value, get_dispatch_table)
3710 (make_class_data, emit_offset_symbol_table)
3711 * constants.c (build_constants_constructor)
3712 * java-tree.h (START_RECORD_CONSTRUCTOR)
3713 * parse.y (maybe_build_array_element_wfl):
3714 Use build_constructor.
3716 2003-04-10 Eric Blake <ebb9@email.byu.edu>
3719 * parse.y (string_convert_int_cst): Always use at least one digit
3720 in string conversion. Remove ASCII dependence.
3721 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3723 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
3725 * Make-lang.in: added win32-host.c
3726 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3727 resolves to open() on non-Win32 platforms and
3728 Win32-specific jcf_open_exact_case() on Win32
3729 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3730 when trying .java and .class files
3731 * win32-host.c: added to repository. Defines
3732 Win32-specific jcf_open_exact_case()
3734 2003-04-10 Andrew Haley <aph@redhat.com>
3736 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3737 (maybe_free_localvar): Renamed from localvar_free.
3738 Add new arg, really.
3739 (generate_bytecode_insns): Set new variable, jsrs.
3740 Only free local vars if no jsr insns have been emittted.
3741 Call maybe_free_localvar, not localvar_free.
3743 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
3745 * gcj.texi: Remove @ at start of file.
3747 2003-03-25 Tom Tromey <tromey@redhat.com>
3749 * parse.y (create_interface): Call CHECK_DEPRECATED.
3751 2003-03-23 Zack Weinberg <zack@codesourcery.com>
3753 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3755 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3757 * javaop.h (jfloat, jdouble): Make them structures mirroring
3758 the bit fields of IEEE float and double respectively.
3759 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3760 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3761 (union Word, union DWord): Delete.
3762 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3764 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3765 D_NAN_MASK): Delete.
3766 (jni_print_float, jni_print_double): New. Generate
3767 hexadecimal floating constants.
3768 (print_field_info): Use jni_print_float/double.
3770 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
3771 finite floating point numbers for output; special case
3774 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3776 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3777 Replace 0 and 1 with true and false in return statements.
3779 2003-03-19 Tom Tromey <tromey@redhat.com>
3781 * lex.c (do_java_lex): Renamed from java_lex.
3782 (java_lex): New function.
3785 2003-03-13 Tom Tromey <tromey@redhat.com>
3787 * parse.y (resolve_inner_class): Error if qualifier is a primitive
3790 2003-03-04 Andrew Haley <aph@redhat.com>
3792 * gjavah.c (is_first_data_member): New global variable.
3793 (print_c_decl): If it's the first data member, align it as the
3795 (process_file): Set is_first_data_member.
3797 2003-03-11 Tom Tromey <tromey@redhat.com>
3799 * parse.y (resolve_field_access): Initialize class if field is
3800 found in another static field.
3801 * expr.c (build_class_init): Don't optimize out initialization of
3802 implemented interface.
3804 2003-03-11 Andrew Haley <aph@redhat.com>
3806 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3809 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
3811 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3812 and DIR_SEPARATOR_2 for a target.
3813 Correct minor typos.
3815 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3816 and DIR_SEPARATOR_2 for a target into account.
3818 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3820 * lang.c (java_init): Update prototype, move code to java_post_options.
3821 (java_post_options): Similarly.
3823 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
3825 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3826 compare file name components depending on the case-sensitivity
3827 or otherwise of the host file system.
3829 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3830 "strcmp" to compare file name components.
3831 Use IS_DIR_SEPARATOR instead of comparing directly against
3833 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3834 comparing directly against DIR_SEPARATOR.
3836 2003-03-04 Tom Tromey <tromey@redhat.com>
3838 * Make-lang.in (java.tags): New target.
3840 2003-03-01 Roger Sayle <roger@eyesopen.com>
3842 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3843 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3845 2003-03-01 Tom Tromey <tromey@redhat.com>
3847 * parse.y (jdep_resolve_class): Only check deprecation if we found
3850 2003-02-28 Tom Tromey <tromey@redhat.com>
3853 * class.c (maybe_layout_super_class): Always pass a WFL to
3855 * parse.y (do_resolve_class): Updated comment to explain
3858 2003-02-26 Tom Tromey <tromey@redhat.com>
3860 * jcf-write.c (generate_classfile): Check whether class is
3861 deprecated before writing attribute count.
3863 2003-02-25 Roger Sayle <roger@eyesopen.com>
3865 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
3866 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
3868 2003-02-23 Tom Tromey <tromey@redhat.com>
3870 * lang-options.h: Added -Wdeprecated.
3871 * gcj.texi (Warnings): Document -Wdeprecated.
3872 * java-tree.h (flag_deprecated): Declare.
3873 * lang.c (lang_W_options): Added deprecated.
3874 (flag_deprecated): New global.
3875 * chartables.h: Rebuilt.
3876 * gen-table.pl (process_one): Look at whitespace.
3877 (print_tables): Define LETTER_SPACE, LETTER_MASK.
3878 * parse.h (CLEAR_DEPRECATED): New macro.
3879 (CHECK_DEPRECATED_NO_RESET): New macro.
3880 * jcf-parse.c (handle_deprecated): New function.
3881 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
3882 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
3883 * parse.y (resolve_type_during_patch): Check deprecation.
3884 (jdep_resolve_class): Likewise.
3885 (process_imports): Likewise.
3886 (resolve_expression_name): Likewise.
3887 (check_deprecation): Strip arrays from decl. Check
3889 (patch_method_invocation): Also check the particular constructor
3891 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
3892 * jcf-write.c (append_deprecated_attribute): New function.
3893 (generate_classfile): Generate deprecated attribute when
3895 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
3896 (java_lex) [case '*']: Simplify logic.
3897 (java_start_char_p): Use LETTER_MASK.
3898 (java_part_char_p): Likewise.
3899 (java_space_char_p): New function.
3901 2003-02-20 Nathan Sidwell <nathan@codesourcery.com>
3903 Change base class access representation.
3904 * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
3905 (add_interface_do): Likewise.
3907 2003-02-12 Ranjit Mathew <rmathew@hotmail.com>
3909 * decl.c (java_init_decl_processing): Change
3910 soft_lookupjnimethod_node to reflect the change in
3911 signature of _Jv_LookupJNIMethod in libjava/jni.cc
3912 * expr.c (build_jni_stub): Calculate and pass the size
3913 on the stack of the arguments to a JNI function. Use
3914 new target macro MODIFY_JNI_METHOD_CALL to allow a
3915 target to modify the call to a JNI method.
3917 2003-02-08 Roger Sayle <roger@eyesopen.com>
3919 * jcf-io.c (java_or_class_file): Use libiberty's lbasename
3920 instead of basename to avoid compiler warnings on Tru64.
3922 2003-02-04 Joseph S. Myers <jsm@polyomino.org.uk>
3924 * gcj.texi: Update to GFDL 1.2.
3926 2003-01-31 Andrew Haley <aph@redhat.com>
3928 * parse.y (java_expand_classes): Scan the whole class list looking
3929 for access methods that haven't yet been expanded.
3931 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
3935 * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
3936 to fix bootstrap on sparc-unknown-netbsdelf1.5.
3937 * jcf-parse.c: Likewise.
3939 2003-01-31 Mark Wielaard <mark@klomp.org>
3941 * gjavah.c (throwable_p): Allocate 1 more byte for string.
3943 2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
3945 * class.c (make_class): Use BINFO_ELTS.
3946 (set_super_info): Likewse.
3947 (add_interface_do): Likewise.
3949 2003-01-30 Tom Tromey <tromey@redhat.com>
3951 * jcf-parse.c (read_class): Update identifier's class value if it
3952 changed during parsing.
3954 2003-01-30 Loren James Rittle <ljrittle@acm.org>
3956 * Make-lang.in (po-generated): Find the targets in $(parsedir).
3957 Propagate change to all other rules as required.
3958 (java/parse-scan.o): Add explicit dependency on
3959 $(parsedir)/java/parse-scan.c .
3961 2003-01-29 Tom Tromey <tromey@redhat.com>
3963 * parse.y (patch_assignment): Only transform the rhs of an
3964 assignment when compiling to native.
3966 2003-01-28 Tom Tromey <tromey@redhat.com>
3968 * jcf-write.c (generate_bytecode_conditional): Typo fixes.
3970 2003-01-28 Tom Tromey <tromey@redhat.com>
3972 * lex.c (java_lex): Don't include UEOF as part of token.
3973 (java_read_unicode): Error if \u sequence prematurely terminated.
3975 2003-01-27 Tom Tromey <tromey@redhat.com>
3977 * parse.y (java_check_regular_methods): Check for construct after
3978 checking types in throws clause.
3980 2003-01-24 Tom Tromey <tromey@redhat.com>
3982 * class.c (build_static_field_ref): Only a String or numeric field
3983 can fold to a constant.
3985 2003-01-23 Tom Tromey <tromey@redhat.com>
3987 * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
3988 file name in resource buffer.
3990 2003-01-23 Tom Tromey <tromey@redhat.com>
3992 * expr.c (build_known_method_ref): Use method's context to find
3995 2003-01-23 Tom Tromey <tromey@redhat.com>
3997 * constants.c (set_constant_entry): Allocated cleared memory.
3999 2003-01-22 Tom Tromey <tromey@redhat.com>
4001 * java-tree.h: Don't use PARAMS.
4002 * resource.c: Add prototypes for all functions.
4003 (write_resource_constructor): Use `const char *' to avoid
4006 2003-01-22 Nathanael Nerode <neroden@gcc.gnu.org>
4008 * jcf-parse.c (process_zip_dir): Remove unused variable.
4010 2003-01-22 Tom Tromey <tromey@redhat.com>
4012 * expr.c (build_invokeinterface): Abort if method's context is not
4015 2003-01-22 Tom Tromey <tromey@redhat.com>
4017 * gcj.texi (Input and output files): Mention non-class entries.
4018 * decl.c (java_init_decl_processing): Call
4019 init_resource_processing.
4020 * java-tree.h (compile_resource_data, write_resource_constructor,
4021 compile_resource_file, init_resource_processing): Declare.
4022 * config-lang.in (gtfiles): Added resource.c.
4023 * Make-lang.in (gt-java-resource.h): New target.
4024 (JAVA_OBJS): Added resource.o.
4025 (java/resource.o): New target.
4026 * resource.c: New file.
4027 * class.c (compile_resource_file): Moved to resource.c.
4028 (registerResource_libfunc): Likewise.
4029 (utf8_decl_list): Mark with GTY; now static.
4030 * jcf-parse.c (classify_zip_file): New function.
4031 (parse_zip_file_entries): Use it; compile .properties files.
4032 (process_zip_dir): Use classify_zip_file and compute_class_name.
4033 Don't write class name into zip directory.
4034 (java_parse_file): Call write_resource_constructor.
4035 (compute_class_name): New function.
4036 * jcf-io.c (read_zip_member): Reindented.
4038 2003-01-21 Tom Tromey <tromey@redhat.com>
4040 * class.c (supers_all_compiled): New function.
4041 (make_class_data): Use it.
4043 2003-01-21 Tom Tromey <tromey@redhat.com>
4045 * parse.y (method_header): Native method can't be strictfp.