1 2005-06-13 Geoffrey Keating <geoffk@apple.com>
3 * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
5 2005-06-13 Per Bothner <per@bothner.com>
7 * expr.c (int highest_label_pc_this_method,
8 start_label_pc_this_method): New globals.
9 (lookup_label): Add start_label_pc_this_method to pc for label, and
10 update highest_label_pc_this_method. This prevents conflicts between
11 labels from different methods.
12 * java-tree.h: Declare new globals.
13 * jcf-parse.c (parse_class_file): If needed bump
14 start_label_pc_this_method and reset highest_label_pc_this_method.
16 2005-06-13 Tom Tromey <tromey@redhat.com>
19 * parse.y (nested_field_access_p): Handle case where outer field
20 is inherited by enclosing class.
22 2005-06-12 Per Bothner <per@bothner.com>
24 * class.c (inherits_from_p): Do load_class if needed.
26 2005-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
28 * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
29 * java-tree.h (parse_error_context): Move...
30 * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
31 * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
32 * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
34 2005-06-08 Roger Sayle <roger@eyesopen.com>
36 * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
38 2005-06-06 Jakub Jelinek <jakub@redhat.com>
40 * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
41 msgid for argument name.
42 * gjavah.c (error): Likewise.
43 * java-tree.h (parse_error_context): Likewise.
44 * parse.y (parse_error_context, parse_warning_context,
45 issue_warning_error_from_context): Likewise.
47 2005-06-01 Tom Tromey <tromey@redhat.com>
50 * class.c (build_static_field_ref): Don't fold constant fields if
51 current class is from a .class file and we're using indirect
54 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
56 * java/verify-glue.c: Don't include errors.h and include toplev.h.
57 * java/Make-lang.in: Updates dependencies.
59 2005-05-26 Ranjit Mathew <rmathew@hotmail.com>
62 * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
63 NESTED_FIELD_ACCESS_IDENTIFIER_P.
64 (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
65 (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
66 * jcf-write.c (generate_classfile): Use
67 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
68 OUTER_FIELD_ACCESS_IDENTIFIER_P.
69 * parse.y (build_outer_field_access): Rename to
70 build_nested_field_access. Support static fields and outer-to-inner
72 (outer_field_access_p): Rename to nested_field_access_p. Support
73 static fields and generalise to outer-to-inner class and sibling
75 (outer_field_expanded_access_p): Rename to
76 nested_field_expanded_access_p and support static fields.
77 (outer_field_access_fix): Rename to nested_field_access_fix and
78 support static fields.
79 (build_outer_field_access_expr): Rename to
80 build_nested_field_access_expr and support static fields.
81 (build_outer_field_access_methods): Rename to
82 build_nested_field_access_methods and support static fields. For
83 static fields, generate accessors without class instance parameters.
84 (build_outer_field_access_method): Rename to
85 build_nested_field_access_method and support static fields.
86 (build_outer_method_access_method): Use
87 NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
88 OUTER_FIELD_ACCESS_IDENTIFIER_P.
89 (resolve_expression_name): Consider static field accesses across
91 (resolve_qualified_expression_name): Likewise.
92 (java_complete_lhs): Use nested_field_access_fix instead of
93 outer_field_access_fix.
94 (patch_unary_op): Rename outer_field_flag to nested_field_flag.
95 Use nested_field_expanded_access_p instead of
96 outer_field_expanded_access_p. Use nested_field_access_fix instead
97 of outer_field_access_fix.
98 (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
99 instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
101 2005-05-26 Bryce McKinlay <mckinlay@redhat.com>
103 * decl.c (GCJ_BINARYCOMPAT_ADDITION,
104 GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
105 (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
106 MINOR_BINARYCOMPAT_ABI_VERSION): New.
107 (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
108 (parse_version): Calculate version ID using new method. Use bit-flags
109 for flag_indirect_dispatch and flag_bootstrap_classes.
111 2005-05-25 Richard Henderson <rth@redhat.com>
114 * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
115 * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
116 DECL_CONTEXT; avoid pushdecl_top_level.
117 (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
118 (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
119 (layout_class_method): Likewise.
120 * decl.c (java_mark_cni_decl_local): New.
121 (java_mark_class_local): Use it.
122 * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
123 (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
124 (struct lang_decl_func): Add local_cni;
125 (struct lang_decl_var): Add class_field, vtable.
126 (java_mangle_decl): Declare.
127 * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
128 * mangle.c: Remove dup obstack.h; include langhooks-def.h.
129 (mangle_obstack_1): New.
130 (java_mangle_decl): Remove obstack argument. Call mangle_class_field,
131 mangle_vtable, and mangle_local_cni_method_decl. Fall back to
132 lhd_set_decl_assembler_name for things that don't need mangling.
133 (mangle_class_field): Rename from java_mangle_class_field, make
134 static, don't call init_mangling or finish_mangling.
135 (mangle_vtable): Similarly.
136 (mangle_local_cni_method_decl): New.
137 (init_mangling): Remove obstack argument. Use &mangle_obstack_1,
138 gcc_assert, and MANGLE_RAW_STRING.
139 (finish_mangling): Use gcc_assert, remove if 0 debugging code.
141 2005-05-25 DJ Delorie <dj@redhat.com>
143 * class.c (set_constant_value): Move warning control from if() to
146 2005-05-24 Richard Henderson <rth@redhat.com>
148 * builtins.c (define_builtin): Don't call make_decl_rtl.
149 * constants.c (build_constant_data_ref): Likewise.
150 * class.c (build_utf8_ref): Likewise.
151 (build_fieldref_cache_entry, build_static_field_ref): Likewise.
152 (get_dispatch_table, layout_class_method): Likewise.
153 (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
155 (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
156 (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
157 to determine if we need a non-zero address.
158 * decl.c (builtin_function): Don't call make_decl_rtl.
159 (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
160 * expr.c (build_known_method_ref): Don't call make_decl_rtl.
161 * resource.c (compile_resource_data): Likewise.
162 * parse.y (resolve_field_access): Re-word comment to avoid
165 2005-05-24 Richard Henderson <rth@redhat.com>
167 * class.c (registered_class): Take it out of class_roots; turn into
169 (register_class): Make static. Don't duplicate decl node. Use
171 (emit_register_classes): Use VEC_iterate. Use output_constant
172 instead of assemble_integer. Don't call mark_decl_referenced
174 * java-tree.h (register_class): Remove decl.
176 2005-05-19 Paolo Bonzini <bonzini@gnu.org>
180 * parse.y (register_package, package_list): Remove.
181 (package_declaration): Do not call register_package.
182 (do_resolve_class): Do not use package_list.
184 2005-05-15 Gerald Pfeifer <gerald@pfeifer.com>
186 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
189 2005-05-15 Tom Tromey <tromey@redhat.com>
192 * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
195 2005-05-12 Aaron Luchko <aluchko@redhat.com>
197 * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
199 2005-05-11 Tom Tromey <tromey@redhat.com>
201 * gcj.texi (Code Generation): Document -fbootstrap-classes.
202 * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
203 (parse_version): Use it.
204 * lang.opt (-fbootstrap-classes): New option.
206 2005-05-10 Paolo Bonzini <bonzini@gnu.org>
209 * class.c (maybe_layout_super_class): Look for imports in this_class.
210 * parse.h (ctxp_for_generation_last): New.
211 (do_resolve_class): Add a parameter.
212 * parse.y (ctxp_for_generation_last): New.
213 (java_pop_parser_context): Add at end of list.
214 (find_in_imports, find_in_imports_on_demand): Look in ctxp
215 if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
216 the given type are NULL.
217 (do_resolve_class): Look into the imports of the new second parameter.
218 Adjust recursive calls.
219 (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
220 calls to do_resolve_class.
221 (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
222 (java_complete_class): Do not do that here.
224 2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
227 * Make-lang.in (java): Add gjnih.
228 (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
229 (GJNIH_OBJS): New variable.
230 (gjnih$(exeext)): New target.
231 (JAVA_MANFILES): Add gjnih.1.
232 (java.uninstall): Add gjnih.1.
233 (java.mostlyclean): Add gjnih.
234 (java.maintainer-clean): Add gjnih.1.
235 (java/gjavah-jni.o): New target.
236 (.INTERMEDIATE): Add gjnih.pod.
237 (gjnih.pod): New target.
238 * config-lang.in (stagestuff): Add gjnih.
239 * gcj.texi (Top): Add gjnih node.
240 (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
241 -bootclasspath options.
242 (Invoking gjnih): New node.
243 * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
244 (TOOLNAME): New macro.
245 (error): Replace hard-coded gcjh with TOOLNAME.
246 (process_file): Likewise.
249 (help): Likewise. Add help output for -force, -old, -trace and -J
251 (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
252 (options): Add force, old, trace and J fields.
253 (main): Handle -force, -old, -trace and -J options.
255 2005-05-03 Tom Tromey <tromey@redhat.com>
258 * gjavah.c (main): Unlink output file on error.
260 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
262 * constants.c, jvgenmain.c, lang.opt, resource.c: Update
265 2005-04-29 Tom Tromey <tromey@redhat.com>
267 * expr.c (build_jni_stub): Updated for change to build_block.
269 2005-04-29 Andrew Pinski <pinskia@gcc.gnu.org>
271 * expr.c (force_evaluation_order): Declare 'saved' earlier.
273 2005-04-28 Andrew Haley <aph@redhat.com>
276 * java-tree.h (soft_resolvepoolentry_node): New.
277 (alloc_constant_fieldref): Declare.
278 * expr.c (expand_java_field_op): Don't call class_init for
279 accesses to static fields with indirect dispatch.
280 * builtins.c (initialize_builtins): Add "__builtin_expect".
281 * decl.c (soft_resolvepoolentry_node): New variable.
282 (java_init_decl_processing): Create a decl for
283 "_Jv_ResolvePoolEntry".
284 * class.c (build_fieldref_cache_entry): New function.
285 (build_static_field_ref): Rewrite for indirect dispatch.
286 * constants.c (find_name_and_type_constant_tree): New function.
287 (alloc_constant_fieldref): Likewise.
288 (build_constants_constructor): Handle CONSTANT_Fieldref and
289 CONSTANT_NameAndType.
292 * expr.c (force_evaluation_order): Convert outgoing args smaller
295 2005-04-27 Bryce McKinlay <mckinlay@redhat.com>
297 * gcj.texi (libgcj Runtime Properties): Remove obsolete
298 gnu.gcj.runtime.NameFinder.* system properties. Update documentation
299 for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
301 2005-04-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
303 * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
304 to `unlock_stream' with `unlock_std_streams'.
306 2005-04-25 Jakub Jelinek <jakub@redhat.com>
308 * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
309 instead of just expr.h.
311 2005-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
313 * gjavah.c (main): Unlock the stdio streams.
314 * jcf-dump.c (main): Likewise.
315 * jv-scan.c (main): Likewise.
316 * jvgenmain.c (main): Likewise.
318 2005-04-23 DJ Delorie <dj@redhat.com>
320 * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
321 parse.y: Adjust warning() callers.
323 2005-04-21 Bryce McKinlay <mckinlay@redhat.com>
325 * gcj.texi (Object fields): Change "Integer" to "Int" in example
328 2005-04-20 Bryce McKinlay <mckinlay@redhat.com>
330 * gcj.texi: Fix typos and bogus example.
332 2005-04-19 Kazu Hirata <kazu@cs.umass.edu>
334 * except.c: Fix a comment typo.
336 2005-04-19 Julian Brown <julian@codesourcery.com>
338 * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
339 indirect dispatch with PIC.
341 2005-04-18 Andrew Haley <aph@redhat.com>
343 * java-except.h (struct eh_range.handler): Remove unused field.
344 (handle_nested_ranges): Remove function declaration.
345 (sanity_check_exception_range): Add function declaration.
346 * verify.c (verify_jvm_instructions): Remove call to
347 handle_nested_ranges.
348 * verify-glue.c (verify_jvm_instructions_new): Call
349 sanity_check_exception_range.
350 * except.c (link_handler, eh_range_freelist, link_handler,
351 handle_nested_ranges): Remove.
352 (add_handler): Rewrite.
353 (sanity_check_exception_range): New function.
354 (print_ranges): New function.
356 2005-04-13 Julian Brown <julian@codesourcery.com>
358 * decl.c (finish_method): Give methods once-only linkage.
360 2005-04-11 Richard Sandiford <rsandifo@redhat.com>
362 * lang.opt: Refer to the GCC internals documentation instead of c.opt.
364 2005-04-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
366 * java-tree.h: Don't use PARAMS().
368 2005-04-07 Per Bothner <per@bothner.com>
370 * class.c (push_class): By default, suppress debug output.
371 (finish_class): Enable debug output for classes we're emitting.
373 2005-04-07 Andrew Haley <aph@redhat.com>
375 * gcj.texi: Correct gcj-dbtool instructions.
377 2005-04-04 Kazu Hirata <kazu@cs.umass.edu>
379 * gcj.texi: Fix a typo.
380 * lang.c: Fix a comment typo.
382 2005-04-01 Thomas Fitzsimmons <fitzsim@redhat.com>
384 * gcj.texi (Invoking gij): Add descriptions of new -X options.
385 Mention recognized-and-ignored compatibility options.
386 (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
388 (About CNI): Add Memory allocation section.
390 2005-04-01 Tom Tromey <tromey@redhat.com>
392 * decl.c (java_init_decl_processing): Fix types of
393 _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
394 _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
395 _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
397 2005-03-31 Jan Hubicka <jh@suse.cz>
399 * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
400 * class.c: Include cgraph.h
401 (make_local_functoin_alias): Mark aslias as needed.
402 * resource.c: Include cgraph.h
403 (compile_resource_data): Go via cgraph interface.
405 2005-03-30 Ian Lance Taylor <ian@airs.com>
407 * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
409 2005-03-30 Tom Tromey <tromey@redhat.com>
411 * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
412 inner_class_info_index==0 or outer_class_info_index==0.
414 2005-03-29 Tom Tromey <tromey@redhat.com>
416 * gcj.texi (libgcj Runtime Properties): Document
417 gnu.gcj.runtime.endorsed.dirs.
419 2005-03-24 Anthony Green <green@redhat.com>
421 * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
424 2005-03-23 Tom Tromey <tromey@redhat.com>
426 * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
427 (parse_version): Use it.
429 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
431 * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
433 2005-03-18 Andrew Haley <aph@redhat.com>
436 * decl.c (update_aliases): Don't update variables that are about
438 (maybe_poplevels): Add comment.
440 2005-03-17 Bryce McKinlay <mckinlay@redhat.com>
443 * jcf-parse.c (duplicate_class_warning): New function.
444 (java_parse_file): Call duplicate_class_warning if
445 CLASS_FROM_CURRENTLY_COMPILED_P is already set.
446 (parse_zip_file_entries): Likewise. Also set
447 CLASS_FROM_CURRENTLY_COMPILED_P.
449 2005-03-16 Andrew Haley <aph@redhat.com>
451 * expr.c (expand_java_arrayload): Don't generate a
452 NullPointerException based on the type of the node.
453 (build_java_array_length_access): Likewise.
455 2005-03-15 Zack Weinberg <zack@codesourcery.com>
457 * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
459 2005-03-11 Tom Tromey <tromey@redhat.com>
461 * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
462 (libgcj Runtime Properties): Document the default .db.
464 2005-03-10 Ranjit Mathew <rmathew@hotmail.com>
467 * parse.y (checks_throws_clauses): Check exceptions list even when
468 the base class does not come from a source file being compiled.
469 (java_complete_lhs): Remove unused variable 'wfl'.
471 2005-03-09 Ranjit Mathew <rmathew@hotmail.com>
474 * decl.c (finish_method): Emit _Jv_InitClass for private static
475 methods inside inner classes as well.
477 2005-03-08 Julian Brown <julian@codesourcery.com>
478 * Revert patch from 2005-03-08 for causing bootstrap failure on
481 2005-03-08 Julian Brown <julian@codesourcery.com>
483 * decl.c (finish_method): Give methods once-only linkage.
485 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
487 * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
489 2005-03-07 Bryce McKinlay <mckinlay@redhat.com>
491 * verify-glue.c (vfy_is_assignable_from): Perform static check using
492 can_widen_reference_to if the C++ ABI is in use.
493 (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
494 * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
495 type_isresolved, init_state, set_pc, state_get_pc,
496 _Jv_BytecodeVerifier): Clean up unused and disabled functions.
497 (verify_fail): Report the current PC from the verifier context.
498 (free_state): Remove #if 0 block to enable this function.
499 (free_verifier_context): Call free_state on state_list iterator
500 values before freeing them.
501 * expr.c (pop_type_0): Pop correct type for error message when stack
502 contains a multi-word type.
504 2005-03-07 Ranjit Mathew <rmathew@hotmail.com>
506 * expr.c (build_java_array_length_access): Remove !flag_new_verifier
507 for known NULL array length access.
509 2005-03-07 Tom Tromey <tromey@redhat.com>
511 * gcj.texi (Invoking gcj-dbtool): Document '-f'.
513 2005-03-06 Kazu Hirata <kazu@cs.umass.edu>
515 * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
516 typeck.c: Update copyright.
518 2005-03-06 Ranjit Mathew <rmathew@hotmail.com>
521 * xref.c, xref.h: Remove file.
522 * Make-lang.in (java/xref.o): Remove.
523 * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
524 * lang.c (flag_emit_xref): Remove definition.
525 * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
526 * typeck.c (convert): Remove use of do_not_fold.
527 * parse.y (do_not_fold): Remove definition.
528 (parser grammar): Remove xref code.
529 (maybe_create_class_interface_decl, create_class): Likewise.
530 (register_fields, method_header, finish_method_declaration): Likewise.
531 (declare_local_variables, source_end_java_method): Likewise.
532 (java_complete_expand_classes): Do not set do_not_fold.
533 (java_complete_expand_method): Remove xref code.
534 (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
535 (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
536 (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
537 (patch_synchronized_statement, patch_throw_statement): Likewise.
538 (maybe_build_class_init_for_field): Likewise.
540 2005-03-05 Kazu Hirata <kazu@cs.umass.edu>
542 * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
543 instead of IS_NON_TYPE_CODE_CLASS.
545 2005-03-04 Andrew Haley <aph@redhat.com>
548 * class.c (set_method_index): Don't set method_index if it is
550 (layout_class_method): Don't complain about "non-static method foo
551 overrides static method" in the case of indirect dispatch.
553 2005-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
555 * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
557 * Make-lang.in: Don't elide warnings in jcf-io.c.
559 2005-03-01 Per Bothner <per@bothner.com>
562 * check-init.c (wfl): Remove static.
563 (final_assign_error, check_init): Replace calls to parse_error_context
565 (check_init): Save, set, and restore input_location for each exp.
567 2005-03-01 Per Bothner <per@bothner.com>
569 * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
570 if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
571 * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
573 2005-03-01 Per Bothner <per@bothner.com>
575 * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
577 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
580 * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
583 2005-02-22 Tom Tromey <tromey@redhat.com>
586 * verify-impl.c (EITHER): New define.
587 (types_compatible): Handle it.
588 (check_field_constant): Use it.
590 2005-02-18 Tom Tromey <tromey@redhat.com>
593 * verify-impl.c (types_equal): Fixed test.
596 * verify-glue.c (vfy_class_has_field): New function.
597 * verify.h (vfy_class_has_field): Declare.
598 * verify-impl.c (check_field_constant): Added 'putfield'
600 (verify_instructions_0): Updated.
601 (types_equal): New function.
603 2005-02-14 Tom Tromey <tromey@redhat.com>
606 * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
607 stack effect of multianewarray.
609 2005-02-14 Andrew Haley <aph@redhat.com>
612 * expr.c (expand_byte_code): Call promote_arguments().
613 (promote_arguments): New function.
614 * decl.c (check_local_unnamed_variable): Remove special case for
616 (find_local_variable): Promote all boolean types to int
617 when searching for local variable decls.
619 2005-02-12 Kazu Hirata <kazu@cs.umass.edu>
621 * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
622 parse-scan.y: Update copyright.
624 2005-02-11 Per Bothner <per@bothner.com>
627 * parse-scan.y (input_location): Remove variable.
628 (main_input_filename): New - replaces input_filename, which isn't
629 settable if USE_MAPPED_LOCATION.
630 * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
631 so we don't reference input_location or wfl_operator in that case.
632 * jv-scan.c (expand_location): Remove - no longer used.
633 (main): Set main_input_filename rather than input_filename.
635 2005-02-09 Richard Henderson <rth@redhat.com>
637 * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
638 * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
640 2005-02-08 Marcin Dalecki <martin@dalecki.de>
642 * expr.c (add_type_assertion): Use the proper enumeration type,
643 since this is what htab_find_slot() is expecting.
645 2005-02-06 Joseph S. Myers <joseph@codesourcery.com>
647 * gcj.texi: Update copyright dates.
649 2005-02-02 Tom Tromey <tromey@redhat.com>
651 * gcj.texi (libgcj Runtime Properties): Default library_control
654 2005-02-02 Ranjit Mathew <rmathew@hotmail.com>
657 * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
658 (modifiers) when square brackets are present in a declaration for
660 * jv-scan.c (main): Set input_filename and input_line.
662 2005-02-01 Tom Tromey <tromey@redhat.com>
665 * gjavah.c (get_field_name): Don't override name for JNI header.
667 2005-02-01 Roger Sayle <roger@eyesopen.com>
669 * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
670 of unsigned types using iushr and lushr JVM bytecodes.
672 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
675 * gjavah.c (jni_print_float): Do not emit floating-point
676 initialiser for a static final field.
677 (jni_print_double): Likewise.
679 2005-02-01 Mark Mitchell <mark@codesourcery.com>
682 2005-01-31 Mark Mitchell <mark@codesourcery.com>
683 * gjavah.c (print_field_info): Mark static data members of
684 floating-point type with "__extension__".
686 2005-01-31 Mark Mitchell <mark@codesourcery.com>
688 * gjavah.c (print_field_info): Mark static data members of
689 floating-point type with "__extension__".
691 2005-02-01 Ranjit Mathew <rmathew@hotmail.com>
694 * parse.y (build_string_concatenation): Remove redundant if.
695 (patch_conditional_expr): Attempt to patch_string() the condition
696 of a ?: as well, in addition to its other operands.
698 2005-01-25 Tom Tromey <tromey@redhat.com>
700 * Make-lang.in (java/java-tree-inline.o): Removed.
702 2005-01-25 Ranjit Mathew <rmathew@hotmail.com>
705 * parse.y (patch_binop): Allow comparisons against NULL only
706 if the other operand is of a reference type.
708 2005-01-24 Tom Tromey <tromey@redhat.com>
710 * java-tree.h (gcj_abi_version): Declare.
711 * class.c (make_class_data): Push gcj_abi_version into "next"
712 field. Renamed field.
713 * decl.c (gcj_abi_version): New global.
714 (parse_version): New function.
715 (java_init_decl_processing): Call it. Renamed 'next' field.
717 (GCJ_BINARYCOMPAT_ADDITION): New define.
719 2005-01-24 Roger Sayle <roger@eyesopen.com>
722 * jcf-write.c (generate_bytecode_insns): Conversions between
723 integer types of the same precision shouldn't generate widening
724 or narrowing conversion bytecodes.
726 2005-01-22 Kazu Hirata <kazu@cs.umass.edu>
728 * java-except.h, java-tree.h: Remove unused prototypes.
730 2005-01-20 Andrew Pinski <pinskia@gcc.gnu.org>
733 * jcf-write.c (perform_relocations): Don't call memcpy if source
734 and destination are the same.
736 2005-01-17 Tom Tromey <tromey@redhat.com>
738 * verify-impl.c (get_short): Sign extend.
741 2005-01-12 Ranjit Mathew <rmathew@hotmail.com>
743 * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
746 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
748 * verify.c: Revert to the version before the BC-ABI merge.
750 2005-01-10 Ranjit Mathew <rmathew@hotmail.com>
753 * check-init.c (check_init): Take care of references that do not
754 have an explicit final variable declaration (e.g. array length
755 access) for pre/post in/de-crement operators.
757 2005-01-08 Mark Wielaard <mark@klomp.org>
759 * parse.y (process_imports): Allocate (and free) original_name only
760 when not already defined.
761 * jcf-parse.c (read_class): Free results of find_class() and
763 (java_parse_file): Keep pointer to head of file_list and free when
764 done. Free result of lrealpath().
766 2005-01-05 Tom Tromey <tromey@redhat.com>
768 * gcj.texi (Standard Properties): java.ext.dirs is now used.
770 2004-12-20 Andrew Haley <aph@redhat.com>
772 * typeck.c: Use fold_convert for ints and booleans.
774 2004-12-17 Andrew Haley <aph@redhat.com>
777 * typeck.c (convert): Use a CONVERT_EXPR when converting to
778 BOOLEAN_TYPE or CHAR_TYPE.
779 (convert_to_boolean, convert_to_char) : Remove.
780 * convert.h (convert_to_boolean, convert_to_char) : Remove.
781 * expr.c (expand_load_internal): Do type conversion if type is not
784 2004-12-13 Danny Smith <dannysmith@users.sourceforge.net>
787 * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
790 2004-12-07 Andrew Haley <aph@redhat.com>
793 * jcf-parse.c (load_class): Remove sanity test for missing inner
796 2004-12-06 Tom Tromey <tromey@redhat.com>
798 * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
799 (java.uninstall): Likewise.
800 (java.maintainer-clean): Likewise.
801 (.INTERMEDIATE): Likewise.
802 (java.install-man): Likewise.
803 (gcj-dbtool.pod): New target.
804 * gcj.texi (Code Generation): Document -findirect-dispatch.
805 (libgcj Runtime Properties): Document
806 gnu.gcj.precompiled.db.path.
807 (Top): Link to "Invoking gcj-dbtool".
809 2004-12-06 Tom Tromey <tromey@redhat.com>
812 * java-tree.h (extract_field_decl): Declare.
813 * parse.y (extract_field_decl): Renamed from
814 strip_out_static_field_access_decl. No longer static.
815 * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
817 2004-12-03 Tom Tromey <tromey@redhat.com>
819 * lang.c (flag_new_verifier): Define.
820 (java_post_options): Set flag_new_verifier if indirect dispatch
822 * lang.opt (fnew-verifier): Removed.
824 2004-12-03 Tom Tromey <tromey@redhat.com>
827 * Make-lang.in (java.install-common): Only install transformed
828 gcjh if gcj-cross exists.
830 2004-12-03 Andrew Haley <aph@redhat.com>
833 * except.c (link_handler): Patch 'outer' field of siblings of the
834 range we're demoting.
836 2004-12-03 Andrew Haley <aph@redhat.com>
839 * class.c (layout_class_method): Don't fail to override a method
840 simply because it has DECL_ARTIFICIAL set.
842 2004-12-02 Tom Tromey <tromey@redhat.com>
845 * parse.y (craft_constructor): Special case null_pointer_node.
847 2004-12-02 Tom Tromey <tromey@redhat.com>
850 * java-gimplify.c (java_gimplify_expr): Don't call
851 SET_EXPR_LOCATION unless wrapped tree is an expression.
853 2004-11-27 Per Bothner <per@bothner.com>
855 * jcf-parse.c (set_source_filename): Improvement to Andrew's fix:
856 Fix fencepost error in 'i', which got executed one too many times.
857 Also, fold memcpy into explicit loop, as originally intended.
858 Also, free temporary 'buf' which otherwise leaks.
860 2004-11-27 Per Bothner <per@bothner.com>
862 * expr.c (build_expr_wfl): Only declare last_file and last_filenode
863 local static variables if not USE_MAPPED_LOCATION.
865 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
867 * class.c, decl.c, expr.c: Fix comment typos.
869 2004-11-26 Andrew Pinski <pinskia@physics.uc.edu>
872 * decl.c (end_java_method): Call
873 attach_init_test_initialization_flags on all the init_decls.
874 * parse.y (attach_init_test_initialization_flags): Move to ...
875 * expr.c (attach_init_test_initialization_flags): here and
876 support BIND_EXPR also.
877 * java-tree.h (attach_init_test_initialization_flags): Prototype.
878 * jcf-parse.c (parse_class_file): Don't disable class init
881 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
883 * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
886 2004-11-24 Richard Henderson <rth@redhat.com>
888 * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
889 vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
891 2004-11-24 Tom Tromey <tromey@redhat.com>
893 * verify.c (defer_merging): Don't use C++-style comment.
894 * verify.h (java_opcode): Added java_opcode_end.
895 * class.c (build_class_ref): Remove C++ comment and old FIXME.
897 * verify-impl.c (vfy_push_type): Removed bogus "return".
898 (initialize_stack): Use vfy_alloc and vfy_free.
899 (verify_instructions_0): Likewise.
901 * Merged gcj-abi-2-dev-branch to trunk.
903 2004-11-24 Andrew Haley <aph@redhat.com>
905 * jcf-parse.c (parse_class_file): Set file_start_location.
907 2004-11-10 Tom Tromey <tromey@redhat.com>
909 * class.c (make_field_value): Don't call build_static_field_ref.
910 (build_static_field_ref): Don't emit direct references when using
913 * gcj.texi (Invoking gij): Document -verbose. Put -verbose and
914 -verbose:class into man page synopsis.
916 2004-11-09 Tom Tromey <tromey@redhat.com>
918 * expr.c (build_java_arraystore_check): Still generate check if
919 element type is itself an array.
921 2004-11-08 Tom Tromey <tromey@redhat.com>
923 * java-tree.h (soft_check_assignment_node): Removed.
924 (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
925 * decl.c (java_init_decl_processing): Don't initialize
926 soft_check_assignment_node.
928 2004-11-05 Tom Tromey <tromey@redhat.com>
930 * class.c (layout_class_methods): Don't add Miranda methods when
931 using indirect dispatch.
933 2004-11-05 Bryce McKinlay <mckinlay@redhat.com>
935 * class.c (make_class_data): Call emit_assertion_table to set the
936 'assertion_table' field.
937 (build_signature_for_libgcj): Move here from expr.c.
938 (add_assertion_table_entry): New function. Callback for assertion
940 (emit_assertion_table): New. Take class argument, and generate
941 assertion table DECL based on the TYPE_ASSERTIONS hashtable.
942 * decl.c (init_decl_processing): Define assertion_entry_type record.
943 Push 'assertion_table' class field instead of 'verify'.
944 * expr.c (type_assertion_eq): Compare 'assertion_code' field.
945 (type_assertion_hash): Include 'assertion_code' in hash.
946 (add_type_assertion): Rewritten. Take class and assertion_code
947 arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
948 (can_widen_reference_to): Use new add_type_assertion() arguments.
949 * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
950 JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
951 (verify_identifier_node): Removed.
952 (assertion_entry_type, assertion_table_type): New.
953 (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
954 assertion code definitions.
955 (struct type_assertion): Add assertion_code. Rename 'source_type' and
956 'target_type' to 'op1' and 'op2'.
957 (add_type_assertion): Declare.
958 (lang_printable_name_wls): Remove unused definition.
959 * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
960 to emit runtime assertion.
961 (vfy_note_stack_type): Clean up non-C90 declarations.
962 (vfy_note_local_type): Likewise.
963 * verify.h (vfy_is_assignable_from): Declare.
964 * verify-impl.c (is_assignable_from_slow): Remove unused function.
965 (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
966 instead of is_assignable_from_slow().
967 (types_compatible): Reinstate ref_compatible() call.
969 2004-11-04 Tom Tromey <tromey@redhat.com>
971 * class.c (build_static_field_ref): Reverted previous patch.
973 * class.c (build_static_field_ref): Don't emit direct references
974 when using indirect dispatch.
976 2004-11-03 Tom Tromey <tromey@redhat.com>
978 * expr.c (expand_java_arrayload): Set lhs_type_node.
979 (expand_java_arraystore): Set rhs_type_node.
981 2004-11-02 Tom Tromey <tromey@redhat.com>
983 * jcf-parse.c (compute_class_name): Use filename length from zip
984 directory, not strlen.
986 * expr.c (expand_invoke): Mark new interface methods as abstract.
988 2004-11-01 Tom Tromey <tromey@redhat.com>
990 * verify-impl.c (push_jump): Removed check for uninitialized
992 (push_exception_jump): Likewise.
993 (handle_ret_insn): Likewise.
994 (handle_jsr_insn): Likewise.
995 (state_check_no_uninitialized_objects): Removed.
997 * decl.c (check_local_unnamed_variable): Recognize
998 promoted-to-int parameters when using the new verifier.
999 * expr.c (expand_java_arraystore): Explicitly request array type
1000 when using new verifier.
1001 (expand_java_arrayload): Likewise.
1002 (invoke_build_dtable): Don't pass object_type_node as
1003 expression argument to build_java_indirect_ref.
1004 (build_java_check_indexed_type): Do nothing.
1005 (build_java_arraystore_check): Handle case where array doesn't
1007 (build_java_array_length_access): Likewise.
1008 (expand_invoke): Handle case where interface overrides a method
1010 (pop_type_0): Always succeed for reference types.
1011 (process_jvm_instruction): Don't pop a value in a dead
1013 (pop_arguments): Convert arguments to correct types.
1015 2004-10-29 Andrew Haley <aph@redhat.com>
1017 * jcf-parse.c (give_name_to_class): Remove line that was
1020 2004-10-29 Andrew Haley <aph@redhat.com>
1022 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1024 2004-10-20 Andrew Haley <aph@redhat.com>
1026 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1028 2004-10-26 Tom Tromey <tromey@redhat.com>
1030 * verify.h (vfy_notify_verified): Removed.
1031 * verify-glue.c (vfy_notify_verified): Removed.
1033 2004-10-26 Tom Tromey <tromey@redhat.com>
1035 * verify-impl.c (debug_print_state): Declare `i' before code.
1036 (merge_types): Modify `t' when it is null_type.
1038 2004-10-26 Tom Tromey <tromey@redhat.com>
1040 * verify-impl.c (type_print): Renamed from print. Now static and
1042 (debug_print_state): Use type_print.
1044 2004-10-25 Tom Tromey <tromey@redhat.com>
1046 * expr.c (build_invokeinterface): Compute correct offset for
1047 index into interface methods.
1049 2004-10-20 Tom Tromey <tromey@redhat.com>
1051 * java-tree.h (verify_jvm_instructions_new): Declare.
1053 * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1056 * verify-impl.c (verify_instructions): Correctly handle wide
1058 * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1059 (vfy_get_component_type): Strip pointer types.
1060 (vfy_find_class): Use get_type_from_signature. Strip pointer
1062 Include java-except.h.
1064 2004-10-20 Bryce McKinlay <mckinlay@redhat.com>
1066 * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1067 vfy_push_type_t, set_variable, add_new_state, merge_into,
1068 handle_jsr_insn, branch_prepass, check_class_constant,
1069 check_wide_constant, get_one_type, compute_static_types,
1070 verify_instructions_0): Clean up C99 declarations after statements.
1072 2004-10-20 Tom Tromey <tromey@redhat.com>
1074 * verify-impl.c (merge_refs): Compare reference against iterator,
1077 * verify-glue.c (vfy_tag): Mask off resolved flag.
1079 2004-10-19 Tom Tromey <tromey@redhat.com>
1081 * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1082 (init_state_with_stack): Initialize `this_type' in state.
1083 (verify_method): Use debug_print.
1084 * verify-glue.c (vfy_is_primitive): Removed debugging print.
1085 (vfy_note_stack_depth): Reverted last patch.
1086 (vfy_note_stack_type): Note pointer to Object, not Object.
1087 (vfy_note_local_type): Likewise.
1089 * verify.h (vfy_note_instruction_seen): Declare.
1090 * verify-glue.c (verify_jvm_instructions_new): Set
1091 BCODE_EXCEPTION_TARGET on target instruction.
1092 (vfy_note_instruction_seen): New function.
1093 * verify-impl.c (FLAG_INSN_SEEN): New define.
1094 (verify_instructions_0): Set flag on instruction. Save state for
1096 (verify_instructions): Call vfy_note_instruction_seen.
1098 * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1099 (verify_jvm_instructions_new): Call method_init_exceptions,
1100 add_handler, and handle_nested_ranges.
1101 * verify-impl.c (verify_method): Return 1 on success.
1102 (verify_instructions_0): Save the state at PC=0.
1104 * verify-impl.c (init_type_from_class): Set is_resolved and
1105 ref_next on new ref_intersection.
1106 (init_type_from_string): Likewise.
1108 2004-10-15 Bryce McKinlay <mckinlay@redhat.com>
1110 * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1111 if flag_new_verifier is set.
1112 * java-tree.h (flag_new_verifier): Declare.
1113 * lang.opt (fnew-verifier): New option.
1114 * verify-impl.c: Work around namespace pollution by undef'ing
1116 (struct verifier_context): Make 'bytecode' const.
1117 (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1118 (types_compatible): For the BC-ABI, always consider reference types
1120 (check_class_constant): Use vfr->current_class.
1121 (check_constant): Likewise.
1122 (check_wide_constant): Likewise.
1123 (check_field_constant): Check for 'L' at start of type name.
1124 (get_one_type): Return pointer instead of type. Set type result in
1125 caller via passed type pointer.
1126 (compute_argument_types): Update to use new get_one_type arguments.
1127 (compute_return_type): Likewise.
1128 (make_verifier_context): New. Allocate and initialize 'vfr'.
1129 (free_verifier_context): New. Free 'vfr' and its contents.
1130 (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
1131 and free_verifier_context.
1133 2004-10-15 Tom Tromey <tromey@redhat.com>
1135 * verify-glue.c (vfy_note_local_type): Mark argument as unused.
1136 * verify.h (vfy_fail): Fixed formatting.
1138 * verify-impl.c (vfr): Fixed comment formatting.
1139 (collapse_type): New function.
1140 (verify_instructions): Notify compiler about type map.
1141 * verify.h (vfy_note_stack_depth): Updated.
1142 (vfy_note_stack_type): Likewise.
1143 (vfy_note_local_type): Likewise.
1144 (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
1146 * verify-glue.c (vfy_note_stack_depth): Correctly size type
1147 state. Added `method' argument.
1148 (vfy_note_stack_type): Renamed from vfy_note_type. Added `method'
1150 (vfy_note_local_type): New function.
1151 (vfy_unsuitable_type): Likewise.
1152 (vfy_return_address_type): Likewise.
1153 (vfy_null_type): Likewise.
1155 * verify.h (VFY_IN_GCC): Removed.
1156 (VFY_WANT_TYPEMAP): Removed.
1157 * verify-impl.c (verify_instructions_0): Removed useless "\".
1158 (struct state) <next>: Uncomment.
1160 2004-10-13 Bryce McKinlay <mckinlay@redhat.com>
1162 * verify-impl.c: Formatting fixes. Reformat C++-style comments to
1165 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1167 * Make-lang.in (verify.o): Re-enabled this target.
1168 * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
1169 (vfy_get_interface): Likewise.
1170 (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
1171 * verify.h (verify_jvm_instructions_new): Declare.
1172 * verify-impl.c (free_state): Temporarily comment out unused
1175 2004-10-06 Tom Tromey <tromey@redhat.com>
1177 * java-tree.h (JV_STATE_READ): New enum value.
1179 2004-10-06 Bryce McKinlay <mckinlay@redhat.com>
1181 * verify.h: New file.
1183 2004-10-05 Bryce McKinlay <mckinlay@redhat.com>
1185 * verify-impl.c, verify-glue.c, verify.h: New files.
1186 * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
1188 2004-09-24 Andrew Haley <aph@redhat.com>
1190 * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
1191 for a slot if it's of pointer type.
1193 2004-09-14 Tom Tromey <tromey@redhat.com>
1195 * class.c (make_class_data): Correctly initialize "state" field.
1196 Initialize "engine" field.
1197 * decl.c (java_init_decl_processing): Add "engine" field.
1199 2004-09-10 Andrew Haley <aph@redhat.com>
1202 * expr.c (build_invokeinterface): Use fast method for interface
1204 * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
1205 JTI_ITABLE_PTR_TYPE.
1206 (struct lang_type): Add itable_methods, itable_decl, itable_syms_decl.
1207 (emit_symbol_table): Add new arg, element_size.
1208 * decl.c (java_init_decl_processing): Initialize Class.itable.
1209 * class.c (GEN_TABLE): New macro.
1210 (gen_indirect_dispatch_tables): Use it. Add itable.
1211 (make_class_data): Add new arg for emit_symbol_table().
1213 (add_miranda_methods): Make sure search_class has been parsed.
1214 (emit_symbol_table): Add new arg, element_size.
1216 2004-09-06 Andrew Haley <aph@redhat.com>
1218 * verify.c (merge_types): Return Object for all merges of
1220 * expr.c (add_type_assertion): Don't generate assertions when
1221 source type is array of Object.
1223 2004-09-03 Andrew Haley <aph@redhat.com>
1225 * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
1227 * lang.c (java_post_options): Force flag_verify_invocations if
1228 we're not using indirect dispatch.
1230 * expr.c (pop_type_0): Move test for interfaces before call to
1231 can_widen_reference_to().
1232 (build_signature_for_libgcj): Remove generation of canonical array
1234 (add_type_assertion): Canonicalize both arrays.
1235 Don't assert that type X can be assigned to Object.
1236 Don't assert that type X an be assigned to type X.
1237 Don't assert that Object can be assigned to type X.
1238 (can_widen_reference_to): Warn whenever we generate an assertion.
1239 (process_jvm_instruction): Use throwable_type_node for the type of
1242 2004-09-01 Andrew Haley <aph@redhat.com>
1244 * decl.c (java_init_decl_processing): Change
1245 verify_identifier_node to "__verify".
1246 * expr.c (add_type_assertion): Use verify_identifier_node for name.
1247 * java-tree.h (verify_identifier_node): Change to "__verify".
1249 * expr.c (build_signature_for_libgcj): New function.
1250 (add_type_assertion): Use it to construct signatures for
1251 source_type and target_type.
1253 2004-08-27 Andrew Haley <aph@redhat.com>
1255 * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
1256 (verify_identifier_node): New.
1257 (TYPE_VERIFY_METHOD): New.
1258 (struct type_assertion): New type.
1259 * expr.c (type_assertion_eq): New function.
1260 (type_assertion_hash): New function.
1261 (add_type_assertion): New function.
1262 (can_widen_reference_to): Call add_type_assertion().
1263 * decl.c (java_init_decl_processing): Add verify_identifier_node.
1264 * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
1265 (finish_class): Output TYPE_VERIFY_METHOD (type).
1267 * decl.c (end_java_method): Nullify unused fields.
1269 2004-08-17 Andrew Haley <aph@redhat.com>
1271 * verify.c (defer_merging): Quieten.
1272 * jcf-parse.c (load_class): Only try to open a class file if it's
1273 java.lang.Object or if it's part of the current compilation.
1274 Check that the class we just tried to load is the class we just
1276 (java_parse_file): Set flag_verify_invocations off if we're
1277 compiling from .class.
1278 (parse_zip_file_entries): Abort if we try to read a dummy class.
1279 * expr.c (can_widen_reference_to): Quieten.
1280 (build_invokevirtual): Abort if we try to invokevirtual an
1282 (expand_invoke): Don't build a non-interface call to an interface.
1283 (build_instanceof): Don't do premature optimization if
1284 flag_verify_invocations is not set.
1285 * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
1287 (build_static_field_ref): Add correct type conversion for
1289 (add_miranda_methods): Disable generation of Miranda methods for
1291 (layout_class_method): Don't complain about non-static method
1292 overrides static method with dummy classes.
1294 2004-08-13 Tom Tromey <tromey@redhat.com>
1296 * class.c (build_static_field_ref): Re-enable atable lookups for
1299 * parse.y (strip_out_static_field_access_decl): Indentation fix.
1301 2004-08-11 Tom Tromey <tromey@redhat.com>
1303 * gcj.texi (libgcj Runtime Properties): Document new properties.
1305 2004-08-06 Andrew Haley <aph@redhat.com>
1307 * jcf-parse.c (load_class): Check that we really have loaded the
1308 class we're looking for.
1310 2004-07-19 Andrew Haley <aph@redhat.com>
1312 * verify.c (verify_jvm_instructions): Comment change only.
1314 * typeck.c (build_java_array_type): Add size field to array name.
1316 * java-tree.h (LOCAL_SLOT_P): New.
1317 (update_aliases): Add PC argument.
1318 (pushdecl_function_level): New function.
1320 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
1321 MODIFY_EXPR, and SAVE_EXPR.
1322 (java_gimplify_modify_expr): New function.
1324 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
1325 (expand_iinc): Pass PC to update_aliases().
1326 (STORE_INTERNAL): Likewise.
1327 (process_jvm_instruction): Likewise.
1329 * decl.c (base_decl_map): New variable.
1330 (uniq): New variable.
1331 (update_aliases): Rewrite with more thorough checking.
1332 (debug_variable_p): New function.
1333 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
1334 (check_local_named_variable): Delete whole function.
1335 (initialize_local_variable): New function.
1336 (check_local_unnamed_variable): Add checks and comments.
1337 (find_local_variable): Rewrite.
1338 (java_replace_reference): New function.
1339 (function_binding_level): New variable.
1340 (pushdecl_function_level): New function.
1341 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
1342 (maybe_pushlevels): Call pushdecl() on each of the new decls.
1343 (start_java_method): Reset uniq. Create base_decl_map. Set
1344 function_binding_level.
1345 (end_java_method): Null unused fields to save memory.
1347 2004-06-29 Andrew Haley <aph@redhat.com>
1349 * except.c (expand_start_java_handler): Push a new binding level.
1350 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
1351 register_exception_range() to register where we'll do it.
1352 (expand_end_java_handler): Remove old bogus code. Replace with
1353 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
1354 the top of the expression we're curently building.
1355 (maybe_end_try): Delete.
1356 * decl.c (binding_level.exception_range): New field.
1357 (clear_binding_level): Add field exception_range. Reformat.
1358 (poplevel): Call expand_end_java_handler().
1359 (poplevel): Call java_add_stmt only if functionbody is false.
1360 (maybe_poplevels): Don't call maybe_end_try() from here.
1361 (end_java_method): Clear no longer used trees in function decl.
1362 (register_exception_range): New function.
1363 * java-tree.h (register_exception_range, struct eh_range): Declare.
1365 2004-06-22 Andrew Haley <aph@redhat.com>
1367 * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
1369 * check-init.c (get_variable_decl): Teach check-init about
1370 FIELD_DECLs addressed via the otable.
1371 * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
1374 2004-05-28 Andrew Haley <aph@redhat.com>
1376 * jcf-parse.c (load_class): Don't try to read a class that we've
1379 * expr.c (build_invokeinterface): Use the old-fashioned way of
1380 doing indirect dispatch: look up interfaces by name.
1381 * java-tree.h (enum java_tree_index): Add
1382 JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
1383 * decl.c (java_init_decl_processing): Add
1384 soft_lookupinterfacemethodbyname_node.
1386 * gjavah.c (print_method_info): Final methods have vtable entries,
1387 so gjavah needs to output them.
1388 * class.c (layout_class_method): Generate vtable entries for final
1390 * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
1391 dispatch, even if a method is final.
1393 2004-05-25 Andrew Haley <aph@redhat.com>
1395 * class.c (build_symbol_entry): Convert the names of constructors
1396 to init_identifier_node when generating an entry for the indirect
1399 * expr.c (build_known_method_ref): Generate indirect calls for
1400 all methods marked DECL_EXTERNAL or TREE_PUBLIC.
1402 2004-05-24 Andrew Haley <aph@redhat.com>
1404 * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
1405 atable element is of the right type.
1407 * class.c (build_static_field_ref): Cast pointer to correct type
1410 2004-04-20 Bryce McKinlay <mckinlay@redhat.com>
1412 * Merged with HEAD as of 20040514. Diff against
1413 gcj-abi-2-merge-20040514.
1415 2004-04-16 Andrew Haley <aph@redhat.com>
1417 * verify.c (check_pending_block): Disable subroutine checks.
1418 (defer_merging): New function.
1419 (merge_types): If types are dummy, use defer_merging to combine them.
1420 (verify_jvm_instructions): If invocation is invokeinterface and
1421 target is dummy, assume target really is an interface.
1423 * parse.y (patch_invoke): Break out call to java_create_object.
1425 * lang.c (flag_verify_invocations): New.
1427 * jcf-parse.c (load_class): If we've already failed to load a
1428 class, don't try again.
1429 (load_class): If we can't find a .class file, don't fail, but emit
1431 (parse_class_file): Don't act on dummy methods.
1433 * java-tree.h (flag_verify_invocations): New.
1435 (lang_type.dummy_class): New field.
1436 (java_create_object): New function.
1437 (METHOD_DUMMY): New.
1439 * expr.c (build_field_ref): Widen field offset.
1440 (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
1441 that each of its elements is compatible with the one we're
1443 (pop_type_0): Issue a warning to say that we need to generate a
1445 (java_create_object): New function.
1446 (build_field_ref): Only generate hard refs if we're not using
1448 (expand_java_field_op): If we're using !verify_invocations and we
1449 see a missing field, generate a decl for it.
1451 (expand_invoke): If a class doesn't have the method we seek and
1452 we're using !flag_verify_invocations, generate a decl for the
1455 (build_known_method_ref): Always use indirect dispatch via the
1456 atable for static methods.
1458 (expand_java_NEW): Break out object creation into new function,
1461 (can_widen_reference_to): Issue a warning to say that we need to
1462 generate a runtime check.
1464 * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
1465 (make_method_value): Also use index for interfaces.
1466 (make_class_data): Skip dummy field for inherited data.
1467 Don't build method array for dummy methods.
1468 Set size_in_byte to -1 when using inirect dispatch
1469 Don't build a hard class ref if we don't have a hard ref to our
1470 superclass, or if we're using inirect dispatch.
1471 Null out dispatch tables.
1473 (layout_class_method): Don't complain about non-static method
1474 overrides static method is method is artificial.
1476 (build_static_field_ref): Disable atable references to static
1477 fields for the time being.
1479 (layout_class_methods): Check for CLASS_INTERFACE as
1480 well as CLASS_ABSTRACT.
1482 2004-11-24 Steven Bosscher <stevenb@suse.de>
1484 * class.c (make_class_data): Don't check flag_inline_functions.
1485 * lang.c (flag_really_inline): Remove unused flag.
1486 (java_handle_option): Don't set it here. Remove special handling
1487 of flag_inline_functions for Java.
1488 (java_init): Don't set flag_inline_trees here. Already done...
1489 (java_post_options): ...here. Don't clear flag_inline_functions.
1491 2004-11-24 Steven Bosscher <stevenb@suse.de>
1493 * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
1494 (java_gimplify_exit_block_expr): New function.
1495 (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
1497 * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
1498 (EXIT_BLOCK_EXPR): Likewise.
1499 * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
1500 (LABELED_BLOCK_BODY): Likewise.
1501 (EXIT_BLOCK_LABELED_BLOCK): Likewise.
1502 * jcf-write.c (generate_bytecode_insns): Don't handle the unused
1503 EXIT_BLOCK_RETURN operand. Use EXIT_BLOCK_LABELED_BLOCK instead of
1505 * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
1506 (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
1507 EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND. Don't handle the
1508 second operand of EXIT_BLOCK_EXPR.
1509 * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
1511 (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
1513 2004-11-23 Ben Elliston <bje@au.ibm.com>
1515 * xref.h (xref_flag_value): Remove.
1516 (xref_set_data, xref_get_data): Likewise.
1517 (xref_set_current_fp): Likewise.
1518 (XREF_NONE): Likewise.
1519 (XREF_GET_DATA): Likewise.
1520 * xref.c (xref_flag_value): Remove.
1521 (xref_set_data, xref_get_data): Likewise.
1522 (xref_set_current_fp): Likewise.
1524 2004-11-23 Ben Elliston <bje@au.ibm.com>
1526 * gjavah.c (output_directory): Make static.
1527 (temp_directory): Likewise.
1529 2004-11-15 Tom Tromey <tromey@redhat.com>
1531 * decl.c (instn_ptr_type_node): Removed.
1532 (lineNumbers_ptr_type_node): Removed.
1533 (jint_type): Removed.
1534 (jint_ptr_type): Removed.
1536 2004-11-09 Andrew Pinski <pinskia@physics.uc.edu>
1539 * check-init.c (check_init): Ignore DECL_EXPR.
1540 * expr.c (always_initialize_class_p): Reenable.
1541 (build_class_init): Use a variable to store the decl. Also use
1542 boolean_false_node instead of integer_zero_node.
1543 * parse.y (attach_init_test_initialization_flags): Add a decl_expr
1546 2004-11-08 Tom Tromey <tromey@redhat.com>
1549 * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
1550 generating a JNI header.
1551 (print_field_info): Handle JNI headers.
1552 (jni_print_float): Likewise.
1553 (jni_print_double): Likewise.
1555 2004-11-08 Andrew Pinski <pinskia@physics.uc.edu>
1557 * decl.c (end_java_method): Remove duplicated code.
1559 2004-11-06 Zack Weinberg <zack@codesourcery.com>
1560 Gerald Pfeifer <gerald@pfeifer.com>
1562 * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
1565 2004-11-02 Bryce McKinlay <mckinlay@redhat.com>
1568 * class.c: Reinstate 2004-08-18 patch.
1569 (make_local_function_alias): Don't create an alias for extern (native)
1572 2004-10-22 Eric Botcazou <ebotcazou@libertysurf.fr>
1575 * class.c (make_local_function_alias): Revert 2004-08-18 change.
1576 (make_method_value): Likewise.
1578 2004-10-21 Andrew Haley <aph@redhat.com>
1581 * jcf-parse.c (set_source_filename): Add code to build new sfname.
1583 2004-10-20 Andrew Haley <aph@redhat.com>
1585 * decl.c (end_java_method): Don't expand if flag_syntax_only.
1586 Remove duplicated code block.
1588 2004-10-18 Steven Bosscher <stevenb@suse.de>
1590 * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
1591 New rules to work around old Bison warnings.
1593 2004-10-17 Steven Bosscher <stevenb@suse.de>
1595 * class.c (ident_subst): Always alloca buffer.
1596 * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
1597 opcode after including javaop.def.
1598 * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
1599 conditional expression that exits, to avoid warnings.
1600 * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
1601 a user of an extension.
1602 * win32-host.c: Move check down to have non-empty file when
1603 WIN32 is not defined.
1605 * Make-lang.in (java-warn): Add STRICT_WARN.
1606 (java/jcf-io.o-warn): Don't have Werror for this file.
1607 * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
1609 2004-10-16 Hans-Peter Nilsson <hp@bitrange.com>
1611 * expr.c (expr_add_location): Move declaration to before all
1613 * parse.y (java_expand_classes): Ditto.
1614 * lex.c (java_peek_unicode): Ditto.
1616 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1618 * check-init.c: Use %<, %> and %q for quoting in diagnostics,
1619 if possible, else convert `foo' to 'foo'.
1620 * class.c: Likewise.
1623 * jcf-io.c: Likewise.
1624 * jcf-parse.c: Likewise.
1627 * parse.h: Likewise.
1629 2004-10-16 Ranjit Mathew <rmathew@hotmail.com>
1631 * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
1632 rename parameter 'msg' to 'msgid' in function declaration.
1633 (issue_warning_error_from_context): Likewise.
1634 (yyerror): Rename parameter 'msg' to 'msgid'.
1635 (all over): Use new quoting style for diagnostics.
1637 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
1639 * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
1640 jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
1643 2004-10-14 Matt Austern <austern@apple.com>
1645 * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
1648 2004-10-13 Tom Tromey <tromey@redhat.com>
1651 * lang.opt (--extdirs): Document.
1652 * jvspec.c (lang_specific_driver): Recognize -encoding and
1655 2004-10-06 Ulrich Weigand <uweigand@de.ibm.com>
1657 * parse.y (issue_warning_error_from_context): Use va_list *
1658 instead of va_list parameter.
1659 (parse_error_context): Update call.
1660 (parse_warning_context): Likewise.
1662 2004-10-05 Zack Weinberg <zack@codesourcery.com>
1664 * parse.y, parse-scan.y: Add list of diagnostic messages to
1665 insulate translation template from version of yacc/bison used
1666 to compile the grammar.
1668 2004-10-05 Ranjit Mathew <rmathew@hotmail.com>
1670 Prepare for %q, %< and %> in diagnostic message strings.
1671 * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
1672 Name second parameter 'msgid'.
1673 * parse.y: Additionally include pretty-print.h and diagnostic.h.
1674 (issue_warning_error_from_context): Use pretty-printer functions
1675 instead of vsprintf for constructing formatted messages. Rename
1676 parameter 'msg' to 'msgid'.
1677 (parse_error_context): Rename parameter 'msg' to 'msgid'.
1678 (parse_warning_context): Likewise.
1680 2004-10-05 Andrew Haley <aph@redhat.com>
1683 * jcf-parse.c (parse_zip_file_entries): If a class has a
1684 superclass and a TYPE_SIZE of zero, lay it out.
1686 2004-09-30 Andrew Haley <aph@redhat.com>
1689 * jcf-parse.c (compute_class_name): Rewrite.
1691 2004-10-01 Jan Hubicka <jh@suse.cz>
1693 * java.c (java_expand_body): Update call of tree_rest_of_compilation.
1695 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1697 * lex.c: Fix a comment typo.
1699 2004-10-01 Kazu Hirata <kazu@cs.umass.edu>
1701 * java-tree.h: Fix a comment typo.
1703 2004-09-30 Per Bothner <per@bothner.com>
1705 Simplify lexer. Implement --enable-mapped-location support.
1706 * jcf-parse.c (parse_class_file): Use linemap_line_start.
1707 (parse_source_file_1): Pass filename as extra parameter, so we can call
1708 linemap_add and set input_location here, rather than in both callers.
1709 (read_class): Pass copied filename to parse_source_file_1.
1710 Don't initialize wfl_operator - only needed for source compilation.
1711 (read_class, jcf_parse): Call linemap_add with LC_LEAVE.
1712 * lex.h: Remove a bunch of debugging macros.
1713 * lex.h (struct_java_line, struct java_error): Remove types.
1714 (JAVA_COLUMN_DELTA): Remove - use java_lexer.next_colums instead.
1715 (struct java_lc_s): Remove prev_col field.
1716 (struct java_lexer): New fields next_unicode, next_columns, and
1717 avail_unicode. New position field, and maybe token_start field.
1718 Don't need hit_eof field - use next_unicode == -1 instead.
1719 (JAVA_INTEGERAL_RANGE_ERROR): Rename to JAVA_RANGE_ERROR.
1720 (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR): Update accordingly.
1721 * parse.h: Various changes for USE_MAPPED_LOCATION.
1722 (EXPR_WFL_EMIT_LINE_NOTE): XXX
1723 (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
1724 (struct parser_ctxt): New file_start_location field.
1725 Remove p_line, c_line fields since we no longer save lines.
1726 Remove elc, lineno, and current_jcf fields - no longer used.
1727 * parse.y: Updates for USE_MAPPED_LOCATION and new lexer.
1728 Don't use EXPR_WFL_ADD_COL since that isn't trivial with
1729 source_location and is probably not needed anymore anyway.
1730 Use new expr_add_Location function.
1731 (SET_EXPR_LOCATION_FROM_TOKEN): New convenience macro.
1732 (java_pop_parser_context): Minor cleanup.
1733 (java_parser_context_save_global, java_parser_context_restore_global,
1734 java_pop_parser_context): Save/restore input_location as a unit.
1735 (issue_warning_error_from_context): If USE_MAPPED_LOCATION take
1736 a source_location instead of a wfl context node.
1737 (check_class_interface_creation): input_filename is not addressable.
1738 (create_artificial_method): Calling java_parser_context_save_global
1739 and java_parser_context_restore_global is overkill. Instead,
1740 temporarily set input_location from class decl.
1741 (java_layout_seen_class_methods): Set input_location from method decl.
1742 (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
1743 (finish_loop_body): Likewise.
1744 * lex.c: Updates for USE_MAPPED_LOCATION. Use build_unknwon_wfl.
1745 (java_sprint_unicode): Take a character, not index in line.
1746 (java_sneak_uncode): Replaced by java_peek_unicode.
1747 (java_unget_unicode): No longer used.
1748 (java_allocate_new_line. java_store_unicode): Removed, since we
1749 no longer remember "lines".
1750 (java_new_lexer): Update for new data structures.
1751 (java_read_char): Move unget_value checking to java_read_unicode.
1752 (java_get_unicode, java_peek_unicode, java_next_unicode): New more
1753 efficient functions that are used directly when lexing.
1754 (java_read_unicode_collapsing_terminators): No longer needed.
1755 (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
1756 Re-organize to use java_peek_unicode to avoid java_unget_unicode.
1757 (java_parse_escape_sequence): Rewrite to be simpler / more efficient.
1758 (do_java_lex): Lots of movings around to avoid java_unget_unicode,
1759 combine switch branches, and test for common token kinds earlier.
1760 (java_lex_error): Rewrite.
1761 * jv-scan.c (expand_location): New function, copied from tree.c.
1762 (main): Set ctxp->filename instead of setting input_filename directly.
1764 2004-09-30 Per Bothner <per@bothner.com>
1766 More cleanup for --enable-mapped-location.
1767 * class.c (push_class): If USE_MAPPED_LOCATION don't set
1768 input_location here. Instead do it in give_name_to_class.
1769 (build_class_ref): Set DECL_ARTIFICIAL, for the sake of dwarf2out.
1770 * expr.c (expand_byte_code): Call linemap_line_start.
1771 * expr.c (build_expr_wfl): If USE_MAPPED_LOCATION, change final
1772 parameters to a source_location. Don't need EXPR_WFL_FILENAME_NODE.
1773 (expr_add_location): New function, if USE_MAPPED_LOCATION.
1774 * class.c (maybe_layout_super_class): Adjust build_expr_wfl call
1775 to USE_MAPPED_LOCATION case.
1777 * java-tree.h (JAVA_FILE_P, ZIP_FILE_P): Remove unused macros.
1778 * jcf-parse.c (java_parse_file): Don't set input_filename.
1779 Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
1780 Create a list of TRANSLATION_UNIT_DECL.
1781 (current_file_list): Is now a TRANSLATION_UNIT_DECL chain. The
1782 reason is so we can set a DECL_SOURCE_LOCATION for each file.
1783 (java_parse_file): Don't set unused ZIP_FILE_P, JAVA_FILE_P..
1784 Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
1785 (file_start_location): New static.
1786 (set_source_filename): Avoid extra access to input_filename macro.
1787 Concatenate new name with class's package prefix.
1788 (set_source_filename, give_name_to_class): Update.
1789 (give_name_to_class): Set class's "line 0" input_location here.
1790 (parse_class_file): Set input_location as a unit.
1792 * jcf-parse.c (load_class): Sanity test if missing inner class file.
1794 2004-09-29 Per Bothner <per@bothner.com>
1796 * java-tree.h: Redefine some macros and add some declaration
1797 to handle the USE_MAPPED_LOCATION case.
1798 * parse.h (EXPR_WFL_QUALIFICATION): Use operand 1, not 2.
1799 * java-tree.h (EXPR_WFL_FILENAME_NODE): Use operand 2, not 1.
1800 * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
1801 USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
1803 * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
1804 * decl.c (finish_method, java_add_stmt): Likewise.
1805 * java-gimplify.c (java-gimplify.c): Likewise.
1806 * jcf-write.c (generate_bytecode_insns): Likewise.
1807 * lang.c (java_post_options): Likewise - call linemap_add.
1809 2004-09-29 Andrew Haley <aph@redhat.com>
1812 * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
1813 result of TRUNC_MOD_EXPR.
1814 (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
1815 * decl.c (java_init_decl_processing): Mark
1816 soft_lookupinterfacemethod_node and soft_instanceof_node pure.
1818 2004-09-28 Tom Tromey <tromey@redhat.com>
1821 * class.c (add_miranda_methods): Load superinterface if not
1824 2004-09-28 Andrew Haley <aph@redhat.com>
1827 * jcf-parse.c (load_class): Don't try to read a class that we've
1830 2004-09-28 Andrew Haley <aph@redhat.com>
1832 * jcf-parse.c (load_class): Back out previous broken patch.
1834 2004-09-28 Andrew Haley <aph@redhat.com>
1837 * jcf-parse.c (load_class): Don't try to read a class that we've
1839 Check that we really did read the right class.
1841 2004-09-25 Tom Tromey <tromey@redhat.com>
1844 * parse.y (create_artificial_method): Use add_method_1.
1846 2004-09-25 Kazu Hirata <kazu@cs.umass.edu>
1848 * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
1850 * gcj.texi: Fix typos.
1852 2004-09-24 Tom Tromey <tromey@redhat.com>
1855 * parse.y (class_instance_creation_expression): Set `$$' to NULL
1856 in error parts of rule.
1857 (unary_expression): Don't call error_if_numeric_overflow when $1
1860 2004-09-24 Tom Tromey <tromey@redhat.com>
1863 * parse.y (resolve_qualified_expression_name): Set
1864 CAN_COMPLETE_NORMALLY on first call when chaining static calls.
1865 * expr.c (force_evaluation_order): Check for empty argument list
1866 after stripping COMPOUND_EXPR.
1868 2004-09-23 Andrew Haley <aph@redhat.com>
1871 * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
1874 2004-09-23 Tom Tromey <tromey@redhat.com>
1877 * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
1878 where operand is null.
1880 2004-09-23 Tom Tromey <tromey@redhat.com>
1883 * parse.y (not_accessible_p): Allow access to protected members
1884 even when class is not static.
1886 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
1888 * Make-lang.in: Revert the gcc-none.o change.
1890 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
1892 * parse.y (patch_anonymous_class): VEC_space returns true if there
1895 2004-09-21 Matt Austern <austern@apple.com>
1898 * gjavah.c (free_method_name_list): Fix function definition so
1899 it's a proper C prototype.
1901 2004-09-21 Tom Tromey <tromey@redhat.com>
1904 * gjavah.c (free_method_name_list): New method.
1907 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
1908 Zack Weinberg <zack@codesourcery.com>
1910 * java-tree.def: Use tree_code_class enumeration constants
1911 instead of code letters.
1912 * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
1913 new tree-class enumeration constants.
1915 2004-09-13 Tom Tromey <tromey@redhat.com>
1918 * class.c (layout_class_method): Put synthetic methods into the
1921 2004-09-11 Andrew Pinski <apinski@apple.com>
1923 * Make-lang.in (java/ggc-none.c): Change dependency
1924 for ggc.h into $(GGC_H).
1926 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1928 * Make-lang.in (java/win32-host.o): Add dependency on
1930 * win32-host.c: Add includes for coretypes.h, jcf.h
1932 2004-09-11 Mohan Embar <gnustuff@thisiscool.com>
1934 * Make-lang.in (GCJH_OBJS): Change dependency from
1935 ggc-none.o to java/ggc-none.o
1936 (JCFDUMP_OBJS): Likewise.
1937 (java/ggc-none.o): New target.
1939 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
1941 * boehm.c (get_boehm_type_descriptor): Adjust build_int_cst calls.
1942 * class.c (build_utf8_ref, build_static_field_ref,
1943 make_field_value, make_method_value, get_dispatch_table,
1944 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
1945 * constants.c (get_tag_node, build_ref_from_constant_pool,
1946 build_constants_constructor): Likewise.
1947 * decl.c (java_init_decl_processing): Likewise.
1948 * expr.c (build_java_array_length_access, build_newarray,
1949 expand_java_multianewarray, expand_java_pushc, expand_iinc,
1950 build_java_binop, build_field_ref, expand_java_add_case,
1951 expand_java_call, build_known_method_ref, build_invokevirtual,
1952 build_invokeinterface, build_jni_stub): Likewise.
1953 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
1954 * jcf-parse.c (get_constant): Likewise.
1955 * lex.c (do_java_lex): Likewise.
1956 * parse.y (patch_binop, patch_unaryop, patch_cast,
1957 build_newarray_node, patch_newarray): Likewise.
1958 * resource.c (compile_resource_data): Likewise.
1959 * typeck.c (build_prim_array_type): Likewise.
1961 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
1963 * decl.c (java_init_decl_processing): Adjust
1964 initialize_sizetypes call.
1966 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
1968 * jv-scan.c (fancy_abort): Add.
1970 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
1972 * expr.c (build_java_arrayaccess): Use convert to change
1975 2004-08-19 Bryce McKinlay <mckinlay@redhat.com>
1977 * class.c (make_local_function_alias): Allocate extra space for 'L'
1978 in name buffer. Reported by Thomas Neumann.
1980 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
1982 * parse.h (JAVA_RADIX10_FLAG): Rename to ...
1983 (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning.
1984 * lex.c (do_java_lex): Adjust.
1985 (error_if_numeric_overflow): Likewise.
1987 2004-08-18 Andrew Pinski <apinski@apple.com>
1989 * class.c (make_local_function_alias): Only make a new decl if we
1990 support alias attribute on all decls.
1992 2004-08-18 Bryce McKinlay <mckinlay@redhat.com>
1994 * class.c (make_local_function_alias): New function. Create local
1995 alias for public method DECL.
1996 (make_method_value): Use make_local_function_alias.
1997 * parse.y (craft_constructor): Don't special-case anonymous classes.
1998 Always set ctor_name to init_identifier_node.
1999 (lookup_method_invoke): Call layout_class_method when creating
2000 anonymous class constructor.
2002 2004-08-18 Richard Henderson <rth@redhat.com>
2004 * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2005 default case. Treat '<' similarly. Update for
2006 is_gimple_formal_tmp_var name change.
2008 2004-08-17 Andrew Haley <aph@redhat.com>
2010 * lang.c (lang_printable_name): Obey verbose flag.
2011 * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2012 lang_printable_name().
2013 (verify_constructor_circularity, get_printable_method_name,
2014 check_abstract_method_definitions, java_check_regular_methods,
2015 java_check_abstract_methods, check_inner_class_access,
2016 fix_constructors, patch_method_invocation, patch_return):
2018 * expr.c (pop_type_0): Likewise.
2020 * java-tree.h (lang_printable_name_wls): Delete.
2022 2004-08-16 Tom Tromey <tromey@redhat.com>
2025 * parse.y (primary): Changed for initialized and uninitialized
2027 (array_access): Handle array_creation_initialized.
2028 (array_creation_expression): Split into
2029 array_creation_initialized and array_creation_uninitialized.
2031 2004-08-16 Andrew Haley <aph@redhat.com>
2033 * jcf-write.c (find_constant_index): Canonicalize NaNs when
2034 generating bytecode.
2036 2004-08-16 Elliot Lee <sopwith@redhat.com>
2039 * jcf-parse.c (java_parse_file): Handle filenames with embedded
2040 spaces, and quoted filelists.
2042 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
2044 * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2045 * class.c (build_utf8_ref, build_static_field_ref,
2046 make_field_value, make_method_value, get_dispatch_table,
2047 make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2048 * constants.c (get_tag_node, build_ref_from_constant_pool,
2049 build_constants_constructor): Likewise.
2050 * decl.c (java_init_decl_processing): Likewise.
2051 * expr.c (build_java_array_length_access, build_newarray,
2052 expand_java_multianewarray, expand_java_pushc, expand_iinc,
2053 build_java_binop, build_field_ref, expand_java_add_case,
2054 expand_java_call, build_known_method_ref, build_invokevirtual,
2055 build_invokeinterface, build_jni_stub): Likewise.
2056 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2057 * jcf-parse.c (get_constant): Likewise.
2058 * lex.c (do_java_lex): Likewise.
2059 * parse.y (patch_binop, patch_unaryop, patch_cast,
2060 build_null_of_type, patch_newarray): Likewise.
2061 * resource.c (compile_resource_data): Likewise.
2062 * typeck.c (build_prim_array_type): Likewise.
2064 2004-08-10 Bryce McKinlay <mckinlay@redhat.com>
2066 * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2067 Don't create BLOCK here or call java_gimplify_block.
2069 2004-08-09 H.J. Lu <hongjiu.lu@intel.com>
2071 * java-tree.h (flag_deprecated): Removed.
2072 * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2073 * parse.y (check_deprecation): Check warn_deprecated instead of
2076 2004-08-06 Kelley Cook <kcook@gcc.gnu.org>
2078 * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2079 flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2080 flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2081 flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2082 flag_force_classes_archive_check, flag_optimize_sci,
2083 flag_indirect_dispatch): Remove explicit declarations.
2084 * lang.opt: Add implicit declare/define/assign. Remove obsolete
2087 2004-08-05 Michael Chastain <mec.gnu@mindspring.com>
2090 * Make-lang.in (java.install-man): Install from either build
2091 tree or source tree, whichever has the file first.
2093 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
2095 * jcf-parse.c (get_constant): Adjust force_fit_type call.
2096 * lex.h (SET_LVAL_NODE_TYPE): Remove.
2097 * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2098 (do_java_lex): Likewise. Adjust force_fit_type call.
2100 2004-08-04 Roger Sayle <roger@eyesopen.com>
2101 Andrew Haley <aph@redhat.com>
2103 * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2104 checking trees as they're being built.
2105 (convert): Call convert_ieee_real_to_integer if we're
2106 converting a constant, even if we're writing a class file.
2108 2004-08-02 Bryce McKinlay <mckinlay@redhat.com>
2111 * parse.y (fold_constant_for_init): Call resolve_field_access with
2112 correct current_class context.
2114 2004-08-01 Roger Sayle <roger@eyesopen.com>
2116 * decl.c (update_aliases, initialize_local_variable): Replace calls
2117 to build with calls to buildN.
2118 * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2119 * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2120 * parse.h (BUILD_THROW): Likewise.
2121 * parse.y (switch_expression, synchronized_statement,
2122 catch_clause_parameter, array_creation_expression,
2123 conditional_expression, make_qualified_name,
2124 resolve_qualified_expression_name, patch_method_invocation,
2125 patch_invoke, build_method_invocation, build_new_invocation,
2126 build_assignment, patch_assignment, build_binop, patch_binop,
2127 build_string_concatenation, build_incdec, patch_unaryop,
2128 patch_cast, build_array_ref, build_newarray_node, patch_newarray,
2129 patch_return, build_if_else_statement, build_labeled_block,
2130 build_new_loop, build_loop_body, build_bc_statement,
2131 build_assertion, encapsulate_with_try_catch, build_try_statement,
2132 build_try_finally_statement, patch_synchronized_statement,
2133 emit_test_initialization): Likewise, replace build with buildN.
2135 2004-07-28 Eric Christopher <echristo@redhat.com>
2137 * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
2138 (java_unsafe_for_reeval): Ditto.
2140 2004-07-26 <hp@bitrange.com>
2142 * parse.y (build_super_invocation): Adjust declaration order to
2143 avoid declaration after statement.
2145 2004-07-25 Bernardo Innocenti <bernie@develer.com>
2147 * decl.c: Rename all identifiers named `class' to `cl'.
2149 2004-07-25 Richard Henderson <rth@redhat.com>
2151 * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
2153 2004-07-23 Mike Stump <mrs@apple.com>
2155 * boehm.c (set_bit): Improve type safety wrt unsignedness.
2156 * gjavah.c (throwable_p, decode_signature_piece,
2157 print_full_cxx_name, print_include, add_namelet, add_class_decl,
2158 process_file): Likewise.
2159 * jcf-dump.c (main): Likewise.
2160 * jcf-io.c (read_zip_member): Likewise.
2161 * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
2162 give_name_to_class, get_class_constant): Likewise.
2163 * jcf-write.c (find_constant_wide, push_long_const,
2164 generate_classfile): Likewise.
2165 * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
2166 * parse.y (read_import_dir): Likewise.
2167 * typeck.c (parse_signature_type): Likewise.
2168 * verify.c (verify_jvm_instructions): Likewise.
2169 * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
2171 2004-07-23 Thomas Fitzsimmons <fitzsim@redhat.com>
2173 * Make-lang.in: Replace rmic and rmiregistry references with
2174 grmic and grmiregistry.
2175 * gcj.texi: Likewise.
2177 2004-07-20 Andrew Haley <aph@redhat.com>
2180 * verify.c (verify_jvm_instructions): Comment change only.
2182 * typeck.c (build_java_array_type): Add size field to array name.
2184 * java-tree.h (LOCAL_SLOT_P): New.
2185 (update_aliases): Add PC argument.
2186 (pushdecl_function_level): New function.
2188 * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2189 MODIFY_EXPR, and SAVE_EXPR.
2190 (java_gimplify_modify_expr): New function.
2192 * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2193 (expand_iinc): Pass PC to update_aliases().
2194 (STORE_INTERNAL): Likewise.
2195 (process_jvm_instruction): Likewise.
2197 * decl.c (base_decl_map): New variable.
2198 (uniq): New variable.
2199 (update_aliases): Rewrite with more thorough checking.
2200 (debug_variable_p): New function.
2201 (push_jvm_slot): Don't initialize local variable. Don't pushdecl.
2202 (check_local_named_variable): Delete whole function.
2203 (initialize_local_variable): New function.
2204 (check_local_unnamed_variable): Add checks and comments.
2205 (find_local_variable): Rewrite.
2206 (java_replace_reference): New function.
2207 (function_binding_level): New variable.
2208 (pushdecl_function_level): New function.
2209 (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2210 (maybe_pushlevels): Call pushdecl() on each of the new decls.
2211 (start_java_method): Reset uniq. Create base_decl_map. Set
2212 function_binding_level.
2213 (end_java_method): Null unused fields to save memory.
2215 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
2217 * class.c (add_interface_do): Remove.
2218 (set_super_info, interface_of_p, maybe_add_interface,
2219 add_interface, make_class_data, layout_class,
2220 add_miranda_methods): Adjust BINFO accessors and addition.
2221 * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
2223 * jcf-write.c (generate_classfile): Likewise.
2224 * parse.y (patch_anonymous_class, check_inner_circular_reference,
2225 check_circular_reference, java_complete_class,
2226 check_abstract_method_definitions,
2227 java_check_abstract_method_definitions,
2228 check_interface_throws_clauses, java_check_abstract_methods,
2229 lookup_java_interface_method2,
2230 find_applicable_accessible_methods_list): Adjust BINFO accessors
2232 * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
2234 2004-07-18 Roger Sayle <roger@eyesopen.com>
2236 * builtins.c (max_builtin, min_builtin,
2237 java_build_function_call_expr): Replace calls to build with buildN.
2238 * class.c (build_class_ref, build_static_field_ref,
2239 get_dispatch_table, make_class_data, layout_class_method): Likewise.
2240 * constants.c (build_ref_from_constant_pool): Likewise.
2241 * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
2242 add_stmt_to_compound): Likewise.
2243 * except.c (build_exception_object_ref, expand_end_java_handler):
2245 * java-gimplify.c (java_gimplify_case_expr,
2246 java_gimplify_default_expr, java_gimplify_block,
2247 java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
2248 * jcf-write.c (generate_bytecode_insns): Likewise.
2249 * typeck.c (convert_ieee_real_to_integer): Likewise.
2251 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
2253 * java-tree.h (builtin_function): Declare.
2255 2004-07-16 Steven Bosscher <stevenb@suse.de>
2257 * parse.y (java_complete_expand_methods, java_expand_classes): Don't
2258 abuse restore_line_number_status.
2260 2004-07-15 Frank Ch. Eigler <fche@redhat.com>
2263 * jcf-parse.c (java_emit_static_constructor): Specify default
2266 2004-07-13 Per Bothner <per@bothner.com>
2268 * java-tree.h (all_class_filename): Remove useless macro.
2269 (enum java_tree_index): Remove JTI_ALL_CLASS_FILENAME constant.
2270 (BUILD_FILENAME_IDENTIFIER_NODE): Remove useless macro.
2271 * parse.y (java_parser_context_restore_global): Replace
2272 BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
2273 * jcf-parse.c (read_class, java_parse_file): Likewise.
2275 2004-07-12 Bryce McKinlay <mckinlay@redhat.com>
2278 gjavah.c (print_field_info): Emit constant only if field is static.
2280 2004-07-11 Roger Sayle <roger@eyesopen.com>
2282 * expr.c (java_truthvalue_conversion, flush_quick_stack,
2283 java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
2284 build_java_ret, build_java_throw_out_of_bounds_exception,
2285 build_java_array_length_access, java_check_reference,
2286 build_java_arrayaccess, build_java_arraystore_check, build_newarray,
2287 build_anewarray, expand_java_multianewarray, expand_java_arraystore,
2288 expand_java_arrayload, build_java_monitor, expand_java_return,
2289 expand_load_internal, expand_java_NEW, build_get_class,
2290 build_instanceof, expand_java_CHECKCAST, expand_iinc,
2291 build_java_soft_divmod, build_java_binop, build_field_ref,
2292 expand_compare, expand_java_goto, expand_java_switch,
2293 expand_java_add_case, build_class_init, build_known_method_ref,
2294 invoke_build_dtable, build_invokevirtual, build_invokeinterface,
2295 expand_invoke, build_jni_stub, expand_java_field_op,
2296 java_expand_expr, expand_byte_code, STORE_INTERNAL,
2297 force_evaluation_order, emit_init_test_initialization): Convert
2298 calls to "build" into calls to the prefered "buildN" functions.
2300 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
2302 * java-tree.h (set_block): Remove.
2303 * lang.c (java_clear_binding_stack): New.
2304 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
2305 * decl.c (struct binding_level): Remove this_block.
2306 (clear_binding_level): Likewise.
2307 (poplevel): Don't handle this_block.
2308 (set_block): Remove.
2310 2004-07-10 Bryce McKinlay <mckinlay@redhat.com>
2312 * class.c (common_enclosing_context_p): Remove statement with no
2315 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2318 * parse.y (create_anonymous_class): Remove 'location' argument. Use
2319 the WFL from TYPE_NAME to get line number for the decl. Fix comment.
2320 (craft_constructor): Inherit access flags for implicit constructor
2321 from the enclosing class.
2322 (create_class): Fix comment typo.
2323 (resolve_qualified_expression_name): Pass type of qualifier to
2324 not_accessible_p, not the type in which target field was found.
2325 (not_accessible_p): Handle inner classes. Expand protected
2326 qualifier-subtype check to enclosing instances, but don't apply this
2327 check to static members. Allow protected access to inner classes
2328 of a subtype. Allow private access within common enclosing context.
2329 (build_super_invocation): Get WFL line number info from current
2331 (build_incomplete_class_ref): Update for new create_anonymous_class
2333 * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
2334 common_enclosing_instance_p.
2335 * class.c (common_enclosing_context_p): New. Determine if types
2336 share a common enclosing context, even across static contexts.
2337 (common_enclosing_instance_p): Renamed from
2338 common_enclosing_context_p. Determines if types share a common
2339 non-static enclosing instance.
2340 * java-tree.h (common_enclosing_instance_p): Declare.
2341 * jcf-write.c (get_method_access_flags): New. Surpress private flag
2342 for inner class constructors.
2343 (generate_classfile): Use get_method_access_flags.
2345 2004-07-09 Bryce McKinlay <mckinlay@redhat.com>
2347 * class.c (interface_of_p): Check for null TYPE_BINFO.
2349 2004-07-09 Nathan Sidwell <nathan@codesourcery.com>
2351 * class.c (make_class): Do not create binfo here.
2352 (set_super_info): Create it here.
2353 * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
2355 2004-07-08 Richard Henderson <rth@redhat.com>
2357 * expr.c (case_identity, get_primitive_array_vtable,
2358 java_expand_expr, emit_init_test_initialization): Remove.
2359 * java-tree.h (java_expand_expr): Remove.
2360 * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
2362 2004-07-07 Per Bothner <per@bothner.com>
2364 * class.c (build_static_field_ref): Add a NOP_EXPR; otherwise we
2365 get internal error due to mismatched types.
2367 * gcj.texi (Invoking gij): Document new -verbose:class flag.
2369 * gcj.texi (Linking): New node. Document -lgij usage.
2371 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
2373 * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
2374 (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
2375 * java/class.c (set_super_info, class_depth, interface_of_p,
2376 maybe_add_interface, add_interface, make_class_data,
2377 layout_class, add_miranda_methods): Adjust BINFO macros.
2378 * expr.c (can_widen_reference_to, lookup_field): Likewise.
2379 * jcf-write.c (generate_classfile): Likewise.
2380 * parse.y (patch_anonymous_class,
2381 check_inner_circular_reference, check_circular_reference,
2382 java_complete_class, check_abstract_method_definitions,
2383 java_check_abstract_method_definitions,
2384 check_interface_throws_clauses, java_check_abstract_methods,
2385 lookup_java_interface_method2,
2386 find_applicable_accessible_methods_list): Likewise.
2387 * typeck.c (find_method_in_interface): Likewise.
2388 * verify.c (merge_types): Likewise.
2390 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
2392 * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
2393 * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
2395 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
2397 * class.c (make_class): Use make_tree_binfo.
2398 (set_super_info, add_interface_do): Likewise.
2399 * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
2401 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2403 * verify.c: Correct array element access formatting thinko.
2405 2004-07-04 Ranjit Mathew <rmathew@hotmail.com>
2407 * verify.c: Insert a short blurb at the start referring to the JVMS.
2408 (merge_type_state): Remove redundant nested if statement.
2409 (verify_jvm_instructions): Ensure current_subr is initialised to
2411 Minor formatting fixes all over the place.
2413 2004-07-02 Richard Henderson <rth@redhat.com>
2415 * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
2417 2004-07-01 Richard Henderson <rth@redhat.com>
2419 * class.c (registerClass_libfunc): Remove.
2420 (init_class_processing): Don't set it.
2421 (emit_register_classes): Take list_p parameter. Fill it in
2422 with _Jv_RegisterClass calls.
2423 * decl.c (java_init_decl_processing): Don't call
2424 init_resource_processing.
2425 * jcf-parse.c (java_emit_static_constructor): New.
2426 (java_parse_file): Call it.
2427 * resource.c (registerResource_libfunc): Remove.
2428 (init_resource_processing): Remove.
2429 (write_resource_constructor): Take list_p parameter. Fill it in
2430 with _Jv_RegisterResource calls.
2431 * java-tree.h: Update prototypes.
2433 2004-06-29 Bryce McKinlay <mckinlay@redhat.com>
2436 * class.c (layout_class_method): Do not override package-private
2437 method if its in a different package.
2438 (split_qualified_name): Move here from parse.y. Rename from
2439 breakdown_qualified. Add comment.
2440 (in_same_package): Move here from parse.y. Add comment.
2441 * java-tree.h (break_down_qualified, in_same_package): Declare.
2442 (in_same_package): Likewise.
2443 * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
2446 2004-06-29 Andrew Haley <aph@redhat.com>
2448 * except.c (expand_start_java_handler): Push a new binding level.
2449 Don't build a TRY_CATCH_EXPR now, we'll do it later. Call
2450 register_exception_range() to register where we'll do it.
2451 (expand_end_java_handler): Remove old bogus code. Replace with
2452 new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2453 the top of the expression we're curently building.
2454 (maybe_end_try): Delete.
2455 * decl.c (binding_level.exception_range): New field.
2456 (clear_binding_level): Add field exception_range. Reformat.
2457 (poplevel): Call expand_end_java_handler().
2458 (poplevel): Call java_add_stmt only if functionbody is false.
2459 (maybe_poplevels): Don't call maybe_end_try() from here.
2460 (end_java_method): Clear no longer used trees in function decl.
2461 (register_exception_range): New function.
2462 * java-tree.h (register_exception_range, struct eh_range): Declare.
2464 2004-06-28 Bryce McKinlay <mckinlay@redhat.com>
2466 * jcf-write.c (get_classfile_modifiers): Formatting fixes.
2468 2004-06-27 Ranjit Mathew <rmathew@hotmail.com>
2471 * expr.c (class_has_finalize_method): Fix method name indentation.
2472 (expand_java_call): Remove K&R style parameter declaration.
2473 (expand_invoke): Fix statement indentation.
2474 (expand_java_field_op): Likewise.
2475 * parse-scan.y: Fix typo.
2476 (reset_report): Fix method name indentation.
2477 * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
2479 * verify.c (verify_jvm_instructions): Document parameters, insert
2481 * lang.c (lang_init_source): Fix method name indentation.
2482 * class.c (common_enclosing_context_p): Likewise.
2483 (emit_symbol_table): Fix parameter list indentation.
2484 * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
2485 parameter declaration.
2486 * constants.c: Fix copyright notice indentation.
2487 * typeck.c (find_method_in_superclasses): Fix parameter list
2489 (find_method_in_interfaces): Likewise.
2490 * zextract.c (makelong): Fix method name indentation.
2492 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2495 * parse.y (create_interface): Set correct access modifiers for
2497 * jcf-write.c (get_classfile_modifiers): New function.
2498 (generate_classfile): Use get_classfile_modifiers, not
2501 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2503 * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
2504 dependency to current parser context, not NULL_TREE, for top-level
2506 (jdep_resolve_class): Enable member access check for all inner
2509 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2511 * parse.y (qualify_and_find): Pass type decl, not identifier, to
2514 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2517 * expr.c (expand_java_field_op): Ensure that target class for static
2518 field access has been loaded.
2520 2004-06-26 Bryce McKinlay <mckinlay@redhat.com>
2521 Ranjit Mathew <rmathew@hotmail.com>
2523 PR java/1207, java/16178
2524 * jcf-parse.c (load_class): Return immediately if passed a type decl
2525 where CLASS_FROM_SOURCE_P is set. Remove FIXME.
2526 * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
2527 before calling load_class.
2528 (qualify_and_find): Likewise.
2529 (find_in_imports_on_demand): Likewise.
2530 (find_applicable_accessible_methods_list): Likewise.
2532 2004-06-24 Bryce McKinlay <mckinlay@redhat.com>
2534 * parse.y (java_layout_seen_class_methods): Don't call load_class
2535 on class defined by source parser.
2537 2004-06-23 Bryce McKinlay <mckinlay@redhat.com>
2539 * parse.y (set_nested_class_simple_name_value): Removed.
2540 (java_complete_expand_class): Remove calls to
2541 set_nested_class_simple_name_value.
2543 2004-06-22 Andrew Haley <aph@redhat.com>
2544 Ranjit Mathew <rmathew@hotmail.com>
2546 Fixes PR java/16113.
2547 * decl.c (force_poplevels): Remove call to expand_end_bindings.
2549 2004-06-22 Ranjit Mathew <rmathew@hotmail.com>
2551 * parse.y (create_class): Correct diagnostic message about
2552 java.lang.Object extending anything else.
2554 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2556 * class.c (build_class_ref): Add new operand for COMPONENT_REF.
2557 (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
2558 * constants.c (build_ref_from_constant_pool): Likewise.
2559 * expr.c (build_java_array_length_access): Likewise.
2560 (build_get_class, build_field_ref, build_known_method_ref): Likewise.
2561 (invoke_build_dtable, build_invokevirtual): Likewise.
2562 (build_invokeinterface, java_expand_expr): Likewise.
2563 (emit_init_test_initialization): Likewise.
2564 * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2565 * parse.y (make_qualifed_name, build_array_ref): Likewise.
2567 2004-06-21 Andrew Haley <aph@redhat.com>
2569 * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
2572 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
2574 * jcf.h (struct JCF): Change java_source, right_zip and finished
2576 * lex.h (struct java_lexer): Change hit_eof, read_anything,
2577 byte_swap and use_fallback to unsigned int.
2578 * parse.h (struct _jdep): Change flag0 to unsigned int.
2580 2004-06-17 Ranjit Mathew <rmathew@hotmail.com>
2583 * parse.y (java_layout_seen_class_methods): Ensure class is loaded
2584 before trying to lay out its methods.
2585 * jcf-parse.c (read_class): Track parsed files using canonical paths
2586 obtained via lrealpath from libiberty.
2587 (java_parse_file): Likewise.
2588 (parse_source_file_1): Rename formal parameter to reflect its
2589 modified purpose. Minor formatting fix.
2591 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
2593 * class.c (emit_register_classes): Make the function uninlinable,
2594 do not set current_function_cannot_inline.
2595 * resource.c (write_resource_constructor): Do not reset
2596 flag_inline_functions around rest_of_compilation.
2598 2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
2601 * expr.c (java_truthvalue_conversion): Handle
2602 UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
2603 ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
2604 i.e. return the expression.
2606 2004-06-03 Mark G. Adams <mark.g.adams@sympatico.ca>
2608 * gjavah.c: Include version.h
2610 2004-05-31 Bryce McKinlay <mckinlay@redhat.com>
2612 * jcf-write.c (generate_bytecode_conditional): Correct handling
2613 of unordered conditionals. Add comment.
2615 2004-05-29 Ranjit Mathew <rmathew@hotmail.com>
2616 Per Bothner <per@bothner.com>
2618 * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
2619 local variable was initialised upon declaration.
2620 * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
2621 variable was final and initialised upon declaration.
2622 * check-init.c (check_final_reassigned): Give error only if a blank
2623 final is not definitely unassigned or if an initialised final is
2625 (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
2626 assignment expressions. Remove case MODIFY_EXPR, label do_default.
2627 (check_init): Perform initialised-variable-removing-optimisation
2628 only on non-final local variables.
2630 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2632 * jcf-write.c (generate_bytecode_conditional): Handle binops
2633 UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
2635 (generate_bytecode_insns): Likewise.
2637 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2639 * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
2640 UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
2642 2004-05-28 Bryce McKinlay <mckinlay@redhat.com>
2644 * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
2645 (Mixing with C++): Document JvAllocBytes and RawDataManaged.
2647 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2649 * decl.c (struct binding_level): Add GTY marker. Compile
2650 binding_depth unconditionally.
2651 (current_binding_level, free_binding_level, global_binding_level):
2653 (clear_binding_level): Unconditionally set binding_depth.
2654 (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
2656 2004-05-26 Bryce McKinlay <mckinlay@redhat.com>
2658 * lex.c (java_new_lexer): Set 'encoding'.
2659 (java_read_char): Improve error message for unrecognized characters.
2660 * lex.h (struct java_lexer): New field 'encoding'.
2662 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
2664 * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
2666 2004-05-21 Mark Wielaard <mark@klomp.org>
2668 * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
2671 2004-05-19 Paolo Bonzini <bonzini@gnu.org>
2673 * typeck.c: Remove non-printable character 160.
2675 2004-05-17 Ranjit Mathew <rmathew@hotmail.com>
2677 * check-init.c: Correct minor typos.
2679 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2681 * Make-lang.in, expr.c, java-gimplify.c: Rename
2682 tree-simple.[ch] to tree-gimple.[ch].
2684 2004-05-14 Ranjit Mathew <rmathew@hotmail.com>
2686 * java-gimplify.c (java_gimplify_expr): Correct minor typos.
2688 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2690 Merge from tree-ssa-20020619-branch. See
2691 ChangeLog.tree-ssa for details.
2693 * Make-lang.in, builtins.c, check-init.c, class.c,
2694 constants.c, decl.c, except.c, expr.c, java-except.h,
2695 java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
2696 lang.c, lang.opt, parse.y, resource.c: Merged.
2697 * java-gimplify.c: New file.
2699 2004-05-10 Andrew Haley <aph@redhat.com>
2701 * parse.y (create_class): Set TYPE_VFIELD.
2702 * decl.c (java_init_decl_processing): Likewise.
2704 * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
2705 * class.c (make_method_value): Replace DECL_VINDEX with call to
2707 (get_dispatch_vector): Likewise.
2708 (layout_class_method): Likewise.
2709 Replace set of DECL_VINDEX with call to set_method_index().
2710 (set_method_index): New function.
2711 (get_method_index): New function.
2712 * java-tree.h (set_method_index): New function decl.
2713 (get_method_index): New function decl.
2715 2004-05-10 Andrew Pinski <pinskia@physics.uc.edu>
2717 * parse.y (check_pkg_class_access): Add new argument
2718 and use it when cl is NULL to call lookup_cl on it.
2719 (parser_check_super_interface): Do not call lookup_cl.
2720 Pass this_decl to check_pkg_class_access and NULL
2721 instead of lookup_cl.
2722 (parser_check_super): Update for change in
2723 check_pkg_class_access.
2724 (do_resolve_class): Likewise.
2725 (process_imports): Likewise.
2726 (find_in_imports_on_demand): Likewise.
2727 (resolve_qualified_expression_name): Likewise.
2729 2004-05-06 Ranjit Mathew <rmathew@hotmail.com>
2731 Fixes PR java/9685, PR java/15073
2732 * parse.y (accessibility_string): New method.
2733 (not_accessible_field_error): Use accessibility_string()
2734 instead of java_accstring_lookup().
2735 (resolve_qualified_expression_name): Check with
2736 check_pkg_class_access() before allowing access using
2739 Use check_pkg_class_access() instead of not_accessible_p()
2740 for unqualified types.
2741 (not_accessible_p): Use DECL_CONTEXT (member) instead of
2742 REFERENCE for package-private access checking.
2743 (patch_method_invocation): Use accessibility_string() instead
2744 of java_accstring_lookup().
2746 2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
2749 * gjavah.c (struct method_name): Add member is_native.
2750 (overloaded_jni_method_exists_p): Match candidate method only if
2752 (print_method_info): Initialise is_native flag from the method's
2755 2004-04-30 Roger Sayle <roger@eyesopen.com>
2757 * builtins.c (java_builtins): Add acos, asin, ceil and floor.
2758 (initialize_builtins): Likewise, define acos, asin, ceil and floor.
2760 2004-04-22 Roger Sayle <roger@eyesopen.com>
2762 * resource.c (write_resource_constructor): Guard call to possibly
2763 NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
2765 2004-04-19 Bryce McKinlay <mckinlay@redhat.com>
2767 * class.c (make_class_data): Add new field aux_info.
2768 * decl.c (java_init_decl_processing): Push type and decl for
2771 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2773 * expr.c (expand_java_NEW): Don't use size argument for
2774 _Jv_AllocObject calls.
2775 * parse.y (patch_invoke): Likewise.
2777 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2779 * expr.c (build_invokeinterface): Remove unused variables to
2782 2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
2784 * class.c (get_interface_method_index): New function. Return dispatch
2785 index for interface method.
2786 (make_method_value): For interface methods, set index field to
2787 iface dispatch index, not DECL_VINDEX.
2788 * expr.c (build_invokeinterface): Use get_interface_method_index.
2790 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2792 * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
2794 2004-03-31 Andrew Haley <aph@redhat.com>
2797 * jcf-io.c (opendir_in_zip): Tidy up error handling.
2799 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2801 * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
2802 form of GTY markers.
2804 2004-03-25 Marcus Meissner <meissner@suse.de>
2807 * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
2809 2004-03-23 Tom Tromey <tromey@redhat.com>
2812 * jcf-write.c (make_class_file_name): Don't report if mkdir
2815 2004-03-23 Tom Tromey <tromey@redhat.com>
2817 * gcj.texi (Extensions): Document GCJ_PROPERTIES.
2819 2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
2821 * class.c, gjavah.c, lang.c: Fix comment typos.
2822 * gcj.texi: Fix typos.
2824 2004-03-19 Per Bothner <per@bothner.com>
2826 * gcj.texi (Code Generation): Document new flags and assert defaults.
2828 * class.c (assume_compiled_node_struct): Rename type to
2829 class_flag_node_struct, as it is now also used for enable_assertions.
2830 Rename assume_compiled_node typedef. Rename excludep field to value.
2831 (find_assume_compiled_node): Rename function to find_class_flag_node.
2832 Minor optimization - avoid needless strlen.
2833 (add_assume_compiled): Some tweaking and optimization.
2834 Rename and generalize to add_class_flag takem an extra parameter.
2835 (add_assume_compled): New just calls add_class_flag.
2836 (add_enable_assert, enable_assertions): New functions.
2837 (enable_assert_tree): New static.
2838 * java-tree.h (add_enable_assert, enable_assertions): New declarations.
2839 * lang.opt (fenable-assertions, fenable-assertions=,
2840 fdisable-assertions, fdisable-assertions=): New options.
2841 * lang.c (java_handle_option): Handle new options.
2842 * parse.y (build_incomplete_class_ref): Handle class$ in an inner
2843 class in an interface - create helper class nested in outer interface.
2844 (build_assertion): Short-circuit if enable_assertions is false.
2846 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2848 * java-tree.h: Changes throughout to add checking to macros
2849 and numerous whitespace changes.
2850 (VAR_OR_FIELD_CHECK): New macro.
2851 * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
2852 FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
2854 2004-03-16 Per Bothner <per@bothner.com>
2856 * jcf-jump.c (options): New --print-constants option.
2857 * gcj.texi (Invoking jcf-dump): Document --print-constants.
2859 * jcf-dump.c (flag_print_constant_pool): Default to off.
2860 (print_constant_terse_with_index): New helper function.
2861 (various places): Check flag_print_constant_pool where missing.
2862 (main): If verbose set flag_print_constant_pool.
2863 (HANDLE_INNERCLASSES_ATTRIBUTE): Null inner class name is anonymous.
2865 2004-03-15 Andrew Haley <aph@redhat.com>
2868 * parse.y (java_complete_lhs): Check that final variable has an
2871 2004-03-12 Andrew Haley <aph@redhat.com>
2874 * typeck.c (convert): Clear TREE_OVERFLOW after an integer
2877 2004-02-29 Roger Sayle <roger@eyesopen.com>
2879 * jcf-parse.c (java_parse_file): Handle the case that input_filename
2882 2004-02-27 Per Bothner <per@bothner.com>
2884 * parse.y (build_assertion): Re-do 02-25 change following Jeff Sturm
2885 suggestion: Use build_incomplete_class_ref.
2886 This fixes PR java/13508, java/11714.
2888 2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
2890 * java/parse.h: Update copyright.
2892 2004-02-26 Andrew Haley <aph@redhat.com>
2895 * parse.y (check_interface_throws_clauses): Check for
2896 !METHOD_INVISIBLE (iface_method).
2897 * class.c (layout_class_methods): Check for CLASS_INTERFACE as
2898 well as CLASS_ABSTRACT.
2900 2004-02-25 Per Bothner <per@bothner.com>
2902 * parse.y (build_assertion): If we're in an inner class, create the
2903 class$ helper routine in the outer class.
2905 2004-02-19 Richard Henderson <rth@redhat.com>
2907 * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
2909 2004-02-16 Geoffrey Keating <geoffk@apple.com>
2911 * Make-lang.in (java.install-man): Add extra dependencies.
2913 2004-02-13 Geoffrey Keating <geoffk@apple.com>
2915 * Make-lang.in: Install man pages under the same names
2916 (possibly transformed) as the program they document.
2918 2004-02-10 Joseph S. Myers <jsm@polyomino.org.uk>
2920 * gjavah.c: Include "intl.h".
2921 (error): New function.
2922 (main): Call gcc_init_libintl.
2923 (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
2924 print_stub_or_jni, process_file, main): Use error rather than
2926 (print_method_info, usage, help, version, main): Mark strings for
2927 translation with _. Avoid splitting up sentences. Send
2928 information messages to stdout.
2929 * jcf-dump.c: Include "intl.h".
2930 (main): Call gcc_init_libintl.
2931 (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
2932 Mark error, usage and version messages for translation with _.
2933 Avoid splitting up sentences.
2934 * jv-scan.c: Include "intl.h".
2935 (fatal_error, warning): Change parameter s to msgid. Translate
2937 (main): Call gcc_init_libintl.
2938 (usage, help, version): Mark error, usage and version messages for
2939 translation with _. Avoid splitting up sentences.
2940 * jvgenmain.c: Include "intl.h".
2941 (main): Call gcc_init_libintl.
2942 (usage, main): Mark error messages for translation with _.
2943 * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
2944 JVGENMAIN_OBJS): Add intl.o.
2945 (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
2946 java/jvgenmain.o): Update dependencies.
2948 2004-02-08 Per Bothner <per@bothner.com>
2950 * parse.y (resolve_qualified_expression_name): In case of inaccessible
2951 class don't use not_accessible_field_error, which can get confused.
2953 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
2955 Make-lang.in (po-generated): Delete.
2957 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
2959 * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
2961 * decl.c: Include target.h.
2962 (start_java_method): Replace PROMOTE_PROTOTYPES with
2963 targetm.calls.promote_prototypes.
2964 * expr.c: Include target.h.
2965 (pop_arguments): Replace PROMOTE_PROTOTYPES with
2966 targetm.calls.promote_prototypes.
2967 * parse.y: Include target.h.
2968 (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
2969 with targetm.calls.promote_prototypes.
2971 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
2973 * typeck.c: Update copyright.
2975 2004-02-02 Tom Tromey <tromey@redhat.com>
2977 * decl.c (java_init_decl_processing): Remove duplicate
2980 2004-01-30 Kelley Cook <kcook@gcc.gnu.org>
2982 * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
2984 2004-01-28 Andrew Pinski <pinskia@physics.uc.edu>
2986 * expr.c (build_field_ref): Move variable
2989 2004-01-28 Andrew Haley <aph@redhat.com>
2991 * expr.c (build_field_ref): Widen field offset.
2993 2004-01-27 Andrew Haley <aph@redhat.com>
2996 * parse.y (check_interface_throws_clauses): Make sure class_decl
2999 2004-01-22 Jeff Sturm <jsturm@one-point.com>
3002 * parse.y (patch_assignment): Don't modify lhs_type for
3003 reference assignments.
3005 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3007 * Make-lang.in: Replace $(docdir) with doc.
3008 (java.info, java.srcinfo, java.man, java.srcman): New rules.
3009 (java.install-man): Revamp rule.
3011 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3013 * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3014 GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3015 instead of deferred backquote.
3017 2004-01-16 Andrew Pinski <pinskia@physics.uc.edu>
3019 * typeck.c (find_method_in_interfaces): Move variable
3022 2004-01-16 Andrew Haley <aph@redhat.com>
3025 * typeck.c (shallow_find_method): New.
3026 (find_method_in_superclasses): New.
3027 (find_method_in_interfaces): New.
3028 (lookup_do): Rewrite.
3029 * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3031 * jcf-parse.c (read_class): Save and restore output_class.
3032 * decl.c (java_expand_body): Set output_class from fndecl.
3034 2004-01-15 Michael Chastain <mec.gnu@mindspring.com>
3036 * class.c (gen_indirect_dispatch_tables): Fix string length
3039 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3041 * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3042 (java.srcextra): Copy above back to source directory if requested.
3043 (po-generated): Delete reference to $(parsedir).
3044 (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3047 2004-01-14 Jan Hubicka <jh@suse.cz>
3049 * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3052 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3054 * java-tree.h (java_expand_expr): Change prototype.
3055 * expr.c (java_expand_expr): Add alt_rtl parameter.
3057 2004-01-09 Andrew Haley <aph@redhat.com>
3060 * parse.y (java_fix_constructors): Set output_class.
3061 (java_reorder_fields): Likewise.
3062 (java_layout_classes): Likewise.
3063 (java_expand_classes): Generate indirect dispatch tables.
3064 (java_expand_classes): Set output_class.
3065 (java_finish_classes): Likewise.
3066 * lang.c (java_init): Turn on always_initialize_class_p if we're
3067 using indirect dis[atch.
3068 (java_decl_ok_for_sibcall): Use output_class, not current_class.
3069 (java_get_callee_fndecl): Use class local atable.
3071 (always_initialize_class_p): Decl moved to java-tree.h.
3072 (HANDLE_CLASS_INFO): Set output_class.
3073 (read_class): Likewise.
3074 (parse_class_file): Call gen_indirect_dispatch_tables.
3075 (parse_zip_file_entries): Set output_class.
3076 (java_parse_file): Set output_class. Don't emit symbol tables.
3077 * java-tree.h (output_class): New.
3078 Remove global declarations for otable, atable, and ctable.
3079 (always_initialize_class_p): moved here from decl.c.
3081 (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3082 TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3083 TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3084 (struct lang_type): Add otable_methods, otable_decl,
3085 otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3086 ctable_decl, catch_classes, type_to_runtime_map.
3087 * expr.c (build_field_ref): Make otable, atable, and ctable class
3088 local rather than global.
3089 (build_known_method_ref): Likewise.
3090 (build_invokeinterface): Likewise.
3091 (java_expand_expr): Pass runtime type (rather than actual type) to
3093 * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3094 this class. Look up each class in that map to delete duplicates.
3095 (expand_end_java_handler): Pass runtime type (rather than actual
3096 type) to expand_start_catch.
3097 * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3099 (java_init_decl_processing): Rearrange things. Remove global
3100 declarations of otable, atable, and ctable.
3101 (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3102 (java_expand_body): Set output_class.
3103 * constants.c (build_constant_data_ref): Use output_class, not
3105 (alloc_name_constant): Likewise.
3106 * class.c (gen_indirect_dispatch_tables): New.
3107 (build_class_ref): Generate hard reference to superclass, even if
3108 using indirect dispatch.
3109 (build_static_field_ref): Use class local atable.
3110 (make_class_data): Generate hard reference to superclass, even if
3111 using indirect dispatch.
3112 Generate symbolic references to interfaces when using indirect
3114 (make_class_data): Emit otable, atable, and ctable.
3115 Make otable, atable, and ctable class local rather than global.
3116 (emit_catch_table): Make otable, atable, and ctable class local
3119 2003-12-25 Andrew Pinski <pinskia@physics.uc.edu>
3121 * parse.y (catch_clause_parameter): Fix typo.
3124 * parse.y: (catch_clause_parameter): Return early if $3, aka
3125 formal_parameter, is null.
3127 2003-12-20 Kazu Hirata <kazu@cs.umass.edu>
3129 * class.c: Remove uses of "register" specifier in
3130 declarations of arguments and local variables.
3133 * gjavah.c: Likewise.
3134 * jcf-dump.c: Likewise.
3135 * jcf-io.c: Likewise.
3136 * jcf-parse.c: Likewise.
3137 * jcf-write.c: Likewise.
3138 * keyword.h: Likewise.
3139 * parse.y: Likewise.
3140 * typeck.c: Likewise.
3141 * verify.c: Likewise.
3143 2003-12-06 Kelley Cook <kcook@gcc.gnu.org>
3145 * Make-lang.in (GCJ_CROSS_NAME): Delete.
3146 (java.install_common, java.install-man): Adjust for above.
3147 (java.uninstall): Likewise.
3149 2003-12-03 Michael Koch <konqueror@gmx.de>
3151 * class.c (make_class_data):
3152 Push field value to 'hack_signers' instead of 'signers'.
3153 * decl.c (java_init_decl_processing):
3154 Push field 'hack_signers' instead of 'signers'.
3156 2003-12-03 Zack Weinberg <zack@codesourcery.com>
3158 * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
3161 2003-12-03 Ralph Loader <rcl@ihug.co.nz>
3164 * parse.y (qualify_ambiguous_name): Remove lots of broken
3165 field access processing - there's no need to do that here,
3166 because we have resolve_field_access. Remove
3167 RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
3168 * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
3171 2003-12-01 Jeff Sturm <jsturm@one-point.com>
3174 * parse.y (java_complete_lhs): Save location prior to patching
3177 2003-11-25 Mohan Embar <gnustuff@thisiscool.com>
3180 * resource.c (write_resource_constructor): Append
3181 "_resource" to constructor identifier name.
3183 2003-11-25 Jeff Sturm <jsturm@one-point.com>
3186 * constants.c (cpool_for_class): New function.
3187 (outgoing_cpool): Remove global variable.
3188 (alloc_name_constant): Use cpool_for_class.
3189 (build_constants_constructor): Likewise.
3190 * decl.c (java_expand_body): Set current_class.
3191 * java-tree.h (outgoing_cpool) Remove declaration.
3192 (init_outgoing_cpool): Likewise.
3193 * jcf-parse.c (init_outgoing_cpool): Remove function.
3194 (parse_class_file): Don't call init_outgoing_cpool.
3195 * parse.y (java_complete_expand_methods): Don't call
3196 init_outgoing_cpool. Don't save outgoing_cpool.
3197 (java_expand_classes): Don't restore outgoing_cpool.
3198 (java_finish_classes): Likewise.
3200 2003-11-24 Mohan Embar <gnustuff@thisiscool.com>
3202 * Make-lang.in: (java.install-common) Add
3203 symlink for $(target_noncanonical)-gcjh for
3206 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3208 * Make-lang.in (java.extraclean): Delete.
3210 2003-11-20 Joseph S. Myers <jsm@polyomino.org.uk>
3212 * Make-lang.in (check-java): Add.
3214 2003-11-19 Jeff Sturm <jsturm@one-point.com>
3217 * except.c (prepare_eh_table_type): Allocate variable-sized
3218 buffer `buf' with alloca.
3220 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3224 decl.c (java_init_decl_processing): Don't initialize
3225 class_not_found_type_node, no_class_def_found_type_node.
3227 java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
3228 JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
3229 (class_not_found_type_node, no_class_def_found_type_node):
3232 parse.y (build_dot_class_method_invocation): Add this_class
3233 argument. Qualify method invocations to a different class.
3234 (create_new_parser_context): Initialize saved_data_ctx to 0.
3235 (java_parser_context_save_global): Initialize saved_data_ctx to 1.
3236 (build_dot_class_method): Don't load classes. Register
3238 (build_incomplete_class_ref): Special cases for interfaces
3239 and inner classes. Move build_dot_class_method call to here...
3240 (patch_incomplete_class_ref): ...from here. Pass current_class
3241 to build_dot_class_method_invocation.
3242 (build_assertion): Pass class_type to
3243 build_dot_class_method_invocation.
3244 (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
3246 2003-11-17 Jeff Sturm <jsturm@one-point.com>
3249 * java-tree.h (BLOCK_EMPTY_P): Define.
3250 * parse.y (java_complete_lhs): Check for empty blocks
3251 in TRY_FINALLY_EXPR case.
3253 2003-11-17 Andrew Haley <aph@redhat.com>
3255 * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
3256 (struct lang_decl_var:freed): New variable.
3257 * decl.c (poplevel): Mark local vars that have gone out of scope.
3258 (push_jvm_slot): Don't use the RTL of a var that has gone out of
3261 2003-11-16 Jason Merrill <jason@redhat.com>
3263 * Make-lang.in (java.tags): Create TAGS.sub files in each directory
3264 and TAGS files that include them for each front end.
3266 2003-11-15 Tom Tromey <tromey@redhat.com>
3268 * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
3270 2003-11-12 Jason Merrill <jason@redhat.com>
3272 PR optimization/12547
3273 * lang.c (java_tree_inlining_walk_subtrees): Just walk
3274 BLOCK_EXPR_BODY directly.
3276 2003-11-12 Andrew Haley <aph@redhat.com>
3279 * parse.y (fold_constant_for_init): Check that we really do have a
3283 * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
3284 init_test_decls being inlined.
3287 * parse.y (do_resolve_class): Check return value from
3288 breakdown_qualified().
3290 2003-11-11 Tom Tromey <tromey@redhat.com>
3293 * parse.y (merge_string_cste): Handle case where we have a
3294 pointer that happens to be zero, not null_pointer_node.
3296 2003-11-10 Tom Tromey <tromey@redhat.com>
3298 * jcf-parse.c (classify_zip_file): Correctly compare
3299 filename_length against length of manifest file's name.
3301 2003-11-08 Tom Tromey <tromey@redhat.com>
3304 * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
3306 2003-11-06 Andrew Haley <aph@redhat.com>
3308 * expr.c (java_stack_swap): Make sure destination stack slots are
3309 of the correct type.
3311 2003-11-03 Kelley Cook <kcook@gcc.gnu.org>
3313 * Make-lang.in (dvi): Move targets to $(docobjdir).
3314 (gcj.dvi): Simplify rule and adjust target.
3315 (gcj.info): Simplify rule.
3316 (gcj.pod): New intermediate rule.
3317 (gcjh.pod): Likewise.
3318 (jv-scan.pod): Likewise.
3319 (jcf-dump.pod): Likewise.
3320 (gij.pod): Likewise.
3321 (jv-convert.pod): Likewise.
3322 (rmic.pod): Likewise.
3323 (rmiregistry.pod): Likewise.
3326 (jv-scan.1): Delete.
3327 (jcf-dump.1): Delete.
3329 (jv-convert.1): Delete.
3331 (rmiregistry.1): Delete.
3333 2003-11-02 Jeff Sturm <jsturm@one-point.com>
3335 Fixes PR java/12866.
3336 * parse.y (resolve_qualified_expression_name): Move test
3337 for outer field access methods from here...
3338 (check_thrown_exceptions) ...to here.
3340 2003-11-01 Kelley Cook <kcook@gcc.gnu.org>
3342 * .cvsignore: Delete.
3344 2003-10-28 Frank Ch. Eigler <fche@redhat.com>
3346 * verify.c (verify_jvm_instructions): Don't warn about legal
3347 eh binding regions generated for example by jdk 1.4.1.
3349 2003-10-24 David S. Miller <davem@redhat.com>
3351 * jcf-parse.c (jcf_parse): Fix args to fatal_error().
3353 2003-10-22 Andrew Haley <aph@redhat.com>
3355 * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
3356 (java_get_callee_fndecl): New.
3358 * jcf-parse.c (java_parse_file): Call emit_catch_table().
3360 * java-tree.h (ctable_decl): New.
3361 (catch_classes): New.
3362 (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
3364 * decl.c (java_init_decl_processing): Add catch_class_type.
3366 Add catch_classes field.
3368 * class.c (build_indirect_class_ref): Break out from
3370 (make_field_value): Check flag_indirect_dispatch.
3371 (make_class_data): Ditto.
3372 Tidy uses of PUSH_FIELD_VALUE.
3373 Add field catch_classes.
3374 (make_catch_class_record): New.
3376 * java-tree.h (PUSH_FIELD_VALUE): Tidy.
3378 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3380 * jcf-write.c: Follow spelling conventions.
3381 * parse.y: Likewise.
3383 2003-10-22 Kazu Hirata <kazu@cs.umass.edu>
3385 * ChangeLog: Fix typos.
3386 * expr.c: Fix comment typos.
3387 * jcf-write.c: Likewise.
3390 * mangle.c: Likewise.
3391 * parse-scan.y: Likewise.
3392 * parse.y: Likewise.
3394 2003-10-22 Tom Tromey <tromey@redhat.com>
3396 * expr.c (expand_byte_code): Only warn about dead bytecode when
3397 extra_warnings is set.
3399 2003-10-22 Bryce McKinlay <bryce@mckinlay.net.nz>
3401 Fix for PR java/12586.
3402 * mangle.c (find_compression_record_match): Don't iterate through
3403 package namespace elements unless they all match compression_table
3406 2003-10-20 Kelley Cook <kcook@gcc.gnu.org>
3408 * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
3409 (generate-manpages): Likewise.
3410 (java.maintainer-clean): Likewise.
3411 (gcj.info): Likewise.
3414 (jv-scan.1): Likewise.
3415 (jcf-dump.1): Likewise.
3417 (jv-convert.1): Likewise.
3419 (rmiregistry.1): Likewise.
3420 (java.install-man): Likewise.
3421 (parse-scan.o): Move and define complete compile line.
3422 (parse.o): Likewise.
3423 (jcf-tree-inline.o): Move.
3425 2003-10-20 Mark Mitchell <mark@codesourcery.com>
3427 * Make-lang.in (info): Update dependencies.
3428 (java.install-info): Remove.
3429 ($(srcdir)/java/gcj.info): Replace with ...
3430 ($(docobjdir)/gcj.info): ... this.
3432 2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
3434 * Make-lang.in: Replace uses of $(target_alias) with
3435 $(target_noncanonical).