1 2005-05-12 Aaron Luchko <aluchko@redhat.com>
3 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
5 2005-05-11 Tom Tromey <tromey@redhat.com>
7 * gcj.texi (Code Generation): Document -fbootstrap-classes.
8 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
9 (parse_version): Use it.
10 * lang.opt (-fbootstrap-classes): New option.
12 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
15 * class.c (maybe_layout_super_class): Look for imports in this_class.
16 * parse.h (ctxp_for_generation_last): New.
17 (do_resolve_class): Add a parameter.
18 * parse.y (ctxp_for_generation_last): New.
19 (java_pop_parser_context): Add at end of list.
20 (find_in_imports, find_in_imports_on_demand): Look in ctxp
21 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
22 the given type are NULL.
23 (do_resolve_class): Look into the imports of the new second parameter.
24 Adjust recursive calls.
25 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
26 calls to do_resolve_class.
27 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
28 (java_complete_class): Do not do that here.
30 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
33 * Make-lang.in (java): Add gjnih.
34 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
35 (GJNIH_OBJS): New variable.
36 (gjnih$(exeext)): New target.
37 (JAVA_MANFILES): Add gjnih.1.
38 (java.uninstall): Add gjnih.1.
39 (java.mostlyclean): Add gjnih.
40 (java.maintainer-clean): Add gjnih.1.
41 (java/gjavah-jni.o): New target.
42 (.INTERMEDIATE): Add gjnih.pod.
43 (gjnih.pod): New target.
44 * config-lang.in (stagestuff): Add gjnih.
45 * gcj.texi (Top): Add gjnih node.
46 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
47 -bootclasspath options.
48 (Invoking gjnih): New node.
49 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
50 (TOOLNAME): New macro.
51 (error): Replace hard-coded gcjh with TOOLNAME.
52 (process_file): Likewise.
55 (help): Likewise. Add help output for -force, -old, -trace and -J
57 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
58 (options): Add force, old, trace and J fields.
59 (main): Handle -force, -old, -trace and -J options.
61 2005-05-03 Tom Tromey <tromey@redhat.com>
64 * gjavah.c (main): Unlink output file on error.
66 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
68 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
71 2005-04-29 Tom Tromey <tromey@redhat.com>
73 * expr.c (build_jni_stub): Updated for change to build_block.
75 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
77 * expr.c (force_evaluation_order): Declare 'saved' earlier.
79 2005-04-28 Andrew Haley <aph@redhat.com>
82 * java-tree.h (soft_resolvepoolentry_node): New.
83 (alloc_constant_fieldref): Declare.
84 * expr.c (expand_java_field_op): Don't call class_init for
85 accesses to static fields with indirect dispatch.
86 * builtins.c (initialize_builtins): Add "__builtin_expect".
87 * decl.c (soft_resolvepoolentry_node): New variable.
88 (java_init_decl_processing): Create a decl for
89 "_Jv_ResolvePoolEntry".
90 * class.c (build_fieldref_cache_entry): New function.
91 (build_static_field_ref): Rewrite for indirect dispatch.
92 * constants.c (find_name_and_type_constant_tree): New function.
93 (alloc_constant_fieldref): Likewise.
94 (build_constants_constructor): Handle CONSTANT_Fieldref and
98 * expr.c (force_evaluation_order): Convert outgoing args smaller
101 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
103 * gcj.texi (libgcj Runtime Properties): Remove obsolete
104 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
105 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
107 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
109 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
110 to `unlock_stream' with `unlock_std_streams'.
112 2005-04-25 Jakub Jelinek <jakub@redhat.com>
114 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
115 instead of just expr.h.
117 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
119 * gjavah.c (main): Unlock the stdio streams.
120 * jcf-dump.c (main): Likewise.
121 * jv-scan.c (main): Likewise.
122 * jvgenmain.c (main): Likewise.
124 2005-04-23 DJ Delorie <dj@redhat.com>
126 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
127 parse.y: Adjust warning() callers.
129 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
131 * gcj.texi (Object fields): Change "Integer" to "Int" in example
134 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
136 * gcj.texi: Fix typos and bogus example.
138 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
140 * except.c: Fix a comment typo.
142 2005-04-19 Julian Brown <julian@codesourcery.com>
144 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
145 indirect dispatch with PIC.
147 2005-04-18 Andrew Haley <aph@redhat.com>
149 * java-except.h (struct eh_range.handler): Remove unused field.
150 (handle_nested_ranges): Remove function declaration.
151 (sanity_check_exception_range): Add function declaration.
152 * verify.c (verify_jvm_instructions): Remove call to
153 handle_nested_ranges.
154 * verify-glue.c (verify_jvm_instructions_new): Call
155 sanity_check_exception_range.
156 * except.c (link_handler, eh_range_freelist, link_handler,
157 handle_nested_ranges): Remove.
158 (add_handler): Rewrite.
159 (sanity_check_exception_range): New function.
160 (print_ranges): New function.
162 2005-04-13 Julian Brown <julian@codesourcery.com>
164 * decl.c (finish_method): Give methods once-only linkage.
166 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
168 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
170 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
172 * java-tree.h: Don't use PARAMS().
174 2005-04-07 Per Bothner <per@bothner.com>
176 * class.c (push_class): By default, suppress debug output.
177 (finish_class): Enable debug output for classes we're emitting.
179 2005-04-07 Andrew Haley <aph@redhat.com>
181 * gcj.texi: Correct gcj-dbtool instructions.
183 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
185 * gcj.texi: Fix a typo.
186 * lang.c: Fix a comment typo.
188 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
190 * gcj.texi (Invoking gij): Add descriptions of new -X options.
191 Mention recognized-and-ignored compatibility options.
192 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
194 (About CNI): Add Memory allocation section.
196 2005-04-01 Tom Tromey <tromey@redhat.com>
198 * decl.c (java_init_decl_processing): Fix types of
199 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
200 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
201 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
203 2005-03-31 Jan Hubicka <jh@suse.cz>
205 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
206 * class.c: Include cgraph.h
207 (make_local_functoin_alias): Mark aslias as needed.
208 * resource.c: Include cgraph.h
209 (compile_resource_data): Go via cgraph interface.
211 2005-03-30 Ian Lance Taylor <ian@airs.com>
213 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
215 2005-03-30 Tom Tromey <tromey@redhat.com>
217 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
218 inner_class_info_index==0 or outer_class_info_index==0.
220 2005-03-29 Tom Tromey <tromey@redhat.com>
222 * gcj.texi (libgcj Runtime Properties): Document
223 gnu.gcj.runtime.endorsed.dirs.
225 2005-03-24 Anthony Green <green@redhat.com>
227 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
230 2005-03-23 Tom Tromey <tromey@redhat.com>
232 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
233 (parse_version): Use it.
235 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
237 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
239 2005-03-18 Andrew Haley <aph@redhat.com>
242 * decl.c (update_aliases): Don't update variables that are about
244 (maybe_poplevels): Add comment.
246 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
249 * jcf-parse.c (duplicate_class_warning): New function.
250 (java_parse_file): Call duplicate_class_warning if
251 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
252 (parse_zip_file_entries): Likewise. Also set
253 CLASS_FROM_CURRENTLY_COMPILED_P.
255 2005-03-16 Andrew Haley <aph@redhat.com>
257 * expr.c (expand_java_arrayload): Don't generate a
258 NullPointerException based on the type of the node.
259 (build_java_array_length_access): Likewise.
261 2005-03-15 Zack Weinberg <zack@codesourcery.com>
263 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
265 2005-03-11 Tom Tromey <tromey@redhat.com>
267 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
268 (libgcj Runtime Properties): Document the default .db.
270 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
273 * parse.y (checks_throws_clauses): Check exceptions list even when
274 the base class does not come from a source file being compiled.
275 (java_complete_lhs): Remove unused variable 'wfl'.
277 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
280 * decl.c (finish_method): Emit _Jv_InitClass for private static
281 methods inside inner classes as well.
283 2005-03-08 Julian Brown <julian@codesourcery.com>
284 * Revert patch from 2005-03-08 for causing bootstrap failure on
287 2005-03-08 Julian Brown <julian@codesourcery.com>
289 * decl.c (finish_method): Give methods once-only linkage.
291 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
293 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
295 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
297 * verify-glue.c (vfy_is_assignable_from): Perform static check using
298 can_widen_reference_to if the C++ ABI is in use.
299 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
300 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
301 type_isresolved, init_state, set_pc, state_get_pc,
302 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
303 (verify_fail): Report the current PC from the verifier context.
304 (free_state): Remove #if 0 block to enable this function.
305 (free_verifier_context): Call free_state on state_list iterator
306 values before freeing them.
307 * expr.c (pop_type_0): Pop correct type for error message when stack
308 contains a multi-word type.
310 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
312 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
313 for known NULL array length access.
315 2005-03-07 Tom Tromey <tromey@redhat.com>
317 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
319 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
321 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
322 typeck.c: Update copyright.
324 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
327 * xref.c, xref.h: Remove file.
328 * Make-lang.in (java/xref.o): Remove.
329 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
330 * lang.c (flag_emit_xref): Remove definition.
331 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
332 * typeck.c (convert): Remove use of do_not_fold.
333 * parse.y (do_not_fold): Remove definition.
334 (parser grammar): Remove xref code.
335 (maybe_create_class_interface_decl, create_class): Likewise.
336 (register_fields, method_header, finish_method_declaration): Likewise.
337 (declare_local_variables, source_end_java_method): Likewise.
338 (java_complete_expand_classes): Do not set do_not_fold.
339 (java_complete_expand_method): Remove xref code.
340 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
341 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
342 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
343 (patch_synchronized_statement, patch_throw_statement): Likewise.
344 (maybe_build_class_init_for_field): Likewise.
346 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
348 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
349 instead of IS_NON_TYPE_CODE_CLASS.
351 2005-03-04 Andrew Haley <aph@redhat.com>
354 * class.c (set_method_index): Don't set method_index if it is
356 (layout_class_method): Don't complain about "non-static method foo
357 overrides static method" in the case of indirect dispatch.
359 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
361 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
363 * Make-lang.in: Don't elide warnings in jcf-io.c.
365 2005-03-01 Per Bothner <per@bothner.com>
368 * check-init.c (wfl): Remove static.
369 (final_assign_error, check_init): Replace calls to parse_error_context
371 (check_init): Save, set, and restore input_location for each exp.
373 2005-03-01 Per Bothner <per@bothner.com>
375 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
376 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
377 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
379 2005-03-01 Per Bothner <per@bothner.com>
381 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
383 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
386 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
389 2005-02-22 Tom Tromey <tromey@redhat.com>
392 * verify-impl.c (EITHER): New define.
393 (types_compatible): Handle it.
394 (check_field_constant): Use it.
396 2005-02-18 Tom Tromey <tromey@redhat.com>
399 * verify-impl.c (types_equal): Fixed test.
402 * verify-glue.c (vfy_class_has_field): New function.
403 * verify.h (vfy_class_has_field): Declare.
404 * verify-impl.c (check_field_constant): Added 'putfield'
406 (verify_instructions_0): Updated.
407 (types_equal): New function.
409 2005-02-14 Tom Tromey <tromey@redhat.com>
412 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
413 stack effect of multianewarray.
415 2005-02-14 Andrew Haley <aph@redhat.com>
418 * expr.c (expand_byte_code): Call promote_arguments().
419 (promote_arguments): New function.
420 * decl.c (check_local_unnamed_variable): Remove special case for
422 (find_local_variable): Promote all boolean types to int
423 when searching for local variable decls.
425 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
427 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
428 parse-scan.y: Update copyright.
430 2005-02-11 Per Bothner <per@bothner.com>
433 * parse-scan.y (input_location): Remove variable.
434 (main_input_filename): New - replaces input_filename, which isn't
435 settable if USE_MAPPED_LOCATION.
436 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
437 so we don't reference input_location or wfl_operator in that case.
438 * jv-scan.c (expand_location): Remove - no longer used.
439 (main): Set main_input_filename rather than input_filename.
441 2005-02-09 Richard Henderson <rth@redhat.com>
443 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
444 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
446 2005-02-08 Marcin Dalecki <martin@dalecki.de>
448 * expr.c (add_type_assertion): Use the proper enumeration type,
449 since this is what htab_find_slot() is expecting.
451 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
453 * gcj.texi: Update copyright dates.
455 2005-02-02 Tom Tromey <tromey@redhat.com>
457 * gcj.texi (libgcj Runtime Properties): Default library_control
460 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
463 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
464 (modifiers) when square brackets are present in a declaration for
466 * jv-scan.c (main): Set input_filename and input_line.
468 2005-02-01 Tom Tromey <tromey@redhat.com>
471 * gjavah.c (get_field_name): Don't override name for JNI header.
473 2005-02-01 Roger Sayle <roger@eyesopen.com>
475 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
476 of unsigned types using iushr and lushr JVM bytecodes.
478 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
481 * gjavah.c (jni_print_float): Do not emit floating-point
482 initialiser for a static final field.
483 (jni_print_double): Likewise.
485 2005-02-01 Mark Mitchell <mark@codesourcery.com>
488 2005-01-31 Mark Mitchell <mark@codesourcery.com>
489 * gjavah.c (print_field_info): Mark static data members of
490 floating-point type with "__extension__".
492 2005-01-31 Mark Mitchell <mark@codesourcery.com>
494 * gjavah.c (print_field_info): Mark static data members of
495 floating-point type with "__extension__".
497 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
500 * parse.y (build_string_concatenation): Remove redundant if.
501 (patch_conditional_expr): Attempt to patch_string() the condition
502 of a ?: as well, in addition to its other operands.
504 2005-01-25 Tom Tromey <tromey@redhat.com>
506 * Make-lang.in (java/java-tree-inline.o): Removed.
508 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
511 * parse.y (patch_binop): Allow comparisons against NULL only
512 if the other operand is of a reference type.
514 2005-01-24 Tom Tromey <tromey@redhat.com>
516 * java-tree.h (gcj_abi_version): Declare.
517 * class.c (make_class_data): Push gcj_abi_version into "next"
518 field. Renamed field.
519 * decl.c (gcj_abi_version): New global.
520 (parse_version): New function.
521 (java_init_decl_processing): Call it. Renamed 'next' field.
523 (GCJ_BINARYCOMPAT_ADDITION): New define.
525 2005-01-24 Roger Sayle <roger@eyesopen.com>
528 * jcf-write.c (generate_bytecode_insns): Conversions between
529 integer types of the same precision shouldn't generate widening
530 or narrowing conversion bytecodes.
532 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
534 * java-except.h, java-tree.h: Remove unused prototypes.
536 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
539 * jcf-write.c (perform_relocations): Don't call memcpy if source
540 and destination are the same.
542 2005-01-17 Tom Tromey <tromey@redhat.com>
544 * verify-impl.c (get_short): Sign extend.
547 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
549 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
552 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
554 * verify.c: Revert to the version before the BC-ABI merge.
556 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
559 * check-init.c (check_init): Take care of references that do not
560 have an explicit final variable declaration (e.g. array length
561 access) for pre/post in/de-crement operators.
563 2005-01-08 Mark Wielaard <mark@klomp.org>
565 * parse.y (process_imports): Allocate (and free) original_name only
566 when not already defined.
567 * jcf-parse.c (read_class): Free results of find_class() and
569 (java_parse_file): Keep pointer to head of file_list and free when
570 done. Free result of lrealpath().
572 2005-01-05 Tom Tromey <tromey@redhat.com>
574 * gcj.texi (Standard Properties): java.ext.dirs is now used.
576 2004-12-20 Andrew Haley <aph@redhat.com>
578 * typeck.c: Use fold_convert for ints and booleans.
580 2004-12-17 Andrew Haley <aph@redhat.com>
583 * typeck.c (convert): Use a CONVERT_EXPR when converting to
584 BOOLEAN_TYPE or CHAR_TYPE.
585 (convert_to_boolean, convert_to_char) : Remove.
586 * convert.h (convert_to_boolean, convert_to_char) : Remove.
587 * expr.c (expand_load_internal): Do type conversion if type is not
590 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
593 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
596 2004-12-07 Andrew Haley <aph@redhat.com>
599 * jcf-parse.c (load_class): Remove sanity test for missing inner
602 2004-12-06 Tom Tromey <tromey@redhat.com>
604 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
605 (java.uninstall): Likewise.
606 (java.maintainer-clean): Likewise.
607 (.INTERMEDIATE): Likewise.
608 (java.install-man): Likewise.
609 (gcj-dbtool.pod): New target.
610 * gcj.texi (Code Generation): Document -findirect-dispatch.
611 (libgcj Runtime Properties): Document
612 gnu.gcj.precompiled.db.path.
613 (Top): Link to "Invoking gcj-dbtool".
615 2004-12-06 Tom Tromey <tromey@redhat.com>
618 * java-tree.h (extract_field_decl): Declare.
619 * parse.y (extract_field_decl): Renamed from
620 strip_out_static_field_access_decl. No longer static.
621 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
623 2004-12-03 Tom Tromey <tromey@redhat.com>
625 * lang.c (flag_new_verifier): Define.
626 (java_post_options): Set flag_new_verifier if indirect dispatch
628 * lang.opt (fnew-verifier): Removed.
630 2004-12-03 Tom Tromey <tromey@redhat.com>
633 * Make-lang.in (java.install-common): Only install transformed
634 gcjh if gcj-cross exists.
636 2004-12-03 Andrew Haley <aph@redhat.com>
639 * except.c (link_handler): Patch 'outer' field of siblings of the
640 range we're demoting.
642 2004-12-03 Andrew Haley <aph@redhat.com>
645 * class.c (layout_class_method): Don't fail to override a method
646 simply because it has DECL_ARTIFICIAL set.
648 2004-12-02 Tom Tromey <tromey@redhat.com>
651 * parse.y (craft_constructor): Special case null_pointer_node.
653 2004-12-02 Tom Tromey <tromey@redhat.com>
656 * java-gimplify.c (java_gimplify_expr): Don't call
657 SET_EXPR_LOCATION unless wrapped tree is an expression.
659 2004-11-27 Per Bothner <per@bothner.com>
661 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
662 Fix fencepost error in 'i', which got executed one too many times.
663 Also, fold memcpy into explicit loop, as originally intended.
664 Also, free temporary 'buf' which otherwise leaks.
666 2004-11-27 Per Bothner <per@bothner.com>
668 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
669 local static variables if not USE_MAPPED_LOCATION.
671 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
673 * class.c, decl.c, expr.c: Fix comment typos.
675 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
678 * decl.c (end_java_method): Call
679 attach_init_test_initialization_flags on all the init_decls.
680 * parse.y (attach_init_test_initialization_flags): Move to ...
681 * expr.c (attach_init_test_initialization_flags): here and
682 support BIND_EXPR also.
683 * java-tree.h (attach_init_test_initialization_flags): Prototype.
684 * jcf-parse.c (parse_class_file): Don't disable class init
687 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
689 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
692 2004-11-24 Richard Henderson <rth@redhat.com>
694 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
695 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
697 2004-11-24 Tom Tromey <tromey@redhat.com>
699 * verify.c (defer_merging): Don't use C++-style comment.
700 * verify.h (java_opcode): Added java_opcode_end.
701 * class.c (build_class_ref): Remove C++ comment and old FIXME.
703 * verify-impl.c (vfy_push_type): Removed bogus "return".
704 (initialize_stack): Use vfy_alloc and vfy_free.
705 (verify_instructions_0): Likewise.
707 * Merged gcj-abi-2-dev-branch to trunk.
709 2004-11-24 Andrew Haley <aph@redhat.com>
711 * jcf-parse.c (parse_class_file): Set file_start_location.
713 2004-11-10 Tom Tromey <tromey@redhat.com>
715 * class.c (make_field_value): Don't call build_static_field_ref.
716 (build_static_field_ref): Don't emit direct references when using
719 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
720 -verbose:class into man page synopsis.
722 2004-11-09 Tom Tromey <tromey@redhat.com>
724 * expr.c (build_java_arraystore_check): Still generate check if
725 element type is itself an array.
727 2004-11-08 Tom Tromey <tromey@redhat.com>
729 * java-tree.h (soft_check_assignment_node): Removed.
730 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
731 * decl.c (java_init_decl_processing): Don't initialize
732 soft_check_assignment_node.
734 2004-11-05 Tom Tromey <tromey@redhat.com>
736 * class.c (layout_class_methods): Don't add Miranda methods when
737 using indirect dispatch.
739 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
741 * class.c (make_class_data): Call emit_assertion_table to set the
742 'assertion_table' field.
743 (build_signature_for_libgcj): Move here from expr.c.
744 (add_assertion_table_entry): New function. Callback for assertion
746 (emit_assertion_table): New. Take class argument, and generate
747 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
748 * decl.c (init_decl_processing): Define assertion_entry_type record.
749 Push 'assertion_table' class field instead of 'verify'.
750 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
751 (type_assertion_hash): Include 'assertion_code' in hash.
752 (add_type_assertion): Rewritten. Take class and assertion_code
753 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
754 (can_widen_reference_to): Use new add_type_assertion() arguments.
755 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
756 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
757 (verify_identifier_node): Removed.
758 (assertion_entry_type, assertion_table_type): New.
759 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
760 assertion code definitions.
761 (struct type_assertion): Add assertion_code. Rename 'source_type' and
762 'target_type' to 'op1' and 'op2'.
763 (add_type_assertion): Declare.
764 (lang_printable_name_wls): Remove unused definition.
765 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
766 to emit runtime assertion.
767 (vfy_note_stack_type): Clean up non-C90 declarations.
768 (vfy_note_local_type): Likewise.
769 * verify.h (vfy_is_assignable_from): Declare.
770 * verify-impl.c (is_assignable_from_slow): Remove unused function.
771 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
772 instead of is_assignable_from_slow().
773 (types_compatible): Reinstate ref_compatible() call.
775 2004-11-04 Tom Tromey <tromey@redhat.com>
777 * class.c (build_static_field_ref): Reverted previous patch.
779 * class.c (build_static_field_ref): Don't emit direct references
780 when using indirect dispatch.
782 2004-11-03 Tom Tromey <tromey@redhat.com>
784 * expr.c (expand_java_arrayload): Set lhs_type_node.
785 (expand_java_arraystore): Set rhs_type_node.
787 2004-11-02 Tom Tromey <tromey@redhat.com>
789 * jcf-parse.c (compute_class_name): Use filename length from zip
790 directory, not strlen.
792 * expr.c (expand_invoke): Mark new interface methods as abstract.
794 2004-11-01 Tom Tromey <tromey@redhat.com>
796 * verify-impl.c (push_jump): Removed check for uninitialized
798 (push_exception_jump): Likewise.
799 (handle_ret_insn): Likewise.
800 (handle_jsr_insn): Likewise.
801 (state_check_no_uninitialized_objects): Removed.
803 * decl.c (check_local_unnamed_variable): Recognize
804 promoted-to-int parameters when using the new verifier.
805 * expr.c (expand_java_arraystore): Explicitly request array type
806 when using new verifier.
807 (expand_java_arrayload): Likewise.
808 (invoke_build_dtable): Don't pass object_type_node as
809 expression argument to build_java_indirect_ref.
810 (build_java_check_indexed_type): Do nothing.
811 (build_java_arraystore_check): Handle case where array doesn't
813 (build_java_array_length_access): Likewise.
814 (expand_invoke): Handle case where interface overrides a method
816 (pop_type_0): Always succeed for reference types.
817 (process_jvm_instruction): Don't pop a value in a dead
819 (pop_arguments): Convert arguments to correct types.
821 2004-10-29 Andrew Haley <aph@redhat.com>
823 * jcf-parse.c (give_name_to_class): Remove line that was
826 2004-10-29 Andrew Haley <aph@redhat.com>
828 * jcf-parse.c (set_source_filename): Add code to build new sfname.
830 2004-10-20 Andrew Haley <aph@redhat.com>
832 * decl.c (end_java_method): Don't expand if flag_syntax_only.
834 2004-10-26 Tom Tromey <tromey@redhat.com>
836 * verify.h (vfy_notify_verified): Removed.
837 * verify-glue.c (vfy_notify_verified): Removed.
839 2004-10-26 Tom Tromey <tromey@redhat.com>
841 * verify-impl.c (debug_print_state): Declare `i' before code.
842 (merge_types): Modify `t' when it is null_type.
844 2004-10-26 Tom Tromey <tromey@redhat.com>
846 * verify-impl.c (type_print): Renamed from print. Now static and
848 (debug_print_state): Use type_print.
850 2004-10-25 Tom Tromey <tromey@redhat.com>
852 * expr.c (build_invokeinterface): Compute correct offset for
853 index into interface methods.
855 2004-10-20 Tom Tromey <tromey@redhat.com>
857 * java-tree.h (verify_jvm_instructions_new): Declare.
859 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
862 * verify-impl.c (verify_instructions): Correctly handle wide
864 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
865 (vfy_get_component_type): Strip pointer types.
866 (vfy_find_class): Use get_type_from_signature. Strip pointer
868 Include java-except.h.
870 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
872 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
873 vfy_push_type_t, set_variable, add_new_state, merge_into,
874 handle_jsr_insn, branch_prepass, check_class_constant,
875 check_wide_constant, get_one_type, compute_static_types,
876 verify_instructions_0): Clean up C99 declarations after statements.
878 2004-10-20 Tom Tromey <tromey@redhat.com>
880 * verify-impl.c (merge_refs): Compare reference against iterator,
883 * verify-glue.c (vfy_tag): Mask off resolved flag.
885 2004-10-19 Tom Tromey <tromey@redhat.com>
887 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
888 (init_state_with_stack): Initialize `this_type' in state.
889 (verify_method): Use debug_print.
890 * verify-glue.c (vfy_is_primitive): Removed debugging print.
891 (vfy_note_stack_depth): Reverted last patch.
892 (vfy_note_stack_type): Note pointer to Object, not Object.
893 (vfy_note_local_type): Likewise.
895 * verify.h (vfy_note_instruction_seen): Declare.
896 * verify-glue.c (verify_jvm_instructions_new): Set
897 BCODE_EXCEPTION_TARGET on target instruction.
898 (vfy_note_instruction_seen): New function.
899 * verify-impl.c (FLAG_INSN_SEEN): New define.
900 (verify_instructions_0): Set flag on instruction. Save state for
902 (verify_instructions): Call vfy_note_instruction_seen.
904 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
905 (verify_jvm_instructions_new): Call method_init_exceptions,
906 add_handler, and handle_nested_ranges.
907 * verify-impl.c (verify_method): Return 1 on success.
908 (verify_instructions_0): Save the state at PC=0.
910 * verify-impl.c (init_type_from_class): Set is_resolved and
911 ref_next on new ref_intersection.
912 (init_type_from_string): Likewise.
914 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
916 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
917 if flag_new_verifier is set.
918 * java-tree.h (flag_new_verifier): Declare.
919 * lang.opt (fnew-verifier): New option.
920 * verify-impl.c: Work around namespace pollution by undef'ing
922 (struct verifier_context): Make 'bytecode' const.
923 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
924 (types_compatible): For the BC-ABI, always consider reference types
926 (check_class_constant): Use vfr->current_class.
927 (check_constant): Likewise.
928 (check_wide_constant): Likewise.
929 (check_field_constant): Check for 'L' at start of type name.
930 (get_one_type): Return pointer instead of type. Set type result in
931 caller via passed type pointer.
932 (compute_argument_types): Update to use new get_one_type arguments.
933 (compute_return_type): Likewise.
934 (make_verifier_context): New. Allocate and initialize 'vfr'.
935 (free_verifier_context): New. Free 'vfr' and its contents.
936 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
937 and free_verifier_context.
939 2004-10-15 Tom Tromey <tromey@redhat.com>
941 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
942 * verify.h (vfy_fail): Fixed formatting.
944 * verify-impl.c (vfr): Fixed comment formatting.
945 (collapse_type): New function.
946 (verify_instructions): Notify compiler about type map.
947 * verify.h (vfy_note_stack_depth): Updated.
948 (vfy_note_stack_type): Likewise.
949 (vfy_note_local_type): Likewise.
950 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
952 * verify-glue.c (vfy_note_stack_depth): Correctly size type
953 state. Added `method' argument.
954 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
956 (vfy_note_local_type): New function.
957 (vfy_unsuitable_type): Likewise.
958 (vfy_return_address_type): Likewise.
959 (vfy_null_type): Likewise.
961 * verify.h (VFY_IN_GCC): Removed.
962 (VFY_WANT_TYPEMAP): Removed.
963 * verify-impl.c (verify_instructions_0): Removed useless "\".
964 (struct state) <next>: Uncomment.
966 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
968 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
971 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
973 * Make-lang.in (verify.o): Re-enabled this target.
974 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
975 (vfy_get_interface): Likewise.
976 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
977 * verify.h (verify_jvm_instructions_new): Declare.
978 * verify-impl.c (free_state): Temporarily comment out unused
981 2004-10-06 Tom Tromey <tromey@redhat.com>
983 * java-tree.h (JV_STATE_READ): New enum value.
985 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
987 * verify.h: New file.
989 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
991 * verify-impl.c, verify-glue.c, verify.h: New files.
992 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
994 2004-09-24 Andrew Haley <aph@redhat.com>
996 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
997 for a slot if it's of pointer type.
999 2004-09-14 Tom Tromey <tromey@redhat.com>
1001 * class.c (make_class_data): Correctly initialize "state" field.
1002 Initialize "engine" field.
1003 * decl.c (java_init_decl_processing): Add "engine" field.
1005 2004-09-10 Andrew Haley <aph@redhat.com>
1008 * expr.c (build_invokeinterface): Use fast method for interface
1010 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1011 JTI_ITABLE_PTR_TYPE.
1012 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
1013 (emit_symbol_table): Add new arg, element_size.
1014 * decl.c (java_init_decl_processing): Initialize Class.itable.
1015 * class.c (GEN_TABLE): New macro.
1016 (gen_indirect_dispatch_tables): Use it. Add itable.
1017 (make_class_data): Add new arg for emit_symbol_table().
1019 (add_miranda_methods): Make sure search_class has been parsed.
1020 (emit_symbol_table): Add new arg, element_size.
1022 2004-09-06 Andrew Haley <aph@redhat.com>
1024 * verify.c (merge_types): Return Object for all merges of
1026 * expr.c (add_type_assertion): Don't generate assertions when
1027 source type is array of Object.
1029 2004-09-03 Andrew Haley <aph@redhat.com>
1031 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1033 * lang.c (java_post_options): Force flag_verify_invocations if
1034 we're not using indirect dispatch.
1036 * expr.c (pop_type_0): Move test for interfaces before call to
1037 can_widen_reference_to().
1038 (build_signature_for_libgcj): Remove generation of canonical array
1040 (add_type_assertion): Canonicalize both arrays.
1041 Don't assert that type X can be assigned to Object.
1042 Don't assert that type X an be assigned to type X.
1043 Don't assert that Object can be assigned to type X.
1044 (can_widen_reference_to): Warn whenever we generate an assertion.
1045 (process_jvm_instruction): Use throwable_type_node for the type of
1048 2004-09-01 Andrew Haley <aph@redhat.com>
1050 * decl.c (java_init_decl_processing): Change
1051 verify_identifier_node to "__verify".
1052 * expr.c (add_type_assertion): Use verify_identifier_node for name.
1053 * java-tree.h (verify_identifier_node): Change to "__verify".
1055 * expr.c (build_signature_for_libgcj): New function.
1056 (add_type_assertion): Use it to construct signatures for
1057 source_type and target_type.
1059 2004-08-27 Andrew Haley <aph@redhat.com>
1061 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1062 (verify_identifier_node): New.
1063 (TYPE_VERIFY_METHOD): New.
1064 (struct type_assertion): New type.
1065 * expr.c (type_assertion_eq): New function.
1066 (type_assertion_hash): New function.
1067 (add_type_assertion): New function.
1068 (can_widen_reference_to): Call add_type_assertion().
1069 * decl.c (java_init_decl_processing): Add verify_identifier_node.
1070 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1071 (finish_class): Output TYPE_VERIFY_METHOD (type).
1073 * decl.c (end_java_method): Nullify unused fields.
1075 2004-08-17 Andrew Haley <aph@redhat.com>
1077 * verify.c (defer_merging): Quieten.
1078 * jcf-parse.c (load_class): Only try to open a class file if it's
1079 java.lang.Object or if it's part of the current compilation.
1080 Check that the class we just tried to load is the class we just
1082 (java_parse_file): Set flag_verify_invocations off if we're
1083 compiling from .class.
1084 (parse_zip_file_entries): Abort if we try to read a dummy class.
1085 * expr.c (can_widen_reference_to): Quieten.
1086 (build_invokevirtual): Abort if we try to invokevirtual an
1088 (expand_invoke): Don't build a non-interface call to an interface.
1089 (build_instanceof): Don't do premature optimization if
1090 flag_verify_invocations is not set.
1091 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1093 (build_static_field_ref): Add correct type conversion for
1095 (add_miranda_methods): Disable generation of Miranda methods for
1097 (layout_class_method): Don't complain about non-static method
1098 overrides static method with dummy classes.
1100 2004-08-13 Tom Tromey <tromey@redhat.com>
1102 * class.c (build_static_field_ref): Re-enable atable lookups for
1105 * parse.y (strip_out_static_field_access_decl): Indentation fix.
1107 2004-08-11 Tom Tromey <tromey@redhat.com>
1109 * gcj.texi (libgcj Runtime Properties): Document new properties.
1111 2004-08-06 Andrew Haley <aph@redhat.com>
1113 * jcf-parse.c (load_class): Check that we really have loaded the
1114 class we're looking for.
1116 2004-07-19 Andrew Haley <aph@redhat.com>
1118 * verify.c (verify_jvm_instructions): Comment change only.
1120 * typeck.c (build_java_array_type): Add size field to array name.
1122 * java-tree.h (LOCAL_SLOT_P): New.
1123 (update_aliases): Add PC argument.
1124 (pushdecl_function_level): New function.
1126 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1127 MODIFY_EXPR, and SAVE_EXPR.
1128 (java_gimplify_modify_expr): New function.
1130 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1131 (expand_iinc): Pass PC to update_aliases().
1132 (STORE_INTERNAL): Likewise.
1133 (process_jvm_instruction): Likewise.
1135 * decl.c (base_decl_map): New variable.
1136 (uniq): New variable.
1137 (update_aliases): Rewrite with more thorough checking.
1138 (debug_variable_p): New function.
1139 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1140 (check_local_named_variable): Delete whole function.
1141 (initialize_local_variable): New function.
1142 (check_local_unnamed_variable): Add checks and comments.
1143 (find_local_variable): Rewrite.
1144 (java_replace_reference): New function.
1145 (function_binding_level): New variable.
1146 (pushdecl_function_level): New function.
1147 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1148 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1149 (start_java_method): Reset uniq. Create base_decl_map. Set
1150 function_binding_level.
1151 (end_java_method): Null unused fields to save memory.
1153 2004-06-29 Andrew Haley <aph@redhat.com>
1155 * except.c (expand_start_java_handler): Push a new binding level.
1156 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1157 register_exception_range() to register where we'll do it.
1158 (expand_end_java_handler): Remove old bogus code. Replace with
1159 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1160 the top of the expression we're curently building.
1161 (maybe_end_try): Delete.
1162 * decl.c (binding_level.exception_range): New field.
1163 (clear_binding_level): Add field exception_range. Reformat.
1164 (poplevel): Call expand_end_java_handler().
1165 (poplevel): Call java_add_stmt only if functionbody is false.
1166 (maybe_poplevels): Don't call maybe_end_try() from here.
1167 (end_java_method): Clear no longer used trees in function decl.
1168 (register_exception_range): New function.
1169 * java-tree.h (register_exception_range, struct eh_range): Declare.
1171 2004-06-22 Andrew Haley <aph@redhat.com>
1173 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1175 * check-init.c (get_variable_decl): Teach check-init about
1176 FIELD_DECLs addressed via the otable.
1177 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1180 2004-05-28 Andrew Haley <aph@redhat.com>
1182 * jcf-parse.c (load_class): Don't try to read a class that we've
1185 * expr.c (build_invokeinterface): Use the old-fashioned way of
1186 doing indirect dispatch: look up interfaces by name.
1187 * java-tree.h (enum java_tree_index): Add
1188 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1189 * decl.c (java_init_decl_processing): Add
1190 soft_lookupinterfacemethodbyname_node.
1192 * gjavah.c (print_method_info): Final methods have vtable entries,
1193 so gjavah needs to output them.
1194 * class.c (layout_class_method): Generate vtable entries for final
1196 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1197 dispatch, even if a method is final.
1199 2004-05-25 Andrew Haley <aph@redhat.com>
1201 * class.c (build_symbol_entry): Convert the names of constructors
1202 to init_identifier_node when generating an entry for the indirect
1205 * expr.c (build_known_method_ref): Generate indirect calls for
1206 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1208 2004-05-24 Andrew Haley <aph@redhat.com>
1210 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1211 atable element is of the right type.
1213 * class.c (build_static_field_ref): Cast pointer to correct type
1216 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
1218 * Merged with HEAD as of 20040514. Diff against
1219 gcj-abi-2-merge-20040514.
1221 2004-04-16 Andrew Haley <aph@redhat.com>
1223 * verify.c (check_pending_block): Disable subroutine checks.
1224 (defer_merging): New function.
1225 (merge_types): If types are dummy, use defer_merging to combine them.
1226 (verify_jvm_instructions): If invocation is invokeinterface and
1227 target is dummy, assume target really is an interface.
1229 * parse.y (patch_invoke): Break out call to java_create_object.
1231 * lang.c (flag_verify_invocations): New.
1233 * jcf-parse.c (load_class): If we've already failed to load a
1234 class, don't try again.
1235 (load_class): If we can't find a .class file, don't fail, but emit
1237 (parse_class_file): Don't act on dummy methods.
1239 * java-tree.h (flag_verify_invocations): New.
1241 (lang_type.dummy_class): New field.
1242 (java_create_object): New function.
1243 (METHOD_DUMMY): New.
1245 * expr.c (build_field_ref): Widen field offset.
1246 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1247 that each of its elements is compatible with the one we're
1249 (pop_type_0): Issue a warning to say that we need to generate a
1251 (java_create_object): New function.
1252 (build_field_ref): Only generate hard refs if we're not using
1254 (expand_java_field_op): If we're using !verify_invocations and we
1255 see a missing field, generate a decl for it.
1257 (expand_invoke): If a class doesn't have the method we seek and
1258 we're using !flag_verify_invocations, generate a decl for the
1261 (build_known_method_ref): Always use indirect dispatch via the
1262 atable for static methods.
1264 (expand_java_NEW): Break out object creation into new function,
1267 (can_widen_reference_to): Issue a warning to say that we need to
1268 generate a runtime check.
1270 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1271 (make_method_value): Also use index for interfaces.
1272 (make_class_data): Skip dummy field for inherited data.
1273 Don't build method array for dummy methods.
1274 Set size_in_byte to -1 when using inirect dispatch
1275 Don't build a hard class ref if we don't have a hard ref to our
1276 superclass, or if we're using inirect dispatch.
1277 Null out dispatch tables.
1279 (layout_class_method): Don't complain about non-static method
1280 overrides static method is method is artificial.
1282 (build_static_field_ref): Disable atable references to static
1283 fields for the time being.
1285 (layout_class_methods): Check for CLASS_INTERFACE as
1286 well as CLASS_ABSTRACT.
1288 2004-11-24 Steven Bosscher <stevenb@suse.de>
1290 * class.c (make_class_data): Don't check flag_inline_functions.
1291 * lang.c (flag_really_inline): Remove unused flag.
1292 (java_handle_option): Don't set it here. Remove special handling
1293 of flag_inline_functions for Java.
1294 (java_init): Don't set flag_inline_trees here. Already done...
1295 (java_post_options): ...here. Don't clear flag_inline_functions.
1297 2004-11-24 Steven Bosscher <stevenb@suse.de>
1299 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1300 (java_gimplify_exit_block_expr): New function.
1301 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1303 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1304 (EXIT_BLOCK_EXPR): Likewise.
1305 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1306 (LABELED_BLOCK_BODY): Likewise.
1307 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1308 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1309 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
1311 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1312 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1313 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
1314 second operand of EXIT_BLOCK_EXPR.
1315 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1317 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1319 2004-11-23 Ben Elliston <bje@au.ibm.com>
1321 * xref.h (xref_flag_value): Remove.
1322 (xref_set_data, xref_get_data): Likewise.
1323 (xref_set_current_fp): Likewise.
1324 (XREF_NONE): Likewise.
1325 (XREF_GET_DATA): Likewise.
1326 * xref.c (xref_flag_value): Remove.
1327 (xref_set_data, xref_get_data): Likewise.
1328 (xref_set_current_fp): Likewise.
1330 2004-11-23 Ben Elliston <bje@au.ibm.com>
1332 * gjavah.c (output_directory): Make static.
1333 (temp_directory): Likewise.
1335 2004-11-15 Tom Tromey <tromey@redhat.com>
1337 * decl.c (instn_ptr_type_node): Removed.
1338 (lineNumbers_ptr_type_node): Removed.
1339 (jint_type): Removed.
1340 (jint_ptr_type): Removed.
1342 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
1345 * check-init.c (check_init): Ignore DECL_EXPR.
1346 * expr.c (always_initialize_class_p): Reenable.
1347 (build_class_init): Use a variable to store the decl. Also use
1348 boolean_false_node instead of integer_zero_node.
1349 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1352 2004-11-08 Tom Tromey <tromey@redhat.com>
1355 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1356 generating a JNI header.
1357 (print_field_info): Handle JNI headers.
1358 (jni_print_float): Likewise.
1359 (jni_print_double): Likewise.
1361 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
1363 * decl.c (end_java_method): Remove duplicated code.
1365 2004-11-06 Zack Weinberg <zack@codesourcery.com>
1366 Gerald Pfeifer <gerald@pfeifer.com>
1368 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1371 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
1374 * class.c: Reinstate 2004-08-18 patch.
1375 (make_local_function_alias): Don't create an alias for extern (native)
1378 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
1381 * class.c (make_local_function_alias): Revert 2004-08-18 change.
1382 (make_method_value): Likewise.
1384 2004-10-21 Andrew Haley <aph@redhat.com>
1387 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1389 2004-10-20 Andrew Haley <aph@redhat.com>
1391 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1392 Remove duplicated code block.
1394 2004-10-18 Steven Bosscher <stevenb@suse.de>
1396 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1397 New rules to work around old Bison warnings.
1399 2004-10-17 Steven Bosscher <stevenb@suse.de>
1401 * class.c (ident_subst): Always alloca buffer.
1402 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1403 opcode after including javaop.def.
1404 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1405 conditional expression that exits, to avoid warnings.
1406 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1407 a user of an extension.
1408 * win32-host.c: Move check down to have non-empty file when
1409 WIN32 is not defined.
1411 * Make-lang.in (java-warn): Add STRICT_WARN.
1412 (java/jcf-io.o-warn): Don't have Werror for this file.
1413 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1415 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
1417 * expr.c (expr_add_location): Move declaration to before all
1419 * parse.y (java_expand_classes): Ditto.
1420 * lex.c (java_peek_unicode): Ditto.
1422 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1424 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1425 if possible, else convert `foo' to 'foo'.
1426 * class.c: Likewise.
1429 * jcf-io.c: Likewise.
1430 * jcf-parse.c: Likewise.
1433 * parse.h: Likewise.
1435 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1437 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1438 rename parameter 'msg' to 'msgid' in function declaration.
1439 (issue_warning_error_from_context): Likewise.
1440 (yyerror): Rename parameter 'msg' to 'msgid'.
1441 (all over): Use new quoting style for diagnostics.
1443 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1445 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1446 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1449 2004-10-14 Matt Austern <austern@apple.com>
1451 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1454 2004-10-13 Tom Tromey <tromey@redhat.com>
1457 * lang.opt (--extdirs): Document.
1458 * jvspec.c (lang_specific_driver): Recognize -encoding and
1461 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
1463 * parse.y (issue_warning_error_from_context): Use va_list *
1464 instead of va_list parameter.
1465 (parse_error_context): Update call.
1466 (parse_warning_context): Likewise.
1468 2004-10-05 Zack Weinberg <zack@codesourcery.com>
1470 * parse.y, parse-scan.y: Add list of diagnostic messages to
1471 insulate translation template from version of yacc/bison used
1472 to compile the grammar.
1474 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
1476 Prepare for %q, %< and %> in diagnostic message strings.
1477 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1478 Name second parameter 'msgid'.
1479 * parse.y: Additionally include pretty-print.h and diagnostic.h.
1480 (issue_warning_error_from_context): Use pretty-printer functions
1481 instead of vsprintf for constructing formatted messages. Rename
1482 parameter 'msg' to 'msgid'.
1483 (parse_error_context): Rename parameter 'msg' to 'msgid'.
1484 (parse_warning_context): Likewise.
1486 2004-10-05 Andrew Haley <aph@redhat.com>
1489 * jcf-parse.c (parse_zip_file_entries): If a class has a
1490 superclass and a TYPE_SIZE of zero, lay it out.
1492 2004-09-30 Andrew Haley <aph@redhat.com>
1495 * jcf-parse.c (compute_class_name): Rewrite.
1497 2004-10-01 Jan Hubicka <jh@suse.cz>
1499 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1501 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1503 * lex.c: Fix a comment typo.
1505 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1507 * java-tree.h: Fix a comment typo.
1509 2004-09-30 Per Bothner <per@bothner.com>
1511 Simplify lexer. Implement --enable-mapped-location support.
1512 * jcf-parse.c (parse_class_file): Use linemap_line_start.
1513 (parse_source_file_1): Pass filename as extra parameter, so we can call
1514 linemap_add and set input_location here, rather than in both callers.
1515 (read_class): Pass copied filename to parse_source_file_1.
1516 Don't initialize wfl_operator - only needed for source compilation.
1517 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
1518 * lex.h: Remove a bunch of debugging macros.
1519 * lex.h (struct_java_line, struct java_error): Remove types.
1520 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
1521 (struct java_lc_s): Remove prev_col field.
1522 (struct java_lexer): New fields next_unicode, next_columns, and
1523 avail_unicode. New position field, and maybe token_start field.
1524 Don't need hit_eof field - use next_unicode == -1 instead.
1525 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
1526 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
1527 * parse.h: Various changes for USE_MAPPED_LOCATION.
1528 (EXPR_WFL_EMIT_LINE_NOTE): XXX
1529 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1530 (struct parser_ctxt): New file_start_location field.
1531 Remove p_line, c_line fields since we no longer save lines.
1532 Remove elc, lineno, and current_jcf fields - no longer used.
1533 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
1534 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1535 source_location and is probably not needed anymore anyway.
1536 Use new expr_add_Location function.
1537 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1538 (java_pop_parser_context): Minor cleanup.
1539 (java_parser_context_save_global, java_parser_context_restore_global,
1540 java_pop_parser_context): Save/restore input_location as a unit.
1541 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1542 a source_location instead of a wfl context node.
1543 (check_class_interface_creation): input_filename is not addressable.
1544 (create_artificial_method): Calling java_parser_context_save_global
1545 and java_parser_context_restore_global is overkill. Instead,
1546 temporarily set input_location from class decl.
1547 (java_layout_seen_class_methods): Set input_location from method decl.
1548 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1549 (finish_loop_body): Likewise.
1550 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1551 (java_sprint_unicode): Take a character, not index in line.
1552 (java_sneak_uncode): Replaced by java_peek_unicode.
1553 (java_unget_unicode): No longer used.
1554 (java_allocate_new_line. java_store_unicode): Removed, since we
1555 no longer remember "lines".
1556 (java_new_lexer): Update for new data structures.
1557 (java_read_char): Move unget_value checking to java_read_unicode.
1558 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1559 efficient functions that are used directly when lexing.
1560 (java_read_unicode_collapsing_terminators): No longer needed.
1561 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1562 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1563 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1564 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1565 combine switch branches, and test for common token kinds earlier.
1566 (java_lex_error): Rewrite.
1567 * jv-scan.c (expand_location): New function, copied from tree.c.
1568 (main): Set ctxp->filename instead of setting input_filename directly.
1570 2004-09-30 Per Bothner <per@bothner.com>
1572 More cleanup for --enable-mapped-location.
1573 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1574 input_location here. Instead do it in give_name_to_class.
1575 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1576 * expr.c (expand_byte_code): Call linemap_line_start.
1577 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1578 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1579 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1580 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1581 to USE_MAPPED_LOCATION case.
1583 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1584 * jcf-parse.c (java_parse_file): Don't set input_filename.
1585 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1586 Create a list of TRANSLATION_UNIT_DECL.
1587 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1588 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1589 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1590 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1591 (file_start_location): New static.
1592 (set_source_filename): Avoid extra access to input_filename macro.
1593 Concatenate new name with class's package prefix.
1594 (set_source_filename, give_name_to_class): Update.
1595 (give_name_to_class): Set class's "line 0" input_location here.
1596 (parse_class_file): Set input_location as a unit.
1598 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1600 2004-09-29 Per Bothner <per@bothner.com>
1602 * java-tree.h: Redefine some macros and add some declaration
1603 to handle the USE_MAPPED_LOCATION case.
1604 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1605 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1606 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1607 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1609 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1610 * decl.c (finish_method, java_add_stmt): Likewise.
1611 * java-gimplify.c (java-gimplify.c): Likewise.
1612 * jcf-write.c (generate_bytecode_insns): Likewise.
1613 * lang.c (java_post_options): Likewise - call linemap_add.
1615 2004-09-29 Andrew Haley <aph@redhat.com>
1618 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1619 result of TRUNC_MOD_EXPR.
1620 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1621 * decl.c (java_init_decl_processing): Mark
1622 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1624 2004-09-28 Tom Tromey <tromey@redhat.com>
1627 * class.c (add_miranda_methods): Load superinterface if not
1630 2004-09-28 Andrew Haley <aph@redhat.com>
1633 * jcf-parse.c (load_class): Don't try to read a class that we've
1636 2004-09-28 Andrew Haley <aph@redhat.com>
1638 * jcf-parse.c (load_class): Back out previous broken patch.
1640 2004-09-28 Andrew Haley <aph@redhat.com>
1643 * jcf-parse.c (load_class): Don't try to read a class that we've
1645 Check that we really did read the right class.
1647 2004-09-25 Tom Tromey <tromey@redhat.com>
1650 * parse.y (create_artificial_method): Use add_method_1.
1652 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1654 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1656 * gcj.texi: Fix typos.
1658 2004-09-24 Tom Tromey <tromey@redhat.com>
1661 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1662 in error parts of rule.
1663 (unary_expression): Don't call error_if_numeric_overflow when $1
1666 2004-09-24 Tom Tromey <tromey@redhat.com>
1669 * parse.y (resolve_qualified_expression_name): Set
1670 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1671 * expr.c (force_evaluation_order): Check for empty argument list
1672 after stripping COMPOUND_EXPR.
1674 2004-09-23 Andrew Haley <aph@redhat.com>
1677 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1680 2004-09-23 Tom Tromey <tromey@redhat.com>
1683 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1684 where operand is null.
1686 2004-09-23 Tom Tromey <tromey@redhat.com>
1689 * parse.y (not_accessible_p): Allow access to protected members
1690 even when class is not static.
1692 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1694 * Make-lang.in: Revert the gcc-none.o change.
1696 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1698 * parse.y (patch_anonymous_class): VEC_space returns true if there
1701 2004-09-21 Matt Austern <austern@apple.com>
1704 * gjavah.c (free_method_name_list): Fix function definition so
1705 it's a proper C prototype.
1707 2004-09-21 Tom Tromey <tromey@redhat.com>
1710 * gjavah.c (free_method_name_list): New method.
1713 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1714 Zack Weinberg <zack@codesourcery.com>
1716 * java-tree.def: Use tree_code_class enumeration constants
1717 instead of code letters.
1718 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1719 new tree-class enumeration constants.
1721 2004-09-13 Tom Tromey <tromey@redhat.com>
1724 * class.c (layout_class_method): Put synthetic methods into the
1727 2004-09-11 Andrew Pinski <apinski@apple.com>
1729 * Make-lang.in (java/ggc-none.c): Change dependency
1730 for ggc.h into $(GGC_H).
1732 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1734 * Make-lang.in (java/win32-host.o): Add dependency on
1736 * win32-host.c: Add includes for coretypes.h, jcf.h
1738 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1740 * Make-lang.in (GCJH_OBJS): Change dependency from
1741 ggc-none.o to java/ggc-none.o
1742 (JCFDUMP_OBJS): Likewise.
1743 (java/ggc-none.o): New target.
1745 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1747 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1748 * class.c (build_utf8_ref, build_static_field_ref,
1749 make_field_value, make_method_value, get_dispatch_table,
1750 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1751 * constants.c (get_tag_node, build_ref_from_constant_pool,
1752 build_constants_constructor): Likewise.
1753 * decl.c (java_init_decl_processing): Likewise.
1754 * expr.c (build_java_array_length_access, build_newarray,
1755 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1756 build_java_binop, build_field_ref, expand_java_add_case,
1757 expand_java_call, build_known_method_ref, build_invokevirtual,
1758 build_invokeinterface, build_jni_stub): Likewise.
1759 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1760 * jcf-parse.c (get_constant): Likewise.
1761 * lex.c (do_java_lex): Likewise.
1762 * parse.y (patch_binop, patch_unaryop, patch_cast,
1763 build_newarray_node, patch_newarray): Likewise.
1764 * resource.c (compile_resource_data): Likewise.
1765 * typeck.c (build_prim_array_type): Likewise.
1767 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1769 * decl.c (java_init_decl_processing): Adjust
1770 initialize_sizetypes call.
1772 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1774 * jv-scan.c (fancy_abort): Add.
1776 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1778 * expr.c (build_java_arrayaccess): Use convert to change
1781 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1783 * class.c (make_local_function_alias): Allocate extra space for 'L'
1784 in name buffer. Reported by Thomas Neumann.
1786 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1788 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1789 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1790 * lex.c (do_java_lex): Adjust.
1791 (error_if_numeric_overflow): Likewise.
1793 2004-08-18 Andrew Pinski <apinski@apple.com>
1795 * class.c (make_local_function_alias): Only make a new decl if we
1796 support alias attribute on all decls.
1798 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1800 * class.c (make_local_function_alias): New function. Create local
1801 alias for public method DECL.
1802 (make_method_value): Use make_local_function_alias.
1803 * parse.y (craft_constructor): Don't special-case anonymous classes.
1804 Always set ctor_name to init_identifier_node.
1805 (lookup_method_invoke): Call layout_class_method when creating
1806 anonymous class constructor.
1808 2004-08-18 Richard Henderson <rth@redhat.com>
1810 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
1811 default case. Treat '<' similarly. Update for
1812 is_gimple_formal_tmp_var name change.
1814 2004-08-17 Andrew Haley <aph@redhat.com>
1816 * lang.c (lang_printable_name): Obey verbose flag.
1817 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
1818 lang_printable_name().
1819 (verify_constructor_circularity, get_printable_method_name,
1820 check_abstract_method_definitions, java_check_regular_methods,
1821 java_check_abstract_methods, check_inner_class_access,
1822 fix_constructors, patch_method_invocation, patch_return):
1824 * expr.c (pop_type_0): Likewise.
1826 * java-tree.h (lang_printable_name_wls): Delete.
1828 2004-08-16 Tom Tromey <tromey@redhat.com>
1831 * parse.y (primary): Changed for initialized and uninitialized
1833 (array_access): Handle array_creation_initialized.
1834 (array_creation_expression): Split into
1835 array_creation_initialized and array_creation_uninitialized.
1837 2004-08-16 Andrew Haley <aph@redhat.com>
1839 * jcf-write.c (find_constant_index): Canonicalize NaNs when
1840 generating bytecode.
1842 2004-08-16 Elliot Lee <sopwith@redhat.com>
1845 * jcf-parse.c (java_parse_file): Handle filenames with embedded
1846 spaces, and quoted filelists.
1848 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
1850 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
1851 * class.c (build_utf8_ref, build_static_field_ref,
1852 make_field_value, make_method_value, get_dispatch_table,
1853 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1854 * constants.c (get_tag_node, build_ref_from_constant_pool,
1855 build_constants_constructor): Likewise.
1856 * decl.c (java_init_decl_processing): Likewise.
1857 * expr.c (build_java_array_length_access, build_newarray,
1858 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1859 build_java_binop, build_field_ref, expand_java_add_case,
1860 expand_java_call, build_known_method_ref, build_invokevirtual,
1861 build_invokeinterface, build_jni_stub): Likewise.
1862 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1863 * jcf-parse.c (get_constant): Likewise.
1864 * lex.c (do_java_lex): Likewise.
1865 * parse.y (patch_binop, patch_unaryop, patch_cast,
1866 build_null_of_type, patch_newarray): Likewise.
1867 * resource.c (compile_resource_data): Likewise.
1868 * typeck.c (build_prim_array_type): Likewise.
1870 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
1872 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
1873 Don't create BLOCK here or call java_gimplify_block.
1875 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
1877 * java-tree.h (flag_deprecated): Removed.
1878 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
1879 * parse.y (check_deprecation): Check warn_deprecated instead of
1882 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
1884 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
1885 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
1886 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
1887 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
1888 flag_force_classes_archive_check, flag_optimize_sci,
1889 flag_indirect_dispatch): Remove explicit declarations.
1890 * lang.opt: Add implicit declare/define/assign. Remove obsolete
1893 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
1896 * Make-lang.in (java.install-man): Install from either build
1897 tree or source tree, whichever has the file first.
1899 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
1901 * jcf-parse.c (get_constant): Adjust force_fit_type call.
1902 * lex.h (SET_LVAL_NODE_TYPE): Remove.
1903 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
1904 (do_java_lex): Likewise. Adjust force_fit_type call.
1906 2004-08-04 Roger Sayle <roger@eyesopen.com>
1907 Andrew Haley <aph@redhat.com>
1909 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
1910 checking trees as they're being built.
1911 (convert): Call convert_ieee_real_to_integer if we're
1912 converting a constant, even if we're writing a class file.
1914 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
1917 * parse.y (fold_constant_for_init): Call resolve_field_access with
1918 correct current_class context.
1920 2004-08-01 Roger Sayle <roger@eyesopen.com>
1922 * decl.c (update_aliases, initialize_local_variable): Replace calls
1923 to build with calls to buildN.
1924 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
1925 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
1926 * parse.h (BUILD_THROW): Likewise.
1927 * parse.y (switch_expression, synchronized_statement,
1928 catch_clause_parameter, array_creation_expression,
1929 conditional_expression, make_qualified_name,
1930 resolve_qualified_expression_name, patch_method_invocation,
1931 patch_invoke, build_method_invocation, build_new_invocation,
1932 build_assignment, patch_assignment, build_binop, patch_binop,
1933 build_string_concatenation, build_incdec, patch_unaryop,
1934 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
1935 patch_return, build_if_else_statement, build_labeled_block,
1936 build_new_loop, build_loop_body, build_bc_statement,
1937 build_assertion, encapsulate_with_try_catch, build_try_statement,
1938 build_try_finally_statement, patch_synchronized_statement,
1939 emit_test_initialization): Likewise, replace build with buildN.
1941 2004-07-28 Eric Christopher <echristo@redhat.com>
1943 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
1944 (java_unsafe_for_reeval): Ditto.
1946 2004-07-26 <hp@bitrange.com>
1948 * parse.y (build_super_invocation): Adjust declaration order to
1949 avoid declaration after statement.
1951 2004-07-25 Bernardo Innocenti <bernie@develer.com>
1953 * decl.c: Rename all identifiers named `class' to `cl'.
1955 2004-07-25 Richard Henderson <rth@redhat.com>
1957 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
1959 2004-07-23 Mike Stump <mrs@apple.com>
1961 * boehm.c (set_bit): Improve type safety wrt unsignedness.
1962 * gjavah.c (throwable_p, decode_signature_piece,
1963 print_full_cxx_name, print_include, add_namelet, add_class_decl,
1964 process_file): Likewise.
1965 * jcf-dump.c (main): Likewise.
1966 * jcf-io.c (read_zip_member): Likewise.
1967 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
1968 give_name_to_class, get_class_constant): Likewise.
1969 * jcf-write.c (find_constant_wide, push_long_const,
1970 generate_classfile): Likewise.
1971 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
1972 * parse.y (read_import_dir): Likewise.
1973 * typeck.c (parse_signature_type): Likewise.
1974 * verify.c (verify_jvm_instructions): Likewise.
1975 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
1977 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
1979 * Make-lang.in: Replace rmic and rmiregistry references with
1980 grmic and grmiregistry.
1981 * gcj.texi: Likewise.
1983 2004-07-20 Andrew Haley <aph@redhat.com>
1986 * verify.c (verify_jvm_instructions): Comment change only.
1988 * typeck.c (build_java_array_type): Add size field to array name.
1990 * java-tree.h (LOCAL_SLOT_P): New.
1991 (update_aliases): Add PC argument.
1992 (pushdecl_function_level): New function.
1994 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1995 MODIFY_EXPR, and SAVE_EXPR.
1996 (java_gimplify_modify_expr): New function.
1998 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1999 (expand_iinc): Pass PC to update_aliases().
2000 (STORE_INTERNAL): Likewise.
2001 (process_jvm_instruction): Likewise.
2003 * decl.c (base_decl_map): New variable.
2004 (uniq): New variable.
2005 (update_aliases): Rewrite with more thorough checking.
2006 (debug_variable_p): New function.
2007 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
2008 (check_local_named_variable): Delete whole function.
2009 (initialize_local_variable): New function.
2010 (check_local_unnamed_variable): Add checks and comments.
2011 (find_local_variable): Rewrite.
2012 (java_replace_reference): New function.
2013 (function_binding_level): New variable.
2014 (pushdecl_function_level): New function.
2015 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2016 (maybe_pushlevels): Call pushdecl() on each of the new decls.
2017 (start_java_method): Reset uniq. Create base_decl_map. Set
2018 function_binding_level.
2019 (end_java_method): Null unused fields to save memory.
2021 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2023 * class.c (add_interface_do): Remove.
2024 (set_super_info, interface_of_p, maybe_add_interface,
2025 add_interface, make_class_data, layout_class,
2026 add_miranda_methods): Adjust BINFO accessors and addition.
2027 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2029 * jcf-write.c (generate_classfile): Likewise.
2030 * parse.y (patch_anonymous_class, check_inner_circular_reference,
2031 check_circular_reference, java_complete_class,
2032 check_abstract_method_definitions,
2033 java_check_abstract_method_definitions,
2034 check_interface_throws_clauses, java_check_abstract_methods,
2035 lookup_java_interface_method2,
2036 find_applicable_accessible_methods_list): Adjust BINFO accessors
2038 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2040 2004-07-18 Roger Sayle <roger@eyesopen.com>
2042 * builtins.c (max_builtin, min_builtin,
2043 java_build_function_call_expr): Replace calls to build with buildN.
2044 * class.c (build_class_ref, build_static_field_ref,
2045 get_dispatch_table, make_class_data, layout_class_method): Likewise.
2046 * constants.c (build_ref_from_constant_pool): Likewise.
2047 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2048 add_stmt_to_compound): Likewise.
2049 * except.c (build_exception_object_ref, expand_end_java_handler):
2051 * java-gimplify.c (java_gimplify_case_expr,
2052 java_gimplify_default_expr, java_gimplify_block,
2053 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2054 * jcf-write.c (generate_bytecode_insns): Likewise.
2055 * typeck.c (convert_ieee_real_to_integer): Likewise.
2057 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2059 * java-tree.h (builtin_function): Declare.
2061 2004-07-16 Steven Bosscher <stevenb@suse.de>
2063 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2064 abuse restore_line_number_status.
2066 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
2069 * jcf-parse.c (java_emit_static_constructor): Specify default
2072 2004-07-13 Per Bothner <per@bothner.com>
2074 * java-tree.h (all_class_filename): Remove useless macro.
2075 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
2076 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
2077 * parse.y (java_parser_context_restore_global): Replace
2078 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2079 * jcf-parse.c (read_class, java_parse_file): Likewise.
2081 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
2084 gjavah.c (print_field_info): Emit constant only if field is static.
2086 2004-07-11 Roger Sayle <roger@eyesopen.com>
2088 * expr.c (java_truthvalue_conversion, flush_quick_stack,
2089 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2090 build_java_ret, build_java_throw_out_of_bounds_exception,
2091 build_java_array_length_access, java_check_reference,
2092 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2093 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2094 expand_java_arrayload, build_java_monitor, expand_java_return,
2095 expand_load_internal, expand_java_NEW, build_get_class,
2096 build_instanceof, expand_java_CHECKCAST, expand_iinc,
2097 build_java_soft_divmod, build_java_binop, build_field_ref,
2098 expand_compare, expand_java_goto, expand_java_switch,
2099 expand_java_add_case, build_class_init, build_known_method_ref,
2100 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2101 expand_invoke, build_jni_stub, expand_java_field_op,
2102 java_expand_expr, expand_byte_code, STORE_INTERNAL,
2103 force_evaluation_order, emit_init_test_initialization): Convert
2104 calls to "build" into calls to the prefered "buildN" functions.
2106 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2108 * java-tree.h (set_block): Remove.
2109 * lang.c (java_clear_binding_stack): New.
2110 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2111 * decl.c (struct binding_level): Remove this_block.
2112 (clear_binding_level): Likewise.
2113 (poplevel): Don't handle this_block.
2114 (set_block): Remove.
2116 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
2118 * class.c (common_enclosing_context_p): Remove statement with no
2121 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2124 * parse.y (create_anonymous_class): Remove 'location' argument. Use
2125 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
2126 (craft_constructor): Inherit access flags for implicit constructor
2127 from the enclosing class.
2128 (create_class): Fix comment typo.
2129 (resolve_qualified_expression_name): Pass type of qualifier to
2130 not_accessible_p, not the type in which target field was found.
2131 (not_accessible_p): Handle inner classes. Expand protected
2132 qualifier-subtype check to enclosing instances, but don't apply this
2133 check to static members. Allow protected access to inner classes
2134 of a subtype. Allow private access within common enclosing context.
2135 (build_super_invocation): Get WFL line number info from current
2137 (build_incomplete_class_ref): Update for new create_anonymous_class
2139 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2140 common_enclosing_instance_p.
2141 * class.c (common_enclosing_context_p): New. Determine if types
2142 share a common enclosing context, even across static contexts.
2143 (common_enclosing_instance_p): Renamed from
2144 common_enclosing_context_p. Determines if types share a common
2145 non-static enclosing instance.
2146 * java-tree.h (common_enclosing_instance_p): Declare.
2147 * jcf-write.c (get_method_access_flags): New. Surpress private flag
2148 for inner class constructors.
2149 (generate_classfile): Use get_method_access_flags.
2151 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2153 * class.c (interface_of_p): Check for null TYPE_BINFO.
2155 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
2157 * class.c (make_class): Do not create binfo here.
2158 (set_super_info): Create it here.
2159 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2161 2004-07-08 Richard Henderson <rth@redhat.com>
2163 * expr.c (case_identity, get_primitive_array_vtable,
2164 java_expand_expr, emit_init_test_initialization): Remove.
2165 * java-tree.h (java_expand_expr): Remove.
2166 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2168 2004-07-07 Per Bothner <per@bothner.com>
2170 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
2171 get internal error due to mismatched types.
2173 * gcj.texi (Invoking gij): Document new -verbose:class flag.
2175 * gcj.texi (Linking): New node. Document -lgij usage.
2177 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2179 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2180 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2181 * java/class.c (set_super_info, class_depth, interface_of_p,
2182 maybe_add_interface, add_interface, make_class_data,
2183 layout_class, add_miranda_methods): Adjust BINFO macros.
2184 * expr.c (can_widen_reference_to, lookup_field): Likewise.
2185 * jcf-write.c (generate_classfile): Likewise.
2186 * parse.y (patch_anonymous_class,
2187 check_inner_circular_reference, check_circular_reference,
2188 java_complete_class, check_abstract_method_definitions,
2189 java_check_abstract_method_definitions,
2190 check_interface_throws_clauses, java_check_abstract_methods,
2191 lookup_java_interface_method2,
2192 find_applicable_accessible_methods_list): Likewise.
2193 * typeck.c (find_method_in_interface): Likewise.
2194 * verify.c (merge_types): Likewise.
2196 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2198 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2199 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2201 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2203 * class.c (make_class): Use make_tree_binfo.
2204 (set_super_info, add_interface_do): Likewise.
2205 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2207 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2209 * verify.c: Correct array element access formatting thinko.
2211 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2213 * verify.c: Insert a short blurb at the start referring to the JVMS.
2214 (merge_type_state): Remove redundant nested if statement.
2215 (verify_jvm_instructions): Ensure current_subr is initialised to
2217 Minor formatting fixes all over the place.
2219 2004-07-02 Richard Henderson <rth@redhat.com>
2221 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2223 2004-07-01 Richard Henderson <rth@redhat.com>
2225 * class.c (registerClass_libfunc): Remove.
2226 (init_class_processing): Don't set it.
2227 (emit_register_classes): Take list_p parameter. Fill it in
2228 with _Jv_RegisterClass calls.
2229 * decl.c (java_init_decl_processing): Don't call
2230 init_resource_processing.
2231 * jcf-parse.c (java_emit_static_constructor): New.
2232 (java_parse_file): Call it.
2233 * resource.c (registerResource_libfunc): Remove.
2234 (init_resource_processing): Remove.
2235 (write_resource_constructor): Take list_p parameter. Fill it in
2236 with _Jv_RegisterResource calls.
2237 * java-tree.h: Update prototypes.
2239 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
2242 * class.c (layout_class_method): Do not override package-private
2243 method if its in a different package.
2244 (split_qualified_name): Move here from parse.y. Rename from
2245 breakdown_qualified. Add comment.
2246 (in_same_package): Move here from parse.y. Add comment.
2247 * java-tree.h (break_down_qualified, in_same_package): Declare.
2248 (in_same_package): Likewise.
2249 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2252 2004-06-29 Andrew Haley <aph@redhat.com>
2254 * except.c (expand_start_java_handler): Push a new binding level.
2255 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
2256 register_exception_range() to register where we'll do it.
2257 (expand_end_java_handler): Remove old bogus code. Replace with
2258 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2259 the top of the expression we're curently building.
2260 (maybe_end_try): Delete.
2261 * decl.c (binding_level.exception_range): New field.
2262 (clear_binding_level): Add field exception_range. Reformat.
2263 (poplevel): Call expand_end_java_handler().
2264 (poplevel): Call java_add_stmt only if functionbody is false.
2265 (maybe_poplevels): Don't call maybe_end_try() from here.
2266 (end_java_method): Clear no longer used trees in function decl.
2267 (register_exception_range): New function.
2268 * java-tree.h (register_exception_range, struct eh_range): Declare.
2270 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
2272 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2274 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
2277 * expr.c (class_has_finalize_method): Fix method name indentation.
2278 (expand_java_call): Remove K&R style parameter declaration.
2279 (expand_invoke): Fix statement indentation.
2280 (expand_java_field_op): Likewise.
2281 * parse-scan.y: Fix typo.
2282 (reset_report): Fix method name indentation.
2283 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2285 * verify.c (verify_jvm_instructions): Document parameters, insert
2287 * lang.c (lang_init_source): Fix method name indentation.
2288 * class.c (common_enclosing_context_p): Likewise.
2289 (emit_symbol_table): Fix parameter list indentation.
2290 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2291 parameter declaration.
2292 * constants.c: Fix copyright notice indentation.
2293 * typeck.c (find_method_in_superclasses): Fix parameter list
2295 (find_method_in_interfaces): Likewise.
2296 * zextract.c (makelong): Fix method name indentation.
2298 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2301 * parse.y (create_interface): Set correct access modifiers for
2303 * jcf-write.c (get_classfile_modifiers): New function.
2304 (generate_classfile): Use get_classfile_modifiers, not
2307 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2309 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2310 dependency to current parser context, not NULL_TREE, for top-level
2312 (jdep_resolve_class): Enable member access check for all inner
2315 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2317 * parse.y (qualify_and_find): Pass type decl, not identifier, to
2320 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2323 * expr.c (expand_java_field_op): Ensure that target class for static
2324 field access has been loaded.
2326 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2327 Ranjit Mathew <rmathew@hotmail.com>
2329 PR java/1207, java/16178
2330 * jcf-parse.c (load_class): Return immediately if passed a type decl
2331 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2332 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2333 before calling load_class.
2334 (qualify_and_find): Likewise.
2335 (find_in_imports_on_demand): Likewise.
2336 (find_applicable_accessible_methods_list): Likewise.
2338 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
2340 * parse.y (java_layout_seen_class_methods): Don't call load_class
2341 on class defined by source parser.
2343 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
2345 * parse.y (set_nested_class_simple_name_value): Removed.
2346 (java_complete_expand_class): Remove calls to
2347 set_nested_class_simple_name_value.
2349 2004-06-22 Andrew Haley <aph@redhat.com>
2350 Ranjit Mathew <rmathew@hotmail.com>
2352 Fixes PR java/16113.
2353 * decl.c (force_poplevels): Remove call to expand_end_bindings.
2355 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
2357 * parse.y (create_class): Correct diagnostic message about
2358 java.lang.Object extending anything else.
2360 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2362 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2363 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2364 * constants.c (build_ref_from_constant_pool): Likewise.
2365 * expr.c (build_java_array_length_access): Likewise.
2366 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2367 (invoke_build_dtable, build_invokevirtual): Likewise.
2368 (build_invokeinterface, java_expand_expr): Likewise.
2369 (emit_init_test_initialization): Likewise.
2370 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2371 * parse.y (make_qualifed_name, build_array_ref): Likewise.
2373 2004-06-21 Andrew Haley <aph@redhat.com>
2375 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2378 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2380 * jcf.h (struct JCF): Change java_source, right_zip and finished
2382 * lex.h (struct java_lexer): Change hit_eof, read_anything,
2383 byte_swap and use_fallback to unsigned int.
2384 * parse.h (struct _jdep): Change flag0 to unsigned int.
2386 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
2389 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2390 before trying to lay out its methods.
2391 * jcf-parse.c (read_class): Track parsed files using canonical paths
2392 obtained via lrealpath from libiberty.
2393 (java_parse_file): Likewise.
2394 (parse_source_file_1): Rename formal parameter to reflect its
2395 modified purpose. Minor formatting fix.
2397 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2399 * class.c (emit_register_classes): Make the function uninlinable,
2400 do not set current_function_cannot_inline.
2401 * resource.c (write_resource_constructor): Do not reset
2402 flag_inline_functions around rest_of_compilation.
2404 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
2407 * expr.c (java_truthvalue_conversion): Handle
2408 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2409 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2410 i.e. return the expression.
2412 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
2414 * gjavah.c: Include version.h
2416 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
2418 * jcf-write.c (generate_bytecode_conditional): Correct handling
2419 of unordered conditionals. Add comment.
2421 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
2422 Per Bothner <per@bothner.com>
2424 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2425 local variable was initialised upon declaration.
2426 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2427 variable was final and initialised upon declaration.
2428 * check-init.c (check_final_reassigned): Give error only if a blank
2429 final is not definitely unassigned or if an initialised final is
2431 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2432 assignment expressions. Remove case MODIFY_EXPR, label do_default.
2433 (check_init): Perform initialised-variable-removing-optimisation
2434 only on non-final local variables.
2436 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2438 * jcf-write.c (generate_bytecode_conditional): Handle binops
2439 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2441 (generate_bytecode_insns): Likewise.
2443 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2445 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2446 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2448 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2450 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2451 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2453 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2455 * decl.c (struct binding_level): Add GTY marker. Compile
2456 binding_depth unconditionally.
2457 (current_binding_level, free_binding_level, global_binding_level):
2459 (clear_binding_level): Unconditionally set binding_depth.
2460 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2462 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2464 * lex.c (java_new_lexer): Set 'encoding'.
2465 (java_read_char): Improve error message for unrecognized characters.
2466 * lex.h (struct java_lexer): New field 'encoding'.
2468 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2470 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2472 2004-05-21 Mark Wielaard <mark@klomp.org>
2474 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2477 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
2479 * typeck.c: Remove non-printable character 160.
2481 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
2483 * check-init.c: Correct minor typos.
2485 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2487 * Make-lang.in, expr.c, java-gimplify.c: Rename
2488 tree-simple.[ch] to tree-gimple.[ch].
2490 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
2492 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2494 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2496 Merge from tree-ssa-20020619-branch. See
2497 ChangeLog.tree-ssa for details.
2499 * Make-lang.in, builtins.c, check-init.c, class.c,
2500 constants.c, decl.c, except.c, expr.c, java-except.h,
2501 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2502 lang.c, lang.opt, parse.y, resource.c: Merged.
2503 * java-gimplify.c: New file.
2505 2004-05-10 Andrew Haley <aph@redhat.com>
2507 * parse.y (create_class): Set TYPE_VFIELD.
2508 * decl.c (java_init_decl_processing): Likewise.
2510 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2511 * class.c (make_method_value): Replace DECL_VINDEX with call to
2513 (get_dispatch_vector): Likewise.
2514 (layout_class_method): Likewise.
2515 Replace set of DECL_VINDEX with call to set_method_index().
2516 (set_method_index): New function.
2517 (get_method_index): New function.
2518 * java-tree.h (set_method_index): New function decl.
2519 (get_method_index): New function decl.
2521 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
2523 * parse.y (check_pkg_class_access): Add new argument
2524 and use it when cl is NULL to call lookup_cl on it.
2525 (parser_check_super_interface): Do not call lookup_cl.
2526 Pass this_decl to check_pkg_class_access and NULL
2527 instead of lookup_cl.
2528 (parser_check_super): Update for change in
2529 check_pkg_class_access.
2530 (do_resolve_class): Likewise.
2531 (process_imports): Likewise.
2532 (find_in_imports_on_demand): Likewise.
2533 (resolve_qualified_expression_name): Likewise.
2535 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2537 Fixes PR java/9685, PR java/15073
2538 * parse.y (accessibility_string): New method.
2539 (not_accessible_field_error): Use accessibility_string()
2540 instead of java_accstring_lookup().
2541 (resolve_qualified_expression_name): Check with
2542 check_pkg_class_access() before allowing access using
2545 Use check_pkg_class_access() instead of not_accessible_p()
2546 for unqualified types.
2547 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2548 REFERENCE for package-private access checking.
2549 (patch_method_invocation): Use accessibility_string() instead
2550 of java_accstring_lookup().
2552 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2555 * gjavah.c (struct method_name): Add member is_native.
2556 (overloaded_jni_method_exists_p): Match candidate method only if
2558 (print_method_info): Initialise is_native flag from the method's
2561 2004-04-30 Roger Sayle <roger@eyesopen.com>
2563 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2564 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2566 2004-04-22 Roger Sayle <roger@eyesopen.com>
2568 * resource.c (write_resource_constructor): Guard call to possibly
2569 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2571 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2573 * class.c (make_class_data): Add new field aux_info.
2574 * decl.c (java_init_decl_processing): Push type and decl for
2577 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2579 * expr.c (expand_java_NEW): Don't use size argument for
2580 _Jv_AllocObject calls.
2581 * parse.y (patch_invoke): Likewise.
2583 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2585 * expr.c (build_invokeinterface): Remove unused variables to
2588 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2590 * class.c (get_interface_method_index): New function. Return dispatch
2591 index for interface method.
2592 (make_method_value): For interface methods, set index field to
2593 iface dispatch index, not DECL_VINDEX.
2594 * expr.c (build_invokeinterface): Use get_interface_method_index.
2596 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2598 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2600 2004-03-31 Andrew Haley <aph@redhat.com>
2603 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2605 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2607 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2608 form of GTY markers.
2610 2004-03-25 Marcus Meissner <meissner@suse.de>
2613 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2615 2004-03-23 Tom Tromey <tromey@redhat.com>
2618 * jcf-write.c (make_class_file_name): Don't report if mkdir
2621 2004-03-23 Tom Tromey <tromey@redhat.com>
2623 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2625 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2627 * class.c, gjavah.c, lang.c: Fix comment typos.
2628 * gcj.texi: Fix typos.
2630 2004-03-19 Per Bothner <per@bothner.com>
2632 * gcj.texi (Code Generation): Document new flags and assert defaults.
2634 * class.c (assume_compiled_node_struct): Rename type to
2635 class_flag_node_struct, as it is now also used for enable_assertions.
2636 Rename assume_compiled_node typedef. Rename excludep field to value.
2637 (find_assume_compiled_node): Rename function to find_class_flag_node.
2638 Minor optimization - avoid needless strlen.
2639 (add_assume_compiled): Some tweaking and optimization.
2640 Rename and generalize to add_class_flag takem an extra parameter.
2641 (add_assume_compled): New just calls add_class_flag.
2642 (add_enable_assert, enable_assertions): New functions.
2643 (enable_assert_tree): New static.
2644 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2645 * lang.opt (fenable-assertions, fenable-assertions=,
2646 fdisable-assertions, fdisable-assertions=): New options.
2647 * lang.c (java_handle_option): Handle new options.
2648 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2649 class in an interface - create helper class nested in outer interface.
2650 (build_assertion): Short-circuit if enable_assertions is false.
2652 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2654 * java-tree.h: Changes throughout to add checking to macros
2655 and numerous whitespace changes.
2656 (VAR_OR_FIELD_CHECK): New macro.
2657 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2658 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2660 2004-03-16 Per Bothner <per@bothner.com>
2662 * jcf-jump.c (options): New --print-constants option.
2663 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2665 * jcf-dump.c (flag_print_constant_pool): Default to off.
2666 (print_constant_terse_with_index): New helper function.
2667 (various places): Check flag_print_constant_pool where missing.
2668 (main): If verbose set flag_print_constant_pool.
2669 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2671 2004-03-15 Andrew Haley <aph@redhat.com>
2674 * parse.y (java_complete_lhs): Check that final variable has an
2677 2004-03-12 Andrew Haley <aph@redhat.com>
2680 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2683 2004-02-29 Roger Sayle <roger@eyesopen.com>
2685 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2688 2004-02-27 Per Bothner <per@bothner.com>
2690 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2691 suggestion: Use build_incomplete_class_ref.
2692 This fixes PR java/13508, java/11714.
2694 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2696 * java/parse.h: Update copyright.
2698 2004-02-26 Andrew Haley <aph@redhat.com>
2701 * parse.y (check_interface_throws_clauses): Check for
2702 !METHOD_INVISIBLE (iface_method).
2703 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2704 well as CLASS_ABSTRACT.
2706 2004-02-25 Per Bothner <per@bothner.com>
2708 * parse.y (build_assertion): If we're in an inner class, create the
2709 class$ helper routine in the outer class.
2711 2004-02-19 Richard Henderson <rth@redhat.com>
2713 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2715 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2717 * Make-lang.in (java.install-man): Add extra dependencies.
2719 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2721 * Make-lang.in: Install man pages under the same names
2722 (possibly transformed) as the program they document.
2724 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2726 * gjavah.c: Include "intl.h".
2727 (error): New function.
2728 (main): Call gcc_init_libintl.
2729 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2730 print_stub_or_jni, process_file, main): Use error rather than
2732 (print_method_info, usage, help, version, main): Mark strings for
2733 translation with _. Avoid splitting up sentences. Send
2734 information messages to stdout.
2735 * jcf-dump.c: Include "intl.h".
2736 (main): Call gcc_init_libintl.
2737 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2738 Mark error, usage and version messages for translation with _.
2739 Avoid splitting up sentences.
2740 * jv-scan.c: Include "intl.h".
2741 (fatal_error, warning): Change parameter s to msgid. Translate
2743 (main): Call gcc_init_libintl.
2744 (usage, help, version): Mark error, usage and version messages for
2745 translation with _. Avoid splitting up sentences.
2746 * jvgenmain.c: Include "intl.h".
2747 (main): Call gcc_init_libintl.
2748 (usage, main): Mark error messages for translation with _.
2749 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2750 JVGENMAIN_OBJS): Add intl.o.
2751 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2752 java/jvgenmain.o): Update dependencies.
2754 2004-02-08 Per Bothner <per@bothner.com>
2756 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2757 class don't use not_accessible_field_error, which can get confused.
2759 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2761 Make-lang.in (po-generated): Delete.
2763 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2765 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2767 * decl.c: Include target.h.
2768 (start_java_method): Replace PROMOTE_PROTOTYPES with
2769 targetm.calls.promote_prototypes.
2770 * expr.c: Include target.h.
2771 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2772 targetm.calls.promote_prototypes.
2773 * parse.y: Include target.h.
2774 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2775 with targetm.calls.promote_prototypes.
2777 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2779 * typeck.c: Update copyright.
2781 2004-02-02 Tom Tromey <tromey@redhat.com>
2783 * decl.c (java_init_decl_processing): Remove duplicate
2786 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2788 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2790 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2792 * expr.c (build_field_ref): Move variable
2795 2004-01-28 Andrew Haley <aph@redhat.com>
2797 * expr.c (build_field_ref): Widen field offset.
2799 2004-01-27 Andrew Haley <aph@redhat.com>
2802 * parse.y (check_interface_throws_clauses): Make sure class_decl
2805 2004-01-22 Jeff Sturm <jsturm@one-point.com>
2808 * parse.y (patch_assignment): Don't modify lhs_type for
2809 reference assignments.
2811 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2813 * Make-lang.in: Replace $(docdir) with doc.
2814 (java.info, java.srcinfo, java.man, java.srcman): New rules.
2815 (java.install-man): Revamp rule.
2817 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2819 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
2820 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
2821 instead of deferred backquote.
2823 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
2825 * typeck.c (find_method_in_interfaces): Move variable
2828 2004-01-16 Andrew Haley <aph@redhat.com>
2831 * typeck.c (shallow_find_method): New.
2832 (find_method_in_superclasses): New.
2833 (find_method_in_interfaces): New.
2834 (lookup_do): Rewrite.
2835 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
2837 * jcf-parse.c (read_class): Save and restore output_class.
2838 * decl.c (java_expand_body): Set output_class from fndecl.
2840 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
2842 * class.c (gen_indirect_dispatch_tables): Fix string length
2845 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2847 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
2848 (java.srcextra): Copy above back to source directory if requested.
2849 (po-generated): Delete reference to $(parsedir).
2850 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
2853 2004-01-14 Jan Hubicka <jh@suse.cz>
2855 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
2858 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2860 * java-tree.h (java_expand_expr): Change prototype.
2861 * expr.c (java_expand_expr): Add alt_rtl parameter.
2863 2004-01-09 Andrew Haley <aph@redhat.com>
2866 * parse.y (java_fix_constructors): Set output_class.
2867 (java_reorder_fields): Likewise.
2868 (java_layout_classes): Likewise.
2869 (java_expand_classes): Generate indirect dispatch tables.
2870 (java_expand_classes): Set output_class.
2871 (java_finish_classes): Likewise.
2872 * lang.c (java_init): Turn on always_initialize_class_p if we're
2873 using indirect dis[atch.
2874 (java_decl_ok_for_sibcall): Use output_class, not current_class.
2875 (java_get_callee_fndecl): Use class local atable.
2877 (always_initialize_class_p): Decl moved to java-tree.h.
2878 (HANDLE_CLASS_INFO): Set output_class.
2879 (read_class): Likewise.
2880 (parse_class_file): Call gen_indirect_dispatch_tables.
2881 (parse_zip_file_entries): Set output_class.
2882 (java_parse_file): Set output_class. Don't emit symbol tables.
2883 * java-tree.h (output_class): New.
2884 Remove global declarations for otable, atable, and ctable.
2885 (always_initialize_class_p): moved here from decl.c.
2887 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
2888 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
2889 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
2890 (struct lang_type): Add otable_methods, otable_decl,
2891 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
2892 ctable_decl, catch_classes, type_to_runtime_map.
2893 * expr.c (build_field_ref): Make otable, atable, and ctable class
2894 local rather than global.
2895 (build_known_method_ref): Likewise.
2896 (build_invokeinterface): Likewise.
2897 (java_expand_expr): Pass runtime type (rather than actual type) to
2899 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
2900 this class. Look up each class in that map to delete duplicates.
2901 (expand_end_java_handler): Pass runtime type (rather than actual
2902 type) to expand_start_catch.
2903 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
2905 (java_init_decl_processing): Rearrange things. Remove global
2906 declarations of otable, atable, and ctable.
2907 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
2908 (java_expand_body): Set output_class.
2909 * constants.c (build_constant_data_ref): Use output_class, not
2911 (alloc_name_constant): Likewise.
2912 * class.c (gen_indirect_dispatch_tables): New.
2913 (build_class_ref): Generate hard reference to superclass, even if
2914 using indirect dispatch.
2915 (build_static_field_ref): Use class local atable.
2916 (make_class_data): Generate hard reference to superclass, even if
2917 using indirect dispatch.
2918 Generate symbolic references to interfaces when using indirect
2920 (make_class_data): Emit otable, atable, and ctable.
2921 Make otable, atable, and ctable class local rather than global.
2922 (emit_catch_table): Make otable, atable, and ctable class local
2925 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
2927 * parse.y (catch_clause_parameter): Fix typo.
2930 * parse.y: (catch_clause_parameter): Return early if $3, aka
2931 formal_parameter, is null.
2933 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
2935 * class.c: Remove uses of "register" specifier in
2936 declarations of arguments and local variables.
2939 * gjavah.c: Likewise.
2940 * jcf-dump.c: Likewise.
2941 * jcf-io.c: Likewise.
2942 * jcf-parse.c: Likewise.
2943 * jcf-write.c: Likewise.
2944 * keyword.h: Likewise.
2945 * parse.y: Likewise.
2946 * typeck.c: Likewise.
2947 * verify.c: Likewise.
2949 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
2951 * Make-lang.in (GCJ_CROSS_NAME): Delete.
2952 (java.install_common, java.install-man): Adjust for above.
2953 (java.uninstall): Likewise.
2955 2003-12-03 Michael Koch <konqueror@gmx.de>
2957 * class.c (make_class_data):
2958 Push field value to 'hack_signers' instead of 'signers'.
2959 * decl.c (java_init_decl_processing):
2960 Push field 'hack_signers' instead of 'signers'.
2962 2003-12-03 Zack Weinberg <zack@codesourcery.com>
2964 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
2967 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
2970 * parse.y (qualify_ambiguous_name): Remove lots of broken
2971 field access processing - there's no need to do that here,
2972 because we have resolve_field_access. Remove
2973 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
2974 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
2977 2003-12-01 Jeff Sturm <jsturm@one-point.com>
2980 * parse.y (java_complete_lhs): Save location prior to patching
2983 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
2986 * resource.c (write_resource_constructor): Append
2987 "_resource" to constructor identifier name.
2989 2003-11-25 Jeff Sturm <jsturm@one-point.com>
2992 * constants.c (cpool_for_class): New function.
2993 (outgoing_cpool): Remove global variable.
2994 (alloc_name_constant): Use cpool_for_class.
2995 (build_constants_constructor): Likewise.
2996 * decl.c (java_expand_body): Set current_class.
2997 * java-tree.h (outgoing_cpool) Remove declaration.
2998 (init_outgoing_cpool): Likewise.
2999 * jcf-parse.c (init_outgoing_cpool): Remove function.
3000 (parse_class_file): Don't call init_outgoing_cpool.
3001 * parse.y (java_complete_expand_methods): Don't call
3002 init_outgoing_cpool. Don't save outgoing_cpool.
3003 (java_expand_classes): Don't restore outgoing_cpool.
3004 (java_finish_classes): Likewise.
3006 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
3008 * Make-lang.in: (java.install-common) Add
3009 symlink for $(target_noncanonical)-gcjh for
3012 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3014 * Make-lang.in (java.extraclean): Delete.
3016 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3018 * Make-lang.in (check-java): Add.
3020 2003-11-19 Jeff Sturm <jsturm@one-point.com>
3023 * except.c (prepare_eh_table_type): Allocate variable-sized
3024 buffer `buf' with alloca.
3026 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3030 decl.c (java_init_decl_processing): Don't initialize
3031 class_not_found_type_node, no_class_def_found_type_node.
3033 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3034 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3035 (class_not_found_type_node, no_class_def_found_type_node):
3038 parse.y (build_dot_class_method_invocation): Add this_class
3039 argument. Qualify method invocations to a different class.
3040 (create_new_parser_context): Initialize saved_data_ctx to 0.
3041 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3042 (build_dot_class_method): Don't load classes. Register
3044 (build_incomplete_class_ref): Special cases for interfaces
3045 and inner classes. Move build_dot_class_method call to here...
3046 (patch_incomplete_class_ref): ...from here. Pass current_class
3047 to build_dot_class_method_invocation.
3048 (build_assertion): Pass class_type to
3049 build_dot_class_method_invocation.
3050 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3052 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3055 * java-tree.h (BLOCK_EMPTY_P): Define.
3056 * parse.y (java_complete_lhs): Check for empty blocks
3057 in TRY_FINALLY_EXPR case.
3059 2003-11-17 Andrew Haley <aph@redhat.com>
3061 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3062 (struct lang_decl_var:freed): New variable.
3063 * decl.c (poplevel): Mark local vars that have gone out of scope.
3064 (push_jvm_slot): Don't use the RTL of a var that has gone out of
3067 2003-11-16 Jason Merrill <jason@redhat.com>
3069 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3070 and TAGS files that include them for each front end.
3072 2003-11-15 Tom Tromey <tromey@redhat.com>
3074 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3076 2003-11-12 Jason Merrill <jason@redhat.com>
3078 PR optimization/12547
3079 * lang.c (java_tree_inlining_walk_subtrees): Just walk
3080 BLOCK_EXPR_BODY directly.
3082 2003-11-12 Andrew Haley <aph@redhat.com>
3085 * parse.y (fold_constant_for_init): Check that we really do have a
3089 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3090 init_test_decls being inlined.
3093 * parse.y (do_resolve_class): Check return value from
3094 breakdown_qualified().
3096 2003-11-11 Tom Tromey <tromey@redhat.com>
3099 * parse.y (merge_string_cste): Handle case where we have a
3100 pointer that happens to be zero, not null_pointer_node.
3102 2003-11-10 Tom Tromey <tromey@redhat.com>
3104 * jcf-parse.c (classify_zip_file): Correctly compare
3105 filename_length against length of manifest file's name.
3107 2003-11-08 Tom Tromey <tromey@redhat.com>
3110 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3112 2003-11-06 Andrew Haley <aph@redhat.com>
3114 * expr.c (java_stack_swap): Make sure destination stack slots are
3115 of the correct type.
3117 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
3119 * Make-lang.in (dvi): Move targets to $(docobjdir).
3120 (gcj.dvi): Simplify rule and adjust target.
3121 (gcj.info): Simplify rule.
3122 (gcj.pod): New intermediate rule.
3123 (gcjh.pod): Likewise.
3124 (jv-scan.pod): Likewise.
3125 (jcf-dump.pod): Likewise.
3126 (gij.pod): Likewise.
3127 (jv-convert.pod): Likewise.
3128 (rmic.pod): Likewise.
3129 (rmiregistry.pod): Likewise.
3132 (jv-scan.1): Delete.
3133 (jcf-dump.1): Delete.
3135 (jv-convert.1): Delete.
3137 (rmiregistry.1): Delete.
3139 2003-11-02 Jeff Sturm <jsturm@one-point.com>
3141 Fixes PR java/12866.
3142 * parse.y (resolve_qualified_expression_name): Move test
3143 for outer field access methods from here...
3144 (check_thrown_exceptions) ...to here.
3146 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
3148 * .cvsignore: Delete.
3150 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
3152 * verify.c (verify_jvm_instructions): Don't warn about legal
3153 eh binding regions generated for example by jdk 1.4.1.
3155 2003-10-24 David S. Miller <davem@redhat.com>
3157 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3159 2003-10-22 Andrew Haley <aph@redhat.com>
3161 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3162 (java_get_callee_fndecl): New.
3164 * jcf-parse.c (java_parse_file): Call emit_catch_table().
3166 * java-tree.h (ctable_decl): New.
3167 (catch_classes): New.
3168 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3170 * decl.c (java_init_decl_processing): Add catch_class_type.
3172 Add catch_classes field.
3174 * class.c (build_indirect_class_ref): Break out from
3176 (make_field_value): Check flag_indirect_dispatch.
3177 (make_class_data): Ditto.
3178 Tidy uses of PUSH_FIELD_VALUE.
3179 Add field catch_classes.
3180 (make_catch_class_record): New.
3182 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3184 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3186 * jcf-write.c: Follow spelling conventions.
3187 * parse.y: Likewise.
3189 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3191 * ChangeLog: Fix typos.
3192 * expr.c: Fix comment typos.
3193 * jcf-write.c: Likewise.
3196 * mangle.c: Likewise.
3197 * parse-scan.y: Likewise.
3198 * parse.y: Likewise.
3200 2003-10-22 Tom Tromey <tromey@redhat.com>
3202 * expr.c (expand_byte_code): Only warn about dead bytecode when
3203 extra_warnings is set.
3205 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
3207 Fix for PR java/12586.
3208 * mangle.c (find_compression_record_match): Don't iterate through
3209 package namespace elements unless they all match compression_table
3212 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
3214 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3215 (generate-manpages): Likewise.
3216 (java.maintainer-clean): Likewise.
3217 (gcj.info): Likewise.
3220 (jv-scan.1): Likewise.
3221 (jcf-dump.1): Likewise.
3223 (jv-convert.1): Likewise.
3225 (rmiregistry.1): Likewise.
3226 (java.install-man): Likewise.
3227 (parse-scan.o): Move and define complete compile line.
3228 (parse.o): Likewise.
3229 (jcf-tree-inline.o): Move.
3231 2003-10-20 Mark Mitchell <mark@codesourcery.com>
3233 * Make-lang.in (info): Update dependencies.
3234 (java.install-info): Remove.
3235 ($(srcdir)/java/gcj.info): Replace with ...
3236 ($(docobjdir)/gcj.info): ... this.
3238 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
3240 * Make-lang.in: Replace uses of $(target_alias) with
3241 $(target_noncanonical).
3243 2003-10-09 Tom Tromey <tromey@redhat.com>
3245 * decl.c (java_init_decl_processing): Declare signers field.
3246 * class.c (make_class_data): Set signers field.
3248 2003-10-09 Jason Merrill <jason@redhat.com>
3250 * parse.y (patch_assignment): Use make_node to create a BLOCK.
3251 * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
3254 2003-10-06 Mark Mitchell <mark@codesourcery.com>
3256 * Make-lang.in (java.info): Replace with ...
3258 (java.dvi): Replace with ...
3260 (java.generated-manpages): Replace with ...
3262 2003-10-03 Kelley Cook <kelleycook@wideopenwest.com>
3264 * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
3266 2003-10-01 Andrew Haley <aph@redhat.com>
3268 * jcf-parse.c (java_parse_file): Write otable and atable.
3269 * java-tree.h (atable_methods): New.
3271 (atable_syms_decl): New.
3272 (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
3273 JTI_ATABLE_SYMS_DECL. Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
3274 (symbol_*type): Rename method_symbol* to symbol*type.
3275 (emit_offset_symbol_table): Delete.
3276 (emit_symbol_table): New.
3277 (get_symbol_table_index): New.
3279 * expr.c (build_field_ref): Handle flag_indirect_dispatch.
3280 (build_known_method_ref): Likewise.
3281 (get_symbol_table_index): Rename from get_offset_table_index.
3282 Parameterize to allow re-use by differing types of symbol table.
3283 (build_invokevirtual): Pass table to get_offset_table_index.
3284 * decl.c (java_init_decl_processing): Push types and decls for
3285 atable and atable_syyms.
3286 * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
3287 (make_class_data): Add new fields atable and atable_syms.
3288 (emit_symbol_table): Rename from emit_offset_symbol_table.
3289 Parameterize to allow re-use by different types of symbol table.
3290 (build_symbol_entry): Renamed from build_method_symbols_entry.
3292 2003-09-30 Roger Sayle <roger@eyesopen.com>
3294 * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
3295 semantics for SAVE_EXPR, by caching the result in a temporary.
3297 2003-09-28 Richard Henderson <rth@redhat.com>
3299 * check-init.c (check_init): Save and restore input_location
3300 instead of file and line separately.
3301 * decl.c (java_expand_body): Likewise.
3302 * jcf-write.c (generate_bytecode_insns): Likewise.
3303 * parse.y (safe_layout_class): Likewise.
3304 * jcf-parse.c (read_class, parse_class_file): Likewise.
3305 (java_parse_file): Use %H for warning locator.
3307 2003-09-28 Roger Sayle <roger@eyesopen.com>
3309 * expr.c (java_check_reference): Use the semantics of COND_EXPRs
3310 with void-type branches instead of using a COMPOUND_EXPR.
3312 2003-09-28 Jeff Sturm <jsturm@one-point.com>
3314 * decl.c (java_optimize_inline, dump_function): Remove.
3315 * java-tree.h (java_optimize_inline): Remove declaration.
3316 * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
3317 * parse.y (source_end_java_method, java_expand_classes):
3318 Likewise. Remove dead code.
3320 2003-09-27 Roger Sayle <roger@eyesopen.com>
3322 * lang.c (java_init_options): Set flag_evaluation_order.
3323 * expr.c (force_evaluation_order): Don't attempt to force
3324 evaluation order of binary operations using save_expr.
3325 * parse.y (java_complete_lhs): No longer need to call
3326 force_evaluation_order when constructing binary operators.
3328 2003-09-27 Alexandre Petit-Bianco <apbianco@redhat.com>
3329 Bryce McKinlay <bryce@mckinlay.net.nz>
3332 * parse.y (not_accessible_field_error): New function.
3333 (resolve_expression_name): Check field access permissions.
3334 (resolve_qualified_expression_name): Use
3335 not_accessible_field_error.
3336 (resolve_qualified_expression_name): Likewise.
3338 2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3340 * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
3342 2003-09-23 Roger Sayle <roger@eyesopen.com>
3344 * jcf-write.c (generate_bytecode_insns): Optimize binary operations
3345 with equal operands without side-effects.
3347 2003-09-22 Jeff Sturm <jsturm@one-point.com>
3349 * decl.c (java_init_decl_processing): Don't emit otable decls
3350 if flag_indirect_dispatch is not set.
3352 2003-09-21 Richard Henderson <rth@redhat.com>
3354 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3357 2003-09-21 Richard Henderson <rth@redhat.com>
3359 * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
3360 resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
3362 2003-09-20 Richard Henderson <rth@redhat.com>
3364 * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
3366 2003-09-18 Roger Sayle <roger@eyesopen.com>
3368 * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
3369 * check-init.c (check_init): Likewise.
3371 2003-09-18 Roger Sayle <roger@eyesopen.com>
3373 * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
3375 2003-09-16 Andrew Haley <aph@redhat.com>
3377 * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
3379 2003-09-17 Ranjit Mathew <rmathew@hotmail.com>
3382 * mangle.c (find_compression_record_match): Skip
3383 over a "6JArray" (the array template mangled string)
3385 (mangle_array_type): Correct minor typo.
3386 (atms): Move definition to the beginning.
3388 2003-09-16 Bryce McKinlay <bryce@mckinlay.net.nz>
3390 * class.c (add_miranda_methods): Ensure super-interfaces are laid
3391 out. Fix for PR java/12254.
3393 2003-09-11 Richard Henderson <rth@redhat.com>
3395 * parse.y (source_end_java_method): Update for new
3396 cgraph_finalize_function argument.
3398 2003-09-09 Richard Henderson <rth@redhat.com>
3400 * parse.y (source_end_java_method): Update call to
3401 cgraph_finalize_function.
3403 2003-09-03 Jeff Sturm <jsturm@one-point.com>
3405 * decl.c (java_expand_body): New function.
3406 * expr.c (build_class_init): Set DECL_IGNORED_P.
3407 * java-tree.h (start_complete_expand_method,
3408 java_expand_body): Declare.
3409 * jcf-parse.c (cgraph.h): Include.
3410 (java_parse_file): Handle flag_unit_at_a_time.
3411 * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
3412 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
3413 (java_estimate_num_insns): Use walk_tree_without_duplicates.
3414 (java_start_inlining): New function.
3415 * parse.h (java_finish_classes): Declare.
3416 * parse.y: Include cgraph.h.
3417 (block): Don't special-case empty block production.
3418 (craft_constructor): Set DECL_INLINE.
3419 (source_end_java_method): Handle flag_unit_at_a_time.
3420 Replace inline code with call to java_expand_body.
3421 (start_complete_expand_method): Remove static modifier.
3422 (java_expand_method_bodies): Patch function tree for
3423 class initialization and/or synchronization as needed.
3424 Don't begin RTL expansion yet.
3425 (java_expand_classes): Check flag_unit_at_a_time before
3426 calling finish_class.
3427 (java_finish_classes): New function.
3428 (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
3429 (patch_assignment): Set DECL_CONTEXT on temporary variable.
3430 (emit_test_initialization): Set DECL_IGNORED_P.
3432 2003-09-03 Roger Sayle <roger@eyesopen.com>
3434 * builtins.c (enum builtin_type): Delete unused enumeration.
3435 * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
3437 2003-08-28 Tom Tromey <tromey@redhat.com>
3439 * gcj.texi (Extensions): Document gcjlib URLs.
3441 2003-08-20 Tom Tromey <tromey@redhat.com>
3443 * gcj.texi (Extensions): Added xref.
3444 (libgcj Runtime Properties): Document
3445 gnu.gcj.runtime.VMClassLoader.library_control.
3447 2003-08-20 Andrew Haley <aph@redhat.com>
3449 * except.c (prepare_eh_table_type): Use new encoding for exception
3450 handlers when using -fno-assume-compiled.
3452 2003-08-13 Tom Tromey <tromey@redhat.com>
3454 * gcj.texi (Invoking gij): Document -X and -?.
3456 2003-08-13 Mohan Embar <gnustuff@thisiscool.com>
3458 * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
3459 GCJH_OBJS, JCFDUMP_OBJS
3460 * win32-host.c: Removed the unnecessary and broken dependency
3463 2003-08-11 Tom Tromey <tromey@redhat.com>
3465 * parse.y (java_check_regular_methods): Typo fixes. Call
3466 check_interface_throws_clauses. Use
3467 check_concrete_throws_clauses.
3468 (check_interface_throws_clauses): New function.
3469 (check_concrete_throws_clauses): New function.
3470 (hack_is_accessible_p): New function.
3471 (find_most_specific_methods_list): Added FIXME.
3472 * typeck.c (lookup_do): Use `flags' argument to decide what to
3474 (lookup_argument_method_generic): New function.
3475 (lookup_argument_method2): Removed.
3476 * jcf.h (ACC_INVISIBLE): New define.
3477 * jcf-write.c (generate_classfile): Skip invisible methods.
3478 * class.c (add_miranda_methods): New function.
3479 (layout_class_methods): Use it.
3480 (get_access_flags_from_decl): Use ACC_INVISIBLE.
3481 * java-tree.h (METHOD_INVISIBLE): New define.
3482 (lang_decl_func) [invisible]: New field.
3483 (lookup_argument_method_generic): Declare.
3484 (SEARCH_INTERFACE): New define.
3485 (SEARCH_SUPER): Likewise.
3486 (SEARCH_ONLY_INTERFACE): Likewise.
3487 (SEARCH_VISIBLE): Likewise.
3488 (lookup_argument_method2): Removed declaration.
3490 2003-08-05 Tom Tromey <tromey@redhat.com>
3492 Fix for PR java/11600:
3493 * parse.y (java_complete_lhs): See whether we're calling a method
3495 (check_thrown_exceptions): Added `is_array_call' argument;
3496 fixed `clone' checking; updated all callers.
3498 2003-08-05 Steven Bosscher <steven@gcc.gnu.org>
3500 * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
3502 2003-08-03 Tom Tromey <tromey@redhat.com>
3504 * java-tree.h (METHOD_TRANSIENT): Removed.
3505 * decl.c (pushdecl): Removed some dead code.
3506 * class.c (get_access_flags_from_decl): Can't have transient
3508 (add_method_1): Can't have a transient method.
3510 2003-07-28 Andreas Jaeger <aj@suse.de>
3512 * jvspec.c: Convert to ISO C90 prototypes.
3514 2003-07-25 Nathan Sidwell <nathan@codesourcery.com>
3516 * decl.c (force_poplevels): Fix warning call.
3518 2003-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
3520 * expr.c (expand_java_field_op): Don't use xxx_with_decl
3521 (expand_java_field_op): Likewise.
3522 * class.c (layout_class_method): Likewise
3523 (emit_register_classes): Likewise.
3524 * decl.c (pushdecl): Likewise.
3525 (poplevel): Likewise.
3526 (force_poplevels): Likewise.
3527 (give_name_to_locals): Likewise.
3528 * check-init.c (check_for_initialization): Likewise.
3530 2003-07-24 Jason Merrill <jason@redhat.com>
3532 * java-tree.h: Move boolean_type_node et al to the back end.
3534 2003-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3536 * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
3539 2003-07-19 Neil Booth <neil@daikokuya.co.uk>
3541 * lang.opt: Don't show -MD_ and -MDD_.
3543 2003-07-18 Neil Booth <neil@daikokuya.co.uk>
3545 * lang-options.h: Remove.
3546 * lang.opt: Add help text.
3548 2003-07-15 Kazu Hirata <kazu@cs.umass.edu>
3550 * expr.c: Remove the last argument to expand_assignment().
3552 2003-07-09 Jan Hubicka <jh@suse.cz>
3554 * java-tree.h (DECL_NUM_STMTS): Rename to...
3555 (DECL_ESTIMATED_INSNS): ... this.
3556 * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
3557 New static functions.
3558 (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
3559 * parser.y (add_stmt_to_compound): Do not account statements.
3561 2003-07-08 Mark Wielaard <mark@klomp.org>
3563 * gcj.texi: CNI now expands to Compiled Native Interface.
3565 2003-07-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3567 * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
3569 2003-07-07 Nathan Sidwell <nathan@codesourcery.com>
3571 * expr.c (expand_byte_code): Adjist emit_line_note call.
3573 2003-07-06 Neil Booth <neil@daikokuya.co.uk>
3575 * lang.c (java_handle_option): Don't handle filenames.
3577 2003-07-02 Zack Weinberg <zack@codesourcery.com>
3579 * jcf-path.c: Don't default-define PATH_SEPARATOR nor
3582 * jcf-write.c: Don't default-define DIR_SEPARATOR.
3583 * jcf.h: Delete COMPARE_FILENAMES definition.
3585 2003-07-02 Neil Booth <neil@daikokuya.co.uk>
3587 * lang.c (java_init_options): Update prototype.
3589 2003-07-01 Nathan Sidwell <nathan@codesourcery.com>
3591 * decl.c (poplevel): Adjust define_label call.
3593 2003-06-27 Zack Weinberg <zack@codesourcery.com>
3595 * gjavah.c (flag_jni): Make non-static.
3596 * parse-scan.y (ctxp): Make non-static.
3598 * class.c (build_method_symbols_entry)
3599 * expr.c (get_offset_table_index)
3600 * jcf-parse.c (jcf_parse):
3601 Mark the definition static, matching the forward declaration.
3603 2003-06-26 Neil Booth <neil@daikokuya.co.uk>
3605 * lang.c (java_handle_option): Don't check for missing arguments.
3607 2003-06-20 Nathan Sidwell <nathan@codesourcery.com>
3609 * class.c (push_class): Use a location_t to save place.
3610 (emit_register_classes): Set input_location. Adjust
3611 expand_function_end call.
3612 * resource.c (write_resource_constructor): Likewise.
3613 * decl.c (end_java_method): Adjust expand_function_end call.
3614 * parse.y (source_end_java_method): Likewise.
3616 2003-06-17 Robert Abeles <rabeles@archaelogic.com>
3618 * lang.c (java_handle_option): Likewise.
3620 2003-06-16 Neil Booth <neil@daikokuya.co.uk>
3622 * lang.c (java_handle_option): Special-casing of optional
3623 joined arguments no longer needed.
3624 * lang.opt: Update switches that take optional argument.
3626 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3628 * lang.opt: Declare Java.
3629 * lang.c (java_init_options): Update.
3631 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
3633 * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
3635 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3637 * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
3638 * lang.c (java_handle_option): -MD and -MMD have an underscore.
3639 * lang.opt: -MD and -MMD have an underscore.
3641 2003-06-14 Nathan Sidwell <nathan@codesourcery.com>
3643 * class.c (emit_register_classes): Adjust init_function_start
3645 * decl.c (complete_start_java_method): Likewise.
3646 * resource.c (write_resource_constructor): Likewise.
3648 2003-06-14 Neil Booth <neil@daikokuya.co.uk>
3650 * Make-lang.in: Update to use options.c and options.h.
3651 * lang.c: Include options.h not j-options.h.
3652 (java_handle_option): Abort on unrecognized option.
3653 (java_init_options): Request Java switches.
3655 2003-06-11 Neil Booth <neil@daikokuya.co.uk>
3657 * Make-lang.in: Handle mostlyclean.
3659 2003-06-11 Tom Tromey <tromey@redhat.com>
3661 * lang.c (java_handle_option): Update dependency_tracking for
3664 * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
3667 2003-06-10 Andrew Haley <aph@redhat.com>
3669 * resource.c (write_resource_constructor): Use expand_expr to
3670 generate the address of the label attached to a resource.
3671 * Make-lang.in (java/resource.o): Add expr.h
3673 2003-06-10 Andrew Haley <aph@redhat.com>
3675 * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
3676 (java_decl_ok_for_sibcall): New.
3678 2003-06-09 Neil Booth <neil@daikokuya.co.uk>
3680 * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
3681 (java/j-options.c, java/j-options.h): New.
3682 * java-tree.h (resource_name, compile_resource_file,
3683 compile_resource_data): Constify.
3684 * jcf-write.c (jcf_write_base_directory): Similarly.
3685 * jcf.h (jcf_write_base_directory): Similarly.
3686 * lang.c: Include j-options.h.
3687 (cl_options_count, cl_options, string_option, java_decode_option,
3688 lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
3689 process_option_with_no): Remove.
3690 (resource_name): Constify.
3691 (LANG_HOOKS_HANDLE_OPTION): Override.
3692 (java_handle_option): New.
3693 (java_init): Don't call jcf_path_init.
3694 (java_init_options): Call jcf_path_init.
3696 * resource.c (compile_resource_data, compile_resource_file): Constify.
3698 2003-06-09 Nathan Sidwell <nathan@codesourcery.com>
3700 * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
3701 (struct lang_decl_func): Add last_line field.
3702 * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
3703 DECL_SOURCE_LINE_LAST): Remove.
3704 * parse.y (missing_return_error, finish_method_declaration,
3705 lookup_cl, start_artificial_method_body, source_end_java_method,
3706 start_complete_expand_method): Adjust.
3708 2003-06-08 Tom Tromey <tromey@redhat.com>
3710 * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
3711 fno-assume-compiled.
3713 2003-06-08 Roger Sayle <roger@eyesopen.com>
3715 * builtins.c (define_builtin_type, builtin_types): Delete.
3716 (define_builtin): Rewritten to take just the built-in code,
3717 the function's name, type and fallback library function name.
3718 All built-ins used by Java are implicit and BUILT_IN_NORMAL.
3719 (initialize_builtins): Overhaul to define the GCC builtins
3720 used by gcj manually, providing the Java run-time's
3721 implementations as the fallback library function.
3723 2003-06-08 Anthony Green <green@redhat.com>
3725 * parse.y (patch_cast): Fix conversions from floating-point to
3728 2003-06-08 Neil Booth <neil@daikokuya.co.uk>
3730 * Make-lang.in: Update.
3731 * lang.c: Include opts.h. Define cl_options_count and cl_options.
3733 2003-06-07 Neil Booth <neil@daikokuya.co.uk>
3735 * lang.c (java_init_options): Update.
3737 2003-06-05 Jan Hubicka <jh@suse.cz>
3739 * Make-lang.in: Add support for stageprofile and stagefeedback
3741 2003-05-31 Roger Sayle <roger@eyesopen.com>
3743 * lang.c (java_init_options): Prescribe wrap-around two's
3744 complement arithmetic overflow by setting flag_wrapv.
3746 2003-05-29 Roger Sayle <roger@eyesopen.com>
3748 * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
3749 (builtin_record): Add an additional builtin_code field to
3750 record which GCC built-in corresponds to the Java function.
3751 (java_builtins): Add new entries for atan, atan2, exp, log,
3753 (max_builtin, min_builtin, abs_builtin): Perform constant
3754 folding on the resulting tree.
3755 (java_build_function_call_expr): Likewise, perform constant
3756 folding on the resulting tree.
3757 (initialize_builtins): The NULL creators are now allowed in
3758 the java_builtins table, which is now terminated by an entry
3759 with builtin_code == END_BUILTINS.
3760 (check_for_builtin): Likewise. If the matching creator is
3761 NULL, construct the call using java_build_function_call_expr
3762 directly with the decl for the corresponding builtin_code.
3764 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
3766 * win32-host.c: Normalize copyright boilerplate.
3768 2003-05-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3770 * parse.y (print_int_node): Use string concatentation on
3771 HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
3772 function calls into one.
3774 2003-05-13 Zack Weinberg <zack@codesourcery.com>
3776 * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
3777 fatal_io_error with calls to fatal_error; add ": %m" to the end of
3778 all the affected error messages.
3780 2003-05-13 Richard Henderson <rth@redhat.com>
3782 * class.c (layout_class_method): Set DECL_EXTERNAL.
3783 * decl.c (java_mark_decl_local, java_mark_class_local): New.
3784 * java-tree.h (java_mark_class_local): Declare.
3785 * jcf-parse.c (parse_class_file): Use it.
3786 * parse.y (java_expand_classes): Likewise.
3788 2003-05-04 Nathan Sidwell <nathan@codesourcery.com>
3790 * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
3791 * lex.h: #include input.h.
3792 * jv-scan.c (input_filename): Remove.
3794 2003-05-02 Tom Tromey <tromey@redhat.com>
3797 * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
3798 (handle_inner_classes): New function.
3800 2003-05-01 Tom Tromey <tromey@redhat.com>
3803 * parse.y (finish_for_loop): Do nothing if update expression is a
3804 EXPR_WFL_NODE wrapping nothing.
3805 (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
3807 2003-05-02 Nathan Sidwell <nathan@codesourcery.com>
3809 * lex.h (input_lineno): Remove declaration.
3810 * parse-scan.y: #include input.h.
3811 (input_filename): Remove declaration.
3812 (input_location): Add definition.
3813 (input_line): Remove definition.
3815 2003-05-01 Nathan Sidwell <nathan@codesourcery.com>
3817 * lex.h (lineno): Rename to ...
3818 (input_line): ... here
3819 * parse-scan.y (lineno): Rename to ...
3820 (input_line): ... here.
3821 (reset_report): Rename lineno to input_line.
3822 * check-init.c (check_init): Likewise.
3823 * class.c (push_class): Likewise.
3824 * decl.c (complete_start_java_method, end_java_method): Likewise.
3825 * expr.c (expand_byte_code): Likewise.
3826 * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
3827 * jcf-write.c (generate_bytecode_insns): Likewise.
3828 * lex.c (java_init_lex, java_allocate_new_line,
3829 do_java_lex): Likewise.
3830 * parse.h (YYNOT_TWICE): Likewise.
3831 * parse.y (empty_statement, expression_statement,
3832 java_pop_parser_context, java_parser_context_save_global,
3833 yyerror, register_fields, method_header, safe_layout_class,
3834 find_in_imports_on_demand, create_artificial_method,
3835 source_end_java_method, start_complete_expand_method,
3836 build_thisn_assign, java_complete_lhs,
3837 maybe_absorb_scoping_block): Likewise.
3839 2003-04-20 Mohan Embar <gnustuff@thisiscool.com>
3841 * jcf-io.c (find_class): use DIR_SEPARATOR instead of
3842 '/' when computing java source filename
3844 2003-04-13 Tom Tromey <tromey@redhat.com>
3846 * gjavah.c (print_c_decl): Indentation fix.
3848 2003-04-12 Zack Weinberg <zack@codesourcery.com>
3850 * class.c (make_field_value, make_method_value, get_dispatch_table)
3851 (make_class_data, emit_offset_symbol_table)
3852 * constants.c (build_constants_constructor)
3853 * java-tree.h (START_RECORD_CONSTRUCTOR)
3854 * parse.y (maybe_build_array_element_wfl):
3855 Use build_constructor.
3857 2003-04-10 Eric Blake <ebb9@email.byu.edu>
3860 * parse.y (string_convert_int_cst): Always use at least one digit
3861 in string conversion. Remove ASCII dependence.
3862 (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
3864 2003-03-16 Mohan Embar <gnustuff@thisiscool.com>
3866 * Make-lang.in: added win32-host.c
3867 * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
3868 resolves to open() on non-Win32 platforms and
3869 Win32-specific jcf_open_exact_case() on Win32
3870 * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
3871 when trying .java and .class files
3872 * win32-host.c: added to repository. Defines
3873 Win32-specific jcf_open_exact_case()
3875 2003-04-10 Andrew Haley <aph@redhat.com>
3877 * jcf-write.c (struct jcf_partial): num_jsrs: new field.
3878 (maybe_free_localvar): Renamed from localvar_free.
3879 Add new arg, really.
3880 (generate_bytecode_insns): Set new variable, jsrs.
3881 Only free local vars if no jsr insns have been emittted.
3882 Call maybe_free_localvar, not localvar_free.
3884 2003-03-30 Joseph S. Myers <jsm@polyomino.org.uk>
3886 * gcj.texi: Remove @ at start of file.
3888 2003-03-25 Tom Tromey <tromey@redhat.com>
3890 * parse.y (create_interface): Call CHECK_DEPRECATED.
3892 2003-03-23 Zack Weinberg <zack@codesourcery.com>
3894 * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
3896 2003-03-21 Zack Weinberg <zack@codesourcery.com>
3898 * javaop.h (jfloat, jdouble): Make them structures mirroring
3899 the bit fields of IEEE float and double respectively.
3900 (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
3901 JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
3902 (union Word, union DWord): Delete.
3903 (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
3905 * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
3906 D_NAN_MASK): Delete.
3907 (jni_print_float, jni_print_double): New. Generate
3908 hexadecimal floating constants.
3909 (print_field_info): Use jni_print_float/double.
3911 * jcf-dump.c: Include math.h. Use ldexp/frexp to assemble
3912 finite floating point numbers for output; special case
3915 2003-03-19 Nathanael Nerode <neroden@gcc.gnu.org>
3917 * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
3918 Replace 0 and 1 with true and false in return statements.
3920 2003-03-19 Tom Tromey <tromey@redhat.com>
3922 * lex.c (do_java_lex): Renamed from java_lex.
3923 (java_lex): New function.
3926 2003-03-13 Tom Tromey <tromey@redhat.com>
3928 * parse.y (resolve_inner_class): Error if qualifier is a primitive
3931 2003-03-04 Andrew Haley <aph@redhat.com>
3933 * gjavah.c (is_first_data_member): New global variable.
3934 (print_c_decl): If it's the first data member, align it as the
3936 (process_file): Set is_first_data_member.
3938 2003-03-11 Tom Tromey <tromey@redhat.com>
3940 * parse.y (resolve_field_access): Initialize class if field is
3941 found in another static field.
3942 * expr.c (build_class_init): Don't optimize out initialization of
3943 implemented interface.
3945 2003-03-11 Andrew Haley <aph@redhat.com>
3947 * jcf-io.c (caching_stat): Initialize origsep to remove compiler
3950 2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
3952 * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
3953 and DIR_SEPARATOR_2 for a target.
3954 Correct minor typos.
3956 * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
3957 and DIR_SEPARATOR_2 for a target into account.
3959 2003-03-08 Neil Booth <neil@daikokuya.co.uk>
3961 * lang.c (java_init): Update prototype, move code to java_post_options.
3962 (java_post_options): Similarly.
3964 2003-03-05 Ranjit Mathew <rmathew@hotmail.com>
3966 * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
3967 compare file name components depending on the case-sensitivity
3968 or otherwise of the host file system.
3970 * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
3971 "strcmp" to compare file name components.
3972 Use IS_DIR_SEPARATOR instead of comparing directly against
3974 (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
3975 comparing directly against DIR_SEPARATOR.
3977 2003-03-04 Tom Tromey <tromey@redhat.com>
3979 * Make-lang.in (java.tags): New target.
3981 2003-03-01 Roger Sayle <roger@eyesopen.com>
3983 * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
3984 (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
3986 2003-03-01 Tom Tromey <tromey@redhat.com>
3988 * parse.y (jdep_resolve_class): Only check deprecation if we found
3991 2003-02-28 Tom Tromey <tromey@redhat.com>
3994 * class.c (maybe_layout_super_class): Always pass a WFL to
3996 * parse.y (do_resolve_class): Updated comment to explain
3999 2003-02-26 Tom Tromey <tromey@redhat.com>
4001 * jcf-write.c (generate_classfile): Check whether class is
4002 deprecated before writing attribute count.
4004 2003-02-25 Roger Sayle <roger@eyesopen.com>
4006 * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
4007 built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
4009 2003-02-23 Tom Tromey <tromey@redhat.com>
4011 * lang-options.h: Added -Wdeprecated.
4012 * gcj.texi (Warnings): Document -Wdeprecated.
4013 * java-tree.h (flag_deprecated): Declare.
4014 * lang.c (lang_W_options): Added deprecated.
4015 (flag_deprecated): New global.
4016 * chartables.h: Rebuilt.
4017 * gen-table.pl (process_one): Look at whitespace.
4018 (print_tables): Define LETTER_SPACE, LETTER_MASK.
4019 * parse.h (CLEAR_DEPRECATED): New macro.
4020 (CHECK_DEPRECATED_NO_RESET): New macro.
4021 * jcf-parse.c (handle_deprecated): New function.
4022 (HANDLE_DEPRECATED_ATTRIBUTE): New define.
4023 * jcf-reader.c (get_attribute): Handle Deprecated attribute.
4024 * parse.y (resolve_type_during_patch): Check deprecation.
4025 (jdep_resolve_class): Likewise.
4026 (process_imports): Likewise.
4027 (resolve_expression_name): Likewise.
4028 (check_deprecation): Strip arrays from decl. Check
4030 (patch_method_invocation): Also check the particular constructor
4032 (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
4033 * jcf-write.c (append_deprecated_attribute): New function.
4034 (generate_classfile): Generate deprecated attribute when
4036 * lex.c (java_parse_doc_section): Return type now void. Rewrote.
4037 (java_lex) [case '*']: Simplify logic.
4038 (java_start_char_p): Use LETTER_MASK.
4039 (java_part_char_p): Likewise.
4040 (java_space_char_p): New function.