* tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new block.
[official-gcc.git] / gcc / java / ChangeLog
blob756fbcf7e4274368935ff24a8f15f70eb37ddb63
1 2006-09-12  Tom Tromey  <tromey@redhat.com>
3         * expr.c (push_value): Always flush quick stack.
5 2006-09-12  Tom Tromey  <tromey@redhat.com>
7         PR java/29013:
8         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
9         the push of the called method's return result.
11 2006-09-12  Tom Tromey  <tromey@redhat.com>
13         * jvspec.c (lang_specific_driver): Read spec file even if
14         -fsyntax-only.
16 2006-09-12  Tom Tromey  <tromey@redhat.com>
18         PR java/28754:
19         * expr.c (expand_java_field_op): Initialize field's declaring
20         interface if necessary.
22 2006-09-12  Tom Tromey  <tromey@redhat.com>
24         PR java/28892:
25         * expr.c (expand_java_field_op): No error for assignments not in
26         class initializer or constructor.
28 2006-08-22  Andrew Haley  <aph@redhat.com>
30         * decl.c (java_add_stmt): Give the statement list a type.
32 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
33             Bryce McKinlay  <bryce@mckinlay.net.nz>
35         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
37 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
39         PR java/8923
40         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
41         or '--' is used with a constant operand.
42         (java_complete_lhs): When processing a '++' or '--' expression,
43         don't call java_complete_tree but java_complete_lhs, so that a
44         static final variable operand is never replaced by its value. This
45         avoids an ICE later on.
46         (patch_unaryop): Fixed typo in comment.
48 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
50         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
52 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
54         * builtins.c (check_for_builtin): If a builtin could result in a
55         direct call being generated, don't use it if flag_indirect_dispatch
56         is set.
58 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
60         * gcj.texi (Invocation): Corrections for Invocation API example.
62 2006-07-04  Andrew Haley  <aph@redhat.com>
64         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
65         entry.
67 2006-06-21  Andrew Haley  <aph@redhat.com>
69         * java-tree.h (update_aliases): Remove
70         * expr.c (expand_iinc): Remove call to update_aliases().
71         (STORE_INTERNAL): Likewise.
72         * decl.c (update_aliases, initialize_local_variable) 
73         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
75 2006-06-19  Andrew Haley  <aph@redhat.com>
77         PR java/1305
78         PR java/27908
79         * expr.c (java_modify_addr_for_volatile): New function.
80         (expand_java_field_op): Handle volatile fields.
81         * java-gimplify.c (java_gimplify_component_ref): Call
82         java_modify_addr_for_volatile to give the field_ref the correct
83         volatile type.
84         (java_gimplify_modify_expr): Likewise.
85         * java-tree.h (java_modify_addr_for_volatile): New decl.
87 2006-06-17  Karl Berry  <karl@gnu.org>
89         * gcj.texi (@dircategory): Use "Software development" instead
90         of "Programming", following the Free Software Directory.
92 2006-06-16  Andrew Haley  <aph@redhat.com>
94         * class.c (make_class_data): When using flag_indirect_classes,
95         don't initialize the vtable of Class instances.
97 2006-06-09  Andrew Haley  <aph@redhat.com>
99         PR java/1305
100         PR java/27908
101         * builtins.c (initialize_builtins): Add __sync_synchronize().
102         * class.c (add_field): Mark volatile fields.
103         * java-gimplify.c (java_gimplify_expr): Call new functions to
104         handle self-modifying exprs and COMPONENT_REFs.
105         (java_gimplify_component_ref): New.
106         (java_gimplify_modify_expr): Add handling for volatiles.
108 2006-06-08  Tom Tromey  <tromey@redhat.com>
110         * gcj.texi (libgcj Runtime Properties): Document
111         gnu.gcj.user.realname.
113 2006-06-08  Andrew Haley  <aph@redhat.com>
115         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
116         get_symbol_table_index().
117         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
118         private method.
119         (build_known_method_ref): New arg: special.  Pass it to
120         get_symbol_table_index.
121         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
122         the method list.
123         (build_invokevirtual): New arg: special.  Pass it to
124         get_symbol_table_index.
125         (expand_invoke): New variable: special.
126         Pass it to maybe_rewrite_invocation().
127         Pass it to build_known_method_ref().
128         * class.c (build_symbol_entry): Add new arg: special.  Use it to
129         build the symbol table conbstructor.
130         (emit_symbol_table): Extract SPECIAL from the method list and pass
131         it to build_symbol_entry().
132         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
133         special accordingly.
135 2006-06-06  David Daney  <ddaney@avtrex.com>
137         * gcj.texi (libgcj Runtime Properties): Document
138         gnu.gcj.runtime.NameFinder.show_raw and
139         gnu.gcj.runtime.NameFinder.remove_unknown.
141 2006-06-06  Tom Tromey  <tromey@redhat.com>
143         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
144         synthetic, enum, annotation.
145         * jcf.h (ACC_BRIDGE): New macro.
146         (ACC_VARARGS): Likewise.
147         (ACC_SYNTHETIC): Likewise.
148         (ACC_ENUM): Likewise.
149         (ACC_ANNOTATION): Likewise.
151 2006-06-06  Mike Stump  <mrs@apple.com>
153         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
154         installing during build.
156 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
158         * gcj.texi (Extensions): Document the new gcj-dbtool-based
159         classname-to-library resolution mechanism.
160         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
161         mechanism deprecated.
162         (libgcj Runtime Properties): Document
163         gnu.gcj.runtime.VMClassLoader.library_control's new default.
165 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
167         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
168         bit wide type.
169         (jword): Define to uint64 on 64-bit arches.
170         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
172 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
174         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
175         typos.
177 2006-05-26  Tom Tromey  <tromey@redhat.com>
179         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
180         * verify-glue.c (vfy_class_type): New function.
181         * verify-impl.c (check_constant): Allow 'ldc class'.
182         * verify.h (vfy_class_type): Declare.
184 2006-05-25  Andrew Haley  <aph@redhat.com>
186         PR java/27756
187         * decl.c (maybe_pushlevels): When variable ranges are non-nested
188         update all lifetimes, not just the first one.
190 2006-05-24  Tom Tromey  <tromey@redhat.com>
192         * java-tree.h: Fixed flag documentation.
194 2006-05-24  Tom Tromey  <tromey@redhat.com>
196         PR libgcj/27729:
197         * jcf.h (ACC_INVISIBLE): Changed value.
199 2006-05-24  Andrew Haley  <aph@redhat.com>
201         PR java/27754
202         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
203         COMPOUND_EXPR.
205 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
207         * lang.opt (femit-class-file): Remove VarExists.
209 2006-05-16  Tom Tromey  <tromey@redhat.com>
211         * verify-impl.c (verify_instructions_0) <op_return>: Special case
212         for Object.<init>.
214 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
216         PR driver/26885
217         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
218         $(GCC_OBJS).
220 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
222         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
223         (java/expr.o): Replace target.h with $(TARGET_H).
224         (java/parse.o): Likewise.
226 2006-05-10  Andrew Haley  <aph@redhat.com>
228         * class.c (emit_indirect_register_classes): Fix comment.
230 2006-05-04  Tom Tromey  <tromey@redhat.com>
232         * java-tree.h (uses_jv_markobj_p): Declare.
233         * class.c (uses_jv_markobj_p): Removed.
234         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
235         (get_boehm_type_descriptor): Use it.
236         (uses_jv_markobj_p): Moved from class.c.  Return bool.
238 2006-05-04  Tom Tromey  <tromey@redhat.com>
240         * java-tree.def (THIS_EXPR): Now a tcc_expression.
242 2006-05-04  Andrew Haley  <aph@redhat.com>
244         * class.c (make_field_value): Always build_address_of fdecl if
245         there is an initializer.
247 2006-05-03  Andrew Haley  <aph@redhat.com>
249         PR libgcj/27352
250         * expr.c (maybe_rewrite_invocation): New function.
251         (rewrite_arglist_getclass): Likewise.
252         (rules): New.
253         (expand_invoke): Call maybe_rewrite_invocation.
254         * parse.y (patch_invoke): Likewise.
255         * java-tree.h: (maybe_rewrite_invocation): New function.
257 2006-04-21  Andrew Haley  <aph@redhat.com>
259         * lang.c (java_init): Handle flag_indirect_classes.
260         * jvgenmain.c: Use "class$$" instead of "class$".
261         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
262         DECLs.
263         (mangle_class_field): Special case "class$$" as well as "class$".
264         * constants.c (build_ref_from_constant_pool): If
265         flag_indirect_classes, generate a ref into the heap.
266         * decl.c (constants_field_decl_node,
267         constants_data_field_decl_node): New.
268         * class.c (build_static_class_ref): New.
269         (build_classdollar_field): Factor out from build_class_ref().
270         (make_field_value): Handle static fields in heap.
271         (make_class_data): Make sure we get a static ref to class.
272         Make class initializer const if flag_indirect_classes.
273         (register_class): Build a class_ref for initialization if
274         flag_indirect_classes.
275         (emit_indirect_register_classes): New.
277 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
279         * expr.c, gjavah.c: Fix comment typos.
281 2006-04-03  Andrew Haley  <aph@redhat.com>
283         PR java/26858
284         * expr.c (build_field_ref): Don't check the field offset if
285         flag_syntax_only.
287 2006-03-30  Andrew Haley  <aph@redhat.com>
289         PR java/26858
290         * lang.c (java_attribute_table): New.
291         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
292         * expr.c (build_field_ref): Add a null pointer check for all
293         fields of offset > 4k.  Don't do so for accesses via the this
294         pointer, which we know can never be null.
295         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
296         methods nonnull.
298 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
300         * Make-lang.in: Rename docdir to gcc_docdir.
302 2006-03-30  Tom Tromey  <tromey@redhat.com>
304         PR java/26042:
305         * parse.y (java_reorder_fields): Reset superclass field's size as
306         well.
308 2006-03-28  Tom Tromey  <tromey@redhat.com>
310         PR java/26390:
311         * parse.y (find_most_specific_methods_list): Added 'class'
312         argument.
313         (lookup_method_invoke): Updated.
315 2006-03-15  Tom Tromey  <tromey@redhat.com>
317         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
318         non-static method calls.
320 2006-03-15  David Daney  <ddaney@avtrex.com>
322         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
323         declaration.
325 2006-03-15  David Daney  <ddaney@avtrex.com>
327         * lang.opt (-freduced-reflection): New option.
328         * lang.c (java_post_options): Generate an error if
329         -freduced-reflection used with -fjni or -findirect-dispatch.
330         * java-tree.h (flag_reduced_reflection): Declare new variable.
331         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
332         if bitmap overflows and flag_reduced_reflection set.
333         * class.c (uses_jv_markobj_p): New function.
334         (make_class_data): Moved generation of vtable to before
335         reflection data, generate less reflection data if
336         flag_reduced_reflection set.
337         * gcj.texi: Document -freduced-reflection.
339 2006-03-15  Tom Tromey  <tromey@redhat.com>
341         PR java/26638:
342         * class.c (get_interface_method_index): Don't put <clinit> into
343         interface table.
345 2006-03-15  Tom Tromey  <tromey@redhat.com>
347         * parse.y (analyze_clinit_body): Ignore empty statements.
349 2006-03-08  David Daney  <ddaney@avtrex.com>
351         * gcj.texi: Document -static-libgcj option.
353 2006-02-20  Andrew Haley  <aph@redhat.com>
355         * jcf-parse.c (parse_class_file): Set input_location from
356         current_class.
358 2006-02-15  Andrew Haley  <aph@redhat.com>
360         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
361         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
362         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
364 2006-02-09  Andrew Haley  <aph@redhat.com>
366         PR java/26192
367         * expr.c (expand_invoke): Allow methods in arrays to be resolved
368         in their superclass.
370         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
371         array types.
372         
373 2006-02-08  Tom Tromey  <tromey@redhat.com>
375         PR java/22578:
376         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
377         * builtins.c (convert_real): New function.
378         (java_builtins): Handle Float.intBitsToFloat,
379         Float.floatToRawIntBits, Double.longBitsToDouble,
380         Double.doubleToRawLongBits.
382 2006-02-07  Andrew Haley  <aph@redhat.com>
384         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
385         class other than the one in which we expected to find it, ignore
386         the result.
388         PR java/25535
389         * constants.c (build_constants_constructor): move initializer into
390         first halfword on a 64-bit big-endian machine.
392 2006-02-04  Tom Tromey  <tromey@redhat.com>
394         PR java/25676:
395         * builtins.c (max_builtin): Skip floating point 'max'.
396         (min_builtin): Skip floating point 'min'.
397         (check_for_builtin): Never return NULL_TREE.
399 2006-02-04  Tom Tromey  <tromey@redhat.com>
401         PR java/26097:
402         * expr.c (push_type): Avoid side effect in gcc_assert.
404 2006-02-04  Roger Sayle  <roger@eyesopen.com>
406         * decl.c (java_init_decl_processing): Create char_type_node as a
407         regular INTEGER_TYPE node.
408         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
409         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
410         test for char_type_node and promoted_char_type_node as special
411         instances of INTEGER_TYPE tree codes.
412         (promote_type,build_java_signature): Likewise.
413         * jcf-write.c (adjust_typed_op): Likewise.
414         * mangle.c (mangle_type): Likewise.
415         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
416         * parse.h (JINTEGRAL_TYPE_P): Likewise.
418 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
420         * expr.c (java_stack_swap): Revert gcc_assert patch.
422 2006-02-03  Ben Elliston  <bje@au.ibm.com>
424         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
425         * typeck.c: Likewise.
426         * verify-impl.c: Likewise.
427         * class.c: Likewise.
428         * decl.c: Likewise.
429         * jcf-parse.c: Likewise.
430         * constants.c: Likewise.
431         * check-init.c: Likewise.
432         * jcf-write.c: Likewise.
433         * verify-glue.c: Likewise.
434         * mangle.c: Likewise.
435         * expr.c: Likewise.
436         * lang.c: Likewise.
437         * boehm.c: Likewise.
439 2006-02-01  Jan Hubicka  <jh@suse.cz>
441         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
442         * lang.c (java_init_options): Set no_unit_at_a_time_default.
444 2006-01-30  Andrew Haley  <aph@redhat.com>
446         PR java/21428
447         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
449 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
451         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
452         Update copyright notice dates.
454 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
456         * jvspec.c (lang_specific_spec_functions): Remove.
458 2006-01-06  Tom Tromey  <tromey@redhat.com>
460         * gcj.texi (Arrays): Added more documentation for
461         JvNewObjectArray.
462         (Primitive types): Correct information about primitive classes.
463         (Reference types): New node.
464         (Index): New node.
466 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
468         * jcf-parse.c (set_source_filename): Set the decl source location
469         even when returning early.
471 2005-12-15  Tom Tromey  <tromey@redhat.com>
472             Andrew Haley  <aph@redhat.com>
474         PR java/25429
475         * parse.y (resolve_expression_name): Don't generate accessor
476         methods for constant fields.
478 2005-12-13  Andrew Haley  <aph@redhat.com>
480         PR java/25366
481         PR java/25368
482         * class.c (maybe_layout_super_class): Update current_class before
483         calling do_resolve_class.
485 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
487         PR java/25330
488         * jcf-write.c (write_classfile): Use PID in temporary class
489         file. Save/restore errno when reporting error.
491 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
493         PR java/9861
494         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
495         to bare_function_type and including the return type
496         * builtins.c (initialize_builtins) : Change builtin mangled name
497         constants to conform to new mangling scheme
499 2005-12-08  Andrew Haley  <aph@redhat.com>
501         PR libgcj/25265
502         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
503         (soft_abstractmethod_node): New.
504         * expr.c (build_field_ref): Add in-line check for missing field.
505         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
507 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
509         * Make-lang.in (java.all.build, java.install-normal): Remove.
511 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
513         * Make-lang.in: Remove all dependencies on s-gtype, except for
514         gt-java-parse.h.
516 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
518         * class.c (build_utf8_ref, emit_register_classes): Use
519         switch_to_section and get_section.
521 2005-12-06  Tom Tromey  <tromey@redhat.com>
523         PR java/25283:
524         * parse.y (patch_new_array_init): Revert previous patch.
525         (lookup_method_invoke): Use size-less array type when creating an
526         anonymous constructor.
528 2005-12-05  Tom Tromey  <tromey@redhat.com>
530         * parse.y (patch_new_array_init): Don't set length on array.
532 2005-12-02  Richard Guenther  <rguenther@suse.de>
534         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
535         buildN instead of build.
536         * class.c (finish_class): Likewise.
537         * expr.c (java_create_object): Likewise.
539 2005-11-28  Tom Tromey  <tromey@redhat.com>
541         PR java/18278:
542         * expr.c (build_jni_stub): Unwrap the return value.
543         * java-tree.h (soft_unwrapjni_node): New define.
544         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
545         * decl.c (java_init_decl_processing): Initialize
546         soft_unwrapjni_node.
548 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
550         * gcj.texi (gij options): Add -Xss documentation.
552 2005-11-08  Wil Mahan  <wmahan@gmail.com>
554         PR java/23617
555         * zextract.c (read_zip_archive): Fix out of memory error when
556         reading jar files with zip-style comments.
558 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
560         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
561         formats.
562         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
564 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
565             Wil Mahan <wmahan@gmail.com>
567         PR java/23620
568         * class.c (make_class): Create empty binfo here.
569         (set_super_info): Only create binfo if we have superclasses.
571 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
573         PR java/24127
574         * parse.y (method_header): Make the result of the rule a NULL_TREE
575         when a parsing error occurs.
577 2005-09-29  Tom Tromey  <tromey@redhat.com>
579         PR java/24120:
580         * jcf-io.c (memoized_dirlist_hash): New function.
581         (caching_stat): Use it.
583 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
585         PR java/21418
586         * class.c (inherits_from_p): Try to lay out super class
587         if it is not already laid out.
588         (maybe_layout_super_class): Handle the case where SUPER_CLASS
589         is a NULL_TREE.
591 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
593         * builtins.c (max_builtin, min_builtin, abs_builtin,
594         java_build_function_call_expr): Use fold_buildN.
595         * class.c (layout_class_method): Likewise.
596         * expr.c (java_truthvalue_conversion, build_java_jsr,
597         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
598         build_java_binop, build_field_ref, expand_compare,
599         build_known_method_ref, build_invokevirtual,
600         process_jvm_instruction): Likewise.
601         * parse.y (patch_binop, patch_exit_expr): Likewise.
602         * typeck.c (convert_ieee_real_to_integer): Likewise.
603         (convert): Don't call fold after convert_ieee_real_to_integer.
605 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
607         PR java/23891
608         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
609         the newly created type. Set import lists here, not in create_class.
610         (jdep_resolve_class): Set current_class.
611         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
612         the current package context, not ctxp->package.
613         (cicp_cache): Removed.
614         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
615         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
616         * java-tree.h (TYPE_PACKAGE): New macro.
617         (struct lang_type): New member 'package'.
619 2005-09-09  Andrew Haley  <aph@redhat.com>
621         PR libgcj/23182 
622         * expr.c (pop_type_0): If the expected type is object or ptr
623         (i.e. void*), return the type of the object we just popped from
624         the stack.
626 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
628         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
629         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
631 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
633         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
634         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
635         typos.  Follow spelling conventions.
637 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
639         PR java/23431
640         * typeck.c (lookup_do): Look up interfaces for the original class,
641         not the base class.
642         * parse.y (java_check_regular_methods): Fix diagnostic message for
643         more restrictive overriding of a method from an interface.
645 2005-08-16  Tom Tromey  <tromey@redhat.com>
647         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
648         class' initial state.
650 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
652         PR java/22113
653         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
654         `literal_token' for large numeric input tokens.
656 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
658         PR java/19870
659         * parse.y (nested_field_access_p): Rename to nested_member_access_p
660         and expand to handle method accesses across nested classes.
661         (build_outer_method_access_method): Rename to
662         build_nested_method_access_method.  Minor adjustments to comments.
663         (resolve_expression_name): Use the newly-renamed
664         nested_member_access_p method.
665         (resolve_qualified_expression_name): Likewise.
666         (patch_method_invocation): Also consider static methods for access
667         method generation.  Minor adjustments to comments.
668         (maybe_use_access_method): Use the more general
669         nested_memeber_access_p to determine access across nested class
670         boundaries.  Allow THIS_ARG to be NULL (for static methods).
672 2005-08-15  Tom Tromey  <tromey@redhat.com>
674         PR java/23300.
675         * expr.c (build_field_ref): Don't generate otable reference when
676         DECL_FIELD_OFFSET is 0.
677         * class.c (maybe_layout_super_class): Pass outer class to
678         do_resolve_class.
680 2005-08-15  Tom Tromey  <tromey@redhat.com>
682         * java-tree.h (LABEL_IN_SUBR): Removed.
683         (LABEL_IN_SUBR): Likewise.
684         (LABEL_IS_SUBR_START): Likewise.
685         (LABEL_SUBR_START): Likewise.
686         (LABEL_SUBR_CONTEXT): Likewise.
687         (LABEL_CHANGED): Likewise.
688         (LABEL_RETURN_LABEL): Likewise.
689         (LABEL_RETURN_TYPE_STATE): Likewise.
690         (LABEL_RETURN_LABELS): Likewise.
691         (RETURN_MAP_ADJUSTED): Likewise.
692         (LABEL_PENDING_CHAIN): Likewise.
694 2005-08-15  Tom Tromey  <tromey@redhat.com>
696         * Make-lang.in (JAVA_OBJS): Removed verify.o
697         (java/verify.o): Removed.
698         * verify.c: Removed.
699         * lang.c (flag_new_verifier): Removed.
700         (java_post_options): Updated.
701         * java-tree.h (flag_new_verifier): Removed.
702         (verify_jvm_instructions): Removed.
703         * expr.c (pop_type_0): Assume flag_new_verifier is true.
704         (build_java_check_indexed_type): Likewise.
705         (expand_java_arraystore): Likewise.
706         (expand_java_arrayload): Likewise.
707         (pop_arguments): Likewise.
708         (expand_byte_code): Likewise.
709         (process_jvm_instruction): Likewise.
711 2005-08-10  Andrew Haley  <aph@redhat.com>
713         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
714         type mismatches to make legal GIMPLE.
716 2005-08-10  Robin Green <greenrd@greenrd.org>
718         PR java/23230:
719         * parse.y (maybe_use_access_method): Generalize check from
720         java.lang.Object to any superclass of current_class
722 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
724         * class.c (build_class_ref): Wrap the primary class type in a
725         NOP_EXPR.
726         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
727         primary class type from the NOP_EXPR in which it was placed.
729 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
731         * expr.c (expand_load_internal): Fix missing parens in
732         predicate.
734 2005-07-28  Andrew Haley  <aph@redhat.com>
736         * expr.c (expand_load_internal): Convert to destination type.
738 2005-07-22  Manfred Hollstein  <mh@suse.com>
740         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
741         (check_constant): Likewise.
742         (check_wide_constant): Likewise.
744 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
746         Make CONSTRUCTOR use VEC to store initializers.
747         * check-init.c (check_init): Update to cope with VEC in
748         CONSTRUCTOR_ELTS.
749         * class.c (make_field_value, make_method_value, get_dispatch_table,
750         make_class_data, emit_symbol_table, emit_catch_table,
751         emit_assertion_table): Use build_constructor_from_list instead of
752         build_constructor.
753         * constants.c (build_constants_constructor): Likewise.
754         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
755         VEC in CONSTRUCTOR_ELTS.
756         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
757         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
758         of a TREE_LIST.
759         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
760         CONSTRUCTOR_ELTS.
761         * parse.y (build_new_array_init): Use build_constructor_from_list
762         instead of build_constructor.
763         (patch_new_array_init): Update to cope with VEC in
764         CONSTRUCTOR_ELTS.
765         (array_constructor_check_entry): Likewise.
767 2005-07-12  Tom Tromey  <tromey@redhat.com>
769         * jvspec.c (lang_specific_driver): Put filelist_filename first on
770         command line.
772 2005-07-12  Tom Tromey  <tromey@redhat.com>
774         PR java/19674:
775         * parse-scan.y (interface_member_declaration): Added
776         empty_statement.
778 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
779         
780         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
781         (LABEL_PENDING_CHAIN): Ditto.
782         (LABEL_PC): Ditto.
783         (DECL_BIT_INDEX): Ditto.        
785 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
787         PR java/18119
788         * parse.y (inner_class_accessible): New function. Logic moved from
789         check_inner_class_access.
790         (check_inner_class_access): Use inner_class_accessible.
791         (resolve_inner_class): Simplify arguments. Create circularity hash
792         here. Keep looking for classes if we found one that was inaccessible. 
793         Return the inaccessible class only if there is no other match.
794         (do_resolve_class): Update for new resolve_inner_class arguments.
795         Don't create circularity_hash here.
797 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
799         PR java/21045
800         * parse.y (add_exception_to_throws): New function.
801         (purge_unchecked_exceptions): Removed.
802         (get_constructor_super): Renamed from verify_constructor_super. Now
803         returns the super constructor after verification.
804         (java_complete_expand_method): Don't use purge_unchecked_exceptions
805         or save/restore the exception list.
806         (check_thrown_exceptions): Add uncaught exceptions in anonymous
807         class initializers and constructors to the throws clause of the method. 
809 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
811         PR java/19674
812         * parse.y (interface_member_declaration): Allow empty statements in
813         interface declarations.
815 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
817         * Makefile.in (parse.o): Adjust dependencies.
818         * parse.y: Include tree-dump.h.
820 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
822         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
823         flag for quoting.
825 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
827         * parse.y (issue_warning_error_from_context): Call
828         pp_output_formatted_text to be able to get the buffer.
830 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
832         * parse.y (issue_warning_error_from_context): Update for the
833         renaming of pp_format_text to pp_format.
835 2005-06-28  Paul Brook  <paul@codesourcery.com>
837         * decl.c (java_init_decl_processing): Call
838         default_init_unwind_resume_libfunc.
840 2005-06-27  Tom Tromey  <tromey@redhat.com>
842         PR java/21540, PR java/13788:
843         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
844         fold_constant_for_init.
845         (patch_binop): Added 'folding' argument.  Updated all callers.
846         (patch_unaryop) <NOP_EXPR>: New case.
847         (fold_constant_for_init) <NOP_EXPR>: Likewise.
848         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
850 2005-06-25  Jan Hubicka  <jh@suse.cz>
852         * builtins.c (define_builtin): Accept new flags parameter.
853         (initialize_builtins): Mark the builtins const and nothrow accordingly.
855 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
857         * all files: Update FSF address in copyright headers.
859 2005-06-24  Tom Tromey  <tromey@redhat.com>
861         * verify-impl.c (verify_instructions_0): Correctly handle
862         situation where PC falls off end.
864 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
866         PR java/20697
867         * parse.y (find_most_specific_methods_list): Remove special case for
868         inner classes.
870 2005-06-15  Tom Tromey  <tromey@redhat.com>
872         PR libgcj/21906:
873         * class.c (make_method_value): Use soft_abstractmethod_node for
874         abstract method.
875         * java-tree.h (soft_abstractmethod_node): New define.
876         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
877         * decl.c (java_init_decl_processing): Initialize
878         soft_abstractmethod_node.
880 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
882         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
884 2005-06-13  Per Bothner  <per@bothner.com>
886         * expr.c (int highest_label_pc_this_method,
887         start_label_pc_this_method): New globals.
888         (lookup_label): Add start_label_pc_this_method to pc for label, and
889         update highest_label_pc_this_method.  This prevents conflicts between
890         labels from different methods.
891         * java-tree.h: Declare new globals.
892         * jcf-parse.c (parse_class_file): If needed bump
893         start_label_pc_this_method and reset highest_label_pc_this_method.
895 2005-06-13  Tom Tromey  <tromey@redhat.com>
897         PR java/21844:
898         * parse.y (nested_field_access_p): Handle case where outer field
899         is inherited by enclosing class.
901 2005-06-12  Per Bothner  <per@bothner.com>
903         * class.c (inherits_from_p): Do load_class if needed.
905 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
907         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
908         * java-tree.h (parse_error_context): Move...
909         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
910         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
911         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
913 2005-06-08  Roger Sayle  <roger@eyesopen.com>
915         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
917 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
919         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
920         msgid for argument name.
921         * gjavah.c (error): Likewise.
922         * java-tree.h (parse_error_context): Likewise.
923         * parse.y (parse_error_context, parse_warning_context,
924         issue_warning_error_from_context): Likewise.
926 2005-06-01  Tom Tromey  <tromey@redhat.com>
928         PR java/21722:
929         * class.c (build_static_field_ref): Don't fold constant fields if
930         current class is from a .class file and we're using indirect
931         dispatch.
933 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
935         * java/verify-glue.c: Don't include errors.h and include toplev.h.
936         * java/Make-lang.in: Updates dependencies.
938 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
940         PR java/19870.
941         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
942         NESTED_FIELD_ACCESS_IDENTIFIER_P.
943         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
944         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
945         * jcf-write.c (generate_classfile): Use
946         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
947         OUTER_FIELD_ACCESS_IDENTIFIER_P.
948         * parse.y (build_outer_field_access): Rename to
949         build_nested_field_access. Support static fields and outer-to-inner
950         class accesses.
951         (outer_field_access_p): Rename to nested_field_access_p. Support
952         static fields and generalise to outer-to-inner class and sibling
953         inner class accesses.
954         (outer_field_expanded_access_p): Rename to
955         nested_field_expanded_access_p and support static fields.
956         (outer_field_access_fix): Rename to nested_field_access_fix and
957         support static fields.
958         (build_outer_field_access_expr): Rename to
959         build_nested_field_access_expr and support static fields.
960         (build_outer_field_access_methods): Rename to
961         build_nested_field_access_methods and support static fields. For
962         static fields, generate accessors without class instance parameters.
963         (build_outer_field_access_method): Rename to
964         build_nested_field_access_method and support static fields.
965         (build_outer_method_access_method): Use
966         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
967         OUTER_FIELD_ACCESS_IDENTIFIER_P.
968         (resolve_expression_name): Consider static field accesses across
969         nested classes.
970         (resolve_qualified_expression_name): Likewise.
971         (java_complete_lhs): Use nested_field_access_fix instead of
972         outer_field_access_fix.
973         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
974         Use nested_field_expanded_access_p instead of
975         outer_field_expanded_access_p. Use nested_field_access_fix instead
976         of outer_field_access_fix.
977         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
978         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
980 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
982         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
983         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
984         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
985         MINOR_BINARYCOMPAT_ABI_VERSION): New.
986         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
987         (parse_version): Calculate version ID using new method. Use bit-flags
988         for flag_indirect_dispatch and flag_bootstrap_classes.
990 2005-05-25  Richard Henderson  <rth@redhat.com>
992         PR libgcj/21692
993         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
994         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
995         DECL_CONTEXT; avoid pushdecl_top_level.
996         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
997         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
998         (layout_class_method): Likewise.
999         * decl.c (java_mark_cni_decl_local): New.
1000         (java_mark_class_local): Use it.
1001         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
1002         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
1003         (struct lang_decl_func): Add local_cni;
1004         (struct lang_decl_var): Add class_field, vtable.
1005         (java_mangle_decl): Declare.
1006         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
1007         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
1008         (mangle_obstack_1): New.
1009         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
1010         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
1011         lhd_set_decl_assembler_name for things that don't need mangling.
1012         (mangle_class_field): Rename from java_mangle_class_field, make
1013         static, don't call init_mangling or finish_mangling.
1014         (mangle_vtable): Similarly.
1015         (mangle_local_cni_method_decl): New.
1016         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
1017         gcc_assert, and MANGLE_RAW_STRING.
1018         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
1020 2005-05-25  DJ Delorie  <dj@redhat.com>
1022         * class.c (set_constant_value): Move warning control from if() to
1023         warning(OPT_*).
1025 2005-05-24  Richard Henderson  <rth@redhat.com>
1027         * builtins.c (define_builtin): Don't call make_decl_rtl.
1028         * constants.c (build_constant_data_ref): Likewise.
1029         * class.c (build_utf8_ref): Likewise.
1030         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
1031         (get_dispatch_table, layout_class_method): Likewise.
1032         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
1033         by hand.
1034         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
1035         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
1036         to determine if we need a non-zero address.
1037         * decl.c (builtin_function): Don't call make_decl_rtl.
1038         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
1039         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
1040         * resource.c (compile_resource_data): Likewise.
1041         * parse.y (resolve_field_access): Re-word comment to avoid
1042         building DECL_RTL.
1044 2005-05-24  Richard Henderson  <rth@redhat.com>
1046         * class.c (registered_class): Take it out of class_roots; turn into
1047         a vec of trees.
1048         (register_class): Make static.  Don't duplicate decl node.  Use
1049         VEC_safe_push.
1050         (emit_register_classes): Use VEC_iterate.  Use output_constant
1051         instead of assemble_integer.  Don't call mark_decl_referenced
1052         directly.
1053         * java-tree.h (register_class): Remove decl.
1055 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
1057         PR java/17845
1059         * parse.y (register_package, package_list): Remove.
1060         (package_declaration): Do not call register_package.
1061         (do_resolve_class): Do not use package_list.
1063 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
1065         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
1066         unused variable.
1068 2005-05-15  Tom Tromey  <tromey@redhat.com>
1070         PR java/21519:
1071         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
1072         NOTE_PUSH.
1074 2005-05-12  Aaron Luchko <aluchko@redhat.com>
1076         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
1078 2005-05-11  Tom Tromey  <tromey@redhat.com>
1080         * gcj.texi (Code Generation): Document -fbootstrap-classes.
1081         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
1082         (parse_version): Use it.
1083         * lang.opt (-fbootstrap-classes): New option.
1085 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
1087         PR java/21436
1088         * class.c (maybe_layout_super_class): Look for imports in this_class.
1089         * parse.h (ctxp_for_generation_last): New.
1090         (do_resolve_class): Add a parameter.
1091         * parse.y (ctxp_for_generation_last): New.
1092         (java_pop_parser_context): Add at end of list.
1093         (find_in_imports, find_in_imports_on_demand): Look in ctxp
1094         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
1095         the given type are NULL.
1096         (do_resolve_class): Look into the imports of the new second parameter.
1097         Adjust recursive calls.
1098         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
1099         calls to do_resolve_class.
1100         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
1101         (java_complete_class): Do not do that here.
1103 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
1105         PR java/20309
1106         * Make-lang.in (java): Add gjnih.
1107         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1108         (GJNIH_OBJS): New variable.
1109         (gjnih$(exeext)): New target.
1110         (JAVA_MANFILES): Add gjnih.1.
1111         (java.uninstall): Add gjnih.1.
1112         (java.mostlyclean): Add gjnih.
1113         (java.maintainer-clean): Add gjnih.1.
1114         (java/gjavah-jni.o): New target.
1115         (.INTERMEDIATE): Add gjnih.pod.
1116         (gjnih.pod): New target.
1117         * config-lang.in (stagestuff): Add gjnih.
1118         * gcj.texi (Top): Add gjnih node.
1119         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
1120         -bootclasspath options.
1121         (Invoking gjnih): New node.
1122         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
1123         (TOOLNAME): New macro.
1124         (error): Replace hard-coded gcjh with TOOLNAME.
1125         (process_file): Likewise.
1126         (usage): Likewise.
1127         (version): Likewise.
1128         (help): Likewise.  Add help output for -force, -old, -trace and -J
1129         options.
1130         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
1131         (options): Add force, old, trace and J fields.
1132         (main): Handle -force, -old, -trace and -J options.
1134 2005-05-03  Tom Tromey  <tromey@redhat.com>
1136         PR java/21245:
1137         * gjavah.c (main): Unlink output file on error.
1139 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
1141         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
1142         copyright.
1144 2005-04-29  Tom Tromey  <tromey@redhat.com>
1146         * expr.c (build_jni_stub): Updated for change to build_block.
1148 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
1150         * expr.c (force_evaluation_order): Declare 'saved' earlier.
1152 2005-04-28  Andrew Haley  <aph@redhat.com>
1154         PR java/19285
1155         * java-tree.h (soft_resolvepoolentry_node): New.
1156         (alloc_constant_fieldref): Declare.
1157         * expr.c (expand_java_field_op): Don't call class_init for
1158         accesses to static fields with indirect dispatch.
1159         * builtins.c (initialize_builtins): Add "__builtin_expect".
1160         * decl.c (soft_resolvepoolentry_node): New variable.
1161         (java_init_decl_processing): Create a decl for
1162         "_Jv_ResolvePoolEntry".
1163         * class.c (build_fieldref_cache_entry): New function.
1164         (build_static_field_ref): Rewrite for indirect dispatch.
1165         * constants.c (find_name_and_type_constant_tree): New function.
1166         (alloc_constant_fieldref): Likewise.
1167         (build_constants_constructor): Handle CONSTANT_Fieldref and
1168         CONSTANT_NameAndType.
1170         PR java/21115
1171         * expr.c (force_evaluation_order): Convert outgoing args smaller
1172         than integer.
1174 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
1176         * gcj.texi (libgcj Runtime Properties): Remove obsolete
1177         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
1178         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
1180 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1182         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
1183         to `unlock_stream' with `unlock_std_streams'.
1185 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
1187         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
1188         instead of just expr.h.
1190 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1192         * gjavah.c (main): Unlock the stdio streams.
1193         * jcf-dump.c (main): Likewise.
1194         * jv-scan.c (main): Likewise.
1195         * jvgenmain.c (main): Likewise.
1197 2005-04-23  DJ Delorie  <dj@redhat.com>
1199         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
1200         parse.y: Adjust warning() callers.
1202 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
1204         * gcj.texi (Object fields): Change "Integer" to "Int" in example
1205         contructor.
1207 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
1209         * gcj.texi: Fix typos and bogus example.
1211 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
1213         * except.c: Fix a comment typo.
1215 2005-04-19  Julian Brown  <julian@codesourcery.com>
1217         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
1218         indirect dispatch with PIC.
1220 2005-04-18  Andrew Haley  <aph@redhat.com>
1222         * java-except.h (struct eh_range.handler): Remove unused field.
1223         (handle_nested_ranges): Remove function declaration.
1224         (sanity_check_exception_range): Add function declaration.       
1225         * verify.c (verify_jvm_instructions): Remove call to
1226         handle_nested_ranges.
1227         * verify-glue.c (verify_jvm_instructions_new): Call
1228         sanity_check_exception_range.
1229         * except.c (link_handler, eh_range_freelist, link_handler,
1230         handle_nested_ranges): Remove.
1231         (add_handler): Rewrite.
1232         (sanity_check_exception_range): New function.
1233         (print_ranges): New function.
1235 2005-04-13  Julian Brown  <julian@codesourcery.com>
1237         * decl.c (finish_method): Give methods once-only linkage.
1239 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
1241         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
1243 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1245         * java-tree.h: Don't use PARAMS().
1247 2005-04-07  Per Bothner  <per@bothner.com>
1249         * class.c (push_class): By default, suppress debug output.
1250         (finish_class): Enable debug output for classes we're emitting.
1252 2005-04-07  Andrew Haley  <aph@redhat.com>
1254         * gcj.texi: Correct gcj-dbtool instructions.
1256 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
1258         * gcj.texi: Fix a typo.
1259         * lang.c: Fix a comment typo.
1261 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
1263         * gcj.texi (Invoking gij): Add descriptions of new -X options.
1264         Mention recognized-and-ignored compatibility options.
1265         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
1266         JvFree.
1267         (About CNI): Add Memory allocation section.
1269 2005-04-01  Tom Tromey  <tromey@redhat.com>
1271         * decl.c (java_init_decl_processing): Fix types of
1272         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
1273         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
1274         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
1276 2005-03-31  Jan Hubicka  <jh@suse.cz>
1278         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
1279         * class.c: Include cgraph.h
1280         (make_local_functoin_alias): Mark aslias as needed.
1281         * resource.c: Include cgraph.h
1282         (compile_resource_data): Go via cgraph interface.
1284 2005-03-30  Ian Lance Taylor  <ian@airs.com>
1286         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
1288 2005-03-30  Tom Tromey  <tromey@redhat.com>
1290         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
1291         inner_class_info_index==0 or outer_class_info_index==0.
1293 2005-03-29  Tom Tromey  <tromey@redhat.com>
1295         * gcj.texi (libgcj Runtime Properties): Document
1296         gnu.gcj.runtime.endorsed.dirs.
1298 2005-03-24  Anthony Green  <green@redhat.com>
1300         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
1301         'gcj-dbtool -p'.
1303 2005-03-23  Tom Tromey  <tromey@redhat.com>
1305         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
1306         (parse_version): Use it.
1308 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
1310         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
1312 2005-03-18  Andrew Haley  <aph@redhat.com>
1314         PR java/20522
1315         * decl.c (update_aliases): Don't update variables that are about
1316         to die.
1317         (maybe_poplevels): Add comment.
1319 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
1321         PR java/20502
1322         * jcf-parse.c (duplicate_class_warning): New function.
1323         (java_parse_file): Call duplicate_class_warning if 
1324         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
1325         (parse_zip_file_entries): Likewise. Also set
1326         CLASS_FROM_CURRENTLY_COMPILED_P.
1328 2005-03-16  Andrew Haley  <aph@redhat.com>
1330         * expr.c (expand_java_arrayload): Don't generate a
1331         NullPointerException based on the type of the node.
1332         (build_java_array_length_access): Likewise.
1334 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
1336         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
1338 2005-03-11  Tom Tromey  <tromey@redhat.com>
1340         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
1341         (libgcj Runtime Properties): Document the default .db.
1343 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
1345         PR java/20312
1346         * parse.y (checks_throws_clauses): Check exceptions list even when
1347         the base class does not come from a source file being compiled.
1348         (java_complete_lhs): Remove unused variable 'wfl'.
1350 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
1352         PR java/20338
1353         * decl.c (finish_method): Emit _Jv_InitClass for private static
1354         methods inside inner classes as well.
1356 2005-03-08  Julian Brown  <julian@codesourcery.com>
1357         * Revert patch from 2005-03-08 for causing bootstrap failure on
1358         ppc-darwin.
1360 2005-03-08  Julian Brown  <julian@codesourcery.com>
1362         * decl.c (finish_method): Give methods once-only linkage.
1364 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
1366         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
1368 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
1370         * verify-glue.c (vfy_is_assignable_from): Perform static check using
1371         can_widen_reference_to if the C++ ABI is in use.
1372         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
1373         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
1374         type_isresolved, init_state, set_pc, state_get_pc,
1375         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
1376         (verify_fail): Report the current PC from the verifier context.
1377         (free_state): Remove #if 0 block to enable this function.
1378         (free_verifier_context): Call free_state on state_list iterator
1379         values before freeing them.
1380         * expr.c (pop_type_0): Pop correct type for error message when stack
1381         contains a multi-word type.
1383 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
1385         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
1386         for known NULL array length access.
1388 2005-03-07  Tom Tromey  <tromey@redhat.com>
1390         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
1392 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
1394         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
1395         typeck.c: Update copyright.
1397 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
1399         Remove xref code.
1400         * xref.c, xref.h: Remove file.
1401         * Make-lang.in (java/xref.o): Remove.
1402         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
1403         * lang.c (flag_emit_xref): Remove definition.
1404         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
1405         * typeck.c (convert): Remove use of do_not_fold.
1406         * parse.y (do_not_fold): Remove definition.
1407         (parser grammar): Remove xref code.
1408         (maybe_create_class_interface_decl, create_class): Likewise.
1409         (register_fields, method_header, finish_method_declaration): Likewise.
1410         (declare_local_variables, source_end_java_method): Likewise.
1411         (java_complete_expand_classes): Do not set do_not_fold.
1412         (java_complete_expand_method): Remove xref code.
1413         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
1414         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
1415         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
1416         (patch_synchronized_statement, patch_throw_statement): Likewise.
1417         (maybe_build_class_init_for_field): Likewise.
1419 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
1421         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
1422         instead of IS_NON_TYPE_CODE_CLASS.
1424 2005-03-04  Andrew Haley  <aph@redhat.com>
1426         PR java/18362
1427         * class.c (set_method_index): Don't set method_index if it is
1428         NULL_TREE.
1429         (layout_class_method): Don't complain about "non-static method foo
1430         overrides static method" in the case of indirect dispatch.
1432 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1434         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
1435         warning.
1436         * Make-lang.in: Don't elide warnings in jcf-io.c.
1438 2005-03-01  Per Bothner  <per@bothner.com>
1440         PR java/8608
1441         * check-init.c (wfl): Remove static.
1442         (final_assign_error, check_init): Replace calls to parse_error_context
1443         by plain error.
1444         (check_init): Save, set, and restore input_location for each exp.
1446 2005-03-01  Per Bothner  <per@bothner.com>
1448         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
1449         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
1450         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
1452 2005-03-01  Per Bothner  <per@bothner.com>
1454         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
1456 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
1458         PR libgcj/16923
1459         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
1460         JvVMOption.
1462 2005-02-22  Tom Tromey  <tromey@redhat.com>
1464         PR java/20056:
1465         * verify-impl.c (EITHER): New define.
1466         (types_compatible): Handle it.
1467         (check_field_constant): Use it.
1469 2005-02-18  Tom Tromey  <tromey@redhat.com>
1471         PR java/20056:
1472         * verify-impl.c (types_equal): Fixed test.
1474         PR java/20056:
1475         * verify-glue.c (vfy_class_has_field): New function.
1476         * verify.h (vfy_class_has_field): Declare.
1477         * verify-impl.c (check_field_constant): Added 'putfield'
1478         argument.
1479         (verify_instructions_0): Updated.
1480         (types_equal): New function.
1482 2005-02-14  Tom Tromey  <tromey@redhat.com>
1484         PR java/19921:
1485         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
1486         stack effect of multianewarray.
1488 2005-02-14  Andrew Haley  <aph@redhat.com>
1490         PR java/19907
1491         * expr.c (expand_byte_code): Call promote_arguments().
1492         (promote_arguments): New function.
1493         * decl.c (check_local_unnamed_variable): Remove special case for
1494         new verifier.
1495         (find_local_variable): Promote all boolean types to int
1496         when searching for local variable decls.
1498 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
1500         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
1501         parse-scan.y: Update copyright.
1503 2005-02-11  Per Bothner  <per@bothner.com>
1505         PR java/15543
1506         * parse-scan.y (input_location): Remove variable.
1507         (main_input_filename): New - replaces input_filename, which isn't
1508         settable if USE_MAPPED_LOCATION.
1509         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
1510         so we don't reference input_location or wfl_operator in that case.
1511         * jv-scan.c (expand_location): Remove - no longer used.
1512         (main): Set main_input_filename rather than input_filename.
1514 2005-02-09  Richard Henderson  <rth@redhat.com>
1516         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
1517         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
1519 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
1521         * expr.c (add_type_assertion): Use the proper enumeration type,
1522         since this is what htab_find_slot() is expecting.
1524 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
1526         * gcj.texi: Update copyright dates.
1528 2005-02-02  Tom Tromey  <tromey@redhat.com>
1530         * gcj.texi (libgcj Runtime Properties): Default library_control
1531         to 'cache'.
1533 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
1535         PR java/15543
1536         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
1537         (modifiers) when square brackets are present in a declaration for
1538         a final paramter.
1539         * jv-scan.c (main): Set input_filename and input_line.
1541 2005-02-01  Tom Tromey  <tromey@redhat.com>
1543         PR java/19742:
1544         * gjavah.c (get_field_name): Don't override name for JNI header.
1546 2005-02-01  Roger Sayle  <roger@eyesopen.com>
1548         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
1549         of unsigned types using iushr and lushr JVM bytecodes.
1551 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
1553         PR java/19738
1554         * gjavah.c (jni_print_float): Do not emit floating-point
1555         initialiser for a static final field.
1556         (jni_print_double): Likewise.
1558 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
1560         Revert:
1561         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1562         * gjavah.c (print_field_info): Mark static data members of
1563         floating-point type with "__extension__".
1565 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1567         * gjavah.c (print_field_info): Mark static data members of
1568         floating-point type with "__extension__".
1570 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
1572         PR java/9157
1573         * parse.y (build_string_concatenation): Remove redundant if.
1574         (patch_conditional_expr): Attempt to patch_string() the condition
1575         of a ?: as well, in addition to its other operands.
1577 2005-01-25  Tom Tromey  <tromey@redhat.com>
1579         * Make-lang.in (java/java-tree-inline.o): Removed.
1581 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
1583         PR java/19070
1584         * parse.y (patch_binop): Allow comparisons against NULL only
1585         if the other operand is of a reference type.
1587 2005-01-24  Tom Tromey  <tromey@redhat.com>
1589         * java-tree.h (gcj_abi_version): Declare.
1590         * class.c (make_class_data): Push gcj_abi_version into "next"
1591         field.  Renamed field.
1592         * decl.c (gcj_abi_version): New global.
1593         (parse_version): New function.
1594         (java_init_decl_processing): Call it.  Renamed 'next' field.
1595         Include version.h.
1596         (GCJ_BINARYCOMPAT_ADDITION): New define.
1598 2005-01-24  Roger Sayle  <roger@eyesopen.com>
1600         PR java/19295
1601         * jcf-write.c (generate_bytecode_insns): Conversions between
1602         integer types of the same precision shouldn't generate widening
1603         or narrowing conversion bytecodes.
1605 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
1607         * java-except.h, java-tree.h: Remove unused prototypes.
1609 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
1611         PR java/18091:
1612         * jcf-write.c (perform_relocations): Don't call memcpy if source
1613         and destination are the same.
1615 2005-01-17  Tom Tromey  <tromey@redhat.com>
1617         * verify-impl.c (get_short): Sign extend.
1618         (get_int): Likewise.
1620 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
1622         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
1623         with TYPE_SIZE.
1625 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
1627         * verify.c: Revert to the version before the BC-ABI merge.
1629 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
1631         PR java/19277
1632         * check-init.c (check_init): Take care of references that do not
1633         have an explicit final variable declaration (e.g. array length
1634         access) for pre/post in/de-crement operators.
1636 2005-01-08  Mark Wielaard  <mark@klomp.org>
1638         * parse.y (process_imports): Allocate (and free) original_name only
1639         when not already defined.
1640         * jcf-parse.c (read_class): Free results of find_class() and
1641         lrealpath().
1642         (java_parse_file): Keep pointer to head of file_list and free when
1643         done. Free result of lrealpath().
1645 2005-01-05  Tom Tromey  <tromey@redhat.com>
1647         * gcj.texi (Standard Properties): java.ext.dirs is now used.
1649 2004-12-20  Andrew Haley  <aph@redhat.com>
1651         * typeck.c: Use fold_convert for ints and booleans.
1653 2004-12-17  Andrew Haley  <aph@redhat.com>
1655         PR java/18931
1656         * typeck.c (convert): Use a CONVERT_EXPR when converting to
1657         BOOLEAN_TYPE or CHAR_TYPE.
1658         (convert_to_boolean, convert_to_char) : Remove.
1659         * convert.h (convert_to_boolean, convert_to_char) : Remove.
1660         * expr.c (expand_load_internal): Do type conversion if type is not
1661         as required.
1663 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
1665         PR target/18459
1666         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
1667         Update comment.
1669 2004-12-07  Andrew Haley  <aph@redhat.com>
1671         PR java/18811:
1672         * jcf-parse.c (load_class): Remove sanity test for missing inner
1673         class file.
1675 2004-12-06  Tom Tromey  <tromey@redhat.com>
1677         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
1678         (java.uninstall): Likewise.
1679         (java.maintainer-clean): Likewise.
1680         (.INTERMEDIATE): Likewise.
1681         (java.install-man): Likewise.
1682         (gcj-dbtool.pod): New target.
1683         * gcj.texi (Code Generation): Document -findirect-dispatch.
1684         (libgcj Runtime Properties): Document
1685         gnu.gcj.precompiled.db.path.
1686         (Top): Link to "Invoking gcj-dbtool".
1688 2004-12-06  Tom Tromey  <tromey@redhat.com>
1690         PR java/14853:
1691         * java-tree.h (extract_field_decl): Declare.
1692         * parse.y (extract_field_decl): Renamed from
1693         strip_out_static_field_access_decl.  No longer static.
1694         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
1696 2004-12-03  Tom Tromey  <tromey@redhat.com>
1698         * lang.c (flag_new_verifier): Define.
1699         (java_post_options): Set flag_new_verifier if indirect dispatch
1700         is being used.
1701         * lang.opt (fnew-verifier): Removed.
1703 2004-12-03  Tom Tromey  <tromey@redhat.com>
1705         PR bootstrap/14614:
1706         * Make-lang.in (java.install-common): Only install transformed
1707         gcjh if gcj-cross exists.
1709 2004-12-03  Andrew Haley  <aph@redhat.com>
1711         PR java/18812
1712         * except.c (link_handler): Patch 'outer' field of siblings of the
1713         range we're demoting.
1715 2004-12-03  Andrew Haley  <aph@redhat.com>
1717         PR java/18697
1718         * class.c (layout_class_method): Don't fail to override a method
1719         simply because it has DECL_ARTIFICIAL set.
1721 2004-12-02  Tom Tromey  <tromey@redhat.com>
1723         PR java/16675:
1724         * parse.y (craft_constructor): Special case null_pointer_node.
1726 2004-12-02  Tom Tromey  <tromey@redhat.com>
1728         PR java/18741:
1729         * java-gimplify.c (java_gimplify_expr): Don't call
1730         SET_EXPR_LOCATION unless wrapped tree is an expression.
1732 2004-11-27  Per Bothner  <per@bothner.com>
1734         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
1735         Fix fencepost error in 'i', which got executed one too many times.
1736         Also, fold memcpy into explicit loop, as originally intended.
1737         Also, free temporary 'buf' which otherwise leaks.
1739 2004-11-27  Per Bothner  <per@bothner.com>
1741         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
1742         local static variables if not USE_MAPPED_LOCATION.
1744 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
1746         * class.c, decl.c, expr.c: Fix comment typos.
1748 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
1750         PR java/18305
1751         * decl.c (end_java_method): Call
1752         attach_init_test_initialization_flags on all the init_decls.
1753         * parse.y (attach_init_test_initialization_flags): Move to ...
1754         * expr.c (attach_init_test_initialization_flags): here and
1755         support BIND_EXPR also.
1756         * java-tree.h (attach_init_test_initialization_flags): Prototype.
1757         * jcf-parse.c (parse_class_file): Don't disable class init
1758         optimization.
1760 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
1762         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
1763         in diagnostics.
1765 2004-11-24  Richard Henderson  <rth@redhat.com>
1767         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
1768         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
1770 2004-11-24  Tom Tromey  <tromey@redhat.com>
1772         * verify.c (defer_merging): Don't use C++-style comment.
1773         * verify.h (java_opcode): Added java_opcode_end.
1774         * class.c (build_class_ref): Remove C++ comment and old FIXME.
1776         * verify-impl.c (vfy_push_type): Removed bogus "return".
1777         (initialize_stack): Use vfy_alloc and vfy_free.
1778         (verify_instructions_0): Likewise.
1780         * Merged gcj-abi-2-dev-branch to trunk.
1782 2004-11-24  Andrew Haley  <aph@redhat.com>
1784         * jcf-parse.c (parse_class_file): Set file_start_location.
1786 2004-11-10  Tom Tromey  <tromey@redhat.com>
1788         * class.c (make_field_value): Don't call build_static_field_ref.
1789         (build_static_field_ref): Don't emit direct references when using
1790         indirect dispatch.
1792         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
1793         -verbose:class into man page synopsis.
1795 2004-11-09  Tom Tromey  <tromey@redhat.com>
1797         * expr.c (build_java_arraystore_check): Still generate check if
1798         element type is itself an array.
1800 2004-11-08  Tom Tromey  <tromey@redhat.com>
1802         * java-tree.h (soft_check_assignment_node): Removed.
1803         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
1804         * decl.c (java_init_decl_processing): Don't initialize
1805         soft_check_assignment_node.
1807 2004-11-05  Tom Tromey  <tromey@redhat.com>
1809         * class.c (layout_class_methods): Don't add Miranda methods when
1810         using indirect dispatch.
1812 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
1814         * class.c (make_class_data): Call emit_assertion_table to set the
1815         'assertion_table' field.
1816         (build_signature_for_libgcj): Move here from expr.c.
1817         (add_assertion_table_entry): New function. Callback for assertion
1818         hashtable traversal.
1819         (emit_assertion_table): New. Take class argument, and generate
1820         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
1821         * decl.c (init_decl_processing): Define assertion_entry_type record.
1822         Push 'assertion_table' class field instead of 'verify'.
1823         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
1824         (type_assertion_hash): Include 'assertion_code' in hash.
1825         (add_type_assertion): Rewritten. Take class and assertion_code
1826         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
1827         (can_widen_reference_to): Use new add_type_assertion() arguments.
1828         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
1829         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
1830         (verify_identifier_node): Removed.
1831         (assertion_entry_type, assertion_table_type): New.
1832         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
1833         assertion code definitions.
1834         (struct type_assertion): Add assertion_code. Rename 'source_type' and
1835         'target_type' to 'op1' and 'op2'.
1836         (add_type_assertion): Declare.
1837         (lang_printable_name_wls): Remove unused definition.
1838         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
1839         to emit runtime assertion.
1840         (vfy_note_stack_type): Clean up non-C90 declarations.
1841         (vfy_note_local_type): Likewise.
1842         * verify.h (vfy_is_assignable_from): Declare.
1843         * verify-impl.c (is_assignable_from_slow): Remove unused function.
1844         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
1845         instead of is_assignable_from_slow().
1846         (types_compatible): Reinstate ref_compatible() call.
1848 2004-11-04  Tom Tromey  <tromey@redhat.com>
1850         * class.c (build_static_field_ref): Reverted previous patch.
1852         * class.c (build_static_field_ref): Don't emit direct references
1853         when using indirect dispatch.
1855 2004-11-03  Tom Tromey  <tromey@redhat.com>
1857         * expr.c (expand_java_arrayload): Set lhs_type_node.
1858         (expand_java_arraystore): Set rhs_type_node.
1860 2004-11-02  Tom Tromey  <tromey@redhat.com>
1862         * jcf-parse.c (compute_class_name): Use filename length from zip
1863         directory, not strlen.
1865         * expr.c (expand_invoke): Mark new interface methods as abstract.
1867 2004-11-01  Tom Tromey  <tromey@redhat.com>
1869         * verify-impl.c (push_jump): Removed check for uninitialized
1870         objects.
1871         (push_exception_jump): Likewise.
1872         (handle_ret_insn): Likewise.
1873         (handle_jsr_insn): Likewise.
1874         (state_check_no_uninitialized_objects): Removed.
1876         * decl.c (check_local_unnamed_variable): Recognize
1877         promoted-to-int parameters when using the new verifier.
1878         * expr.c (expand_java_arraystore): Explicitly request array type
1879         when using new verifier.
1880         (expand_java_arrayload): Likewise.
1881         (invoke_build_dtable): Don't pass object_type_node as
1882         expression argument to build_java_indirect_ref.
1883         (build_java_check_indexed_type): Do nothing.
1884         (build_java_arraystore_check): Handle case where array doesn't
1885         have array type.
1886         (build_java_array_length_access): Likewise.
1887         (expand_invoke): Handle case where interface overrides a method
1888         from Object.
1889         (pop_type_0): Always succeed for reference types.
1890         (process_jvm_instruction): Don't pop a value in a dead
1891         exception handler.
1892         (pop_arguments): Convert arguments to correct types.
1894 2004-10-29  Andrew Haley  <aph@redhat.com>
1896         * jcf-parse.c (give_name_to_class): Remove line that was
1897         incorrectly merged.
1899 2004-10-29  Andrew Haley  <aph@redhat.com>
1901         * jcf-parse.c (set_source_filename): Add code to build new sfname.
1903 2004-10-20  Andrew Haley  <aph@redhat.com>
1905         * decl.c (end_java_method): Don't expand if flag_syntax_only.
1907 2004-10-26  Tom Tromey  <tromey@redhat.com>
1909         * verify.h (vfy_notify_verified): Removed.
1910         * verify-glue.c (vfy_notify_verified): Removed.
1912 2004-10-26  Tom Tromey  <tromey@redhat.com>
1914         * verify-impl.c (debug_print_state): Declare `i' before code.
1915         (merge_types): Modify `t' when it is null_type.
1917 2004-10-26  Tom Tromey  <tromey@redhat.com>
1919         * verify-impl.c (type_print): Renamed from print.  Now static and
1920         takes an argument.
1921         (debug_print_state): Use type_print.
1923 2004-10-25  Tom Tromey  <tromey@redhat.com>
1925         * expr.c (build_invokeinterface): Compute correct offset for
1926         index into interface methods.
1928 2004-10-20  Tom Tromey  <tromey@redhat.com>
1930         * java-tree.h (verify_jvm_instructions_new): Declare.
1932         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
1933         command line.
1935         * verify-impl.c (verify_instructions): Correctly handle wide
1936         types on the stack.
1937         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
1938         (vfy_get_component_type): Strip pointer types.
1939         (vfy_find_class): Use get_type_from_signature.  Strip pointer
1940         types.
1941         Include java-except.h.
1943 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
1945         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
1946         vfy_push_type_t, set_variable, add_new_state, merge_into,
1947         handle_jsr_insn, branch_prepass, check_class_constant,
1948         check_wide_constant, get_one_type, compute_static_types,
1949         verify_instructions_0): Clean up C99 declarations after statements.
1951 2004-10-20  Tom Tromey  <tromey@redhat.com>
1953         * verify-impl.c (merge_refs): Compare reference against iterator,
1954         not ref2.
1956         * verify-glue.c (vfy_tag): Mask off resolved flag.
1958 2004-10-19  Tom Tromey  <tromey@redhat.com>
1960         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
1961         (init_state_with_stack): Initialize `this_type' in state.
1962         (verify_method): Use debug_print.
1963         * verify-glue.c (vfy_is_primitive): Removed debugging print.
1964         (vfy_note_stack_depth): Reverted last patch.
1965         (vfy_note_stack_type): Note pointer to Object, not Object.
1966         (vfy_note_local_type): Likewise.
1968         * verify.h (vfy_note_instruction_seen): Declare.
1969         * verify-glue.c (verify_jvm_instructions_new): Set
1970         BCODE_EXCEPTION_TARGET on target instruction.
1971         (vfy_note_instruction_seen): New function.
1972         * verify-impl.c (FLAG_INSN_SEEN): New define.
1973         (verify_instructions_0): Set flag on instruction.  Save state for
1974         PC=0 later.
1975         (verify_instructions): Call vfy_note_instruction_seen.
1977         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
1978         (verify_jvm_instructions_new): Call method_init_exceptions,
1979         add_handler, and handle_nested_ranges.
1980         * verify-impl.c (verify_method): Return 1 on success.
1981         (verify_instructions_0): Save the state at PC=0.
1983         * verify-impl.c (init_type_from_class): Set is_resolved and
1984         ref_next on new ref_intersection.
1985         (init_type_from_string): Likewise.
1987 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
1989         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
1990         if flag_new_verifier is set.
1991         * java-tree.h (flag_new_verifier): Declare.
1992         * lang.opt (fnew-verifier): New option.
1993         * verify-impl.c: Work around namespace pollution by undef'ing
1994         'current_class'.
1995         (struct verifier_context): Make 'bytecode' const.
1996         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
1997         (types_compatible): For the BC-ABI, always consider reference types
1998         compatible.
1999         (check_class_constant): Use vfr->current_class.
2000         (check_constant): Likewise.
2001         (check_wide_constant): Likewise.
2002         (check_field_constant): Check for 'L' at start of type name.
2003         (get_one_type): Return pointer instead of type. Set type result in
2004         caller via passed type pointer.
2005         (compute_argument_types): Update to use new get_one_type arguments.
2006         (compute_return_type): Likewise.
2007         (make_verifier_context): New. Allocate and initialize 'vfr'.
2008         (free_verifier_context): New. Free 'vfr' and its contents.
2009         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
2010         and free_verifier_context.
2012 2004-10-15  Tom Tromey  <tromey@redhat.com>
2014         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
2015         * verify.h (vfy_fail): Fixed formatting.
2017         * verify-impl.c (vfr): Fixed comment formatting.
2018         (collapse_type): New function.
2019         (verify_instructions): Notify compiler about type map.
2020         * verify.h (vfy_note_stack_depth): Updated.
2021         (vfy_note_stack_type): Likewise.
2022         (vfy_note_local_type): Likewise.
2023         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
2024         Declare.
2025         * verify-glue.c (vfy_note_stack_depth): Correctly size type
2026         state.  Added `method' argument.
2027         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
2028         argument.
2029         (vfy_note_local_type): New function.
2030         (vfy_unsuitable_type): Likewise.
2031         (vfy_return_address_type): Likewise.
2032         (vfy_null_type): Likewise.
2034         * verify.h (VFY_IN_GCC): Removed.
2035         (VFY_WANT_TYPEMAP): Removed.
2036         * verify-impl.c (verify_instructions_0): Removed useless "\".
2037         (struct state) <next>: Uncomment.
2039 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
2041         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
2042         C-style.
2044 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2046         * Make-lang.in (verify.o): Re-enabled this target.
2047         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
2048         (vfy_get_interface): Likewise.
2049         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
2050         * verify.h (verify_jvm_instructions_new): Declare.
2051         * verify-impl.c (free_state): Temporarily comment out unused
2052         function.
2054 2004-10-06  Tom Tromey  <tromey@redhat.com>
2056         * java-tree.h (JV_STATE_READ): New enum value.
2058 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
2060         * verify.h: New file.
2062 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
2064         * verify-impl.c, verify-glue.c, verify.h: New files.
2065         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
2067 2004-09-24  Andrew Haley  <aph@redhat.com>
2069         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
2070         for a slot if it's of pointer type.
2072 2004-09-14  Tom Tromey  <tromey@redhat.com>
2074         * class.c (make_class_data): Correctly initialize "state" field.
2075         Initialize "engine" field.
2076         * decl.c (java_init_decl_processing): Add "engine" field.
2078 2004-09-10  Andrew Haley  <aph@redhat.com>
2080         PR java/12760
2081         * expr.c (build_invokeinterface): Use fast method for interface
2082         dispatch.
2083         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
2084         JTI_ITABLE_PTR_TYPE.
2085         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
2086         (emit_symbol_table): Add new arg, element_size.
2087         * decl.c (java_init_decl_processing): Initialize Class.itable.
2088         * class.c (GEN_TABLE): New macro.
2089         (gen_indirect_dispatch_tables): Use it.  Add itable.
2090         (make_class_data): Add new arg for emit_symbol_table().
2091         Emit itable.
2092         (add_miranda_methods): Make sure search_class has been parsed.
2093         (emit_symbol_table): Add new arg, element_size.
2095 2004-09-06  Andrew Haley  <aph@redhat.com>
2097         * verify.c (merge_types): Return Object for all merges of
2098         interfaces.
2099         * expr.c (add_type_assertion): Don't generate assertions when
2100         source type is array of Object.
2102 2004-09-03  Andrew Haley  <aph@redhat.com>
2104         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
2106         * lang.c (java_post_options): Force flag_verify_invocations if
2107         we're not using indirect dispatch.
2109         * expr.c (pop_type_0): Move test for interfaces before call to
2110         can_widen_reference_to().
2111         (build_signature_for_libgcj): Remove generation of canonical array
2112         type.
2113         (add_type_assertion): Canonicalize both arrays.
2114         Don't assert that type X can be assigned to Object.
2115         Don't assert that type X an be assigned to type X.
2116         Don't assert that Object can be assigned to type X.
2117         (can_widen_reference_to): Warn whenever we generate an assertion.
2118         (process_jvm_instruction): Use throwable_type_node for the type of
2119         an exception class.
2121 2004-09-01  Andrew Haley  <aph@redhat.com>
2123         * decl.c (java_init_decl_processing): Change
2124         verify_identifier_node to "__verify".
2125         * expr.c (add_type_assertion): Use verify_identifier_node for name.
2126         * java-tree.h (verify_identifier_node): Change to "__verify".
2128         * expr.c (build_signature_for_libgcj): New function.
2129         (add_type_assertion): Use it to construct signatures for
2130         source_type and target_type.
2132 2004-08-27  Andrew Haley  <aph@redhat.com>
2134         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
2135         (verify_identifier_node): New.
2136         (TYPE_VERIFY_METHOD): New.
2137         (struct type_assertion): New type.
2138         * expr.c (type_assertion_eq): New function.
2139         (type_assertion_hash): New function.
2140         (add_type_assertion): New function.
2141         (can_widen_reference_to): Call add_type_assertion().
2142         * decl.c (java_init_decl_processing): Add verify_identifier_node.
2143         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
2144         (finish_class): Output TYPE_VERIFY_METHOD (type).
2146         * decl.c (end_java_method): Nullify unused fields.
2148 2004-08-17  Andrew Haley  <aph@redhat.com>
2150         * verify.c (defer_merging): Quieten.
2151         * jcf-parse.c (load_class): Only try to open a class file if it's
2152         java.lang.Object or if it's part of the current compilation.
2153         Check that the class we just tried to load is the class we just
2154         loaded.  Quieten.
2155         (java_parse_file): Set flag_verify_invocations off if we're
2156         compiling from .class.
2157         (parse_zip_file_entries): Abort if we try to read a dummy class.
2158         * expr.c (can_widen_reference_to): Quieten.
2159         (build_invokevirtual): Abort if we try to invokevirtual an
2160         interface.
2161         (expand_invoke): Don't build a non-interface call to an interface.
2162         (build_instanceof): Don't do premature optimization if
2163         flag_verify_invocations is not set.
2164         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
2165         from superclass.
2166         (build_static_field_ref): Add correct type conversion for
2167         field_address.
2168         (add_miranda_methods): Disable generation of Miranda methods for
2169         dummy classes.
2170         (layout_class_method): Don't complain about non-static method
2171         overrides static method with dummy classes.
2173 2004-08-13  Tom Tromey  <tromey@redhat.com>
2175         * class.c (build_static_field_ref): Re-enable atable lookups for
2176         static fields.
2178         * parse.y (strip_out_static_field_access_decl): Indentation fix.
2180 2004-08-11  Tom Tromey  <tromey@redhat.com>
2182         * gcj.texi (libgcj Runtime Properties): Document new properties.
2184 2004-08-06  Andrew Haley  <aph@redhat.com>
2186         * jcf-parse.c (load_class): Check that we really have loaded the
2187         class we're looking for.
2189 2004-07-19  Andrew Haley  <aph@redhat.com>
2191         * verify.c (verify_jvm_instructions): Comment change only.
2193         * typeck.c (build_java_array_type): Add size field to array name.
2195         * java-tree.h (LOCAL_SLOT_P): New.
2196         (update_aliases): Add PC argument.
2197         (pushdecl_function_level): New function.
2199         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
2200         MODIFY_EXPR, and SAVE_EXPR.
2201         (java_gimplify_modify_expr): New function.
2203         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
2204         (expand_iinc): Pass PC to update_aliases().
2205         (STORE_INTERNAL): Likewise.
2206         (process_jvm_instruction): Likewise.
2208         * decl.c (base_decl_map): New variable.
2209         (uniq): New variable.
2210         (update_aliases): Rewrite with more thorough checking.
2211         (debug_variable_p): New function.
2212         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
2213         (check_local_named_variable): Delete whole function.
2214         (initialize_local_variable): New function.
2215         (check_local_unnamed_variable): Add checks and comments.
2216         (find_local_variable): Rewrite.
2217         (java_replace_reference): New function.
2218         (function_binding_level): New variable.
2219         (pushdecl_function_level): New function.
2220         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
2221         (maybe_pushlevels): Call pushdecl() on each of the new decls.
2222         (start_java_method): Reset uniq.  Create base_decl_map.  Set
2223         function_binding_level.
2224         (end_java_method): Null unused fields to save memory.
2226 2004-06-29  Andrew Haley  <aph@redhat.com>
2228         * except.c (expand_start_java_handler): Push a new binding level.
2229         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
2230         register_exception_range() to register where we'll do it.
2231         (expand_end_java_handler): Remove old bogus code.  Replace with
2232         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
2233         the top of the expression we're curently building.
2234         (maybe_end_try): Delete.
2235         * decl.c (binding_level.exception_range): New field.
2236         (clear_binding_level): Add field exception_range.  Reformat.
2237         (poplevel): Call expand_end_java_handler().
2238         (poplevel): Call java_add_stmt only if functionbody is false.
2239         (maybe_poplevels): Don't call maybe_end_try() from here.
2240         (end_java_method): Clear no longer used trees in function decl.
2241         (register_exception_range): New function.
2242         * java-tree.h (register_exception_range, struct eh_range): Declare.
2244 2004-06-22  Andrew Haley  <aph@redhat.com>
2246         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
2247         the otable.
2248         * check-init.c (get_variable_decl): Teach check-init about
2249         FIELD_DECLs addressed via the otable.
2250         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
2251         CLASS_PARSED_P.
2253 2004-05-28  Andrew Haley  <aph@redhat.com>
2255         * jcf-parse.c (load_class): Don't try to read a class that we've
2256         already read.
2258         * expr.c (build_invokeinterface): Use the old-fashioned way of
2259         doing indirect dispatch: look up interfaces by name.
2260         * java-tree.h (enum java_tree_index): Add
2261         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
2262         * decl.c (java_init_decl_processing): Add
2263         soft_lookupinterfacemethodbyname_node.
2265         * gjavah.c (print_method_info): Final methods have vtable entries,
2266         so gjavah needs to output them.
2267         * class.c (layout_class_method): Generate vtable entries for final
2268         methods.
2269         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
2270         dispatch, even if a method is final.
2272 2004-05-25  Andrew Haley  <aph@redhat.com>
2274         * class.c (build_symbol_entry): Convert the names of constructors
2275         to init_identifier_node when generating an entry for the indirect
2276         dispatch table.
2278         * expr.c (build_known_method_ref): Generate indirect calls for
2279         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
2281 2004-05-24  Andrew Haley  <aph@redhat.com>
2283         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
2284         atable element is of the right type.
2286         * class.c (build_static_field_ref): Cast pointer to correct type
2287         for field.
2289 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2291         * Merged with HEAD as of 20040514. Diff against
2292         gcj-abi-2-merge-20040514.
2294 2004-04-16  Andrew Haley  <aph@redhat.com>
2296         * verify.c (check_pending_block): Disable subroutine checks.
2297         (defer_merging): New function.
2298         (merge_types): If types are dummy, use defer_merging to combine them.
2299         (verify_jvm_instructions): If invocation is invokeinterface and
2300         target is dummy, assume target really is an interface.
2302         * parse.y (patch_invoke): Break out call to java_create_object.
2304         * lang.c (flag_verify_invocations): New.
2306         * jcf-parse.c (load_class): If we've already failed to load a
2307         class, don't try again.
2308         (load_class): If we can't find a .class file, don't fail, but emit
2309         a warning.
2310         (parse_class_file): Don't act on dummy methods.
2312         * java-tree.h (flag_verify_invocations): New.
2313         (TYPE_DUMMY): New.
2314         (lang_type.dummy_class): New field.
2315         (java_create_object): New function.
2316         (METHOD_DUMMY): New.
2318         * expr.c (build_field_ref): Widen field offset.
2319         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
2320         that each of its elements is compatible with the one we're
2321         popping.
2322         (pop_type_0): Issue a warning to say that we need to generate a
2323         runtime check.
2324         (java_create_object): New function.
2325         (build_field_ref): Only generate hard refs if we're not using
2326         indirect dispatch.
2327         (expand_java_field_op): If we're using !verify_invocations and we
2328         see a missing field, generate a decl for it.
2330         (expand_invoke): If a class doesn't have the method we seek and
2331         we're using !flag_verify_invocations, generate a decl for the
2332         method now.
2334         (build_known_method_ref): Always use indirect dispatch via the
2335         atable for static methods.
2337         (expand_java_NEW): Break out object creation into new function,
2338         java_create_object.
2340         (can_widen_reference_to): Issue a warning to say that we need to
2341         generate a runtime check.
2343         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
2344         (make_method_value): Also use index for interfaces.
2345         (make_class_data): Skip dummy field for inherited data.
2346         Don't build method array for dummy methods.
2347         Set size_in_byte to -1 when using inirect dispatch
2348         Don't build a hard class ref if we don't have a hard ref to our
2349         superclass, or if we're using inirect dispatch.
2350         Null out dispatch tables.
2352         (layout_class_method): Don't complain about non-static method
2353         overrides static method is method is artificial.
2355         (build_static_field_ref): Disable atable references to static
2356         fields for the time being.
2358         (layout_class_methods): Check for CLASS_INTERFACE as
2359         well as CLASS_ABSTRACT.
2361 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2363         * class.c (make_class_data): Don't check flag_inline_functions.
2364         * lang.c (flag_really_inline): Remove unused flag.
2365         (java_handle_option): Don't set it here.  Remove special handling
2366         of flag_inline_functions for Java.
2367         (java_init): Don't set flag_inline_trees here.  Already done...
2368         (java_post_options): ...here.  Don't clear flag_inline_functions.
2370 2004-11-24  Steven Bosscher  <stevenb@suse.de>
2372         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
2373         (java_gimplify_exit_block_expr): New function.
2374         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
2375         LABELED_BLOCK_EXPR.
2376         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
2377         (EXIT_BLOCK_EXPR): Likewise.
2378         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
2379         (LABELED_BLOCK_BODY): Likewise.
2380         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
2381         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
2382         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
2383         TREE_OPERAND.
2384         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
2385         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
2386         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
2387         second operand of EXIT_BLOCK_EXPR.
2388         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
2389         TREE_OPERAND.
2390         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
2392 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2394         * xref.h (xref_flag_value): Remove.
2395         (xref_set_data, xref_get_data): Likewise.
2396         (xref_set_current_fp): Likewise.
2397         (XREF_NONE): Likewise.
2398         (XREF_GET_DATA): Likewise.
2399         * xref.c (xref_flag_value): Remove.
2400         (xref_set_data, xref_get_data): Likewise.
2401         (xref_set_current_fp): Likewise.
2403 2004-11-23  Ben Elliston  <bje@au.ibm.com>
2405         * gjavah.c (output_directory): Make static.
2406         (temp_directory): Likewise.
2408 2004-11-15  Tom Tromey  <tromey@redhat.com>
2410         * decl.c (instn_ptr_type_node): Removed.
2411         (lineNumbers_ptr_type_node): Removed.
2412         (jint_type): Removed.
2413         (jint_ptr_type): Removed.
2415 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
2417         PR java/15576
2418         * check-init.c (check_init): Ignore DECL_EXPR.
2419         * expr.c (always_initialize_class_p): Reenable.
2420         (build_class_init): Use a variable to store the decl.  Also use
2421         boolean_false_node instead of integer_zero_node.
2422         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
2423         to the block.
2425 2004-11-08  Tom Tromey  <tromey@redhat.com>
2427         PR java/16843:
2428         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
2429         generating a JNI header.
2430         (print_field_info): Handle JNI headers.
2431         (jni_print_float): Likewise.
2432         (jni_print_double): Likewise.
2434 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
2436         * decl.c (end_java_method): Remove duplicated code.
2438 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
2439             Gerald Pfeifer  <gerald@pfeifer.com>
2441         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
2442         as well.
2444 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
2446         PR java/17265
2447         * class.c: Reinstate 2004-08-18 patch.
2448         (make_local_function_alias): Don't create an alias for extern (native)
2449         functions.
2451 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
2453         PR java/17265
2454         * class.c (make_local_function_alias): Revert 2004-08-18 change.
2455         (make_method_value): Likewise.
2457 2004-10-21  Andrew Haley  <aph@redhat.com>
2459         PR java/18091:
2460         * jcf-parse.c (set_source_filename): Add code to build new sfname.
2462 2004-10-20  Andrew Haley  <aph@redhat.com>
2464         * decl.c (end_java_method): Don't expand if flag_syntax_only.
2465         Remove duplicated code block.
2467 2004-10-18  Steven Bosscher  <stevenb@suse.de>
2469         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
2470         New rules to work around old Bison warnings.
2472 2004-10-17  Steven Bosscher  <stevenb@suse.de>
2474         * class.c (ident_subst): Always alloca buffer.
2475         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
2476         opcode after including javaop.def.
2477         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
2478         conditional expression that exits, to avoid warnings.
2479         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
2480         a user of an extension.
2481         * win32-host.c: Move check down to have non-empty file when
2482         WIN32 is not defined.
2484         * Make-lang.in (java-warn): Add STRICT_WARN.
2485         (java/jcf-io.o-warn): Don't have Werror for this file.
2486         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
2488 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
2490         * expr.c (expr_add_location): Move declaration to before all
2491         statements.
2492         * parse.y (java_expand_classes): Ditto.
2493         * lex.c (java_peek_unicode): Ditto.
2495 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
2497         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
2498         if possible, else convert `foo' to 'foo'.
2499         * class.c: Likewise.
2500         * decl.c: Likewise.
2501         * expr.c: Likewise.
2502         * jcf-io.c: Likewise.
2503         * jcf-parse.c: Likewise.
2504         * lang.c: Likewise.
2505         * lex.c: Likewise.
2506         * parse.h: Likewise.
2508 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
2510         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
2511         rename parameter 'msg' to 'msgid' in function declaration.
2512         (issue_warning_error_from_context): Likewise.
2513         (yyerror): Rename parameter 'msg' to 'msgid'.
2514         (all over): Use new quoting style for diagnostics.
2516 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
2518         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
2519         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
2520         Update copyright.
2522 2004-10-14  Matt Austern  <austern@apple.com>
2524         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
2525         pointer_set_t* now.
2527 2004-10-13  Tom Tromey  <tromey@redhat.com>
2529         PR java/15578:
2530         * lang.opt (--extdirs): Document.
2531         * jvspec.c (lang_specific_driver): Recognize -encoding and
2532         -extdirs.
2534 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
2536         * parse.y (issue_warning_error_from_context): Use va_list *
2537         instead of va_list parameter.
2538         (parse_error_context): Update call.
2539         (parse_warning_context): Likewise.
2541 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
2543         * parse.y, parse-scan.y: Add list of diagnostic messages to
2544         insulate translation template from version of yacc/bison used
2545         to compile the grammar.
2547 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
2549         Prepare for %q, %< and %> in diagnostic message strings.
2550         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
2551         Name second parameter 'msgid'.
2552         * parse.y: Additionally include pretty-print.h and diagnostic.h.
2553         (issue_warning_error_from_context): Use pretty-printer functions
2554         instead of vsprintf for constructing formatted messages. Rename
2555         parameter 'msg' to 'msgid'.
2556         (parse_error_context): Rename parameter 'msg' to 'msgid'.
2557         (parse_warning_context): Likewise.
2559 2004-10-05  Andrew Haley  <aph@redhat.com>
2561         PR java/17779
2562         * jcf-parse.c (parse_zip_file_entries): If a class has a
2563         superclass and a TYPE_SIZE of zero, lay it out.
2565 2004-09-30  Andrew Haley  <aph@redhat.com>
2567         PR java/17733
2568         * jcf-parse.c (compute_class_name): Rewrite.
2570 2004-10-01  Jan Hubicka  <jh@suse.cz>
2572         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
2574 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
2576         * lex.c: Fix a comment typo.
2578 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
2580         * java-tree.h: Fix a comment typo.
2582 2004-09-30  Per Bothner  <per@bothner.com>
2584         Simplify lexer.  Implement --enable-mapped-location support.
2585         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
2586         (parse_source_file_1): Pass filename as extra parameter, so we can call
2587         linemap_add and set input_location here, rather than in both callers.
2588         (read_class): Pass copied filename to parse_source_file_1.
2589         Don't initialize wfl_operator - only needed for source compilation.
2590         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
2591         * lex.h:  Remove a bunch of debugging macros.
2592         * lex.h (struct_java_line, struct java_error):  Remove types.
2593         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
2594         (struct java_lc_s):  Remove prev_col field.
2595         (struct java_lexer):  New fields next_unicode, next_columns, and
2596         avail_unicode.  New position field, and maybe token_start field.
2597         Don't need hit_eof field - use next_unicode == -1 instead.
2598         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
2599         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
2600         * parse.h:  Various changes for USE_MAPPED_LOCATION.
2601         (EXPR_WFL_EMIT_LINE_NOTE): XXX
2602         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
2603         (struct parser_ctxt):  New file_start_location field.
2604         Remove p_line, c_line fields since we no longer save lines.
2605         Remove elc, lineno, and current_jcf fields - no longer used.
2606         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
2607         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
2608         source_location and is probably not needed anymore anyway.
2609         Use new expr_add_Location function.
2610         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
2611         (java_pop_parser_context):  Minor cleanup.
2612         (java_parser_context_save_global, java_parser_context_restore_global,
2613         java_pop_parser_context):  Save/restore input_location as a unit.
2614         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
2615         a source_location instead of a wfl context node.
2616         (check_class_interface_creation):  input_filename is not addressable.
2617         (create_artificial_method):  Calling java_parser_context_save_global
2618         and java_parser_context_restore_global is overkill.  Instead,
2619         temporarily set input_location from class decl.
2620         (java_layout_seen_class_methods): Set input_location from method decl.
2621         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
2622         (finish_loop_body):  Likewise.
2623         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
2624         (java_sprint_unicode):  Take a character, not index in line.
2625         (java_sneak_uncode):  Replaced by java_peek_unicode.
2626         (java_unget_unicode):  No longer used.
2627         (java_allocate_new_line. java_store_unicode):  Removed, since we
2628         no longer remember "lines".
2629         (java_new_lexer):  Update for new data structures.
2630         (java_read_char):  Move unget_value checking to java_read_unicode.
2631         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
2632         efficient functions that are used directly when lexing.
2633         (java_read_unicode_collapsing_terminators):  No longer needed.
2634         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
2635         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
2636         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
2637         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
2638         combine switch branches, and test for common token kinds earlier.
2639         (java_lex_error):  Rewrite.
2640         * jv-scan.c (expand_location): New function, copied from tree.c.
2641         (main): Set ctxp->filename instead of setting input_filename directly.
2643 2004-09-30  Per Bothner  <per@bothner.com>
2645         More cleanup for --enable-mapped-location.
2646         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
2647         input_location here.  Instead do it in give_name_to_class.
2648         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
2649         * expr.c (expand_byte_code): Call linemap_line_start.
2650         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
2651         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
2652         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
2653         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
2654         to USE_MAPPED_LOCATION case.
2656         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
2657         * jcf-parse.c (java_parse_file): Don't set input_filename.
2658         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
2659         Create a list of TRANSLATION_UNIT_DECL.
2660         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
2661         reason is so we can set a DECL_SOURCE_LOCATION for each file.
2662         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
2663         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
2664         (file_start_location):  New static.
2665         (set_source_filename):  Avoid extra access to input_filename macro.
2666         Concatenate new name with class's package prefix.
2667         (set_source_filename, give_name_to_class): Update.
2668         (give_name_to_class):  Set class's "line 0" input_location here.
2669         (parse_class_file):  Set input_location as a unit.
2671         * jcf-parse.c (load_class): Sanity test if missing inner class file.
2673 2004-09-29  Per Bothner  <per@bothner.com>
2675         * java-tree.h:  Redefine some macros and add some declaration
2676         to handle the USE_MAPPED_LOCATION case.
2677         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
2678         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
2679         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
2680         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
2682         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
2683         * decl.c (finish_method, java_add_stmt): Likewise.
2684         * java-gimplify.c (java-gimplify.c):  Likewise.
2685         * jcf-write.c (generate_bytecode_insns):  Likewise.
2686         * lang.c (java_post_options): Likewise - call linemap_add.
2688 2004-09-29  Andrew Haley  <aph@redhat.com>
2690         PR java/17007
2691         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
2692         result of TRUNC_MOD_EXPR.
2693         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
2694         * decl.c (java_init_decl_processing): Mark
2695         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
2697 2004-09-28  Tom Tromey  <tromey@redhat.com>
2699         PR java/15710:
2700         * class.c (add_miranda_methods): Load superinterface if not
2701         already loaded.
2703 2004-09-28  Andrew Haley  <aph@redhat.com>
2705         PR java/17586
2706         * jcf-parse.c (load_class): Don't try to read a class that we've
2707         already read.
2709 2004-09-28  Andrew Haley  <aph@redhat.com>
2711         * jcf-parse.c (load_class): Back out previous broken patch.
2713 2004-09-28  Andrew Haley  <aph@redhat.com>
2715         PR java/17586
2716         * jcf-parse.c (load_class): Don't try to read a class that we've
2717         already read.
2718         Check that we really did read the right class.
2720 2004-09-25  Tom Tromey  <tromey@redhat.com>
2722         PR java/17500:
2723         * parse.y (create_artificial_method): Use add_method_1.
2725 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
2727         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
2728         comment typos.
2729         * gcj.texi: Fix typos.
2731 2004-09-24  Tom Tromey  <tromey@redhat.com>
2733         PR java/15656:
2734         * parse.y (class_instance_creation_expression): Set `$$' to NULL
2735         in error parts of rule.
2736         (unary_expression): Don't call error_if_numeric_overflow when $1
2737         is NULL.
2739 2004-09-24  Tom Tromey  <tromey@redhat.com>
2741         PR java/16789:
2742         * parse.y (resolve_qualified_expression_name): Set
2743         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
2744         * expr.c (force_evaluation_order): Check for empty argument list
2745         after stripping COMPOUND_EXPR.
2747 2004-09-23  Andrew Haley  <aph@redhat.com>
2749         PR java/16927:
2750         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
2751         COND_EXPRs.
2753 2004-09-23  Tom Tromey  <tromey@redhat.com>
2755         PR java/17329:
2756         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
2757         where operand is null.
2759 2004-09-23  Tom Tromey  <tromey@redhat.com>
2761         PR java/17380:
2762         * parse.y (not_accessible_p): Allow access to protected members
2763         even when class is not static.
2765 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
2767         * Make-lang.in: Revert the gcc-none.o change.
2769 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
2771         * parse.y (patch_anonymous_class): VEC_space returns true if there
2772         is space.
2774 2004-09-21  Matt Austern  <austern@apple.com>
2776         Fix bootstrap.
2777         * gjavah.c (free_method_name_list): Fix function definition so
2778         it's a proper C prototype.
2780 2004-09-21  Tom Tromey  <tromey@redhat.com>
2782         PR java/17575:
2783         * gjavah.c (free_method_name_list): New method.
2784         (main): Call it.
2786 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
2787             Zack Weinberg  <zack@codesourcery.com>
2789         * java-tree.def: Use tree_code_class enumeration constants
2790         instead of code letters.
2791         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
2792         new tree-class enumeration constants.
2794 2004-09-13  Tom Tromey  <tromey@redhat.com>
2796         PR java/17216:
2797         * class.c (layout_class_method): Put synthetic methods into the
2798         vtable.
2800 2004-09-11  Andrew Pinski  <apinski@apple.com>
2802         * Make-lang.in (java/ggc-none.c): Change dependency
2803         for ggc.h into $(GGC_H).
2805 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2807         * Make-lang.in (java/win32-host.o): Add dependency on
2808         coretypes.h.
2809         * win32-host.c: Add includes for coretypes.h, jcf.h
2811 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
2813         * Make-lang.in (GCJH_OBJS): Change dependency from
2814         ggc-none.o to java/ggc-none.o
2815         (JCFDUMP_OBJS): Likewise.
2816         (java/ggc-none.o): New target.
2818 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
2820         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
2821         * class.c (build_utf8_ref, build_static_field_ref,
2822         make_field_value, make_method_value, get_dispatch_table,
2823         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2824         * constants.c (get_tag_node, build_ref_from_constant_pool,
2825         build_constants_constructor): Likewise.
2826         * decl.c (java_init_decl_processing): Likewise.
2827         * expr.c (build_java_array_length_access, build_newarray,
2828         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2829         build_java_binop, build_field_ref, expand_java_add_case,
2830         expand_java_call, build_known_method_ref, build_invokevirtual,
2831         build_invokeinterface, build_jni_stub): Likewise.
2832         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2833         * jcf-parse.c (get_constant): Likewise.
2834         * lex.c (do_java_lex): Likewise.
2835         * parse.y (patch_binop, patch_unaryop, patch_cast,
2836         build_newarray_node, patch_newarray): Likewise.
2837         * resource.c (compile_resource_data): Likewise.
2838         * typeck.c (build_prim_array_type): Likewise.
2840 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
2842         * decl.c (java_init_decl_processing): Adjust
2843         initialize_sizetypes call.
2845 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
2847         * jv-scan.c (fancy_abort): Add.
2849 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
2851         * expr.c (build_java_arrayaccess): Use convert to change
2852         len's type.
2854 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
2856         * class.c (make_local_function_alias): Allocate extra space for 'L'
2857         in name buffer. Reported by Thomas Neumann.
2859 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
2861         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
2862         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
2863         * lex.c (do_java_lex): Adjust.
2864         (error_if_numeric_overflow): Likewise.
2866 2004-08-18  Andrew Pinski  <apinski@apple.com>
2868         * class.c (make_local_function_alias): Only make a new decl if we
2869         support alias attribute on all decls.
2871 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
2873         * class.c (make_local_function_alias): New function. Create local
2874         alias for public method DECL.
2875         (make_method_value): Use make_local_function_alias.
2876         * parse.y (craft_constructor): Don't special-case anonymous classes.
2877         Always set ctor_name to init_identifier_node.
2878         (lookup_method_invoke): Call layout_class_method when creating
2879         anonymous class constructor.
2881 2004-08-18  Richard Henderson  <rth@redhat.com>
2883         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
2884         default case.  Treat '<' similarly.  Update for
2885         is_gimple_formal_tmp_var name change.
2887 2004-08-17  Andrew Haley  <aph@redhat.com>
2889         * lang.c (lang_printable_name): Obey verbose flag.
2890         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
2891         lang_printable_name().
2892         (verify_constructor_circularity, get_printable_method_name,
2893         check_abstract_method_definitions, java_check_regular_methods,
2894         java_check_abstract_methods, check_inner_class_access,
2895         fix_constructors, patch_method_invocation, patch_return):
2896         Likewise.
2897         * expr.c (pop_type_0): Likewise.
2899         * java-tree.h (lang_printable_name_wls): Delete.
2901 2004-08-16  Tom Tromey  <tromey@redhat.com>
2903         PR java/8473:
2904         * parse.y (primary): Changed for initialized and uninitialized
2905         array creations.
2906         (array_access): Handle array_creation_initialized.
2907         (array_creation_expression): Split into
2908         array_creation_initialized and array_creation_uninitialized.
2910 2004-08-16  Andrew Haley  <aph@redhat.com>
2912         * jcf-write.c (find_constant_index): Canonicalize NaNs when
2913         generating bytecode.
2915 2004-08-16  Elliot Lee <sopwith@redhat.com>
2917         PR java/9677
2918         * jcf-parse.c (java_parse_file): Handle filenames with embedded
2919         spaces, and quoted filelists.
2921 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2923         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
2924         * class.c (build_utf8_ref, build_static_field_ref,
2925         make_field_value, make_method_value, get_dispatch_table,
2926         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
2927         * constants.c (get_tag_node,  build_ref_from_constant_pool,
2928         build_constants_constructor): Likewise.
2929         * decl.c (java_init_decl_processing): Likewise.
2930         * expr.c (build_java_array_length_access, build_newarray,
2931         expand_java_multianewarray, expand_java_pushc, expand_iinc,
2932         build_java_binop, build_field_ref, expand_java_add_case,
2933         expand_java_call, build_known_method_ref, build_invokevirtual,
2934         build_invokeinterface, build_jni_stub): Likewise.
2935         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
2936         * jcf-parse.c (get_constant): Likewise.
2937         * lex.c (do_java_lex): Likewise.
2938         * parse.y (patch_binop, patch_unaryop, patch_cast,
2939         build_null_of_type, patch_newarray): Likewise.
2940         * resource.c (compile_resource_data): Likewise.
2941         * typeck.c (build_prim_array_type): Likewise.
2943 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
2945         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
2946         Don't create BLOCK here or call java_gimplify_block.
2948 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2950         * java-tree.h (flag_deprecated): Removed.
2951         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
2952         * parse.y (check_deprecation): Check warn_deprecated instead of
2953         flag_deprecated.
2955 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
2957         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
2958         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
2959         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
2960         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
2961         flag_force_classes_archive_check, flag_optimize_sci,
2962         flag_indirect_dispatch): Remove explicit declarations.
2963         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
2964         final comment.
2966 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
2968         PR bootstrap/14893
2969         * Make-lang.in (java.install-man): Install from either build
2970         tree or source tree, whichever has the file first.
2972 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
2974         * jcf-parse.c (get_constant): Adjust force_fit_type call.
2975         * lex.h (SET_LVAL_NODE_TYPE): Remove.
2976         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
2977         (do_java_lex): Likewise. Adjust force_fit_type call.
2979 2004-08-04  Roger Sayle  <roger@eyesopen.com>
2980             Andrew Haley  <aph@redhat.com>
2982         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
2983         checking trees as they're being built.
2984         (convert): Call convert_ieee_real_to_integer if we're
2985         converting a constant, even if we're writing a class file.
2987 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
2989         PR java/16701
2990         * parse.y (fold_constant_for_init): Call resolve_field_access with
2991         correct current_class context.
2993 2004-08-01  Roger Sayle  <roger@eyesopen.com>
2995         * decl.c (update_aliases, initialize_local_variable): Replace calls
2996         to build with calls to buildN.
2997         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
2998         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
2999         * parse.h (BUILD_THROW): Likewise.
3000         * parse.y (switch_expression, synchronized_statement,
3001         catch_clause_parameter, array_creation_expression,
3002         conditional_expression, make_qualified_name,
3003         resolve_qualified_expression_name, patch_method_invocation,
3004         patch_invoke, build_method_invocation, build_new_invocation,
3005         build_assignment, patch_assignment, build_binop, patch_binop,
3006         build_string_concatenation, build_incdec, patch_unaryop,
3007         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
3008         patch_return, build_if_else_statement, build_labeled_block,
3009         build_new_loop, build_loop_body, build_bc_statement,
3010         build_assertion, encapsulate_with_try_catch, build_try_statement,
3011         build_try_finally_statement, patch_synchronized_statement,
3012         emit_test_initialization): Likewise, replace build with buildN.
3014 2004-07-28  Eric Christopher  <echristo@redhat.com>
3016         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
3017         (java_unsafe_for_reeval): Ditto.
3019 2004-07-26    <hp@bitrange.com>
3021         * parse.y (build_super_invocation): Adjust declaration order to
3022         avoid declaration after statement.
3024 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
3026         * decl.c: Rename all identifiers named `class' to `cl'.
3028 2004-07-25  Richard Henderson  <rth@redhat.com>
3030         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
3032 2004-07-23  Mike Stump  <mrs@apple.com>
3034         * boehm.c (set_bit): Improve type safety wrt unsignedness.
3035         * gjavah.c (throwable_p, decode_signature_piece,
3036         print_full_cxx_name, print_include, add_namelet, add_class_decl,
3037         process_file): Likewise.
3038         * jcf-dump.c (main): Likewise.
3039         * jcf-io.c (read_zip_member): Likewise.
3040         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
3041         give_name_to_class, get_class_constant): Likewise.
3042         * jcf-write.c (find_constant_wide, push_long_const,
3043         generate_classfile): Likewise.
3044         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
3045         * parse.y (read_import_dir): Likewise.
3046         * typeck.c (parse_signature_type): Likewise.
3047         * verify.c (verify_jvm_instructions): Likewise.
3048         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
3050 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3052         * Make-lang.in: Replace rmic and rmiregistry references with
3053         grmic and grmiregistry.
3054         * gcj.texi: Likewise.
3056 2004-07-20  Andrew Haley  <aph@redhat.com>
3058         PR java/16431.
3059         * verify.c (verify_jvm_instructions): Comment change only.
3061         * typeck.c (build_java_array_type): Add size field to array name.
3063         * java-tree.h (LOCAL_SLOT_P): New.
3064         (update_aliases): Add PC argument.
3065         (pushdecl_function_level): New function.
3067         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3068         MODIFY_EXPR, and SAVE_EXPR.
3069         (java_gimplify_modify_expr): New function.
3071         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3072         (expand_iinc): Pass PC to update_aliases().
3073         (STORE_INTERNAL): Likewise.
3074         (process_jvm_instruction): Likewise.
3076         * decl.c (base_decl_map): New variable.
3077         (uniq): New variable.
3078         (update_aliases): Rewrite with more thorough checking.
3079         (debug_variable_p): New function.
3080         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3081         (check_local_named_variable): Delete whole function.
3082         (initialize_local_variable): New function.
3083         (check_local_unnamed_variable): Add checks and comments.
3084         (find_local_variable): Rewrite.
3085         (java_replace_reference): New function.
3086         (function_binding_level): New variable.
3087         (pushdecl_function_level): New function.
3088         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3089         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3090         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3091         function_binding_level.
3092         (end_java_method): Null unused fields to save memory.
3094 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3096         * class.c (add_interface_do): Remove.
3097         (set_super_info, interface_of_p, maybe_add_interface,
3098         add_interface, make_class_data, layout_class,
3099         add_miranda_methods): Adjust BINFO accessors and addition.
3100         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
3101         accessors.
3102         * jcf-write.c (generate_classfile): Likewise.
3103         * parse.y (patch_anonymous_class, check_inner_circular_reference,
3104         check_circular_reference, java_complete_class,
3105         check_abstract_method_definitions,
3106         java_check_abstract_method_definitions,
3107         check_interface_throws_clauses, java_check_abstract_methods,
3108         lookup_java_interface_method2,
3109         find_applicable_accessible_methods_list): Adjust BINFO accessors
3110         and addition.
3111         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
3113 2004-07-18  Roger Sayle  <roger@eyesopen.com>
3115         * builtins.c (max_builtin, min_builtin,
3116         java_build_function_call_expr): Replace calls to build with buildN.
3117         * class.c (build_class_ref, build_static_field_ref,
3118         get_dispatch_table, make_class_data, layout_class_method): Likewise.
3119         * constants.c (build_ref_from_constant_pool): Likewise.
3120         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
3121         add_stmt_to_compound): Likewise.
3122         * except.c (build_exception_object_ref, expand_end_java_handler):
3123         Likewise.
3124         * java-gimplify.c (java_gimplify_case_expr,
3125         java_gimplify_default_expr, java_gimplify_block,
3126         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
3127         * jcf-write.c (generate_bytecode_insns): Likewise.
3128         * typeck.c (convert_ieee_real_to_integer): Likewise.
3130 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
3132         * java-tree.h (builtin_function): Declare.
3134 2004-07-16  Steven Bosscher  <stevenb@suse.de>
3136         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
3137         abuse restore_line_number_status.
3139 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
3141         g++/15861
3142         * jcf-parse.c (java_emit_static_constructor): Specify default
3143         priority.
3145 2004-07-13  Per Bothner  <per@bothner.com>
3147         * java-tree.h (all_class_filename):  Remove useless macro.
3148         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
3149         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
3150         * parse.y (java_parser_context_restore_global):  Replace
3151         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
3152         * jcf-parse.c (read_class, java_parse_file):  Likewise.
3154 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
3156         PR java/16474
3157         gjavah.c (print_field_info): Emit constant only if field is static.
3159 2004-07-11  Roger Sayle  <roger@eyesopen.com>
3161         * expr.c (java_truthvalue_conversion, flush_quick_stack,
3162         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
3163         build_java_ret, build_java_throw_out_of_bounds_exception,
3164         build_java_array_length_access, java_check_reference,
3165         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
3166         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
3167         expand_java_arrayload, build_java_monitor, expand_java_return,
3168         expand_load_internal, expand_java_NEW, build_get_class,
3169         build_instanceof, expand_java_CHECKCAST, expand_iinc,
3170         build_java_soft_divmod, build_java_binop, build_field_ref,
3171         expand_compare, expand_java_goto, expand_java_switch,
3172         expand_java_add_case, build_class_init, build_known_method_ref,
3173         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
3174         expand_invoke, build_jni_stub, expand_java_field_op,
3175         java_expand_expr, expand_byte_code, STORE_INTERNAL,
3176         force_evaluation_order, emit_init_test_initialization): Convert
3177         calls to "build" into calls to the prefered "buildN" functions.
3179 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
3181         * java-tree.h (set_block): Remove.
3182         * lang.c (java_clear_binding_stack): New.
3183         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
3184         * decl.c (struct binding_level): Remove this_block.
3185         (clear_binding_level): Likewise.
3186         (poplevel): Don't handle this_block.
3187         (set_block): Remove.
3189 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
3191         * class.c (common_enclosing_context_p): Remove statement with no
3192         side-effects.
3194 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3196         PR java/8618
3197         * parse.y (create_anonymous_class): Remove 'location' argument. Use
3198         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
3199         (craft_constructor): Inherit access flags for implicit constructor
3200         from the enclosing class.
3201         (create_class): Fix comment typo.
3202         (resolve_qualified_expression_name): Pass type of qualifier to
3203         not_accessible_p, not the type in which target field was found.
3204         (not_accessible_p): Handle inner classes. Expand protected
3205         qualifier-subtype check to enclosing instances, but don't apply this
3206         check to static members. Allow protected access to inner classes
3207         of a subtype. Allow private access within common enclosing context.
3208         (build_super_invocation): Get WFL line number info from current
3209         class decl.
3210         (build_incomplete_class_ref): Update for new create_anonymous_class
3211         signature.
3212         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
3213         common_enclosing_instance_p.
3214         * class.c (common_enclosing_context_p): New. Determine if types
3215         share a common enclosing context, even across static contexts.
3216         (common_enclosing_instance_p): Renamed from
3217         common_enclosing_context_p. Determines if types share a common
3218         non-static enclosing instance.
3219         * java-tree.h (common_enclosing_instance_p): Declare.
3220         * jcf-write.c (get_method_access_flags): New. Surpress private flag
3221         for inner class constructors.
3222         (generate_classfile): Use get_method_access_flags.
3224 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
3226         * class.c (interface_of_p): Check for null TYPE_BINFO.
3228 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
3230         * class.c (make_class): Do not create binfo here.
3231         (set_super_info): Create it here.
3232         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
3234 2004-07-08  Richard Henderson  <rth@redhat.com>
3236         * expr.c (case_identity, get_primitive_array_vtable,
3237         java_expand_expr, emit_init_test_initialization): Remove.
3238         * java-tree.h (java_expand_expr): Remove.
3239         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
3241 2004-07-07  Per Bothner  <per@bothner.com>
3243         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
3244         get internal error due to mismatched types.
3246         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
3248         * gcj.texi (Linking):   New node.  Document -lgij usage.
3250 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
3252         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
3253         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
3254         * java/class.c (set_super_info, class_depth, interface_of_p,
3255         maybe_add_interface, add_interface, make_class_data,
3256         layout_class, add_miranda_methods): Adjust BINFO macros.
3257         * expr.c (can_widen_reference_to, lookup_field): Likewise.
3258         * jcf-write.c (generate_classfile): Likewise.
3259         * parse.y (patch_anonymous_class,
3260         check_inner_circular_reference, check_circular_reference,
3261         java_complete_class, check_abstract_method_definitions,
3262         java_check_abstract_method_definitions,
3263         check_interface_throws_clauses, java_check_abstract_methods,
3264         lookup_java_interface_method2,
3265         find_applicable_accessible_methods_list): Likewise.
3266         * typeck.c (find_method_in_interface): Likewise.
3267         * verify.c (merge_types): Likewise.
3269 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3271         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
3272         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
3274 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3276         * class.c (make_class): Use make_tree_binfo.
3277         (set_super_info, add_interface_do): Likewise.
3278         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
3280 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
3282         * verify.c: Correct array element access formatting thinko.
3284 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
3286         * verify.c: Insert a short blurb at the start referring to the JVMS.
3287         (merge_type_state): Remove redundant nested if statement.
3288         (verify_jvm_instructions): Ensure current_subr is initialised to
3289         NULL_TREE.
3290         Minor formatting fixes all over the place.
3292 2004-07-02  Richard Henderson  <rth@redhat.com>
3294         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
3296 2004-07-01  Richard Henderson  <rth@redhat.com>
3298         * class.c (registerClass_libfunc): Remove.
3299         (init_class_processing): Don't set it.
3300         (emit_register_classes): Take list_p parameter.  Fill it in
3301         with _Jv_RegisterClass calls.
3302         * decl.c (java_init_decl_processing): Don't call
3303         init_resource_processing.
3304         * jcf-parse.c (java_emit_static_constructor): New.
3305         (java_parse_file): Call it.
3306         * resource.c (registerResource_libfunc): Remove.
3307         (init_resource_processing): Remove.
3308         (write_resource_constructor): Take list_p parameter.  Fill it in
3309         with _Jv_RegisterResource calls.
3310         * java-tree.h: Update prototypes.
3312 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
3314         PR java/1262
3315         * class.c (layout_class_method): Do not override package-private
3316         method if its in a different package.
3317         (split_qualified_name): Move here from parse.y. Rename from
3318         breakdown_qualified. Add comment.
3319         (in_same_package): Move here from parse.y. Add comment.
3320         * java-tree.h (break_down_qualified, in_same_package): Declare.
3321         (in_same_package): Likewise.
3322         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
3323         Callers updated.
3325 2004-06-29  Andrew Haley  <aph@redhat.com>
3327         * except.c (expand_start_java_handler): Push a new binding level.
3328         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3329         register_exception_range() to register where we'll do it.
3330         (expand_end_java_handler): Remove old bogus code.  Replace with
3331         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3332         the top of the expression we're curently building.
3333         (maybe_end_try): Delete.
3334         * decl.c (binding_level.exception_range): New field.
3335         (clear_binding_level): Add field exception_range.  Reformat.
3336         (poplevel): Call expand_end_java_handler().
3337         (poplevel): Call java_add_stmt only if functionbody is false.
3338         (maybe_poplevels): Don't call maybe_end_try() from here.
3339         (end_java_method): Clear no longer used trees in function decl.
3340         (register_exception_range): New function.
3341         * java-tree.h (register_exception_range, struct eh_range): Declare.
3343 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
3345         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
3347 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
3349         Formatting fixes.
3350         * expr.c (class_has_finalize_method): Fix method name indentation.
3351         (expand_java_call): Remove K&R style parameter declaration.
3352         (expand_invoke): Fix statement indentation.
3353         (expand_java_field_op): Likewise.
3354         * parse-scan.y: Fix typo.
3355         (reset_report): Fix method name indentation.
3356         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
3357         line. Fix typos.
3358         * verify.c (verify_jvm_instructions): Document parameters, insert
3359         page break.
3360         * lang.c (lang_init_source): Fix method name indentation.
3361         * class.c (common_enclosing_context_p): Likewise.
3362         (emit_symbol_table): Fix parameter list indentation.
3363         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
3364         parameter declaration.
3365         * constants.c: Fix copyright notice indentation.
3366         * typeck.c (find_method_in_superclasses): Fix parameter list
3367         indentation.
3368         (find_method_in_interfaces): Likewise.
3369         * zextract.c (makelong): Fix method name indentation.
3371 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3373         PR java/15715.
3374         * parse.y (create_interface): Set correct access modifiers for
3375         interfaces.
3376         * jcf-write.c (get_classfile_modifiers): New function.
3377         (generate_classfile): Use get_classfile_modifiers, not
3378         get_access_flags.
3380 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3382         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
3383         dependency to current parser context, not NULL_TREE, for top-level
3384         classes.
3385         (jdep_resolve_class): Enable member access check for all inner
3386         class dependencies.
3388 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3390         * parse.y (qualify_and_find): Pass type decl, not identifier, to
3391         load_class.
3393 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3395         PR java/15734
3396         * expr.c (expand_java_field_op): Ensure that target class for static
3397         field access has been loaded.
3399 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
3400             Ranjit Mathew  <rmathew@hotmail.com>
3402         PR java/1207, java/16178
3403         * jcf-parse.c (load_class): Return immediately if passed a type decl
3404         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
3405         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
3406         before calling load_class.
3407         (qualify_and_find): Likewise.
3408         (find_in_imports_on_demand): Likewise.
3409         (find_applicable_accessible_methods_list): Likewise.
3411 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
3413         * parse.y (java_layout_seen_class_methods): Don't call load_class
3414         on class defined by source parser.
3416 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3418         * parse.y (set_nested_class_simple_name_value): Removed.
3419         (java_complete_expand_class): Remove calls to
3420         set_nested_class_simple_name_value.
3422 2004-06-22  Andrew Haley  <aph@redhat.com>
3423             Ranjit Mathew  <rmathew@hotmail.com>
3425         Fixes PR java/16113.
3426         * decl.c (force_poplevels): Remove call to expand_end_bindings.
3428 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
3430         * parse.y (create_class): Correct diagnostic message about
3431         java.lang.Object extending anything else.
3433 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3435         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
3436         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
3437         * constants.c (build_ref_from_constant_pool): Likewise.
3438         * expr.c (build_java_array_length_access): Likewise.
3439         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
3440         (invoke_build_dtable, build_invokevirtual): Likewise.
3441         (build_invokeinterface, java_expand_expr): Likewise.
3442         (emit_init_test_initialization): Likewise.
3443         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
3444         * parse.y (make_qualifed_name, build_array_ref): Likewise.
3446 2004-06-21  Andrew Haley  <aph@redhat.com>
3448         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
3449         block.
3451 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
3453         * jcf.h (struct JCF): Change java_source, right_zip and finished
3454         to unsigned int.
3455         * lex.h (struct java_lexer): Change hit_eof, read_anything,
3456         byte_swap and use_fallback to unsigned int.
3457         * parse.h (struct _jdep): Change flag0 to unsigned int.
3459 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
3461         Fixes PR java/13948
3462         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
3463         before trying to lay out its methods.
3464         * jcf-parse.c (read_class): Track parsed files using canonical paths
3465         obtained via lrealpath from libiberty.
3466         (java_parse_file): Likewise.
3467         (parse_source_file_1): Rename formal parameter to reflect its
3468         modified purpose. Minor formatting fix.
3470 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
3472         * class.c (emit_register_classes): Make the function uninlinable,
3473         do not set current_function_cannot_inline.
3474         * resource.c (write_resource_constructor): Do not reset
3475         flag_inline_functions around rest_of_compilation.
3477 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
3479         PR java/15769
3480         * expr.c (java_truthvalue_conversion): Handle
3481         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
3482         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
3483         i.e. return the expression.
3485 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
3487         * gjavah.c: Include version.h
3489 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
3491         * jcf-write.c (generate_bytecode_conditional): Correct handling
3492         of unordered conditionals. Add comment.
3494 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
3495             Per Bothner  <per@bothner.com>
3497         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
3498         local variable was initialised upon declaration.
3499         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
3500         variable was final and initialised upon declaration.
3501         * check-init.c (check_final_reassigned): Give error only if a blank
3502         final is not definitely unassigned or if an initialised final is
3503         reassigned.
3504         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
3505         assignment expressions. Remove case MODIFY_EXPR, label do_default.
3506         (check_init): Perform initialised-variable-removing-optimisation
3507         only on non-final local variables.
3509 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3511         * jcf-write.c (generate_bytecode_conditional): Handle binops
3512         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
3513         and LTGT_EXPR.
3514         (generate_bytecode_insns): Likewise.
3516 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3518         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
3519         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
3521 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
3523         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
3524         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
3526 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3528         * decl.c (struct binding_level): Add GTY marker. Compile
3529         binding_depth unconditionally.
3530         (current_binding_level, free_binding_level, global_binding_level):
3531         Likewise.
3532         (clear_binding_level): Unconditionally set binding_depth.
3533         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
3535 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3537         * lex.c (java_new_lexer): Set 'encoding'.
3538         (java_read_char): Improve error message for unrecognized characters.
3539         * lex.h (struct java_lexer): New field 'encoding'.
3541 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
3543         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
3545 2004-05-21  Mark Wielaard  <mark@klomp.org>
3547         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
3548         extern.
3550 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
3552         * typeck.c: Remove non-printable character 160.
3554 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
3556         * check-init.c: Correct minor typos.
3558 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3560         * Make-lang.in, expr.c, java-gimplify.c: Rename
3561         tree-simple.[ch] to tree-gimple.[ch].
3563 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
3565         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
3567 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
3569         Merge from tree-ssa-20020619-branch.  See
3570         ChangeLog.tree-ssa for details.
3572         * Make-lang.in, builtins.c, check-init.c, class.c,
3573         constants.c, decl.c, except.c, expr.c, java-except.h,
3574         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
3575         lang.c, lang.opt, parse.y, resource.c: Merged.
3576         * java-gimplify.c: New file.
3578 2004-05-10  Andrew Haley  <aph@redhat.com>
3580         * parse.y (create_class): Set TYPE_VFIELD.
3581         * decl.c (java_init_decl_processing): Likewise.
3583         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
3584         * class.c (make_method_value): Replace DECL_VINDEX with call to
3585         get_method_index().
3586         (get_dispatch_vector): Likewise.
3587         (layout_class_method): Likewise.
3588         Replace set of DECL_VINDEX with call to set_method_index().
3589         (set_method_index): New function.
3590         (get_method_index): New function.
3591         * java-tree.h (set_method_index): New function decl.
3592         (get_method_index): New function decl.
3594 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
3596         * parse.y (check_pkg_class_access): Add new argument
3597         and use it when cl is NULL to call lookup_cl on it.
3598         (parser_check_super_interface): Do not call lookup_cl.
3599         Pass this_decl to check_pkg_class_access and NULL
3600         instead of lookup_cl.
3601         (parser_check_super): Update for change in
3602         check_pkg_class_access.
3603         (do_resolve_class): Likewise.
3604         (process_imports): Likewise.
3605         (find_in_imports_on_demand): Likewise.
3606         (resolve_qualified_expression_name): Likewise.
3608 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
3610         Fixes PR java/9685, PR java/15073
3611         * parse.y (accessibility_string): New method.
3612         (not_accessible_field_error): Use accessibility_string()
3613         instead of java_accstring_lookup().
3614         (resolve_qualified_expression_name): Check with
3615         check_pkg_class_access() before allowing access using
3616         qualified names.
3617         Fix comment typo.
3618         Use check_pkg_class_access() instead of not_accessible_p()
3619         for unqualified types.
3620         (not_accessible_p): Use DECL_CONTEXT (member) instead of
3621         REFERENCE for package-private access checking.
3622         (patch_method_invocation): Use accessibility_string() instead
3623         of java_accstring_lookup().
3625 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
3627         Fixes PR java/15133
3628         * gjavah.c (struct method_name): Add member is_native.
3629         (overloaded_jni_method_exists_p): Match candidate method only if
3630         it is native.
3631         (print_method_info): Initialise is_native flag from the method's
3632         access flags.
3634 2004-04-30  Roger Sayle  <roger@eyesopen.com>
3636         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
3637         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
3639 2004-04-22  Roger Sayle  <roger@eyesopen.com>
3641         * resource.c (write_resource_constructor): Guard call to possibly
3642         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
3644 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
3646         * class.c (make_class_data): Add new field aux_info.
3647         * decl.c (java_init_decl_processing): Push type and decl for
3648         `aux_info'.
3650 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
3652         * expr.c (expand_java_NEW): Don't use size argument for
3653         _Jv_AllocObject calls.
3654         * parse.y (patch_invoke): Likewise.
3656 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
3658         * expr.c (build_invokeinterface): Remove unused variables to
3659         fix warnings.
3661 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
3663         * class.c (get_interface_method_index): New function. Return dispatch
3664         index for interface method.
3665         (make_method_value): For interface methods, set index field to
3666         iface dispatch index, not DECL_VINDEX.
3667         * expr.c (build_invokeinterface): Use get_interface_method_index.
3669 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3671         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
3673 2004-03-31  Andrew Haley  <aph@redhat.com>
3675         PR java/14104
3676         * jcf-io.c (opendir_in_zip): Tidy up error handling.
3678 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
3680         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
3681         form of GTY markers.
3683 2004-03-25  Marcus Meissner  <meissner@suse.de>
3685         PR java/14689:
3686         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
3688 2004-03-23  Tom Tromey  <tromey@redhat.com>
3690         PR java/14315:
3691         * jcf-write.c (make_class_file_name): Don't report if mkdir
3692         failed with EEXIST.
3694 2004-03-23  Tom Tromey  <tromey@redhat.com>
3696         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
3698 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
3700         * class.c, gjavah.c, lang.c: Fix comment typos.
3701         * gcj.texi: Fix typos.
3703 2004-03-19  Per Bothner  <per@bothner.com>
3705         * gcj.texi (Code Generation):  Document new flags and assert defaults.
3707         * class.c (assume_compiled_node_struct):  Rename type to
3708         class_flag_node_struct, as it is now also used for enable_assertions.
3709         Rename assume_compiled_node typedef.  Rename excludep field to value.
3710         (find_assume_compiled_node):  Rename function to find_class_flag_node.
3711         Minor optimization - avoid needless strlen.
3712         (add_assume_compiled):  Some tweaking and optimization.
3713         Rename and generalize to add_class_flag takem an extra parameter.
3714         (add_assume_compled):  New just calls add_class_flag.
3715         (add_enable_assert, enable_assertions):  New functions.
3716         (enable_assert_tree):  New static.
3717         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
3718         * lang.opt (fenable-assertions, fenable-assertions=,
3719         fdisable-assertions, fdisable-assertions=):  New options.
3720         * lang.c (java_handle_option):  Handle new options.
3721         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
3722         class in an interface - create helper class nested in outer interface.
3723         (build_assertion):  Short-circuit if enable_assertions is false.
3725 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3727         * java-tree.h: Changes throughout to add checking to macros
3728         and numerous whitespace changes.
3729         (VAR_OR_FIELD_CHECK): New macro.
3730         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
3731         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
3733 2004-03-16  Per Bothner  <per@bothner.com>
3735         * jcf-jump.c (options):  New --print-constants option.
3736         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
3738         * jcf-dump.c (flag_print_constant_pool):  Default to off.
3739         (print_constant_terse_with_index):  New helper function.
3740         (various places):  Check flag_print_constant_pool where missing.
3741         (main):  If verbose set flag_print_constant_pool.
3742         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
3744 2004-03-15  Andrew Haley  <aph@redhat.com>
3746         PR java/14581
3747         * parse.y (java_complete_lhs): Check that final variable has an
3748         initializer.
3750 2004-03-12  Andrew Haley  <aph@redhat.com>
3752         PR java/14551
3753         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
3754         conversion.
3756 2004-02-29  Roger Sayle  <roger@eyesopen.com>
3758         * jcf-parse.c (java_parse_file): Handle the case that input_filename
3759         is NULL.
3761 2004-02-27  Per Bothner  <per@bothner.com>
3763         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
3764         suggestion:  Use build_incomplete_class_ref.
3765         This fixes PR java/13508, java/11714.
3767 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
3769         * java/parse.h: Update copyright.
3771 2004-02-26  Andrew Haley  <aph@redhat.com>
3773         PR java/14231:
3774         * parse.y (check_interface_throws_clauses): Check for
3775         !METHOD_INVISIBLE (iface_method).
3776         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
3777         well as CLASS_ABSTRACT.
3779 2004-02-25  Per Bothner  <per@bothner.com>
3781         * parse.y (build_assertion):  If we're in an inner class, create the
3782         class$ helper routine in the outer class.
3784 2004-02-19  Richard Henderson  <rth@redhat.com>
3786         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
3788 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
3790         * Make-lang.in (java.install-man): Add extra dependencies.
3792 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
3794         * Make-lang.in: Install man pages under the same names
3795         (possibly transformed) as the program they document.
3797 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
3799         * gjavah.c: Include "intl.h".
3800         (error): New function.
3801         (main): Call gcc_init_libintl.
3802         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
3803         print_stub_or_jni, process_file, main): Use error rather than
3804         fprintf.
3805         (print_method_info, usage, help, version, main): Mark strings for
3806         translation with _.  Avoid splitting up sentences.  Send
3807         information messages to stdout.
3808         * jcf-dump.c: Include "intl.h".
3809         (main): Call gcc_init_libintl.
3810         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
3811         Mark error, usage and version messages for translation with _.
3812         Avoid splitting up sentences.
3813         * jv-scan.c: Include "intl.h".
3814         (fatal_error, warning): Change parameter s to msgid.  Translate
3815         messages.
3816         (main): Call gcc_init_libintl.
3817         (usage, help, version): Mark error, usage and version messages for
3818         translation with _.  Avoid splitting up sentences.
3819         * jvgenmain.c: Include "intl.h".
3820         (main): Call gcc_init_libintl.
3821         (usage, main): Mark error messages for translation with _.
3822         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
3823         JVGENMAIN_OBJS): Add intl.o.
3824         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
3825         java/jvgenmain.o): Update dependencies.
3827 2004-02-08  Per Bothner  <per@bothner.com>
3829         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
3830         class don't use not_accessible_field_error, which can get confused.
3832 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
3834         Make-lang.in (po-generated):  Delete.
3836 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
3838         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
3839         Depend on target.h.
3840         * decl.c: Include target.h.
3841         (start_java_method): Replace PROMOTE_PROTOTYPES with
3842         targetm.calls.promote_prototypes.
3843         * expr.c: Include target.h.
3844         (pop_arguments): Replace PROMOTE_PROTOTYPES with
3845         targetm.calls.promote_prototypes.
3846         * parse.y: Include target.h.
3847         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
3848         with targetm.calls.promote_prototypes.
3850 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
3852         * typeck.c: Update copyright.
3854 2004-02-02  Tom Tromey  <tromey@redhat.com>
3856         * decl.c (java_init_decl_processing): Remove duplicate
3857         gnu/gcj/RawData.
3859 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
3861         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
3863 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
3865         * expr.c (build_field_ref): Move variable
3866         definition up.
3868 2004-01-28  Andrew Haley  <aph@redhat.com>
3870         * expr.c (build_field_ref): Widen field offset.
3872 2004-01-27  Andrew Haley  <aph@redhat.com>
3874         java/13273
3875         * parse.y (check_interface_throws_clauses): Make sure class_decl
3876         has been loaded.
3878 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
3880         PR java/13733
3881         * parse.y (patch_assignment): Don't modify lhs_type for
3882         reference assignments.
3884 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3886         * Make-lang.in: Replace $(docdir) with doc.
3887         (java.info, java.srcinfo, java.man, java.srcman): New rules.
3888         (java.install-man): Revamp rule.
3890 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
3892         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
3893         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
3894         instead of deferred backquote.
3896 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
3898         * typeck.c (find_method_in_interfaces): Move variable
3899         definition up.
3901 2004-01-16  Andrew Haley  <aph@redhat.com>
3903         PR java/13273:
3904         * typeck.c (shallow_find_method): New.
3905         (find_method_in_superclasses): New.
3906         (find_method_in_interfaces): New.
3907         (lookup_do): Rewrite.
3908         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
3910         * jcf-parse.c (read_class): Save and restore output_class.
3911         * decl.c (java_expand_body): Set output_class from fndecl.
3913 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
3915         * class.c (gen_indirect_dispatch_tables): Fix string length
3916         calculations.
3918 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
3920         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
3921         (java.srcextra): Copy above back to source directory if requested.
3922         (po-generated): Delete reference to $(parsedir).
3923         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
3924         Use implicit rule.
3926 2004-01-14  Jan Hubicka  <jh@suse.cz>
3928         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
3929         estimation.
3931 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
3933         * java-tree.h (java_expand_expr): Change prototype.
3934         * expr.c (java_expand_expr): Add alt_rtl parameter.
3936 2004-01-09  Andrew Haley  <aph@redhat.com>
3938         PR java/12755:
3939         * parse.y (java_fix_constructors):  Set output_class.
3940         (java_reorder_fields): Likewise.
3941         (java_layout_classes): Likewise.
3942         (java_expand_classes): Generate indirect dispatch tables.
3943         (java_expand_classes): Set output_class.
3944         (java_finish_classes): Likewise.
3945         * lang.c (java_init): Turn on always_initialize_class_p if we're
3946         using indirect dis[atch.
3947         (java_decl_ok_for_sibcall): Use output_class, not current_class.
3948         (java_get_callee_fndecl): Use class local atable.
3949         * jcf-parse.c
3950         (always_initialize_class_p): Decl moved to java-tree.h.
3951         (HANDLE_CLASS_INFO): Set output_class.
3952         (read_class): Likewise.
3953         (parse_class_file): Call gen_indirect_dispatch_tables.
3954         (parse_zip_file_entries): Set output_class.
3955         (java_parse_file): Set output_class.  Don't emit symbol tables.
3956         * java-tree.h (output_class): New.
3957         Remove global declarations for otable, atable, and ctable.
3958         (always_initialize_class_p): moved here from decl.c.
3959         (DECL_OWNER): New.
3960         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
3961         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
3962         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
3963         (struct lang_type): Add otable_methods, otable_decl,
3964         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
3965         ctable_decl, catch_classes, type_to_runtime_map.
3966         * expr.c (build_field_ref): Make otable, atable, and ctable class
3967         local rather than global.
3968         (build_known_method_ref): Likewise.
3969         (build_invokeinterface): Likewise.
3970         (java_expand_expr): Pass runtime type (rather than actual type) to
3971         expand_start_catch.
3972         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
3973         this class.  Look up each class in that map to delete duplicates.
3974         (expand_end_java_handler): Pass runtime type (rather than actual
3975         type) to expand_start_catch.
3976         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
3977         (do_nothing): New.
3978         (java_init_decl_processing): Rearrange things.  Remove global
3979         declarations of otable, atable, and ctable.
3980         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
3981         (java_expand_body): Set output_class.
3982         * constants.c (build_constant_data_ref): Use output_class, not
3983         current_class.
3984         (alloc_name_constant): Likewise.
3985         * class.c (gen_indirect_dispatch_tables): New.
3986         (build_class_ref): Generate hard reference to superclass, even if
3987         using indirect dispatch.
3988         (build_static_field_ref): Use class local atable.
3989         (make_class_data): Generate hard reference to superclass, even if
3990         using indirect dispatch.
3991         Generate symbolic references to interfaces when using indirect
3992         dispatch.
3993         (make_class_data): Emit otable, atable, and ctable.
3994         Make otable, atable, and ctable class local rather than global.
3995         (emit_catch_table): Make otable, atable, and ctable class local
3996         rather than global.
3998 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
4000         * parse.y (catch_clause_parameter): Fix typo.
4002         PR java/13404
4003         * parse.y: (catch_clause_parameter): Return early if $3, aka
4004         formal_parameter, is null.
4006 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4008         * class.c: Remove uses of "register" specifier in
4009         declarations of arguments and local variables.
4010         * decl.c: Likewise.
4011         * expr.c: Likewise.
4012         * gjavah.c: Likewise.
4013         * jcf-dump.c: Likewise.
4014         * jcf-io.c: Likewise.
4015         * jcf-parse.c: Likewise.
4016         * jcf-write.c: Likewise.
4017         * keyword.h: Likewise.
4018         * parse.y: Likewise.
4019         * typeck.c: Likewise.
4020         * verify.c: Likewise.
4022 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
4024         * Make-lang.in (GCJ_CROSS_NAME): Delete.
4025         (java.install_common, java.install-man): Adjust for above.
4026         (java.uninstall): Likewise.
4028 2003-12-03  Michael Koch  <konqueror@gmx.de>
4030         * class.c (make_class_data):
4031         Push field value to 'hack_signers' instead of 'signers'.
4032         * decl.c (java_init_decl_processing):
4033         Push field 'hack_signers' instead of 'signers'.
4035 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
4037         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
4038         including iconv.h.
4040 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
4042         PR java/12374:
4043         * parse.y (qualify_ambiguous_name): Remove lots of broken
4044         field access processing - there's no need to do that here,
4045         because we have resolve_field_access.  Remove
4046         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
4047         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
4048         used.
4050 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
4052         Fix PR java/13237
4053         * parse.y (java_complete_lhs): Save location prior to patching
4054         CALL_EXPR.
4056 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
4058         PR java/12548
4059         * resource.c (write_resource_constructor): Append
4060         "_resource" to constructor identifier name.
4062 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
4064         Fix PR java/13183.
4065         * constants.c (cpool_for_class): New function.
4066         (outgoing_cpool): Remove global variable.
4067         (alloc_name_constant): Use cpool_for_class.
4068         (build_constants_constructor): Likewise.
4069         * decl.c (java_expand_body): Set current_class.
4070         * java-tree.h (outgoing_cpool) Remove declaration.
4071         (init_outgoing_cpool): Likewise.
4072         * jcf-parse.c (init_outgoing_cpool): Remove function.
4073         (parse_class_file): Don't call init_outgoing_cpool.
4074         * parse.y (java_complete_expand_methods): Don't call
4075         init_outgoing_cpool.  Don't save outgoing_cpool.
4076         (java_expand_classes): Don't restore outgoing_cpool.
4077         (java_finish_classes): Likewise.
4079 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
4081         * Make-lang.in: (java.install-common) Add
4082         symlink for $(target_noncanonical)-gcjh for
4083         native builds.
4085 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4087         * Make-lang.in (java.extraclean): Delete.
4089 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
4091         * Make-lang.in (check-java): Add.
4093 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
4095         Fix PR java/13024.
4096         * except.c (prepare_eh_table_type): Allocate variable-sized
4097         buffer `buf' with alloca.
4099 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4101         Fix PR java/12857.
4103         decl.c (java_init_decl_processing): Don't initialize
4104         class_not_found_type_node, no_class_def_found_type_node.
4106         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
4107         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
4108         (class_not_found_type_node, no_class_def_found_type_node):
4109         Don't define.
4111         parse.y (build_dot_class_method_invocation): Add this_class
4112         argument.  Qualify method invocations to a different class.
4113         (create_new_parser_context): Initialize saved_data_ctx to 0.
4114         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
4115         (build_dot_class_method): Don't load classes.  Register
4116         incomplete types.
4117         (build_incomplete_class_ref): Special cases for interfaces
4118         and inner classes.  Move build_dot_class_method call to here...
4119         (patch_incomplete_class_ref): ...from here.  Pass current_class
4120         to build_dot_class_method_invocation.
4121         (build_assertion): Pass class_type to
4122         build_dot_class_method_invocation.
4123         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
4125 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
4127         Fix PR java/12739.
4128         * java-tree.h (BLOCK_EMPTY_P): Define.
4129         * parse.y (java_complete_lhs): Check for empty blocks
4130         in TRY_FINALLY_EXPR case.
4132 2003-11-17  Andrew Haley  <aph@redhat.com>
4134         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
4135         (struct lang_decl_var:freed): New variable.
4136         * decl.c (poplevel): Mark local vars that have gone out of scope.
4137         (push_jvm_slot): Don't use the RTL of a var that has gone out of
4138         scope.
4140 2003-11-16  Jason Merrill  <jason@redhat.com>
4142         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
4143         and TAGS files that include them for each front end.
4145 2003-11-15  Tom Tromey  <tromey@redhat.com>
4147         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
4149 2003-11-12  Jason Merrill  <jason@redhat.com>
4151         PR optimization/12547
4152         * lang.c (java_tree_inlining_walk_subtrees): Just walk
4153         BLOCK_EXPR_BODY directly.
4155 2003-11-12  Andrew Haley  <aph@redhat.com>
4157         PR java/11045
4158         * parse.y (fold_constant_for_init): Check that we really do have a
4159         constant.
4161         PR java/11533
4162         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
4163         init_test_decls being inlined.
4165         PR java/12890:
4166         * parse.y (do_resolve_class): Check return value from
4167         breakdown_qualified().
4169 2003-11-11  Tom Tromey  <tromey@redhat.com>
4171         PR java/12915:
4172         * parse.y (merge_string_cste): Handle case where we have a
4173         pointer that happens to be zero, not null_pointer_node.
4175 2003-11-10  Tom Tromey  <tromey@redhat.com>
4177         * jcf-parse.c (classify_zip_file): Correctly compare
4178         filename_length against length of manifest file's name.
4180 2003-11-08  Tom Tromey  <tromey@redhat.com>
4182         PR java/12894:
4183         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
4185 2003-11-06  Andrew Haley  <aph@redhat.com>
4187         * expr.c (java_stack_swap): Make sure destination stack slots are
4188         of the correct type.
4190 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
4192         * Make-lang.in (dvi): Move targets to $(docobjdir).
4193         (gcj.dvi): Simplify rule and adjust target.
4194         (gcj.info): Simplify rule.
4195         (gcj.pod): New intermediate rule.
4196         (gcjh.pod): Likewise.
4197         (jv-scan.pod): Likewise.
4198         (jcf-dump.pod): Likewise.
4199         (gij.pod): Likewise.
4200         (jv-convert.pod): Likewise.
4201         (rmic.pod): Likewise.
4202         (rmiregistry.pod): Likewise.
4203         (gcj.1): Delete.
4204         (gcjh.1): Delete.
4205         (jv-scan.1): Delete.
4206         (jcf-dump.1): Delete.
4207         (gij.1): Delete.
4208         (jv-convert.1): Delete.
4209         (rmic.1): Delete.
4210         (rmiregistry.1): Delete.
4212 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
4214         Fixes PR java/12866.
4215         * parse.y (resolve_qualified_expression_name): Move test
4216         for outer field access methods from here...
4217         (check_thrown_exceptions) ...to here.
4219 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
4221         * .cvsignore: Delete.
4223 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
4225         * verify.c (verify_jvm_instructions): Don't warn about legal
4226         eh binding regions generated for example by jdk 1.4.1.
4228 2003-10-24  David S. Miller  <davem@redhat.com>
4230         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
4232 2003-10-22  Andrew Haley  <aph@redhat.com>
4234         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
4235         (java_get_callee_fndecl): New.
4237         * jcf-parse.c (java_parse_file): Call emit_catch_table().
4239         * java-tree.h (ctable_decl): New.
4240         (catch_classes):  New.
4241         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
4243         * decl.c (java_init_decl_processing): Add catch_class_type.
4244         Add ctable_decl.
4245         Add catch_classes field.
4247         * class.c (build_indirect_class_ref): Break out from
4248         build_class_ref.
4249         (make_field_value): Check flag_indirect_dispatch.
4250         (make_class_data): Ditto.
4251         Tidy uses of PUSH_FIELD_VALUE.
4252         Add field catch_classes.
4253         (make_catch_class_record): New.
4255         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
4257 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4259         * jcf-write.c: Follow spelling conventions.
4260         * parse.y: Likewise.
4262 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
4264         * ChangeLog: Fix typos.
4265         * expr.c: Fix comment typos.
4266         * jcf-write.c: Likewise.
4267         * lang.c: Likewise.
4268         * lex.c: Likewise.
4269         * mangle.c: Likewise.
4270         * parse-scan.y: Likewise.
4271         * parse.y: Likewise.
4273 2003-10-22  Tom Tromey  <tromey@redhat.com>
4275         * expr.c (expand_byte_code): Only warn about dead bytecode when
4276         extra_warnings is set.
4278 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
4280         Fix for PR java/12586.
4281         * mangle.c (find_compression_record_match): Don't iterate through
4282         package namespace elements unless they all match compression_table
4283         entries.
4285 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
4287         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
4288         (generate-manpages): Likewise.
4289         (java.maintainer-clean): Likewise.
4290         (gcj.info): Likewise.
4291         (gcj.1): Likewise.
4292         (gcjh.1): Likewise.
4293         (jv-scan.1): Likewise.
4294         (jcf-dump.1): Likewise.
4295         (gij.1): Likewise.
4296         (jv-convert.1): Likewise.
4297         (rmic.1): Likewise.
4298         (rmiregistry.1): Likewise.
4299         (java.install-man): Likewise.
4300         (parse-scan.o): Move and define complete compile line.
4301         (parse.o): Likewise.
4302         (jcf-tree-inline.o): Move.
4304 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
4306         * Make-lang.in (info): Update dependencies.
4307         (java.install-info): Remove.
4308         ($(srcdir)/java/gcj.info): Replace with ...
4309         ($(docobjdir)/gcj.info): ... this.
4311 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
4313         * Make-lang.in: Replace uses of $(target_alias) with
4314         $(target_noncanonical).
4316 2003-10-09  Tom Tromey  <tromey@redhat.com>
4318         * decl.c (java_init_decl_processing): Declare signers field.
4319         * class.c (make_class_data): Set signers field.
4321 2003-10-09  Jason Merrill  <jason@redhat.com>
4323         * parse.y (patch_assignment): Use make_node to create a BLOCK.
4324         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
4325         POINTER_TYPE.
4327 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
4329         * Make-lang.in (java.info): Replace with ...
4330         (info): ... this.
4331         (java.dvi): Replace with ...
4332         (dvi): ... this.
4333         (java.generated-manpages): Replace with ...
4335 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
4337         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
4339 2003-10-01  Andrew Haley  <aph@redhat.com>
4341         * jcf-parse.c (java_parse_file): Write otable and atable.
4342         * java-tree.h (atable_methods): New.
4343         (atable_decl): New.
4344         (atable_syms_decl): New.
4345         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
4346         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
4347         (symbol_*type): Rename method_symbol* to symbol*type.
4348         (emit_offset_symbol_table): Delete.
4349         (emit_symbol_table): New.
4350         (get_symbol_table_index): New.
4351         (atable_type): New.
4352         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
4353         (build_known_method_ref): Likewise.
4354         (get_symbol_table_index): Rename from get_offset_table_index.
4355         Parameterize to allow re-use by differing types of symbol table.
4356         (build_invokevirtual): Pass table to get_offset_table_index.
4357         * decl.c (java_init_decl_processing): Push types and decls for
4358         atable and atable_syyms.
4359         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
4360         (make_class_data): Add new fields atable and atable_syms.
4361         (emit_symbol_table): Rename from emit_offset_symbol_table.
4362         Parameterize to allow re-use by different types of symbol table.
4363         (build_symbol_entry): Renamed from build_method_symbols_entry.
4365 2003-09-30  Roger Sayle  <roger@eyesopen.com>
4367         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
4368         semantics for SAVE_EXPR, by caching the result in a temporary.
4370 2003-09-28  Richard Henderson  <rth@redhat.com>
4372         * check-init.c (check_init): Save and restore input_location
4373         instead of file and line separately.
4374         * decl.c (java_expand_body): Likewise.
4375         * jcf-write.c (generate_bytecode_insns): Likewise.
4376         * parse.y (safe_layout_class): Likewise.
4377         * jcf-parse.c (read_class, parse_class_file): Likewise.
4378         (java_parse_file): Use %H for warning locator.
4380 2003-09-28  Roger Sayle  <roger@eyesopen.com>
4382         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
4383         with void-type branches instead of using a COMPOUND_EXPR.
4385 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
4387         * decl.c (java_optimize_inline, dump_function): Remove.
4388         * java-tree.h (java_optimize_inline): Remove declaration.
4389         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
4390         * parse.y (source_end_java_method, java_expand_classes):
4391         Likewise.  Remove dead code.
4393 2003-09-27  Roger Sayle  <roger@eyesopen.com>
4395         * lang.c (java_init_options): Set flag_evaluation_order.
4396         * expr.c (force_evaluation_order): Don't attempt to force
4397         evaluation order of binary operations using save_expr.
4398         * parse.y (java_complete_lhs): No longer need to call
4399         force_evaluation_order when constructing binary operators.
4401 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
4402             Bryce McKinlay  <bryce@mckinlay.net.nz>
4404         PR java/1333:
4405         * parse.y (not_accessible_field_error): New function.
4406         (resolve_expression_name): Check field access permissions.
4407         (resolve_qualified_expression_name): Use
4408         not_accessible_field_error.
4409         (resolve_qualified_expression_name): Likewise.
4411 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4413         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
4415 2003-09-23  Roger Sayle  <roger@eyesopen.com>
4417         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
4418         with equal operands without side-effects.
4420 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
4422         * decl.c (java_init_decl_processing): Don't emit otable decls
4423         if flag_indirect_dispatch is not set.
4425 2003-09-21  Richard Henderson  <rth@redhat.com>
4427         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
4428         resource.c: Revert.
4430 2003-09-21  Richard Henderson  <rth@redhat.com>
4432         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
4433         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
4435 2003-09-20  Richard Henderson  <rth@redhat.com>
4437         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
4439 2003-09-18  Roger Sayle  <roger@eyesopen.com>
4441         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
4442         * check-init.c (check_init): Likewise.
4444 2003-09-18  Roger Sayle  <roger@eyesopen.com>
4446         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
4448 2003-09-16  Andrew Haley  <aph@redhat.com>
4450         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
4452 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
4454         Fixes PR java/9577
4455         * mangle.c (find_compression_record_match): Skip
4456         over a "6JArray" (the array template mangled string)
4457         IDENTIFIER_NODE.
4458         (mangle_array_type): Correct minor typo.
4459         (atms): Move definition to the beginning.
4461 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
4463         * class.c (add_miranda_methods): Ensure super-interfaces are laid
4464         out. Fix for PR java/12254.
4466 2003-09-11  Richard Henderson  <rth@redhat.com>
4468         * parse.y (source_end_java_method): Update for new
4469         cgraph_finalize_function argument.
4471 2003-09-09  Richard Henderson  <rth@redhat.com>
4473         * parse.y (source_end_java_method): Update call to
4474         cgraph_finalize_function.
4476 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
4478         * decl.c (java_expand_body): New function.
4479         * expr.c (build_class_init): Set DECL_IGNORED_P.
4480         * java-tree.h (start_complete_expand_method,
4481         java_expand_body): Declare.
4482         * jcf-parse.c (cgraph.h): Include.
4483         (java_parse_file): Handle flag_unit_at_a_time.
4484         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
4485         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
4486         (java_estimate_num_insns): Use walk_tree_without_duplicates.
4487         (java_start_inlining): New function.
4488         * parse.h (java_finish_classes): Declare.
4489         * parse.y: Include cgraph.h.
4490         (block): Don't special-case empty block production.
4491         (craft_constructor): Set DECL_INLINE.
4492         (source_end_java_method): Handle flag_unit_at_a_time.
4493         Replace inline code with call to java_expand_body.
4494         (start_complete_expand_method): Remove static modifier.
4495         (java_expand_method_bodies): Patch function tree for
4496         class initialization and/or synchronization as needed.
4497         Don't begin RTL expansion yet.
4498         (java_expand_classes): Check flag_unit_at_a_time before
4499         calling finish_class.
4500         (java_finish_classes): New function.
4501         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
4502         (patch_assignment): Set DECL_CONTEXT on temporary variable.
4503         (emit_test_initialization): Set DECL_IGNORED_P.
4505 2003-09-03  Roger Sayle  <roger@eyesopen.com>
4507         * builtins.c (enum builtin_type): Delete unused enumeration.
4508         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
4510 2003-08-28  Tom Tromey  <tromey@redhat.com>
4512         * gcj.texi (Extensions): Document gcjlib URLs.
4514 2003-08-20  Tom Tromey  <tromey@redhat.com>
4516         * gcj.texi (Extensions): Added xref.
4517         (libgcj Runtime Properties): Document
4518         gnu.gcj.runtime.VMClassLoader.library_control.
4520 2003-08-20  Andrew Haley  <aph@redhat.com>
4522         * except.c (prepare_eh_table_type): Use new encoding for exception
4523         handlers when using -fno-assume-compiled.
4525 2003-08-13  Tom Tromey  <tromey@redhat.com>
4527         * gcj.texi (Invoking gij): Document -X and -?.
4529 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
4531         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
4532         GCJH_OBJS, JCFDUMP_OBJS
4533         * win32-host.c: Removed the unnecessary and broken dependency
4534         on jcf.h
4536 2003-08-11  Tom Tromey  <tromey@redhat.com>
4538         * parse.y (java_check_regular_methods): Typo fixes.  Call
4539         check_interface_throws_clauses.  Use
4540         check_concrete_throws_clauses.
4541         (check_interface_throws_clauses): New function.
4542         (check_concrete_throws_clauses): New function.
4543         (hack_is_accessible_p): New function.
4544         (find_most_specific_methods_list): Added FIXME.
4545         * typeck.c (lookup_do): Use `flags' argument to decide what to
4546         do.  Reimplemented.
4547         (lookup_argument_method_generic): New function.
4548         (lookup_argument_method2): Removed.
4549         * jcf.h (ACC_INVISIBLE): New define.
4550         * jcf-write.c (generate_classfile): Skip invisible methods.
4551         * class.c (add_miranda_methods): New function.
4552         (layout_class_methods): Use it.
4553         (get_access_flags_from_decl): Use ACC_INVISIBLE.
4554         * java-tree.h (METHOD_INVISIBLE): New define.
4555         (lang_decl_func) [invisible]: New field.
4556         (lookup_argument_method_generic): Declare.
4557         (SEARCH_INTERFACE): New define.
4558         (SEARCH_SUPER): Likewise.
4559         (SEARCH_ONLY_INTERFACE): Likewise.
4560         (SEARCH_VISIBLE): Likewise.
4561         (lookup_argument_method2): Removed declaration.
4563 2003-08-05  Tom Tromey  <tromey@redhat.com>
4565         Fix for PR java/11600:
4566         * parse.y (java_complete_lhs): See whether we're calling a method
4567         on an array.
4568         (check_thrown_exceptions): Added `is_array_call' argument;
4569         fixed `clone' checking; updated all callers.
4571 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
4573         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
4575 2003-08-03  Tom Tromey  <tromey@redhat.com>
4577         * java-tree.h (METHOD_TRANSIENT): Removed.
4578         * decl.c (pushdecl): Removed some dead code.
4579         * class.c (get_access_flags_from_decl): Can't have transient
4580         method.
4581         (add_method_1): Can't have a transient method.
4583 2003-07-28  Andreas Jaeger  <aj@suse.de>
4585         * jvspec.c: Convert to ISO C90 prototypes.
4587 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4589         * decl.c (force_poplevels): Fix warning call.
4591 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4593         * expr.c (expand_java_field_op): Don't use xxx_with_decl
4594         (expand_java_field_op): Likewise.
4595         * class.c (layout_class_method): Likewise
4596         (emit_register_classes): Likewise.
4597         * decl.c (pushdecl): Likewise.
4598         (poplevel): Likewise.
4599         (force_poplevels): Likewise.
4600         (give_name_to_locals): Likewise.
4601         * check-init.c (check_for_initialization): Likewise.
4603 2003-07-24  Jason Merrill  <jason@redhat.com>
4605         * java-tree.h: Move boolean_type_node et al to the back end.
4607 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4609         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
4610         casts.
4612 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
4614         * lang.opt: Don't show -MD_ and -MDD_.
4616 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
4618         * lang-options.h: Remove.
4619         * lang.opt: Add help text.
4621 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
4623         * expr.c: Remove the last argument to expand_assignment().
4625 2003-07-09  Jan Hubicka  <jh@suse.cz>
4627         * java-tree.h (DECL_NUM_STMTS): Rename to...
4628         (DECL_ESTIMATED_INSNS): ... this.
4629         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
4630         New static functions.
4631         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
4632         * parser.y (add_stmt_to_compound): Do not account statements.
4634 2003-07-08  Mark Wielaard  <mark@klomp.org>
4636         * gcj.texi: CNI now expands to Compiled Native Interface.
4638 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4640         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
4642 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4644         * expr.c (expand_byte_code): Adjist emit_line_note call.
4646 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
4648         * lang.c (java_handle_option): Don't handle filenames.
4650 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
4652         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
4653         DIR_SEPARATOR.
4654         Use FILENAME_CMP.
4655         * jcf-write.c: Don't default-define DIR_SEPARATOR.
4656         * jcf.h: Delete COMPARE_FILENAMES definition.
4658 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
4660         * lang.c (java_init_options): Update prototype.
4662 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
4664         * decl.c (poplevel): Adjust define_label call.
4666 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
4668         * gjavah.c (flag_jni): Make non-static.
4669         * parse-scan.y (ctxp): Make non-static.
4671         * class.c (build_method_symbols_entry)
4672         * expr.c (get_offset_table_index)
4673         * jcf-parse.c (jcf_parse):
4674         Mark the definition static, matching the forward declaration.
4676 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
4678         * lang.c (java_handle_option): Don't check for missing arguments.
4680 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
4682         * class.c (push_class): Use a location_t to save place.
4683         (emit_register_classes): Set input_location. Adjust
4684         expand_function_end call.
4685         * resource.c (write_resource_constructor): Likewise.
4686         * decl.c (end_java_method): Adjust expand_function_end call.
4687         * parse.y (source_end_java_method): Likewise.
4689 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
4691         * lang.c (java_handle_option): Likewise.
4693 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
4695         * lang.c (java_handle_option): Special-casing of optional
4696         joined arguments no longer needed.
4697         * lang.opt: Update switches that take optional argument.
4699 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
4701         * lang.opt: Declare Java.
4702         * lang.c (java_init_options): Update.
4704 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
4706         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
4708 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
4710         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
4711         * lang.c (java_handle_option): -MD and -MMD have an underscore.
4712         * lang.opt: -MD and -MMD have an underscore.
4714 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
4716         * class.c (emit_register_classes): Adjust init_function_start
4717         call.
4718         * decl.c (complete_start_java_method): Likewise.
4719         * resource.c (write_resource_constructor): Likewise.
4721 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
4723         * Make-lang.in: Update to use options.c and options.h.
4724         * lang.c: Include options.h not j-options.h.
4725         (java_handle_option): Abort on unrecognized option.
4726         (java_init_options): Request Java switches.
4728 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
4730         * Make-lang.in: Handle mostlyclean.
4732 2003-06-11  Tom Tromey  <tromey@redhat.com>
4734         * lang.c (java_handle_option): Update dependency_tracking for
4735         OPT_MF case.
4737         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
4738         empty argument.
4740 2003-06-10  Andrew Haley  <aph@redhat.com>
4742         * resource.c (write_resource_constructor): Use expand_expr to
4743         generate the address of the label attached to a resource.
4744         * Make-lang.in (java/resource.o): Add expr.h
4746 2003-06-10  Andrew Haley  <aph@redhat.com>
4748         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
4749         (java_decl_ok_for_sibcall): New.
4751 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
4753         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
4754         (java/j-options.c, java/j-options.h): New.
4755         * java-tree.h (resource_name, compile_resource_file,
4756         compile_resource_data): Constify.
4757         * jcf-write.c (jcf_write_base_directory): Similarly.
4758         * jcf.h (jcf_write_base_directory): Similarly.
4759         * lang.c: Include j-options.h.
4760         (cl_options_count, cl_options, string_option, java_decode_option,
4761         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
4762         process_option_with_no): Remove.
4763         (resource_name): Constify.
4764         (LANG_HOOKS_HANDLE_OPTION): Override.
4765         (java_handle_option): New.
4766         (java_init): Don't call jcf_path_init.
4767         (java_init_options): Call jcf_path_init.
4768         * lang.opt: New.
4769         * resource.c (compile_resource_data, compile_resource_file): Constify.
4771 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
4773         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
4774         (struct lang_decl_func): Add last_line field.
4775         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
4776         DECL_SOURCE_LINE_LAST): Remove.
4777         * parse.y (missing_return_error, finish_method_declaration,
4778         lookup_cl, start_artificial_method_body, source_end_java_method,
4779         start_complete_expand_method): Adjust.
4781 2003-06-08  Tom Tromey  <tromey@redhat.com>
4783         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
4784         fno-assume-compiled.
4786 2003-06-08  Roger Sayle  <roger@eyesopen.com>
4788         * builtins.c (define_builtin_type, builtin_types): Delete.
4789         (define_builtin): Rewritten to take just the built-in code,
4790         the function's name, type and fallback library function name.
4791         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
4792         (initialize_builtins): Overhaul to define the GCC builtins
4793         used by gcj manually, providing the Java run-time's
4794         implementations as the fallback library function.
4796 2003-06-08  Anthony Green  <green@redhat.com>
4798         * parse.y (patch_cast): Fix conversions from floating-point to
4799         integral types.
4801 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
4803         * Make-lang.in: Update.
4804         * lang.c: Include opts.h. Define cl_options_count and cl_options.
4806 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
4808         * lang.c (java_init_options): Update.
4810 2003-06-05  Jan Hubicka  <jh@suse.cz>
4812         * Make-lang.in:  Add support for stageprofile and stagefeedback
4814 2003-05-31  Roger Sayle  <roger@eyesopen.com>
4816         * lang.c (java_init_options): Prescribe wrap-around two's
4817         complement arithmetic overflow by setting flag_wrapv.
4819 2003-05-29  Roger Sayle  <roger@eyesopen.com>
4821         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
4822         (builtin_record): Add an additional builtin_code field to
4823         record which GCC built-in corresponds to the Java function.
4824         (java_builtins):  Add new entries for atan, atan2, exp, log,
4825         pow and tan.
4826         (max_builtin, min_builtin, abs_builtin): Perform constant
4827         folding on the resulting tree.
4828         (java_build_function_call_expr): Likewise, perform constant
4829         folding on the resulting tree.
4830         (initialize_builtins): The NULL creators are now allowed in
4831         the java_builtins table, which is now terminated by an entry
4832         with builtin_code == END_BUILTINS.
4833         (check_for_builtin): Likewise.  If the matching creator is
4834         NULL, construct the call using java_build_function_call_expr
4835         directly with the decl for the corresponding builtin_code.
4837 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4839         * win32-host.c: Normalize copyright boilerplate.
4841 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4843         * parse.y (print_int_node): Use string concatentation on
4844         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
4845         function calls into one.
4847 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
4849         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
4850         fatal_io_error with calls to fatal_error; add ": %m" to the end of
4851         all the affected error messages.
4853 2003-05-13  Richard Henderson  <rth@redhat.com>
4855         * class.c (layout_class_method): Set DECL_EXTERNAL.
4856         * decl.c (java_mark_decl_local, java_mark_class_local): New.
4857         * java-tree.h (java_mark_class_local): Declare.
4858         * jcf-parse.c (parse_class_file): Use it.
4859         * parse.y (java_expand_classes): Likewise.
4861 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
4863         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
4864         * lex.h: #include input.h.
4865         * jv-scan.c (input_filename): Remove.
4867 2003-05-02  Tom Tromey  <tromey@redhat.com>
4869         PR java/10491:
4870         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
4871         (handle_inner_classes): New function.
4873 2003-05-01  Tom Tromey  <tromey@redhat.com>
4875         PR java/10459:
4876         * parse.y (finish_for_loop): Do nothing if update expression is a
4877         EXPR_WFL_NODE wrapping nothing.
4878         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
4880 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
4882         * lex.h (input_lineno): Remove declaration.
4883         * parse-scan.y: #include input.h.
4884         (input_filename): Remove declaration.
4885         (input_location): Add definition.
4886         (input_line): Remove definition.
4888 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4890         * lex.h (lineno): Rename to ...
4891         (input_line): ... here
4892         * parse-scan.y (lineno): Rename to ...
4893         (input_line): ... here.
4894         (reset_report): Rename lineno to input_line.
4895         * check-init.c (check_init): Likewise.
4896         * class.c (push_class): Likewise.
4897         * decl.c (complete_start_java_method, end_java_method): Likewise.
4898         * expr.c (expand_byte_code): Likewise.
4899         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
4900         * jcf-write.c (generate_bytecode_insns): Likewise.
4901         * lex.c (java_init_lex, java_allocate_new_line,
4902         do_java_lex): Likewise.
4903         * parse.h (YYNOT_TWICE): Likewise.
4904         * parse.y (empty_statement, expression_statement,
4905         java_pop_parser_context, java_parser_context_save_global,
4906         yyerror, register_fields, method_header, safe_layout_class,
4907         find_in_imports_on_demand, create_artificial_method,
4908         source_end_java_method, start_complete_expand_method,
4909         build_thisn_assign, java_complete_lhs,
4910         maybe_absorb_scoping_block): Likewise.
4912 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
4914         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
4915         '/' when computing java source filename
4917 2003-04-13  Tom Tromey  <tromey@redhat.com>
4919         * gjavah.c (print_c_decl): Indentation fix.
4921 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4923         * class.c (make_field_value, make_method_value, get_dispatch_table)
4924         (make_class_data, emit_offset_symbol_table)
4925         * constants.c (build_constants_constructor)
4926         * java-tree.h (START_RECORD_CONSTRUCTOR)
4927         * parse.y (maybe_build_array_element_wfl):
4928         Use build_constructor.
4930 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
4932         PR java/10253:
4933         * parse.y (string_convert_int_cst): Always use at least one digit
4934         in string conversion. Remove ASCII dependence.
4935         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
4937 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
4939         * Make-lang.in: added win32-host.c
4940         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
4941         resolves to open() on non-Win32 platforms and
4942         Win32-specific jcf_open_exact_case() on Win32
4943         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
4944         when trying .java and .class files
4945         * win32-host.c: added to repository. Defines
4946         Win32-specific jcf_open_exact_case()
4948 2003-04-10  Andrew Haley  <aph@redhat.com>
4950         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
4951         (maybe_free_localvar): Renamed from localvar_free.
4952         Add new arg, really.
4953         (generate_bytecode_insns): Set new variable, jsrs.
4954         Only free local vars if no jsr insns have been emittted.
4955         Call maybe_free_localvar, not localvar_free.
4957 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
4959         * gcj.texi: Remove @ at start of file.
4961 2003-03-25  Tom Tromey  <tromey@redhat.com>
4963         * parse.y (create_interface): Call CHECK_DEPRECATED.
4965 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
4967         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
4969 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4971         * javaop.h (jfloat, jdouble): Make them structures mirroring
4972         the bit fields of IEEE float and double respectively.
4973         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
4974         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
4975         (union Word, union DWord): Delete.
4976         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
4978         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
4979         D_NAN_MASK): Delete.
4980         (jni_print_float, jni_print_double): New.  Generate
4981         hexadecimal floating constants.
4982         (print_field_info): Use jni_print_float/double.
4984         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
4985         finite floating point numbers for output; special case
4986         non-finite floats.
4988 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4990         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
4991         Replace 0 and 1 with true and false in return statements.
4993 2003-03-19  Tom Tromey  <tromey@redhat.com>
4995         * lex.c (do_java_lex): Renamed from java_lex.
4996         (java_lex): New function.
4997         Include timevar.h.
4999 2003-03-13  Tom Tromey  <tromey@redhat.com>
5001         * parse.y (resolve_inner_class): Error if qualifier is a primitive
5002         type.
5004 2003-03-04  Andrew Haley  <aph@redhat.com>
5006         * gjavah.c (is_first_data_member): New global variable.
5007         (print_c_decl): If it's the first data member, align it as the
5008         superclass.
5009         (process_file): Set is_first_data_member.
5011 2003-03-11  Tom Tromey  <tromey@redhat.com>
5013         * parse.y (resolve_field_access): Initialize class if field is
5014         found in another static field.
5015         * expr.c (build_class_init): Don't optimize out initialization of
5016         implemented interface.
5018 2003-03-11  Andrew Haley  <aph@redhat.com>
5020         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
5021         warning.
5023 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
5025         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
5026         and DIR_SEPARATOR_2 for a target.
5027         Correct minor typos.
5029         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
5030         and DIR_SEPARATOR_2 for a target into account.
5032 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
5034         * lang.c (java_init): Update prototype, move code to java_post_options.
5035         (java_post_options): Similarly.
5037 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
5039         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
5040         compare file name components depending on the case-sensitivity
5041         or otherwise of the host file system.
5043         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
5044         "strcmp" to compare file name components.
5045         Use IS_DIR_SEPARATOR instead of comparing directly against
5046         DIR_SEPARATOR.
5047         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
5048         comparing directly against DIR_SEPARATOR.
5050 2003-03-04  Tom Tromey  <tromey@redhat.com>
5052         * Make-lang.in (java.tags): New target.
5054 2003-03-01  Roger Sayle  <roger@eyesopen.com>
5056         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
5057         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
5059 2003-03-01  Tom Tromey  <tromey@redhat.com>
5061         * parse.y (jdep_resolve_class): Only check deprecation if we found
5062         a decl.
5064 2003-02-28  Tom Tromey  <tromey@redhat.com>
5066         PR java/9695:
5067         * class.c (maybe_layout_super_class): Always pass a WFL to
5068         do_resolve_class.
5069         * parse.y (do_resolve_class): Updated comment to explain
5070         parameters.
5072 2003-02-26  Tom Tromey  <tromey@redhat.com>
5074         * jcf-write.c (generate_classfile): Check whether class is
5075         deprecated before writing attribute count.
5077 2003-02-25  Roger Sayle  <roger@eyesopen.com>
5079         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
5080         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
5082 2003-02-23  Tom Tromey  <tromey@redhat.com>
5084         * lang-options.h: Added -Wdeprecated.
5085         * gcj.texi (Warnings): Document -Wdeprecated.
5086         * java-tree.h (flag_deprecated): Declare.
5087         * lang.c (lang_W_options): Added deprecated.
5088         (flag_deprecated): New global.
5089         * chartables.h: Rebuilt.
5090         * gen-table.pl (process_one): Look at whitespace.
5091         (print_tables): Define LETTER_SPACE, LETTER_MASK.
5092         * parse.h (CLEAR_DEPRECATED): New macro.
5093         (CHECK_DEPRECATED_NO_RESET): New macro.
5094         * jcf-parse.c (handle_deprecated): New function.
5095         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
5096         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
5097         * parse.y (resolve_type_during_patch): Check deprecation.
5098         (jdep_resolve_class): Likewise.
5099         (process_imports): Likewise.
5100         (resolve_expression_name): Likewise.
5101         (check_deprecation): Strip arrays from decl.  Check
5102         flag_deprecated.
5103         (patch_method_invocation): Also check the particular constructor
5104         for deprecation.
5105         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
5106         * jcf-write.c (append_deprecated_attribute): New function.
5107         (generate_classfile): Generate deprecated attribute when
5108         appropriate.
5109         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
5110         (java_lex) [case '*']: Simplify logic.
5111         (java_start_char_p): Use LETTER_MASK.
5112         (java_part_char_p): Likewise.
5113         (java_space_char_p): New function.
5115 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5117         Change base class access representation.
5118         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
5119         (add_interface_do): Likewise.
5121 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
5123         * decl.c (java_init_decl_processing): Change
5124         soft_lookupjnimethod_node to reflect the change in
5125         signature of _Jv_LookupJNIMethod in libjava/jni.cc
5126         * expr.c (build_jni_stub): Calculate and pass the size
5127         on the stack of the arguments to a JNI function. Use
5128         new target macro MODIFY_JNI_METHOD_CALL to allow a
5129         target to modify the call to a JNI method.
5131 2003-02-08  Roger Sayle  <roger@eyesopen.com>
5133         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
5134         instead of basename to avoid compiler warnings on Tru64.
5136 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5138         * gcj.texi: Update to GFDL 1.2.
5140 2003-01-31  Andrew Haley  <aph@redhat.com>
5142         * parse.y (java_expand_classes): Scan the whole class list looking
5143         for access methods that haven't yet been expanded.
5145 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
5147         Fix for java/4269:
5149         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
5150         to fix bootstrap on sparc-unknown-netbsdelf1.5.
5151         * jcf-parse.c: Likewise.
5153 2003-01-31  Mark Wielaard  <mark@klomp.org>
5155         * gjavah.c (throwable_p): Allocate 1 more byte for string.
5157 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5159         * class.c (make_class): Use BINFO_ELTS.
5160         (set_super_info): Likewse.
5161         (add_interface_do): Likewise.
5163 2003-01-30  Tom Tromey  <tromey@redhat.com>
5165         * jcf-parse.c (read_class): Update identifier's class value if it
5166         changed during parsing.
5168 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
5170         * Make-lang.in (po-generated): Find the targets in $(parsedir).
5171         Propagate change to all other rules as required.
5172         (java/parse-scan.o): Add explicit dependency on
5173         $(parsedir)/java/parse-scan.c .
5175 2003-01-29  Tom Tromey  <tromey@redhat.com>
5177         * parse.y (patch_assignment): Only transform the rhs of an
5178         assignment when compiling to native.
5180 2003-01-28  Tom Tromey  <tromey@redhat.com>
5182         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
5184 2003-01-28  Tom Tromey  <tromey@redhat.com>
5186         * lex.c (java_lex): Don't include UEOF as part of token.
5187         (java_read_unicode): Error if \u sequence prematurely terminated.
5189 2003-01-27  Tom Tromey  <tromey@redhat.com>
5191         * parse.y (java_check_regular_methods): Check for construct after
5192         checking types in throws clause.
5194 2003-01-24  Tom Tromey  <tromey@redhat.com>
5196         * class.c (build_static_field_ref): Only a String or numeric field
5197         can fold to a constant.
5199 2003-01-23  Tom Tromey  <tromey@redhat.com>
5201         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
5202         file name in resource buffer.
5204 2003-01-23  Tom Tromey  <tromey@redhat.com>
5206         * expr.c (build_known_method_ref): Use method's context to find
5207         method table index.
5209 2003-01-23  Tom Tromey  <tromey@redhat.com>
5211         * constants.c (set_constant_entry): Allocated cleared memory.
5213 2003-01-22  Tom Tromey  <tromey@redhat.com>
5215         * java-tree.h: Don't use PARAMS.
5216         * resource.c: Add prototypes for all functions.
5217         (write_resource_constructor): Use `const char *' to avoid
5218         warning.
5220 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
5222         * jcf-parse.c (process_zip_dir): Remove unused variable.
5224 2003-01-22  Tom Tromey  <tromey@redhat.com>
5226         * expr.c (build_invokeinterface): Abort if method's context is not
5227         an interface.
5229 2003-01-22  Tom Tromey  <tromey@redhat.com>
5231         * gcj.texi (Input and output files): Mention non-class entries.
5232         * decl.c (java_init_decl_processing): Call
5233         init_resource_processing.
5234         * java-tree.h (compile_resource_data, write_resource_constructor,
5235         compile_resource_file, init_resource_processing): Declare.
5236         * config-lang.in (gtfiles): Added resource.c.
5237         * Make-lang.in (gt-java-resource.h): New target.
5238         (JAVA_OBJS): Added resource.o.
5239         (java/resource.o): New target.
5240         * resource.c: New file.
5241         * class.c (compile_resource_file): Moved to resource.c.
5242         (registerResource_libfunc): Likewise.
5243         (utf8_decl_list): Mark with GTY; now static.
5244         * jcf-parse.c (classify_zip_file): New function.
5245         (parse_zip_file_entries): Use it; compile .properties files.
5246         (process_zip_dir): Use classify_zip_file and compute_class_name.
5247         Don't write class name into zip directory.
5248         (java_parse_file): Call write_resource_constructor.
5249         (compute_class_name): New function.
5250         * jcf-io.c (read_zip_member): Reindented.
5252 2003-01-21  Tom Tromey  <tromey@redhat.com>
5254         * class.c (supers_all_compiled): New function.
5255         (make_class_data): Use it.
5257 2003-01-21  Tom Tromey  <tromey@redhat.com>
5259         * parse.y (method_header): Native method can't be strictfp.
5260         No method can be transient or volatile.
5262 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5264         Make-lang.in (jvspec.o-warn): Add -Wno-error.
5266 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
5268         * check-init.c: Fix comment typos.
5269         * class.c: Likewise.
5270         * constants.c: Likewise.
5271         * decl.c: Likewise.
5272         * except.c: Likewise.
5273         * expr.c: Likewise.
5274         * java-except.h: Likewise.
5275         * java-tree.h: Likewise.
5276         * javaop.h: Likewise.
5277         * jcf-dump.c: Likewise.
5278         * jcf-io.c: Likewise.
5279         * jcf-parse.c: Likewise.
5280         * jcf-write.c: Likewise.
5281         * lang.c: Likewise.
5282         * mangle.c: Likewise.
5283         * typeck.c: Likewise.
5284         * verify.c: Likewise.
5286 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5288         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
5289         * jcf-write.c: Include "tm_p.h".
5291 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5293         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
5295 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5297         * builtins.c (java_build_function_call_expr): Renamed from
5298         build_function_call_expr.  All callers changed.
5300         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
5301         * jcf-parse.c: Include tm_p.h.
5303         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
5304         warning.
5306 2003-01-14  Tom Tromey  <tromey@redhat.com>
5308         * class.c (make_class_data): Check that super is compiled before
5309         building class reference to it.
5311 2003-01-14  Andrew Haley  <aph@redhat.com>
5313         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
5314         varargs function -- correct.
5316 2003-01-14  Andrew Haley  <aph@redhat.com>
5318         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
5320 2003-01-14  Andrew Haley  <aph@redhat.com>
5322         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
5323         varargs function -- correct.
5325         * parse.y (patch_assignment): Copy the rhs of an assignment into a
5326         temporary if the RHS is a reference.
5328 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5330         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
5331         * keyword.h: Regenerated.
5333         * All Files: Convert to ISO C style function definitions.
5335 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
5337         * parse.y (check_pkg_class_access): ANSIfy definition.
5339 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5341         * decl.c, parse-scan.y, parse.y: Don't cast return value of
5342         xmalloc et al.
5344         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
5346 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5348         Merge from pch-branch:
5350         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
5352         * Make-lang.in (java/gjavah.o): Update dependencies.
5353         * gjavah.c: Include ggc.h.
5355         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
5357         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
5358         (JCFDUMP_OBJS): Add ggc-none.o.
5359         (java/jcf-dump.o): Depend on GGC_H.
5360         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
5361         CPool substructures.
5362         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
5363         * jcf-dump.c: Include ggc.h.
5365         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
5367         * jcf.h (union cpool_entry): New.
5368         (struct CPool): Use gengtype to mark.  Change field 'data' to be
5369         an array of unions.
5370         (struct JCF): Use gengtype to mark.
5371         (CPOOL_UINT): Update for new cpool_entry type.
5372         (CPOOL_USHORT1): Likewise.
5373         (CPOOL_USHORT2): Likewise.
5374         (CPOOL_FINISH): Use GC to free cpool subfields.
5375         * parse.h (struct parser_ctxt): Mark field current_jcf.
5376         * lex.c (java_init_lex): Use GC to allocate struct JCF.
5377         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
5378         (main_jcf): Use gengtype to mark.
5379         (ggc_mark_jcf): Delete.
5380         (get_constant): Update for new cpool_entry type.
5381         (give_name_to_class): Likewise.
5382         (get_class_constant): Likewise.
5383         (init_outgoing_cpool): Use GGC to allocate struct CPool.
5384         (java_parse_file): Use GGC to allocate struct JCF.
5385         (init_jcf_parse): Don't call ggc_add_root.
5386         * jcf-reader.c (jcf_parse_constant_pool): Update for new
5387         cpool_entry type.
5388         * java-tree.h (current_jcf): Use gengtype to mark.
5389         (CPOOL_UTF): Update for new cpool_entry type.
5390         (outgoing_cpool): Use gengtype to mark.
5391         (struct lang_type): GC struct JCF and struct CPool.
5392         * config-lang.in (gtfiles): Add jcf.h.
5393         * constants.c (find_tree_constant): New.
5394         (set_constant_entry): Allocate cpool subfields using GGC.  Update
5395         for new cpool_entry type.
5396         (find_constant1): Update for new cpool_entry type.
5397         (find_constant2): Likewise.
5398         (find_utf8_constant): Use find_tree_constant.
5399         (find_class_or_string_constant): Remove unnecessary cast to jword.
5400         Update for new cpool_entry type.
5401         (count_constant_pool_bytes): Update for new cpool_entry type.
5402         (write_constant_pool): Likewise.
5403         (alloc_name_constant): Use find_tree_constant.
5404         (build_constants_constructor): Update for new cpool_entry type.
5406         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
5408         * parse.y (mark_parser_ctxt): Delete.
5409         (goal): Don't use ggc_add_root.
5410         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
5411         (java_pop_parser_context): Let GC free parser_ctxt.
5412         (java_parser_context_resume): Likewise.
5413         * parse.h (struct parser_ctxt): Use gengtype to mark.
5414         (ctxp): Likewise.
5415         (ctxp_for_generation): Likewise.
5416         * lex.h (struct java_lc_s): Mark for gengtype.
5417         (java_lexer): Rearrange for gengtype.
5418         * config-lang.in (gtfiles): Add lex.h, parse.h.
5420 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5422         * All Files: Remove PARAMS macro.
5424         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
5425         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
5426         `__STDC__' macros.
5428         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
5429         VA_CLOSE.
5431 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
5433         * Make-lang.in (java.install-common, java.uninstall,
5434         java.install-info, java.install-man): Prepend $(DESTDIR)
5435         to destination paths in all (un)installation commands.
5436         (java.install-common): Rewrite $(LN) command to support
5437         DESTDIR with "ln" as well as with "ln -s".
5439 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5441         * java-tree.h: Protect against multiple inclusion.
5443 2003-01-07  Tom Tromey  <tromey@redhat.com>
5445         * class.c (add_assume_compiled): Don't adjust parent if we're
5446         already at the root of tree.
5448 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5450         * lang.c (dump_compound_expr): Prototype.
5452 2003-01-03  Tom Tromey  <tromey@redhat.com>
5454         Fix for PR java/8712:
5455         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
5456         when simply checking against `null'.
5458 2003-01-03  Tom Tromey  <tromey@redhat.com>
5460         * gcj.texi (Standard Properties): Document http.proxyHost and
5461         http.proxyPort.
5463         * gcj.texi (GNU Classpath Properties): Document new properties.
5465 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5467         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
5468         java/lang-options.h, java/mangle.c, java/mangle_name.c,
5469         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
5471 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5473         * Make-lang.in, boehm.c, buffer.c,
5474           buffer.h, builtins.c, class.c,
5475           config-lang.in, constants.c,
5476           convert.h, decl.c, except.c,
5477           expr.c, java-except.h,
5478           java-tree.h, javaop.def,
5479           jcf-parse.c, jcf-write.c,
5480           jv-scan.c, jvgenmain.c,
5481           jvspec.c, keyword.gperf,
5482           keyword.h, lang-options.h,
5483           lang-specs.h, lang.c, lex.c,
5484           lex.h, mangle.c, mangle_name.c,
5485           parse-scan.y, parse.h, parse.y,
5486           typeck.c, verify.c, xref.c,
5487           xref.h: Replace "GNU CC" with
5488           "GCC" in the copyright header.
5490         * check-init.c, gjavah.c, javaop.h,
5491           jcf-depend.c, jcf-dump.c, jcf-io.c,
5492           jcf-path.c, jcf-reader.c, jcf.h,
5493           zextract.c, zipfile.h: These files are
5494           "part of GCC". Also say "GCC" not "GNU CC".
5496 2002-12-30  DJ Delorie  <dj@redhat.com>
5498         * Make-lang.in: Protect against texi2pod/pod2man failing.
5500 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
5502         * gcj.texi: Use @copying.
5504 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5506         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
5507         print_cxx_classname.
5508         (print_cxx_classname): Add add_scope parameter.
5509         (print_class_decls): Do not emit a semicolon after the extern
5510         "Java" block.
5511         (process_file): Adjust calls to print_cxx_classname.
5513 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
5515         * gcj.texi: Include Cover Texts in man page.
5517 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
5519         * class.c (build_static_field_ref): Check FIELD_FINAL.
5521         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
5522         instead of current_constant_pool_data_ref.
5523         * java-tree.h (current_constant_pool_data_ref): Undefine.
5524         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
5525         * jcf-parse.c (init_outgoing_cpool): Don't initialize
5526         current_constant_pool_data_ref.
5528         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
5529         not build_internal_class_name.
5531         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
5532         Use it when class ref isn't certain to be compiled.
5534 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
5536         * gcj.texi: Include gcc-common.texi.
5537         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
5538         $(srcdir)/doc/include/gcc-common.texi.
5540 2002-12-22  Anthony Green  <green@redhat.com>
5542         * gcj.texi (Limitations): Add note about org.xml.sax and
5543         org.w3c.dom.
5545 2002-12-20  Tom Tromey  <tromey@redhat.com>
5547         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
5548         where minimum case value is Integer.MIN_VALUE.
5549         Fixes PR java/8955.
5551 2002-12-18  Andrew Haley  <aph@redhat.com>
5553         * parse.y (patch_invoke): Force evaluation order when `check' is
5554         set.  For PR libgcj/8945.
5556 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
5558         * gcj.texi: Change version number to 3.4.
5560 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
5561         Andrew Haley <aph@redhat.com>
5563         * parse.y (source_end_java_method): Remove custom encoding of line
5564         numbers for a function decl before passing it to the back end.
5566 2002-12-03  Andrew Haley  <aph@redhat.com>
5568         * class.c (make_class_data): New field, "chain".
5569         * decl.c (java_init_decl_processing): Likewise.
5571 2002-12-02  Tom Tromey  <tromey@redhat.com>
5573         For PR java/8740:
5574         * parse.y (do_resolve_class): Handle qualified name via
5575         recursion.
5577 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
5579         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
5580         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
5581         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
5582         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
5583         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
5584         Include coretypes.h and tm.h.
5585         * Make-lang.in: Update dependencies.
5587 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5589         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
5591 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
5593         * jcf-reader.c: Don't expand JCF_readu4 inside the
5594         expansion of JCF_SKIP.
5596 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
5598         * jcf-reader.c: Don't expand JCF_readu4 inside the
5599         expansion of JCF_SKIP.
5601 2002-11-22  Tom Tromey  <tromey@redhat.com>
5603         * parse.y (patch_binop): Cast right hand side of shift expression
5604         to `int'.  Fixes PR java/8676.
5606 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
5607             Andrew Haley <aph@redhat.com>
5609         * gcc/java/jcf-write.c (write_classfile): Remove target
5610         class file, if it exists, before renaming the temporary
5611         class file to it.
5613 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
5615         * jvspec.c (lang_specific_spec_functions): New.
5617 2002-11-18  Tom Tromey  <tromey@redhat.com>
5619         Fix for PR java/7912:
5620         * expr.c (can_widen_reference_to): Allow cast of array to
5621         Cloneable or Serializable.
5622         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
5623         (java_io_serializable_identifier_node): Likewise.
5624         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
5625         (valid_ref_assignconv_cast_p): Use new identifier nodes.
5626         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
5627         java_io_serializable.
5628         * decl.c (java_init_decl_processing): Initialize
5629         java_lang_cloneable_identifier_node and
5630         java_io_serializable_identifier_node.
5631         (java_lang_cloneable_identifier_node): New global.
5632         (java_io_serializable_identifier_node): Likewise.
5634 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
5636         * buffer.c: Remove unnecessary casts.
5637         * check-init.c: Likewise.
5638         * class.c: Likewise.
5639         * constants.c: Likewise.
5640         * decl.c: Likewise.
5641         * except.c: Likewise.
5642         * gjavah.c: Likewise.
5643         * jcf-io.c: Likewise.
5644         * jcf-parse.c: Likewise.
5645         * jcf-path.c: Likewise.
5646         * jvspec.c: Likewise.
5647         * lang.c: Likewise.
5648         * lex.c: Likewise.
5649         * verify.c: Likewise.
5651 2002-11-06  Tom Tromey  <tromey@redhat.com>
5653         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
5654         a JNI header.
5656 2002-11-05  Tom Tromey  <tromey@redhat.com>
5658         Fix for PR java/6388.
5659         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
5660         * java-tree.h (enum java_tree_index): New values
5661         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
5662         (decimal_int_max, decimal_long_max): New defines.
5663         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
5664         (error_if_numeric_overflow): Rewrote range checking.
5665         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
5666         decimal_long_max.
5668 2002-11-02  Tom Tromey  <tromey@redhat.com>
5670         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
5672         * class.c (make_method_value): Put class name, not signature, into
5673         `throws' field.  For PR java/8415.
5675 2002-10-24  Tom Tromey  <tromey@redhat.com>
5677         * gcj.texi (Invoking gij): Document --showversion.
5678         (Standard Properties): java.library.path now set.
5680 2002-10-23  Tom Tromey  <tromey@redhat.com>
5682         * gjavah.c (decode_signature_piece): In JNI mode, print
5683         `jobjectArray' when array depth is nonzero.
5684         Fixes PR java/8296.
5686 2002-10-15  Andrew Haley  <aph@redhat.com>
5688         * parse.y (patch_invoke): Call force_evaluation_order on a static
5689         arg list.
5690         (resolve_qualified_expression_name): Call force_evaluation_order
5691         on a arg list that is part of a Qualified Expression Name.
5693         * lang.c (dump_compound_expr): New.
5694         (java_dump_tree): New.
5696 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
5698         * gcj.texi: Added item describing the GCJ runtime property
5699         "gnu.gcj.progname".
5701 2002-10-15  Richard Henderson  <rth@redhat.com>
5703         * jcf-parse.c (get_constant): Fix type warning.
5705 2002-10-15  Andrew Haley  <aph@redhat.com>
5707         * java-tree.h (java_inlining_merge_static_initializers): Declare.
5708         (java_inlining_map_static_initializers): Declare.
5710 2002-10-14  Andrew Haley  <aph@redhat.com>
5712         * tree-inline.c (remap_block): All local class initialization
5713         flags go in the outermost scope.
5714         (expand_call_inline): Call java_inlining_map_static_initializers.
5715         (expand_call_inline): Call java_inlining_merge_static_initializers.
5716         * java/lang.c (merge_init_test_initialization): New.
5717         (java_inlining_merge_static_initializers): New.
5718         (inline_init_test_initialization): New.
5719         (java_inlining_map_static_initializers): New.
5721 2002-10-11  Mark Wielaard  <mark@klomp.org>
5723         * gcj.texi (Compatibility): Add Limitations and Extensions section.
5725 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5727         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
5729 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5731         * parse.y (merge_string_cste): Add parentheses around & within |.
5733 2002-10-08  Tom Tromey  <tromey@redhat.com>
5735         * parse.y (variable_declarator_id): Simplify error path for
5736         array declarator error.  For PR java/8003.
5738 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
5740         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
5741         bug_report_url.
5743 2002-10-08  Andrew Haley  <aph@redhat.com>
5745         * parse.y (attach_init_test_initialization_flags): Check for
5746         error_mark_node.
5748 2002-10-07  Anthony Green  <green@redhat.com>
5750         * parse.y (merge_string_cste): Fix bug in string concatenation.
5752 2002-10-03  Michael Koch  <konqueror@gmx.de>
5754         * gcj.texi (Standard properties):
5755         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
5757 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5759         PR optimization/6627
5760         * lang.c (java_init): If storing the vbit in function
5761         pointers, ensure that force_align_functions_log is atleast
5762         one to aid compatability with g++ vtables.
5764 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
5766         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
5767         foul of type-based aliasing.
5769 2002-09-30  Anthony Green  <green@redhat.com>
5771         * gcj.texi (Invoking jv-scan): Fix texinfo.
5773 2002-09-28  Anthony Green  <green@redhat.com>
5775         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
5776         (Code Generation): Add -fno-assert documentation.
5777         * jv-scan.c (flag_assert): New global.
5778         (options): Add assert option.
5779         (help): Add --no-assert documentation.
5780         * parse-scan.y (flag_assert): New global.
5781         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
5782         (flag_assert): New global.
5783         * java-tree.h (flag_assert): New global.
5784         * lex.c (java_lex): Obey flag_assert.
5785         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
5786         calling cc1.
5788 2002-09-26  Andrew Haley  <aph@redhat.com>
5790         * expr.c (build_java_array_length_access): Check for null pointer.
5791         * expr.c (expand_java_arrayload): Likewise.
5793 2002-09-21  Richard Henderson  <rth@redhat.com>
5795         * jcf-parse.c (get_constant): Decode from IEEE no matter
5796         what the target format.
5798 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
5800         * ChangeLog: Follow spelling conventions.
5801         * class.c: Likewise.
5802         * decl.c: Likewise.
5803         * expr.c: Likewise.
5804         * gjavah.c: Likewise.
5805         * java-tree.h: Likewise.
5806         * jcf-dump.c: Likewise.
5807         * jcf-parse.c: Likewise.
5808         * jvspec.c: Likewise.
5809         * lang.c: Likewise.
5810         * mangle.c: Likewise.
5811         * parse.y: Likewise.
5813 2002-09-17  Tom Tromey  <tromey@redhat.com>
5815         * lex.c (java_read_unicode_collapsing_terminators): Handle case
5816         where \r appears at EOF.  Fixes PR java/7950.
5818 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
5820         * jvspec.c (lang_specific_driver): Remove unused variable.
5822 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5824         * java-tree.h (union lang_tree_node): Add chain_next option.
5826 2002-09-16  Richard Henderson  <rth@redhat.com>
5828         * jcf-parse.c (get_constant): Runtime check for IEEE format;
5829         use new real.h interface.
5830         * jcf-write.c (find_constant_index): Use new real.h interface.
5831         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
5833 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5835         * lang.c: Follow spelling conventions.
5837 2002-09-11  Per Bothner  <per@bothner.com>
5839         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
5840         constant to the type of the field.
5841         (java_complete_tree):  Remove now-redundant code.
5843         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
5845 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
5847         For PR java/5794:
5848         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
5849         return label if a ret instruction for the jsr has been reached.
5851 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
5853         * parse.y (DIR_SEPARATOR): Don't define.
5854         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
5856 2002-08-28  Andrew Haley  <aph@redhat.com>
5858         * verify.c (verify_jvm_instructions): Allow exception handler
5859         inside code that is being protected, but generate a warning.
5860         * except.c (link_handler): Initialize `expanded' in new eh_range.
5861         (binding_depth, is_class_level, current_pc): Declare extern.
5863 2002-09-01  Mark Wielaard <mark@klomp.org>
5865         * gcj.texi: Add chapter about system properties.
5866         Fixed some typos.
5868 2002-08-26  Tom Tromey  <tromey@redhat.com>
5870         * parse.y (try_builtin_assignconv): Allow narrowing primitive
5871         conversion if RHS_TYPE is byte, short, or char.
5873 2002-08-22  Tom Tromey  <tromey@redhat.com>
5875         * gcj.texi (Invoking gij): Document -cp and -classpath.
5877 2002-08-21  Tom Tromey  <tromey@redhat.com>
5879         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
5880         $(prefix)/share.  For PR libgcj/7633.
5882         For PR java/6005 and PR java/7611:
5883         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
5884         (java_can_use_bit_fields_p): New function.
5886 2002-08-16  Tom Tromey  <tromey@redhat.com>
5888         * gcj.texi (Class Initialization): Mention class initialization of
5889         arrays.
5891 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
5893         * Make-lang.in (java-tree-inline.o): New.
5894         (JAVA_OBJS): Add java-tree-inline.o.
5895         * parse.y (source_end_java_method): Call java_optimize_inline.
5896         (java_expand_method_bodies): Save method's tree in
5897         DECL_SAVED_TREE.
5898         (add_stmt_to_compound): Keep track of the number of statments.
5899         * lang.c (java_init): Enable flag_inline_trees.
5900         (java_post_options): If flag_inline_functions is on, enable
5901         flag_inline_trees instread.
5902         (decl_constant_value): New.
5903         (java_tree_inlining_walk_subtrees): New.
5904         * java-tree.h (DECL_NUM_STMTS): New macro.
5905         (java_optimize_inline): Declare.
5906         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
5907         Handle a LABEL_EXPR.
5908         * decl.c (build_result_decl): If we already have a DECL_RESULT
5909         don't make another.
5910         (dump_function): New.
5911         (java_optimize_inline): New.
5912         (dump_function): New.
5914 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
5916         For PR java/7483:
5917         * parse.y (build_assertion): Invert return from
5918         desiredAssertionStatus.
5920 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5922         * jcf-write.c (get_access_flags): Return correct access flags for
5923         private and protected inner classes.
5925 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
5927         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
5929 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
5931         * mangle_name.c: Don't include obstack.h twice.
5932         * xref.c: Don't include obstack.h.
5934 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
5936         * class.c: (permanent_obstack): Delete declaration.
5937         * constants.c: (permanent_obstack): Delete declaration.
5938         * except.c: (permanent_obstack): Delete declaration.
5939         * expr.c: (permanent_obstack): Delete declaration.
5940         * jcf-parse.c: (permanent_obstack): Delete declaration.
5941         (saveable_obstack): Delete declaration.
5942         * parse.h: (permanent_obstack): Delete declaration.
5943         * typeck.c: (permanent_obstack): Delete declaration.
5945 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
5947         * gcj.texi (version-gcc): Increase to 3.3.
5949 2002-07-22  Tom Tromey  <tromey@redhat.com>
5951         * lex.c (java_lex): Check for `e' or `E' after 0.
5953 2002-07-21  Richard Henderson  <rth@redhat.com>
5955         * lang.c (java_unsafe_for_reeval): New.
5956         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
5958 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
5960         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
5961         (jcf_path_init): Use GET_ENVIRONMENT.
5963 2002-07-10  Roger Sayle  <roger@eyesopen.com>
5964             Zack Weinberg <zack@codesourcery.com>
5966         * builtins.c (initialize_builtins): Remove defines that
5967         handled C/C++ specific junk hereby removed from builtins.def.
5969 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
5971         * lang.c (java_post_options): Update prototype.
5973 2002-07-05  Roger Sayle  <roger@eyesopen.com>
5975         * builtins.c (initialize_builtins): Ignore the additional
5976         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
5977         the builtins.def file.
5979 2002-07-01  Tom Tromey  <tromey@redhat.com>
5981         For PR libgcj/7073:
5982         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
5983         specially.
5985 2002-07-01  Roger Sayle  <roger@eyesopen.com>
5987         * java/decl.c (builtin_function): Accept additional parameter.
5988         (java_init_decl_processing): Pass an additional NULL_TREE
5989         argument to builtin_function.
5991 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
5993         * gcj.texi: Fixed gcj invocation example so that it compiles.
5995 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5997         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
5998         * parse.y (mark_parser_ctxt): Likewise.
5999         (check_modifiers, declare_local_variables): Avoid incorrect
6000         hardcoded constant 10.
6002         * lex.c (java_read_char): Avoid "comparison is always true"
6003         warning.
6005 2002-06-25  Andreas Schwab  <schwab@suse.de>
6007         * expr.c (JSR): Avoid undefined operation on PC.
6009 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6011         * decl.c (clear_binding_level): Const-ify.
6013 2002-06-13  Akim Demaille  <akim@epita.fr>
6015         * parse.y (class_declaration, interface_declaration): Make sure
6016         all their rules have an action, in order to avoid meaningless `$$
6017         = $1' and their type clashes.
6019 2002-06-11  Tom Tromey  <tromey@redhat.com>
6021         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
6022         * parse-scan.y (statement_without_trailing_substatement): Added
6023         assert_statement.
6024         (assert_statement): New rule.
6025         * java-tree.h (struct lang_type) [assertions]: New field.
6026         (TYPE_USES_ASSERTIONS): New macro.
6027         (CLASS_USES_ASSERTIONS): Likewise.
6028         (FIELD_SYNTHETIC): New define.
6029         * lex.c (java_lval;): Added ASSERT_TK.
6030         * parse.y (ASSERT_TK): Added.
6031         (statement_without_trailing_substatement): Added assert_statement.
6032         (assert_statement): New rule.
6033         (build_assertion): New function.
6034         (maybe_generate_pre_expand_clinit): Create and initialize
6035         $assertionsDisabled.
6036         (lookup_package_type): Removed decl.
6037         * keyword.h: Rebuilt.
6038         * keyword.gperf (assert): New token.
6040 2002-06-10  Akim Demaille  <akim@epita.fr>
6042         * parse.y (interface_type_list, class_member_declaration)
6043         (unary_expression_not_plus_minus): Remove duplicate %type.
6044         Whitespace changes.
6046 2002-06-09  Tom Tromey  <tromey@redhat.com>
6048         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
6050         * parse.y (method_header): Give error message in all cases.
6051         Fixes PR java/6865.
6053 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6055         Don't use RTL inlining. Fix for PR java/6820.
6056         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
6057         (flag_really_inline): New.
6058         (java_decode_option): Set flag_really_inline if -finline-functions
6059         is seen.
6060         (java_post_options): New function. Turn off inlining unless
6061         flag_really_inline is set.
6063 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6065         * gjavah.c (throwable_p): Accept argument as either a classname or
6066         signature fragment. Create null-terminated classname string for super
6067         when calling itself recursively.
6068         (decode_signature_piece): Skip first character from class name
6069         signature when calling throwable_p.
6071 2002-06-08  H.J. Lu  (hjl@gnu.org)
6073         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
6075 2002-06-04  Tom Tromey  <tromey@redhat.com>
6077         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
6079 2002-06-04  Michael Koch  <konqueror@gmx.de>
6081         * gcj.texi (Input Options): Fixed typo.
6083 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
6085         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
6086         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
6087         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
6088         and all now-pointless local variables.  Rename other local
6089         variables to reflect their not being handles.
6091         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
6092         #if JCF_USE_STDIO blocks.
6094         * parse.y: Add missing semicolon at end of rule.
6096 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6098         * check-init.c (attach_initialized_static_class): Delete, unused.
6099         * parse.y: Use htab_t instead of struct hashtable, update
6100         all uses.
6101         * java-tree.h: Include hashtab.h instead of hash.h.
6102         (struct lang_decl_func): Use htab_t, set up for gengtype.
6103         (struct init_test_hash_entry): Delete.
6104         (struct treetreehash_entry): New.
6105         (java_treetreehash_find): New
6106         (java_treetreehash_new): New prototype.
6107         (java_treetreehash_create): New prototype.
6108         (java_mark_tree): Delete prototype.
6109         (java_hash_hash_tree_node): Delete prototype.
6110         (java_hash_compare_tree_node): Delete prototype.
6111         (attach_initialized_static_class): Delete prototype.
6112         * expr.c (build_class_init): Update to use java_treetreehash
6113         functions.
6114         (java_expand_expr): Update to use htab_t.
6115         (emit_init_test_initialization): Likewise.
6116         * decl.c (java_mark_tree): Delete.
6117         * class.c (init_test_hash_newfunc): Delete.
6118         (java_hash_hash_tree_node): Delete.
6119         (java_hash_compare_tree_node): Delete.
6120         (add_method_1): Update to use java_treetreehash functions.
6121         (JAVA_TREEHASHHASH_H): New macro.
6122         (java_treetreehash_hash): New function.
6123         (java_treetreehash_compare): New function.
6124         (java_treetreehash_find): New function.
6125         (java_treetreehash_new): New function.
6126         (java_treetreehash_create): New function.
6127         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
6129         * Make-lang.in (java/parse.o): Depend on debug.h.
6130         * java-tree.h (struct lang_identifier): Use gengtype.
6131         (union lang_tree_node): New.
6132         (struct lang_decl_func): Use gengtype.
6133         (struct lang_decl_var): Likewise.
6134         (struct lang_decl): Likewise.
6135         * parse.y: Include debug.h.
6136         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
6138         * lang.c (struct language_function): New dummy structure.
6140         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
6141         descriminator for DECL_LANG_SPECIFIC.
6142         (struct lang_decl_func): Rename from struct lang_decl.
6143         (enum lang_decl_desc): New.
6144         (struct lang_decl): Make it a union.  Update all the accessor macros.
6145         (struct lang_type): Use gengtype.
6146         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
6147         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
6148         are now the same size.
6149         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
6150         use discriminator to mark DECL_LANG_SPECIFIC.
6152         * Make-lang.in (gt-java-builtins.h): New rule.
6153         (java/builtins.o): Add dependency on gt-<filename>.h.
6154         * builtins.c: Use gengtype for roots.
6155         (union string_or_tree): Use gengtype.
6156         (struct builtin_record): Use gengtype.
6157         * config-lang.in (gtfiles): Add builtins.c.
6159         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
6160         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
6161         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
6162         gt-java-parse.h, gtype-java.h): Add rules to generate.
6163         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
6164         (class.o): Add dependency on gt-*.h.
6165         (constants.o): Likewise.
6166         (decl.o): Likewise.
6167         (expr.o): Likewise.
6168         (jcf-parse.o): Likewise.
6169         (jcf-write.o): Likewise.
6170         (lang.o): Likewise.
6171         * config-lang.in (gtfiles): New.
6172         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6173         * constants.c: Replace uses of ggc_add_* with GTY markers.
6174         Include gt-*.h.
6175         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6176         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6177         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
6178         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
6179         Include gt-*.h.
6180         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
6181         Include gt-*.h.
6182         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6183         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
6184         gt-*.h.
6185         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
6186         Include gtype-java.h.
6188 2002-06-02  Tom Tromey  <tromey@redhat.com>
6190         Fix for PR java/5913:
6191         * parse.y (patch_binop): Call patch_string on op1.
6193 2002-06-02  Tom Tromey  <tromey@redhat.com>
6195         Fix for PR java/1343, PR java/6336:
6196         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
6197         formatting.  Changed return type.
6198         (anonymous_class_counter): Moved to top of file.
6199         (maybe_make_nested_class_name): Append number to class name for
6200         function-local classes.
6202 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
6204         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
6205         * Make-lang.in: Update dependency lists.
6207 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
6209         * gjavah.c (throwable_p): Do not free the name of the class after
6210         passing it to find_class.
6211         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
6212         * jcf-io.c (dirent.h): Include it.
6213         (fnmatch.h): Likewise.
6214         (compare_path): New function.
6215         (java_or_class_file): Likewise.
6216         (memoized_dirlist_entry): New type.
6217         (memoized_dirlist_lookup_eq): New function.
6218         (memoized_dirlists): New variable.
6219         (caching_stat): New function.
6220         (memoized_class_lookup_eq): New function.
6221         (memoized_class_lookups): Likewise.
6222         (find_class): Use memoized_class_lookups and caching_stat.
6223         * jcf.h (JCF_USE_SCANDIR): Define.
6224         * parse.y (java_expand_classes): Write the class files in reverse
6225         order.
6227 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6229         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
6231 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
6233         * jcf-write.c (write_classfile): Unlink the temporary file if it
6234         cannot be renamed.  Use concat to build up the name of the
6235         temporary file.
6237 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
6239         * jcf-write.c (write_classfile): Write the file to a
6240         temporary file and then rename it.
6242 2002-05-07  Tom Tromey  <tromey@redhat.com>
6244         * gjavah.c (throwable_p): Use xstrdup, not strdup.
6246         Fix for PR java/1200:
6247         * gjavah.c (throwable_p): New function.
6248         (decode_signature_piece): Use it.  A `WeakReference' isn't the
6249         same as a `jweak'.
6250         Include hashtab.h.
6251         (gcjh_streq): New function.
6253 2002-05-07  Andreas Jaeger  <aj@suse.de>
6255         * parse.y (finish_for_loop): Fix if statement.
6257 2002-05-06  Tom Tromey  <tromey@redhat.com>
6259         Fix for PR java/5941:
6260         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
6261         loop update expression.
6262         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
6263         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
6265 2002-05-04  Mark Wielaard  <mark@klomp.org>
6267         For PR java/6519:
6268         * parse.y (build_string_concatenation): Return just op1 only when op2
6269         is null and op1 is a STRING_CST, otherwise always construct a
6270         StringBuffer.
6272 2002-04-27  Tom Tromey  <tromey@redhat.com>
6274         For PR java/6382:
6275         * parse.y (string_convert_int_cst): New function.
6276         (merge_string_cste): Use it.
6278 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6280         * java-tree.h (java_parse_file): Update.
6281         (java_set_yydebug): Remove.
6282         * jcf-parse.c (yydebug): Remove.
6283         (java_set_yydebug): Die.
6284         (java_parse_file): Update.
6285         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
6287 2002-04-24  Tom Tromey  <tromey@redhat.com>
6289         For PR java/6425:
6290         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
6291         EXPR_WFL_QUALIFICATION of qual_wfl.
6293 2002-04-23  Per Bothner  <per@bothner.com>
6295         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
6296         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
6297         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
6299 2002-04-23  Tom Tromey  <tromey@redhat.com>
6301         For PR java/6314:
6302         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
6303         recognize `-fcompile-resource='.
6304         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
6305         a bit.
6307 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
6309         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
6310         paths. Fixes PR java/2791.
6312 2002-04-19  Andrew Haley  <aph@redhat.com>
6314         * jcf-write.c (push_long_const): lo, hi: New variables.
6315         Use rshift_double to extract the high part of a 64-bit long.
6316         Use WORD_TO_INT to extract the low part.
6318         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
6319         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
6320         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
6322 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6324         * typeck.c (incomplete_type_error): Remove.
6326 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6328         * class.c (make_class_data): Set DECL_ALIGN on static class data,
6329         for hash synchronization.
6330         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
6331         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
6332         class_type_node.
6334 2002-04-16  Mark Wielaard  <mark@klomp.org>
6336         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
6337         negative zero.
6339 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6341         Fix for PR java/6294:
6342         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
6343         interfaces.
6345 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6347         Fix for PR java/6085:
6348         * parse.y (patch_method_invocation): Always use build_access_to_thisn
6349         to get enclosing "this" argument for inner-class constructor
6350         invocation. Pass correct arguments to build_access_to_thisn.
6352 2002-04-10  Andreas Jaeger  <aj@suse.de>
6354         * gcj.texi (Input Options): Fix extdirs patch.
6356 2002-04-10  Anthony Green  <green@redhat.com>
6358         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
6360 2002-04-09  Anthony Green  <green@redhat.com>
6362         * gcj.texi (Input Options): Add --extdirs documentation.
6363         * jcf-dump.c (OPT_extdirs): New macro.
6364         (options): Add extdirs option.
6365         (help): Describe --extdirs.
6366         (main): Handle OPT_extdirs.
6367         * gjavah.c (OPT_extdirs): New macro.
6368         (options): Add extdirs option.
6369         (help): Describe --extdirs.
6370         (main): Handle OPT_extdirs.
6371         * jcf-path.c (jcf_path_init): Add extdirs support.
6372         (jcf_path_extdirs_arg): New function.
6373         (extensions): New variable to hold extensions path entries.
6374         * jvspec.c: Remove -fextdirs= when compiling main().
6375         * lang.c (java_decode_option): Handle -fextdirs=.
6376         * jcf.h (jcf_path_extdirs_arg): Declare new function.
6377         * Make-lang.in: Compile jcf-path with version info for use in
6378         identifying the appropriate libgcj.jar.
6380 2002-04-08  Tom Tromey  <tromey@redhat.com>
6382         For PR libgcj/5303:
6383         * .cvsignore: Added rmic.1 and rmiregistry.1.
6384         * gcj.texi (Top): Link to new nodes.
6385         (Invoking rmic): New node.
6386         (Invoking rmiregistry): Likewise.
6387         * Make-lang.in (java.generated-manpages): Added rmic.1 and
6388         rmiregistry.1.
6389         (java.maintainer-clean): Likewise.
6390         ($(srcdir)/java/rmic.1): New target.
6391         ($(srcdir)/java/rmiregistry.1): Likewise.
6392         (java.install-man): Handle rmic.1 and rmiregistry.1.
6394 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6396         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
6397         Add note about handling uncaught exceptions. Add an exception handler
6398         to example.
6400 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6402         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
6403         after using it to patch CALL_EXPR.
6405 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6407         * gcj.texi (Invocation): Document CNI invocation API.
6409 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
6411         * expr.c (truthvalue_conversion): Rename.  Update.
6412         (expand_compare): Update.
6413         * java-tree.h (java_truthvalue_conversion): New.
6414         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
6416 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6418         * java-tree.h (java_mark_addressable): New.
6419         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
6420         * typeck.c (mark_addressable): Rename, update.
6422 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6424         * expr.c (build_java_binop): Update.
6425         * java-tree.h (java_signed_type, java_unsigned_type,
6426         java_signed_or_unsigned_type): Update.
6427         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
6428         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
6429         * parse.y (patch_binop): Update.
6430         * typeck.c (signed_or_unsigned_type, unsigned_type,
6431         signed_type): Update.
6433 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
6435         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
6436         (java_dummy_print): Remove.
6437         (lang_print_error): Rename.  Exit early if inhibiting output.
6438         (inhibit_error_printing_function): New.
6439         (java_init): Don't set hook.
6440         (lang_init_source): Use new boolean.
6442 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
6444         * parse.y (do_resolve_class): Fix infinite recursion.
6446 2002-03-29  Tom Tromey  <tromey@redhat.com>
6448         * parse.y (check_inner_circular_reference): Ignore incomplete
6449         types.
6451 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
6453         * Make-lang.in (builtins.o): Update.
6454         * boehm.c (get_boehm_type_descriptor): Update.
6455         * builtins.c: Include langhooks.h.
6456         * decl.c (java_init_decl_processing): Update.
6457         * java-tree.h (java_type_for_mode, java_type_for_size): New.
6458         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
6459         Redefine.
6460         * typeck.c (type_for_mode, type_for_size): Update.
6462 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
6464         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
6466 2002-03-28  Tom Tromey  <tromey@redhat.com>
6468         * except.c (expand_end_java_handler): If the handler type is NULL,
6469         use java.lang.Throwable.  Fixes PR java/5986.
6471 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6473         Fix for PR java/4715:
6474         * jcf-parse.c (parse_source_file_3): New function.
6475         (read_class): Call it.
6476         (java_parse_file): Likewise.
6478 2002-03-28  Jan Hubicka  <jh@suse.cz>
6480         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
6482 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6484         * parse.y (resolve_package): Initialize "decl".
6485         (lookup_package_type): Remove unused function.
6487 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6489         Fix for PR java/5993:
6490         * parse.y (resolve_package): Return the decl if resolution was
6491         successful. Don't special case "java.lang" and "java.lang.reflect"
6492         packages. Set type_name to the merged identifier.
6493         (resolved_qualified_expression_name): Print error using "name" if
6494         resolve_package returns NULL_TREE.
6496 2002-03-27  Tom Tromey  <tromey@redhat.com>
6498         * expr.c (expand_invoke): Don't generate null pointer check if
6499         we're calling <init>.
6501 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
6503         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
6504         fix prototype.
6505         * java-tree.h (java_lang_expand_expr): Similarly.
6506         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
6507         (java_init): Don't set hook.
6509 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6511         Fix for PR java/5850:
6512         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
6513         context if field was not found in the current scope.
6514         * expr.c (lookup_field): Don't look in enclosing contexts.
6516 2002-03-26  Tom Tromey  <tromey@redhat.com>
6518         Fix for PR java/5942:
6519         * parse.y (init_src_parse): Added sanity check.
6520         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
6521         elements, not 11.
6523 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6525         * decl.c (lang_mark_tree): Rename java_mark_tree.
6526         * java-tree.h (java_mark_tree): New.
6527         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
6529 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
6531         * lex.c: Change java_perform_atof to take normal parameters
6532         instead of a pointer to a parameter block.  Call it directly
6533         from java_lex.
6535 2002-03-22  Mark Wielaard  <mark@klomp.org>
6537         Fix for PR java/5368:
6538         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
6539         when printing error message.
6541 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
6543         * decl.c (maybe_build_cleanup): Remove.
6545 2002-03-22  Tom Tromey  <tromey@redhat.com>
6547         Andrew Haley  <aph@cambridge.redhat.com>
6549         * expr.c (build_field_ref): Don't build a check if the field is a
6550         member of `this'.
6552 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
6554         Fix for PR java/6026:
6555         * lex.c (java_lex): Fix parsing of consecutive floats.
6557 2002-03-21  Tom Tromey  <tromey@redhat.com>
6559         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
6560         class.
6562 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
6564         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
6565         insert_block, getdecls, kept_level_p, global_bindings_p): New.
6567 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6569         * gcj.texi: @code{gcj} becomes @command{gcj}.
6570         @code{gcc} becomes @command{gcc}.
6571         GcjRaw changed to gnu.gcc.RawData.
6573 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
6575         * decl.c (start_java_method): Use new hook.
6576         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
6577         (java_init): Remove old hook.
6579 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
6581         * builtins.c (define_builtin): Do nothing if `type' is null.
6582         Fixes PR java/5876.
6584 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6586         * parse.y (parser_check_super_interface): Fix error message
6587         grammar/order.
6589 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6591         * jcf-parse.c (get_constant): Delete unused variables.
6593 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
6595         * java-tree.h (java_parse_file): New.
6596         * jcf-parse.c (yyparse): Rename java_parse_file.
6597         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
6599 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6601         * parse.y (craft_constructor): Return the constructor decl.
6602         (java_expand_classes): Update comments.
6603         (lookup_method_invoke): Call fix_constructors immediately for
6604         anonymous class. Fixes PR java/5935.
6606 2002-03-15  Anthony Green  <green@redhat.com>
6608         * jcf-parse.c (yyparse): Don't emit class registration
6609         constructor when compiling resource files.
6611 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6613         * lang.c (java_tree_code_type, java_tree_code_length,
6614         tree_code_name): Delete.
6615         (tree_code_type, tree_code_length, tree_code_name): Define.
6616         (java_init): Don't try to copy into the various tree_code
6617         arrays.
6619 2002-03-12  Tom Tromey  <tromey@redhat.com>
6621         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
6622         UTF-8, not UCS-2.  Fixes PR java/5923.
6624         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
6625         a call_expr wrapped in a convert.  Fixes PR java/5848.
6627 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6629         * jcf-write.c (write_classfile): Improve error strings.
6631 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
6633         * lex.c: Adjust comments to GNU standards.
6635 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
6637         Fix for PR java/5902:
6638         * lex.c (java_lex): Fix parsing of literals.
6640 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6642         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
6643         to prevent it getting evaluated twice in the store checking case.
6644         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
6645         examining OBJECT.
6647 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6649         * decl.c (java_init_decl_processing): Make sure class_type_node
6650         alignment is not less than 64 bits if hash synchronization is enabled.
6652 2002-03-08  Per Bothner  <per@bothner.com>
6654         * parse.y (java_complete_lhs):  Check if patch_assignment
6655         returned an error-mark.
6657         * parse.y (try_builtin_assignconv):  Don't special-case zero.
6659 2002-03-08  Per Bothner  <per@bothner.com>
6661         Fix for PR java/5812.
6662         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
6663         here instead of in JSR macro.  Likewise with load_type_state call.
6664         Do the latter on if the return_pc has been verified (the jsr returns).
6665         (JSR):  Now just call build_java_jsr.
6667 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
6669         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
6670         (java.install-common): Link native driver to
6671         JAVA_TARGET_INSTALL_NAME.
6673 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
6675         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
6676         * builtins.c(sin_builtin): Likewise
6677         * builtins.c(sqrt_builtin): Likewise
6679 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
6681         * java/expr.c, java/jcf-parse.c, java/lex.c:
6682         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
6683         REAL_ARITHMETIC blocks unconditional.  Delete some further
6684         #ifdef blocks predicated on REAL_ARITHMETIC.
6686 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6688         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
6689         explicit sizeof/sizeof.
6690         * decl.c (java_init_decl_processing): Likewise.
6691         * jcf-parse.c (init_jcf_parse): Likewise.
6692         * parse.y (init_src_parse): Likewise.
6694 2002-03-02  Per Bothner  <per@bothner.com>
6696         Make --CLASSPATH by a synonym for --classpath and -classpath.
6697         Implement --bootclasspath.
6698         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
6699         (classpath_l):  Remove.
6700         (jcf_path_CLASSPATH_arg):  Remove.
6701         (jcf_path_bootclasspath_arg):  New function.
6702         (jcf_path_seal):  Simplify accordingly.
6704         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
6705         (jcf_path_CLASSPATH):  Remove declaration.
6706         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
6707         (lang_specific_driver):  Translate -bootclasspath.
6708         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
6709         * lang.c (decode_lang_options):  Do jcf_path_init first.
6710         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
6711         * gjavah.c:  Also handle --bootclasspath.
6712         Handle --CLASSPATH as a synonum for --classpath.
6713         * jcf-dump.c: Likewise.
6715         "." is not part of system path, but is the default for --classpath.
6716         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
6717         (jcf_path_seal):  Add "." if no CLASSPATH specified.
6719         * gcj.texi:  Document changes.
6721 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6723         * expr.c (build_java_arraystore_check): Fix formatting.
6725 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
6727         Fix for PR java/5758, java/5632:
6728         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
6729         inner-class separator too.
6730         * parse.y (do_resolve_class): New local `decl_result.'
6731         Progressively build a name for what can have been loaded.
6733 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6735         * expr.c (java_array_data_offset): Removed function.
6736         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
6737         (build_java_array_length_access): Obtain "length" value using a
6738         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
6739         (build_java_arrayaccess): Correct comment. Access "data" using a
6740         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
6741         (build_java_arraystore_check): New function.
6742         (expand_java_arraystore): Use build_java_arraystore_check.
6743         * parse.y (patch_assignment): Simplify code to insert a store check
6744         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
6745         * check-init.c (check_init): Update to reflect that an array length
6746         access is now a COMPONENT_REF.
6747         * gcj.texi (Code Generation): Improve documentation of
6748         -fno-bounds-check. Add documentation for -fno-store-check.
6749         * java-tree.h (flag_store_check): Declare.
6750         (build_java_arraystore_check): Declare.
6751         * lang.c (flag_store_check): Initialize to 1.
6752         (lang_f_options): Add store-check option.
6753         * jvspec.c: Don't pass store-check option to jvgenmain.
6754         * lang-options.h: Add help string for -fno-store-check.
6756 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6758         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
6759         * java-tree.h (java_dup_lang_specific_decl): New.
6760         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6762 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6764         * builtins.c, decl.c: Delete traditional-mode-related code
6765         copied from the C front end but not used, or used only to
6766         permit the compiler to link.
6768 2002-02-22  Tom Tromey  <tromey@redhat.com>
6770         Fix for PR java/2369:
6771         * jvspec.c (verify_class_name): New function.
6772         (lang_specific_driver): Call it.
6773         (JAVA_START_CHAR_P): New macro.
6774         (JAVA_PART_CHAR_P): Likewise.
6776 2002-02-22  Per Bothner  <per@bothner.com>
6778         * class.c:  Change vtable to be more compatible with g++ v3 abi.
6779         (get_dispatch_table):  Prepend offset-to-top (always 0) and
6780         type_info pointer (currently unimplemented hence NULL) to vtable.
6781         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
6782         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
6783         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
6784         (build_dtable_decl):  Add declarations for new fields.
6786 2002-02-20  Per Bothner  <per@bothner.com>
6788         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
6789         to finit$ (otherwise generate_bytecode_insns drops it). However, we
6790         don't need to set it on the COMPOUND_EXPR - the caller does that.
6792 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6794         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
6795         `--CLASSPATH' becomes `--classpath.'
6796         * gjavah.c: Likewise.
6797         * jcf-dump.c: Likewise.
6798         * lang-options.h: Likewise.
6799         * lang.c: Likewise.
6800         * jcf-path.c: Updated comment.
6801         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
6802         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
6803         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
6804         (jcf_path_CLASSPATH_arg): Ditto.
6805         (classpath_u): Updated leading comment.
6807 2002-02-20  Per Bothner  <per@bothner.com>
6809         * builtins.c (check_for_builtin):  New function.
6810         (build_call_or_builtin):  Remove.
6811         * java-tree.h:  Update accordingly.
6812         * expr.c (expand_invoke):  Use build + check_for_builtin instead
6813         of build_call_or_builtin.
6814         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
6815         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
6816         flag (which had caused jcf-write to incorrectly emit invokevirtual).
6818 2002-02-17  Tom Tromey  <tromey@redhat.com>
6820         * java-tree.h (TYPE_STRICTFP): New macro.
6821         (struct lang_type) [strictfp]: New field.
6822         (CLASS_STRICTFP): New macro.
6823         (METHOD_STRICTFP): New macro.
6824         (struct lang_decl) [strictfp]: New field.
6825         * parse.y (method_header): Disallow strictfp constructor or
6826         abstract method.
6827         (STRICT_TK): Move before MODIFIER_TK.
6828         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
6829         (METHOD_MODIFIERS): Likewise.
6830         (INTERFACE_MODIFIERS): Likewise.
6831         * jcf-write.c (get_access_flags): Likewise.
6832         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
6833         (add_method_1): Likewise.
6834         (get_access_flags_from_decl): Likewise.
6835         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
6836         recognize strictfp flag.
6837         * jcf.h (ACC_STRICT): New define.
6839 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
6841         * class.c(build_utf8_ref): Move declaration of decl_size
6843 2002-02-07  Tom Tromey  <tromey@redhat.com>
6845         * gcj.texi (Input Options): --CLASSPATH does not suppress system
6846         path.
6848 2002-02-04  Anthony Green  <green@redhat.com>
6850         * class.c (build_utf8_ref): Put UTF-8 constants into merged
6851         sections if available.
6853 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6855         * parse.y (java_expand_classes): Fix typo in static field loop.
6857 2002-02-02  Richard Henderson  <rth@redhat.com>
6859         * class.c (add_field): Mark static fields external.
6860         (build_class_ref): Remove redundant set.
6861         * parse.y (java_expand_classes): Mark static fields of classes
6862         to be compiled as local.
6863         * jcf-parse.c (parse_class_file): Likewise.
6865 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
6867         * gcj.texi (About CNI): New node.
6869 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6871         PR java/5080
6872         * jcf-parse.c : Check for HAVE_LOCALE_H before using
6873         setlocale() with LC_CTYPE as a parameter.
6874         * jv-scan.c: Same.
6876 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
6878         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
6879         Follow GNU Coding Standards for --version.
6881 2002-01-28  Tom Tromey  <tromey@redhat.com>
6883         * expr.c (build_jni_stub): Ensure storage for `meth' is
6884         generated.
6885         * parse.y (java_complete_expand_methods): Set
6886         current_function_decl before building JNI stub.
6888 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
6890         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
6891         BUILT_IN_SQRTF.
6893 2002-01-22  Tom Tromey  <tromey@redhat.com>
6895         * decl.c (java_init_decl_processing): Use add_predefined_file.
6896         Predefine RawData.java.
6897         (predef_filenames): Removed.
6898         (java_init_decl_processing): Don't register predef_filenames.
6899         * jcf-parse.c (add_predefined_file): New function.
6900         (predefined_filename_p): Rewrote.
6901         (predefined_filename_p): No longer static.
6902         * decl.c (java_init_decl_processing): Call initialize_builtins.
6903         * Make-lang.in (JAVA_OBJS): Added builtins.o.
6904         (java/builtins.o): New target.
6905         * builtins.c: New file.
6906         * parse.y (patch_invoke): Use build_call_or_builtin.
6907         * java-tree.h (build_call_or_builtin): Declare.
6908         (initialize_builtins): Declare.
6909         (java_set_exception_lang_code): Removed unused declaration.
6910         (PREDEF_FILENAMES_SIZE): Removed.
6911         (java_tree_index): Added JTI_PREDEF_FILENAMES.
6912         (predef_filenames): New define.
6913         (add_predefined_file): Declare.
6914         (predefined_filename_p): Declare.
6915         * expr.c (expand_invoke): Use build_call_or_builtin.
6917 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6919         * parse.y (patch_switch_statement): Fix format specifier.
6921 2002-01-16  Tom Tromey  <tromey@redhat.com>
6923         More for PR java/5365:
6924         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
6925         default.
6926         (process_file): Generate include for
6927         java.lang.UnsupportedOperationExceptions.
6929 2002-01-15  Andreas Jaeger  <aj@suse.de>
6931         * .cvsignore: Add man pages.
6933 2002-01-15  Tom Tromey  <tromey@redhat.com>
6935         Fix for PR java/5365:
6936         * gjavah.c (process_file): Turn class name into a file name.
6938 2002-01-14  Matthias Klose  <doko@debian.org>
6940         * gcj.texi: Fix whitespace and formatting errors in the
6941         synopsis of the man pages. Update copyright.
6943 2002-01-14  Tom Tromey  <tromey@redhat.com>
6945         For PR libgcj/5303:
6946         * Make-lang.in (java.install-man): Handle jv-convert man page.
6947         (java.generated-manpages): Added jv-convert.1.
6948         (java.uninstall): Remove jv-convert.1.
6949         (java.maintainer-clean): Likewise.
6950         ($(srcdir)/java/jv-convert.1): New target.
6951         * gcj.texi (Top): Link to jv-convert node.
6952         (Individual utilities): Likewise.
6953         (Invoking jv-convert): New node.
6955 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
6956             Martin Kahlert  <martin.kahlert@infineon.com>
6958         * jcf-parse.c (get_constant): Don't swap lo/hi for big
6959         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
6961 2002-01-03  Graham Stott  <grahams@redhat.com>
6963         * class.c (compile_resource_file): Update copyright date.
6964         Constify filename parameter.
6965         (java-tree.h): Update copyright date.
6966         (compile_resource_file): Constify filename parameter.
6968 2002-01-03  Graham Stott  <grahams@redhat.com>
6970         * gcc/jcf-parse.c: Update copyright date.
6971         (yyparse): Constify resource_filename.
6973 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6975         * parse.y (src_parse_roots): Don't needlessly zero init.
6977 2001-12-31  Tom Tromey  <tromey@redhat.com>
6979         * parse.y (dump_java_tree): New function.
6980         (source_end_java_method): Call it.
6981         (end_class_declaration): Likewise.
6982         * lang.c (java_decode_option): Call dump_switch_p.
6984 2001-12-28  Tom Tromey  <tromey@redhat.com>
6986         * gen-table.pl: Don't process characters after \uffff.  Added
6987         comment pointing to input file.
6989 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6991         * gen-table.pl: Const-ify output.  Document the location of a
6992         suitable unicode input file.
6994         * chartables.h: Regenerate.
6996 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6998         * chartables.h: Const-ify.
6999         * gjavah.c (options): Likewise.
7000         * jcf-dump.c (options): Likewise.
7001         * jv-scan.c (options): Likewise.
7002         * lex.c (java_start_char_p, java_part_char_p): Likewise.
7003         * parse.y (binop_lookup): Likewise.
7005 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7007         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
7008         the static arrays that are output.
7009         * jvspec.c (jvgenmain_spec): Make static.
7010         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
7011         * keyword.h: Regenerate.
7012         * lang.c (string_option, process_option_with_no, lang_f_options,
7013         lang_W_options): Const-ify.
7014         * lex.c (java_lex): Likewise.
7016 2001-12-21  Richard Henderson  <rth@redhat.com>
7018         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
7019         (get_boehm_type_descriptor): ... here.  Arrange for the
7020         TREE_TYPE to get set properly.
7022 2001-12-21  Richard Henderson  <rth@redhat.com>
7024         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
7025         only if the target requires collect2.
7027         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
7029 2001-12-20  Tom Tromey  <tromey@redhat.com>
7031         For PR java/4509:
7032         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
7033         CAN_COMPLETE_NORMALLY for the node.
7034         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
7035         generate code for second branch if first branch can't complete
7036         normally.
7037         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
7038         the loop head if the loop body can't complete normally.
7040 2001-12-20  Tom Tromey  <tromey@redhat.com>
7042         For PR java/4766:
7043         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
7044         case where `finally' clause can't complete normally.
7046 2001-12-20  Tom Tromey  <tromey@redhat.com>
7048         Fixes PR java/5057:
7049         * parse.y (analyze_clinit_body): Added this_class parameter.
7050         Check for more cases where we must keep <clinit>.
7051         (maybe_yank_clinit): Cleaned up flow control.
7053 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7055         * decl.c (java_init_decl_processing): Don't initialize
7056         finit_leg_identifier_node.
7057         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
7058         (finit_leg_identifier_node): Remove.
7059         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
7061 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7063         * mangle.c (mangle_member_name): Don't special-case for
7064         NO_DOLLAR_IN_LABEL.
7065         * mangle_name.c (unicode_mangling_length): Likewise.
7066         (append_unicode_mangled_name): Likewise.
7067         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
7068         code.
7070 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7072         * expr.c (build_java_array_length_access): Don't force null pointer
7073         check unless flag_check_references is set.
7075 2001-12-20  Tom Tromey  <tromey@redhat.com>
7077         Fix for PR java/3417:
7078         * parse.y (patch_assignment): Added special processing for
7079         `return'.
7080         (patch_return): Don't convert booleans to integers, and don't
7081         special-case `null'.
7083 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
7085         * config-lang.in (diff_excludes): Remove.
7087 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7089         * gcj.texi: Update link to GCC manual.
7091 2001-12-17  Tom Tromey  <tromey@redhat.com>
7093         * parse.y (link_nested_class_to_enclosing): Removed useless
7094         statement.
7096 2001-12-16  Tom Tromey  <tromey@redhat.com>
7098         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
7099         Fixes PR java/5088.
7101 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
7103         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
7104         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
7105         spelling errors.
7107 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7109         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
7111 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7113         * decl.c (java_init_decl_processing): Build otable_type correctly.
7114         otable_decl is an otable_type.
7116 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7118         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
7119         otable_type, otable_ptr_type, method_symbol_type,
7120         method_symbols_array_type, method_symbols_array_ptr_type): New
7121         field/global tree definitions.
7122         (flag_indirect_dispatch): New flag.
7123         * decl.c (java_init_decl_processing): Initialize new otable and
7124         otable_syms type nodes and decls. Add new field "index" to
7125         method_type_node.
7126         * class.c (build_method_symbols_entry): New function.
7127         (make_method_value): Set "index" to to method's vtable index for
7128         virtual methods when indirect-dispatch is not used.
7129         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
7130         and set vtable_method_count to -1. Set otable and otable_syms field
7131         if indirect-dispatch is used and there was something to put in them.
7132         (build_method_symbols_entry): New function.
7133         (emit_offset_symbol_table): New function.
7134         * expr.c (get_offset_table_index): New function.
7135         (build_invokevirtual): Build array reference to otable at the index
7136         returned by get_offset_table_index, and use the result as the vtable
7137         offset.
7138         (build_invokeinterface): Similar.
7139         * jcf-parse.c (yyparse): If indirect-dispatch, call
7140         emit_offset_symbol_table at the end of compilation, after all classes
7141         have been generated.
7142         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
7143         * lang.c (flag_indirect_dispatch): Define.
7144         (lang_f_options): Add indirect-dispatch flag.
7146 2001-12-14  Matthias Klose  <doko@debian.org>
7148         * gcj.texi: Markup for man page generation. Document missing
7149         options printed by <tool> --help.
7150         Terminate description of gij's -ms option with a dot.
7151         * Make-lang.in ($(srcdir)/java/*.1): New targets.
7152         (java.generated-manpages java.install-man, java.uninstall,
7153         java-maintainer-clean) Updated.
7155 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
7157         * class.c (get_dispatch_table): Fix java vtable layout
7158         for TARGET_VTABLE_USES_DESCRIPTORS.
7159         * decl.c (java_init_decl_processing): Initialize
7160         alloc_no_finalizer_node, finalize_identifier_node.
7161         * expr.c (class_has_finalize_method): New function.
7162         (expand_java_NEW): Generate calls for finalizer-free allocation.
7163         (build_invokevirtual): Fix java vtable layout for
7164         TARGET_VTABLE_USES_DESCRIPTORS.
7165         * java-tree.h (enum java_tree_index): New entries:
7166         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
7167         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
7168         (class_has_finalize_method): declare.
7169         (HAS_FINALIZER_P): New macro.
7170         * parse.y (patch_invoke): Generate calls for finalizer-free
7171         allocation.
7173 2001-12-12  Matthias Klose  <doko@debian.org>
7175         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
7176         whitespace at end of line.
7178 2001-12-11  Tom Tromey  <tromey@redhat.com>
7180         * lex.c (java_init_lex): Define wfl_to_string as
7181         gnu.gcj.runtime.StringBuffer unless generating bytecode.
7183 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
7185         * class.c (make_method_value): Use null_pointer_node to
7186         represent empty exception table.
7188 2001-12-10  Tom Tromey  <tromey@redhat.com>
7190         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
7192 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
7194         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
7196 2001-12-09  Per Bothner  <per@bothner.com>
7198         * check-init.c (current_switch_has_default):  New static field.
7199         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
7200         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
7201         DEFAULT_EXPR seen, simulate a default alternative that copies state.
7203 2001-12-09  Tom Tromey  <tromey@redhat.com>
7205         * check-init.c (check_init): Don't allow pre- or post- increment
7206         or decrement of final variable.
7207         (final_assign_error): Minor error message rewording.
7209 2001-12-08  Tom Tromey  <tromey@redhat.com>
7211         * java-tree.h: Fixed typo.
7213         * gjavah.c (decompile_method): Don't decompile to `return this'
7214         for static methods.
7216         * gjavah.c (cxx_keywords): Re-sorted.
7217         * lex.c (cxx_keywords): Re-sorted.
7219         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
7220         else.
7222         * gjavah.c (print_namelet): Clear subnamelets.
7223         (HANDLE_METHOD): Set `method_printed' earlier.
7225 2001-12-07  Tom Tromey  <tromey@redhat.com>
7227         * lang.c (lang_f_options): Added
7228         optimize-static-class-initialization.
7229         (java_decode_option): Removed special case.
7231 2001-12-07  Per Bothner  <per@bothner.com>
7233         * check-init.c (check_init):  Fix typo freeing memory twice.
7235 2001-12-05  Per Bothner  <per@bothner.com>
7237         Restore support for static class initialization optimization.
7238         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
7239         * check-init.c (check_int):  At end of BLOCK handle initialization
7240         blocks, which used to be done in java_complete_expand_method but did
7241         not handle the case where check_for_initialization might allocate
7242         more than a word of bits.
7243         * decl.c (lang_make_tree):  The smic field is now a tree.
7244         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
7245         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
7247         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
7249         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
7250         Change from a hash table to a list.
7251         (struct_lang_decl):  Change field 'smic' to match.
7252         * class.c (add_method_1):  Initialize
7253         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
7254         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
7255         (java_expand_method_bodies): -here, since 'smic' is now a list.
7256         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
7258         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
7260         * class.c (java_hash_compare_tree_node):  Fix casts.
7262 2001-12-04  Per Bothner  <per@bothner.com>
7264         * check-init.c:   Handle definite unassignment to finals in addition
7265         to definite assignment.
7266         (loop_current_locals):  New field.
7267         (num_current_locals, int start_current_locals, num_current_words):
7268         Make static.
7269         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
7270         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
7271         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
7272         (get_variable_decl, check_final_reassigned):  New functions.
7273         (check_init, check_bool_init):  Modify as needed for checking finals.
7274         (check_for_initialization):  Take extra parameter and return void.
7275         Do extra start-up logic to check final fields for assignment.
7276         * parse.y (check_static_final_variable_assignment_flag,
7277         reset_static_final_variable_assignment_flag, check_final_assignment,
7278         check_final_variable_local_assignment_flag,
7279         reset_final_variable_indirect_assignment_flag,
7280         reset_final_variable_global_assignment_flag):  Remove functions.
7281         (java_complete_expand_methods, outer_field_access_fix,
7282         patch_assignment): Remove no-longer used logic.
7283         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
7284         * parse.y (register_fields, java_complete_tree):  Update accordingly.
7286         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
7287         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
7288         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
7290         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
7292         * java-tree.h (DECL FINAL):  New bit-field.
7293         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
7294         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
7295         (DECL_INIT_CALLS_THIS):  New macro.
7296         (struct lang_decl):  New bit-field init_calls_this.
7297         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
7298         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
7299         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
7300         use it for both local variables and final fields.
7301         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
7302         and local_final.
7303         (struct lang_type):  Remove hfv bit-field.
7304         (check_for_initialization):  Change to return void.
7306         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
7307         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
7308         * check-init.c (final_assign_error):  New helper function.
7309         (check_final_reassigned, check_init):  Use it.
7310         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
7312         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
7313         bit-fields to unsigned.
7315 2001-12-03  Per Bothner  <per@bothner.com>
7317         * parse.y (patch_binop):  Minor constant folding.
7319         * parse.y (build_current_thisn):  Shorter 'buffer'.
7321 2001-12-03  Per Bothner  <per@bothner.com>
7323         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
7324         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
7325         * jcf-write.c (generate_bytecode_insns):  Remove support for
7326         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
7327         * check-init.c (check_init):  Likewise.
7329 2001-12-03  Per Bothner  <per@bothner.com>
7331         * verify.c (subroutine_nesting):  New function.
7332         (verify_jvm_instructions):  Use it to fix logic for checking that
7333         we're done with the current subroutine.
7335         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
7336         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
7338 2001-12-03  Per Bothner  <per@bothner.com>
7340         * jcf.h:  Fix obvious typo in comment.
7341         * typeck.c (build_null_signature):  Add comment.
7343 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7345         * expr.c: Remove leading capital from diagnostic messages, as
7346         per GNU coding standards.
7347         * jcf-io.c: Similarly.
7348         * jcf-parse.c: Similarly.
7349         * jv-scan.c: Similarly.
7350         * jvspec.c: Similarly.
7351         * mangle.c: Similarly.
7353 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
7354             Alexandre Petit-Bianco  <apbianco@redhat.com>
7356         * expr.c (build_java_arrayaccess): Call save_expr on array for
7357         correct evaluation order, modified comment, fixed indentation.
7358         * parse.y: (patch_assignment): Correctly extract the array base
7359         from the tree generate by build_java_arrayaccess, added comments.
7360         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
7361         Fixes PR java/3096, PR java/3803, PR java/3965.
7363 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7365         * expr.c (expand_byte_code): Remove trailing periods from messages.
7366         * jcf-parse.c (load_class, jcf_parse): Similarly.
7367         * jcf-write.c (generate_classfile): Similarly.
7368         * lex.c (java_lex): Similarly.
7370 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7372         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
7374 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7376         * Make-lang.in (java.generated-manpages): New dummy target.
7378 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7380         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7381         ASM_FINAL_SPEC.
7382         (lang_specific_pre_link): Use set_input to set input_filename.
7383         Append `main' here.
7384         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7385         (main): Fix definition.
7386         Strip `main' from classname.
7387         Fixes PR java/227.
7389 2001-11-18  Roger Sayle <roger@eyesopen.com>
7391         * parse.h (java_expand_switch): Remove old prototype.
7393 2001-11-18  Tom Tromey  <tromey@redhat.com>
7395         Fix for PR java/1401:
7396         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
7397         arg0 is null.
7398         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
7399         correctly.
7401 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7403         * lang.c (finish_parse): Rename to java_finish.
7404         (LANG_HOOKS_FINISH, java_finish): New.
7406 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7408         * decl.c (init_decl_processing): Rename java_init_decl_processing.
7409         * java-tree.h: New prototype.
7410         * lang.c (java_init): Update prototype.  Combine with old init_parse.
7412 2001-11-13  Tom Tromey  <tromey@redhat.com>
7414         * gjavah.c (method_signature): New global.
7415         (HANDLE_METHOD): Set it.
7416         (decompile_return_statement): New function.
7417         (decompile_method): Use it.
7418         (print_method_info): Removed `synth' argument.
7420 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7422         * java-tree.h (java_set_yydebug): New.
7423         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
7424         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
7425         (print_lang_decl, print_lang_type, print_lang_identifier,
7426         print_lang_statistics, lang_print_xnode): Remove.
7428 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7430         * jcf-parse.c (init_lex): Remove.
7431         * lang.c (language_string, lang_identify): Remove.
7432         (struct lang_hooks): Constify.
7433         (LANG_HOOKS_NAME): Override.
7434         (init_parse): Update.
7436 2001-11-08  Andreas Franck  <afranck@gmx.de>
7438         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
7439         program_transform_name the way suggested by autoconf.
7440         (java.install-common): Also transform auxiliary program names with
7441         program_transform_name.
7443 2001-11-08  Tom Tromey  <tromey@cygnus.com>
7445         * parse.y (trap_overflow_corner_case): New rule.
7446         (unary_expression): Use it.
7447         * lex.c (java_init_lex): Don't set minus_seen.
7448         (yylex): Don't use minus_seen.  Communicate overflow to parser for
7449         it to handle.
7450         (error_if_numeric_overflow): New function.
7451         * parse.h (minus_seen): Removed field.
7452         (JAVA_RADIX10_FLAG): New define.
7454 2001-11-07  Tom Tromey  <tromey@redhat.com>
7456         Patch for PR java/1414:
7457         * parse.y (case_label_list): New global.
7458         (goal): Register case_label_list with GC.
7459         (java_complete_lhs): Save new case on case_label_list.
7460         (patch_switch_statement): Check for duplicate case labels.
7462 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
7464         * parse.y (patch_assignment): Removed unused third argument.
7465         (java_complete_lhs): Removed unused third argument to patch_assignment.
7467 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7469         * lang.c: Include langhooks-def.h.
7470         * Make-lang.in: Update.
7472 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7474         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7476 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7478         * mangle.c (find_compression_record_match): Don't match compression
7479         records for package name elements unless they occur at the start of
7480         the name. Fix for PR java/4717.
7482 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7484         * expr.c (expand_java_field_op): Don't special-case references to
7485         java.lang.PRIMTYPE.TYPE.
7486         (build_primtype_type_ref): Removed.
7487         * java-tree.h (build_primtype_type_ref): Remove prototype.
7488         * parse.y (maybe_build_primttype_type_ref): Removed.
7489         (complete_function_arguments): Don't special-case references to
7490         java.lang.PRIMTYPE.TYPE.
7491         (patch_assignment): Likewise.
7492         (array_constructor_check_entry): Likewise.
7494 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
7496         * mangle.c (static tree compression_table): Fixed leading comment.
7497         * parse.h (struct parser_ctxt): Fixed field comment.
7498         * parse.y (check_pkg_class_access): New prototype, fixed leading
7499         comment, new parameter used to emit error only if passed as true.
7500         (parse_check_super): Pass extra argument to check_pkg_class_access.
7501         (do_resolve_class): Likewise.
7502         (process_imports): Likewise.
7503         (read_import_dir): Fixed indentation.
7504         (find_in_imports_on_demand): New local class_type_name. Local
7505         node_to_use deleted. while loop changed into for loop. Report
7506         multiple definition only for accessible classes. Improved error
7507         message.
7508         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
7509         assigned to parameter list, fixed indentation. while loop changed
7510         into for loop, restore TREE_CHAIN on local `tem' before the next
7511         iteration.
7513 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7515         * lang.c (lang_get_alias_set): Deleted.
7517 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7519         * gjavah.c (jni_print_char): Fix thinko in last change.
7521         * gjavah.c (jni_print_char, decode_signature_piece): Use
7522         safe-ctype macros and/or fold extra calls into fewer ones.
7523         * lex.c (java_read_unicode, java_lex): Likewise.
7524         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
7525         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
7526         * mangle_name.c (append_unicode_mangled_name,
7527         unicode_mangling_length): Likewise.
7529 2001-10-17  Richard Henderson  <rth@redhat.com>
7531         * Make-lang.in (java/lang.o): Depend on langhooks.h.
7533 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
7535         * lang.c (langhooks.h): Included.
7536         (LANG_HOOKS_INIT): Redefined.
7537         (LANG_HOOKS_INIT_OPTIONS): Likewise.
7538         (LANG_HOOKS_DECODE_OPTION): Likewise.
7539         (struct lang_hooks lang_hooks): New initialization.
7541 2001-10-11  Per Bothner  <per@bothner.com>
7543         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
7544         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
7545         The former is simpler, and jcf-write.c handles it better.
7546         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
7547         or WITH_CLEANUP_EXPR.
7548         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
7549         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
7551         * parse.y (patch_if_else_statement):  If the condition is constant,
7552         optimize away the test.
7554 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7556         * parse.y (patch_cast): Call patch_string on the first operand of
7557         the incoming node, update it if necessary. Fixes PR java/4510.
7559 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7561         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
7562         when name qualifier matches a package name.
7564 2001-10-08  Tom Tromey  <tromey@redhat.com>
7566         Fix for PR java/4489:
7567         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
7568         force a new label when computing `body_block'.
7570 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7572         * jcf-io.c (format_uint): Const-ify.
7573         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
7574         * lex.c (java_get_line_col): Likewise.
7575         * parse.y (build_incdec): Likewise.
7577 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
7579         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
7580         a NULL enclosing context if appropriate. Fixes PR java/4466.
7582 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
7584         * parse.y (patch_assignment): Use lvalue's original TYPE when
7585         building the final COMPOUND_EXPR.
7586         (try_reference_assignconv): Fixed leading comment.
7588 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
7590         * parse.y (check_final_variable_indirect_assignment): For
7591         COMPOUND_EXPR, return only if finals were found initialized
7592         properly, if not, keep on checking.
7593         (check_final_variable_global_assignment_flag): New local
7594         error_found, set when appropriate and used to decide whether to
7595         report uninitialized finals. Fixed typo in comment.
7597 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7599         * decl.c (init_decl_processing): Fixed typo in predef_filenames
7600         last three initializations. Fixes PR java/4360.
7602 2001-09-21  Richard Henderson  <rth@redhat.com>
7604         * class.c (get_dispatch_table): Handle function descriptors.
7605         (build_dtable_decl): Likewise.
7606         * expr.c (build_invokevirtual): Likewise.
7608 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
7610         * parse.y (patch_method_invocation): Build class initialization
7611         when static finals are used to qualify method invocation.
7612         Fixes PR java/4366.
7614 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
7616         * parse.h: (WFL_STRIP_BRACKET): Re-written using
7617         build_type_name_from_array_name.
7618         (STRING_STRIP_BRACKETS): New macro.
7619         * parse.y (build_type_name_from_array_name): New function.
7620         (array_creation_expression:): Accumulate []s instead of [s.
7621         (cast_expression:): Accumulate []s instead of [s after cast type
7622         name.
7623         (build_array_from_name): Local string deleted, use
7624         build_type_name_from_array_name.
7625         (build_unresolved_array_type): Accumulate []s instead of [s after
7626         type name.
7627         (register_fields): Fixed comment.
7628         (resolve_class): Local name, base deleted, new locals tname and
7629         array_dims. Use build_type_name_from_array_name. Use array_dims to
7630         build array type.
7631         (purify_type_name): Use STRING_STRIP_BRACKETS.
7633 2001-09-18  Andreas Jaeger  <aj@suse.de>
7635         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
7636         * jv-scan.c: Likewise.
7638 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
7640         * parse.y (patch_method_invocation): Inner class creation context
7641         check not enforced within constructors. Fixes PR java/1873.
7643 2001-09-16  Tom Tromey  <tromey@redhat.com>
7645         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
7646         NOTE_PUSH for single-case push.  Fixes PR java/4189.
7648 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
7650         * java-tree.h (TYPE_IMPORT_LIST): New macro.
7651         (TYPE_IMPORT_DEMAND_LIST): Likewise.
7652         (struct lang_type): New fields import_list and import_demand_list.
7653         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
7654         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
7655         (do_resolve_class): New local saved_enclosing_type, initialized,
7656         passed as parameter to find_in_imports and find_in_imports_on_demand.
7657         (find_in_imports): Added paramater enclosing_type, use its
7658         TYPE_IMPORT_LIST when applicable.
7659         (find_in_imports_on_demand): Added parameter enclosing_type, use
7660         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
7661         declaration and initialization.
7662         (fold_constant_for_init): Switch/restore current_class to the
7663         appropriate context.
7665 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
7667         * verify.c (verify_jvm_instructions): Fix typo.
7669 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7671         * expr.c (expand_invoke): Const-ification.
7672         * parse.y (patch_method_invocation): Likewise.
7674 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7676         * gjavah.c (cxx_keywords): Const-ification.
7677         * keyword.gperf (java_keyword): Likewise.
7678         * lang.c (java_tree_code_name): Likewise.
7679         * lex.c (cxx_keywords): Likewise.
7680         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
7682 2001-09-11  Richard Henderson  <rth@redhat.com>
7684         * parse.h (ctxp_for_generation): Mark extern.
7686 2001-09-10  Richard Henderson  <rth@redhat.com>
7688         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
7690 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
7692         * typeck.c (java_array_type_length, build_prim_array_type):
7693         Represent empty arrays by NULL index.
7695 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
7697         * java-tree.h (compile_resource_file): Grouped with other prototypes.
7698         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
7700 2001-09-06  Anthony Green  <green@redhat.com>
7702         * class.c (O_BINARY): Define if necessary.
7703         (registerResource_libfunc): Declare.
7704         (init_class_processing): Initilize registerResource_libfunc.
7705         (compile_resource_file): New function.
7706         * java-tree.h (resource_name): Declare.
7707         (compile_resource_file): Declare.
7708         * jcf-parse.c (yyparse): Handle compiling java resource files.
7709         * lang.c (java_decode_option): Handle -fcompile-resource option.
7710         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
7711         resource files.
7712         * gcj.texi (Code Generation): Add documentation for -R flag.
7714 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
7716         * jcf-write.c (generate_classfile): Issue an error in case of
7717         field/initial value mismatch.
7718         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
7719         being initialized and we're generating bytecode.
7720         (java_complete_lhs): In MODIFY_EXPR section: added comments,
7721         set DECL_INITIAL properly when appropriate.
7722         Fixes PR java/4230
7723         Fixes PR java/4204
7725 2001-09-01  Per Bothner  <per@bothner.com>
7727         * parse.y (maybe_yank_clinit):  A field without an initializer is not
7728         relevant.  All initializers except static final and constant require
7729         <clinit>, regardless of flag_emit_class_files.
7731 2001-08-31  Per Bothner  <per@bothner.com>
7733         * class.c (set_constant_value):  When not emitting class files, then a
7734         String ConstantValue is a utf8const_ptr_type.
7736 2001-08-30  Per Bothner  <per@bothner.com>
7738         * jcf-write.c (generate_classfile):  Check that field is primitive
7739         or string before emitting ConstantValue attribute.
7741 2001-08-30  Per Bothner  <per@bothner.com>
7743         * parse.y (resolve_qualified_expression_name):  If creating a
7744         COMPOUND_EXPR, set it's type correctly.
7746 2001-08-30  Per Bothner  <per@bothner.com>
7748         * jcf-io.c (open_class):  Set filename field.
7750         * jcf-parse,c (parse_class_file):  Set current_function_decl
7751         for better error message when Code attribute is missing.
7753         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
7754         better diagnostics, especially for constructors.
7756 2001-08-30  Per Bothner  <per@bothner.com>
7758         * jcf-write.c (generate_classfile):  Don't write ConstantValue
7759         attribute if field is not final, for compatibility with jdk.
7761         * jcf-write.c (generate_classfile):  Convert ConstantValue values
7762         to correct type.  Work-around for front-end bug.
7763         * class.c (set_constant_value):  Error if constant has wrong type.
7765 2001-08-30  Per Bothner  <per@bothner.com>
7767         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
7768         "Double" are printed at verbosity 1.
7770         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
7772         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
7774 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
7776         * parse.y (patch_assignment): Don't verify final re-assignment here.
7777         (java_complete_lhs): Verify assignments to finals calling
7778         patch_assignment. Verify re-assignments to finals before calling
7779         patch_assignment.
7781 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
7783         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
7784         Fixes PR java/1413
7786 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7788         * lex.c (java_lex): new local found_hex_digits. Set and then used
7789         in test to reject invalid hexadecimal numbers.
7790         * parse.y (java_complete_tree): Prevent unwanted cast with
7791         initialized floating point finals.
7792         (patch_binop): Emit a warning when detecting a division by zero,
7793         mark result not constant, don't simplify non integer division.
7795 2001-08-28  Per Bothner  <per@bothner.com>
7797         * jcf-write.c  (generate_bytecode_insns):  For increments and
7798         decrements just recurse to push constant.  Improvement on Mark's patch.
7800 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
7802         * jcf-write.c (generate_bytecode_insns): Generate an integer to
7803         real conversion for increments and decrements of reals.
7805 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
7807         * parse.y (resolve_qualified_expression_name): Handle unresolved
7808         qualified expressions, prevent numerical qualifiers, fixed typo.
7809         Fixes PR java/4141
7811 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
7813         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
7814         don't report anything but deprecated class when marked so. Handle
7815         VAR_DECL.
7816         (patch_method_invocation): Check deprecation on methods and types.
7817         (patch_binop): code becomes an enum tree_code, added default: to
7818         switch to handle that. Detect division by zero, try to fold and
7819         return before using a subroutine.
7821 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
7823         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
7824         file smaller than 4 bytes.
7825         * parse.y (check_inner_circular_reference): New function.
7826         (check_circular_reference): Likewise.
7827         (array_initializer:): Accept {,}.
7828         (java_check_circular_reference): Rewritten using
7829         check_circular_reference and check_inner_circular_reference.
7830         (java_complete_expand_method): Unconditionally save and restore
7831         the unpurged exception list.
7832         (build_dot_class_method_invocation): Unmangle signature parameter.
7834 2001-08-21  Tom Tromey  <tromey@redhat.com>
7836         * decl.c (init_decl_processing): Add `throws' field to method
7837         descriptor.
7838         * class.c (make_method_value): Compute `throws' field for method.
7840 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7842         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
7843         circularity is detected.
7844         (ctors_unchecked_throws_clause_p): Fixed leading comment.
7846 2001-08-17  Richard Henderson  <rth@redhat.com>
7848         * class.c (emit_register_classes): Add align parameter to
7849         call to assemble_integer.
7851 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
7853         * jcf-parse.c (load_class): New locals saved and class_loaded. If
7854         loading a class_or_name fails, try considering an innerclass name
7855         and load the enclosing context.
7856         * parse.y (resolve_inner_class): New function.
7857         (find_as_inner_class): Added leading comment.
7858         (register_incomplete_type): Keep the current context as enclosing
7859         context for JDEP_FIELD dependencies.
7860         (do_resolve_class): Locals new_class_decl and super initialized to
7861         NULL. Call resolve_inner_class, explore the enclosing context
7862         superclass if necessary.
7863         Fixes PR java/4007
7865 2001-08-16  Tom Tromey  <tromey@redhat.com>
7867         * jcf-dump.c (main): Updated for change to jcf_path_seal.
7868         * gjavah.c (main): Updated for change to jcf_path_seal.
7869         * lang.c (version_flag): New global.
7870         (java_decode_option): Recognize `-version'.
7871         (java_init): Update for change to jcf_path_seal.
7872         * jcf.h (jcf_path_seal): Added `print' argument.
7873         * jcf-path.c (jcf_path_seal): Added `print' argument.
7875 2001-08-13  Zack Weinberg  <zackw@panix.com>
7877         * Make-lang.in (java/decl.o): Update dependencies.
7878         * decl.c: Include libfuncs.h, don't include toplev.h.
7880 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
7882         * decl.c (init_decl_processing): exception_type_node,
7883         class_not_found_type_node, and no_class_def_found_type_node
7884         initialized. predef_filenames augmented accordingly.
7885         instinit_identifier_node initialized.
7886         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
7887         * java-tree.h (enum java_tree_index): New entries
7888         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
7889         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
7890         (exception_type_node): New macro.
7891         (class_not_found_type_node): Likewise.
7892         (no_class_def_found_type_node): Likewise.
7893         (instinit_identifier_node): Likewise.
7894         (PREDEF_FILENAMES_SIZE): Adjusted.
7895         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
7896         (struct lang_type): Fixed typo in bitfield name.
7897         (DECL_INSTINIT_P): New macro.
7898         (ID_INSTINIT_P): Likewise.
7899         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
7900         attribute.
7901         * parse.y (encapsulate_with_try_catch): New function.
7902         (generate_instinit): Likewise.
7903         (build_instinit_invocation): Likewise.
7904         (ctors_unchecked_throws_clause_p): Likewise.
7905         (add_instance_initializer): Deleted.
7906         (build_instance_initializer): Likewise.
7907         (in_instance_initializer): Likewise.
7908         (check_method_redefinition): instinit$ not to be verified.
7909         (java_complete_expand_methods): Generate instinit$, simplified code.
7910         (build_dot_class_method): Eliminated unnecessary locals. Use
7911         encapsulate_with_try_catch, removed unnecessary code.
7912         (fix_constructors): New local iii. Use build_instinit_invocation.
7913         (patch_method_invocation): Added comment.
7914         (maybe_use_access_method): Don't consider instinit$.
7915         (find_applicable_accessible_methods_list): Shorten the search for
7916         instinit$ too.
7917         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
7918         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
7919         (patch_throw_statement): Likewise. Fixed typo.
7921 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
7923         Revert:
7924         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7925         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
7926         ASM_FINAL_SPEC.
7927         (lang_specific_pre_link): Use set_input to set input_filename.
7928         Append `main' here.
7929         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
7930         (main): Fix definition.
7931         Strip `main' from classname.
7932         Fixes PR java/227.
7934 2001-08-11  Zack Weinberg  <zackw@panix.com>
7936         * lex.h: Don't include setjmp.h.  Don't define
7937         SET_FLOAT_HANDLER or prototype set_float_handler.
7939 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
7941         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
7942         `poplevel' in the right order.
7944 2001-08-09  Richard Henderson  <rth@redhat.com>
7946         * Make-lang.in (class.o): Depend on TARGET_H.
7947         * class.c (emit_register_classes): Use target hooks instead of
7948         assemble_constructor and assemble_destructor.
7950 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
7952         * check-init.c (flags.h): Include
7953         (check_init): Don't report uninitialized static class
7954         initialization flags, don't free bit index when doing static class
7955         initialization optimization.
7956         (check_for_initialization): Return type changed to `unsigned int.'
7957         (attach_initialized_static_class): New function.
7958         * class.c (add_method_1): Create the initialized static class
7959         table if necessary.
7960         (finish_class): Always emit deferred inline methods.
7961         * decl.c (emit_init_test_initialization): Moved to expr.c
7962         (complete_start_java_method): Don't traverse
7963         DECL_FUNCTION_INIT_TEST_TABLE.
7964         (lang_mark_tree): Mark hash tables in function decls.
7965         * expr.c (emit_init_test_initialization): Moved from decl.c.
7966         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
7967         initialization flag, set DECL_CONTEXT and
7968         LOCAL_CLASS_INITIALIZATION_FLAG.
7969         (java_lang_expand_expr): Emit initialization code for static class
7970         initialized flags when entering block, if necessary.
7971         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
7972         * java-tree.h (flag_optimize_sci): New global variable declaration.
7973         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
7974         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
7975         (LOCAL_FINAL_P): Fixed typo in comment.
7976         (FINAL_VARIABLE_P): Likewise.
7977         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
7978         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
7979         (struct lang_decl): New fields `ict', `smic' and `cif.'
7980         (check_for_initialization): New returned value for global.
7981         (attach_initialized_static_class): New global function.
7982         (STATIC_CLASS_INIT_OPT_P): New macro.
7983         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
7984         * lang.c (java_decode_option): Handle
7985         `-fno-optimize-static-class-initialization'
7986         * parse.y (start_complete_expand_method): New function.
7987         (java_expand_method_bodies): Likewise.
7988         (attach_init_test_initialization_flags): Likewise.
7989         (adjust_init_test_initialization): Likewise.
7990         (emit_test_initialization): Likewise.
7991         (java_complete_expand_methods): Nullify abstract and native method
7992         bodies.
7993         (java_complete_expand_method): New locals `fbody', `block_body'
7994         and `exception_copy.' Reorganized: directly return on empty method
7995         bodies, call `start_complete_expand_method', remember definitely
7996         initialized static class in function, don't expand method bodies.
7997         (java_expand_classes): Call `java_expand_method_bodies' before
7998         `finish_class' when compiling to native.
7999         (resolve_expression_name): Use `orig' after building outer class
8000         field access.
8001         (patch_invoke): Remember static method invocations.
8003 2001-08-06  Richard Henderson  <rth@redhat.com>
8005         * class.c (emit_register_classes): Pass a symbol_ref and priority
8006         to assemble_constructor.
8008 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
8010         * java-tree.h (all_class_filename): New macro.
8011         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
8012         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
8013         newly created IDENTIFIER_NODE to `all_class_filename.'
8015 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
8017         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
8018         Use ggc_add_tree_root to register roots.
8020 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8022         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
8023         second operand calling check_init.
8024         * decl.c (complete_start_java_method): Swaped second and third
8025         arguments while creating WITH_CLEANUP_EXPR node.
8026         * jcf-write.c (generate_bytecode_insns): Use second operand
8027         instead of third when handling WITH_CLEANUP_EXPR.
8028         * parse.y (java_complete_lhs): Expand second operand of
8029         WITH_CLEANUP_EXPR nodes.
8030         (patch_synchronized_statement): Swaped second and third arguments
8031         while creating WITH_CLEANUP_EXPR node.
8033 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8035         * parse.y (create_interface): Avoid cyclic inheritance report when
8036         syntax error encountered during class definition.
8037         Fixes PR java/2956
8039 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8041         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8042         ASM_FINAL_SPEC.
8043         (lang_specific_pre_link): Use set_input to set input_filename.
8044         Append `main' here.
8045         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8046         (main): Fix definition.
8047         Strip `main' from classname.
8048         Fixes PR java/227.
8050 2001-07-18  Tom Tromey  <tromey@redhat.com>
8052         For PR java/2812:
8053         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
8054         * lex.c (java_new_lexer): Use ICONV_CONST.
8055         (java_read_char): Likewise.
8056         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
8057         (jv-scan$(exeext)): Likewise.
8059 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8061         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
8062         * parse.y (check_class_interface_creation): Allow `private' if the
8063         enclosing is not an interface.
8064         (create_interface): Interface tagged public if the enclosing
8065         context is an interface.
8066         (create_class): Class tagged public if the enclosing context
8067         is an interface.
8068         Fixes PR java/2959
8070 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8072         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
8073         Fixes PR java/2665
8075 2001-07-14  Tim Josling  <tej@melbpc.org.au>
8077         * check-init.c (check_init): Remove references to EXPON_EXPR.
8079 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8081         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
8082         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
8083         Fixes PR java/3602
8085 2001-07-13  Tom Tromey  <tromey@redhat.com>
8087         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
8088         invocation.
8090 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8092         * parse.y (patch_method_invocation): Don't override primary if one
8093         is already provided, but let this$<n> be built. Fixed comment.
8095 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
8097         * parse.y (empty_statement:): Report empty statement error only
8098         when found at class declaration level.
8099         Fixes PR java/3635
8101 2001-07-12  Tom Tromey  <tromey@redhat.com>
8103         * expr.c (expand_load_internal): New function.
8104         (LOAD_INTERNAL): Use it.
8106 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
8108         * parse.y (verify_constructor_super): Compare anonymous class ctor
8109         args with `valid_method_invocation_conversion_p.'
8110         Fixes PR java/3285
8112 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8114         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
8115         `-fsyntax-only.' Fixes PR java/3248
8117 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8119         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
8121 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
8123         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
8124         current function is static. Fixes PR java/1970
8126 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8128         * parse.y (patch_method_invocation): Add enclosing context to ctor
8129         calls if necessary. Fixes PR java/2953
8131 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8133         * parse.y (resolve_package): Abort if qualified expression member
8134         isn't right.
8135         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
8136         Fixes PR java/1391
8138 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
8140         * verify.c: Don't use // comments.
8142 2001-07-05  Tom Tromey  <tromey@redhat.com>
8144         * lang.c (flag_assume_compiled): Removed.
8145         * java-tree.h (flag_assume_compiled): Removed.
8146         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
8147         -fhash-synchronization, -fuse-divide-subroutine,
8148         -fcheck-references, -femit-class-file, -femit-class-files,
8149         -fassume-compiled.  Updated --encoding information.  Changed
8150         -foutput-class-dir to `-d'.
8152 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
8154         * jcf-parse.c (parse_class_file): Add lineno parameter to
8155         debug_start_source_file call.
8157 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8159         * gcj.texi: Use gpl.texi.
8160         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
8161         dependencies and use doc/include in search path.
8163 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
8165         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
8166         `this'.  If so, don't build instance initializers.
8168 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8170         * parse.y (resolve_expression_name): Improved error message for
8171         inner class cases. Fixes PR java/1958
8173 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8175         * lang.c: #include diagnostic.h
8176         (lang_print_error): Add a `diagnostic_context *' parameter.
8177         (java_dummy_print): Likewise.
8178         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
8180 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8182         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
8183         * jcf.h (typedef struct JCF): New bitfield `finished.'
8184         (JCF_FINISH): Set `finished.'
8185         (JCF_ZERO): Reset `finished.'
8186         Fixes PR java/2633
8188 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8190         * parse.y (class_body_declaration:): Don't install empty instance
8191         initializers.
8192         Fixes PR java/1314
8194 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
8196         * class.c (set_super_info): Call `set_class_decl_access_flags.'
8197         (set_class_decl_access_flags): New function.
8198         * java-tree.h (set_class_decl_access_flags): New prototype.
8199         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
8200         (parse_class_file): New local `decl_max_locals.' Take wide types
8201         into account to compute DECL_MAX_LOCALS.
8202         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
8203         imports on demand.
8205 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
8207         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
8209 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8211         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
8212         * parse.y (do_resolve_class): Moved comments out to leading comment
8213         section. Removed local `start', New local `_ht' and
8214         `circularity_hash.'  Record `enclosing' in hash table and search
8215         it to detect circularity.  Use `enclosing' as an argument to
8216         `lookup_cl.' Free the hash table when done.
8218 2001-06-19  Tom Tromey  <tromey@redhat.com>
8220         * lex.c (java_read_char): Disallow invalid and overlong
8221         sequences.  Fixes PR java/2319.
8223 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
8225         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
8227 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8229         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
8230         arguments accordingly.
8232 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
8234         * gcj.texi: Move contents to just after title page.
8236 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
8238         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
8239         builtin type.
8240         (patch_incomplete_class_ref): Build the class ref, build the class
8241         init if necessary, complete the tree.
8242         Fixes PR java/2605
8244 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8246         * parse.y (lookup_field_wrapper): Test `name' code.
8247         (resolve_qualified_expression_name): Test `qual_wfl' code.
8248         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
8249         handle `qual_wfl' by code.
8250         (maybe_build_primttype_type_ref): Test `wfl' code.
8252 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8254         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
8255         fdl.texi.
8256         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
8257         the dvi file in the java directory.
8259 2001-05-25  Sam TH  <sam@uchicago.edu>
8261         * gen-table.pl javaop.h jcf.h lex.h,
8262         parse.h: Fix header include guards.
8264 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
8266         * jv-scan.c (version): Update copyright year.
8268 2001-05-21  Per Bothner  <per@bothner.com>
8270         * jcf-parse.c (read_class):  If class is from .class or .zip file
8271         and it's already been read, don't push/pop parser context.
8273 2001-05-18  Per Bothner  <per@bothner.com>
8275         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
8276         command line so the jvgenmain-generated main program comes first.
8278 2001-05-15  Tom Tromey  <tromey@redhat.com>
8280         * class.c (build_utf8_ref): Don't generate identifier based on
8281         utf8const contents.
8283 2001-05-12  Richard Henderson  <rth@redhat.com>
8285         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
8286         * expr.c (java_lang_expand_expr): Expand it.
8287         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
8288         calling build_exception_object_ref.
8289         * parse.y (catch_clause_parameter): Likewise.
8290         (build_dot_class_method): Likewise.
8291         (try_reference_assignconv): Likewise.
8292         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
8293         * jcf-write.c (generate_bytecode_insns): Likewise.
8295 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8297         * parse.y (build_unresolved_array_type): Set
8298         EXPR_WFL_QUALIFICATION on the newly created wfl.
8299         Fixes PR java/2538. Fixes PR java/2535.
8301 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8303         * parse.y (fix_constructors): Removed unnecessary assignment to
8304         local. Moved assignment to `this$<n>', fixed comments and
8305         indentation.
8306         (build_wfl_wrap): Fixed indentation.
8307         Fixes PR java/2598, java/2579 and java/2658.
8309 2001-05-03  Mo DeJong  <mdejong@redhat.com>
8311         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
8312         check for byte swap.
8314 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
8316         * expr.c (build_class_init): Move MODIFY_EXPR
8317         outside of COND_EXPR.  Remove variable `call'.
8319 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8321         * decl.c: NULL_PTR -> NULL.
8322         * jcf-write.c: Likewise.
8324 2001-05-01  Tom Tromey  <tromey@redhat.com>
8326         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
8327         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
8328         * gcj.texi: Updated copyright text.  Include fdl.texi.
8329         (Top): Link to new node.
8331 2001-05-01  Per Bothner  <per@bothner.com>
8333         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
8335 2001-05-01  Per Bothner  <per@bothner.com>
8337         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
8338         import_list contains the name, not the TREE_PURPOSE.
8340 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8342         * jcf-io.c (read_zip_member): Cast to long in comparison with
8343         signed value.
8345         * jvspec.c (lang_specific_driver): Initialize variables.
8347         * mangle.c (find_compression_record_match): Likewise.
8349         * typeck.c (build_null_signature): Provide static prototype.  Mark
8350         parameter with ATTRIBUTE_UNUSED.
8352         * verify.c (verify_jvm_instructions): Initialize variable.
8354 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8356         * parse.y (do_resolve_class): Check for cyclic inheritance during
8357         inner class resolution.
8359 2001-04-27  Per Bothner  <per@bothner.com>
8361         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
8362         while iterating, since that could cause gc to lose stuff.
8364 2001-04-26  Per Bothner  <per@bothner.com>
8366         Fix method search wrt scope of inner classes to match JLS2.
8367         * typeck.c (build_null_signature):  New static function.
8368         (has_method):  New function.  Uses build_null_signature and lookup_do.
8369         * java-tree.h (has_method):  New declaration.
8370         * parse.y (find_applicable_accessible_methods_list):  Do not search
8371         context of inner classes here.
8372         (patch_method_invocation):  Search scope, ie. current and outer clases,
8373         for method matching simple name, to find class.
8375 2001-04-26  Per Bothner  <per@bothner.com>
8377         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
8378         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
8380         * constants.c (find_methodref_with_class_index):  New function.
8381         (find_methodref_index):  Use find_methodref_with_class_index.
8382         * java-tree.h (find_methodref_with_class_index):  New declaration.
8383         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
8384         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
8385         If context changed from interface to class, don't use invokeinterface.
8387 2001-04-25  Per Bothner  <per@bothner.com>
8389         * verify.c (verify_jvm_instructions):  For field instructions,
8390         check that field index is valid.  For invoke instructions, check that
8391         method index is valid.
8393 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
8395         * config-lang.in (target_libs): Copy from $libgcj_saved.
8397 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8399         * decl.c (init_decl_processing): Add new class "protectionDomain"
8400         field.
8401         * class.c (make_class_data): Set initial value for "protectionDomain".
8403 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8405         * jvspec.c (lang_specific_driver): Fix memory allocation
8406         deficit, by using concat in lieu of xmalloc/sprintf.
8408 2001-04-20  Per Bothner  <per@bothner.com>
8410         Fixes to compile multiple .class files at once.
8411         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
8412         * java-tree.h (CLASS_PARSED_P):  New macro.
8413         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
8414         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
8415         (read_class):  Avoid some code duplication.
8416         Don't call JCF_FINISH for a .class file - might be needed later.
8417         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
8418         rather than CLASS_LOADED_P, since latter implies class laid out.
8419         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
8420         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
8422 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8424         * Make-lang.in (java/boehm.o): Depend on toplev.h.
8426         * boehm.c: Include toplev.h.
8428 2001-04-06  Tom Tromey  <tromey@redhat.com>
8429             Alexandre Petit-Bianco  <apbianco@redhat.com>
8431         Fix for PR gcj/1404 and PR gcj/2332:
8432         * parse.y (build_array_from_name): If we use the type_wfl then
8433         accumulate dimensions from the original type as well.
8434         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
8436 2001-04-06  Tom Tromey  <tromey@redhat.com>
8438         * parse.y (analyze_clinit_body): Return true if the second operand
8439         of a METHOD_EXPR is nonzero.
8441 2001-04-06  Tom Tromey  <tromey@redhat.com>
8443         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
8444         directory.
8445         ($(srcdir)/java/parse.c): Likewise.
8447 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8449         * gcj.texi: Use `which-gcj' instead of `which-g77.'
8450         (version-gcc): Initialized.
8451         (which-gcj): Likewise.
8453 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8455         * java-tree.h (struct lang_decl): New macro
8456         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
8457         * parse.y (build_instance_initializer): New function.
8458         (add_instance_initializer): Use it.
8459         (java_fix_constructors): Set `current_class' before fix pass.
8460         (fix_constructors): Just return if already fixed. Move `super()'
8461         invocation ahead. Use `build_instance_initializer.'
8462         Fixes PR java/1315.
8464 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
8466         * parse.y (resolve_qualified_expression_name): Pass field's
8467         DECL_CONTEXT to `not_accessible_p.'
8468         (not_accessible_p): Changed parameters order in `inherits_from_p'
8469         invocation.
8471 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
8473         * lang-options.h: Add flag_check_references.
8475 2001-04-04  Per Bothner  <per@bothner.com>
8477         * java-tree.h (CONSTANT_VALUE_P):  New macro.
8478         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
8479         * parse.y (maybe_build_class_init_for_field):  New static function.
8480         (resolve_expression_name, resolve_field_access):  Use
8481         maybe_build_class_init_for_field instead of build_class_init
8482         This does not do the init if the field is compile-time-constant.
8483         (resolve_field_access):  Simplify.
8485         * parse.y (fold_constant_for_init):  Merge test into switch.
8487 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
8489         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
8490         on gansidecl.h.
8491         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
8493 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
8495         * expr.c (pop_type_0): Save the result of the first
8496         lang_printable_name call in a scratch buffer, so it
8497         won't be clobbered by the second call.
8499 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
8501         * parse-scan.y (array_type:): Rewritten.
8502         (type_declaration:): `empty_statement' replaces `SC_TK.'
8503         (class_member_declaration:): `empty statement' added.
8504         (method_body:): Simplified.
8505         (static_initializer:): Likewise.
8506         (primary_no_new_array:): Use `type_literals.'
8507         (type_literals:): New rule.
8508         (dims:): Set and update `bracket_count.'
8509         Fixes PR java/1074. Fixes PR java/2412.
8511 2001-03-28  Hans Boehm  <boehm@acm.org>
8513         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
8514         (get_boehm_type_descriptor): Set type on returned value to be a
8515         pointer length integer.
8517 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8519         * expr.c (pop_type_0): Call `concat' rather than building the
8520         string manually.
8521         (pop_type): Add format specifier in call to `error'.
8523         * parse.y (patch_method_invocation): Avoid casting away
8524         const-ness.
8526 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
8528         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
8530 2001-03-28  Richard Henderson  <rth@redhat.com>
8532         IA-64 ABI Exception Handling:
8533         * Make-lang.in (except.o): Don't depend on eh-common.h.
8534         * check-init.c (check_init): Handle EXC_PTR_EXPR.
8535         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
8536         [soft_exceptioninfo_call_node]: Remove.
8537         [eh_personality_libfunc, lang_eh_runtime_type]: New.
8538         (end_java_method): No emit_handlers.
8539         * except.c (java_set_exception_lang_code): Remove.
8540         (method_init_exceptions): Don't call it.
8541         (prepare_eh_table_type): No CATCH_ALL_TYPE.
8542         (build_exception_object_ref): New.
8543         (expand_end_java_handler): Update for except.h name changes.
8544         (emit_handlers, expand_resume_after_catch): Remove.
8545         * expr.c (java_lang_expand_expr): Update for except.h name changes.
8546         (process_jvm_instruction): Use build_exception_object_ref.
8547         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
8548         (soft_exceptioninfo_call_node): Remove.
8549         (build_exception_object_ref): Declare.
8550         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
8551         soft_exceptioninfo_call_node.  Move processing ...
8552         [EXC_PTR_EXPR]: ... here.
8553         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
8554         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
8555         (source_end_java_method): No java_set_exception_lang_code or
8556         emit_handlers.
8557         (build_dot_class_method): Use build_exception_object_ref.
8558         (try_reference_assignconv): Check EXC_PTR_EXPR not
8559         soft_exceptioninfo_call_node.
8561 2001-03-28  Richard Henderson  <rth@redhat.com>
8563         * java-tree.h (throw_node): Define as a single member of
8564         java_global_trees instead of a separate array.
8565         (JTI_THROW_NODE): New.
8566         * decl.c (throw_node): Don't declare.
8567         (init_decl_processing): Init a scalar throw_node.
8568         Don't register it for gc.
8569         * check-init.c (check_init): Reference scalar throw_node.
8570         * expr.c (build_java_athrow): Likewise.
8571         * jcf-write.c (generate_bytecode_insns): Likewise.
8572         * parse.h (BUILD_THROW): Likewise.
8574 2001-03-28  Richard Henderson  <rth@redhat.com>
8576         * decl.c (end_java_method): Do not save and restore
8577         flag_non_call_exceptions.
8578         * parse.y (source_end_java_method): Likewise.
8579         * lang.c (flag_exceptions): Don't declare.
8580         (java_init_options): Set flag_non_call_exceptions.  Set
8581         flag_exceptions here ...
8582         (java_init): ... not here.
8584 2001-03-27  Richard Henderson  <rth@redhat.com>
8586         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
8587         exceptions_via_longjmp.
8589         * lang.c (flag_new_exceptions): Don't declare it.
8590         (java_init_options): Or set it.
8592 2001-03-27  Richard Henderson  <rth@redhat.com>
8594         * decl.c (end_java_method): Rename asynchronous_exceptions to
8595         flag_non_call_exceptions.
8596         * parse.y (source_end_java_method): Likewise.
8598 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8600         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8602 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8604         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
8606 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8608         * parse.y (find_as_inner_class): Follow current package
8609         indications not to mistakingly load an unrelated class.
8611 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8613         * constants.c (PUTN): Use memcpy, not bcopy.
8615         * lex.c (java_read_char): Use memmove, not bcopy.
8617         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
8619 2001-03-23  Per Bothner  <per@bothner.com>
8621         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
8622         macro for better error pin-pointing.
8623         * java-tree.h:  Fix typo in comment.
8625         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
8626         Don't include jsr/goto in exception range.
8627         Check if start and end of exception range are the same (also TRY_EXPR).
8628         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
8629         However, do emit the following goto even if try_block is empty.
8630         Defer freeing exception_decl until after the finalizer, to make
8631         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
8633         * parse.y (java_complete_lhs):  If the try-clause is empty, just
8634         return the finally-clause and vice versa.
8636 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
8638         * gcj.texi (Input Options): documented the check for attribute
8639         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
8640         * java-tree.h (flag_force_classes_archive_check): Declared extern.
8641         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
8642         (jcf_parse): Check for the right classes archive if necessary.
8643         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
8644         (jcf_parse_fields): Fixed indentation.
8645         * jcf-write.c (append_gcj_attribute): New function.
8646         (generate_classfile): Compute the attribute count, invoke
8647         `append_gcj_attribute'.
8648         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
8649         turned into bit-fields. New bit-field `right_zip.'
8650         (JCF_ZERO): Set `right_zip' to zero.
8651         * lang-options.h (-fforce-classes-archive-check): Added flag.
8652         * lang.c (flag_force_classes_archive_check): New flag.
8653         (lang_f_options): New entry `force-classes-archive-check.'
8654         Fixes PR java/1213.
8656 2001-02-07  Andrew Haley  <aph@redhat.com>
8658         * gcj.texi (Configure-time Options): Add -fcheck-references.
8659         * expr.c (build_java_indirect_ref): New function.
8660         (java_check_reference): New function.
8661         (build_java_array_length_access): Use build_java_indirect_ref to
8662         check for null references.
8663         (build_java_arrayaccess): Likewise.
8664         (build_get_class): Likewise.
8665         (build_field_ref): Likewise.
8666         (invoke_build_dtable): Likewise.
8667         (build_invokeinterface): Likewise.
8668         * lang.c (lang_f_options): Add flag_check_references.
8669         * jvspec.c (jvgenmain_spec): Add flag_check_references.
8670         * java-tree.h (flag_check_references): New variable.
8671         * lang.c (flag_check_references): Likewise.
8672         * parse.y (patch_invoke): Use java_check_reference.
8673         (patch_assignment): Allow for extra nesting in
8674         _Jv_CheckArrayStore.
8676 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
8678         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
8679         * lex.c (cxx_keywords): Likewise.
8681 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
8683         * parse.y (qualify_ambiguous_name): Broaden `length'
8684         recognition. Help MODIFY_EXPR be resolved as expression names.
8685         Fixes PR java/2066. Fixes PR java/2400.
8687 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
8689         * gjavah.c (process_file): Mark interface definitions with
8690         "__attribute__ ((java_interface))".
8692 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
8694         * class.c (layout_class): Fixed push_super_field's second
8695         argument. Fixes PR java/2333.
8696         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
8697         too early to lay innerclasses out.
8699 2001-03-20  Tom Tromey  <tromey@redhat.com>
8700             Alexandre Petit-Bianco <apbianco@redhat.com>
8702         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
8703         inside an array reference. Insertion of the array store check
8704         rewritten. Fixes PR java/2299.
8706 2001-03-20  Tom Tromey  <tromey@redhat.com>
8708         * lex.c (java_read_unicode): Only accept leading `u's.
8710 2001-03-20  Tom Tromey  <tromey@redhat.com>
8712         * jcf-parse.c (read_class): Initialize `class'.
8714 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8716         * jcf_parse.c (jcf_parse): Eliminate unused variable.
8718 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8720         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
8721         (layout_class): Likewise.
8722         (layout_class_method): Likewise.
8723         (emit_register_classes): Likewise.
8724         * decl.c (builtin_function): Likewise.
8725         (give_name_to_locals): Likewise.
8727 2001-03-19  Per Bothner  <per@bothner.com>
8729         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
8730         before trying to load an inner class.
8732         Fixes to process to command-line .class files in two passes.
8733         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
8734         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
8735         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
8736         * class.c (is_compiled_class):  Fix for renamed flag.
8737         * parse.y (maybe_create_class_interface_decl):  Likewise.
8738         * jcf-parse.c (yyparse):  Also set if compiling .class files.
8739         * jcf-parse.c (read_class);  Read current_class.
8740         (jcf_parse):  Make static.
8741         (load_inner_classes):  New function, with code moved from jcf_parse,
8742         because we need to inner classes after the command-line files are read.
8743         (yyparse):  Set finput to NULL when it doesn't need to be closed.
8744         Reduce use of main_jcf (basically only for archive) and
8745         use finput instead of main_jcf->read_state.
8746         Inline jcf_figure_file_type into yyparse.
8747         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
8748         Defer load_inner_classes and parse_class_file to a second pass,
8749         after we've correctly mapped command-line .clas fiels to classes.
8750         (jcf_figure_file_type):  Removed.
8751         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
8752         (JCF_ZERO):  Also clear zipd field.
8753         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
8755 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8757         * jcf-parse.c (yyparse): Change ch from char * to char.
8759 2001-03-19  Per Bothner  <per@bothner.com>
8761         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
8762         Add constructed filelist-file at end, following -xjava.  Thus any .o
8763         and library files are not affected by the -xjava.  Also wrap
8764         explicit @FILE with -xjava and -xnone.
8766 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
8768         * class.c (build_static_field_ref): Call make_decl_rtl() after
8769         setting the DECL_EXTERNAL flag.
8771 2001-03-17  Per Bothner  <per@bothner.com>
8773         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
8775         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
8776         when result is is needed (target is STACK_TARGET).
8778         * parse.h (JDEP_SOLV):  Removed.
8779         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
8781         * parse.y (incomplete_class_list): Removed.
8782         (obtain_incomplete_type): Don't use or set incomplete_class_list.
8783         It doesn't work if resolve_class changes the name of an array type
8784         that is on the list and then someone else looks for the modified name.
8785         Also, seems liable to break when compiling multiple source files at
8786         once.  So the simplest is to just remove incomplete_class_list -
8787         it is only a minor space win and it is not even clear it saves time.
8789         * parse.y (resolve_class):  Remove unneeded promote_type.
8791 2001-03-15  Per Bothner  <per@bothner.com>
8793         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
8794         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
8795         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
8796         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
8798         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
8799         * parse.y (java_expand_classes):  Likewise.
8801         * parse.y (expand_start_java_method):  Was only called once and had a
8802         misleading name, so inline in caller java_complete_expand_method.
8803         (enter_a_block):  Likewise inline in enter_block and remove.
8805         Remove junk from when gcc/java was created (by copying from C/C++).
8806         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
8807         (struct binding_level):  Remove fields keep, keep_if_subblocks,
8808         more_cleanups_ok, have_cleanups (which have never been used).
8809         (pushlevel, poplevel):  Remove related useless code.
8811         * class.c (make_class_data):  The class_dtable_decl (i.e. the
8812         vtable for Class) should be external, except when compiling Class.
8814         * jvspec.c (lang_specific_driver):  Fix -C handling.
8815         Check -save-temps to see if temp @FILE should be deleted.
8816         Follow-up to/fix for February 16 patch.
8818         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
8819         (type_stack_dup):  Remove no-longer neded error check.
8821 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
8823         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
8824         to 'for_pointer'. If this type is for a pointer (argument) mangling,
8825         don't surround the element with 'N..E' if the type name is
8826         unqualified.
8828 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8830         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
8831         DECL_RTL_SET_P, etc.
8832         (make_method_value): Likewise.
8833         (get_dispatch_table): Likewise.
8835         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8837 2001-03-07  Tom Tromey  <tromey@redhat.com>
8839         * config-lang.in (lang_requires): Define.
8841 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
8843         * typeck.c (convert): Check flag_unsafe_math_optimizations,
8844         not flag_fast_math.
8846 2001-03-05  Per Bothner  <per@bothner.com>
8848         Fix a problem where rest_of_decl_compilation applied to
8849         class_dtable_decl causes problems because it was done too early,
8850         before output file was opened.
8851         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
8852         * class.c (class_dtable_decl):  Add macro - element of class_roots.
8853         (make_class_data):  Define class_dtable_decl.
8854         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
8856 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8858         * java/class.c, java/decl.c, java/java-tree.h: Replace all
8859         uses of 'boolean' with 'bool'.
8861 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8863         * lang-specs.h: Add zero initializer for cpp_spec field to all
8864         array elements.
8866 2001-02-16  Per Bothner  <per@bothner.com>
8868         Handle compiling multiple input files at once, and @FILE syntax.
8869         * gcj.texi:  Updated documentation to match.
8870         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
8871         * jcf-parse.c (parse_source_file):  Split into ...
8872         (parse_source_file_1):  New function - and:
8873         (parse_source_file_2):  New function.
8874         (yyparse):  On -ffilelist-file, open and scan named file.
8875         On first pass over files, only do parse_source_file_1.
8876         A new second pass calls parse_source_file_2 for each file to compile.
8877         (init_jcf_parse):  Call init_src_parse.
8878         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
8879         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
8880         as multiple input file combined in one compilation.
8881         * lang-options.h:  Add -ffilelist-file
8882         * lang.c (flag_filelist_file):  New flag variable.
8883         (lang_f_options):  Handle -ffilelist-file.
8884         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
8885         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
8886         gclass_list - use global fields of src_parse_roots instead.
8887         * parse.y (src_parse_roots):  New array.
8888         (incomplete_class_list, gclass_list):  New macros.
8889         (push_parser_context, java_pop_parser_context,
8890         java_parser_context_resume):  Don't fiddle with deleted fields.
8891         (various):  Use incomplete_class gclass_list and global macros
8892         instead of parse_ctxt fields - the lists are global.
8893         (init_src_parse):  New function.
8895 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8897         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
8899 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8901         * parse.y (check_inner_class_access): Moved declaration of local
8902         `enclosing_decl_type' to the right location.
8904 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
8906         * parse.y (parser_check_super_interface): Don't call
8907         check_pkg_class_access for an inner interface.
8908         (parser_check_super): Don't call check_pkg_class_access for inner
8909         class.
8910         (do_resolve_class): Simplify enclosing type loop. Don't call
8911         check_pkg_class_access if CL and DECL are not set.
8912         (find_in_imports_on_demand): Set DECL if class_type needed to be
8913         loaded. Don't call check_pkg_class_access for an inner class.
8914         (check_inner_class_access): Rewritten to implement member access
8915         rules as per spec 6.6.1.
8916         (check_pkg_class_access): Handle the empty package correctly.
8917         (in_same_package): New function. Determine if two classes are in the
8918         same package.
8920 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
8922         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
8923         method into array types.
8924         * parse.y (patch_method_invocation): Bypass access check on clone call
8925         to array instance.
8927 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8929         * expr.c (build_instanceof): Check for arrays when trying fold to
8930         false.
8932 2001-02-15  Jim Meyering  <meyering@lucent.com>
8934         * Make-lang.in (java.install-common): Depend on `installdirs'.
8935         (java.install-info): Likewise.
8937 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
8939         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
8941 2001-02-14  Tom Tromey  <tromey@redhat.com>
8942             Alexandre Petit-Bianco  <apbianco@cygnus.com>
8944         Fix for PR java/1261.
8945         * typeck.c (build_java_array_type): Add public `clone' method to
8946         arrays.
8947         * parse.y (resolve_qualified_expression_name): Use current_class
8948         when checking for inaccessibility.
8949         (patch_method_invocation): Fixed error message when accessibility
8950         denied.  Added `from_super' argument.
8952 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8954         * parse.y (resolve_class): Don't build a fake decl. Use the one
8955         already built.
8956         * typeck.c (build_java_array_type): Build and assign decl to array
8957         type.
8959 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
8961         * parse.y (not_accessible_p): Changed leading comment. Added extra
8962         `where' argument. Use it to enforce protected access rules.
8963         (resolve_qualified_expression_name): Added extra argument to
8964         not_accessible_p.
8965         (patch_method_invocation): Use argument `primary' to provide
8966         not_accessible_p with an extra argument.
8967         (lookup_method_invoke): Added extra argument to not_accessible_p.
8968         (search_applicable_method_list): Likewise.
8970 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8972         * parse.y (resolve_qualified_expression_name): Try to resolve as
8973         an inner class access only if `decl' is a TYPE_DECL.
8975 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8977         * decl.c (classdollar_identifier_node): Initialize.
8978         * java-tree.h (enum java_tree_index): New entry
8979         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
8980         (classdollar_identifier_node): New macro.
8981         (ID_CLASSDOLLAR_P): Likewise.
8982         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
8983         (build_dot_class_method_invocation): Likewise.
8984         (find_applicable_accessible_methods_list): `class$' can't be
8985         inherited.
8987 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
8989         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
8991 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8993         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
8994         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
8995         gone.
8997 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8999         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
9000         outside of the `__U' sequence too.
9001         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
9002         sequence too.
9004 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9006         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
9008 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9010         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
9011         (JVGENMAIN_OBJS): Likewise.
9012         * java-tree.h (append_gpp_mangled_name): New prototype.
9013         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
9014         Removed cast calling `gcc_add_root.'
9015         * jvgenmain.c (mangle_obstack): New global, initialized.
9016         (main): Use it.
9017         (do_mangle_class): Constify local `ptr.'
9018         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
9019         append_gpp_mangle_name and update `count' if necessary.
9020         Use `mangle_obstack.'
9021         * mangle.c (append_unicode_mangled_name): Removed.
9022         (append_gpp_mangled_name): Likewise.
9023         (unicode_mangling_length): Likewise.
9024         (mangle_member_name): Return type set to `void.'
9025         (mangle_field_decl): Don't append `U' in escaped names.
9026         (mangle_method_decl): Likewise.
9027         (mangle_member_name): Just use `append_gpp_mangled_name.'
9028         * mangle_name.c: New file.
9030 2001-02-07  Per Bothner  <per@bothner.com>
9032         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
9034         * check-init.c (check_init):  Don't call done_alternative after
9035         processing loop code, as a LOOP_EXPR never terminates normally.
9037 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
9039         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
9041 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9043         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
9044         DECLs.
9046 2001-02-06  Tom Tromey  <tromey@redhat.com>
9048         * lex.c (java_new_lexer): Longer error message.
9050 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
9051             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9053         * typeck.c (build_prim_array_type): Added leading comment.
9054         (build_java_array_type): Moved locals out of
9055         block. Always create the `data' field, fixed alignment to match
9056         C++.
9058 2001-02-04  Tom Tromey  <tromey@redhat.com>
9060         * expr.c (java_lang_expand_expr): Don't bother recomputing
9061         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
9062         Fixes PR java/1866.
9064 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9066         * parse.y (process_imports): Save the original name of the import
9067         for better error report.
9069 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
9071         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
9072         of macros used when compiling jvspec.c.
9073         * jvspec.c (lang_specific_driver): Link with the shared
9074         libgcc by default.
9076 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9078         * check-init.c (check_init): Call internal_error instead of fatal.
9079         * expr.c (java_lang_expand_expr): Likewise.
9080         * jcf-parse.c (get_constant): Likewise.
9081         * mangle.c (java_mangle_decl): Likewise.
9082         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
9083         (operator_string): Likewise.
9084         * check-init.c (check_init): Call abort instead of fatal.
9085         * class.c (build_class_ref): Likewise.
9086         * constants.c (write_constant_pool): Likewise.
9087         * decl.c (start_java_method): Likewise.
9088         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
9089         (java_stack_dup, encode_newarray_type): Likewise.
9090         (build_java_array_length_access): Likewise.
9091         (build_java_check_indexed_type, expand_java_pushc): Likewise.
9092         (build_java_soft_divmod, build_invokeinterface): Likewise.
9093         * java-tree.h (INNER_CLASS_P): Likewise.
9094         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
9095         (give_name_to_class, get_class_constant): Likewise.
9096         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
9097         (find_constant_index, generate_bytecode_conditional): Likewise.
9098         (generate_bytecode_insns, perform_relocations): Likewise.
9099         * lex.c (java_unget_unicode, java_lex): Likewise.
9100         * mangle.c (mangle_type, mangle_record_type): Likewise.
9101         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
9102         (finish_mangling): Likewise.
9103         * parse.h (MARK_FINAL_PARMS): Likewise.
9104         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
9105         (obtain_incomplete_type, java_complete_class): Likewise.
9106         (java_check_regular_methods, java_complete_expand_method): Likewise.
9107         (cut_identifier_in_qualified, check_deprecation): Likewise.
9108         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
9109         (java_complete_lhs, lookup_name_in_blocks): Likewise.
9110         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
9111         * typeck.c (set_local_type, parse_signature_type): Likewise.
9112         (parse_signature_string, build_java_signature): Likewise;
9113         (set_java_signature): Likewise.
9114         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
9115         * class.c (add_method): Call fatal_error instead of fatal.
9116         (build_static_field_ref): Likewise.
9117         * expr.c (build_known_method_ref, expand_invoke): Likewise.
9118         * jcf-parse.c (get_constant, jcf_parse): Likewise.
9119         * lex.c (java_new_new_lexer): Likewise.
9120         * jv-scan.c (main): Likewise.
9121         (fatal_error): Renamed from fatal.
9122         * jcf-parse.c (yyparse): Call fatal_io_error instead of
9123         pfatal_with_name.
9124         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
9125         (yyparse): Likewise.
9126         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
9127         * lex.c (java_get_line_col): Likewise.
9128         * jcf-parse.c (load_class): Make errors non-fatal.
9129         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
9131 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
9133         * jvgenmain.c (class_mangling_suffix): Remove unused string.
9134         (error): Remove unused function.
9135         (main): Don't use "__attribute__ alias" on generated class symbol.
9137 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9139         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
9140         argument.
9141         * parse.y (finish_method_declaration): Code accounting for WFLed
9142         method DECL_NAMEs deleted.
9143         (check_abstract_method_definitions): Likewise.
9144         (resolve_type_during_patch): Layout resolved type.
9145         * typeck.c (lookup_do): Removed unused local.
9147 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
9149         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
9150         * decl.c (init_decl_processing): Use integer_minus_one_node, not
9151         integer_negative_one_node.
9152         * expr.c (build_java_binop): Likewise.
9154 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
9156         * zextract.c (read_zip_archive): Read file_offset before writing
9157         zipd and consequently clobbering the header contents.
9159 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9161         * Make-lang.in: Remove all dependencies on defaults.h.
9162         * decl.c: Don't include defaults.h.
9163         * expr.c: Likewise.
9164         * parse.y: Likewise.
9166 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9168         * ChangeLog (2001-01-21): Fixed typo.
9169         * class.c (layout_class_method): Code accounting for WFLed
9170         method DECL_NAMEs deleted.
9171         * constant.c (find_methodref_index): Likewise.
9172         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
9173         * java-tree.h (DECL_FUNCTION_WFL): New macro.
9174         (struct lang_decl): New field `wfl'.
9175         (java_get_real_method_name): Prototype deleted.
9176         * mangle.c (mangle_method_decl): Code accounting for WFLed
9177         method DECL_NAMEs deleted.
9178         * parse.h (GET_METHOD_NAME): Macro deleted.
9179         * parse.y (reset_method_name): Deleted.
9180         (method_header): Set DECL_FUNCTION_WFL.
9181         (check_abstract_method_header): Code accounting for WFLed method
9182         DECL_NAMEs deleted.
9183         (java_get_real_method_name): Deleted.
9184         (check_method_redefinition): Code accounting for WFLed method
9185         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
9186         (java_check_regular_methods): Likewise.
9187         (java_check_abstract_methods): Likewise.
9188         (java_expand_classes): Don't call `reset_method_name.'
9189         (search_applicable_method_list): Use DECL_NAMEs instead of
9190         GET_METHOD_NAME.
9191         * typeck.c (lookup_do): Code accounting for WFLed method
9192         DECL_NAMEs deleted.
9194 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
9196         * lex.c (java_read_char): Check for EOF from getc first.
9198 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9200         * class.c (layout_class): Don't lay the superclass out if it's
9201         already being laid out.
9202         * jcf-parse.c (handle_innerclass_attribute): New function.
9203         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
9204         handle_innerclasses_attribute.
9205         (jcf_parse): Don't load an innerclasses if it's already being
9206         laid out.
9207         * jcf-write.c (append_innerclass_attribute_entry): Static
9208         `anonymous_name' and its initialization deleted. `ocii' and `ini'
9209         to be zero for anonymous classes.
9211 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9213         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
9214         necessary.
9215         * jcf-parse.c (set_source_filename): Use
9216         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
9218 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9220         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
9221         gets a unique asm name.
9223 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9225         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
9226         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9227         if necessary.
9228         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
9229         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
9230         * parse.y (lookup_package_type_and_set_next): Deleted.
9231         (resolve_package): Removed unnecessary code.
9232         (find_applicable_accessible_methods_list): `finit$' can't be
9233         inherited.
9234         * verify.c (pop_argument_types): Added missing prototype.
9236 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
9238         * config-lang.in: Disable java by default.
9240 2001-01-23  Tom Tromey  <tromey@redhat.com>
9242         * gcj.texi (Copying): New node.
9243         Added copyright information.
9245 2001-01-21  Per Bothner  <per@bothner.com>
9247         Various fixes to allow compiling a compressed .jar/.zip archive.
9248         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
9249         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
9250         (struct ZipDirectory):  New field zipf points to owning ZipFile.
9251         * jcf.h (struct ZipDirectory):  Add forward declaration.
9252         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
9253         Remove seen_in_zip and zip_offset fields.
9254         (JCF_SEEN_IN_ZIP):  New macro.
9255         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
9256         * jcf-io.c:  Change all ZipFileCache to ZipFile.
9257         (read_zip_member):  New function.
9258         (open_in_zip):  Call read_zip_member.
9259         * jcf-parse.c (find_in_current_zip):  Remove function.
9260         (read_class):  Merge in find_in_current_zip functionality.
9261         Call read_zip_member if needed.
9262         (parse_zip_file_entries):  Use read_zip_member.
9263         (process_zip_dir):  Update for removed and added JCF fields.
9264         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
9266 2001-01-21  Per Bothner  <per@bothner.com>
9268         Minor optimization of static ggc roots.
9269         * jcf-parse.c (parse_roots):  New static field.
9270         (current_field, current_method, current_file_list):  Replace by macros
9271         naming fields of parse_roots.
9272         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
9273         * class.c (class_roots):  New static field.
9274         (registered_class, fields_ident, info_ident, class_list):
9275         New macros naming fields of parse_roots.
9276         (build_static_field_ref):  Don't register roots here.
9277         (layout_class):  Static field list replaced by macro class_list.
9278         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
9279         Initialize fields_ident and info_ident here.
9281 2001-01-21  Per Bothner  <per@bothner.com>
9283         * jcf-parse.c (ggc_mark_jcf):  New function.
9284         (init_jcf_parse):  Register current_jcf as ggc root.
9286 2001-01-21  Per Bothner  <per@bothner.com>
9288         * lang.c (put_decl_node):  Print method's name.
9290 2001-01-21  Per Bothner  <per@bothner.com>
9292         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
9293         (verify_jvm_instructions):  Use it, for better error messages on loads.
9295 2001-01-21  Per Bothner  <per@bothner.com>
9297         * verify.c (merge_type_state):  Still may have to merge even if
9298         LABEL_VERIFIED (label).
9300 2001-01-21  Per Bothner  <per@bothner.com>
9302         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
9303         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
9305 2001-01-19  Per Bothner  <per@bothner.com>
9307         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
9308         if expeting an interface type.  Refines Tom's change of 2000-09-12.
9310 2001-01-18  Per Bothner  <per@bothner.com>
9312         * gcj.texi (Input Options): Mention .java files.
9314 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9316         * lang-options.h (-Wunsupported-jdk11): Removed.
9317         * lang.c (flag_not_overriding): Deleted.
9318         (flag_static_local_jdk1_1): Likewise.
9319         (lang_W_options): Removed "unsupported-jdk11" entry.
9320         * parse.y (java_check_methods): Removed dead code.
9322 2001-01-17  Tom Tromey  <tromey@redhat.com>
9324         Changes suggested by Per Bothner:
9325         * gcj.texi (Input Options): Don't mention input files.
9326         (Code Generation): Updated --main information.
9327         (Invoking jcf-dump): Mention that --javap is incomplete.
9328         From Alexandre Petit-Bianco:
9329         (Warnings): Don't mention -Wunsupported-jdk11.
9330         My stuff:
9331         (Compatibility): Mention JDK 1.2-ness of libraries.
9332         (Resources): Mention resources used when writing gcj.
9334 2001-01-17  Tom Tromey  <tromey@redhat.com>
9336         * gcj.texi: New file.
9337         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
9338         (java.info): Depend on gcj.info.
9339         (java/gcj.dvi): New target.
9340         (java.dvi): Depend on gcj.dvi.
9341         (java.install-info): Wrote.
9343 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
9345         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
9346         having called make_decl_rtl.
9348 2001-01-14  Per Bothner  <per@bothner.com>
9350         Various patches to emit better messages on verification errors.
9351         * expr.c (push_type_0):  Return error indication on stack overflow,
9352         instead of callinfg fatal.
9353         (push_type):  Now just call push_type_0 (nd fatal on overflow).
9354         (pop_type_0):  Return detailed error message (in a char** argument).
9355         (pop_type):  If pop_type_0 fails, print error message.
9356         (pop_argument_types):  Moved to verify.c.
9357         * verify.c (pop_argument_types):  Moved from expr.c.
9358         Return a (possible) error message, rather than void.
9359         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
9360         (verify_jvm_instruction):  Use new macros, improving error messages.
9361         For case OPCODE_astore use object_ptr_type_node.
9362         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
9363         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
9365         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
9366         constant, return body without wrapper.  (Improves constant folding.)
9367         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
9369 2001-01-13  Per Bothner  <per@bothner.com>
9371         * expr.c (expand_java_field_op):  Assigning to a final field outside
9372         an initializer does not violate JVM spec, so should be warning, not
9373         error.  (Sun's verifier does not complain - though MicroSoft's does.)
9375 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
9377         * gjavah.c (version), jcf-dump.c (version): Update copyright year
9378         to 2001.
9380 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
9382         * parse.y (resolve_expression_name): Permit instance variables from
9383         enclosing context in super constructor call.
9384         (resolve_qualified_expression_name): Permit enclosing class's qualified
9385         "this" in super constructor call.
9387 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9389         * class.c (build_utf8_ref): Remove last argument in call to
9390         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9391         (build_class_ref): Likewise.
9392         (build_static_field_ref): Likewise.
9393         (get_dispatch_table): Likewise.
9394         (layout_class_method): Likewise.
9395         (emit_register_classes): Likewise.
9396         * constants.c (build_constant_data_ref): Likewise.
9397         * decl.c (builtin_function): Likewise.
9398         (create_primitive_vtable): Likewise.
9399         * expr.c (build_known_method_def): Likewise.
9400         (build_jni_stub): Likewise.
9401         (java_lang_expand_expr): Likewise.
9403 2001-01-10  Tom Tromey  <tromey@redhat.com>
9405         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
9407 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9409         * java-tree.h (lang_printable_name_wls): New prototype.
9410         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
9411         rather than `current_class' to print type name. Don't prepend type
9412         names when printing constructor names.
9413         (lang_printable_name_wls): New function.
9414         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
9415         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
9416         * parse.y (patch_method_invocation): Message tuned for constructors.
9417         (not_accessible_p): Grant `private' access from within
9418         enclosing contexts.
9420 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9422         All files with updated copyright when applicable.
9423         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
9424         * class.c (mangle_class_field): Function removed.
9425         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
9426         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
9427         (build_class_ref): Call `java_mangle_class_field' instead of
9428         `mangle_class_field.'
9429         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
9430         (layout_class): Call `java_mangle_decl' instead of
9431         `mangle_static_field.'
9432         (cxx_keywords): Initialized static array moved to `lex.c.'
9433         (layout_class_method): Changed leading comment. Simplified to
9434         call `java_mangle_decl.' Local `ptr' moved in for loop body.
9435         * decl.c (lang_mark_tree): Mark field `package_list.'
9436         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
9437         (struct lang_type): New field `package_list.'
9438         (unicode_mangling_length): Prototype removed.
9439         (append_gpp_mangled_name, append_gpp_mangled_classtype,
9440         emit_unicode_mangled_name): Likewise.
9441         (cxx_keyword_p): New prototype.
9442         (java_mangle_decl, java_mangle_class_field,
9443         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
9444         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
9445         `build_expr_wfl.'
9446         * jvgenmain.c (main_method_prefix): Global variable removed.
9447         (main_method_suffix): Likewise.
9448         (do_mangle_classname): New function.
9449         (main): Call it. Format changed to accommodate new mangling scheme.
9450         * lex.c: (utf8_cmp): Conditionally prototyped.
9451         (cxx_keywords): Moved from class.c, conditionally defined.
9452         (utf8_cmp, cxx_keyword_p): Likewise.
9453         * mangle.c (obstack.h, ggc.h): Included.
9454         (mangle_field_decl): New function.
9455         (mangle_method_decl, mangle_type, mangle_pointer_type,
9456         mangle_array_type, mangle_record_type,
9457         find_compression_pointer_match, find_compression_array_match,
9458         find_compression_record_match,
9459         find_compression_array_template_match, set_type_package_list,
9460         entry_match_pointer_p, emit_compression_string, init_mangling,
9461         finish_mangling, compression_table_add, mangle_member_name): Likewise.
9462         (mangle_obstack): New global.
9463         (MANGLE_RAW_STRING): New macro.
9464         (unicode_mangling_length): Turned static.
9465         (append_unicode_mangled_name): Renamed from
9466         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
9467         replaces `obstack', removed from the parameter list.
9468         (append_gpp_mangled_name): Turned static. `mangle_obstack'
9469         replaces parameter `obstack', removed from the parameter list. Call
9470         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
9471         (append_gpp_mangled_classtype): Removed.
9472         (compression_table, compression_next): New static variables.
9473         * parse.y (temporary_obstack): Extern declaration removed.
9475 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9477         * parse.y (patch_binop): Compute missing type in error situations.
9479 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
9481         * class.c (make_class_data): Push initial value for "arrayclass".
9482         * decl.c (init_decl_processing): Add new class field "arrayclass".
9484 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
9486         From patha@softlab.ericsson.se:
9487         * parse.y (switch_label): Use build, not build1, to construct
9488         DEFAULT_EXPR.
9490 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9492         * lang.c (lang_decode_option): Change -MA to -MP.
9493         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
9494         Update to new prototype; do quote targets.
9495         (jcf_dependency_write): Update.
9497 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
9499         Shorten primitive array allocation path:
9500         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
9501         to create new primitive arrays.
9502         * expr.c (build_newarray): If generating native code, call
9503         soft_newarray_node with a reference to the primitive TYPE identifier
9504         instead of type_value.
9506 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
9508         Fix for PRs gcj/312 and gcj/253:
9509         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
9510         dest if they arn't already.
9511         * class.c (layout_class): Call maybe_layout_super_class on
9512         superinterfaces also, but only if compiling from bytecode.
9514         Fix for PR gcj/373:
9515         * parse.y (create_class): Set ACC_STATIC if class is declared in an
9516         interface.
9518 2000-12-15  Tom Tromey  <tromey@redhat.com>
9520         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
9521         set.
9523 2000-12-14  Andrew Haley  <aph@redhat.com>
9525         * boehm.c (mark_reference_fields): Change test to correctly detect
9526         bitmap overflow.
9528 2000-12-15  Andreas Jaeger  <aj@suse.de>
9530         * config-lang.in (lang_dirs): Added.
9532 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9534         * parse.y (end_artificial_method_body): Fixed undefined behavior.
9535         Credits go to rth for finding it.
9537 2000-12-13  Mike Stump  <mrs@wrs.com>
9539         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
9541 2000-11-07  Tom Tromey  <tromey@cygnus.com>
9543         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
9544         * lex.c (java_ignorable_control_p): Removed.
9545         (java_letter_or_digit_p): Removed.
9546         (java_start_char_p): New function.
9547         (java_read_char): Return `int', not `unicode_t'.  Changed
9548         callers.
9549         (java_read_unicode): Likewise.
9550         (java_read_unicode_collapsing_terminators): Likewise.
9551         (java_get_unicode): Likewise.
9552         (java_new_lexer): Initialize hit_eof.
9553         (java_parse_end_comment): Take `int' argument.
9554         (java_parse_doc_section): Likewise.
9555         (java_parse_escape_sequence): Don't allow backlash-newline.
9556         Return `int'.
9557         * lex.h (JAVA_DIGIT_P): Removed.
9558         (_JAVA_LETTER_OR_DIGIT_P): Removed.
9559         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
9560         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
9561         (JAVA_PART_CHAR_P): New macro.
9562         (UEOF): Now -1.
9563         (JAVA_CHAR_ERROR): Now -2.
9564         (java_lexer): New field `hit_eof'.
9565         * chartables.h: New file.
9566         * gen-table.pl: new file.
9568 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9569             Alexandre Petit-Bianco  <apbianco@cygnus.com>
9571         * parse.y (java_complete_lhs): Only allow compound assignment of
9572         reference type if type is String.
9574 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9576         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
9577         jcf-path.c: Likewise.
9579 2000-12-09  Anthony Green  <green@redhat.com>
9581         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
9582         filestart and filename_length as int values.
9584 2000-12-07  Mo DeJong  <mdejong@redhat.com>
9586         * jcf-io.c (find_class): Correct the logic that tests to see if a
9587         .java file is newer than its .class file. The compiler was
9588         incorrectly printing a warning when file mod times were equal.
9590 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
9592         * jvgenmain.c: Use ISPRINT not isascii.
9594 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9596         * parse.y (end_artificial_method_body): Fixed typo.
9598 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9600         * parse.y (patch_method_invocation): Pick the correct enclosing
9601         context when creating inner class instances.
9602         Fixes gcj/332.
9604 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
9606         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9607         Update copyright year to 2000.
9609 2000-11-23  Anthony Green  <green@redhat.com>
9611         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
9612         Move current_file_list out of yyparse and make it static.
9614         * expr.c: Declare quick_stack and tree_list_free_list as static
9615         (init_expr_processing): Register quick_stack and
9616         tree_list_free_list roots.
9618 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9620         * parse.y (build_outer_field_access): New local `decl_ctx', use
9621         it. Check for field's context and current class immediate outer
9622         context inheritance.
9623         (outer_field_access_p): Consider fields inherited from the last
9624         enclosing context.
9625         (build_access_to_thisn): Stop at the last enclosing context if
9626         necessary.
9627         Fixes gcj/367.
9629 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
9631         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
9633 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
9635         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
9636         scratch buffer.
9638 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9640         * jv-scan.c (help): Document --complexity.
9641         (options): Added --complexity.
9642         (flag_complexity): New global.
9643         (main): Call `report'.
9644         * parse-scan.y (complexity): New global.
9645         (if_then_statement, if_then_else_statement,
9646         if_then_else_statement_nsi, switch_block_statement_group,
9647         while_expression, do_statement, for_begin, continue_statement,
9648         throw_statement, catch_clause, finally, method_invocation,
9649         conditional_and_expression, conditional_or_expression,
9650         conditional_expression): Update complexity.
9651         (reset_report): Reset complexity.
9652         (report): New function.
9654 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9656         * lex.c (yylex): Added STRICT_TK case.
9657         * parse.y (STRICT_TK): Added.
9658         * parse-scan.y (STRICT_TK): Added.
9659         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
9660         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
9661         file.
9662         * keyword.h: Rebuilt.
9663         * keyword.gperf (strictfp): Added.
9665 2000-11-20  Tom Tromey  <tromey@cygnus.com>
9667         * lex.c (yylex): Recognize floating point constants with leading
9668         0.
9670 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9672         * java-tree.h (cyclic_inheritance_report): Constify.
9673         * parse.y (cyclic_inheritance_report): Likewise.
9675 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9677         * parse.y (goal): Remove call to ggc_add_string_root.
9679 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9681         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
9682         Create string in scratch buffer, then pass to build_string.
9684 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9686         * parse.y (issue_warning_error_from_context): Add
9687         ATTRIBUTE_PRINTF.
9689 2000-11-11  Anthony Green  <green@redhat.com>
9691         * jcf-parse.c (process_zip_dir): Add finput parameter.
9692         (jcf_figure_file_type): Call process_zip_dir with appropriate
9693         argument.
9695 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9697         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
9698         * jcf-parse.c (jcf_figure_file_type): Likewise.
9700 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9702         * parse.y (create_new_parser_context): Use memset () instead of
9703         bzero ().
9705 2000-11-08  Tom Tromey  <tromey@cygnus.com>
9707         * gjavah.c (process_file): Only include gcj/cni.h when generating
9708         CNI stubs.
9710 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9712         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
9713         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
9714         instead of bzero ().
9716 2000-11-05  Tom Tromey  <tromey@cygnus.com>
9718         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
9719         * lex.c (IS_ZERO): New define.
9720         (java_perform_atof): Error on floating point underflow.
9722 2000-11-04  Tom Tromey  <tromey@cygnus.com>
9724         * lex.c (java_parse_escape_sequence): Only read two octal
9725         characters if the first one is greater than 3.  Don't allow
9726         "octal" numbers to include the digits 8 or 9.
9728 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9730         * Make-lang.in (java.distdir): Remove.
9732 2000-11-03  Tom Tromey  <tromey@cygnus.com>
9734         * Make-lang.in (java.dvi): New target.
9735         Partial fix for PR other/567.
9737         * lang-options.h: Mention -Wout-of-date.
9738         * jcf-dump.c (flag_newer): New global.
9739         * gjavah.c (flag_newer): New global.
9740         * jcf-io.c (find_class): Only warn when flag_newer set.
9741         * lang.c (flag_newer): New global.
9742         (struct string_option): New declaration.
9743         (lang_W_options): New global.
9744         (process_option_with_no): New function.
9745         (lang_decode_option): Use it.
9747         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
9748         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
9749         `$'.
9751         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
9752         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
9753         * lex.c (java_read_unicode): Removed `term_context' argument.
9754         Recognize any number of `u' in `\u'.
9755         (java_read_unicode_collapsing_terminators): New function.
9756         (java_get_unicode): Use it.
9757         (java_lineterminator): Removed.
9758         (yylex): Produce error if character literal is newline or single
9759         quote.  Return if eof found in middle of `//' comment.  EOF in
9760         `//' comment is only an error if pedantic.
9761         (java_ignorable_control_p): New function.
9762         (java_parse_end_comment): Return if eof found in middle of
9763         comment.
9764         Include flags.h.
9765         * jv-scan.c (pedantic): New global.
9767 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9769         * parse.y (outer_field_access_p): Inherited fields aren't
9770         consider outer fields.
9771         (maybe_build_thisn_access_method): Use
9772         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
9773         (resolve_expression_name): Trigger an error if a static field
9774         is being accessed as an outer field.
9776 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9778         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
9779         Fixes gcj/365.
9781 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
9783         * Make-lang.in: Move all build rules here from Makefile.in,
9784         adapt to new context.  Wrap all rules that change the current
9785         directory in parentheses.  Expunge all references to $(P).
9786         When one command depends on another and they're run all at
9787         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
9788         all object-file generation rules.  Delete obsolete variables.
9790         * Makefile.in: Delete.
9791         * config-lang.in: Delete outputs= line.
9793 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9795         * parse.y (patch_method_invocation): NULLify this_arg when already
9796         inserted.
9797         (maybe_use_access_method): Handle call to methods unrelated to the
9798         current class. Fixed comment.
9799         Fixes gcj/361.
9801 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9803         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
9804         scope.
9806 2000-10-24  Tom Tromey  <tromey@cygnus.com>
9808         * lex.c (java_new_lexer): Initialize new fields.  Work around
9809         broken iconv() implementations.
9810         (java_read_char): Swap bytes if required.  Use fallback decoder if
9811         required.
9812         (byteswap_init, need_byteswap): New globals.
9813         (java_destroy_lexer): Only close iconv handle if it is in use.
9814         * lex.h (java_lexer): New fields read_anything, byte_swap,
9815         use_fallback.
9816         Made out_buffer unsigned.
9818 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9820         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
9821         where an enclosing context can be set on the jdep.
9822         (do_resolve_class): Fixed identation.
9824 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9826         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
9828         * jcf-reader.c (peek_attribute, skip_attribute): Only define
9829         when requested.
9831         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
9833         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
9835 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9837         * jcf-write.c (OP1): Update `last_bc'.
9838         (struct jcf_block): Fixed indentation and typo in comments.  New
9839         field `last_bc'.
9840         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
9841         follows `monitorenter'.
9842         * parse.y (patch_synchronized_statement): New local `tmp'. Call
9843         `patch_string'.
9844         Fixes gcj/232.
9846 2000-10-16  Tom Tromey  <tromey@cygnus.com>
9848         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
9849         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
9850         * lang-options.h: Added -MA, -MT, -MF..
9851         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
9852         (DEPEND_TARGET_SET): New macro.
9853         (DEPEND_FILE_ALREADY_SET): Likewise.
9854         (init_parse): Handle new flags.
9855         * jcf.h (jcf_dependency_print_dummies): Declare.
9856         * Make-lang.in (s-java): Added mkdeps.o.
9857         * Makefile.in (BACKEND): Added mkdeps.o.
9858         (../gcjh$(exeext)): Added mkdeps.o.
9859         (../jcf-dump$(exeext)): Added mkdeps.o.
9860         * jcf-depend.c: Include mkdeps.h.
9861         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
9862         add_entry): Removed.
9863         (jcf_dependency_reset): Rewrote.
9864         (dependencies): New global.
9865         (jcf_dependency_set_target): Rewrote.
9866         (jcf_dependency_add_target): Likewise.
9867         (jcf_dependency_add_file): Likewise.
9868         (munge): Removed.
9869         (print_ents): Removed.
9870         (jcf_dependency_write): Rewrote.
9871         (print_dummies): New global.
9872         (jcf_dependency_print_dummies): New function
9873         (jcf_dependency_write): Call deps_dummy_targets if required.
9875 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9877         * gjavah.c (add_class_decl): Removed unused variables `tname',
9878         `tlen' and `name_index'.
9879         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
9880         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
9881         in `wfl_operator' with value.
9882         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
9883         (jcf_figure_file_type): Fixed identation.
9884         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
9885         * parse.y (analyze_clinit_body): New function.
9886         (static_initializer:): Reset `current_static_block'.
9887         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
9888         `wfl_operator' with new value.
9889         (lookup_cl): Use EXPR_WFL_FILENAME.
9890         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
9891         analyze_clinit_body.
9892         (build_outer_field_access): Access to this$<n> built from
9893         current_class, not its outer context.
9894         (build_access_to_thisn): Fixed leading comment. Tidied things up.
9895         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
9896         (patch_method_invocation): Use `is_static_flag' when already
9897         initialized.
9898         (patch_newarray): Removed assignment in ternary operator.
9900 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9902         * except.c (free_eh_ranges): Don't free `whole_range'.
9904 2000-10-15  Anthony Green  <green@redhat.com>
9906         * decl.c (init_decl_processing): Call init_class_processing before
9907         anything else.
9909 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9911         * check-init.c (check_init): Fixed leading comment. Use
9912         LOCAL_FINAL_P.
9913         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9914         (give_name_to_locals): Likewise.
9915         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
9916         fields in lang_decl_var.
9917         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
9918         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
9919         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
9920         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
9921         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
9922         (LOCAL_FINAL): Rewritten.
9923         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
9924         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
9925         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
9926         `init_final' fields.
9927         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
9928         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
9929         (TYPE_HAS_FINAL_VARIABLE): New macro.
9930         (struct lang_type): Added `afv' field.
9931         * parse.y (check_static_final_variable_assignment_flag): New function.
9932         (reset_static_final_variable_assignment_flag): Likewise.
9933         (check_final_variable_local_assignment_flag): Likewise.
9934         (reset_final_variable_local_assignment_flag): Likewise.
9935         (check_final_variable_indirect_assignment): Likewise.
9936         (check_final_variable_global_assignment_flag): Likewise.
9937         (add_inner_class_fields): Use LOCAL_FINAL_P.
9938         (register_fields): Handle local finals and final variables.
9939         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
9940         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9941         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
9942         on local finals.
9943         (java_complete_expand_methods): Loop to set
9944         TYPE_HAS_FINAL_VARIABLE. Call
9945         `reset_final_variable_local_assignment_flag' and
9946         `check_final_variable_local_assignment_flag' accordingly before
9947         and after constructor expansion. Call
9948         `reset_static_final_variable_assignment_flag'
9949         before expanding <clinit> and after call
9950         `check_static_final_variable_assignment_flag' if the
9951         current_class isn't an interface. After all methods have been
9952         expanded, call `check_final_variable_global_assignment_flag' and
9953         `check_static_final_variable_assignment_flag' if the current class
9954         is an interface.
9955         (maybe_yank_clinit): Fixed typo in comment.
9956         (build_outer_field_access_methods): Removed old sanity check. Use
9957         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
9958         Don't create access methods for finals.
9959         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
9960         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
9961         existing DECL_INIT has been processed.
9962         (java_complete_lhs): Likewise.
9963         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
9964         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
9965         logic.
9966         (patch_assignment): Use LOCAL_FINAL_P.
9967         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
9968         DECL_INITIAL is nullified.
9969         Fixes gcj/163.
9971 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9973         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
9975         * Makefile.in (parse.c, parse-scan.c): Likewise.
9977 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
9979         * class.c (temporary_obstack): Remove.
9980         (make_class): Don't mess with obstascks.
9981         (push_class): Likewise.
9982         (set_super_info): Likewise.
9983         (add_method_1): Likewise.
9984         (add_method): Likewise.
9985         (add_field): Likewise.
9986         (build_utf8_ref): Likewise.
9987         (build_class_ref): Likewise.
9988         (build_static_field_ref): Likewise.
9989         (finish_class): Likewise.
9990         (push_super_field): Likewise.
9991         (layout_class): Likewise.
9992         (layout_class_methods): Likewise.
9993         (init_class_processing): Likewise.
9994         * constants.c (get_tag_node): Likewise.
9995         (build_constant_data_ref): Likewise.
9996         * decl.c (ggc_p): Remove.
9997         (copy_lang_decl): Use ggc_alloc.
9998         (complete_start_java_method): Don't mess with obstacks.
9999         (start_java_method): Likewise.
10000         (end_java_method): Likewise.
10001         * except.c (link_handler): Use xmalloc.
10002         (free_eh_ranges): New function.
10003         (method_init_exceptions): Use it.
10004         (add_handler): Use xmalloc.
10005         (expand_start_java_handler): Don't mess with obstacks.
10006         (prepare_eh_table_type): Likewise.
10007         (expand_end_java_handler): Likewise.
10008         * expr.c (push_value): Likewise.
10009         (create_label_decl): Likewise.
10010         (build_jni_stub): Likewise.
10011         (java_lang_expand_expr): Likewise.
10012         (note_instructions): Use xrealloc.
10013         (java_push_constant_from_pool): Don't mess with obstacks.
10014         (process_jvm_instruction): Likewise.
10015         * java-tree.h (cyclic_inheritance_report): Remove duplicate
10016         declaration.
10017         * jcf-parse.c (get_constant): Don't mess with obstacks.
10018         (read_class): Likewise.
10019         (jcf_parse): Likewise.
10020         * lex.c (expression_obstack): Remove.
10021         (java_lex): Don't use obstack_free.
10022         * parse.h (exit_java_complete_class): Don't mess with obstacks.
10023         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
10024         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
10025         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
10026         * parse.y (gaol): Add more GC roots.
10027         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
10028         (lookup_field_wrapper): Likewise.
10029         (obtain_incomplete_type): Don't mess with obstacks.
10030         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
10031         macros.
10032         (craft_constructor): Don't mess with obstacks.
10033         (safe_layout_class): Likewise.
10034         (java_complete_class): Likewise.
10035         (source_end_java_method): Likewise.
10036         (build_outer_field_access_methods): Likewise.
10037         (build_outer_method_access_method): Likewise.
10038         (maybe_build_thisn_access_method): Likewise.
10039         (build_dot_class_method_invocation): Likewise.
10040         (java_complete_tree): Likewise.
10041         (java_complete_lhs): Likewise.
10042         (do_merge_string_cste): Likewise.
10043         (patch_string_cst): Likewise.
10044         (array_constructor_check_entry): Likewise.
10045         * typeck.c (build_java_array_type): Likewise.
10046         (parse_signature_string): Likewise.
10047         (build_java_signature): Likewise.
10049 2000-10-12  Tom Tromey  <tromey@cygnus.com>
10051         Fix for PR gcj/356:
10052         * gjavah.c (add_class_decl): Don't special-case inner classes.
10053         (add_namelet): Likewise.
10055 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
10057         * java-tree.h: Constify current_encoding.
10058         * lang.c: Constify current_encoding.
10060 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
10062         * jvgenmain.c (class_mangling_suffix): Omit `.'.
10063         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
10065 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10067         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
10068         patch. Fixes gcj/340.
10070 2000-10-10  Tom Tromey  <tromey@cygnus.com>
10072         * lex.c (java_new_lexer): Initialize out_first and out_last
10073         fields.
10074         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
10076 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10078         * parse.y (pop_current_osb): New function.
10079         (array_type:): Use `dims:', changed actions
10080         accordingly. Suggested by Anthony Green.
10081         (array_creation_expression:): Used pop_current_osb.
10082         (cast_expression:): Likewise.
10083         (search_applicable_method_list): Fixed indentation.
10085 2000-10-08  Anthony Green  <green@redhat.com>
10087         * parse.y (array_type_literal): Remove production.
10088         (type_literals): Refer to array_type, not array_type_literal.
10090 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10092         Patch contributed by Corey Minyard.
10093         * decl.c (check_local_named_variable): New function.
10094         (tree check_local_unnamed_variable): Likewise.
10095         (find_local_variable): Splitted. Call check_local_{un}named_variable.
10097 2000-10-07  Anthony Green  <green@redhat.com>
10099         * class.c (layout_class): Handle case where superclass can't be
10100         layed out yet.
10102 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10104         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
10105         gperf.
10107 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10109         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
10110         * jvgenmain.c (class_mangling_prefix): Removed.
10111         (class_mangling_suffix): New global.
10112         (main): Use it.
10113         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
10114         `$'.
10115         (print_method_info): Handle overrides for static and final
10116         methods.
10117         (process_file): Generate declaration for class object field.
10118         * class.c (cxx_keywords): New array.
10119         (utf8_cmp): New function.
10120         (cxx_keyword_p): New function.
10121         (layout_class_method): Mangle C++ keywords by appending `$'.
10122         (mangle_field): New function.
10123         (mangle_class_field): Use mangle_field.  Mangle class name as
10124         `class$'.
10125         (mangle_static_field): Use mangle_field.
10127 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10129         * decl.c (find_local_variable): Removed uncessary type check and
10130         fixed range check typo. From Corey Minyard.
10132 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10134         * decl.c (give_name_to_locals): New local `code_offset'. Call
10135         `maybe_adjust_start_pc'.
10136         * expr.c (note_instructions): New function.
10137         (expand_byte_code): Don't collect insn starts here.
10138         (peek_opcode_at_pc): New function.
10139         (maybe_adjust_start_pc): Likewise.
10140         * java-tree.h (maybe_adjust_start_pc): Declare.
10141         (note_instructions): Likewise.
10142         * jcf-parse.c (parse_class_file): Call `note_instructions'.
10144 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10146         * parse.y (field_access:): Fixed indentation.
10147         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
10149 2000-09-07  Tom Tromey  <tromey@cygnus.com>
10151         Fix for PR gcj/307:
10152         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
10153         JPRIMITIVE_TYPE_P, for arithmetic operators.
10154         (patch_method_invocation): Indentation fix.
10155         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
10156         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
10157         (do_unary_numeric_promotion): Cleaned up code.
10158         (valid_cast_to_p): Handle boolean correctly.
10160 2000-09-27  Tom Tromey  <tromey@cygnus.com>
10162         * lex.c (java_read_unicode): Reset bs_count when finished with
10163         `\u' sequence.
10165 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10167         Convert to GC.
10168         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
10169         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
10170         (typeck.o): Depend on ggc.h.
10171         * class.c (add_method_1): Use GC functions for allocation.
10172         (init_class_processing): Register roots.
10173         * decl.c (ggc_p): Set to 1.
10174         (pending_local_decls): Make it static.
10175         (push_jvm_slot): Use GC functions for allocation.
10176         (init_decl_processing): Register roots.
10177         (give_name_to_locals): Use GC functions for allocation.
10178         (lang_mark_tree): New function.
10179         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
10180         functions for allocation.
10181         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
10182         * lex.c (java_lex): Use build_string, rather than replicating it
10183         inline.
10184         * parse.y (goal): Add more roots.
10185         (mark_parser_ctxt): New function.
10186         * typeck.c: Include ggc.h.
10188 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10190         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
10191         contains something else than MODIFY_EXPR.
10193 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
10195         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
10196         * Makefile.in (parse.o): Depend on ggc.h.
10197         (class.o): Likewise.
10198         (constants.o): Likewise.
10199         (decl.o): Likewise.
10200         (expr.o): Likewise.
10201         (jcf-parse.o): Likewise.
10202         (jcf-write.o): Likewise.
10203         (mangle.o): Likewise.
10204         * class.c: Include ggc.h.
10205         (build_static_field_ref): Register GC roots.
10206         (layout_class): Likewise.
10207         (init_class_processing): Likewise.
10208         * constants.c: Include ggc.h.
10209         (current_constant_pool_data_ref): Remove.
10210         (tag_nodes): Move it to ...
10211         (get_tag_node): ... here.  Register GC roots.
10212         * decl.c: Include ggc.h.  Remove many global tree definitions.
10213         (throw_node): Define.
10214         (java_global_trees): Likewise.
10215         (predef_filenames): Make the size a constant.
10216         (init_decl_processing): Adjust accordingly.
10217         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
10218         * expr.c: Include ggc.h.
10219         (init_expr_processing): Register GC roots.
10220         (build_invokeinterface): Likewise.
10221         * java-tree.h: Replace extern tree declarations with macros.
10222         (java_global_trees): New variable.
10223         (java_tree_index): New enumeration.
10224         (init_jcf_parse): Declare.
10225         * jcf-parse.c: Include ggc.h.
10226         (current_class): Remove declaration.
10227         (main_class): Likewise.
10228         (all_class_list): Likewise.
10229         (predefined_filename_p): Adjust for constant size of
10230         predef_filenames.
10231         (init_jcf_parse): New function.
10232         * jcf-write.c: Include ggc.h.
10233         (generate_classfile): Register GC roots.
10234         (append_synthetic_attribute): Likewise.
10235         (append_innerclass_attribute_entry): Likewise.
10236         * lang.c: Include ggc.h.
10237         (lang_print_error): Register GC roots.
10238         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
10239         with macros.
10240         * parse.y: Include ggc.h.
10241         (wfl_operator): Remove.
10242         (goal): Register GC roots.
10243         (java_pop_parser_context): Adjust for new field names.
10244         (java_parser_context_save_global): Likewse.
10245         (java_parser_context_restore_global): Likewise.
10246         (java_parser_context_suspend): Likewise.
10247         (java_parser_context_resume): Likewise.
10248         (verify_constructor_circularity): Register GC roots.
10249         (lookup_cl): Likewise.
10250         (java_reorder_fields): Likewise.
10251         (build_current_this): Likewise.
10252         (class_in_current_package): Likewise.
10253         (argument_types_convertible): Likewise.
10254         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
10256 2000-09-14  Tom Tromey  <tromey@cygnus.com>
10258         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
10260 2000-09-13  Tom Tromey  <tromey@cygnus.com>
10262         * jcf-parse.c: Include <locale.h>.
10263         * jv-scan.c: Include <locale.h>.
10265 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10267         * expr.c (pop_type_0): Return `Object' if trying to merge two
10268         interface types.
10269         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
10270         interface types; `Object' is always a valid supertype.
10272 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10274         Fix for PR gcj/33:
10275         * jv-scan.c (help): Document --encoding.
10276         (options): Added `encoding' entry.
10277         (OPT_ENCODING): New define.
10278         (main): Handle --encoding.
10279         Include <langinfo.h> if nl_langinfo exists.
10280         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
10281         --encoding.
10282         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
10283         (parse_source_file): Correctly call java_init_lex.  Added `finput'
10284         argument.  Use nl_langinfo to determine default encoding.
10285         * java-tree.h (current_encoding): Declare.
10286         * parse.y (java_parser_context_restore_global): Don't restore
10287         `finput'.
10288         (java_parser_context_save_global): Don't set `finput' field.
10289         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
10290         if required.
10291         * lang.c (current_encoding): New global.
10292         (lang_decode_option): Recognize `-fencoding='.
10293         (finish_parse): Don't close finput.
10294         * parse.h (struct parser_ctxt): Removed `finput' and
10295         `unget_utf8_value' fields.  Added `lexer' field.
10296         (java_init_lex): Fixed declaration.
10297         * lex.c (java_new_lexer): New function.
10298         (java_destroy_lexer): Likewise.
10299         (java_read_char): Added `lex' argument.  Handle iconv case.
10300         (java_read_unicode): Added `lex' argument.  Count backslashes in
10301         lexer structure.
10302         (java_init_lex): Added `finput' and `encoding' arguments.  Set
10303         `lexer' field in ctxp.
10304         (BAD_UTF8_VALUE): Removed.
10305         (java_lex): Handle seeing UEOF in the middle of a string literal.
10306         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
10307         (java_lexer): New structure.
10308         (UNGETC): Removed.
10309         (GETC): Removed.
10310         (DEFAULT_ENCODING): New define.
10311         (java_destroy_lexer): Declare.
10313 2000-09-12  Tom Tromey  <tromey@cygnus.com>
10315         Fix for PR gcj/343:
10316         * lex.c (java_init_lex): Initialize java_io_serializable.
10317         * parse.y (java_io_serializable): New global.
10318         (valid_ref_assignconv_cast_p): An array can be cast to
10319         serializable.
10321 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10323         * decl.c, expr.c: Include defaults.h if not already included.
10324         Don't define the *_TYPE_SIZE macros.
10326 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
10328         * typeck.c (build_java_array_type): Correct first parameter
10329         in ADJUST_FIELD_ALIGN invocation.
10331 2000-09-06  Tom Tromey  <tromey@cygnus.com>
10333         * lang-specs.h: Also recognize `-femit-class-files'.
10335 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10337         * verify.c (merge_types): Load the types to merge if necessary.
10339 2000-09-02  Anthony Green  <green@redhat.com>
10341         * jcf-io.c: Include zlib.h.
10342         (open_in_zip): Read compressed class file archives.
10343         * zipfile.h (ZipDirectory): Add uncompressed_size and
10344         compression_method fields.
10345         * zextract.c (read_zip_archive): Collect file compression info.
10347 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
10349         * parse.y (do_resolve_class): Also explore superclasses of
10350         intermediate enclosing contexts when searching for inner classes.
10352 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10354         * parse.y (variable_declarator_id:): Better error message.
10355         (expression_statement:): Use YYNOT_TWICE.
10356         (cast_expression:): Likewise.
10357         (assignment:): Likewise.
10359 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10361         * parse.y (do_merge_string_cste): New locals. Create new
10362         STRING_CSTs each time, use memcpy. Fixes gcj/311.
10364 2000-08-07  Hans Boehm  <boehm@acm.org>
10366         * boehm.c (mark_reference_fields): Set marking bits for all words in
10367         a multiple-word record.
10368         (get_boehm_type_descriptor): Use the procedure marking descriptor for
10369         java.lang.Class.
10371 2000-08-31  Mike Stump  <mrs@wrs.com>
10373         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
10374         jcf-dump$(exeext)): Make parallel safe.
10376 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10378         * jcf-parse.c (set_source_filename): Constify a char *.
10379         * jcf-write.c (append_innerclasses_attribute,
10380         make_class_file_name): Constify a char *.  Don't recycle a
10381         variable for an unrelated purpose.
10382         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
10383         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
10385 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10387         * expr.c (can_widen_reference_to): Fixed indentation.
10388         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
10389         * parse.y: `finit$' replaces `$finit$' in comments.
10390         (try_builtin_assignconv): Fixed leading comment.
10392 2000-08-25  Greg McGary  <greg@mcgary.org>
10394         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
10396 2000-08-24  Greg McGary  <greg@mcgary.org>
10398         * lang.c (lang_decode_option): Use ARRAY_SIZE.
10399         * parse.y (BINOP_LOOKUP): Likewise.
10401 2000-08-22  Andrew Haley  <aph@cygnus.com>
10403         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
10404         sign extending. Fixes gcj/321.
10405         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
10406         combining to make a jlong. Fixes gcj/321.
10408 2000-08-21  Nix  <nix@esperi.demon.co.uk>
10410         * lang-specs.h: Do not process -o or run the assembler if
10411         -fsyntax-only.
10413 2000-08-16  Andrew Haley  <aph@cygnus.com>
10415         * typeck.c (build_java_array_type): Rewrite code to do array
10416         alignment.  Take into account back-end macros when aligning array
10417         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
10418         user to set alignment. Fixes gcj/252 and 160.
10420 2000-08-09  Tom Tromey  <tromey@cygnus.com>
10422         * parse.y (check_abstract_method_definitions): Now return `int'.
10423         Check implemented interfaces.  Fixes PR gcj/305.
10425         * parse.y (patch_switch_statement): Disallow `long' in switch
10426         expressions.  Fixes PR gcj/310.
10428 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10430         * decl.c (finit_leg_identifier_node): New global.
10431         (init_decl_processing): Use `finit$' to initialize
10432         finit_identifier_node. Use `$finit$' to initialize
10433         finit_leg_identifier_node.
10434         * expr.c (expand_java_field_op): Use ID_FINIT_P.
10435         * java-tree.h (finit_identifier_node): Changed attached comment.
10436         (finit_leg_identifier_node): New declaration.
10437         (ID_FINIT_P): Take finit_identifier_node and
10438         finit_leg_identifier_node into account. This is a backward
10439         compatibility hack.
10441 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10443         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
10444         Jan 6 2000 patch.
10445         (generate_bytecode_insns): Check `nargs' before emitting it.
10446         * verify.c (merge_type_state): Fixed typo.
10447         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
10448         generate_bytecode_{conditional,insns}.
10450 2000-08-13  Anthony Green  <green@redhat.com>
10452         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
10453         for -pg builds).
10455 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10457         * class.c (maybe_layout_super_class): Fixed indentation.
10458         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
10459         (java_check_methods): New function declaration.
10460         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
10461         instead of `str_ptr'.
10462         * jcf-write.c (generate_bytecode_insns): Emit number the of args
10463         of a `invokeinterface' at the right time.
10464         * parse.h (WFL_STRIP_BRACKET): New macro.
10465         (SET_TYPE_FOR_RESOLUTION): Use it.
10466         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
10467         (check_class_interface_creation): Don't check for cross package
10468         innerclass name clashes.
10469         (method_header): Behave properly if MDECL is `error_mark_node'.
10470         (method_declarator): Return `error_mark_node' if bogus current
10471         class.
10472         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
10473         (resolve_and_layout): New local `decl_type', set and used. Call
10474         java_check_methods.
10475         (java_check_methods): New method.
10476         (java_layout_classes): Use it.
10477         (resolve_qualified_expression_name): No EH check necessary in
10478         access$<n>.
10479         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
10480         `case' statement.
10481         (patch_assignment): Set DECL_INITIAL on integral final local.
10483 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10485         * java-tree.h (flag_extraneous_semicolon): New extern.
10486         * lang-options.h: (-Wextraneous-semicolon): New option.
10487         * lang.c (flag_redundant): Fixed typo in leading comment.
10488         (flag_extraneous_semicolon): New global.
10489         (lang_decode_option): Set `flag_extraneous_semicolon' when
10490         -Wall. Decode `-Wextraneous-semicolon'.
10491         * parse.y (type_declaration:): Removed `SC_TK' hack, added
10492         `empty_statement' rule.
10493         (class_body_declaration): Likewise.
10494         (method_body:): Accept `;' as a method body.
10495         (static_initializer:): Removed `SC_TK' hack.
10496         (constructor_block_end:): Likewise.
10497         (empty_statement:): Report deprecated empty declaration. Fixes
10498         gcj/295
10500 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10502         * parse.y (build_dot_class_method_invocation): Changed parameter
10503         name to `type'. Build signature from `type' and convert it to a
10504         STRING_CST if it's an array.
10505         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
10506         to use `ref_type' directly.
10508 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
10510         * lang-options.h: Added a comma after the last element to avoid
10511         syntax errors when other languages define additional options.
10513 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
10515         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
10516         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
10517         (jc1): Link with $(BACKEND).
10518         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
10520 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
10522         * jvspec.c: Adjust type of second argument to
10523         lang_specific_driver, and update code as necessary.
10525         * class.c (build_dtable_decl): Initialize dummy.
10527 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10529         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
10530         method bodies not to rule out discarding `<clinit>'; don't use
10531         <clinit> to initialize static fields with constant initializers.
10533 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10535         * gjavah.c (print_method_info): Added `synth' parameter. Skip
10536         synthetic methods.
10537         (method_synthetic): New global.
10538         (HANDLE_METHOD): Recognize synthetic method and tell
10539         `print_method_info' about it.
10540         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
10541         processing a synthetic method.
10542         * jcf-reader.c (skip_attribute): New function.
10543         ( skip_attribute): Likewise.
10545 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10547         * parse.y (build_outer_field_access): Fixed comments.
10548         (fix_constructors): Emit the initialization of this$<n> before
10549         calling $finit$.
10550         (resolve_qualified_expression_name): Build an access to `decl' if
10551         necessary.
10553 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10555         * parse-scan.y (curent_class): Non longer const.
10556         (inner_qualifier, inner_qualifier_length): Deleted.
10557         (current_class_length): New global.
10558         (bracket_count): Fixed typo in leading comment.
10559         (anonymous_count): New global.
10560         (class_instance_creation_expression:): Handle anonymous classes.
10561         (anonymous_class_creation:): New rule.
10562         (push_class_context): Rewritten.
10563         (pop_class_context): Likewise.
10564         (INNER_QUALIFIER): Macro deleted.
10565         (report_class_declaration): call `push_class_context' when
10566         entering the function. `fprintf' format modified not to use
10567         INNER_QUALIFIER.
10568         (report_class_declaration): Assign `package_name' and
10569         `current_class' to NULL separately.
10571 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10573         * expr.c (build_invokeinterface): Call layout_class_methods on
10574         target interface.
10576 2000-07-27  Tom Tromey  <tromey@cygnus.com>
10577             Anthony Green  <green@cygnus.com>
10578             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10580         * class.c (make_class_data): Create vtable for abstract classes.
10581         (get_dispatch_table): Changed to cope with abstract classes.
10583 2000-07-27  Tom Tromey  <tromey@cygnus.com>
10585         * parse.y (patch_method_invocation): Don't reverse the argument
10586         list when dealing with anonymous class constructors. Fixed typo in
10587         comment.
10589 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10591         * parse.y (build_alias_initializer_parameter_list): Reverse
10592         crafted list when building aliases for anonymous class
10593         constructors.
10595 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10597         * parse.y (jdep_resolve_class): Don't bother checking potential
10598         innerclass access if `decl' is NULL.
10599         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
10600         WFL.
10602 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10604         * parse.c: Remove (again.)
10606 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10608         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
10609         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
10610         outside the `if' statement, alias to innerclass removed, `decl'
10611         used to mark the class complete.
10613 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10615         * parse.y (simple_name:): Fixed typo in error message.
10617 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10619         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
10620         or its first operand can be error marks.
10622 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10624         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
10625         * parse.y (method_header): Likewise.
10627 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10629         * parse.y (process_imports): Consider that one might be trying to
10630         import an innerclass. Fixes gcj/254
10632 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10634         * parse.y (find_as_inner_class): Handle the case where the
10635         enclosing context of an innerclass has been loaded as bytecode.
10637 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10639         * parse.y (simple_name:): Reject `$' in type names.
10640         (resolve_type_during_patch): Use `type' as a second
10641         argument to resolve_no_layout. Fixes gcj/257.
10643 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
10645         * parse.y (find_most_specific_methods_list): Select the only
10646         non-abstract method even if max has been set.
10647         Fixes gcj/285, gcj/298.
10649 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
10651         * lang-specs.h: Added %(jc1) to java compiler options.
10653 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
10655         * .cvsignore: New file.
10657 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10659         * parse.y (not_accessible_p): Access granted to innerclasses
10660         (indirectly) extending the reference type. Fixes gcj/249.
10662 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10664         * parse.y (patch_method_invocation): Fixed comment.
10665         (maybe_use_access_method): Build this$<n>s to the context of the
10666         target method, or a type that extends it. Fixes gcj/242.
10668 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
10670         * parse.c: Remove.
10672 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10674         * parse.y (fold_constant_for_init): Avoid bullish conversion.
10676 2000-07-13  Tom Tromey  <tromey@cygnus.com>
10678         * lang-specs.h: Added %{I*}.
10680 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
10682         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
10684 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
10686         * parse-scan.c: Remove.
10688 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10690         * class.c (set_super_info): Handled protected inner classes.
10691         (common_enclosing_context_p): Bail early if arguments aren't both
10692         inner classes.
10693         (get_access_flags_from_decl): Handle private and protected inner
10694         classes.
10695         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
10696         (CLASS_PROTECTED): Likewise.
10697         (struct lang_type): New bitfield `poic'.
10698         * parse.y (jdep_resolve_class): Call check_inner_class_access on
10699         inner classes only.
10700         (check_inner_class_access): Renamed arguments, added
10701         comments. Handles protected inner classes (fixes gcj/225)
10702         (not_accessible_p): Fixed comments. Avoid handling inner classes.
10704 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10706         * parse.y (resolve_qualified_expression_name): Verify qualified
10707         access to `this'. Fixes gcj/239.
10709 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10711         * jcf-write.c (generate_classfile): Don't install ConstantValue
10712         for null pointers.
10714 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10716         * parse.y (resolve_qualified_expression_name): Handle inner class
10717         access. Fixes gcj/256.
10719 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10721         * jcf-write.c (generate_classfile): Properly install the
10722         ConstantValue attribute and the initial value constant pool index
10723         on string constants.
10724         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
10725         class files.
10727 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10729         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
10730         construct.
10731         * parse.y (find_as_inner_class): Fixed typo.
10732         (do_resolve_class): Explore enclosing contexts when searching for
10733         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
10734         (check_inner_class_access): Check `decl' which can be null in case
10735         of previous errors.
10737 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10739         * java-tree.h (java_debug_context): Declared `extern'.
10740         (safe_layout_class): Likewise.
10741         * parse.y (resolve_field_access): Field must be `static' in order
10742         to be replaced by its initial value. Added comments.
10743         (find_applicable_accessible_methods_list): Fixed typo.
10744         (find_most_specific_methods_list): Methods found in innerclasses
10745         take over methods founds in the enclosing contexts.
10746         (java_complete_tree): Loosen restrictions on the type of DECLs
10747         that can be replaced by their initialization values.
10748         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
10750 2000-07-05  Tom Tromey  <tromey@cygnus.com>
10752         * Make-lang.in (PARSE_DIR): New macro.
10753         (PARSE_RELDIR): Likewise.
10754         (PARSE_C): Likewise.
10755         (PARSE_SCAN_C): Likewise.
10756         ($(PARSE_C)): New target.
10757         ($(PARSE_SCAN_C)): Likewise.
10758         (SET_BISON): New macro.
10759         (BISONFLAGS): Likewise.
10760         (JAVABISONFLAGS): Likewise.
10762 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
10764         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
10765         argument on the first pass for CNI as well as JNI.
10766         (print_method_info): Set up method name on the first pass only.
10768 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10770         * parse.y (parser_qualified_classname): Removed parameter
10771         `is_static'.
10772         (create_interface): Removed first passed parameter to
10773         parser_qualified_classname.
10774         (create_class): Likewise. Don't install alias on static
10775         innerclasses. Fixes gcj/275.
10777 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10779         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
10780         debugable statement with empty_stmt_node. Fixes gcj/272
10782 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10784         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
10785         gcj/271.
10787 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10789         * jcf-write.c (push_long_const): Appropriately cast short negative
10790         constant to jword.
10792 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10794         * parse.y (verify_constructor_super): Use loop variable
10795         `m_arg_type' initialized with `mdecl_arg_type'.
10797 2000-06-29  Tom Tromey  <tromey@cygnus.com>
10799         * parse.y (resolve_field_access): Handle case where `type_found'
10800         is NULL.
10802 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10804         * expr.c (lookup_field): The same field can be found through two
10805         different interface. Don't declare it ambiguous in that case.
10807 2000-06-27  Tom Tromey  <tromey@cygnus.com>
10809         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
10810         follows \r, then unget it at a lower level.
10812 2000-06-26  Tom Tromey  <tromey@cygnus.com>
10814         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
10815         java_complete_tree.
10817 2000-06-25  Tom Tromey  <tromey@cygnus.com>
10819         * parse.y (for_statement): Wrap expression in a WFL if it is a
10820         constant.  For PR gcj/268.
10822 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10824         * parse.y (do_resolve_class): Minor optimiztion in the package
10825         list search. Removed unnecessary test and return statement.
10826         (valid_ref_assignconv_cast_p): Order of arguments to
10827         enclosing_context_p fixed.
10829 2000-06-24  Tom Tromey  <tromey@cygnus.com>
10831         * expr.c (lookup_field): Print error and return error_mark_node if
10832         field reference is ambiguous.
10834         * parse.y (check_abstract_method_definitions): Also check if
10835         `other_method' is abstract.
10837 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10839         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
10840         classes.
10841         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
10842         (struct lang_type): New field `pic'.
10843         (CLASS_PRIVATE): New macro.
10844         * parse.y (check_inner_class_access): New function.
10845         (jdep_resolve_class): Call it.
10847 2000-06-23  Tom Tromey  <tromey@cygnus.com>
10849         * parse.y (patch_incomplete_class_ref): Initialize the returned
10850         class.  For PR gcj/260.
10852 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10854         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
10856 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10858         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10859         Java specific checks.
10860         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
10861         screened by DECL_P.
10862         * java-tree.def (CASE_EXPR): Marked 'e'.
10863         (DEFAULT_EXPR): Likewise.
10864         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
10865         screened by DECL_P.
10866         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
10867         Java specific checks.
10868         (generate_bytecode_insns): Test try_block for BLOCK before using
10869         BLOCK_EXPR_BODY.
10870         * parse.y (build_wfl_wrap): Added `location' argument. Set
10871         EXPR_WFL_LINECOL accordingly.
10872         (dim_expr:): Wrap constants with WFLs.
10873         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
10874         (resolve_package): Check for `stmt' not being a BLOCK before
10875         building a debuggable statement with it.
10876         (make_qualified_primary): Added extra parameter to build_wfl_wrap
10877         invocation.
10878         (resolve_field_access): Make sure `decl' is a DECL before treating
10879         it as such.
10880         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
10881         IDENTIFIER_NODE before treating it as such.
10882         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
10883         treating it as such.
10884         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
10885         to be applied only on non array types.
10887 2000-06-16  Per Bothner  <per@bothner.com>
10889         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
10890         define in terms of DECL_RESULT, as that fails when --enable-checking.
10892 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10894         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
10895         types the same in comparison.
10896         (CHECK_OP): Add static prototype.
10898 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
10900         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
10901         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
10902         * parse.c: Rebuilt.
10904 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10906         * decl.c (create_primitive_vtable): Prototype.
10908         * jcf-write.c (generate_bytecode_insns): Initialize variable
10909         `saved_context'.
10911         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
10913 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10915         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
10916         to track searched classes, and do not search the same class more than
10917         once. Call find_applicable_accessible_methods_list on immediate
10918         superclass, instead of search_applicable_method_list on all ancestors.
10919         Fix for PR gcj/238.
10921 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
10923         * parse.y (register_fields): Permit static fields in inner classes
10924         if they are final. Fix for PR gcj/255.
10926 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10928         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
10929         * parse.y (find_in_imports): Returned type changed to void,
10930         leading comment fixed.
10931         (register_package): New function.
10932         (qualify_and_find): Likewise.
10933         (package_declaration:): Use `register_package'.
10934         (single_type_import_declaration:): Removed local variable
10935         `node'. Added missing `;' for consistency.
10936         (type_import_on_demand_declaration:): Use `chainon' to link new
10937         entries.
10938         (lookup_field_wrapper): Lookup local variables defined in outer
10939         contexts first.
10940         (java_complete_class): Don't reverse the list of imported on demand.
10941         (do_resolve_class): Reorganized. Removed local variable
10942         `original_name'. Call `qualify_and_find' with the current package
10943         name, invoke `find_in_imports_on_demand' right after. Call
10944         `qualify_and_find' with the packages we've seen so far. Fixed
10945         operations numbering in comments.
10946         (java_expand_class): Don't reverse `package_list'.
10947         (find_most_specific_methods_list): New local variables `abstract'
10948         and `candidates'. Use them to pick the right method.
10950 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
10952         * parse.y (check_modifiers_consistency): Don't subtract out
10953         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
10955 2000-06-04  Philipp Thomas  <pthomas@suse.de>
10957         * Makefile.in (INTLLIBS): New.
10958         (LIBS): Add above.
10959         (DEPLIBS): Ditto.
10961 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10963         * class.c (get_dispatch_table): Build the vtable dummy entry list
10964         element with a null purpose. Fixed leading comment.
10965         (build_dtable_decl): Build an accurate dtable type when appropriate
10966         and use it.
10968 2000-06-02  Richard Henderson  <rth@cygnus.com>
10970         * lang.c (lang_get_alias_set): New.
10972 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10974         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
10975         before using it as the accessed field.
10977 2000-05-31  Tom Tromey  <tromey@cygnus.com>
10979         * java-tree.h (boolean_array_vtable, byte_array_vtable,
10980         char_array_vtable, short_array_vtable, int_array_vtable,
10981         long_array_vtable, float_array_vtable, double_array_vtable):
10982         Declare.
10983         * expr.c (get_primitive_array_vtable): New function.
10984         (create_primitive_vtable): New function.
10985         (java_lang_expand_expr): Enable code to statically generate
10986         arrays.
10987         * decl.c (init_decl_processing): Create primitive vtables.
10988         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
10989         short_array_vtable, int_array_vtable, long_array_vtable,
10990         float_array_vtable, double_array_vtable): Define.
10992 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
10994         * java/parse.y (find_applicable_accessible_methods_list):
10995         Don't add an uninitialized value to the list.
10997 2000-05-25  Tom Tromey  <tromey@cygnus.com>
10999         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
11000         when trying to see if field's class should be initialized.  Always
11001         initialize field's declaring class, not qualified class.
11002         For PR gcj/162.
11004         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
11005         `wfl_operator', to maybe_build_primttype_type_ref.
11006         Fixes PR gcj/235.
11008 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
11010         * parse.y (patch_method_invocation): Don't try to lookup methods
11011         in primitive types.
11013 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11015         * parse.y (resolve_field_access): Call the appropriate <clinit>
11016         before accessing the length of a static array. Craft a decl for
11017         the field while its time. Fixes PR gcj/129.
11019 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11021         * parse.y (resolve_package): Correctly set `*next' (was off by
11022         one.)
11023         (resolve_qualified_expression_name): Fixed comment.
11025 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11027         * jcf-parse.c (jcf_parse_source): Reset current_class and
11028         current_function_decl to NULL before parsing a new file.
11030 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11032         * parse.y (block_end:): If the collected block doesn't feature a
11033         statement, insert an empty statement.
11035 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11037         * parse.y (maybe_yank_clinit): New function.
11038         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
11039         end of the list of methods belonging to a class.
11040         (java_complete_expand_method): Check whether <clinit> is really
11041         necessary and expand it accordingly.
11043 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11045         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
11046         processed by the method's switch statement.
11048 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11050         * java-tree.h: Added init state enum.
11051         * decl.c (emit_init_test_initialization): Initialize class
11052         initialization check variable by looking at class' state.
11054 2000-05-19  Tom Tromey  <tromey@cygnus.com>
11056         * java-tree.h (build_instanceof): Declare.
11057         (build_get_class): Declare.
11058         * parse.y (patch_binop): Use build_instanceof.
11059         * expr.c (build_instanceof): New function.  If class is final,
11060         don't make a function call.
11061         (expand_java_INSTANCEOF): Use it.
11062         (build_get_class): New function.
11064 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
11066         * jcf-write.c (generate_classfile): Scan the source_file for
11067         slashes with the right pointer variable.
11069 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
11071         * lang.c (lang_decode_option): Update -Wunused flags by calling
11072         set_Wunused.
11073         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
11075 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
11077         * check_init.c (check_init): Constify local char *.
11078         * class.c (push_class): Constify local char *.
11079         * java_tree.h: Update prototypes.
11080         * jcf-io.c (open_class): Constify filename parameter and
11081         return value.
11082         (find_class): Remove redundant string copy.  Cast return from
11083         open_class.
11084         * jcf-parse.c (read_class, parse_class_file, yyparse):
11085         Constify local char *.
11086         * jcf-write.c (generate_bytecode_insns, generate_classfile):
11087         Constify local char *.
11088         * jcf.h (JCF): Constify filename and classname.
11089         (JCF_FINISH): Cast args to FREE to char * when appropriate.
11090         * lang.c (init_parse): Constify parameter and return value.
11091         * lex.c (java_get_line_col): Constify filename parameter.
11092         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
11093         * parse.y (java_parser_context_suspend,
11094         issue_warning_error_from_context, safe_layout_class): Constify
11095         local char *.
11096         * parse.c: Regenerate.
11098 2000-05-08  Tom Tromey  <tromey@cygnus.com>
11100         * expr.c (build_jni_stub): Cache the result of
11101         _Jv_LookupJNIMethod.
11103 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11105         * decl.c (predef_filenames_size): Now 7.
11106         (predef_filenames): New seventh entry.
11108 2000-05-04  Tom Tromey  <tromey@cygnus.com>
11110         * boehm.c (mark_reference_fields): Don't mark RawData fields.
11111         Keep track of when we've seen a reference field after a
11112         non-reference field.
11113         (get_boehm_type_descriptor): Handle case where we see
11114         non-reference fields but no trailing reference field.
11115         * decl.c (rawdata_ptr_type_node): Define.
11116         (init_decl_processing): Initialize rawdata_ptr_type_node.
11117         * java-tree.h (rawdata_ptr_type_node): Declare.
11119 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11121         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
11122         specifiers in calls to fprintf.
11124 2000-05-03  Andrew Haley  <aph@cygnus.com>
11126         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
11128         * javaop.h (WORD_TO_INT): New function.
11129         (IMMEDIATE_s4): Use WORD_TO_INT.
11130         * jcf.h (JPOOL_INT): Ditto.
11132         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
11133         separator.
11135 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11137         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
11138         on native function.
11139         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
11140         JNI methods.
11141         * expr.c (build_jni_stub): New function.
11142         * lang-specs.h: -fjni and -femit-class-file are incompatible.
11143         * parse.c: Rebuilt.
11144         * parse.y (java_complete_expand_methods): Expand a native method
11145         and call build_jni_stub if -fjni given.
11146         * lang-options.h: Document -fjni.
11147         * lang.c (flag_jni): New global.
11148         (lang_f_options): Added `jni' entry.
11149         * java-tree.h (soft_lookupjnimethod_node,
11150         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
11151         Declare.
11152         (flag_jni): Declare.
11153         (build_jni_stub): Declare.
11154         (struct lang_decl): Added `native' flag.
11155         (METHOD_NATIVE): Redefined to use `native' field of lang specific
11156         structure.
11157         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
11158         soft_jnipopsystemframe_node): New globals.
11159         (init_decl_processing): Set them.  _Jv_InitClass only takes one
11160         argument.
11162         * java-tree.def: Put into `C' mode.
11164 2000-04-27  Tom Tromey  <tromey@cygnus.com>
11166         Fix for PR gcj/2:
11167         * expr.c (expand_invoke): Generate check to see if object pointer
11168         is null in nonvirtual invocation case.
11169         * java-tree.h (soft_nullpointer_node): Declare.
11170         * decl.c (soft_nullpointer_node): New global.
11171         (init_decl_processing): Initialize soft_nullpointer_node.
11172         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11173         or `private' methods.
11174         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11176 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11178         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
11179         from <clinit>
11181 2000-04-26  Tom Tromey  <tromey@cygnus.com>
11183         * zextract.c (find_zip_file_start): New function.
11184         (read_zip_archive): Use it.
11186 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11188         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
11190 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11192         * class.c (common_enclosing_context_p): New function.
11193         * java-tree.h (common_enclosing_context_p): Added prototype.
11194         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
11195         classes sharing an outer context with the current instance.
11196         * parse.y (build_access_to_thisn): Fixed leading comment.
11197         (verify_constructor_super): New local `supper_inner'. Skip
11198         enclosing context argument in the case of inner class constructors.
11199         (patch_method_invocation): Insert proper context as second
11200         parameter to pure inner class constructor super invocations.
11202 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11204         * parse.y (end_class_declaration): Reset the interface number
11205         counter.
11207 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11209         * parse.y (source_start_java_method): Deleted unnecessary code.
11210         (patch_method_invocation): Fixed comment.
11212 2000-04-24  Robert Lipe <robertlipe@usa.net>
11214         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
11216 2000-04-23  Tom Tromey  <tromey@cygnus.com>
11218         * boehm.c (mark_reference_fields): Use int_byte_position.
11220 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11222         * boehm.c (mark_reference_fields): Only call byte_position on
11223         non-static fields.
11225 2000-04-22  Tom Tromey  <tromey@cygnus.com>
11227         * boehm.c (mark_reference_fields): Added `last_view_index'
11228         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
11230 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
11232         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
11233         * parse.y (check_class_interface_creation): Fixed comments. Select
11234         permitted modifiers for (inner) interfaces. Changed error message
11235         to report rejected modifiers used with local classes.
11237 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11239         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
11240         of directly inherited type considered in scope.
11241         * parse.y (do_resolve_class): Search inherited classes for inner
11242         classes.
11244 2000-04-20  Tom Tromey  <tromey@cygnus.com>
11246         * parse.y (not_accessible_p): Use member's class, not current
11247         class, when doing inheritance check for protected reference.
11248         Fixes PR gcj/124.
11250 2000-04-20  Jason Schroeder  <shrode@subnature.com>
11252         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
11254 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11256         * parse.y (lookup_field_wrapper): Search for final local aliases.
11257         (resolve_expression_name): Let lookup_field_wrapper search for
11258         final local aliases. Force the value of `name' if one is found.
11259         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
11260         an expression name. Fixed comments.
11262 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11264         * parse.y (yyerror): `msg' can be null, don't use it in that case.
11266 2000-04-19  Tom Tromey  <tromey@cygnus.com>
11268         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
11270 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11272         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
11274 2000-04-18  Tom Tromey  <tromey@cygnus.com>
11276         PR gcj/211:
11277         * gjavah.c (utf8_cmp): Changed return value.
11278         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
11279         result.
11280         (cxx_keywords): New global.
11281         (get_field_name): Handle new result of cxx_keyword_subst.
11282         (print_method_info): Likewise.
11284 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
11286         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
11287         with a newline, for CNI.
11288         (print_stub_or_jni): Print a space or newline before method name for
11289         CNI as well as JNI.
11290         (print_cxx_classname): Don't write leading "::" in CNI stub method.
11291         (process_file): Include gcj/cni.h if generating CNI stubs.
11293 2000-04-16  Tom Tromey  <tromey@cygnus.com>
11295         * gjavah.c (decompile_method): Use print_field_name.
11296         Fixes PR gcj/205.
11298 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11300         * parse.y (java_expand_classes): Reverse the package list once.
11301         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
11302         reduction.
11303         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
11304         the `==' and `!=' operators.
11306 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11308         * jcf-write.c (generate_bytecode_insns): At invocation time,
11309         always relate an interface method to the type of its selector.
11311 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11313         Fix for PR gcj/2:
11314         * expr.c (expand_invoke): Generate check to see if object pointer
11315         is null in nonvirtual invocation case.
11316         * java-tree.h (soft_nullpointer_node): Declare.
11317         * decl.c (soft_nullpointer_node): New global.
11318         (init_decl_processing): Initialize soft_nullpointer_node.
11319         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
11320         or `private' methods.
11321         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
11323 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11325         Fix for PR gcj/140:
11326         * parse.y (check_final_assignment): Recognize assignments to the
11327         `length' field of an array when generating class files.
11329 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11331         * class.c (decl_hash): Prototype removed.
11332         (decl_compare): Likewise.
11334 2000-04-05  Tom Tromey  <tromey@cygnus.com>
11336         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
11337         * parse.y (check_modifiers_consistency): Check for final/volatile
11338         clash.  Fixes PR gcj/164.
11340 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11342         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
11343         made global.
11344         (java_hash_compare_tree_node): Renamed from `decl_compare, made
11345         global.
11346         (add_method_1): Use `java_hash_hash_tree_node' and
11347         `java_hash_compare_tree_node'.
11348         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
11349         (java_hash_compare_tree_node): Likewise.
11350         * parse.y (find_applicable_accessible_methods_list): Create,
11351         delete and use a hash table to remember already searched interfaces.
11353 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
11355         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
11356         with latest entry.
11358 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11360         * boehm.c (mark_reference_fields, set_bit): Prototype.
11361         (set_bit): Un-ANSI-fy definition.
11363         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
11364         Prototype.
11366         * decl.c (emit_init_test_initialization): Likewise.
11368         * gjavah.c (jni_print_char): Likewise.
11370         * parse.y (create_new_parser_context): Likewise.
11372 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11374         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
11375         patch missing hunk. Fixed indentation.
11377 2000-03-30  Tom Tromey  <tromey@cygnus.com>
11379         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
11380         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
11382 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11384         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
11385         when negative *before* using it as an array index.
11386         * ChangeLog: Fixed typo.
11388 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11390         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
11391         to 0 when it reaches -1.
11393 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11395         * jcf-parse.c (get_constant): Properly cast `num' during the
11396         invocation of `add_double'.
11397         * jcf-write.c (push_long_const): Properly cast `lo' before
11398         comparing it to short bounds.
11399         * parse-scan.y (interface_declaration:): Rule re-arrange so that
11400         `interface_body:' is reduced after the current interface is
11401         pushed.
11403 2000-03-26  Tom Tromey  <tromey@cygnus.com>
11405         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
11406         Java-specific `-f' option.
11408 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11410         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
11411         Adjust order of making types.
11412         Make bitsize_*_node values.
11414 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11416         * class.c (make_field_value): Use byte_position.
11417         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
11418         (java_array_data_offset): Likewise.
11419         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
11420         bzero call.
11422 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11424         * parse.y (check_abstract_method_definitions): New local
11425         `end_type_reached'. Make sure we also consider `end_type'.
11426         (java_check_abstract_method_definitions): Make sure we eventually
11427         consider `java.lang.Object'.
11428         (maybe_use_access_method): Don't use access method if not in the
11429         context of a pure inner class or if the method's context is right.
11430         (find_applicable_accessible_methods_list): New static flag
11431         `object_done'. Don't search abstract classes as interfaces. Fixed
11432         indentation. Fixed the `java.lang.Object' only search. Search
11433         class interface(s) first, then fully search enclosing contexts.
11434         (find_most_specific_methods_list): Pick the closest candidate when
11435         they're all abstract.
11437 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11439         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
11440         properly initialize `finished_label'. Don't emit gotos for empty
11441         try statements.
11443 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11445         * except.c (emit_handlers): Clear catch_clauses_last.
11447 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11449         * parse.y (check_method_types_complete): New function.
11450         (create_class): Reset anonymous class counter only when seeing an
11451         non inner classe.
11452         (java_complete_class): JDEP_METHOD: Don't recompute signature
11453         if incomplete.
11455 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11457         * class.c (build_static_ref): Fixed indentation in comment.
11458         * java-tree.def (TRY_EXPR): Fixed typo in name.
11459         (CLASS_LITERAL): Likewise.
11460         * java-tree.h: (TYPE_DOT_CLASS): New macro.
11461         (struct lang_type): New field `dot_class'.
11462         * jcf-write.c (generate_bytecode_insns): Fixed error message.
11463         (generate_classfile): Method `class$' is synthetic.
11464         * parse.y (build_do_class_method): New function.
11465         (build_dot_class_method_invocation): Likewise.
11466         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
11467         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
11468         (qualify_ambiguous_name): Likewise.
11469         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
11470         (build_try_statement): Fixed leading comment.
11472 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11474         * class.c (make_field_value): Properly handle sizes.
11475         (get_dispatch_vector): Use tree_low_cst and host_integerp.
11476         (layout_class_method): Count using trees.
11477         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
11478         * expr.c (java_array_data_offset): Use int_bit_position.
11479         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
11480         (build_invokevirtual): Use tree_low_cst and do computations with trees.
11482 2000-03-16  Tom Tromey  <tromey@cygnus.com>
11484         * lang.c (flag_hash_synchronization): New global.
11485         (lang_f_options): Added `hash-synchronization'.
11486         * lang-options.h: Mention -fhash-synchronization.
11487         * java-tree.h (flag_hash_synchronization): Declare.
11488         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
11489         hash table synchronization is disabled.
11490         * decl.c (init_decl_processing): Only push `sync_info' value when
11491         hash table synchronization is disabled.
11492         * class.c (make_class_data): Only push `sync_info' field when hash
11493         table synchronization is disabled.  Removed dead code.
11495 2000-03-16  Tom Tromey  <tromey@cygnus.com>
11497         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
11499 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11501         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
11502         classes.
11503         * parse.y (patch_method_invocation): Handle anonymous classes
11504         creation in static context.
11506 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11508         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
11509         * parse.y (resolve_qualified_expression_name): Use it.
11510         (patch_method_invocation): Likewise.
11512 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11514         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
11515         depending on the type of dependency which dictates what the
11516         current class is.
11517         (unresolved_type_p): Resolved types limited to the current class.
11519 2000-03-15  Tom Tromey  <tromey@cygnus.com>
11521         * decl.c (init_decl_processing): Set type of `sync_info' to be
11522         pointer to Object.
11524         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
11525         Correctly compute bit number for current slot.  Zero `high' and
11526         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
11527         mark_reference_fields.
11528         (mark_reference_fields): New function.
11530 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11532         * parse.y (register_incomplete_type): Fixed initialization of
11533         JDEP_ENCLOSING.
11535 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11537         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
11538         static globals.
11539         (push_class_context, pop_class_context): New function.
11540         (class_body:): Call pop_class_context.
11541         (interface_body:): Likewise.
11542         (INNER_QUALIFIER): New macro.
11543         (report_class_declaration): Changed output format and use
11544         INNER_QUALIFIER. Call push_class_context.
11546 2000-02-14  Andrew Haley  <aph@cygnus.com>
11548         * check-init.c (check_init): Add new cases for unary and binary
11549         tree nodes.
11551 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11553         * parse.y (resolve_package): Set `next' once a type name has been
11554         progressively discovered.
11555         (resolve_qualified_expression_name): Propagate resolution only if
11556         there are remaining qualifiers. Take into account `q' might have
11557         been cleared after re-qualification.
11558         * parse.y (patch_method_invocation): New local `resolved'.
11559         Section dealing with qualified expression rewritten to use
11560         resolve_field_access.
11562 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11564         * parse.h (PUSH_CPC): Fixed indentation.
11565         (DEBUG_CPC): New macro.
11566         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
11567         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
11568         * parse.y (class_body_declaration:): Use
11569         SET_CPC_INSTANCE_INITIALIZER_STMT.
11570         (method_declaration:): Check for null current_function_decl.
11571         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
11572         (java_parser_context_pop_initialized_field): Better handling of
11573         empty lists.
11574         (maybe_make_nested_class_name): Mark nested class name as
11575         qualified when necessary.
11576         (end_class_declaration): Don't call java_parse_context_resume when
11577         one or more error occurred.
11578         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
11579         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
11580         SET_CPC_INITIALIZER_STMT.
11581         (method_header): Check for inner classes declaring static methods.
11582         (resolve_qualified_expression_name): Handle situation where `this'
11583         is implied.
11585 2000-03-13  Hans Boehm <boehm@acm.org>
11587         * typeck.c (build_prim_array_type): Correctly set the high word too.
11589 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11591         * parse.y (java_complete_expand_methods): Leave <clinit> out of
11592         ordinary methods.
11593         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
11594         list of methods for interfaces.
11596 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11598         * parse.y (qualify_ambiguous_name): Properly handle expressions
11599         using `null'.
11601 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11603         * parse.y (check_final_assignment): Extended to process
11604         COMPOUND_EXPR.
11605         (patch_assignment): Have check_final_assignment called only once.
11607 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11609         * java-tree.h (IS_INIT_CHECKED): New flag.
11610         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
11611         * parse.y (patch_string): Call force_evaluation_order on the
11612         completed string concatenation tree.
11613         * expr.c (force_evaluation_order): Call force_evaluation_order on
11614         function's arguments too.
11616 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11618         * decl.c (emit_init_test_initialization): Mark KEY as unused.
11619         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11620         (build_anewarray): Likewise.
11621         * parse.y (patch_newarray): Likewise.
11622         * parse.c: Regenerated.
11624 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
11626         * decl.c (init_decl_processing): Added new class fields `depth',
11627         `ancestors', and `idt' to class_type_node. Use
11628         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
11629         * class.c (make_class_data): Push initial values for new fields.
11630         * java-tree.h: Updated prototype for `build_invokeinterface'.
11631         * expr.c (build_invokeinterface): Changed parameters to accept
11632         `method' tree. Calculate index of `method' in its declaring
11633         interface. Build call to _Jv_LookupInterfaceMethodIdx.
11634         (expand_invoke): Call `build_invokeinterface' with new parameters.
11635         * parse.y (patch_invoke): Call `build_invokeinterface' with new
11636         parameters.
11638 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
11640         * typeck.c (lookup_do): Search superinterfaces first
11641         when looking up an interface method. From Godmar Back
11642         <gback@cs.utah.edu>
11644 2000-03-06  Tom Tromey  <tromey@cygnus.com>
11646         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
11648 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11650         * java-tree.h (lookup_argument_method2): Declared.
11651         (safe_layout_class): Prototype moved from parse.h.
11652         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
11653         * parse.y (java_check_regular_methods): Local `super_class' gone.
11654         Call lookup_argument_method2 instead of lookup_argument_method.
11655         Perform modifier match for methods found declared in implemented
11656         interfaces. Fixed indentation problem. Overriding/hiding error
11657         report to take place only for methods found in classes.
11658         * typeck.c (lookup_argument_method): Changed leading
11659         comment. Re-written by calling lookup_do.
11660         (lookup_argument_method2): New function.
11661         (lookup_java_method): Re-written by calling lookup_do.
11662         (lookup_do): New function.
11664 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11666         * check-init.c (check_init): Removed dead code. Handle (blank)
11667         final variables.
11668         * parse.y (declare_local_variables): New local `final_p', set it
11669         and use it to initialize LOCAL_FINAL.
11670         (check_final_assignment): Only check FIELD_DECLs.
11672 2000-02-17  Tom Tromey  <tromey@cygnus.com>
11674         * Makefile.in (JAVA_OBJS): Added boehm.o.
11675         (boehm.o): New target.
11676         * Make-lang.in (JAVA_SRCS): Added boehm.c.
11677         * java-tree.h (flag_use_boehm_gc): Declare.
11678         (get_boehm_type_descriptor): Declare.
11679         * lang.c (lang_f_options): Added `use-boehm-gc'.
11680         (flag_use_boehm_gc): New global.
11681         * lang-options.h: Added -fuse-boehm-gc.
11682         * boehm.c: New file.
11683         * class.c (get_dispatch_table): If class uses a Boehm type
11684         descriptor, put it in the vtable.
11685         (make_class_data): Removed dead code.
11687 2000-03-03  Per Bothner  <per@bothner.com>
11689         * decl.c (init_decl_processing):  Initialize sizetype properly.
11691 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11693         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
11694         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
11695         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
11696         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
11697         (jcf_parse): New local `current'. Load innerclasses seen in outer
11698         context being processed.
11699         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
11700         * jcf-write.c (append_innerclasses_attribute): New function.
11701         (append_innerclasses_attribute_entry): Likewise.
11702         (get_access_flags): Handle static classes. Set anonymous and local
11703         classes to be private.
11704         (generate_classfile): Attribute count adjusted. Call
11705         append_innerclasses_attribute.
11706         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
11707         PURE_INNER_CLASS_TYPE_P.
11708         * parse.y (parser_qualified_classname): New parameter `is_static',
11709         produce non qualified name accordingly.
11710         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
11711         (create_interface): Added argument to parser_qualified_classname.
11712         (create_class): Added argument to parser_qualified_classname. Setup
11713         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
11714         (add_inner_class_fields): Fixed indentation.
11715         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
11716         (method_declarator): Fixed typo in comment.
11717         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
11718         (build_current_thisn): Likewise.
11719         (patch_method_invocation): Likewise.
11721 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11723         * decl.c (current_function_decl): Move to toplev.c.
11725 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11727         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
11728         (DECL_BIT_INDEX): Use underlying representation.
11729         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
11731 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11733         * expr.c (build_java_ret): Pass proper type to size_binop.
11735 2000-02-25  Anthony Green  <green@cygnus.com>
11737         * expr.c (build_class_init): Mark the decl to be ignored by
11738         check_init.
11739         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
11740         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
11741         * class.c (init_test_hash_newfunc): New function.
11742         (decl_hash): New function.
11743         (decl_compare): New function.
11744         * decl.c (emit_init_test_initialization): New function.
11745         (complete_start_java_method): Traverse the init test hashtable,
11746         calling emit_init_test_initialization.
11747         (always_initialize_class_p): Define.
11748         * expr.c (build_class_init): Use initialization tests when
11749         emitting class initialization code.
11750         (always_initialize_class_p): Declare.
11751         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
11752         1.
11753         * java-tree.h: Include hash.h.
11754         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
11755         (struct lang_decl): Add init_test_table field.
11756         (init_test_hash_entry): Define.
11758 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11760         * gjavah.c (main): Avoid using `argi' to report unimplemented
11761         options.
11763 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11765         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
11766         initialize locals to avoid warnings. Local `exception_type' moved
11767         into if statement.
11769 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11771         * parse.y (resolve_expression_name): Use `orig' as a second
11772         argument to resolve_field_access.
11773         (resolve_field_access): Removed unnecessary code when dealing with
11774         static fields.
11776 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11778         * class.c (push_super_field): Don't push the field twice.
11779         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
11780         * parse.h (java_reorder_fields): Prototyped.
11781         * parse.y (java_reorder_fields): New function.
11782         (java_layout_class): Simplified not to worry about re-ordering.
11784 2000-02-23  Tom Tromey  <tromey@cygnus.com>
11786         * gjavah.c (print_name): In JNI case, correctly quote string.
11787         (print_method_info): Don't handle overrides in JNI mode.
11789 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11791         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
11792         value type set to `boolean_type_node'.
11794 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
11796         * jcf-dump.c (main): Test for correct condition after
11797         output file creation.
11799 2000-02-19  Anthony Green  <green@cygnus.com>
11801         * jcf-depend.c (add_entry): Fix test for first list entry.
11803 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11805         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
11806         * constants.c (build_constants_constructor): Likewise.
11808 2000-02-19  Anthony Green  <green@cygnus.com>
11810         * jcf-depend.c (add_entry): Add entries to the end of the list.
11812 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
11814         * decl.c (INT_TYPE_SIZE): Define if necessary.
11815         (expand_java_return): Handle the case of a native integer smaller
11816         than a JVM integer.
11818 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11820         * gjavah.c (help): Use GCCBUGURL.
11821         * jv-scan.c (help): Likewise.
11822         * jcf-dump.c (help): Likewise.
11824 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11826         * jcf-write.c (generate_bytecode_insns): Don't generate empty
11827         `finally' clauses.
11829 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11831         * jcf-parse.c (load_class): Call `fatal' if no file containing
11832         the target class are found.
11834 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
11836         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
11837         lex.c, lex.h, and PARSE_H to...
11838         (parse.o, parse-scan.o): ...here, respectively.
11840         * lex.c: Split out code that may trigger SIGFPE from yylex()
11841         to its own function.
11842         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
11844 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11846         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
11848 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11850         * parse.y (outer_field_access_p): Stop in time when outer contexts
11851         are exhausted.
11852         (resolve_qualified_expression_name): Properly qualify *everything*
11853         after a package.type to be resoled as expression names.
11854         (find_applicable_accessible_methods_list): Save/restore `class' to
11855         isolate it from a possible outer context search.
11857 2000-02-15  Tom Tromey  <tromey@cygnus.com>
11859         * gjavah.c (jni_print_char): New function.
11860         (print_full_cxx_name): Use it.
11861         (decode_signature_piece): Likewise.
11862         (print_cxx_classname): Likewise.
11864 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11866         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
11867         version.o.
11868         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
11870         * gjavah.c: Include version.h.
11872         * jcf-dump.c: Likewise.
11874         * jv-scan.c: Likewise.
11876 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11878         * parse.y (outer_field_access_fix): First parameter now a tree
11879         node. Check for assignment to final. First argument to
11880         build_outer_field_access_fix modified to accommodate prototype.
11881         (build_outer_field_access): Don't check for assignment to final
11882         here.
11883         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
11884         possibly returned by outer_field_access_fix. Changed
11885         outer_field_access_fix's first argument.
11886         (check_final_assignment): $finit$'s context is OK.
11887         (patch_unaryop): Use node instead of its line/column value when
11888         calling outer_field_access_fix.
11890 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11892         * parse.y (interface_declaration:): No longer tagged
11893         <node>. Re-installed default action.
11894         (class_member_declaration:): Handle inner interfaces.
11895         (interface_member_declaration): Handle inner interfaces and
11896         classes.
11897         (create_interface): Push error if one seen. Suspend parsing
11898         context when processing an inner interface.
11899         (register_fields): Inner class static field limitations not to
11900         apply to inner interfaces.
11902 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11904         * jcf-parse.c (load_class): Update `java_error_count' when a
11905         class' file can't be found.
11906         (parse.y): Avoid (byte)code generation when errors seen.
11908 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11910         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
11911         decodes a valid node.
11912         (patch_binop): Handle TRUNC_DIV_EXPR.
11914 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11916         * parse.y (resolve_package): New local `acc'. Try to progressively
11917         build and guess a package and type name.
11919 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11921         * parse.y (find_applicable_accessible_methods_list): Load and
11922         layout the search class if necessary.
11923         (java_complete_tree): Keep to original type of the folded initial
11924         value.
11926 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11928         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
11929         Generate error message if circularity is detected. New static
11930         local `list'.
11931         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
11932         * jcf-write.c (generate_bytecode_insns): Very simply handle
11933         SAVE_EXPR.
11934         * parse.y (java_check_circular_reference): Use
11935         `cyclic_inheritance_report' during report, if necessary.
11936         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
11937         walking NEW_ARRAY_INIT twice.
11939 2000-02-09  Tom Tromey  <tromey@cygnus.com>
11941         * parse.y (check_class_interface_creation): Allow inner classes to
11942         be `private' or `protected', check modifiers' consistency. Prevent
11943         block local classes from bearing any modifiers.
11945 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11947         * except.c (check_start_handlers): Re-add prototype lost in last
11948         patch.
11949         (maybe_start_try): Remove excess argument to `check_start_handlers'.
11951 2000-02-09  Andrew Haley  <aph@cygnus.com>
11953         * decl.c (clear_binding_level): Remove excess initializer.
11954         (maybe_poplevels): Remove unused variable.
11955         (force_poplevels): Ditto.
11956         (struct binding_level): Add comment.
11958 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11960         * jcf-write.c (generate_classfile): Don't consider
11961         pre-initialization with reference value (use <clinit> instead.)
11962         * parse.y (java_fix_constructors): No generated constructor for
11963         interfaces.
11964         (build_outer_field_access): Removed debug message.
11965         (outer_field_expanded_access_p): Adapted to bytecode generation.
11966         (build_outer_field_access_method): Use fix_method_argument_names.
11967         (build_outer_method_access_method): Fixed indentation. Added
11968         comment. Handle access method generation for static and also void
11969         methods.
11970         (build_access_to_thisn): Inserted debug message.
11971         (maybe_build_thisn_access_method): Use fix_method_argument_names.
11972         (resolve_qualified_expression_name): Fixed comment.
11973         (not_accessible_p): Adapted to bytecode generation. Added comment.
11974         (patch_method_invocation): Added comment.
11975         (maybe_use_access_method): Fixed leading comment. Handle static
11976         methods.
11977         (java_complete_lhs): Don't shortcut handling of initialized upon
11978         declaration String type static fields when generating bytecode.
11979         (patch_unaryop): Handle outer field access when generating
11980         bytecode.
11982 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11984         * java-tree.h (FIELD_THISN): New macro.
11985         * jcf-write.c (append_synthetic_attribute): New function.
11986         (generate_classfile): Set "Synthetic" attribute on this$<n>,
11987         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
11988         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
11989         this$<n> fields.
11990         (build_outer_field_access): Turned on access functions usage and
11991         generation when compiling to bytecode.
11992         (maybe_use_access_method): Likewise.
11994 2000-01-25  Andrew Haley  <aph@cygnus.com>
11996         * java-except.h (struct eh_range): Add `expanded' field.
11997         (maybe_start_try): Add end_pc arg.
11998         (maybe_end_try): Ditto.
11999         * java-tree.h (force_poplevels): new function.
12000         * expr.c (expand_byte_code): Don't call maybe_start_try or
12001         maybe_end_try.
12002         * except.c (add_handler): Reset expanded.
12003         (expand_start_java_handler): Set expanded.
12004         (check_start_handlers): Don't expand a start handler that's
12005         already been expanded.
12006         (maybe_start_try): Add end_pc arg.  Only expand a handler which
12007         ends after end_pc.
12008         (expand_end_java_handler): call force_poplevels.
12009         (force_poplevels): new function.
12010         * decl.c (binding_level): Add start_pc of binding level.
12011         (maybe_pushlevels): Call maybe_start_try when pushing binding
12012         levels.
12013         (maybe_poplevels): Call maybe_end_try when popping binding levels.
12014         (LARGEST_PC): Define.
12015         (clear_binding_level): Use LARGEST_PC.
12017         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
12018         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
12019         (binding_depth, is_class_level, current_pc): new variables.
12020         (struct binding_level): ditto.
12021         (indent): new function.
12022         (push_jvm_slot): add debugging info.
12023         (maybe_pushlevels): ditto.
12024         (maybe_poplevels): ditto.
12025         (pushlevel): ditto.
12026         (poplevel): ditto.
12027         (start_java_method): ditto.
12028         (give_name_to_locals): comment only.
12029         * except.c (binding_depth, is_class_level, current_pc):
12030         new variables.
12031         (expand_start_java_handler): add debugging info.
12032         (expand_end_java_handler): ditto.
12034 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12036         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
12037         (print_name_for_stub_or_jni, process_file): Constify a char*.
12039 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12041         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
12043 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12045         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
12046         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
12047         defined to be 1.
12049 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12051         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
12052         * java-tree.h (TYPE_II_STMT_LIST): New macro.
12053         (struct lang_type): New field `ii_block'.
12054         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
12055         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
12056         * parse.h (struct parser_ctxt): New field `instance_initializers'.
12057         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
12058         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
12059         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
12060         macros.
12061         * parse.y (add_instance_initializer): New function.
12062         (in_instance_initializer): New static global.
12063         (class_body_declaration:): Link instance initializer block.
12064         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
12065         (array_creation_expression:): Remove unused local.
12066         (java_parser_context_push_initialized_field): Fixed leading
12067         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
12068         CPC_INSTANCE_INITIALIZER_LIST.
12069         (java_parser_context_pop_initialized_field): Likewise.
12070         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
12071         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
12072         CPC_INITIALIZER_STMT.
12073         (fix_constructors): New local `class_type'. Use it. Call
12074         add_instance_initializer.
12075         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
12076         (patch_return): Forbid return in instance initializers.
12077         (patch_throw_statement): Enforce exception handling in the context
12078         of instance initializers.
12080 2000-02-03  Tom Tromey  <tromey@cygnus.com>
12082         * Make-lang.in (java.mostlyclean): Remove executables in
12083         `mostlyclean'.
12085 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
12087         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
12088         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
12089         (java_float_finite): Convert to use union Word from javaop.h.
12090         (java_double_finite): Convert to use union DWord from javaop.h.
12092 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12094         * gjavah.c (options): Added `jni' entry.
12095         (help): Document -jni.
12096         (flag_jni): New global.
12097         (process_file): Handle JNI output.  Don't print text from
12098         -prepend, -add, etc, when generating stubs.  Only remove `.class'
12099         suffix if it actually exists.
12100         (main): Create a `.c' file when run with `--jni --stubs'.  Create
12101         correct output file name with `--jni'.
12102         (print_include): Mangle header name differently in JNI case.
12103         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
12104         method list.
12105         (print_method_info): Handle JNI case.  Put signature info into
12106         method name.  Handle case when STREAM is NULL.
12107         (print_name_for_stub_or_jni): New function.
12108         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
12109         (print_cxx_classname): Handle JNI.
12110         (print_full_cxx_name): Likewise.
12111         (decode_signature_piece): Likewise.
12112         (overloaded_jni_method_exists_p): New function.
12113         (struct method_name): Added `signature' and `sig_length' fields.
12114         (HANDLE_END_FIELD): Do nothing in JNI mode.
12116 2000-02-02  Tom Tromey  <tromey@cygnus.com>
12118         * jv-scan.c: Include version.c, <getopt.h>.
12119         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
12120         (options): New array.
12121         (usage): New function.
12122         (version): New function.
12123         (main): Use getopt_long to parse command line.
12124         * jcf-dump.c: Include version.c, <getopt.h>.
12125         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
12126         OPT_JAVAP): New macros.
12127         (options): New array.
12128         (usage): Return `void'.  Changed message.
12129         (help): New function.
12130         (version): New function.
12131         (main): Use getopt_long_only to parse command line.
12132         * gjavah.c: Include <getopt.h>.
12133         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
12134         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
12135         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
12136         (options): New array.
12137         (java_no_argument): Removed.
12138         (help): Updated with missing options.
12139         (main): Use getopt_long_only to parse command line.
12140         (usage): Changed message.
12142 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12144         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
12145         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
12146         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
12147         * parse.y (array_creation_expression:): Handle anonymous arrays.
12148         (build_array_from_name): Don't set `ret_name' if null.
12149         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
12150         (qualify_ambiguous_name): Likewise.
12151         (java_complete_expand_class): Likewise.
12153 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12155         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
12156         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
12157         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
12158         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
12159         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
12160         AIPL_FUNCTION_COMPLETED_INVOCATION.
12161         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
12162         AIPL_FUNCTION_INVOCATION_READY.
12163         (AIPL_FUNCTION_DECLARATION): New enum entry.
12164         * parse.y (reorder_static_initialized): New function.
12165         (java_parser_context_pop_initialized_field): Use it.
12166         (add_inner_class_fields): Use
12167         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
12168         augmented. Install marker after last alias initializer, if any.
12169         (generate_finit): Fixed typo. Don't try to retain only the used
12170         fields.
12171         (method_header): Compute and set DECL_FUNCTION_NAP.
12172         (method_declarator): Fixed comment. Insert alias initializer in
12173         parameter list.
12174         (build_alias_initializer_parameter_list): Fixed leading
12175         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
12176         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
12177         (java_complete_expand_class): Code to retain only used aliases
12178         removed.
12179         (java_complete_expand_methods): New local `first_decl'. Generate
12180         $finit$ first, then expand the constructors, regular methods and
12181         <clinit>.
12182         (java_complete_expand_method): Don't report error on missing
12183         return statement if previously detected bogus.
12184         (fix_constructors): Don't patch constructor parameters list.
12185         (patch_method_invocation): Use new AIPL enum values. Reverse
12186         alias initializer list for anonymous classes.
12188 2000-01-30  Anthony Green  <green@redhat.com>
12190         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
12191         determine how many stack slots to pop.
12193 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12195         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
12196         error handling/recovery.
12197         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
12199 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12201         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
12202         FIELD_LOCAL_ALIAS_USED): New macros.
12203         (DECL_FUNCTION_NAP): New macro.
12204         (struct lang_decl): New field `nap'.
12205         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
12206         (struct lang_type): New fields `finit_stmt_list' and
12207         `clinit_stmt_list'.
12208         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
12209         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
12210         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
12211         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
12212         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
12213         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
12214         (BUILD_THROW): Macro line separator re-indented.
12215         * parse.y (end_class_declaration): New function.
12216         (maybe_generate_pre_expand_clinit): New name for
12217         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
12218         pre-expand static fields.
12219         (maybe_generate_clinit): Function deleted.
12220         (check_for_static_method_reference): Prototype's parameter list
12221         indented.
12222         (generate_finit): New name for maybe_generate_finit. Changed
12223         leading comment. Function rewritten to use
12224         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
12225         (build_alias_initializer_parameter_list): New function.
12226         (java_parser_context_pop_initialized_field): Likewise.
12227         (add_inner_class_fields): Likewise.
12228         (type_declaration:): Call end_class_declaration.
12229         (class_member_declaration:): Likewise.
12230         (formal_parameter_list:): Fixed typos.
12231         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
12232         element. Improved error handling.
12233         (block_statement:): Call end_class_declaration.
12234         (anonymous_class_creation:): Likewise.
12235         (create_anonymous_class): Fixed comments.
12236         (create_class): Call add_inner_class_fields.
12237         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
12238         (method_header): Use MARK_FINAL_PARMS.
12239         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
12240         (method_declarator): Propagate final argument flag.
12241         (craft_constructor): New local `artificial'. Call
12242         build_alias_initializer_parameter_list. Use
12243         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
12244         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
12245         necessary.
12246         (complete_expand_class): Get rid of unused outer context local
12247         alias fields.
12248         (java_complete_expand_methods): Fixed leading
12249         comment. Generate/pre-expand <clinit> first. Changed method
12250         expansion order to regular, $finit$, constructors, <clinit>.
12251         (java_complete_expand_method): Set current_function_decl.
12252         (fix_constructors): Fix constructor parameter list to account for
12253         outer context local alias initializers.
12254         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12255         (resolve_expression_name): Lookup outer context local aliases. New
12256         local `access', use it.
12257         (patch_method_invocation): Patch inner class ctor invocation with
12258         outer context local aliases initialization values. $finit$
12259         invocation patching now includes things generated with
12260         build_alias_initializer_parameter_list.
12261         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
12262         (build_super_invocation): Likewise.
12263         (patch_assignment): Changed comment.
12265 2000-01-27  Andrew Haley  <aph@cygnus.com>
12267         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
12268         (emit_if): Ditto.
12269         (emit_jsr): Ditto.
12271 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12273         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
12274         concatenation.
12275         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
12277         * parse.y (register_fields): Don't pass a format specifier to
12278         OBSOLETE_MODIFIER_WARNING.
12279         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
12280         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
12281         specifier.
12282         (check_modifiers): Change function into a macro.
12283         (check_class_interface_creation): Pass a literal format string.
12285 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12287         * buffer.h: PROTO -> PARAMS.
12288         * check-init.c: Likewise.
12289         * class.c: Likewise.
12290         * constants.c: Likewise.
12291         * convert.h: Likewise.
12292         * decl.c: Likewise.
12293         * except.c: Likewise.
12294         * expr.c: Likewise.
12295         * gjavah.c: Likewise.
12296         * java-except.h: Likewise.
12297         * java-tree.h: Likewise.
12298         * jcf-depend.c: Likewise.
12299         * jcf-dump.c: Likewise.
12300         * jcf-parse.c: Likewise.
12301         * jcf-path.c: Likewise.
12302         * jcf-reader.c: Likewise.
12303         * jcf-write.c: Likewise.
12304         * jcf.h: Likewise.
12305         * jv-scan.c: Likewise.
12306         * jvgenmain.c: Likewise.
12307         * jvspec.c: Likewise.
12308         * lang.c: Likewise.
12309         * lex.c: Likewise.
12310         * lex.h: Likewise.
12311         * parse-scan.y: Likewise.
12312         * parse.h: Likewise.
12313         * parse.y: Likewise.
12314         * typeck.c: Likewise.
12315         * verify.c: Likewise.
12316         * xref.c: Likewise.
12317         * xref.h: Likewise.
12318         * zextract.c: Likewise.
12319         * zipfile.h: Likewise.
12321 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12323         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
12324         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
12325         * constants.c (build_constant_data_ref): Check for cached
12326         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
12327         in TYPE_CPOOL_DATE_REF.
12328         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
12329         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
12330         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
12331         (LOCAL_FINAL): New macro.
12332         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
12333         constant pool -- don't try to reuse.
12334         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
12335         TYPE_LANG_SPECIFIC.
12336         (find_in_current_zip): Use TYPE_JCF.
12337         * parse.h (java_check_final): Prototype removed.
12338         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
12339         (maybe_create_class_interface_decl,
12340         check_class_interface_creation): Likewise.
12341         (java_expand_finals): Function removed.
12342         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
12343         (block_statement:): Fixed comment.
12344         (anonymous_class_creation:): Likewise.
12345         (check_class_interface_creation): Reversed Jan 12, 2000 extra
12346         argument patch.
12347         (check_class_interface_creation): Loosened error report on (inner)
12348         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
12349         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
12350         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
12351         argument patch.
12352         (create_interface): Likewise.
12353         (anonymous_class_counter): New static global.
12354         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
12355         patch. Fixed comments.
12356         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
12357         anonymous_class_counter when declaring a toplevel class.
12358         (craft_constructor): Fixed constructor name when handling
12359         anonymous classes. Anonymous class constructors to feature hidden
12360         this$<n> parameter.
12361         (java_fix_constructors): Added comment.
12362         (java_check_final): Function removed.
12363         (java_complete_expand_methods): Fixed comment. Don't generate
12364         class data, save its outgoing constant pool instead.
12365         (verify_constructor_super): Skip anonymous class constructor
12366         hidden this$<n> parameter.
12367         (java_expand_classes): New local `saved_ctxp'. Removed call to
12368         java_expand_finals and java_check_final. Expand anonymous class
12369         constructors. Generate class data.
12370         (build_super_invocation): Skip anonymous class hidden this$<n>
12371         parameter.
12372         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
12373         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
12374         (set_java_signature): Likewise.
12376 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12378         * gjavah.c: Delete ACC_VISIBILITY define.
12379         * jcf.h: Add ACC_VISIBILITY define.
12380         * parse.y: final: rule tagged <value>.
12381         (java_check_regular_methods): Use ACC_VISIBILITY define for
12382         default package access check.
12383         (local_variable_declaration_statement): Use final: rule.
12385 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
12387         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
12388         (final:): New rule.
12390 2000-01-17  Tom Tromey  <tromey@cygnus.com>
12392         * gjavah.c (print_field_info): Allow non-static final fields.
12394 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12396         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
12397         * parse.y (patch_anonymous_class): New function.
12398         (create_anonymous_class): Register incomplete type when the
12399         class/interface to extends/implement isn't known yet.
12400         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
12401         (verify_constructor_super): Tuned error message.
12403 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12405         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
12406         (ANONYMOUS_CLASS_P): New macro.
12407         (TYPE_SIGNATURE, TYPE_JCF): New macros.
12408         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
12409         * parse.y (create_class): Added leading argument.
12410         (maybe_create_class_interface_decl,
12411         check_class_interface_creation): Likewise.
12412         (craft_constructor): New function.
12413         (verify_constructor_super): Added argument in prototype.
12414         (class_declaration:): Inserted leading argument.
12415         (for_begin:): Use FOR_LOOP_P.
12416         (anonymous_class_creation): Create WFL of the anonymous class to
12417         instantiate. Call build_new_invocation. Added comments.
12418         (check_class_interface_creation): Handle parameter `anonymous' in
12419         verbose mode class creation announce.
12420         (link_nested_class_to_enclosing): Exclude anonymous classes.
12421         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
12422         anonymous class, even though they appear to have an enclosing
12423         context.
12424         (create_interface): Pass extra argument to
12425         check_class_interface_creation.
12426         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
12427         (create_class): Call check_class_interface_creation and
12428         maybe_create_class_interface_decl with extra new argument. Don't
12429         add private this$<n> to anonymous classes.
12430         (method_declarator): Insert hidden this$<n> to anonymous class
12431         constructors.
12432         (java_fix_constructors): Deleted code creating default
12433         constructor. Call craft_constructor instead.
12434         (java_check_regular_methods): Set `saw_constructor' to 1 for
12435         anonymous classes.
12436         (fix_constructors): Pass extra argument to verify_constructor_super.
12437         (verify_constructor_super): New local `sdecl', use it. Search for
12438         matching constructor (possibly featuring arguments) in super
12439         class.
12440         (lookup_method_invoke): Craft constructor according to arguments
12441         list when dealing with anonymous class constructors.
12442         (build_super_invocation): Pass arguments to anonymous class super
12443         constructors.
12444         (search_loop): Use FOR_LOOP_P.
12445         (labeled_block_contains_loop_p): Likewise.
12447 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12449         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
12450         (enclosing_context_p): New function.
12451         (get_access_flags_from_decl): Handle CLASS_STATIC.
12452         (maybe_layout_super_class): Extra first argument passed to
12453         do_resolve_class.
12454         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
12455         ID_INIT_P.
12456         * decl.c (access0_identifier_node): New global.
12457         (init_decl_processing): access0_identifier_node initialized.
12458         (pushdecl): Set DECL_CONTEXT only on non type decls.
12459         * expr.c (lookup_field): Lookup inner class fields in enclosing
12460         contexts.
12461         (expand_invoke): Use ID_INIT_P.
12462         (expand_java_field_op): Use DECL_CLINIT_P.
12463         * java-tree.def (CLASS_LITERAL): New tree code.
12464         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
12465         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
12466         (struct lang_decl): New field `inner_access'.
12467         (enclosing_context_p): Prototyped.
12468         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
12469         ID_CLINIT_P): New macros.
12470         (CLASS_STATIC): New macro.
12471         (CLASS_ACCESS0_GENERATED_P): New macro.
12472         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
12473         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
12474         INNER_CLASS_P): New macros.
12475         (DECL_INNER_CLASS_LIST): New macro.
12476         * jcf-parse.c (yyparse): Avoid the use of ANSI string
12477         concatenation.
12478         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
12479         the shift value to int. Fixed typo in comment.
12480         * lex.c (inst_id, wpv_id): Initialize.
12481         * mangle.c (unicode_mangling_length): Take `$' into account.
12482         * parse.h (DRECOVER, RECOVER): Terminate properly.
12483         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
12484         (typedef struct _jdep): New field `enclosing'.
12485         (JDEP_ENCLOSING): New macro.
12486         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
12487         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
12488         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
12489         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
12490         GET_ENCLOSING_CPC_CONTEXT): New macros.
12491         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
12492         (do_resolve_class): Added extra argument in prototype.
12493         * parse.y (resolve_class): Added extra argument in prototype.
12494         (maybe_create_class_interface_decl): Likewise.
12495         (maybe_use_access_method, build_wfl_wrap): New functions.
12496         (java_complete_expand_classes, java_complete_expand_class):
12497         Likewise.
12498         (java_parser_context_push_initialized_field,
12499         java_parser_context_suspend, java_parser_context_resume):
12500         Likewise.
12501         (maybe_make_nested_class_name, make_nested_class_name,
12502         set_nested_class_simple_name_value,
12503         link_nested_class_to_enclosing, find_as_inner_class,
12504         find_as_inner_class_do, check_inner_class_redefinition,
12505         build_thisn_assign, build_current_thisn, build_access_to_thisn,
12506         maybe_build_thisn_access_method, build_outer_field_access,
12507         build_outer_field_access_methods, build_outer_field_access_expr,
12508         build_outer_method_access_method, build_new_access_id,
12509         build_outer_field_access_method, outer_field_access_p,
12510         outer_field_expanded_access_p, outer_field_access_fix,
12511         build_incomplete_class_ref, patch_incomplete_class_ref,
12512         create_anonymous_class): Likewise.
12513         (inst_id, wpv_id): New static global variables.
12514         (synchronized:): New rule, tagged <node>.
12515         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
12516         rules.
12517         (anonymous_class_creation:): New rule, tagged <node>.
12518         (NEW_TK): Tagged <node>.
12519         (type_literals, array_type_literal): New rules, tagged <node>.
12520         (class_declaration:): Removed action when reducing by class_body:
12521         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
12522         using GET_CPC in sub-rules.
12523         (class_member_declaration): Handle inner classes.
12524         (method_declaration): When reducing method_header:, reset
12525         current_function_decl when appropriate.
12526         (method_declarator:): Set the number of formal parameter to 0 for
12527         method declared without arguments.
12528         (constructor_declarator:): Likewise.
12529         (static_initializer:): List of elements kept in a list.
12530         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
12531         use of the keyword `static' for type declarations.
12532         (block_statement:): Handle inner class declarations.
12533         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
12534         type qualified `this'.
12535         (class_instance_creation_expression): Use anonymous_class_creation:
12536         to handle inner class instances creation. Handle qualified `new'.
12537         (something_dot_new): Added appropriate actions.
12538         (create_new_parser_context): New function.
12539         (java_push_parser_context, java_parser_context_save_global,
12540         java_parser_context_suspend): Use create_new_parser_context.
12541         (check_modifiers): Changed leading comment.
12542         (check_class_interface_creation): Handle interclasses.
12543         (add_superinterfaces): Fixed comment.
12544         (create_interface): Build qualified name from the raw_name instead
12545         of its matching WFL. Push the initialized fields list. raw_name added
12546         as an extra argument to maybe_create_class_interface_decl.
12547         (create_class): Build qualified name from the raw_name instead of
12548         its matching WFL. Removed assignment to current_parsed_class_un.
12549         Call PUSH_ERROR before returning an error. Suspend the current
12550         parser context when processing an inner class. Push the
12551         initialized fields list. raw_name added as an extra argument to
12552         maybe_create_class_interface_decl. Add the private this$<n>
12553         field.
12554         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
12555         (register_fields): Get the class type from GET_CPC and handle
12556         previous errors.  Added code to handle the creation of static
12557         fields in inner classes. Initialized fields initialization
12558         statements kept in a list of lists.
12559         (maybe_generate_finit): Initialized fields initialization
12560         statements kept in a list of lists. Use GET_CPC.
12561         (maybe_generate_clinit): Likewise.
12562         (method_header): Use GET_CPC and GET_CPC_UN.
12563         (parser_qualified_classname): Handle inner classes.
12564         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
12565         (java_fix_constructors): Hide pointer to enclosing context
12566         instance in constructor list when dealing with inner classes.
12567         (jdep_resolve_class): Call resolve_class with extra first argument
12568         JDEP_ENCLOSING.
12569         (resolve_class): Add enclosing context as a first extra argument
12570         to do_resolve_class.
12571         (do_resolve_class): Call find_as_inner_class. Handle WFLs
12572         properly.
12573         (resolve_no_layout): Extra argument added to resolve_class
12574         invocation.
12575         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
12576         (java_get_real_method_name): Use GET_CPC_UN.
12577         (check_abstract_method_definitions): Use DECL_CLINIT_P.
12578         (java_check_abstract_methods): Handle static method declared in
12579         inner classes by an error.
12580         (java_check_regular_methods): Use DECL_CLINIT_P.
12581         (source_start_java_method): Also set DECL_MAX_LOCALS.
12582         (create_artificial_method): Call java_parser_context_save_global
12583         and java_parser_context_restore_global instead of saving/restoring
12584         the context by hand.
12585         (expand_start_java_method): Improved verbose mode message.
12586         (java_complete_expand_methods): Fixed leading comment. Use
12587         DECL_CLINIT_P.
12588         (fix_constructors): Added assignment to this$<n> if necessary.
12589         (java_expand_classes): Call java_complete_expand_classes instead
12590         of java_complete_expand_methods.
12591         (make_qualified_primary): Simplified.
12592         (merge_qualified_name): Optimized for missing left or right parts.
12593         (resolve_expression_name): Handle access to outer class fields from
12594         interclasses.
12595         (resolve_qualified_expression_name): New macro
12596         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
12597         classes. Report error on non appropriate qualification of
12598         `new'. Handle qualified `this'.
12599         (not_accessible_p): Allow access to outer class private fields from
12600         inner classes.
12601         (patch_method_invocation): Handle method invocations through
12602         access methods and inner class constructor invocations.
12603         (find_applicable_accessible_methods_list): Search enclosing
12604         contexts of an inner class.
12605         (search_applicable_methods_list): Fixed typo.
12606         (argument_types_convertible): Handle inner class constructors'
12607         hidden outer context reference argument.
12608         (qualify_ambiguous_name): Handle qualified `this'.
12609         (java_complete_lhs): Handle use of field accessed through
12610         artificial access methods in various cases of assignments. Handle
12611         CLASS_LITERAL node.
12612         (check_final_assignment): Use DECL_CLINIT_P.
12613         (valid_ref_assignconv_cast_p): Handle the destination being an
12614         enclosing context of the source.
12615         (patch_unaryop): Handle use of field accessed through artificial
12616         access methods.
12617         (patch_return): Use DECL_CLINIT_P.
12618         (patch_throw_statement): Use DECL_CLINIT_P.
12619         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
12620         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
12621         ID_INIT_P.
12623 2000-01-16  Anthony Green  <green@cygnus.com>
12625         * parse.y (build_string_concatenation): Only use
12626         StringBuffer(String) shortcut if String arg is constant.
12628 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12630         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
12631         the shift value to int. Fixed typo in comment.
12633 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12635         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
12636         * jcf-write.c: Likewise.
12637         * parse.y: Likewise.
12638         * parse.c: Regenerate.
12640 2000-01-09  Anthony Green  <green@cygnus.com>
12642         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
12643         bytecodes in the correct order.
12645 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12647         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
12649 2000-01-06  Anthony Green  <green@cygnus.com>
12651         * expr.c (java_lang_expand_expr): Switch to permanent obstack
12652         before building constant array decl.
12654 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12656         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
12657         method invocation and typo in conditional expression.
12658         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
12659         the appropriate NOTE_POP.
12660         * parse.y (patch_binop): Shift value mask to feature the right
12661         type.
12663 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12665         * class.c (assume_compiled, assume_compiled_node): Add static
12666         prototype.
12667         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
12669         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
12671         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
12673         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
12674         to `__modifier' to avoid stringifying it.
12676         * parse.y (verify_constructor_circularity): Don't call a variadic
12677         function with a non-literal format string.
12678         (java_check_abstract_methods): Move unreachable code inside
12679         `continue' statement.
12680         (lookup_method_invoke): Call xstrdup, not strdup.
12682         * expr.c (expand_java_field_op): Avoid the use of ANSI string
12683         concatenation.
12685         * jcf-parse.c (yyparse): Likewise.
12687         * jv-scan.c (main): Likewise.
12689 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12691         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
12692         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
12693         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
12694         concatenation.
12696         * parse.y (synchronized, variable_redefinition_error,
12697         check_class_interface_creation, create_interface, create_class,
12698         method_header, finish_method_declaration,
12699         check_modifiers_consistency, method_declarator,
12700         complete_class_report_errors, check_abstract_method_definitions,
12701         java_check_regular_methods, check_throws_clauses,
12702         java_check_abstract_methods, read_import_dir,
12703         check_pkg_class_access, declare_local_variables, fix_constructors,
12704         cut_identifier_in_qualified, resolve_expression_name,
12705         resolve_qualified_expression_name, patch_method_invocation,
12706         java_complete_lhs, patch_assignment, try_builtin_assignconv,
12707         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
12708         patch_exit_expr, patch_exit_expr, patch_switch_statement,
12709         patch_try_statement, patch_synchronized_statement,
12710         patch_throw_statement, check_thrown_exceptions,
12711         patch_conditional_expr): Likewise.
12713 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12715         * Makefile.in (LIBDEPS): Added gcc's errors.o
12716         (../jcf-dump$(exeext):): Link with gcc's errors.o
12717         (../gcjh$(exeext):): Likewise.
12718         * expr.c (expand_java_NEW): Layout the entire target type instead of
12719         laying out its methods only.
12720         (lookup_field): Layout the class after having loaded it.
12721         * java-tree.h (java_debug_context): Declared.
12722         * jcf-io.c (toplev.h): Included.
12723         (find_class): Removed assignment to jcf's outofsynch
12724         field. Force source file to be read if newer than its matching
12725         class file. Tweaked debug messages.
12726         * jcf-parse.c (jcf_out_of_synch): Deleted.
12727         (read_class): Call to jcf_out_of_synch removed.
12728         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
12729         (jcf_out_of_synch): Prototype deleted.
12730         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
12731         `deprecated' and `class_err': integer turned into bit-fields.
12732         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
12733         * parse.y (package_list): New global.
12734         (package_declaration:): Record newly parsed package name.
12735         (extra_ctxp_pushed_p): Static global deleted.
12736         (java_parser_context_save_global): Create buffer context for the
12737         purpose of saving globals, if necessary.
12738         (java_parser_context_restore_global): Pop context pushed for the
12739         purpose of saving globals, if necessary.
12740         (java_debug_context_do): New prototype and function.
12741         (java_debug_context): Likewise.
12742         (do_resolve_class): Use already parsed package names to qualify
12743         and lookup class candidate.
12744         (java_pre_expand_clinit): Removed unnecessary local variable.
12746 1999-12-17  Tom Tromey  <tromey@cygnus.com>
12748         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
12749         fixes PR gcj/119.
12750         (process_file): Use `\n\' at end of each line in string.
12752 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12754         * expr.c (expand_invoke): Layout the loaded class before
12755         attempting to use it.
12756         (expand_java_field_op): Allow final field assignments to take
12757         place in $finit$.
12758         * typeck.c (convert): Return error_mark_node if expr is null.
12760 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12762         * class.c (class_depth): Return -1 if the class doesn't load
12763         properly.
12764         * expr.c (can_widen_reference_to): Check for errors during depth
12765         computation and return 0 accordingly.
12766         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
12767         create default constructors and add an other error check.
12768         * parse.h (java_fix_constructors): Prototyped.
12769         * parse.y (java_pre_expand_clinit): Likewise.
12770         (build_super_invocation): Re-prototyped to feature one argument.
12771         (java_check_circular_reference): Directly use `current'.
12772         (java_fix_constructors): New function.
12773         (java_check_regular_methods): Don't create default constructors
12774         here, but abort if none were found.
12775         (java_complete_expand_methods): Pre-process <clinit> calling
12776         java_pre_expand_clinit.
12777         (java_pre_expand_clinit): New function.
12778         (fix_constructors): build_super_invocation invoked with the
12779         current method declaration as an argument.
12780         (build_super_invocation): Use the context of the processed method
12781         decl argument instead of current_class.
12782         * typeck.c (lookup_java_method): Take WFLs in method names into
12783         account.
12785 1999-12-14  Per Bothner  <per@bothner.com>
12787         * class.c (make_class_data): flag_keep_inline_functions to keep
12788         private methods in the method array.
12790 1999-12-15  Anthony Green  <green@cygnus.com>
12792         * check-init.c (check_init): Take into account both types of
12793         `throw's when checking for uninitialized variables.
12795 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12797         * parse.y (java_complete_lhs): Force conversion of array
12798         dimensions to int_type_node, that's what runtime's ABI expects.
12800 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12802         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
12803         operand of a WFL, until the Java front-end gets fixed with regard
12804         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
12806 1999-12-10  Andrew Haley  <aph@cygnus.com>
12808         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
12809         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
12810         expr.c (build_java_athrow): Add support for sjlj-exceptions.
12811         java-tree.h: Ditto.
12812         jcf-write.c: Ditto.
12814 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12816         * expr.c (java_lang_expand_expr): Switch to permanent obstack
12817         before calling expand_eh_region_start and expand_start_all_catch.
12818         * except.c (expand_start_java_handler): Switch to permanent
12819         obstack before calling expand_eh_region_start.
12820         (expand_end_java_handler): Switch to permanent obstack before
12821         calling expand_start_all_catch.
12823 1999-12-5  Anthony Green  <green@cygnus.com>
12825         * decl.c (init_decl_processing): Mark throw_node as a noreturn
12826         function with side effects.
12827         (init_decl_processing): Mark all memory allocating DECLs with
12828         DECL_IS_MALLOC.
12830 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12832         * except.c (expand_end_java_handler): Call
12833         expand_resume_after_catch and end_catch_handler.
12835 1999-11-30  Anthony Green  <green@cygnus.com>
12837         * verify.c (verify_jvm_instructions): Create new return label
12838         chain if non existent (don't rely on the verified state of the jsr
12839         target.)
12841 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12843         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
12844         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
12846         * parse.y (patch_assignment): Removed bogus final class test on
12847         lhs when checking on whether to emit an ArrayStoreException runtime
12848         check.
12849         * expr.c (expand_java_arraystore): Likewise.
12851 1999-11-28 Anthony Green <green@cygnus.com>
12853         * decl.c (find_local_variable): Reuse single slot decls when
12854           appropriate.
12856 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12858         * jcf-parse.c (saw_java_source): Global variable removed.
12859         (read_class): Don't use `saw_java_source'. Added extra braces.
12860         (yyparse): Code setting `saw_java_source' removed.
12862 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
12864         * except.c (emit_handlers): Zero catch_clauses after emitting them.
12866 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12868         * verify.c (merge_type_state): Non verified subroutines being
12869         considered more than once to trigger passive type merge.
12871 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12873         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
12874         in case of error. Error message tuned.
12876 1999-11-21  Anthony Green  <green@cygnus.com>
12878         * constants.c (find_methodref_index): Unwrap method names before
12879         inserting them in the constant pool.
12881         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
12883         * class.c (assume_compiled_node): New typedef.
12884         (assume_compiled_tree): New static data.
12885         (find_assume_compiled_node): New function.
12886         (add_assume_compiled): New function.
12887         (assume_compiled): New function.
12888         * class.c (make_class_data): Use assume_compiled.
12889         (is_compiled_class): Use assume_compiled.
12891         * java-tree.h (add_assume_compiled): Declare.
12893         * lang.c (lang_decode_option): Parse new options.
12895 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12897         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
12898         int_type_node: that's what `_Jv_AllocObject' expects.
12900 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12902         * parse.y (lookup_method_invoke): Use lang_printable_name to
12903         reliably build the type name during error report. Fixes PR gcj/97.
12905 1999-11-09  Tom Tromey  <tromey@cygnus.com>
12907         * jcf-path.c: Include <sys/stat.h>.
12908         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
12909         (DIR_UP): New macro.
12911 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12913         * parse.y (source_end_java_method): Resume permanent allocation,
12914         reversing Apr 27 1998 patch.
12915         (patch_string_cst): Pop obstacks after having pushed the permanent
12916         ones.
12918 1999-11-05  Tom Tromey  <tromey@cygnus.com>
12920         * class.c (finish_class): Emit inlined methods if any native
12921         methods exist in the class.  Fixes PR gcj/85.
12923 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12925         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
12926         (qualify_ambiguous_name): Likewise.
12928 1999-11-03  Godmar Back <gback@cs.utah.edu>
12930         * typeck.c: (lookup_java_method):  search all inherited
12931         interfaces when looking up interface method.
12933 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12935         * parse.y (method_header:): Issue error message for rule `type
12936         error'.
12937         (synchronized:): Error report when not using synchronized.
12939 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12941         * parse.y (resolve_qualified_expression_name): Prevent `this' from
12942         being used before the superclass constructor has been called.
12943         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
12944         instead of `CALL_THIS_CONSTRUCTOR_P'.
12946 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
12948         * check-init.c: Fix typo in comment.
12950 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12952         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
12953         and final method.
12955 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12957         * parse.y (expression_statement:): Call function to report
12958         improper invocation of a constructor.
12959         (parse_ctor_invocation_error): New function.
12961 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
12963         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
12964         remember_end_note.
12966 1999-10-21  Tom Tromey  <tromey@cygnus.com>
12968         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
12969         in generated `main'.
12971 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12973         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
12974         (qualify_ambiguous_name): Likewise.
12976 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12978         * parse.y (java_complete_tree): fold_constant_for_init to work on
12979         permanent_obstack.
12980         (java_complete_lhs): Likewise.
12981         (array_constructor_check_entry): Complete an initializer element
12982         on permanent_obstack.
12984 1999-10-19  Tom Tromey  <tromey@cygnus.com>
12986         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
12987         From Mike Moreton <mike@pillim.demon.co.uk>.
12989 1999-10-15  Greg McGary  <gkm@gnu.org>
12991         * java-tree.h (flag_bounds_check): Remove extern decl.
12992         * lang.c (flag_bounds_check): Remove global variable.
12993         (lang_f_options): Remove "bounds-check" entry.
12994         (lang_init_options): Default flag_bounds_check to "on".
12996 1999-10-14  Tom Tromey  <tromey@cygnus.com>
12998         * jvgenmain.c (usage): New function.
12999         (main): Use it.  Also, handle `-D' options.
13000         * jvspec.c (lang_specific_driver): Recognize -D.
13001         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
13003         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
13005 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13007         * jcf-dump.c (print_constant, disassemble_method): Don't call a
13008         variadic function with a non-literal format string.
13010         * parse-scan.y (report_main_declaration): Likewise.
13012         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
13014         * parse.y (read_import_dir, patch_assignment, patch_binop,
13015         patch_array_ref): Likewise.
13017         * typeck.c (build_java_array_type): Likewise.
13019         * verify.c (verify_jvm_instructions): Likewise.
13021 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13023         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
13025 1999-10-07  Anthony Green  <green@cygnus.com>
13027         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
13028         where CHECK_PUT may fail for valid reasons.
13030         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
13031         UNSAFE_PUTN): New macros.
13033 1999-10-04  Tom Tromey  <tromey@cygnus.com>
13035         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
13036         well.  Fixes Java PR gcj/59.
13037         * parse-scan.y (yyerror): Report errors.
13039 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
13041         * decl.c (insert_block): Remove unconditional `abort'.
13043 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
13045         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
13046         FUNCTION_CODE now of type int.  All callers changed.
13047         Set the builtin's DECL_BUILT_IN_CLASS.
13049 1999-09-23  Tom Tromey  <tromey@cygnus.com>
13051         * jvspec.c (lang_specific_driver): Don't read spec file if
13052         -fsyntax-only given.
13054 1999-09-22  Tom Tromey  <tromey@cygnus.com>
13056         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
13058         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
13059         (WORDS_TO_LONG): Likewise.
13060         (WORDS_TO_DOUBLE): Likewise.
13062 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13064         * jcf-write.c (RELOCATION_VALUE_0): New macro.
13065         (RELOCATION_VALUE_1): Likewise.
13066         (emit_iinc, emit_reloc, push_constant1, push_constant2,
13067         push_in_const, push_long_const): Prototyped.
13068         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
13069         (push_constant2): Likewise.
13070         (push_int_const): Cast find_constant1's integer arguments to `jword'.
13071         (find_constant_wide): Cast find_constant2's integer arguments to
13072         `jword'.
13073         (find_constant_index): Cast find_constant2's and find_constant2's
13074         integer arguments to `jword'.
13075         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
13076         (emit_switch_reloc): Use RELOCATION_VALUE_0.
13077         (emit_if): Use RELOCATION_VALUE_1.
13078         (emit_goto): Likewise.
13079         (emit_jsr): Likewise.
13080         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
13081         argument to push_long_const to HOST_WIDE_INT.
13083 1999-09-15  Andreas Schwab  <schwab@suse.de>
13085         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
13087 1999-09-20  Nick Clifton  <nickc@cygnus.com>
13089         * lang.c (lang_decode_option): Extend comment.
13091 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13093         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
13094         instead of fndecl.
13096 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13098         * gjavah.c (get_field_name, print_method_info, print_include,
13099         add_namelet): Use xmalloc, not malloc.
13101         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
13102         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
13103         NULL pointer.
13105         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
13107         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
13109         * jcf-path.c (add_entry): Likewise.
13111         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
13113         * jv-scan.c (xmalloc): Remove definition.
13115         * jvgenmain.c (xmalloc): Likewise.
13117         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
13119         * lex.c (java_store_unicode): Use xrealloc, not realloc.
13121         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
13122         concat, not xmalloc/sprintf.
13123         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
13124         (xstrdup): Remove definition.
13126         * parse.y (duplicate_declaration_error_p,
13127         constructor_circularity_msg, verify_constructor_circularity,
13128         check_abstract_method_definitions, java_check_regular_methods,
13129         java_check_abstract_methods, patch_method_invocation,
13130         check_for_static_method_reference, patch_assignment, patch_binop,
13131         patch_cast, array_constructor_check_entry, patch_return,
13132         patch_conditional_expr): Use xstrdup, not strdup.
13134         * zextract.c (ALLOC): Use xmalloc, not malloc.
13136 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13138         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
13140         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
13141         (do_spec, lang_specific_pre_link, lang_specific_driver,
13142         input_filename, input_filename_length): Don't declare.
13143         (main_class_name, jvgenmain_spec, lang_specific_driver):
13144         Constify a char*.
13145         (lang_specific_driver): All calls to the function pointer
13146         parameter now explicitly call `fatal'.
13148 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13150         * parse.y (find_applicable_accessible_methods_list): Search
13151         abstract classes as interfaces.
13153 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13155         * class.c (finish_class): We're now outside a valid method
13156         declaration. Tell the rest of gcc so.
13158 1999-09-08  Bruce Korb  autogen@linuxbox.com
13160         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
13162 1999-09-07  Tom Tromey  <tromey@cygnus.com>
13164         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
13165         java-array.h.
13166         (decode_signature_piece): Don't emit "::" in JArray<>.
13167         (print_namelet): Only print trailing `;' when printing a class.
13169 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
13171         * java-tree.h: Delete declarations for all tree nodes now moved to
13172         global_trees.
13173         * decl.c: Delete their definitions.
13175 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
13177         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
13178         * Makefile.in (OBJS): Add ggc-callbacks.o.
13179         (OBJDEPS): Likewise.
13181 1999-09-03  Tom Tromey  <tromey@cygnus.com>
13183         * parse.y (strip_out_static_field_access_decl): Return operand if
13184         it satisfies JDECL_P.
13186 1999-09-02  Tom Tromey  <tromey@cygnus.com>
13188         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
13189         Handle nested arrays, like `[[I'.
13191 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13193         * class.c (finish_class): Remove unused parameter, all callers
13194         changed.
13196         * expr.c (build_java_athrow): Change return type to void.
13197         (java_lang_expand_expr): Make sure each case in switch returns a
13198         value.
13200         * java-tree.h (finish_class): Fix prototype to take void args.
13202         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
13203         (main): Issue return from main, not exit.
13205         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
13207         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
13209         * jv-scan.c (main): Issue return from main, not exit.
13211         * parse.y (check_abstract_method_definitions,
13212         java_check_abstract_method_definitions): Add static prototypes.
13213         (java_complete_expand_methods): Fix call to `finish_class'.
13215         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
13216         and `prevpc'.
13218 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13220         * lang.c (language_string): Constify.
13222 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13224         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
13225         Remove hacks for stuff which comes from libiberty.
13227         * Make-lang.in: Likewise.
13229 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
13231         * Makefile.in (xref.o): Depend on xref.c explicitly.
13233 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13235         * java-tree.h (lang_printable_name): Constify a char*.
13237         * lang.c (lang_printable_name): Likewise.
13239 1999-08-27  Jeffrey A Law  (law@cygnus.com)
13241         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
13242         comments in C code.
13244 1999-08-26  Tom Tromey  <tromey@cygnus.com>
13246         * gjavah.c (print_cxx_classname): Print "::" before qualified
13247         name.
13249 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13251         * parse.y (lookup_cl): Changed leading comment. Now does its best
13252         to set the column number.
13253         (qualify_ambiguous_name): Take WFL wrappers into account.
13255 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
13257         * verify.c (verify_jvm_instructions): Don't check instruction
13258         validity beyond end of method.
13260 1999-08-25  Tom Tromey  <tromey@cygnus.com>
13262         * jvspec.c (lang_specific_driver): Correctly handle --help again.
13264 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13266         * gjavah.c (print_name, print_base_classname, utf8_cmp,
13267         cxx_keyword_subst, generate_access, name_is_method_p,
13268         get_field_name, print_field_name, super_class_name, print_include,
13269         decode_signature_piece, print_class_decls, usage, help,
13270         java_no_argument, version, add_namelet, print_namelet): Add static
13271         prototype.
13272         (print_base_classname, utf8_cmp, cxx_keyword_subst,
13273         name_is_method_p): Constify a char*.
13274         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
13275         Provide a final else clause in an if-else-if.
13276         (print_field_info): Add missing final arg in function call to
13277         `print_field_name'.
13278         (print_method_info, decompile_method, decode_signature_piece,
13279         print_c_decl, print_full_cxx_name, print_stub,
13280         print_mangled_classname, super_class_name, print_include,
13281         add_namelet, add_class_decl, print_class_decls, process_file,
13282         help): Constify a char*.
13284         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
13285         push_int_const, find_constant_wide, find_constant_index,
13286         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
13287         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
13288         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
13289         emit_if, emit_goto, emit_jsr, call_cleanups,
13290         make_class_file_name): Add static prototypes.
13291         (generate_bytecode_return, generate_bytecode_insns): Pass a
13292         NULL_PTR, not a NULL_TREE.
13294         * jv-scan.c: Include "jcf.h".
13295         (main): Declare using DEFUN macro.
13297         * jvspec.c (find_spec_file, lang_specific_pre_link,
13298         lang_specific_driver): Add prototypes.
13299         (find_spec_file): Constify a char*.
13301         * keyword.gperf (hash, java_keyword): Add prototypes.
13303         * lang.c (lang_print_error): Add static prototype.
13304         (lang_init): Prefer memcpy over bcopy to avoid casts.
13306         * lex.c (yylex): Add static prototype.
13308         * parse-scan.y: Include "lex.c" earlier.
13310         * parse.h: Remove redundant declaration for `yylex'.
13312         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
13313         labeled_block_contains_loop_p): Add static prototypes.
13314         (not_accessible_p): Make static to match prototype.
13316         * verify.c (start_pc_cmp): Don't needlessly cast away const.
13318 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13320         * parse.y (check_method_redefinition): Changed leading comment.
13321         (check_abstract_method_definitions): New function.
13322         (java_check_abstract_method_definitions): New function.
13323         (java_check_regular_methods): Call it.
13324         (verify_constructor_super): Fixed indentation.
13325         (lookup_method_invoke): Likewise.
13327 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13329         * parse.y (method_header): Return a null pointer if the current
13330         class node is null.
13331         (finish_method_declaration): Return if the current function decl
13332         is null.
13333         (source_start_java_method): Likewise.
13334         (java_method_add_stmt): Likewise.
13336 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13338         * class.c (emit_register_class): Removed unnecessary call to
13339         start_sequence.
13340         * parse.y (labeled_block_contains_loop_p): Removed unused local
13341         variable.
13343 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13345         * parse.y (java_refold): Added prototype.
13347 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13349         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
13350         (java_stabilize_reference): Removed unnecessary `else'.
13351         (java_complete_lhs): Set flag to remember boolean. Call
13352         java_refold. Added comments.
13353         (java_decl_equiv): New function.
13354         (binop_compound_p): Likewise.
13355         (java_refold): Likewise.
13356         (patch_unaryop): Striped static field access assigned to decl and
13357         op. Changed promotion scheme for ++/-- operators.
13358         (search_loop): New function.
13359         (labeled_block_contains_loop_p): Likewise.
13360         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
13361         comment.
13362         (patch_bc_statement): Call search_loop. Fixed comment.
13364 1999-08-14  Anthony Green  <green@cygnus.com>
13366         * expr.c (java_lang_expand_expr): Mark static array data as
13367         referenced.
13369 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
13371         * jvgenmain.c (main): NUL-terminate name_obstack.
13373 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13375         * check-init.c (check_bool2_init, done_alternative): Add static
13376         prototypes.
13378         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
13379         (add_method, build_utf8_ref, build_class_ref,
13380         append_gpp_mangled_type, layout_class_method): Constify a char*.
13382         * decl.c (push_promoted_type, make_binding_level): Add static
13383         prototypes.
13384         (push_promoted_type, pushdecl): Constify a char*.
13386         * except.c (find_handler_in_range, link_handler,
13387         check_start_handlers): Add static prototypes.
13389         * expr.c (process_jvm_instruction): Constify a char*.
13391         * gjavah.c (main): Constify a char*.
13393         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
13394         Constify a char*.
13396         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
13397         static prototypes.
13398         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
13399         munge, print_ents): Constify a char*.
13401         * jcf-dump.c (disassemble_method): Constify a char*.
13402         (print_constant_pool, print_exception_table): Add static prototypes.
13403         (print_constant, print_exception_table, main, disassemble_method):
13404         Constify a char*.
13406         * jcf-io.c (find_classfile, find_class): Likewise.
13408         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
13409         (set_source_filename, predefined_filename_p): Add static prototypes.
13410         (set_source_filename, get_constant, get_class_constant,
13411         find_in_current_zip): Constify a char*.
13413         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
13414         static prototypes.
13415         (add_entry, add_path, jcf_path_classpath_arg,
13416         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
13418         * jcf-reader.c (get_attribute, jcf_parse_preamble,
13419         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
13420         jcf_parse_one_method, jcf_parse_methods,
13421         jcf_parse_final_attributes): Add static prototypes.
13422         (get_attribute): Constify a char*.
13424         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
13425         jcf_dependency_add_target, jcf_path_classpath_arg,
13426         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
13428         * jv-scan.c (main): Constify a char*.
13429         (gcc_obstack_init): Add prototype arguments.
13431         * jvgenmain.c (gcc_obstack_init): Likewise.
13432         (main): Constify a char*.
13434         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
13435         static prototypes.
13436         (put_decl_string, lang_print_error): Constify a char*.
13437         (lang_init): Remove redundant extern prototype.
13439         * mangle.c (emit_unicode_mangled_name): Constify a char*.
13441         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
13442         Add static prototypes.
13443         (get_type_from_signature): Constify a char*.
13445         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
13446         Add static prototypes.
13447         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
13448         (verify_jvm_instructions): Constify a char*.
13450         * xref.c (xref_flag_value): Likewise.
13452         * xref.h (xref_flag_value): Likewise.
13454         * zextract.c (makeword, makelong): Add static prototypes.
13455         (makeword, makelong): Constify a uch*.
13457 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13459         * lang.c (java_dummy_print): Constify a char*.
13460         (lang_print_error): Likewise.
13461         (lang_init): Remove redundant prototype for `print_error_function'.
13462         (lang_init_source): Likewise.
13463         (lang_identify): Constify a char*.
13465 1999-08-09  Tom Tromey  <tromey@cygnus.com>
13467         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
13468         (WORDS_TO_LONG): Likewise.
13469         (WORDS_TO_DOUBLE): Likewise.
13471 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13473         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
13475         * expr.c (java_stack_pop, java_array_data_offset,
13476         build_java_throw_out_of_bounds_exception, case_identity,
13477         build_java_check_indexed_type): Add static prototypes.
13478         (linenumber_table, expand_invoke, expand_java_field_op,
13479         build_primtype_type_ref, expand_byte_code): Constify a char*.
13481         * java-tree.h (build_primtype_type_ref, linenumber_table):
13482         Constify a char*.
13483         (java_lang_expand_expr): Add prototype.
13485         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
13486         `java_lang_expand_expr'.
13488         * lex.c (java_lex_error): Constify a char*.
13489         (java_get_unicode, java_read_char, java_allocate_new_line,
13490         java_unget_unicode, java_sneak_unicode): Prototype.
13492         * parse-scan.y (current_class, package_name, method_declarator,
13493         report_class_declaration, yyerror): Constify a char*.
13495         * parse.h (java_report_errors): Prototype.
13496         (yyerror): Constify a char*.
13498         * parse.y (classitf_redefinition_error, check_modifiers,
13499         parse_jdk1_1_error, lookup_package_type,
13500         lookup_package_type_and_set_next, get_printable_method_name,
13501         purify_type_name): Constify a char*.
13502         (build_super_invocation, maybe_generate_finit,
13503         verify_constructor_super, parser_add_interface,
13504         add_superinterfaces, jdep_resolve_class, note_possible_classname,
13505         java_complete_expand_methods, java_expand_finals,
13506         cut_identifier_in_qualified, java_stabilize_reference,
13507         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
13508         merge_string_cste): Prototype.
13509         (single_type_import_declaration, yyerror,
13510         variable_redefinition_error, build_array_from_name,
13511         build_unresolved_array_type, check_class_interface_creation,
13512         resolve_class, complete_class_report_errors,
13513         note_possible_classname, read_import_dir,
13514         find_in_imports_on_demand, resolve_package, fix_constructors,
13515         check_deprecation, lookup_method_invoke,
13516         maybe_build_primttype_type_ref, array_constructor_check_entry):
13517         Constify a char*.
13518         (java_complete_expand_methods, java_expand_finals): Make static.
13519         (convert_narrow): Remove static prototype.
13521 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
13523         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
13525 1999-08-02  Richard Henderson  <rth@cygnus.com>
13527         * decl.c: Include defaults.h instead of expr.h.
13528         * parse.y: Likewise.
13530 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
13532         * java/decl.c (start_java_method): Change all uses of
13533         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
13534         Ensure expr.h is included.
13535         * java/expr.c (pop_arguments): Ditto.
13536         * java/parse.y (expand_start_java_method): Ditto.
13538 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13540         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
13542 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
13544         * decl.c: Include "function.h".
13545         * except.c: Likewise.
13546         * parse.y: Likewise.
13547         * Makefile.in: Update dependencies.
13549 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13551         * expr.c (build_java_soft_divmod): Provide a default case in switch.
13552         (java_lang_expand_expr): Mark parameters `target', `tmode' and
13553         `modifier' with ATTRIBUTE_UNUSED.
13555         * gjavah.c (process_file): Add braces around ambiguous `else'.
13557         * jcf-dump.c (print_access_flags, localvar_free): Change return
13558         type to void.
13560         * parse.y (java_complete_expand_method): Initialize variable
13561         `exception_copy'.
13562         (resolve_qualified_expression_name): Likewise for `field_decl'.
13563         (patch_method_invocation): Likewise for `class_to_search'.
13564         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
13565         (patch_assignment): Likewise for `lhs_type'.
13567         * verify.c (verify_jvm_instructions): Remove unused variable
13568         `caller'.
13570 1999-07-25  Richard Henderson  <rth@cygnus.com>
13572         * decl.c (va_list_type_node): New.
13574 1999-07-25  Anthony Green  <green@cygnus.com>
13576         * gjavah.c (print_stub): New function.
13577         (METHOD_IS_NATIVE): New macro.
13578         (print_mangled_classname): Make static.
13579         (HANDLE_END_FIELD): Don't emit fields during stub generation.
13580         (process_file): Perform stub generation.
13581         (HANDLE_METHOD): Don't emit class decls during stub
13582         generation.
13583         (HANDLE_END_METHOD): Take into account stub generation.
13584         (print_method_info): Handle stub generation.
13585         (print_stub): New function.
13586         (print_cxx_classname): Make signature consistant with others.
13587         (help): Describe -stubs option.
13588         (main): Create stub file.
13589         (version): Use version.c.
13590         (print_full_cxx_name): New function.
13591         (print_c_decl): Use print_full_cxx_name.
13593 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13595         * check-init.c (check_init): Handle MAX_EXPR.
13597 1999-07-15  Andrew Haley  <aph@cygnus.com>
13599         * lang.c (flag_use_divide_subroutine): New variable.
13600         * typeck.c: (convert_ieee_real_to_integer): Bounds check
13601         fp-to-integer conversion.
13602         (convert): Call convert_ieee_real_to_integer when flag_fast_math
13603         is not set.
13605         * expr.c (build_java_soft_divmod): New function.
13606         (build_java_binop): Call build_java_soft_divmod if
13607         flag_use_divide_subroutine is set.
13608         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
13609         soft_lrem_node: new builtin functions.
13610         (init_decl_processing) Initialize the new builtins.
13611         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
13612         soft_lrem_node: new builtin functions.
13613         (build_java_soft_divmod): New function.
13614         * parse.y: Call build_java_soft_divmod if
13615         flag_use_divide_subroutine is set.
13616         * parse.c: Rebuilt.
13618         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
13619         a --specs= arg) even if not linking.
13620         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
13621         -fuse-divide-subroutine
13623 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13625         * parse.y (resolve_and_layout): Check methods only once.
13626         (resolve_qualified_expression_name): Verify thrown exceptions
13627         compatibility.
13628         (check_thrown_exceptions): Reject exceptions thrown in
13629         initializer. Error message tuned.
13631 1999-07-14  Andrew Haley  <aph@cygnus.com>
13633         * expr.c (expand_expr): Do not return the last statement in a
13634         block as the block's value.
13636 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13638         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
13639         CALL_EXPR, to avoid order of evaluation changes.
13641 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13643         * parse.y (qualify_ambiguous_name): Do not use
13644         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
13646 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13648         * check-init.c (check_init): Handle MAX_EXPR.
13649         * expr.c (force_evaluation_order): Force method call arguments to
13650         be evaluated in left-to-right order.
13651         * parse.y (qualify_ambiguous_name): Loop again to qualify
13652         NEW_ARRAY_EXPR properly.
13654 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13656         * parse.y (patch_invoke): Resolve unresolved invoked method
13657         returned type.
13658         (qualify_ambiguous_name): STRING_CST to qualify expression for
13659         type name resolution.
13661 1999-06-24  Andrew Haley  <aph@cygnus.com>
13663         * class.c (finish_class): Whenever a deferred method is
13664         output, rescan the list of methods to see if a new candidate for
13665         output can be found.
13667 1999-06-28  Tom Tromey  <tromey@cygnus.com>
13669         * jvspec.c (lang_specific_driver): Recognize --help.
13671 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13673         * parse.y (resolve_package): Fixed bogus return statement.
13674         (patch_method_invocation): Resolve method invocation beginning with
13675         a package name qualifier.
13677 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13679         * Make-lang.in (java.stage1): Depend on stage1-start.
13680         (java.stage2): Likewise for stage2-start.
13681         (java.stage3): Likewise for stage3-start.
13682         (java.stage4): Likewise for stage4-start.
13684 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13686         * parse.y (java_complete_lhs): When doing cross referencing, don't
13687         try to keep file location on a WFL expanded as a CALL_EXPR.
13689 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13691         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
13692         compiling to class file a void method with an empty method body.
13693         As a side effect, the bytecode backend will generate the
13694         appropriate `return' instruction.
13696 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13698         * parse.y (lookup_package_type_and_set_next): New function prototype.
13699         (resolve_package): Search current and imported packages.
13700         (lookup_package_type_and_set_next): New function.
13702 1999-06-22  Andrew Haley  <aph@cygnus.com>
13704         * verify.c (verify_jvm_instructions): Check for pending blocks
13705         before invalid PC test and opcode switch, not after.
13707 1999-06-21  Andrew Haley  <aph@cygnus.com>
13709         * except.c (find_handler_in_range): The upper limit for exception
13710         ranges is exclusive, not inclusive: (start <= pc < end).
13711         (link_handler): find child pointer which points to outer by
13712         searching sibling list: previous code incorrectly assumed that
13713         outer->outer->first_child must point to outer.
13714         * verify.c (verify_jvm_instructions): FIXME added to code for
13715         `athrow'.
13716         (verify_jvm_instructions): Do not assume that the last block
13717         processed in a subroutine is a block which ends with a `ret'
13718         instruction.  With some control flows it is possible that the last
13719         block ends with an `athrow'.
13721 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13723         * parse.y (qualify_ambiguous_name): Reorganized the post
13724         evaluation of non WFL leading expression nodes.
13726 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13728         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
13729         CONVERT_EXPR.
13731 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13733         * parse.y (qualify_ambiguous_name): Handle qualified expression
13734         beginning with a STRING_CST.
13736 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13738         * parse.y (register_fields): Set DECL_INITIAL on both
13739         pre-initialized static and public fields.
13740         (resolve_field_access): Static field access expressions to always
13741         use pointer types.
13742         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
13743         qualification. CONVERT_EXPR to be resolved as an expression name.
13744         (java_complete_lhs): Identify and access qualified final
13745         initialized field in switch statement case expression.
13746         (fold_constant_for_init): Pre-initialized field decl constant to
13747         be folded.
13749 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13751         * parse.y (note_possible_classname): Mark returned node with
13752         QUALIFIED_P only if the original class name contained a '/'.
13754 1999-06-05  Anthony Green  <green@cygnus.com>
13756         * Make-lang.in (gcjh): More parallel build fixes.
13758 1999-06-03  Mike Stump  <mrs@wrs.com>
13760         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
13762 1999-06-02  Anthony Green  <green@cygnus.com>
13764         * except.c (link_handler): Chain exception handlers in order.
13766 1999-06-02  Anthony Green  <green@cygnus.com>
13768         * expr.c (expand_byte_code): Fill unreachable bytecode regions
13769         with nops and process as usual in order to always set correct EH
13770         ranges.  Emit detailed warnings about unreachable bytecodes.
13772 1999-06-02  Anthony Green  <green@cygnus.com>
13774         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
13775         constant.
13777 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13779         * parse.y (lookup_field_wrapper): Unified returned value to NULL
13780           or the searched field decl.
13782 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13784         * parse.y (fold_constant_for_init): Convert numerical constant
13785         values to the type of the assigned field.
13787 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13789         * expr.c (lookup_field): Relaxed the test on class loading error
13790         detection.
13791         * parse.y (fold_constant_for_init): Enabeled old code.
13793 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13795         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
13796         decide the validity of the cast of a java.lang.Cloneable reference
13797         to an array.
13798         (patch_conditional_expr): Fixed first argument passed to
13799         binary_numeric_promotion.
13801 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13803         * parse.y (qualify_ambiguous_name): Take into account that a
13804         CONVERT_EXPR might specify a type as a WFL.
13806 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13808         * parse.y (patch_assignment): Save the rhs before using it as an
13809         argument to _Jv_CheckArrayStore.
13811 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13813         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
13815 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13817         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
13818         floating point literal only when the exponent indicator has been
13819         parsed.
13821 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13823         * parse.y (formal_parameter:): Construct argument tree list
13824         element even if a yet unsupported final parameter was encountered.
13826 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13828         * parse.y (finish_method_declaration): Issue errors for native or
13829         abstract methods declared with a method body, as well as for non
13830         native or non abstract methods with no method body.
13832 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13834         * class.c (build_utf8_ref): Initialize variable `field'.
13836         * decl.c (init_decl_processing): Initialize variable `field'.
13838         * expr.c (build_known_method_ref): Mark parameters `method_type',
13839         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
13840         (process_jvm_instruction): Likewise for parameter `length'.
13842         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
13843         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
13844         ATTRIBUTE_UNUSED.
13846         * parse.y (maybe_generate_clinit): Remove unused variable
13847         `has_non_primitive_fields'.
13848         (find_in_imports_on_demand): Initialize variables `node_to_use'
13849         and `cl'.
13850         (patch_binop): Likewise for variable `prom_type'.
13851         (patch_unaryop): Likewise for variable `prom_type'.
13853         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
13855         * xref.c (xref_table): Add missing initializer.
13857 1999-05-14  Tom Tromey  <tromey@cygnus.com>
13859         * java-except.h (struct eh_range): Removed unused `next' member.
13860         * verify.c (verify_jvm_instructions): Call check_nested_ranges
13861         after adding all exception handlers.  Sort exception ranges in
13862         order of start PC.
13863         (struct pc_index): New structure.
13864         (start_pc_cmp): New function.
13865         * except.c (add_handler): Return `void'.  Don't call link_handler;
13866         instead construct an ordinary linked list and do range
13867         coalescing.
13868         (check_nested_ranges): New function.
13869         (link_handler): Changed interface to allow merging of eh_ranges.
13870         Split overlapping ranges.  Return `void'.
13872 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13874         * parse.y (constructor_block_end:): New rule, tagged <node>.
13875         (constructor_body:): Use `constructor_block_end' instead of
13876         `block_end'.
13878 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13880         * parse.y (statement_nsi:): Pop `for' statement block.
13881         (java_complete_lhs): Labeled blocks containing no statement are
13882         marked as completing normally.
13884 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13886         * xref.c (xref_set_current_fp): New function, defined.
13887         * xref.h (xref_set_current_fp): New function, prototyped.
13889 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13891         * check-init.c (check_init): Take into account that
13892         LABELED_BLOCK_STMT can be empty.
13894 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13896         * parse.y (java_check_regular_methods): Warning check on not
13897         overriding methods with default access in other packages does not
13898         apply to `<clinit>'.
13899         (java_complete_lhs): If block body is an empty_stmt_node, replace
13900         it by NULL_TREE. This prevents gcc from generating an irrelevant
13901         warning.
13903 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13905         * check-init.c (check_init): Removed code accepting to see things
13906         falling through default:, when doing xrefs.
13907         * java-tree.h (do_not_fold): New global variable, declared.
13908         * parse.y (do_not_fold): New global variable, defined.
13909         (java_complete_expand_method): Set `do_not_fold' to the value of
13910         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
13911         and reinstall them after them have been purged; do not check for
13912         initializations; do not issue missing return errors.
13913         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
13914         when doing xrefs.
13915         (patch_binop): Skip the fold part when doing xrefs.
13916         (build_string_concatenation): Skip the concatenation part when
13917         doing xrefs.
13918         (patch_synchronized_statement): Do not generate a try-finally when
13919         doing xrefs.
13920         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
13921         and keep the location where the throw was seen.
13922         * typeck.c (convert): When `do_not_fold' is set, do not attempt
13923         any treatment on the converted node an simply return a NOP_EXPR of
13924         the targeted type.
13925         * xref.c (xref_get_data): New function, defined.
13926         * xref.h (xref_get_data): New function, declared.
13927         (XREF_GET_DATA): Use xref_get_data.
13929 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13931         * gjavah.c (print_include): Cast the result of `strlen' to int
13932         when comparing against a signed value.
13933         (add_namelet): Likewise.
13935 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13937         * expr.c (expand_invoke): Mark parameter `nargs' with
13938         ATTRIBUTE_UNUSED.
13939         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
13941         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
13942         ATTRIBUTE_UNUSED.
13944         * jcf-reader.c (get_attribute): Cast a value to long
13945         when comparing against a signed expression.  Likewise.
13947         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
13948         HOST_BITS_PER_CHAR.
13950 1999-05-11  Andrew Haley  <aph@cygnus.com>
13952         * parse.y (source_end_java_method): If the current method contains
13953         any exception handlers, force asynchronous_exceptions: this is
13954         necessary because signal handlers in libjava may throw exceptions.
13955         * decl.c (end_java_method): Ditto.
13957 1999-05-11  Tom Tromey  <tromey@cygnus.com>
13959         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
13960         flags.
13961         * jvspec.c (THREAD_NAME): Removed.
13962         (GC_NAME): Likewise.
13963         (MATHLIB): Likewise.
13964         (WITHLIBC): Likewise.
13965         (GCLIB): Likewise.
13966         (THREADLIB): Likewise.
13967         (MATH_LIBRARY): Likewise.
13968         (lang_specific_driver): Don't add `-l' options to command line.
13969         Instead, add a single --specs option.  Recognize `-L' options and
13970         use them to search for spec file.
13971         (find_spec_file): New function.
13972         (SPEC_FILE): New define.
13974 1999-05-11  Dave Brolley  <brolley@cygnus.com>
13976         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
13977         cpplib-enabled build.
13979 1999-05-05  Per Bothner  <bothner@cygnus.com>
13981         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
13982         temporarily zero it while calling rest_of_decl_compilation.
13984         * java-tree.h (string_ptr_type_node):  Add declaration.
13985         * decl.c:  Define and initialize string_ptr_type_node.
13986         * parse.y (patch_string_cst):  Use string_ptr_type_node.
13988         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
13989         * parse.y (for_statement):  Now unconditionally exit_block.
13990         (finish_labeled_statement):  No longer exit_block if for-loop.
13991         (patch_loop_statement):  Check harder if the loop is already labeled.
13993         * parse.y (patch_initialized_static_field):  Removed function.
13994         (maybe_generate_clinit):  Removed special handling for interfaces.
13995         (java_complete_expand_methods):  Do a preliminary java_complete_tree
13996         on <clinit> to determine if it can be removed.
13997         (java_complete_expand_method):  Remove special handling for <clinit>.
13998         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
13999         optimize if we get back empty_stmt_node.
14000         For MODIFY_EXPR, re-do checking of static initializers.
14001         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
14002         For VAR_DECL, pass correct context.
14004         * verify.c (verify_jvm_instructions):  Better error messages.
14006 1999-05-03  Tom Tromey  <tromey@cygnus.com>
14008         * parse-scan.y (interface_declaration): Call
14009         report_class_declaration for interfaces.
14011 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
14013         * Makefile.in: Remove -v from bison command lines.
14015 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14017         * check-init.c (check_init): Exclude a case of error when doing
14018         xrefs.
14019         * class.c (layout_class_method): Don't generate the error message
14020         twice when compiling from source.
14021         * lang-options.h: Added `-Wredundant-modifers' and
14022         `-Wunusupported-jdk11' flags and help text.
14023         * lang.c (lang_decode_option): Added support for
14024         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
14025         flag_static_local_jdk11 and flag_redundant set accordingly.
14026         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
14027         * parse.h (EXPR_WFL_ADD_COL): New macro.
14028         (DECL_END_SOURCE_LINE): Likewise.
14029         (DECL_INHERITED_SOURCE_LINE): Likewise.
14030         * parse.y (static_ref_err): New function, prototyped.
14031         (CCB_TK): Now tagged <operator>.
14032         (class_body:): Remember the location of the closing '}' of a class
14033         definition when doing xrefs.
14034         (block:): Likewise.
14035         (block_end:): Likewise.
14036         (create_class): Remember the location of the inherited class
14037         identifier when doing xrefs.
14038         (register_fields): Added test on first operand of `init' before
14039         testing it TREE_CODE.
14040         (method_header): Store the location of the class identifier in the
14041         class decl when doing xrefs.
14042         (finish_method_declaration): Don't combine first/last method line
14043         when doing xref.
14044         (java_check_regular_methods): Warning check on not overriding
14045         methods with default access on other packages move before check on
14046         static methods. Initialization of `aflags' also moved up.
14047         (resolve_expression_name): Call static_ref_err to report the error.
14048         (static_ref_err): New function, implemented.
14049         (resolve_field_access): Returned simplified static field access
14050         when doing xrefs.
14051         (resolve_qualified_expression_name): Check for illegal use of
14052         static fields in a non static context. Call static_ref_err to
14053         report error in various places.
14054         (java_complete_tree): Do not fold initialized static fields when
14055         doing xrefs.
14056         (java_complete_lhs): Likewise.
14058 1999-04-29  Anthony Green  <green@cygnus.com>
14060         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
14061         create internal labels.
14062         (lookup_label): Ditto.
14064 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14066         * class.c (layout_class_method): Generate <clinit>'s rtl for
14067         interfaces.
14068         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
14069         for interfaces' <clinit>.
14070         * expr.c (lookup_field): Search for fields in interfaces.
14071         (expand_invoke): Fixed indentation.
14072         (expand_java_field_op): Likewise. Use IS_CLINIT.
14073         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
14074         (IS_CLINIT): New macro.
14075         * parse.y (type_declaration:): Call maybe_generate_clinit after an
14076         interface was parsed.
14077         (maybe_generate_clinit): Don't generate if the current class is an
14078         interface with only fields of primitive types.
14079         (reset_method_name): Use IS_CLINIT.
14080         (java_complete_expand_method): Expand <clinit> when it exists for
14081         interfaces. Use IS_CLINIT.
14082         (resolve_expression_name): Use DECL_CONTEXT instead of
14083         current_class to build static field references.
14084         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
14085         ARRAY_REF when doing xreferencing.
14086         (check_final_assignment): Fixed typo in leading comment. Use
14087         IS_CLINIT.
14088         (patch_array_ref): Don't fully expand array references when
14089         xreferencing.
14090         (patch_return): Use IS_CLINIT.
14091         (patch_throw_statement): Likewise.
14093 1999-04-22  Tom Tromey  <tromey@cygnus.com>
14095         * Make-lang.in (JAVA_SRCS): Added check-init.c.
14097 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14099         * decl.c (predef_filenames, predef_filenames_size): New globals
14100         (init_decl_processing): predef_filenames and predef_filenames_size
14101         initialized.
14102         * java-tree.h (predef_filenames, predef_filenames_size): Declared
14103         extern.
14104         * jcf-parse.c (predefined_filename_p): New function.
14105         (yyparse): Check that files on the command line are specified only
14106         once and issue a warning otherwise.
14107         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
14108         * parse.y (source_end_java_method): Nullify NOP method bodies, to
14109         avoid a gcc warning with -W -Wall turned on.
14110         (java_expand_classes): Abort if errors were encountered.
14111         (java_complete_lhs): If the cross reference flag is set, wrap
14112         field DECL node around a WFL when resolving expression name.
14114 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14116         * lang.c (lang_decode_option): Fixed returned value when parsing
14117         `-fxref=...' and `-Wall'.
14118         * parse.y (source_end_java_method): Do not generate code when
14119         flag_emit_xref is set.
14120         (resolve_expression_name): Do not build static field access when
14121         flag_emit_xref is set.
14122         (resolve_field_access): No special treatment on `length' when
14123         flag_emit_xref is set. Do not build qualified static field access
14124         when flag_emit_xref is set.
14125         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
14126         when flag_emit_xref is set.
14127         (patch_assignment): Do not generate array store runtime check when
14128         flag_emit_xref is set.
14129         * xref.c (xref_flag_value): Fixed function declaration
14130         indentation.
14131         (xset_set_data): New function.
14132         * xref.h (xref_set_data): Added prototype for new function.
14133         (typedef struct xref_flag_table): New field data.
14134         (XREF_GET_DATA): New macro.
14136 1999-04-19  Tom Tromey  <tromey@cygnus.com>
14138         * xref.h (enum): Removed trailing comma.
14140         * parse.y (resolve_qualified_expression_name): Added missing
14141         `break'.
14143 1999-04-15  Anthony Green  <green@cygnus.com>
14145         * gjavah.c: New prototypes for java_float_finite and
14146         java_double_finite.
14148 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14150         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
14151         references.
14153 1999-04-06  Jeffrey A Law  (law@cygnus.com)
14155         * Makefile.in (TREE_H): Add tree-check.h.
14156         (RTL_H): Add genrtl.h.
14158 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14160         * parse.y (patch_assignment): Added ArrayStoreException runtime
14161         check.
14163 1999-04-06  Per Bothner  <bothner@cygnus.com>
14165         * expr.c (pop_type_0):  New function.
14166         (pop_type):  Use pop_type_0.
14167         * java-tree.h (pop_type_0):  New declaration.
14168         * verify.c (verify_jvm_instructions):  Check return instructions.
14170         * parse.y (patch_binop):  Don't fold if non-constant and emiting
14171         class files.
14173 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14175         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
14177         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
14178         (main_jcf): Don't define.
14179         (process_file): Don't set `main_jcf'.
14181         * java-tree.h (main_jcf): Don't declare.
14183         * jcf-parse.c (main_jcf): Add static definition.
14185         * lang.c (main_jcf): Don't define.
14187 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14189         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
14191         * decl.c (copy_lang_decl): Likewise for `bcopy'.
14193         * jcf-depend.c: Include "config.h", not <config.h>.
14195         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
14196         `bcopy' to PTR.
14198         * jcf-path.c: Include "config.h", not <config.h>.
14200         * lex.c: Don't include various system header files.
14201         (java_init_lex): Cast the argument of `bzero' to PTR
14203         * parse-scan.y (java_push_parser_context): Likewise.
14205         * parse.y (java_push_parser_context): Likewise.
14206         (patch_bc_statement): Match format specifier to variable argument.
14208         * xref.c: Don't include <stdio.h>.
14210 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14212         * parse.y (struct parser_ctxt *ctxp): Now global.
14213         (declare_local_variables): Use WFL compound value for the
14214         declaration source line value, when doing cross-referencing.
14216 1999-03-31  Tom Tromey  <tromey@cygnus.com>
14218         * gjavah.c (print_field_info): Allow constants of other types.
14219         (print_include): Generate include when new name is proper prefix
14220         of already printed name.
14221         (add_namelet): Likewise.
14222         (cxx_keyword_subst): New function.
14223         (print_method_info): Use it.
14224         (print_field_name): New function.
14225         (get_field_name): New function.
14226         (print_field_info): Use get_field_name and print_field_name.
14228 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14230         * Makefile.in (keyword.h): Generate using gperf language 'C', not
14231         'KR-C', so gperf uses the `const' keyword on strings.
14233         * keyword.gperf (java_keyword): Const-ify a char*.
14235 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14237         * parse.y (patch_bc_statement): Fixed identation and a bogus
14238         `printf' format.
14240 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14242         * parse.y (patch_assignment): Allow static variables in other
14243         classes to be assigned.
14245 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14247         * class.c (maybe_add_interface): Remove unused variable
14248         `interface_binfo'.
14249         (make_class_data): Use = for assignment, not ==.  Likewise.
14250         (emit_register_classes): Remove unused variable `decl'.
14252         * lex.c: Fix comment so as not to contain an embedded `/*'.
14254         * verify.c (verify_jvm_instructions): Remove unused variable
14255         `self_type'.
14257 1999-03-27  Per Bothner  <bothner@cygnus.com>
14259         * parse.y (complete_loop_body):  Rename to finish_loop_body.
14260         (complete_labeled_statement):  Rename to finish_labeled_statement.
14261         (complete_for_loop):  Rename to finish_for_loop.
14262         (complete_method_declaration):  Rename to finish_method_declaration.
14264         * java-tree.h (continue_identifier_node):  New global node.
14265         * decl.c:  Define and initialize continue_identifier_node.
14266         * parse.y (generate_labeled_block):  Remove - no longer needed.
14267         (build_loop_body):  Use continue_identifier_node for continue block.
14268         (finish_labeled_statement):  Also do pop_labeled_block actions.
14269         (java_complete_lhs):  POP_LOOP even if error.
14270         (build_labeled_block):  Special handling for continue_identifier_node.
14271         (patch_loop_statement):  Re-organize.
14272         (patch_bc_statement):  Re-write.
14274 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14276         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
14277         using a WFL compound value.
14278         * parse.y (xref.h): Include.
14279         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
14280         WFL compound value.
14281         (register_fields): Set WFL compound value to lineno if doing
14282         xrefs.
14283         (java_complete_expand_method): Call expand_xref if flag_emit_xref
14284         is set.
14285         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
14286         * xref.h (expand_xref): Prototype renamed from xref_generate.
14288 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14290         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
14291         (GET_CURRENT_BLOCK): New macro.
14292         * parse.y (current_static_block): New global variable.
14293         (method_body:): Define action.
14294         (complete_method_declaration): Set current_function_decl to NULL
14295         when work on the current method is done.
14296         (declare_local_variables): Use GET_CURRENT_BLOCK.
14297         (java_method_add_stmt): Likewise.
14298         (java_complete_expand_method): Disable the use of `this' when
14299         expanding <clinit>.
14300         (enter_a_block): If no current method exist, use
14301         current_static_block to link static initializer blocks.
14302         (exit_block): Rewritten to use current_static_block when no current
14303         method decl exists.
14304         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
14305         (patch_return): Forbid the use of `return' in static initializers.
14306         (patch_throw_statement): Fixed indentation. Issue specific error
14307         for uncaught thrown checked exception in static initializer
14308         blocks. Removed FIXME.
14310 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
14312         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
14313         Link gcj from gcc.o.
14315 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14317         * parse.y (find_applicable_accessible_methods_list): When dealing
14318         with interface: ensure that a given interface or java.lang.Object
14319         are searched only once.
14321 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14323         * gjavah.c (print_c_decl): Remove unused argument `flags'.
14325         * jcf-dump.c (print_access_flags): Add braces around if-else.
14327         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
14328         COMBINE_INPUTS.
14330         * lex.c (build_wfl_node): Add static prototype.
14332         * lex.h (build_wfl_node): Remove static prototype.
14334         * parse.y: Include lex.c early enough to declare everything needed.
14335         Ensure calls to `build_wfl_node' pass the proper arguments.
14336         (create_class): Remove unused variable `super_decl'.
14337         (get_printable_method_name): Initialize variable `name'.
14339 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14341         * Changelog: Fixed 1999-03-22 typos.
14342         * lang.c (lang_decode_option): Fixed typo in error string in the
14343         XARG section.
14345 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14347         * Makefile.in (JAVA_OBJS): Added entry xref.o.
14348         (xref.o): New rule.
14349         * java-tree.h (flag_emit_xref): Declared extern.
14350         * lang.c (xref.h): Included.
14351         (flag_emit_xref): New global variable.
14352         (lang_decode_option): Added support for -fxref.
14353         * xref.c: Created.
14354         * xref.h: Likewise.
14356 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
14358         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
14359         linked with.
14361 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14363         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
14364         $(srcdir)/../system.h and $(JAVA_TREE_H).
14365         (jcf-io.o): Depend on $(JAVA_TREE_H).
14366         (mangle.o): Likewise.
14368         * check-init.c (check_cond_init): Add static prototype.
14370         * class.c (build_java_method_type, hashUtf8String,
14371         make_field_value, get_dispatch_vector, get_dispatch_table,
14372         append_gpp_mangled_type, mangle_static_field): Likewise.
14373         (strLengthUtf8): Hide unused definition.
14374         (hashUtf8String): Const-ify.
14375         (make_field_value): Un-ANSI-fy.
14377         * constants.c: Move inclusion of jcf.h above java-tree.h.
14378         (set_constant_entry, find_class_or_string_constant,
14379         find_name_and_type_constant, get_tag_node,
14380         build_constant_data_ref): Add static prototype.
14382         * decl.c (push_jvm_slot, builtin_function,
14383         lookup_name_current_level): Likewise.
14384         (builtin_function): Const-ify.
14386         * except.c (expand_start_java_handler, expand_end_java_handler):
14387         Add static prototype.
14389         * expr.c (flush_quick_stack, push_value, pop_value,
14390         java_stack_swap, java_stack_dup, build_java_athrow,
14391         build_java_jsr, build_java_ret, expand_java_multianewarray,
14392         expand_java_arraystore, expand_java_arrayload,
14393         expand_java_array_length, build_java_monitor, expand_java_pushc,
14394         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
14395         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
14396         expand_compare, expand_test, expand_cond, expand_java_goto,
14397         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
14398         expand_java_field_op, java_push_constant_from_pool): Likewise.
14400         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
14401         (build_java_arraynull_check): Mark parameters `node' and `type'
14402         with ATTRIBUTE_UNUSED.
14403         (note_label): Likewise for parameter `current_pc'.
14404         (expand_java_call, expand_java_ret): Hide unused definition.
14406         * java-tree.h (make_class, build_constants_constructor,
14407         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
14408         init_outgoing_cpool, register_class, emit_register_classes,
14409         java_layout_seen_class_methods): Prototype.
14410         (unicode_mangling_length): Const-ify.
14411         (append_gpp_mangled_name, append_gpp_mangled_classtype,
14412         emit_unicode_mangled_name, format_int, format_uint,
14413         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
14414         jcf_print_utf8_replace, open_class): Prototype.
14416         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
14417         <stdio.h>.  Include tree.h/java-tree.h.
14418         (utf8_equal_string usage, process_class): Add static prototype.
14419         (open_class): Don't prototype this here.
14420         (utf8_equal_string): Match arguments to format specifiers.
14421         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
14422         TABLE_SWITCH, disassemble_method): Likewise.
14424         * jcf-io.c: Include tree.h/java-tree.h.
14425         (open_class, find_classfile, jcf_print_utf8,
14426         jcf_print_utf8_replace): Const-ify.
14428         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
14429         parse_class_file): Add static prototype.
14430         (find_in_current_zip): Match definition to existing static
14431         prototype.
14433         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
14434         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
14435         finish_jcf_block, define_jcf_label, get_jcf_label_here,
14436         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
14437         write_chunks, adjust_typed_op, generate_bytecode_conditional,
14438         generate_bytecode_return, perform_relocations, init_jcf_state,
14439         init_jcf_method, release_jcf_state, generate_classfile):
14440         Add static prototype.
14441         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
14442         (make_class_file_name): Const-ify.
14444         * jcf.h (find_classfile): Const-ify.
14446         * jv-scan.c (reset_report): Remove prototype.
14448         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
14449         (error): Rewrite to allow varargs.
14451         * lang.c (lang_f_options): Const-ify.
14453         * lex.c (java_parse_escape_sequence): Add static prototype.
14454         (java_allocate_new_line): Match definition to existing static
14455         prototype.
14457         * mangle.c Include tree.h/java-tree.h.
14458         (unicode_mangling_length, emit_unicode_mangled_name,
14459         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
14461         * parse.h (jdep_code): Remove trailing comma in enumeration.
14462         (java_get_line_col): Move prototype outside of !JC1_LITE test.
14463         (reset_report): Add prototype.
14465         * verify.c (push_pending_label, merge_types): Add static
14466         prototypes.
14468         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
14470 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14472         * parse.y (find_applicable_accessible_methods_list): Extend the
14473         search to superinterfaces when relevant.
14474         (search_applicable_methods_list): New function.
14476 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14478         * class.c (unmangle_classname): Implemented stricter testing
14479         before setting the QUALIFIED_P flag on an identifier.
14481 1999-03-16  Per Bothner  <bothner@cygnus.com>
14483         * parse.y (java_complete_lhs):  Call force_evaluation_order
14484         after patch_newarray.
14485         (patch_binop):  Don't call fold if there are side effects.
14487 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14489         * parse.y (java_stabilize_reference): Use save_expr instead of
14490         building a SAVE_EXPR node.
14491         (java_complete_lhs): Patch the resulting string of the `+='
14492         operator (if necessary) and complete the RHS after having built
14493         the cast.
14495 1999-03-15  Per Bothner  <bothner@cygnus.com>
14497         * class.c (make_class):  Don't set CLASS_P here (because
14498         this function is also called by build_java_array_type).
14499         (push_class):  Set CLASS_P here instead.
14500         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
14502         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
14503         context.  If the context is class, perfer "super" over "synchronized".
14504         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
14506         * parse.y (create_class):  Don't call parser_check_super here;
14507         it is not robust.  Always wait until later.
14509         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
14510         match what JDK 1.2 does), but don't set ACC_PUBLIC.
14512 1999-03-13  Per Bothner  <bothner@cygnus.com>
14514         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
14515         * lex.h (UNGETC):  Change misleading macro.
14517 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14519         * parse.y (java_stabilize_reference): Return NODE when patching a
14520         COMPOUND_EXPR.
14521         (java_complete_lhs): Put parenthesis around truth values.
14523 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14525         * class.c (layout_class_method): Don't make rtl for interface
14526         methods.
14527         * parse.h (GET_TYPE_NAME): New macro.
14528         * parse.y (if_then_statement:): Fixed indentation.
14529         (if_then_else_statement:): Likewise.
14530         (for_statement:): Fixed spacing.
14531         (try_statement:): Fixed indentation.
14532         (create_interface): Don't force interfaces to be abstract.
14533         (method_header): Abstract methods are OK in interfaces.
14534         (declare_local_variables): Fixed typo in comment.
14535         (java_complete_expand_method): Fixed indentation.
14536         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
14537         non accessible fields.
14538         (java_stabilize_reference): New function.
14539         (java_complete_lhs): Fixed indentation. Use
14540         java_stabilize_reference in compound assignment. Insert the
14541         cast. If not processing `+' fix string constants before processing
14542         binop.
14544 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14546         * constants.c (find_class_or_string_constant): Cast variable `j'
14547         to a `jword' when comparing against one.
14549         * expr.c (java_lang_expand_expr): Remove unused variables
14550         `has_finally_p' and `op0'.
14552         * gjavah.c (print_field_info): Cast a value to jint when comparing
14553         against one.  Likewise for a jlong.
14554         (add_namelet): Likewise cast a `sizeof' to an int when comparing
14555         against a signed quantity.
14557         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
14558         (print_signature): Don't needlessly dereference variable `str'
14560         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
14561         `max_locals' with ATTRIBUTE_UNUSED.
14562         (jcf_parse_class): Likewise for variable `index'.
14564         * parse.h (reverse_jdep_list): Remove static prototype.
14566         * parse.y (build_jump_to_finally): Remove prototype and definition.
14567         (reverse_jdep_list): Add static prototype.
14569         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
14570         `assignment' and `expr_decl'.
14572         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
14574 1999-03-12  Andrew Haley  <aph@cygnus.com>
14576         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
14577         we'll need a directory separator and a null character.
14579 1999-03-10  Per Bothner  <bothner@cygnus.com>
14581         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
14583 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14585         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
14586         interfaces.
14588 1999-03-05  Per Bothner  <bothner@cygnus.com>
14590         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
14592         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
14594         * class.c (layout_class_method):  A static method in a base class
14595         is never overridden, so treat it like it doesn't exist.
14596         However, do complain about private non-static method overriding
14597         public static method.
14599         * parse.y:  Don't set unused INITIALIZED_P flag.
14600         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
14602         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
14603         (build_array_from_name):  Re-order &index[string] to &string[index].
14605         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
14606         error_mark (it might catch more errors, but it is more likely to lose).
14608 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14610         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
14611         (parse-scan.o): Depend on toplev.h.
14613         * class.c (make_method_value): Add prototype.  Make it static.
14614         Remove unused second argument, caller changed.
14616         * expr.c (java_lang_expand_expr): Remove unused variable
14617         `return_label'.
14619         * java-tree.h: Don't prototype find_in_current_zip.
14620         Add prototypes for verify_constant_pool, start_java_method,
14621         end_java_method, give_name_to_locals, expand_byte_code,
14622         open_in_zip, set_constant_value, find_constant1, find_constant2,
14623         find_utf8_constant, find_string_constant, find_class_constant,
14624         find_fieldref_index, find_methodref_index, write_constant_pool,
14625         count_constant_pool_bytes and encode_newarray_type.
14627         * jcf-dump.c: Remove unused variable `LONG_temp'.
14629         * jcf-parse.c: Include parse.h.
14630         (jcf_parse_source): Remove unused parameter, all callers changed.
14631         (jcf_figure_file_type): Add static prototype.
14632         (find_in_current_zip): Likewise.  Also remove unused parameter,
14633         all callers changed.
14634         (read_class): Initialize variable `saved_pos'.
14636         * jcf-reader.c (jcf_parse_preamble): Mark variables
14637         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
14639         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
14640         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
14641         (java_parse_doc_section): Initialize variable `seen_star'.
14642         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
14643         (java_lex_error): Mark parameters `msg' and `forward' with
14644         ATTRIBUTE_UNUSED.
14645         (java_get_line_col): Mark parameters `filename' and `line' with
14646         ATTRIBUTE_UNUSED.
14648         * parse-scan.y: Include toplev.h.
14649         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
14651         * parse.h: use `struct JCF', not plain `JCF'.
14652         (java_parser_context_save_global, java_expand_classes
14653         java_parser_context_restore_global, java_parse): Add prototypes.
14655         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
14656         `node'.
14658 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
14660         *  check-init.c (check_init):  COPYN takes word count, not bit count.
14662 1999-02-26  Per Bothner  <bothner@cygnus.com>
14664         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
14665         explicit build_decl.  (Avoids crash in reload when optimizing.)
14667 1999-02-25  Per Bothner  <bothner@cygnus.com>
14669         * decl.c (complete_start_java_method):  Handle synchronized method
14670         even when compiling from bytecode.
14672 1999-02-26  Tom Tromey  <tromey@cygnus.com>
14674         * gjavah.c (add_class_decl): Only generate `#include' if outer
14675         class is not the name of the class we are processing.  Correctly
14676         append `.h' in #include.
14677         (process_file): Clean up newlines around generated `#include's.
14678         (decode_signature_piece): Correctly handle inner classes.
14679         (struct include): New structure.
14680         (all_includes): New global.
14681         (print_include): New function.
14682         (add_class_decl): Use it.
14683         (process_file): Likewise.
14684         (add_class_decl): Generate include for java-array.h if array
14685         seen.
14686         (process_file): Don't generate java-array.h include.
14688         * gjavah.c (add_namelet): Check for standard package names here.
14689         (add_class_decl): Don't check for standard package names here.
14691 1999-02-25  Tom Tromey  <tromey@cygnus.com>
14693         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
14694         When reading a zip file, only use strncmp if both strings are
14695         bigger than the buffer length.  Initialize `k' when looping
14696         through zip file.
14698 1999-02-24  Tom Tromey  <tromey@cygnus.com>
14700         * gjavah.c (struct namelet): New structure.
14701         (add_namelet): New function.
14702         (print_namelet): New function.
14703         (print_class_decls): Use add_namelet and print_namelet to generate
14704         namespaces and not classes.
14705         (method_printed): New global.
14706         (HANDLE_END_METHOD): Examine method_printed.
14707         (print_method_info): Set method_printed when required.  Print
14708         error if function to be ignored is marked virtual.  Handle $finit$
14709         method.
14710         (METHOD_IS_FINAL): New macro.
14711         (print_field_info): Use it.
14712         (HANDLE_METHOD): Clear method_printed.
14713         (method_pass): New global.
14714         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
14715         (process_file): Do two passes over both fields and methods.
14716         (HANDLE_METHOD): Examine method_pass.
14717         (root): New global.
14718         (add_class_decl): New function.
14719         (print_class_decls): Don't scan over entire constant pool.
14721 1999-02-23  Tom Tromey  <tromey@cygnus.com>
14723         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
14724         disable linking in that case.
14726 1999-02-20  Tom Tromey  <tromey@cygnus.com>
14728         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
14729         not 0x1f.
14731 1999-02-21  Per Bothner  <bothner@cygnus.com>
14733         * decl.c (build_result_decl), java-tree.h:  New method.
14734         (complete_start_java_method):  Handle synchronized methods.
14735         Don't build DECL_RESULT here.  (Ordering dependency problem.)
14736         (start_java_method):  Call build_result_decl here instead  ...
14737         * parse.y (java_complete_expand_method):  ... and here.
14738         (expand_start_java_method): Don't call complete_start_java_method here.
14739         (java_complete_expand_method):  Call it here instead.
14740         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
14741         * java-tree.h:  ... here.
14743         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
14744         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
14745         for ARRAY_REF - it doesn't work when array bounds are checked.
14746         (patch_array_ref):  Handle it here instead.
14748         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
14750 1999-02-19  Per Bothner  <bothner@cygnus.com>
14752         Force left-to-right evaluation of binary operations etc.
14753         * expr.c (force_evaluation_order), java-tree.h:  New function.
14754         * parse.y (java_complete_lhs):  Pass binary operations, procedure
14755         calls, and ARRAY_REFs to force_evaluation_order.
14756         (various):  Set TREE_SIDE_EFFECTS more carefully.
14758         Tolerate random (non-UTF8) encoding in comments without complaining.
14759         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
14760         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
14762         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
14763         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
14765         * parse.y (java_complete_lhs):  Ignore an empty statement in a
14766         COMPOUND_EXPR.  Don't complain about empty statement after return.
14768 1999-02-19  Per Bothner  <bothner@cygnus.com>
14770         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
14771         in TREE_LIST - just chain the POINTER_TYPEs together.
14772         (resolve_class):  If type already resolved, return decl.
14773         After resolving, update TREE_TYPE(class_type), and name (if array).
14774         * parse.h (do_resolve_class), parse.y:  Make non-static.
14775         * class.c (maybe_layout_super_class):  Take this_class argument.
14776         Do do_resolve_class if necessary.
14777         (layout_class, layout_class_methods): Adjust calls appropriately.
14778         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
14779         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
14780         * typeck.c (build_java_array_type):  Don't call layout_class.
14782 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14784         * parse.y (check_pkg_class_access): Allow private class access
14785         within the same package.
14786         (strip_out_static_field_access_decl): New function.
14787         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
14788         operator argument before testing its nature.
14790 1999-02-03  Per Bothner  <bothner@cygnus.com>
14792         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
14793         (TRY_EXPR):  Simplify - it no longer has a finally clause.
14794         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
14795         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14796         * expr.c (java_lang_expand_expr):  Likewise.
14797         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
14798         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
14799         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
14800         (build_try_statement):  Remove finally parameter and handling.
14801         (build_try_finally_statement):  New function.
14802         (patch_try_statement):   No longer need to support finally clause.
14803         (try_statement):  Update grammar action rules.
14804         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
14805         Simpler handling of TRY_EXPR, which no longer has a finally clause.
14807 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
14809         * jcf-parse.c (get_constant): Add braces around computation of 'd'
14810         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
14812 1999-02-17  Andrew Haley  <aph@cygnus.com>
14814         * class.c (build_utf8_ref): Back out broken patch which was
14815         intended to to output signatures using '.' as a separator.
14817         * class.c (make_class_data): Output signatures using '.' as a
14818         separator, rather than '/'.
14819         (mangled_classname): Likewise.
14820         (make_field_value): Likewise.
14821         (make_method_value): Likewise.
14822         * constants.c (alloc_class_constant): Likewise.
14823         * expr.c (build_invokeinterface): Likewise.
14825 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14827         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
14828         of an ancient workaround.
14830 1999-02-10  Jeffrey A Law  (law@cygnus.com)
14832         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
14833         here anymore.
14835 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14837         * lex.c (yylex): Encode \0 as UTF8.
14839 1999-02-10  Tom Tromey  <tromey@cygnus.com>
14841         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
14842         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
14843         (libgcj_zip): Renamed.
14844         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
14845         LIBJAVA_ZIP_FILE.
14846         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
14848         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
14849         (GC_NAME): Renamed -lgc to -lgcjgc.
14851 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14853         * lex.c (java_lang_cloneable): Initialize.
14854         * parse.y (java_lang_cloneable): New static variable.
14855         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
14856         doing one more qualification round.
14857         (valid_ref_assignconv_cast_p): Reject null source or
14858         destination. Allow an array to be cast into java.lang.Cloneable.
14859         (patch_cast): Swapped two first arguments to first call to
14860         valid_ref_assignconv_cast_p.
14862 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14864         * parse.h: DECL_P renamed JDECL_P.
14865         * parse.y: DECL_P replaced by JDECL_P.
14866         (build_array_from_name): Always use pointer's type.
14867         (patch_bc_statement): Extra code to search continue target in a
14868         for loop. Fixed comments. Continue target is current loop when
14869         unlabeled.
14871 1999-02-05  Andrew Haley  <aph@cygnus.com>
14873         * class.c (make_class_data): The superclass of an interface should
14874         be null, not class Object.
14876         * lex.c (java_lex): Sign extend hex literals.
14878 1999-02-04  Andrew Haley  <aph@cygnus.com>
14880         * class.c (build_utf8_ref): Output signatures using '.' as a
14881         separator, rather than '/'.
14882         (make_class_data): Likewise.
14884 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
14886         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
14887         mkstemp.o.  Get them from libiberty now.
14889 1999-02-02  Jeffrey A Law  (law@cygnus.com)
14891         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
14893 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14895         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
14896         from libiberty.h
14898 1999-02-02  Per Bothner  <bothner@cygnus.com>
14900         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
14901         * jcf-write.c (generate_bytecode_return):  New function.
14902         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
14904         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
14905         generate special [fd]const_[01] instructions.
14907         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
14909         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
14910         handling OPCODE_lookupswitch or OPCODE_tableswitch.
14912 1999-02-01  Per Bothner  <bothner@cygnus.com>
14914         * parse.y (patch_method_invocation):  Handle calling static methods,
14915         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
14917         * parse.y (java_complete_lhs):  Don't complain about unreachable
14918         exit condition in a do-while statement.
14920 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14922         * lex.c (java_read_char): Fixed utf8 decoding.
14923         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
14924         range.
14925         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
14926         comments. Local variable `all_primitive' is gone. Broadened
14927         acceptance of `0' to floating point targets. `long' can now be
14928         widened to `double' or `float'.
14929         (valid_method_invocation_conversion_p): Added leading
14930         comment. Fixed tabulation.
14931         (build_string_concatenation): Optimize out left or right empty
14932         string constants.
14934 1999-01-28  Per Bothner  <bothner@cygnus.com>
14936         * jcf-write.c (localvar_alloc):  Only emit entry for
14937         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
14938         (generate_bytecode_insns):  Only call put_linenumber if
14939         debug_info_level > DINFO_LEVEL_NONE.
14940         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
14941         is specified, add -g1 (for compatibility wih javac).
14943 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
14945         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
14946         gjavah.o, check-init.o, jv-scan.o
14948 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14950         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
14952         * gjavah.c: Include config.h and system.h.
14954         * javaop.h (inline): Don't define, its handled by system.h.
14955         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
14956         from `inline' to `static inline'.
14958         * jcf.h (inline): Don't define, its handled by system.h.
14960         * lex.c (inline): Likewise.
14962 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
14964         * lang-specs.h: Map -Qn to -fno-ident.
14966 1999-01-29  Richard Henderson  <rth@cygnus.com>
14968         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
14970 1999-01-29  Tom Tromey  <tromey@cygnus.com>
14972         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
14973         then cast it to Object before calling `append' method.
14975 1999-01-28  Per Bothner  <bothner@cygnus.com>
14977         * check-init.c (check_bool2_init, check_bool_init, check_init):
14978         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
14979         * jcf-write.c (generate_bytecode_insns):  Likewise.
14981 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14983         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
14984         * parse.y (patch_cast): Allow a boolean to be cast into a
14985         boolean.
14987 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14989         * parse.y: (class_declaration:): Fixed indentation.
14990         (class_member_declaration:): Extra `;' after field declaration now
14991         accepted.
14992         (interface_declaration:): Removed debug messages in error reports.
14993         (patch_binop): Nodes created and returned inherit the orignal
14994         node's COMPOUND_ASSIGN_P flag value.
14995         (patch_cast): Fix cast from char to floating point.
14997 1999-01-25  Andrew Haley  <aph@cygnus.com>
14999         * except.c, java-except.h (expand_resume_after_catch): new
15000         function.
15001         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
15002         to branch back to main flow of control after a catch block.
15004 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15006         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
15007         $(srcdir)/../system.h.
15008         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
15009         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
15010         (jcf-write.o): Likewise.
15011         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15012         (mangle.o): Depend on $(srcdir)/../toplev.h.
15013         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15014         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
15016         * class.c: Include output.h and parse.h.
15017         (mangled_classname): Add the `const' keyword to a char*.
15018         (find_named_method): Hide unused function definition.
15019         (build_utf8_ref): Change type of variable `c' to unsigned char.
15020         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
15021         (build_class_ref): Add the `const' keyword to a char*.
15022         (layout_class_method): Remove unused variable `buf'.
15024         * decl.c (find_local_variable): Remove unused variable `rtl'.
15025         (pushdecl): Likewise for variables `different_binding_level' and
15026         `oldglobal'.
15027         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
15028         (maybe_build_cleanup): Likewise for parameter `decl'.
15030         * except.c (expand_start_java_handler): Mark parameter `range'
15031         with ATTRIBUTE_UNUSED.
15033         * expr.c: Include except.h.
15034         (pop_type): Remove unused variable `i'.
15035         (pop_value): Likewise for variables `n_words' and `i'.
15036         (expand_java_arrayload): Likewise for variable `convert'.
15037         (java_lang_expand_expr): Likewise for variables `op0', `type',
15038         `mode', `unsignedp', `node' and `elements'.
15039         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
15040         `eh_ranges'.
15041         (process_jvm_instruction): Add a `const' qualifier to a char*.
15043         * gjavah.c (output_directory): Add the `const' keyword to a char*.
15044         (temp_directory): Likewise.
15045         (print_c_decl): Likewise.
15046         (print_method_info): Likewise.
15047         (decode_signature_piece): Likewise.
15048         (print_mangled_classname): Likewise.
15050         * java-except.h: Provide prototypes for maybe_start_try,
15051         maybe_end_try and add_handler.
15053         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
15054         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
15055         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
15056         init_expr_processing, push_super_field, init_class_processing,
15057         can_widen_reference_to, class_depth, verify_jvm_instructions,
15058         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
15059         set_local_type, merge_type_state, push_type, load_type_state,
15060         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
15061         emit_unicode_mangled_name): Add prototypes.
15063         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
15064         (print_signature_type): Use ISDIGIT, not isdigit.
15065         (print_signature): Remove unused variable `j'.
15067         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
15068         int when comparing against one.
15070         * jcf-parse.c: Include toplev.h.
15072         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
15073         (localvar_free): Remove unused variable `i'.
15074         (generate_bytecode_conditional): Likewise for variable `kind'.
15076         * jv-scan.c: Include config.h and system.h.  Remove redundant
15077         OS header and gansidecl.h includes.
15078         (warning): Add the `const' keyword to a char*.  Also add
15079         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
15080         __STDC__, when determining whether to use ANSI-isms.
15081         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
15082         (xmalloc): Don't redundantly prototype here.
15083         (main): Remove unused parameter `envp'.  Also fix the arguments
15084         passed to function `fatal' to match the format specifier.
15086         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
15088         * mangle.c: Include toplev.h.
15089         (emit_unicode_mangled_name): Declare parameter `len'.
15091         * parse.y (parse_warning_context): Add the `const' keyword to a
15092         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
15093         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
15094         (issue_warning_error_from_context): Add the `const' keyword to
15095         a char*.
15096         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
15097         not `__STDC__' for whether to use ANSI-isms.
15099         * typeck.c (incomplete_type_error): Mark parameters `value' and
15100         `type' with ATTRIBUTE_UNUSED.
15101         (parse_signature_type): Use ISDIGIT, not isdigit.
15103         * verify.c (check_pending_block): Add the `const' keyword to a char*.
15104         (verify_jvm_instructions): Likewise.  Remove unused variables
15105         `field_name' and `default_val'.
15107         * zextract.c: Include config.h and system.h.  Remove redundant
15108         OS header includes.
15110         * zipfile.h: Prototype `read_zip_archive'.
15112 1999-01-21  Andrew Haley  <aph@cygnus.com>
15114         * typeck.c (convert): Allow conversions to void type: some
15115         optimizations in gcc do this.
15117 1999-01-21  Andrew Haley  <aph@cygnus.com>
15119         * typeck.c (convert_ieee_real_to_integer): New function.
15120         (convert): When not using fast-math and using hardware fp, convert
15121         an IEEE NaN to zero.
15123 1999-01-18  Andrew Haley  <aph@cygnus.com>
15125         * parse.y (patch_binop): Do a type conversion from signed to
15126         unsigned and then back to signed when a ">>>" is found.
15128 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15130         * java-tree.h: (check_for_initialization): Added prototype.
15131         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
15132         * parse.y (do_resolve_class): Removed unused locals.
15133         (read_import_dir): Likewise.
15134         (resolve_qualified_expression_name): Array creation
15135         expressions are valid primary expressions.
15136         (qualify_ambiguous_name): Likewise.
15137         (patch_synchronized_statement): Removed unused local.
15139 1999-01-17  Jeffrey A Law  (law@cygnus.com)
15141         * Makefile.in (zextract.o): Add dependencies.
15143         * Makefile.in: Do not put ^Ls at the start of a line.
15145 1999-01-15  Per Bothner  <bothner@cygnus.com>
15147         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
15148         sub-type the result of the call that gets the exception value.
15150         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
15151         don't call finish_class.
15153         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
15154         clear found before continuing.
15156         * verify.c (verify_jvm_instructions):  On an array load, allow
15157         and handle top of stack to be TYPE_NULL.
15159         * gjavah.c (generate_access):  Translate Java package private or
15160         protected access to C++ public, but with a comment.
15162 1999-01-13  Andrew Haley  <aph@cygnus.com>
15164         * expr.c (generate_name): Name prefix changed to avoid clashes
15165         with assembler temp labels.
15167         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
15168         MODIFY_EXPR.  Without this, code for the assignment may not be
15169         generated at all and the synchronized statement will read an
15170         uninitialized variable.
15172 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15174         * class.c (maybe_layout_super_class): Fixed returned value.
15175         * lex.c: Added 1999 to the copyright.
15176         (java_init_lex): Initialize java_lang_imported.
15177         * lex.h: Added 1999 to the copyright.
15178         * parse.h: Added 1999 to the copyright.
15179         (REGISTER_IMPORT): Fixed typo in trailing macro.
15180         (CURRENT_OSB): New macro.
15181         (struct parser_ctxt): New fields osb_depth, osb_limit.
15182         * parse.y (java_lang_id): New global variable.
15183         (type_import_on_demand_declaration): Don't import java.lang.* twice.
15184         (array_creation_expression:): Use CURRENT_OSB.
15185         (dims:): Uses a stack to keep track of array dimensions.
15186         (cast_expression:): Use CURRENT_OSB.
15187         (find_expr_with_wfl): Return NULL if node found doesn't meet the
15188         conditions.
15189         (register_fields): Fixed typos in comment.
15190         (check_method_redefinition): Fixed comment indentation.
15191         (java_check_regular_methods): Set saved found wfl to NULL after
15192         having reinstalled it in the previously found DECL_NAME.
15194 1999-01-10  Richard Henderson  <rth@cygnus.com>
15196         * gjavah.c (java_float_finite): Use a union to do type punning.
15197         (java_double_finite): Likewise.
15199 1999-01-09  Per Bothner  <bothner@cygnus.com>
15201         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
15202         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
15203         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
15204         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
15205         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
15206         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
15208 1999-01-08  Per Bothner  <bothner@cygnus.com>
15210         * check-init.c (check_init):  If compiling to native, we don't
15211         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
15213 1999-01-08  Tom Tromey  <tromey@cygnus.com>
15215         * parse-scan.y (variable_declarator_id): Set or increment
15216         bracket_count.
15217         (bracket_count): New global.
15218         (formal_parameter): Handle case where bracket pairs trail variable
15219         declarator id.
15221 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
15223         * jcf-parse.c (yyparse): variable len changed from a char to an
15224         int to prevent overflow.
15226 1999-01-06  Per Bothner  <bothner@cygnus.com>
15228         * java-tree.h:  Declare read_class.
15229         * jcf-parse.c (read_class):  New function.
15230         (load_class):  Now just call read_class.
15232         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
15233         * jcf-parse.c (parse_source_file):  Declare save_error_count,
15234         which is needed by java_parse_abort_on_error macro,
15235         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
15237         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
15238         constructor, if initializing a static field.
15239         (patch_new_array_init):  Set TREE_CONSTANT if it is.
15240         * expr.c (java_lang_expand_expr):  For a static array constructor
15241         of primitive elements, allocate the array itself statically.
15242         Disabled until we can set the vtable field statically.
15244         * check-init.c:  New file.  Checks for definite assignment.
15245         * Makefile.in (JAVA_OBJS):  Add check-init.o.
15246         * parse.y (java_complete_expand_method): Call check_for_initialization.
15247         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
15249 1999-01-06  Graham <grahams@rcp.co.uk>
15251         * parse.y : include system.h instead of including
15252         standard headers directly with the exception of <dirent.h>.
15254 1999-01-06  Per Bothner  <bothner@cygnus.com>
15256         * lex.h:  Moved static function declarations to lex.c,
15257         to shut up some -Wall warnings.
15258         * lex.c:  Static function declarations moved here.
15259         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
15261 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15263         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
15265 1998-12-22  Per Bothner  <bothner@cygnus.com>
15267         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
15268         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
15270         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
15271         (localvar_alloc):  Change return type to void,
15272         (emit_unop):  Remove unused variable size.
15274         * jcf-write.c (struct jcf_block):  Add new union.
15275         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
15276         (call_cleanups):  New functions.
15277         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
15278         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
15279         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
15280         * lang.c (lang_init):  Call using_eh_for_cleanups.
15281         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
15282         completing operands to patch_synchronized_statement.
15283         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
15284         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
15285         WITH_CLEANUP_EXPR instead of TRY_EXPR.
15287 1998-12-20  John F. Carr  <jfc@mit.edu>
15289         * Make-lang.in: Comment out control-Ls; they upset some makes.
15291 1998-12-18  Tom Tromey  <tromey@cygnus.com>
15293         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
15294         consistently.
15296 1998-12-17  Tom Tromey  <tromey@cygnus.com>
15298         * parse.y (DIR_SEPARATOR): New define.
15299         (check_class_interface_creation): Use it.
15301         * parse-scan.y (report_main_declaration): Recognize
15302         `java.lang.String' in argument to main.
15304 1998-12-16  Per Bothner  <bothner@cygnus.com>
15306         * parse.y (create_interface):  Remove bogus test.
15308 1998-12-16  Per Bothner  <bothner@cygnus.com>
15310         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
15311         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
15313 1998-12-16  Tom Tromey  <tromey@cygnus.com>
15315         * parse-scan.y (qualified_name): Use correct sprintf format.
15317 1998-12-15  Tom Tromey  <tromey@cygnus.com>
15319         * gjavah.c (print_field_info): Changed how most negative number is
15320         printed.
15322 1998-12-14  Per Bothner  <bothner@cygnus.com>
15324         * parse.y (fold_constant_for_init):  New function.
15325         (resolve_expression_name):  Don't replace static final
15326         constant-initialized fields by its value.
15327         (java_complete_lhs):  New.  Same as java_complete_tree, except does
15328         not replace static final constant-initialized fields by their values.
15329         (register_fields):  If there is an initializer, set DECL_INITIAL and
15330         MODIFY_EXPR_FROM_INITIALIZATION_P.
15331         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
15332         Only call patch_initialized_static_field if
15333         MODIFY_EXPR_FROM_INITIALIZATION_P.
15334         (patch_initialized_static_field):  If not valid constant, clear
15335         DECL_INITIAL.
15337         * parse.y (lookup_field_wrapper):  Fix thinko.
15339         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
15340         set and restore global lineno.
15342 1998-12-14  Tom Tromey  <tromey@cygnus.com>
15344         * gjavah.c (print_field_info): If value to print is the smallest
15345         value of its size, then print as hex to avoid later warnings from
15346         C++ compiler.
15348 1998-12-14  Tom Tromey  <tromey@cygnus.com>
15350         * gjavah.c (decompile_method): Decompile `return null'.
15351         (process_file): Generate `#pragma interface'.
15352         (method_declared): New global.
15353         (print_method_info): Set it.
15354         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
15355         (print_method_info): Handle abstract methods.
15357 1998-12-13  Per Bothner  <bothner@cygnus.com>
15359         * parse.y (patch_method_invocation):  If class_decl is null
15360         (e.g. an array type), use original type.
15362         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
15363         errors about uncaught exception from clone (of array, specifically).
15365 1998-12-13  Tom Tromey  <tromey@cygnus.com>
15367         * gjavah.c (decompile_method): Handle all types of `return'
15368         opcode.  Decompile `return this' and `return'.
15369         (method_access): New global.
15370         (print_method_info): Set it.
15371         (decompile_method): Don't decompile a synchronized method.
15373 1998-12-13  Tom Tromey  <tromey@cygnus.com>
15375         * jcf-reader.c (jcf_parse_one_method): Recognize
15376         HANDLE_END_METHOD.
15377         * gjavah.c (HANDLE_END_METHOD): New macro.
15378         (HANDLE_CODE_ATTRIBUTE): New macro.
15379         (decompile_method): New function.
15380         (print_method_info): Don't print `;\n' at end of function decl.
15381         Include java-opcodes.h.
15382         (decompiled): New global.
15384 1998-12-12  Per Bothner  <bothner@cygnus.com>
15386         * class.c (build_class_ref):  Handle PRIMTYPE.class if
15387         flag_emit_class_files.
15388         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
15389         if flag_emit_class_files.
15390         * parse.y (java_complete_tree):  Pre-liminary support for
15391         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
15393         * parse.y (patch_synchronized_statement):   Don't call monitorexit
15394         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
15396         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
15398         * zipfile.h (opendir_in_zip):  New declaration.
15399         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
15400         (opendir_in_zip):  New function, using code from open_in_zip.
15401         (open_in_zip):  Call opendir_in_zip.
15402         (find_class):  Remove no-longer-used do_class_file parameter,
15403         but add source_ok parameter.  Change logic so if we find a .java file,
15404         we don't look for .class in later classpath emtries.
15405         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
15406         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
15407         * gjavah.c: Update call to find_class.
15408         * jcf-dump.c:  Likewise.
15410         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
15411         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
15412         nothing if body is empty_stmt_node.
15413         Various little fixes so SP gets correctly adjusted.
15414         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
15415         For CALL_EXPR, test if static first.
15416         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
15417         such as the ones we create for Object and Class.
15418         Set and restore current_function_decl.
15419         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
15420         (note_possible_classname):  New function.
15421         (read_import_entry):  Removed.  Merged with read_import_dir.
15422         (read_import_dir):  Don't call find_class - that only gives us
15423         the first classpath entry having the needed package.
15424         Use the struct buffer data structure from buffer.h.
15425         (read_import_dir, find_in_imports_on_demand):  The remembered
15426         class names now use '.' (not '/') as package separator.
15428         * parse.y (java_complete_expand_methods):  Call write_classfile
15429         here, and not in java_expand_classes (which only gets first class).
15431 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15433         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
15434         (register_fields):  If a static fields has an initializer, just
15435         chain it on ctxp->static_initialized, and handle later.
15436         (java_complete_expand_methods):  Force <clinit> first.
15437         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
15438         - it's already been completed.
15439         (patch_initialized_static_field):  New function.
15440         (java_complete_field):  Call it.
15442 1998-12-12  Per Bothner  <bothner@cygnus.com>
15444         * expr.c (encode_newarray_type, build_new_array):  New functions.
15445         * java-tree.h:  Declare build_new_array.
15446         * jcf-write.c (patch_newarray):  Use build_new_array.
15448         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
15449         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
15451         * parse.y (patch_new_array_init):  Re-organize.
15452         Now is passed the actual array (pointer) type of the value.
15453         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
15454         (patch_array_constructor):  Removed - merged into patch_new_array_init.
15455         (java_complete_tree):  Update patch_new_array_init.
15457         * jcf-write.c (find_constant_index):  New function.
15458         (generate_bytecode_insns):  Use find_constant_index.
15459         (generate_classfile):  Use find_constant_index for ConstantValue.
15461 1998-12-11  Tom Tromey  <tromey@cygnus.com>
15463         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
15464         * decl.c (init_decl_processing): Renamed dtable -> vtable.
15465         * class.c (make_class_data): Renamed dtable -> vtable, and
15466         dtable_method_count -> vtable_method_count.
15468 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15470         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
15471         global variables, initialized.
15472         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
15473         Declared new global variables.
15474         * lex.c (java_lex): Return long_zero_node, float_zero_node,
15475         double_zero_node, integer_zero_node upon direct matching.
15476         * parse.y (purify_type_name): Added function prototype.
15477         (duplicate_declaration_error_p): Consider new_type as potentially
15478         being a incomplete type. Use purify_type_name on type string.
15479         (method_header): saved_type: unused variable removed. Don't figure
15480         return type if method name is invalid.
15481         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
15482         processed by patch_unaryop.
15483         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
15484         increment/decrement node into its original type after binary
15485         numeric promotion on its operands.
15487 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15489         * parse.y (array_initializer:): Array init operand is NULL_TREE
15490         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
15491         now an error. Fixed indentation problems.
15492         (patch_string): Handle error_mark_node as an argument.
15493         (patch_new_array_init): Fixed indentation problems.
15494         (array_constructor_check_entry): Removed check on null wfl_value.
15495         Return an error if wfl_value's walk returns an error.
15497 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15499         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
15500         * lex.c (java_lex): Remember column position before advancing one
15501         token. Retain location information on OCB_TK.
15502         * lex.h (typedef struct java_lc): Added new field.
15503         * parse.h (GET_SKIP_TYPE): New macro.
15504         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
15505         * parse.y (build_new_array_init, patch_new_array_init,
15506         patch_array_constructor, maybe_build_array_element_wfl,
15507         array_constructor_check_entry): New function prototypes.
15508         (switch_block:): Tagged <node>.
15509         (OCB_TK): Tagged <operator>.
15510         (array_initializer:): Installed actions.
15511         (variable_initializer): Build location information on element if
15512         necessary.
15513         (switch_statement:): Fixed indentation typo.
15514         (switch_block:): Redefined default action.
15515         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
15516         (patch_assignment): Removed duplicate code.
15517         (maybe_build_array_element_wfl, build_new_array_init,
15518         patch_new_array_init, patch_array_constructor,
15519         array_constructor_check_entry): New functions.
15521 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15523         * parse.y (array_initializer): Tagged <node>.
15524         (variable_initializer:): Use default rule.
15525         (array_initializer:): Defined actions.
15526         (variable_initializers:): Likewise.
15527         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
15528         non-static field accesses.
15529         (patch_invoke): Fixed indentation typo.
15530         (java_complete_tree): Likewise.
15531         (build_labeled_block): Changed leading comment. Generate an error
15532         in case of duplicate loop labels.
15533         (patch_conditional_expr): Patch results of string concatenation
15534         operations.
15536 1998-12-06  Per Bothner  <bothner@cygnus.com>
15538         * constants.c (find_methodref_index):  When the class is an interface,
15539         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
15541         * decl.c (finit_identifier_node):  Use "$finit$", rather than
15542         "<finit>" (which Sun's verifier rejects).
15543         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
15544         (generate_field_initialization_code):  Removed.
15545         (fix_constructors)  Don't add call to $finit$ here (wrong order).
15546         (patch_method_invocation):  Add $finit$ call here.
15548         * java-tree.h (CALL_USING_SUPER):  New macro.
15549         * parse.y (patch_invoke):  Remove im local variable.
15550         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
15551         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
15552         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
15554         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
15556         * parse.y (java_complete_tree):  Don't complain about unreachable
15557         statement if it is empty_stmt_node.
15559         * jcf-write.c (find_constant_wide):  New function.
15560         (push_long_const):  Use find_constant_wide.
15562         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
15563         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
15564         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
15565         Emit invokeinterface when calling an interface method.
15566         Emit invokespecial also when calling super or private methods.
15568         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
15570 1998-12-06  Per Bothner  <bothner@cygnus.com>
15572         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
15574 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15576         * java-tree.h (java_layout_seen_class_methods): New function
15577         prototype.
15578         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
15579         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
15580         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
15581         * parse.y (method_declarator:): Defined action.
15582         (issue_warning_error_from_context): input_filename saved, set to
15583         the appropriate value and restored after java_error is called.
15584         (build_unresolved_array_type): Fixed comment.
15585         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
15586         (method_header): Deal with return type the same way type are
15587         handled for fields and method's parameters and local variables
15588         types are handled.
15589         (check_method_redefinition): Removed extra CR.
15590         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
15591         (java_layout_seen_class_methods): New function.
15592         (java_layout_classes): Call java_layout_seen_class_methods.
15594 1998-12-03  Per Bothner  <bothner@cygnus.com>
15596         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
15598 1998-12-03  Per Bothner  <bothner@cygnus.com>
15600         * jcf-dump.c (main):  Fix error message.
15601         * jcf-path.c (add_entry):  Style fix.
15603 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15605         * class.c (layout_class_method): Call build_java_argument_signature
15606         on constructors too.
15607         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
15608         (patch_method_invocation): Define a primary when resolving an
15609         expression name. Augmented comment on code checking illegal `this'
15610         usage. Loosened it test by accepting NEW_CLASS_EXPR.
15612 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15614         * class.c (layout_class_method): Don't report error on non-static
15615         overriding static if the method is private.
15616         * java-tree.h (finish_class): Prototype added.
15617         * lex.c (java_get_line_col): Handle col argument -2 value.
15618         * parse.h: All static method declarations moved to parse.y.
15619         * parse.y: Now contains all static method declarations previously
15620         found in parse.h.
15621         (find_expr_with_wfl, missing_return_error,
15622         unreachable_stmt_error): New functions.
15623         (java_get_real_method_name): Identify constructors bearing class
15624         names in source code compiled classes only.
15625         (java_complete_expand_methods): Call missing_return_error.
15626         (invocation_mode): Private methods invoked as static methods.
15627         (java_complete_tree): Call unreachable_stmt_error.
15629 1998-12-01  Tom Tromey  <tromey@cygnus.com>
15631         * Makefile.in (+target): Removed.
15632         (+xmake_file): Likewise.
15633         (+tmake_file): Likewise.
15634         (.NOEXPORT): Removed duplicate.
15636 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15638         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
15640         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
15642         * jvgenmain.c: Remove the xmalloc prototype, we get it from
15643         libiberty.h.  Provide an xmalloc definition.
15645         * jvspec.c: Remove the xmalloc prototype.
15647         * parse-scan.y: Include config.h and system.h.  Don't include
15648         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
15649         Provide an xstrdup definition.
15651 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
15653         * jcf-path.c (add_entry): Recognize ".jar" too.
15654         * lang-specs.h: Likewise.
15656 1998-11-26  Per Bothner  <bothner@cygnus.com>
15658         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
15659         soft_monitorenter_node, soft_monitorexit_node, throw_node.
15661         * jcf-write.c (generate_bytecode_insns):
15662         Handle pre/post-increment/decrement of long.
15664         * jcf-write.c (generate_bytecode_insns):
15665         Handle missing exception handler (finally for synchronized).
15667 1998-11-25  Per Bothner  <bothner@cygnus.com>
15669         * java-tree.h (end_params_node):  Declare global.
15670         * decl.c (end_params_node):  New global.
15671         (init_decl_processing, start_java_method):  Use end_params_node for
15672         end of list of parameter types.  Follows correct gcc conventions.
15673         * expr.c (pop_argument_types, pop_arguments):  Likewise.
15674         * lang.c (put_decl_node):  Likewise.
15675         * typeck.c (various places):  Likewise.
15676         * class.y (various places):  Likewise.
15677         * parse.y (various places):  Likewise.
15679         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
15680         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
15682         * class.c:  Add #include flags.h, remove no-longer needed declaration.
15684         * class.c (layout_class_method):  Remove commented-out code, re-format.
15685         Don't add vtable entry (or index) for private methods.
15686         * expr.c (expand_invoke):  A private method is implicitly final.
15687         * class.c (make_class_data):  If inlining or optimizing,
15688         skip private methods.
15690         * class.c (finish_class):  New function.  Calls existing methods,
15691         but alls emits deferred inline functions.
15692         * jcf-parse.c (parse_class_file):  Call finish_class.
15693         * parse.y (java_complete_expand_methods):  Likewise.
15695         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
15697         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
15699 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
15701         * jcf-write.c (generate_bytecode_conditional): Fix typo.
15703 1998-11-24  Per Bothner  <bothner@cygnus.com>
15705         * (generate_classfile): Always write class access flag with
15706         ACC_SUPER set.
15708 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15710         * class.c (maybe_layout_super_class): New function.
15711         (layout_class): Reorganized. Loop on class methods dispatched into
15712         a new function. Call maybe_layout_super_class.
15713         (layout_class_methods, layout_class_method): New functions.
15714         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
15715         class.
15716         (expand_invoke): Likewise.
15717         * java-tree.h (all_class_list): New global variable declared.
15718         (layout_class_methods, layout_class_method): New function
15719         prototypes.
15720         (LAYOUT_SEEN_CLASS_METHODS): New macro.
15721         * jcf-parse.c (all_class_list): New global variable.
15722         (load_class): Extended what class_or_name can be. Use parser
15723         context mechanism to save globals before calling jcf_parse.
15724         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
15725         is set on the file name.
15726         (jcf_parse): Layout class methods when Object is loaded, otherwise
15727         record class in all_class_list for delayed method layout.
15728         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
15729         * lang.c (put_decl_node): Decode <init> into the decl context
15730         class name.
15731         * lex.c (java_allocate_new_line): Use xmalloc.
15732         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
15733         pointers, not TREE_LIST elements.
15734         (struct parser_ctxt): Fixed comment indentations, added comments
15735         and reordered some fields.
15736         (java_check_methods): Function prototype removed.
15737         * parse.y (java_push_parser_context): Use xmalloc.
15738         (java_parser_context_restore_global): Pop extra pushed ctxp only
15739         when there's nothing next.
15740         (maybe_create_class_interface_decl): Fixed comment, add new
15741         created class decl to all_class_list.
15742         (method_header): Use GET_REAL_TYPE on argument's types.
15743         (method_declarator): Use GET_REAL_TYPE, change type to the real
15744         type in TREE_LIST dependency node. Build argument list with the
15745         real type.
15746         (create_jdep_list): Use xmalloc. Removed allocation error message.
15747         (obtain_incomplete_type): Fixed leading comment. Broadened
15748         incoming argument meaning.
15749         (register_incomplete_type): Use xmalloc. Removed allocation error
15750         message.
15751         (safe_layout_class): Fixed leading comment.
15752         (jdep_resolve_class): Reversed if statement condition and switch
15753         if and else bodies.
15754         (resolve_and_layout): Fixed leading comment. Broadened incoming
15755         argument meaning.
15756         (complete_class_report_errors): New local variable name, for
15757         clarity. purify_type_name used for all error cases.
15758         (java_get_real_method_name): Stricter check on constructors.
15759         (java_check_regular_methods): Reverse methods list only if not
15760         already laid out. Layout artificial constructor.
15761         (java_check_methods): Deleted.
15762         (source_start_java_method): Obtain incomplete type for patchable
15763         method arguments.
15764         (java_layout_classes): Fixed leading comment. Use
15765         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
15766         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
15767         before returning. Fixed comments.
15768         (java_expand_classes): Check for errors up front.
15769         (patch_method_invocation): Class to search is resolved and laid
15770         out.
15772 1998-11-24  Per Bothner  <bothner@cygnus.com>
15774         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
15776         * javaop.h (int8):  Removed - not used.
15777         (jbyte):  Redefine portably with correct signedness.
15779         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
15781         * jcf-write.c (generate_bytecode_insns):  Fix typo
15782         OPCODE_getstatic to OPCODE_getfield.
15784         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
15785         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
15786         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
15788 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15790         * jcf-parse.c (jcf_parse_source): Function returned type is
15791         void. Added prototype.
15792         (jcf_parse): Function returned type is void.
15793         (yyparse): Remove call to fclose on the last parsed file.
15795         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
15797 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15799         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
15800         (layout_class): Cope with methods featuring WFL in decl names.
15801         * decl.c (unqualified_object_id_node): New global variable,
15802         initialized.
15803         (build_decl_no_layout): Removed.
15804         * expr.c (build_primtype_type_ref): Handle Double.
15805         (java_lang_expand_expr): Fixed indentations.
15806         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
15807         (flag_wall, flag_redundant, flag_not_overriding,
15808         flag_static_local_jdk1_1, unqualified_object_id_node): Global
15809         variable declarations.
15810         (build_decl_no_layout): Removed prototype.
15811         (java_get_real_method_name): Added prototype.
15812         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
15813         (java_parse_abort_on_error): Macro now just returns.
15814         * jcf-parse.c (jcf_parse_source): Check fclose returned
15815         value. Call emit_register_classes if java_report_errors returns
15816         zero.
15817         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
15818         flag_static_local_jdk1_1): New integer flags.
15819         (lang_decode_option): New flags set here.
15820         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
15821         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
15822         the flag_redundant variable.
15823         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
15824         when parsing java.lang.Object class.
15825         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
15826         NULL_TREE to build.
15827         (resolve_qualified_expression_name): Fixed indentation.
15828         (patch_array_ref): Changed prototype.
15829         (not_initialized_as_it_should_p): Prototype removed.
15830         (java_report_errors): Added function prototype.
15831         * parse.y (formal_parameter:): Changed error message for not yet
15832         supported final parameters.
15833         (class_type_list:): Set both PURPOSE and VALUE of created
15834         TREE_LIST to be class_type.
15835         (primary_no_new_array:): Handle class literals on primitive types.
15836         (parse_warning_context): Reinstalled correct force_error and
15837         do_warning flags setups.
15838         (java_report_errors): Changed prototype. Return java_error_count
15839         value.
15840         (variable_redefinition_error): Consider treating variable type as
15841         a fake pointer.
15842         (create_interface): Warn about redundant abstract modifier if
15843         flag_redundant is set. Changed error message.
15844         (lookup_field_wrapper): Save/restore globals before/after looking
15845         up field.
15846         (duplicate_declaration_error_p): Consider treating declaration
15847         type as a fake pointer.
15848         (register_fields): Extract real type from dependency node. Check
15849         for duplicate field declaration after type adjustment. Use
15850         DECL_INITIAL to store static final initialized values.
15851         (method_header): Extract real function type from dependency node.
15852         (check_abstract_method_header): Use GET_METHOD_NAME.
15853         (obtain_incomplete_type): Layout fake pointer type.
15854         (safe_layout_class): Don't try to check for methods before layout.
15855         (java_complete_class): Don't check for correct throws clause
15856         elements inheritance here.
15857         (resolve_and_layout): Broadened name parameter meaning.
15858         (reset_method_name): Use GET_METHOD_NAME.
15859         (java_get_real_method_name): New function.
15860         (java_check_regular_methods): Don't check methods in
15861         java.lang.Object.  Verify lineage of throws clause elements. Use
15862         flag_no_overriding in warning report.
15863         (check_throws_clauses): Don't check if class was from
15864         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
15865         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
15866         (declare_local_variables): Use flag_static_local_jdk1_1 to report
15867         warning on unsupported final local variables. Use build_decl
15868         instead of build_decl_no_layout. Get real local variable type from
15869         dependency node.
15870         (source_start_java_method): Get real parameter type from
15871         dependency node. Call build_decl instead of build_decl_no_layout.
15872         (java_layout_classes): Reverse tree and layout type and class as
15873         required. Mark class as loaded when done.
15874         (resolve_field_access): Fixed indentation. Restricted condition
15875         leading to static field access code generation. Set field_type
15876         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
15877         (resolve_qualified_expression_name): Initialize type_found to
15878         null. Handle static field resolved during qualification. Fixed
15879         layout on non primitive field decl types.
15880         (not_accessible_p): Fixed typo in comment.
15881         (patch_method_invocation): Resolve and layout class to search from
15882         type.
15883         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
15884         layout non primitive type, if necessary. Make method node only to
15885         report errors.
15886         (find_applicable_accessible_methods_list): Consider WFL'ed method
15887         decl names. Fixed indentation.
15888         (argument_types_convertible): Resolve and layout target type if
15889         necessary.
15890         (java_complete_tree): Fixed indentation problems. Rewrote
15891         CALL_EXPR thrown exceptions check. Re-installed further processing
15892         of the assignment in certain cases.
15893         (patch_assignment): Call maybe_build_primttype_type_ref to perform
15894         inlining on class literals.
15895         (valid_builtin_assignconv_identity_widening_p): Cope with constant
15896         0 literal.
15897         (valid_method_invocation_conversion_p): Likewise.
15898         (patch_string): Temporary disable forbidden use of `this' in
15899         explicit constructor invocations when doing string concatenation
15900         within their scope.
15901         (patch_unaryop): Added comment. Reinstalled code to disable
15902         further check on assignment operation with cast expression RHS.
15903         (patch_switch_statement): Fixed indentation.
15904         (build_try_statement): Call build_decl instead of
15905         build_decl_no_layout.
15906         (patch_synchronized_statement): Likewise.
15907         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
15908         IS_UNCHECKED_EXPRESSION_P.
15909         (check_thrown_exceptions_do): Changed leading comment. Resolve and
15910         layout argument exception type.
15911         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
15912         of IS_UNCHECKED_EXPRESSION_P.
15914 1998-11-18  Anthony Green  <green@cygnus.com>
15916         * jcf-parse.c (yyparse): Open class file in binary mode.
15918 1998-11-15  Per Bothner  <bothner@cygnus.com>
15920         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
15922         * jcf-write.c (perform_relocations):  Move check out one loop.
15924 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
15926         * Make-lang.in: Fix reference to srcdir.
15927         * jv-scan.c: Add missing xmalloc prototype.
15928         * jvgenmain.c: Ditto.
15930 1998-11-15  Per Bothner  <bothner@cygnus.com>
15932         * decl.c (error_mark_node), java-tree.h:  New global.
15933         * parse.y:  Use empty_stmt_node instead of size_zero_node.
15934         (build_if_else_statement):  If missing else, use empty_stmt_node.
15936         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
15937         (java_complete_expand_method):  Complain if return is missing.
15938         (java_check_regular_methods):  Comment out incorrect error check.
15939         (not_accessible_p):  Fix incorrect handling of protected methods.
15940         (patch_method_invocation):  Pass correct context to not_accessible_p.
15941         (find_applicable_accessible_methods_list):  Likewise.
15942         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
15943         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
15944         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
15945         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
15947         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
15948         (push_int_const):  Remove reundant NOTE_PUSH.
15949         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
15950         (- case SWITCH_EXPR):  Fix code generation bug.
15951         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
15952         (generate_classfile):  More robust for abstract methods.
15954 1998-11-15  Anthony Green  <green@cygnus.com>
15956         * Makefile.in: jv-scan and jvgenmain all require libiberty.
15957         * Make-lang.in: Ditto.
15959         * jv-scan.c: Remove xmalloc and xstrdup definitions.
15960         * jvgenmain: Ditto.
15962 1998-11-15  Per Bothner  <bothner@cygnus.com>
15964         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
15966         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
15968 1998-11-14  Per Bothner  <bothner@cygnus.com>
15970         Allow uses of interface types to verify.  This is not really
15971         type-safe, but it matches what Sun does, and is OK as long as
15972         there are appropriate run-time checks.
15973         * verify.c (merge_types):  If merging two interface types,
15974         just set the result to java.lang.Object.
15975         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
15977 1998-11-13  Tom Tromey  <tromey@cygnus.com>
15979         * gjavah.c (main): Handle --output-class-directory argument.
15980         * jvspec.c (lang_specific_driver): Translate `-d' into
15981         -foutput-class-dir.
15982         * jcf.h (jcf_write_base_directory): Declare.
15983         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
15984         * lang-options.h: Mention -foutput-class-dir.
15985         * jcf-write.c (jcf_write_base_directory): New global.
15986         (make_class_file_name): Put generated .class file into `-d'
15987         directory, or into source directory if -d not given.  Function now
15988         static.
15989         (write_classfile): Free class file name.  Handle case where class
15990         file name is NULL.
15991         (DIR_SEPARATOR): New macro.
15992         Include <sys/stat.h>
15994         * Makefile.in (prefix): New macro.
15996 1998-11-12  Per Bothner  <bothner@cygnus.com>
15998         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
15999         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
16000         here (done in patch_invoke instead).
16001         (case_identity):  Moved here from parse.y.
16003         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
16004         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
16005         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
16006         so they can be efficiently scanned without recursion.
16007         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
16008         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
16009         in BLOCK iteratively, rather than recursively.
16011         * parse.y (do_unary_numeric_promotion):  New function.
16012         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
16014         * parse.y (patch_newarray):  Various fixes.
16016         Re-do handling of switch statements (for proper block scoping).
16017         * parse.y:  Add just a single block for the enture switch block,
16018         but don't create any "case blocks".
16019         (group_of_labels):  Rmeoved unneeded non-terminal.
16020         CASE_EXPR and DEFAULT_EXPR are added to current block.
16021         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
16022         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
16023         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
16024         * parse.y (wfl_operator, print_int_node): Make non-static.
16025         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
16026         as part of recursive scan of block.
16027         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
16028         (patch_switch_statement):  Most tests move dinto java_complete_tree.
16030         * parse.y:  Make various production be non-typed (void).
16031         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
16032         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
16033         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
16035         * jcf-write.c (struct jcf_handler):  New type.
16036         (struct jcf_switch_state):  New type.
16037         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
16038         (alloc_handler, emit_unop, emit_reloc):  New functions.
16039         (adjust_typed_op):  Add extra parameter ("max type" offset).
16040         (emit_switch_reloc, emit_case-reloc):  New function.
16041         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
16042         (generate_bytecode_insns):  Support REAL_CST, switch statements,
16043         exception handling, method calls, object/array creation, and more.
16045         * class.c:  Remove some unused variables.
16046         * constants.c (find_string_constant):  New function.
16047         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
16048         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
16049         if flag_emit_class_files.
16051 1998-11-12  Tom Tromey  <tromey@cygnus.com>
16053         * jcf-io.c (find_class): Added explanatory comment.
16055         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
16056         trailing slash to `.zip' entries.
16058         * jvspec.c (lang_specific_driver): Correctly handle case where
16059         GC_NAME not defined.
16061 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16063         * jvspec.c (GC_NAME): New define.
16064         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
16065         if required.
16066         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
16068 1998-11-11  Per Bothner  <bothner@cygnus.com>
16070         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
16072 1998-11-11  Tom Tromey  <tromey@cygnus.com>
16074         * jcf-dump.c (main): Correctly recognize `--'-style long options.
16076 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16078         * class.c (is_compiled_class): Call safe_layout_class for class
16079         compiled from source.
16080         * conver.h (convert_to_integer, convert_to_real,
16081         convert_to_pointer): Added prototypes.
16082         * decl.c (init_decl_processing): Non longer push the decls of
16083         `methodtable', `constants', `Class', `Field', `dispatchTable'
16084         `jexception' and `Method'.
16085         * expr.c (build_invokeinterface): New function.
16086         (expand_invoke): static variable CLASS_IDENT now in
16087         build_invokeinterface. Use build_invokeinterface.
16088         (expand_java_field_op): Moved code to inline
16089         java.lang.PRIMTYPE.TYPE into a function.
16090         (build_primtype_type_ref): New function.
16091         * java-tree.def (INSTANCEOF_EXPR): New tree code.
16092         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
16093         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
16094         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
16095         (DECL_LOCAL_STATIC_VALUE): New macro.
16096         (build_invokeinterface, build_primtype_type_ref): New function
16097         prototypes.
16098         (java_parse_abort_on_error): Macro rewritten.
16099         * jcf-parse.c (current_method): Add comment to declaration.
16100         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
16101         Function prototypes fixed.
16102         (jcf_parse_source): push/pop parser context. save/restore global.
16103         (parse_source_file): Fixed leading comment. Now take a
16104         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
16105         classes and pop the parser context anymore.
16106         (yyparse): Push parser context, save globals, parse the source
16107         file, restore globals and pop the parser context when processing a
16108         source file.
16109         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
16110         * lex.c (java_parse_doc_section): New function.
16111         (java_lex): Call java_parse_doc_section when appropriate. Build an
16112         operator around INSTANCEOF_TK.
16113         * lex.h (java_lineterminator, java_sprint_unicode,
16114         java_unicode_2_utf8, java_lex_error, java_store_unicode):
16115         Prototypes rewritten.
16116         (java_parse_escape_sequence, java_letter_or_digit_p,
16117         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
16118         java_read_unicode, java_store_unicode, java_read_char,
16119         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
16120         Added function prototypes.
16121         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
16122         define.
16123         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
16124         New macros
16125         (struct parser_ctxt): New fields: deprecated,
16126         current_parsed_class_un, gclass_list.
16127         (fix_method_argument_names, issue_warning_error_from_context,
16128         resolve_package, lookup_package_type): New function prototypes.
16129         (resolve_expression_name): Fixed function prototype.
16130         (find_applicable_accessible_methods_list): Fixed indentation, added
16131         extra argument in prototype.
16132         (check_final_assignment, build_null_of_type, check_deprecation,
16133         check_method_redefinition, reset_method_name,
16134         java_check_regular_methods, java_check_abstract_methods,
16135         maybe_build_primttype_type_ref): New function prototype.
16136         * parse.y (conver.h): Include.
16137         (INSTANCEOF_TK): Tagged <operator>.
16138         (single_type_import_declaration): Use REGISTER_IMPORT macro.
16139         (relational_expression:): Build binop for instanceof.
16140         (java_push_parser_context): Remember ctxp->gclass_list across
16141         contexts.
16142         (java_pop_parser_context): Simply return if no context
16143         exists. Remember gclass_list across contexts.
16144         (issue_warning_error_from_context): New function.
16145         (parse_error_context): Don't setup ctxp->elc here. Call
16146         issue_warning_error_from_context instead.
16147         (parse_warning_context): Likewise.
16148         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
16149         setup. Link new class/interface to ctxp->gclass_list.
16150         (add_superinterfaces): Register interface as incomplete if not
16151         loaded.
16152         (create_class): Remember class unqualified name in
16153         ctxp->current_parsed_class_un. Check class deprecation.
16154         (register_fields): Check field deprecation. Remember static final
16155         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
16156         processing INIT.
16157         (method_header): New local variable ORIG_ARG. Use unqualified
16158         current class name for check on constructor errors. Promote return
16159         type if of record type. Argument list fix moved in
16160         fix_method_argument_names, called here. Check method deprecation.
16161         (fix_method_argument_names): New function.
16162         (method_declarator): Promote record typed arguments.
16163         (safe_layout_class): Check class methods before layout.
16164         (java_complete_class): Compute field layout when patched.
16165         (do_resolve_class): Try to load class after having it renamed
16166         after the package name.
16167         (get_printable_method_name): Use DECL_CONTEXT.
16168         (reset_method_name): New function.
16169         (check_method_redefinition): Use reset_method_name.
16170         (java_check_regular_methods): New local variable
16171         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
16172         names for error report. Check for compile-time error when method
16173         found has default (package) access.
16174         (java_check_abstract_methods): Now takes an interface DECL node as
16175         an argument. Also reinstall real name on unchecked
16176         overriding/hiding methods for error report.
16177         (java_check_methods): Fixed leading comment. Get classes to verify
16178         from ctxp->gclass_list. Use CHECK_METHODS macro and set
16179         CLASS_METHOD_CHECKED_P on class verification.
16180         (lookup_java_method2): Get real method name if necessary.
16181         (find_in_imports): Don't check package class access here.
16182         (resolve_package, lookup_package_type): New functions.
16183         (java_layout_classes): Fixed leading comment. Take classes to be
16184         laid out from ctxp->gclass_list.
16185         (java_complete_expand_methods): Don't expand native and abstract
16186         methods.
16187         (java_expand_classes): New function.
16188         (resolve_expression_name): Use additional argument ORIG.  Retrieve
16189         values of static final field of primitive types.
16190         (resolve_field_access): Handles static final field of promotive
16191         type.
16192         (resolve_qualified_expression_name): Handle STRING_CST as
16193         primaries and package name resolution. Check deprecation on found
16194         decls. Set where_found and type_found on non static field resolved
16195         during qualification. Layout non primitive field decl types.
16196         (check_deprecation): New function.
16197         (maybe_access_field): Simplified.
16198         (patch_method_invocation_stmt): Local variable CLASS_TYPE
16199         removed. Reverse method's argument when primary is a type. Don't
16200         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
16201         instead. Include abstract class in the list of class searchable
16202         for constructors. Use DECL_CONTEXT of found method for access
16203         checks. Check method deprecation.
16204         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
16205         converting arguments. Handle INVOKE_INTERFACE.
16206         (lookup_method_invoke): Search constructor using existing
16207         infrastructure (don't rely on lookup_java_constructor anymore).
16208         (find_applicable_accessible_methods_list): Extra argument flag
16209         LC. Now include constructor in the search.
16210         (qualify_ambiguous_name): Conditional expression are primaries.
16211         (not_initialized_as_it_should_p): static final are always
16212         initialized.
16213         (java_complete_tree): Pass extra NULL argument to
16214         resolve_expression_name. Stricter test to carry on patching
16215         assignments. New case for INSTANCEOF_EXPR.
16216         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
16217         (check_final_assignment, maybe_build_primttype_type_ref): New
16218         functions.
16219         (patch_assignment): Detect resolved static finals and carry normal
16220         assignment error check on them. Inline PRIMTYPE.TYPE read access.
16221         (try_builtin_assignconv): Access constant 0 on all primitive
16222         types.
16223         (valid_builtin_assignconv_identity_widening_p): Accept identical
16224         types. Accept all promoted type on int type.
16225         (valid_ref_assignconv_cast_p): Accept a null pointer to be
16226         assigned to a reference.
16227         (valid_method_invocation_conversion_p): Accept to check null
16228         pointers.
16229         (build_binop): Merge declaration and initialization of local
16230         variable BINOP.
16231         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
16232         numeric types. Improved validity test for qualify operators on
16233         references.
16234         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
16235         and PREINCREMENT_EXPR. Also detect resolved static finals of a
16236         primitive type and issue the appropriate error message.
16237         (resolve_type_during_patch): Mark class loaded when resolved.
16238         (patch_cast): Allow null to be cased to reference types.
16239         (build_null_of_type): New function.
16240         (patch_array_ref): Handle array on references correctly.
16241         (patch_return): Removed unused local variable MODIFY. Force
16242         boolean to be returned as integers. Allows null to be returned by
16243         a function returning a reference.
16244         * typeck.c (convert_to_integer, convert_to_real,
16245         convert_to_pointer): Prototypes moved to convert.h
16246         (lookup_argument_method): Use method real name, if necessary.
16248 1998-10-30  Tom Tromey  <tromey@cygnus.com>
16250         * class.c (build_class_ref): Changed name of primitive classes to
16251         start with `_Jv_'.
16253         * class.c (make_class_data): Renamed fields: nmethods to
16254         method_count, method_count to dtable_method_count.  Always set
16255         `state' field to 0.
16256         * decl.c (init_decl_processing): Likewise.
16258 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16260         * class.c (layout_class): Don't mangle <finit>, produce
16261         __finit<class> instead. Don't verify artificial methods.
16262         * decl.c (finit_identifier_node): New declared global.
16263         (init_decl_processing): finit_identifier_node initialized.
16264         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
16265         * java-tree.h (finit_identifier_node): Declared as extern.
16266         (struct lang_decl): New field called_constructor.
16267         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
16268         (CLASS_HAS_FINIT_P): New macro.
16269         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
16270         explicit constructor invocation.
16271         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
16272         CALL_SUPER_CONSTRUCTOR_P): New macros.
16273         (write_classfile): Added prototype.
16274         * jcf-parse.c (jcf_parse_source): Parse and remember for
16275         generation if the file was seen on the command line.
16276         (parse_source_file): Don't write the class file here.
16277         (yyparse): Loop on files rewritten. Set current_jcf.
16278         (parse_zip_file_entries): Parse class file only if it was found.
16279         * lang.c (init_parse): Don't open command line provided filename
16280         here.
16281         (lang_parse): Don't set main_jcf anymore.
16282         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
16283         (JCONSTRUCTOR_CHECK): New macro.
16284         (JBSC_TYPE_P): New macro.
16285         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
16286         (COMPLETE_CHECK_OP_2): New macro.
16287         (struct parse_ctxt): New field explicit_constructor_p.
16288         (check_class_interface_creation): Fixed prototype indentation.
16289         (patch_method_invocation_stmt): Prototype reflects added argument.
16290         (patch_invoke): Likewise.
16291         (complete_method_declaration, build_super_invocation,
16292         verify_constructor_circularity,
16293         build_this_super_qualified_invocation, get_printable_method_name,
16294         patch_conditional_expr, maybe_generate_finit, fix_constructors,
16295         verify_constructor_super, create_artificial_method,
16296         start_artificial_method_body, end_artificial_method_body,
16297         generate_field_initialization_code): New function prototypes.
16298         * parse.y: Fixed leading comment
16299         (constructor_header:, constructor_body:, block_end:): Rules tagged
16300         <node>.
16301         (type_declaration:): Call maybe_generate_finit.
16302         (method_declaration:): Action for method_body: placed in new
16303         function complete_method_declaration, called here.
16304         (constructor_declaration:): Defined actions. Removed leading
16305         FIXME.
16306         (constructor_header:): New rule with action.
16307         (constructor_body:): Rule rewritten using block_begin: and
16308         block_end:. Defined actions.
16309         (constructor_declarator:, explicit_constructor_invocation:):
16310         Defined actions.
16311         (block:): Use new rules block_begin: block_end:.
16312         (block_begin:, block_end:): New rules and actions.
16313         (block_statements:): Fixed error message for explicit
16314         constructors.
16315         (method_invocation:): Call build_this_super_qualified_invocation
16316         if primary is `this' or `super' was seen.
16317         (conditional_expression:): Action defined.
16318         (extra_ctxp_pushed_p): New static global flag.
16319         (java_parser_context_save_global): Create parser context if
16320         necessary. Use extra_ctxp_pushed_p to remember it.
16321         (java_parser_context_restore_global): Pop extra parser context if
16322         one exists.
16323         (build_array_from_name): Array on primitive types are marked
16324         loaded.
16325         (register_fields): Restore new name in field initializer
16326         expression if type was altered. Non static fields initialized upon
16327         declaration marked initialized.
16328         (maybe_generate_finit): New function.
16329         (maybe_generate_clinit): Use create_artificial_method,
16330         start_artificial_method_body, end_artificial_method_body. Generate
16331         debug info for enclosed initialization statements.
16332         (method_header): Fixed leading comment. Check constructor
16333         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
16334         accordingly.
16335         (complete_method_declaration, constructor_circularity_msg,
16336         verify_constructor_circularity): New functions.
16337         (get_printable_method_name): New function.
16338         (check_method_redefinition): Don't rename <finit> methods. Fix
16339         declared constructor names. Error message for
16340         constructors modified.
16341         (java_check_regular_methods): Local variable seen_constructor
16342         renamed saw_constructor. Skip verification on constructors. Create
16343         default constructor with create_artificial_method.
16344         (java_check_methods): Removed unnecessary empty line.
16345         (create_artificial_method, start_artificial_method_body,
16346         end_artificial_method_body): New functions.
16347         (java_layout_classes): Changed leading comment. Reverse fields
16348         list if necessary. Always layout java.lang.Object if being
16349         defined.
16350         (java_complete_expand_methods): Verify constructor circularity.
16351         (java_complete_expand_method): Call fix_constructor on
16352         constructors.  Local variable no_ac_found removed. Restore
16353         bindings if method body expansion failed.
16354         (fix_constructors, verify_constructor_super,
16355         generate_field_initialization_code): New function.
16356         (java_expand_classes): Fixed leading comment. Write class file
16357         here.
16358         (resolve_expression_name): Check for illegal instance variable
16359         usage within the argument scope of an explicit constructor
16360         invocation.
16361         (resolve_qualified_expression_name): Pass extra from_super flag
16362         when invoking patch_method_invocation_stmt. New case for
16363         conditional expression when used as a primary. Check for error
16364         when acquiring super.
16365         (patch_method_invocation_stmt): Added extra argument super. New
16366         local variable is_static_flag. Set class_to_search according to
16367         the nature of the constructor invocation. Don't add `this'
16368         argument when expanding NEW_CLASS_EXPR. Check for illegal method
16369         invocation within the argument scope of explicit constructor
16370         invocation. Set is_static according to is_static_flag. Provide
16371         extra `super' argument to patch_invoke invocation.
16372         (patch_invoke): New argument from_super. Loop on arguments
16373         indentation fixed. Pass from_super to invocation_mode. New switch
16374         case INVOKE_SUPER. Fixed error message in switch default case.
16375         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
16376         value.
16377         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
16378         (lookup_method_invoke): Fixed prototypes in candidates list. Error
16379         message takes constructors into account.
16380         (find_applicable_accessible_methods_list): Fixed indentation.
16381         (qualify_ambiguous_name): Take explicit constructor invocation
16382         into account. Deal with a conditional expression as a primary to
16383         a method call.
16384         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
16385         case. Added extra argument to patch_method_invocation_stmt.
16386         Register calls made to explicit constructor `this'. Don't call
16387         save_expr in ARRAY_REF case when emitting class files. Check for
16388         illegal use of this when expanding explicit constructor invocation
16389         arguments.
16390         (complete_function_arguments): Set and reset parser context
16391         explicit_constructor_p field value when appropriate.
16392         (build_super_invocation, build_this_super_qualified_invocation):
16393         New functions.
16394         (patch_assignment): Fixed typo.
16395         (patch_unaryop): Check on final fields occurs only when a decl
16396         exits.
16397         (patch_return): Take constructors into account.
16398         (patch_conditional_expr): New function.
16399         * typeck.c (build_java_signature): Removed unnecessary empty line.
16401 1998-10-28  Jeffrey A Law  (law@cygnus.com)
16403         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
16405 1998-10-28  Tom Tromey  <tromey@cygnus.com>
16407         * decl.c (init_decl_processing): Renamed fields.
16408         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
16409         interface_len, msize fields.
16411         * class.c (make_class_data): Removed subclass_head and
16412         subclass_next fields.
16413         * decl.c (init_decl_processing): Removed subclass_head and
16414         subclass_next fields.
16416 1998-10-28  Jeffrey A Law  (law@cygnus.com)
16418         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
16419         * mangle.c (emit_unicode_mangled_name): Similarly.
16421 1998-10-26  Nick Clifton  <nickc@cygnus.com>
16423         * jcf-parse.c (get_constant): Place braces around code to compute
16424         'd' when REAL_ARITHMETIC is not defined.
16426 1998-10-25  H.J. Lu  (hjl@gnu.org)
16428         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
16429         dependency.
16431 1998-10-23  Tom Tromey  <tromey@cygnus.com>
16433         * lang-specs.h: `.zip' files are input to jc1.
16435 1998-10-22  Per Bothner  <bothner@cygnus.com>
16437         * jvspecs.c:  Add (but don't enable) support for combining multiple
16438         .class and .java input filenames to a single jc1 invocation.
16439         Add support for -C flag (copile to .class files).
16440         Translate -classpath and -CLASSPATH arguments.
16441         * lang-specs.h:  Don't set %2 spec.
16443 1998-10-22  Tom Tromey  <tromey@cygnus.com>
16445         * jcf-path.c (add_entry): Don't add trailing separator if entry is
16446         a .zip file.
16447         (add_path): Don't add trailing separator to non-empty path
16448         elements.
16450         * lang.c (lang_decode_option): Check for -fclasspath and
16451         -fCLASSPATH before examining other `-f' options.
16453         * java-tree.h (finalize_identifier_node): Don't declare.
16454         * class.c (make_class_data): Don't push "final" field.
16455         * decl.c (init_decl_processing): Don't push "final" field.
16456         (finalize_identifier_node): Removed.
16457         (init_decl_processing): Don't set finalize_identifier_node.
16459         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
16461 1998-10-11  Anthony Green  <green@cygnus.com>
16463         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
16464         (JV_SCAN_SOURCES): New macro.
16465         (JCF_DUMP_SOURCES): Likewise.
16466         (jcf-dump$(exeext)): New target.
16467         (jv-scan$(exeext)): New target.
16469 1998-10-22  Tom Tromey  <tromey@cygnus.com>
16471         * Makefile.in (LEX): Removed.
16472         (LEXFLAGS): Likewise.
16473         (SET_BISON): New macro.
16474         (BISON): Removed.
16475         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
16476         spurious diffs in parse.c.
16477         ($(PARSE_SCAN_C)): Likewise.
16478         (PARSE_DIR): New macro.
16479         (PARSE_C): Use it.
16480         (PARSE_SCAN_C): Likewise.
16481         (PARSE_RELDIR): New macro.
16483         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
16485         * jcf-io.c (find_class): Use saw_java_source to determine when to
16486         look for `.java' file.
16487         * jcf-parse.c (saw_java_source): New global.
16488         (yyparse): Set it if `.java' file seen.
16490         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
16491         (GCJH_SOURCES): Likewise.
16492         * Makefile.in (datadir): New macro.
16493         (libjava_zip): Likewise.
16494         (JAVA_OBJS): Added jcf-path.o.
16495         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
16496         (../gcjh$(exeext)): Likewise.
16497         (jcf-path.o): New target.
16498         * java-tree.h (fix_classpath): Removed decl.
16499         * jcf-parse.c (fix_classpath): Removed.
16500         (load_class): Don't call fix_classpath.
16501         * parse.y (read_import_dir): Don't call fix_classpath.
16502         * lex.h: Don't mention classpath.
16503         * lex.c (java_init_lex): Don't initialize classpath.
16504         * jcf-io.c (classpath): Removed global.
16505         (find_class): Use jcf_path iteration functions.  Correctly search
16506         class path for .java file.
16507         (open_in_zip): New argument `is_system'.
16508         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
16509         classpath-related options.
16510         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
16511         and -I.
16512         (lang_init): Call jcf_path_init.
16513         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
16514         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
16515         Correctly put braces around second string in each entry.
16516         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
16517         classpath-related options.
16518         (help): Updated for new options.
16519         * jcf.h: Declare functions from jcf-path.c.  Don't mention
16520         `classpath' global.
16521         * jcf-path.c: New file.
16523         * jcf-depend.c: Include jcf.h.
16525         * jcf-write.c (localvar_alloc): Returns `void'.
16526         (localvar_free): Removed unused variable.
16528         * lang.c (OBJECT_SUFFIX): Define if not already defined.
16529         (init_parse): Use OBJECT_SUFFIX, not ".o".
16531 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16533         * class.c (emit_register_classes): Renamed from
16534         emit_register_class.
16535         * java-tree.h (emit_register_classes): Prototype renamed from
16536         emit_register_class.
16537         * jcf-parse.c (yyparse): Call emit_register_classes once before
16538         returning.
16539         * parse.y (java_expand_classes): No longer register classes.
16541 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16543         * class.c (is_compiled_class): New local variable
16544         seen_in_zip. Identify classes found in currently compiled source
16545         file(s).
16546         * decl.c (complete_start_java_method): Fixed typo.
16547         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
16548         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
16549         (CLASS_P): Moved around.
16550         (java_parse_abort_on_error): Macro moved from jcf-parse.c
16551         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
16552         java-tree.h
16553         (jcf_parse_source): Changed leading comment. Removed unnecessary
16554         fclose and CLASS_FROM_SOURCE_P marking.
16555         (parse_source_file): New local variables remember_for_generation
16556         and filename. Mark parsed file name identifier node. Removed block
16557         executed when parse_only was null. Set remember_for_generation.
16558         Use it as an argument to java_pop_parser_context.
16559         (yyparse): New local variables several_files, list, next node and
16560         current_file_list. Split ampersand separated file names into
16561         current_file_list. Iterate through the list and parse accordingly.
16562         * parse.h (java_pop_parser_context): New function prototype.
16563         * parse.y (ctxp_for_generation): New static global variable.
16564         (java_pop_parser_context): New argument generate. Link popped ctxp
16565         to ctxp_for_generation list accordingly.
16566         (java_complete_expand_methods): Fixed indentation.
16567         (java_expand_classes): New function.
16569 1998-10-17  Per Bothner  <bothner@cygnus.com>
16571         * Makefile.in:  Link with libiberty.a instead of memmove.o.
16573 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16575         * lex.c (setjmp.h): No longer included.
16576         * lex.h (setjmp.h): Included.
16577         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
16578         (duplicate_declaration_error_p): Renamed from
16579         duplicate_declaration_error.
16580         (build_array_from_name): New function prototype.
16581         * parse.y (setjmp.h): No longer included.
16582         (variable_declarator_id): Define action.
16583         (build_array_from_name): New function.
16584         (duplicate_declaration_error_p): Renamed from
16585         duplicate_declaration_error.  Fixed leading comment.
16586         (register_fields): Main `for' loop reorganized. Uses
16587         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
16588         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
16589         build_array_from_name.
16590         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
16591         types.
16592         (read_import_dir): Don't try to skip `.' and `..'.
16593         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
16594         build_array_from_name. Main `for' loop reorganized.
16595         (resolve_qualified_expression_name): When building access to a
16596         field, use the type where the field was found, not its own type.
16597         (maybe_access_field): Use field DECL_CONTEXT if the type where the
16598         field was found is null.
16599         (qualify_ambiguous_name): Sweep through all successive array
16600         dimensions.
16602 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16604         * java-tree.h (pop_labeled_block, lang_printable_name,
16605         maybe_add_interface, set_super_info, get_access_flags_from_decl,
16606         interface_of_p, inherits_from_p, fix_classpath,
16607         complete_start_java_method, emit_handlers, init_outgoing_cpool,
16608         make_class_data, register_class, alloc_name_constant): New
16609         function prototypes.
16610         * lang.c (lang_decode_option): Set argc argument unused. Fixed
16611         indentation. Added cast to remove warning.
16612         (lang_printable_name): Set v argument unused.
16613         (lang_print_error): Added argument to lang_printable_name call.
16614         (java_dummy_print, print_lang_decl, print_lang_type,
16615         print_lang_identifier, lang_print_xnode): All argument marked
16616         unused.
16617         * lex.c (java_unget_unicode): Removed unnecessary argument.
16618         (java_allocate_new_line): Unused local variable is gone.
16619         (java_read_char): Added parenthesis in expressions to remove
16620         warnings.  Added final return statement.
16621         (java_read_unicode): Added parenthesis in expression to remove
16622         warning.
16623         (java_parse_end_comment): Fixed java_unget_unicode invocation.
16624         (java_parse_escape_sequence): Likewise.
16625         (java_lex): Unused local variables are gone. Fixed
16626         java_unget_unicode invocation.
16627         * lex.h (set_float_handler): Prototype added when JC1_LITE not
16628         defined.
16629         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
16630         lang_printable_name invocation in macro.
16631         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
16632         Likewise.
16633         (duplicate_declaration_error): Suppressed unused argument in
16634         prototype.
16635         (identical_subpath_p): Function declaration is gone.
16636         (patch_invoke): Suppressed unused argument in prototype.
16637         (patch_cast, build_labeled_block, check_thrown_exceptions):
16638         Likewise.
16639         * parse.y (setjmp.h): Included
16640         (toplev.h): Likewise.
16641         (field_declaration:): Suppressed unused local
16642         (label_decl:): Fixed build_labeled_block invocation.
16643         (java_pop_parser_context): Put extra parenthesis around assignment
16644         in if.
16645         (yyerror): Suppressed unused local variables.
16646         (variable_redefinition_error): Fixed lang_printable_name
16647         invocation.
16648         (create_interface): Suppressed unused local variables.
16649         (create_class): Likewise.
16650         (duplicate_declaration_error): Suppressed unused argument. Fixed
16651         lang_printable_name invocation.
16652         (register_fields): Suppressed unused local variable. Fixed
16653         duplicate_declaration_error invocation.
16654         (method_header): Suppressed unused local variable.
16655         (method_declarator, parser_check_super): Likewise.
16656         (java_complete_class): Suppressed unused local variable. Fixed
16657         fatal error message.
16658         (complete_class_report_errors): Added default: in switch.
16659         (java_check_regular_methods): Fixed lang_printable_name
16660         invocations.
16661         (check_throws_clauses): Likewise.
16662         (java_check_abstract_methods): Suppressed unused local
16663         variable. Fixed lang_printable_name invocation.
16664         (read_import_entry): Added supplemental return statement.
16665         (read_import_dir): Suppressed unused local variables.
16666         (check_pkg_class_access, declare_local_variables): Likewise.
16667         (source_start_java_method): Suppressed unused extern variable
16668         declarations
16669         (expand_start_java_method): Suppressed unused extern and local
16670         variable declarations.
16671         (java_complete_expand_methods): Likewise.
16672         (java_complete_expand_method): Suppressed unused local variables.
16673         (make_qualified_name): Likewise.
16674         (resolve_qualified_expression_name): Added default: in
16675         switch. Fixed lang_printable_name invocation.
16676         (class_instance_creation_expression): Added parenthesis around
16677         expressions.
16678         (patch_method_invocation_stmt): Fixed lang_printable_name and
16679         patch_invoke invocations.
16680         (check_for_static_method_reference): Fixed lang_printable_name
16681         invocation.
16682         (patch_invoke): Suppressed unused arguments and local variables.
16683         (lookup_method_invoke): Suppressed unused local variables.
16684         (qualify_ambiguous_name): Added default: in switch.
16685         (identical_subpath_p): Function removed.
16686         (patch_assignment): Suppressed unused local variables. Suppressed
16687         unnecessary if statement. Fixed lang_printable_name invocations.
16688         (try_builtin_assignconv): Fixed lang_printable_name invocations.
16689         (valid_ref_assignconv_cast_p): Parenthesis around
16690         expression. Suppressed unused local variables.
16691         (build_binop): Suppressed unused local variables. fixed
16692         lang_printable_name invocations.
16693         (string_constant_concatenation): Suppressed unused local
16694         variables.
16695         (patch_unaryop): Fixed lang_printable_name invocation.
16696         (patch_cast): Suppressed unnecessary argument. Fixed
16697         lang_printable_name invocation.
16698         (patch_array_ref): Fixed lang_printable_name invocation.
16699         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
16700         (build_labeled_block): Suppressed unused argument.
16701         (generate_labeled_block): Fixed build_labeled_block invocation.
16702         (build_loop_body): Suppressed unused local variables.
16703         (patch_loop_statement): Likewise.
16704         (patch_exit): Fixed lang_printable_name invocation.
16705         (patch_switch_statement): Likewise.
16706         (case_identity): First argument marked unused.
16707         (patch_try_statement): Fixed lang_printable_name invocations.
16708         (patch_synchronized_statement, patch_throw_statement): Likewise.
16709         (check_thrown_exceptions): Fixed check_thrown_exceptions and
16710         lang_printable_name invocations.
16711         (check_thrown_exceptions_do): Suppressed unused argument.
16713 1998-10-14  Tom Tromey  <tromey@cygnus.com>
16715         * jcf-write.c (write_classfile): Add output class file as target.
16716         * lang-options.h: Added -MD, -MMD, -M, and -MM.
16717         * jcf.h: Added declarations for dependency-tracking functions.
16718         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
16719         * lang.c (lang_decode_option): Recognize -MD and -MMD.
16720         (finish_parse): Call jcf_dependency_write.
16721         (dependency_tracking): New global.
16722         (DEPEND_SET_FILE): New define.
16723         (DEPEND_ENABLE): New define.
16724         (init_parse): Enable dependency tracking if required.
16725         Include "flags.h".
16726         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
16727         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
16728         (../gcjh$(exeext)): Likewise.
16729         (jcf-depend.o): New target.
16730         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
16731         (GCJH_SOURCES): Likewise.
16732         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
16733         dep_name argument.
16734         (find_classfile): Added dep_name argument.
16735         (find_class): Compute name of dependency.
16736         (open_in_zip): Call jcf_dependency_add_file.
16737         * gjavah.c (output_file): No longer global.
16738         (usage): Don't mention "gjavah".
16739         (help): Likewise.
16740         (java_no_argument): Likewise.
16741         (version): Likewise.
16742         (main): Recognize and handle -M family of options.
16743         (print_mangled_classname): Return is void.
16744         (process_file): Handle case where output is suppressed.
16745         (HANDLE_END_FIELD): Likewise.
16746         (HANDLE_METHOD): Likewise.
16747         * jcf-depend.c: New file.
16749 1998-10-13  Jeffrey A Law  (law@cygnus.com)
16751         * java-tree.def: Add missing newline at EOF.
16753 1998-10-13  Tom Tromey  <tromey@cygnus.com>
16755         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
16756         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
16757         function.
16758         Include <config.h> and "system.h".
16759         (disassemble_method): Undefine RET to avoid clash with
16760         config/i386/i386.h.
16762 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16764         * decl.c (runtime_exception_type_node, error_exception_type_node):
16765         New global variables.
16766         (init_decl_processing): Initialized.
16767         * expr.c (java_lang_expand_expr): Set caught exception type to
16768         null if catch handler argument doesn't exit.
16769         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
16770         tree codes.
16771         * java-tree.h (runtime_exception_type_node,
16772         error_exception_type_node): Global variables declared.
16773         (DECL_FUNCTION_THROWS): New macro.
16774         (DECL_FUNCTION_BODY): Modified comment.
16775         (DECL_SPECIFIC_COUNT): Likewise.
16776         (struct lang_decl): New field throws_list.
16777         (IS_UNCHECKED_EXPRESSION_P): New macro.
16778         * lex.c (java_lex): Generate location information for THROW_TK.
16779         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
16780         EXCEPTIONS_P): New macros.
16781         (enum jdep_code): New value JDEP_EXCEPTION.
16782         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
16783         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
16784         PATCH_METHOD_RETURN_ERROR): New macros.
16785         (patch_method_invocation_stmt): Added new argument to prototype.
16786         (patch_synchronized_statement, patch_throw_statement,
16787         check_thrown_exceptions, check_thrown_exceptions_do,
16788         purge_unchecked_exceptions, check_throws_clauses): New function
16789         prototypes.
16790         * parse.y Fixed typo in keyword section.
16791         (throw:): Rule tagged <node>.
16792         (THROW_TK): Keyword tagged <operator>.
16793         (method_header:): Last argument to call to method_header passed
16794         from throws: rule.
16795         (throws:, class_type_list:, throw_statement:,
16796         synchronized_statement:, synchronized:): Defined actions.
16797         (method_header): New local variable current. Register exceptions
16798         from throws clause.
16799         (java_complete_tree): Complete and verify exceptions from throws
16800         clause.
16801         (complete_class_report_errors): Error message on exceptions not
16802         found
16803         (java_check_regular_methods): Fixed typo. Shortcut on private
16804         overriding methods. Changed error message on method
16805         redefinition. Check for throws clause compatibility.
16806         (check_throws_clauses): New function.
16807         (java_check_abstract_methods): Use DECL_NAME for wfl or current
16808         method. Changed error message on method redefinition.
16809         (currently_caught_type_list): New static variable.
16810         (java_complete_expand_methods): Purge unchecked exceptions from
16811         throws clause list. Call PUSH_EXCEPTIONS before walk and
16812         POP_EXCEPTIONS after.
16813         (resolve_qualified_expression_name): Pass new argument as NULL to
16814         patch_method_invocation_stmt.
16815         (patch_method_invocation_stmt): New argument ref_decl. Invoke
16816         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
16817         argument list when appropriate. Use new argument if non null to
16818         store selected method decl.
16819         (patch_invoke): Convert if necessary args of builtin types before
16820         forming CALL_EXPR. Argument list no longer reversed here.
16821         (invocation_mode): Treat final methods as static methods.
16822         (java_complete_tree): New cases for THROW_EXPR: and
16823         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
16824         function call.
16825         (complete_function_arguments): No more RECORD_TYPE
16826         conversion. Function parameter nodes no longer saved.
16827         (valid_ref_assignconv_cast_p): Avoid handling null type.
16828         (patch_binop): Fixed null constant reference handling.
16829         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
16830         BUILD_THROW macros.
16831         (patch_try_statement): Fixed comments. Record caught types in
16832         list, push the list, expand try block and pop the list.
16833         (patch_synchronized_statement, patch_throw_statement,
16834         check_thrown_exceptions, check_thrown_exceptions_do,
16835         purge_unchecked_exceptions): New functions.
16836         * typeck.c (lookup_argument_method): Allow WFL in place of method
16837         DECL_NAME during method definition check
16839 1998-10-09  Tom Tromey  <tromey@cygnus.com>
16841         * gjavah.c (decode_signature_piece): New function.
16842         (print_c_decl): Use it.  Added `name_override' argument.
16843         (print_method_info): Use name_override argument to print_c_decl.
16844         (seen_fields): Removed.
16845         (print_field_info): Don't update seen_fields.
16846         (struct method_name): New structure.
16847         (method_name_list): New global.
16848         (print_method_info): Add new method to list of methods.
16849         (name_is_method_p): New function.
16850         (print_field_info): If field name has same name as method, then
16851         change field name.
16852         (process_file): Parse methods before fields.
16853         (field_pass): New global.
16854         (HANDLE_END_FIELD): Take field_pass into account.
16856 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16858         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
16859         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
16861 1998-10-03  Anthony Green  <green@cygnus.com>
16863         * jvspec.c: Fix bug in jvgenmain_spec patch.
16865 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16867         * Makefile.in (lang.o:): Install dependency on java-tree.def.
16868         * decl.c (soft_exceptioninfo_call_node): New global variable.
16869         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
16870         takes extra integer argument. soft_exceptioninfo_call_node
16871         initialized.
16872         * except.c (java_set_exception_lang_code): New function
16873         (method_init_exceptions): Called here.
16874         (prepare_eh_table_type): New function.
16875         (expand_end_java_handler): Called here.
16876         * expr.c (build_java_throw_out_of_bounds_exception): Now features
16877         one argument. Modified generation of call to
16878         soft_badarrayindex_node to use new argument.
16879         (build_java_arrayaccess): Pass faulty index value to
16880         build_java_throw_out_of_bounds_exception.
16881         (generate_name): New function.
16882         (java_lang_expand_expr): New local variables node, current,
16883         has_finally_p. Expand TRY_EXPR node.
16884         (process_jvm_instruction): Replace top of the stack with thrown
16885         object reference when entering exception handler.
16886         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
16887         specific tree codes.
16888         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
16889         global.
16890         (DECL_SPECIFIC_COUNT): New macro.
16891         (prepare_eh_table_type, java_set_exception_lang_code,
16892         generate_name): New function declarations.
16893         (match_java_method): Declaration deleted.
16894         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
16895         macros.
16896         * lex.c (TRY_TK, CATCH_TK): Generate location information.
16897         * parse.h (redefinition_error, refine_accessible_methods_list,
16898         can_cast_to_p): Function declaration removed.
16899         (classitf_redefinition_error, variable_redefinition_error,
16900         parse_jdk1_1_error, find_applicable_accessible_methods_list,
16901         find_most_specific_methods_list, argument_types_convertible,
16902         enter_a_block, valid_builtin_assignconv_identity_widening_p,
16903         valid_cast_to_p, valid_method_invocation_conversion_p,
16904         try_reference_assignconv, add_stmt_to_compound,
16905         build_jump_to_finally, build_tree_list, patch_try_statement,
16906         java_get_catch_block): New function declarations.
16907         * parse.y (string_buffer_type): Global variable deleted.
16908         (group_of_labels, catches, catch_clause, catch_clause_parameter,
16909         finally): Rules tagged <node>.
16910         (TRY_TK, CATCH_TK): Token tagged <operator>.
16911         (class_body_declaration:, class_member_declaration:,
16912         formal_parameter:, explicit_constructor_invocation:,
16913         interface_member_declaration:, constant_declaration:,
16914         primary_no_new_array:, class_instance_creation_expression:,
16915         array_creation_expression:): Issue error on unsuported JDK1.1
16916         features.
16917         (try_statement:, catches:, finally:): Define actions.
16918         (catch_clause_parameter): New rule.
16919         (catch_clause:): Use new rule catch_clause_parameter.
16920         (parse_jdk1_1_error): New function.
16921         (redefinition_error): Renamed classitf_redefinition_error.
16922         (variable_redefinition_error): New function.
16923         (check_class_interface_creation): Call
16924         classitf_redefinition_error.
16925         (java_complete_tree): Added error message on JDEP_TYPE: case.
16926         (complete_class_report_errors): Fixed indentation.
16927         (declare_local_variables): Call variable_redefinition_error.
16928         (source_end_java_method): Call java_set_exception_lang_code and
16929         emit_handlers where appropriate.
16930         (java_method_add_stmt): Call add_stmt_to_block.
16931         (add_stmt_to_block): New function.
16932         (lookup_method_invoke): Fixed outside comment. new local variable
16933         candicates.  Call find_applicable_accessible_methods_list and
16934         find_most_specific_methods_list when searching for a
16935         method. Modified error report to list possible candidates when
16936         applicable.
16937         (find_applicable_accessible_methods_list,
16938         find_most_specific_methods_list, argument_types_convertible): New
16939         function.
16940         (refine_accessible_methods_list): Function deleted.
16941         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
16942         expr (if applicable) before calling patch_array_ref.
16943         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
16944         (enter_block): Fixed comment.
16945         (enter_a_block): New function.
16946         (patch_assignment): Reorganized. Call try_reference_assignconv for
16947         references. Call valid_cast_to_p instead of can_cast_to_p.
16948         (try_reference_assignconv,
16949         valid_builtin_assignconv_identity_widening_p): New functions.
16950         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
16951         (valid_cast_to_p, valid_method_invocation_conversion_p): New
16952         functions.
16953         (build_string_concatenation): Don't resolve StringBuffer.
16954         (patch_cast): Fixed inverted arguments.
16955         (patch_array_ref): Code to save array expr deleted. Call
16956         valid_cast_to_p instead of can_cast_to_p.
16957         (generate_labeled_block): Call generate_name.
16958         (build_jump_to_finally, build_try_statement, java_get_catch_block,
16959         patch_try_statement): New functions.
16960         * typeck.c (match_java_method): Function deleted.
16962 1998-10-02  Anthony Green  <green@cygnus.com>
16964         * jvspec.c: jvgenmain_spec uses different temporary file names.
16966 1998-10-02  Anthony Green  <green@cygnus.com>
16968         * jvspec.c (lang_specific_driver): Fail if user specifies
16969         --main= when not linking.
16971 1998-09-28  Tom Tromey  <tromey@cygnus.com>
16973         * class.c (make_class_data): Push value for `thread' field.
16974         * decl.c (init_decl_processing): Added `thread' field to class.
16976         * class.c (add_field): Always make static fields externally
16977         visible.
16979 1998-09-26  Anthony Green  <green@cygnus.com>
16981         * expr.c (build_java_athrow,
16982         build_java_throw_out_of_bounds_exception, expand_invoke,
16983         build_newarray, expand_java_multianewarray, build_java_monitor):
16984         Update comments to reflect _Jv_* function names.
16986 1998-09-25  Per Bothner  <bothner@cygnus.com>
16988         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
16989         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
16990         * parse.y (expand_start_java_method):  Likewise.
16992 1998-09-24  Per Bothner  <bothner@cygnus.com>
16994         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
16996         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
16997         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
16998         * expr.c:  Remove no-longer-needed calls to promote_type.
16999         * decl.c (give_name_to_locals):  Liekwise.
17000         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
17001         * parse.y:  Add/remove promote_type calls as appropriate.
17002         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
17003         (parse_signature_string):  Likewise.
17004         (build_java_array_type):  Fix for now signature convenions.
17006         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
17008 1998-09-23  Tom Tromey  <tromey@cygnus.com>
17010         * class.c (init_class_processing): libjava function renamed to
17011         _Jv_RegisterClass.
17013 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17015         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
17016         * java-tree.def: Fixed DEFTREECODE third argument.
17017         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
17018         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
17019         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
17020         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17021         JAVA_THIS_EXPR): Now replaced by tree code definitions.
17022         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
17023         * lang.c (java_tree_code_type, java_tree_code_length,
17024         java_tree_code_name): New arrays.
17025         (lang_init): Append Java tree node definitions to Gcc ones.
17026         * lex.c (expression_obstack): Declared as extern when JC1_LITE
17027         defined.
17028         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
17029         wfl_to_string.
17030         (java_lex): Allow declaration of empty string constants. Retain
17031         location information on CASE_TK and DEFAULT_TK.
17032         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
17033         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
17034         Modified to be more robust.
17035         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
17036         (build_new_invocation, try_builtin_assignconv,
17037         patch_switch_statement, string_constant_concatenation,
17038         build_string_concatenation, patch_string_cst, patch_string,
17039         java_expand_switch): New function declarations.
17040         * parse.y: Rules related to switch and EH tagged <node>.
17041         (label_id): Set to NULL_TREE
17042         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
17043         tree nodes.
17044         (this_or_super:): Fixed indentation.
17045         (statement:, statement_nsi:, statement_without_trailing_substatement:,
17046         statement_expression:): Removed call to RULE on all sub-rules.
17047         (switch_expression:, switch_labels:): New rules.
17048         (switch_statement:, switch_block:, switch_block_statement_groups:,
17049         switch_block_statement_group:, switch_labels:, switch_label:):
17050         Defined actions.
17051         (throw_statement:, synchronized_statement:, try_statement:):
17052         Defined temporary actions.
17053         (class_instance_creation_expression:): Call
17054         build_new_invocation. Fixed indentation.
17055         (field_access): Fixed indentation.
17056         (method_invocation): Likewise.
17057         (make_qualified_primary): Use THIS_EXPR.
17058         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
17059         resolving from SUPER, set *type_found.
17060         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
17061         (java_complete_tree): Removed unused local variable `location'. Case
17062         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
17063         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
17064         on MODIFY_EXPR: and all binary operator tree code cases. Removed
17065         STRING_CST: case. default: checks for patchable strings.
17066         (complete_function_arguments): Transform string constant or
17067         crafted StringBuffer if necessary.
17068         (build_method_invocation): Fixed comments.
17069         (build_new_invocation): New function.
17070         (patch_assignment): Call try_builtin_assignconv to figure a valid
17071         assignment conversion between builtin types.
17072         (try_builtin_assignconv): New function.
17073         (build_binop): Use URSHIFT_EXPR directly to call build.
17074         (operator_string): Use UNARY_PLUS_EXPR.
17075         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
17076         operator.
17077         (do_merge_string_cste, merge_string_cste,
17078         string_constant_concatenation, build_string_concatenation,
17079         patch_string, patch_string_cst): New function.
17080         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
17081         (patch_unaryop): Likewise. New test of valid ++/-- operands.
17082         (build_newarray_node): Use NEW_ARRAY_EXPR.
17083         (build_this): Use THIS_EXPR.
17084         (build_return): Enable debug information on return statement.
17085         (build_if_else_statement): Likewise.
17086         (complete_labeled_statement): Fixed related comment.
17087         (build_loop_body): Fixed comment.
17088         (build_bc_statement): Enable debug information on break/continue
17089         statements.
17090         (patch_bc_statement): Fixed typos. Handle SWITCH statement
17091         context.
17092         (patch_switch_statement, case_identity, java_expand_switch): New
17093         functions.
17095 1998-09-21  Per Bothner  <bothner@cygnus.com>
17097         * buffer.h (BUFFER_INIT):  New macro.
17098         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
17099         Pass (struct jcf_partial *state) to most functions.
17100         (jcf_block, jcf_relocation):  New types.
17101         Support labels, branches, conditionals, loops.
17103 1998-09-21  Tom Tromey  <tromey@cygnus.com>
17105         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
17107 1998-09-21  Per Bothner  <bothner@cygnus.com>
17109         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
17110         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
17111         not integer_type_node (INT_TYPE_SIZ bits).
17113         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
17115         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
17116         * jcf-dump.c (print_exception_table):  New function.
17117         (disassemble_method):  Better handling of wide instructions.
17118         Make more robust for bad input.
17120 1998-09-30  Jeffrey A Law  (law@cygnus.com)
17122         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
17123         FreeBSD.
17125 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17127         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
17129 1998-09-17  Tom Tromey  <tromey@cygnus.com>
17131         * Makefile.in ($(PARSE_H)): Removed target.
17133 1998-09-17  Jeffrey A Law  (law@cygnus.com)
17135         * Makefile.in (JAVA_OBJS): Add memmove.o
17136         (memmove.o): New target & rules.
17138 1998-09-15  Tom Tromey  <tromey@cygnus.com>
17140         * expr.c (expand_invoke): Don't generate a call to the class init
17141         code.
17143 1998-09-14  Jeffrey A Law  (law@cygnus.com)
17145         * Makefile.in: Add many missing dependencies.
17146         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
17147         as appropriate.
17148         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
17149         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
17151 1998-09-11  Per Bothner  <bothner@cygnus.com>
17153         * decl.c (complete_start_java_method):  If method is static (and
17154         not private) call _Jv_InitClass.
17155         * expr.c (expand_invoke):  Don't call build_class_init.
17157         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
17159 1998-09-10  Jeffrey A Law  (law@cygnus.com)
17161         * Make-lang.in (GCJ): Define before using.
17163 1998-09-09  Jeffrey A Law  (law@cygnus.com)
17165         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
17166         losing due to namespace pollution in GNU getopt.h
17168 1998-09-09  Tom Tromey  <tromey@cygnus.com>
17170         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
17171         (java.all.cross): Likewise.
17172         (java.rest.encap): Likewise.
17174 1998-09-08  Jeffrey A Law  (law@cygnus.com)
17176         * gjavah.c (print_class_decls): Fix thinko in arglist
17177         * jcv-io.c (find_classfile): Similarly.
17179 1998-09-07  Jeffrey A Law  (law@cygnus.com)
17181         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
17183 1998-09-05  Tom Tromey  <tromey@cygnus.com>
17185         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
17186         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
17187         * Makefile.in (PARSE_C): New macro.
17188         (PARSE_H): Likewise.
17189         (PARSE_SCAN_C): Likewise.
17190         ($(PARSE_C)): Target renamed from parse.c.
17191         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
17192         (clean): Remove parse-scan.c as well.
17193         (parse.o): Depend on $(PARSE_C).
17195 1998-09-05  Anthony Green  <green@cygnus.com>
17197         * README, license.terms: Removed.
17199         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
17200         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
17201         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
17202         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
17203         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
17204         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
17205         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
17206         and Java trademark attribution.
17208 1998-09-04  Tom Tromey  <tromey@cygnus.com>
17210         * Makefile.in: Use gcjh, not gjavah.
17211         * config-lang.in (stagestuff): Use gcjh, not gjavah.
17212         * Make-lang.in: Changed gjavah to gcjh everywhere.
17214 1998-09-03  Per Bothner  <bothner@cygnus.com>
17216         * gjavah.c:  Support new -prepend -add -append flags.
17217         (print_method_info):  Method is not virtual if class is final.
17219 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17221         * jv-scan.c: Fixed copyright assignment.
17222         * keyword.gperf: Likewise.
17223         * keyword.h: Likewise.
17224         * lex.c: Fixed copyright assignment.
17225         (java_lex): Push unicode back when parsing '<'.
17226         * lex.h: Fixed copyright assignment.
17227         * parse-scan.y: Likewise.
17228         * parse.h: Fixed copyright assignment.
17229         (build_debugable_stmt, complete_for_loop): New function prototypes.
17230         * parse.y: Fixed copyright assignment.
17231         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
17232         size_zero_node when completing a loop with no exit condition.
17233         (for_statement_nsi:): Define action.
17234         (for_init:, for_update:): Return size_zero_node when empty.
17235         (declare_local_variables): Call build_debugable_stmt.
17236         (build_debugable_stmt): New function.
17237         (build_loop_body): Build debugable statement around loop
17238         condition part.
17239         (complete_loop_body): Take into account the debugable statement
17240         around the EXIT_EXPR.
17241         (complete_loop_body): New function.
17242         (patch_exit_expr): Fixed condition inversion.
17244 1998-09-02  Tom Tromey  <tromey@cygnus.com>
17246         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
17247         name of thread define.
17248         * jvspec.c (THREAD_NAME): New macro.
17249         (GCLIB): Likewise.
17250         (THREADLIB): Likewise.
17251         (lang_specific_driver): Recognize attempt to link with thread
17252         library or gc library.  Recognize -ljava on command line so it
17253         isn't linked against more than once.
17255 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17257         * parse-scan.y (report_main_declaration): Name of the class
17258         containing `main' can be a qualified name.
17260 1998-08-31  Tom Tromey  <tromey@cygnus.com>
17262         * config-lang.in: Changed gjavac to gjc everywhere.
17263         * Make-lang.in: Changed gjavac to gjc everywhere.
17265 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17267         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
17268         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
17269         and install the files.
17270         * Makefile.in (JAVA_OBJS_LITE): New variable.
17271         (compiler:): Now include jv-scan as a dependency.
17272         (../jv-scan$(exeext), parse-scan.c): New targets.
17273         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
17274         * config-lang.in (compilers): Removed gcj, gjavah from the list.
17275         * jcf-parse.c (parse_source_file): Call java_layout_classes and
17276         check for errors even if parse_only.
17277         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
17278         defined.
17279         (yylex): New function. Uses java_lex body.
17280         (java_lex): Removed commented out statement. Remove local variable
17281         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
17282         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
17283         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
17284         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
17285         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
17286         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
17287         where appropriate.
17288         (java_lex_error): Empty if JC1_LITE is defined.
17289         (java_get_line_col): Return 0 if JC1_LITE is defined.
17290         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
17291         SET_MODIFIER_CTX): Moved into the section containing the macros
17292         conditionally defined by JC1_LITE.
17293         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
17294         argument if JC1_LITE is defined.
17295         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
17296         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
17297         is defined.
17298         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
17299         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
17300         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
17301         to different values according to JC1_LITE.
17302         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
17303         declared if JC1_LITE set.
17304         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
17305         defined if JC1_LITE not set.
17306         (struct parser_ctx): Reorganized and skip the jc1 front end part
17307         if JC1_LITE set.
17308         (java_layout_classes): New function definition.
17309         (java_push_parser_context, java_init_lex, yyparse, yylex,
17310         yyerror): Prototype always declared. All other static function
17311         prototypes declared only if JC1_LITE is not set.
17312         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
17313         declared in parse.h.
17314         (java_layout_classes): New function.
17315         (java_complete_expand_methods): No longer layout the class here.
17316         * parse-scan.y: New file.
17317         * jv-scan.c: New file.
17319 1998-08-25  Tom Tromey  <tromey@cygnus.com>
17321         * gjavah.c (main): Handle -friend option.
17322         (friend_specs): New global.
17323         (generate_access): Handle friend_specs.
17324         (process_file): Likewise.
17325         (MAX_FRIENDS): New macro.
17326         (friend_count): New global.
17327         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
17328         Changed all callers.
17330 1998-08-24  Per Bothner  <bothner@cygnus.com>
17332         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
17333         (main):  Handle processing all the entries of a named .zip archive.
17334         * jcf-io.c (jcf_trim_old_input):  New function.
17335         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
17337 1998-08-24  Per Bothner  <bothner@cygnus.com>
17339         * lang.c (flag_assume_compiled):  Make default be on.
17341 1998-08-21  Per Bothner  <bothner@cygnus.com>
17343         * jcf-dump.c:  Add bunches of flags to control output more.
17344         (process_class):  New function;  support printing more than one class.
17345         (main): Support new --print-main and --javap flags.
17346         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
17347         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
17349 1998-08-20  Per Bothner  <bothner@cygnus.com>
17351         Change mangling of dispatch table to match C++ vtable (w/thunks).
17352         * class.c (build_dtable_decl), java-tree.h:  New function.
17353         (make_class_data):  Call it.
17354         * decl.c (init_decl_processing):  Likewise.
17356 1998-08-19  Warren Levy  <warrenl@cygnus.com>
17358         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
17359         soft_anewarray; adjust args passed.
17360         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
17361         match _Jv_NewObjectArray.
17363 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17365         * decl.c (push_labeled_block, pop_labeled_block): New functions.
17366         * expr.c (loopup_label): Call create_label_decl.
17367         (create_label_decl): New function.
17368         (java_lang_expand_expr): Call expand_start_bindings with argument
17369         set to zero.
17370         * java-tree.h Added space after PROTO in function declarations
17371         when necessary.
17372         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
17373         (create_label_decl, push_labeled_block): New function
17374         declarations.
17375         * lex.c (label_id): Initialize.
17376         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
17377         switch.
17378         * parse.h Added space after PROTO in function declarations when
17379         necessary.
17380         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
17381         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
17382         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
17383         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
17384         macros.
17385         (struct parser_ctxt): New fields current_loop,
17386         current_labeled_block.
17387         (build_if_else_statement, patch_if_else_statement,
17388         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
17389         generate_labeled_block, complete_labeled_statement,
17390         build_bc_statement, patch_bc_statement, patch_loop_statement,
17391         build_new_loop, build_loop_body, complete_loop_body): New function
17392         declarations.
17393         * parse.y (java_warning_count): New global variable.
17394         (label_id): New static variable.
17395         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
17396         (block:): Return size_zero_node when block is empty.
17397         (empty_statement:): Return size_zero_node.
17398         (statement:): Implement supplemental action when for_statement: is
17399         reduced.
17400         (label_decl:): New rule.
17401         (labeled_statement:): Rewritten using label_decl. Actions
17402         implemented.
17403         (labeled_statement_nsi:): Likewise.
17404         (if_then_statement): Actions implemented.
17405         (while_expression): New rule.
17406         (while_statement:): Rewritten using while_expression. Actions
17407         implemented.
17408         (while_statement_nsi:): Likewise.
17409         (do_statement_begin:): New rule.
17410         (do_statement:): Rewritten using do_statement_begin. Actions
17411         implemented.
17412         (for_statement:): Rewritten using for_begin. Actions implemented.
17413         (for_statement_nsi:): Likewise.
17414         (for_header:, for_begin:): New rules.
17415         (for_init:): Actions implemented.
17416         (statement_expression_list:, break_statement:,
17417         continue_statement:): Likewise.
17418         (yyerror): Count number of issued warning(s).
17419         (java_report_errors): Report error(s) and/or warning(s).
17420         (java_complete_class): Use build_java_argument_signature to
17421         recompute completed method signature.
17422         (java_check_regular_methods): New locals method_wfl and aflags.
17423         Use method_wfl instead of lookup_cl during error reports. Fixed
17424         indentation and modified some error messages. Use
17425         lang_printable_name in method instead of the DECL_NAME. New code
17426         to issue warnings on methods not overriding corresponding methods
17427         private to a different package.
17428         (java_method_add_stmt): Call add_stmt_to_compound.
17429         (add_stmt_to_compound): New function.
17430         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
17431         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
17432         (build_if_else_statement, patch_if_else_statement,
17433         build_labeled_block, generate_labeled_block,
17434         complete_labeled_statement, build_new_loop, build_loop_body,
17435         complete_loop_body, patch_loop_statement, build_bc_statement,
17436         patch_bc_statement, patch_exit_expr): New functions.
17437         * typeck.c (build_java_signature): Build argument signature before
17438         enclosing it in between parenthesis.
17440 1998-08-17  Warren Levy  <warrenl@cygnus.com>
17442         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
17443         (JAVA_OBJS): Added reminder comment
17445 1998-08-13  Nick Clifton  <nickc@cygnus.com>
17447         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
17448         be interpreted as a long long.
17450 1998-08-13  Warren Levy  <warrenl@cygnus.com>
17452         * decl.c (init_decl_processing): Use _Jv_InitClass, not
17453         soft_initialise_class.  Use _Jv_NewMultiArray, not
17454         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
17455         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
17456         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
17457         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
17459 1998-08-12  Per Bothner  <bothner@cygnus.com>
17461         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
17462         length_identifier_node):  New global tree node constants.
17463         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
17464         Replace uses by super_identifier_node etc.
17465         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
17467         * parse.y (resolve_field_access):  Don't special-case ".length" if
17468         flag_emit_class_files.
17469         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
17470         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
17471         and ARRAY.length.
17473 1998-08-11  Per Bothner  <bothner@cygnus.com>
17475         * decl.c (init_decl_processing): Remove unused method_type_node fields.
17476         * class.c (make_method_value):  Remove init for removed fields.
17478         * class.c (layout_class):  Use build_java_argument_signature.
17479         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
17481         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
17482         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
17483         (build_java_signature):  Don't use push_java_argument_signature.
17485         * typeck.c (lookup_argument_method):  New function.
17486         * parse.y (java_check_regular_methods):  Use lookup_argument_method
17487         instead of lookup_java_method2 followed by lookup_java_method.
17489         * parse.y (check_method_redefinition):  Minor optimization.
17491         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
17492         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
17494 1998-08-10  Tom Tromey  <tromey@cygnus.com>
17496         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
17497         c-pragma.o.
17499         * gjavah.c (java_float_finite): Use K&R-style definition.
17500         (java_double_finite): Likewise.
17501         (generate_access): Now returns void.  Changed all callers.
17502         (last_access_generated): Removed.
17503         (process_file): Only make a single pass over the .class file.
17505 1998-07-29  Per Bothner  <bothner@cygnus.com>
17507         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
17508         for compatibility for G++ (with -fvtable-thunks).
17509         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
17511         * gjavah.c (process_file):  Use public inheritance for super-class.
17513 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17515         * lex.c (java_init_lex): Initialize ctxp->package.
17516         * parse.h (struct parser_ctxt): package and package_len replaced
17517         by tree package, an identifier node. Field method_decl_list is
17518         gone. Fixed comments.
17519         (lookup_field_wrapper, merge_qualified_name, not_accessible,
17520         class_in_current_package): New function prototypes.
17521         * parse.y (array_type:): Set class loaded flag on primitive type
17522         arrays.
17523         (package_declaration:): Assign ctxp->package to the
17524         identifier node.
17525         (method_invocation:): Handle invocation of method qualified by
17526         `super'.
17527         (single_type_import_declaration:): Removed ambiguity check.
17528         (java_pop_parser_context): New local variable `next'. Reset and
17529         set IMPORT_CLASSFILE_NAME flags on current and previous import
17530         list.
17531         (java_accstring_lookup): Use new local macro COPY_RETURN.
17532         (lookup_field_wrapper): New function.
17533         (parser_qualified_classname): Use merge_qualified_name.
17534         (parser_check_super_interface): Broaden error message.
17535         (do_resolve_class): Check for qualified class name in the current
17536         compilation unit if appropriate.
17537         (process_imports): Check for already defined classes.
17538         (check_pkg_class_access): Got rid of call to
17539         get_access_flags_from_decl.
17540         (java_complete_expand_methods): Call safe_layout_class based on
17541         the current class size.
17542         (make_qualified_primary): Build a WFL qualification on primary if
17543         none exists.
17544         (merge_qualified_name): New function.
17545         (make_qualified_name): Use merge_qualified_name.
17546         (resolve_expression_name): Use safe_lookup_field.
17547         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
17548         (resolve_qualified_expression_name): Likewise. Check on resolved
17549         element accessibility.
17550         (not_accessible_p, class_in_current_package): New functions.
17551         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
17552         (patch_method_invocation_stmt): Merged common pieces. Check
17553         accessibility of invoked method.
17554         (check_for_static_method_reference): Add returned type in error
17555         message.
17556         (invocation_mode): Get rid of bogus check on PRIVATE methods.
17557         (refine_accessible_methods_list): Merged two conditions in test.
17558         (java_complete_class): Sanity check on stabilize_ref gone.
17559         * zextract.c (read_zip_archive): Cast lseek second argument to long.
17561 1998-07-28  Per Bothner  <bothner@cygnus.com>
17563         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
17565 1998-07-24  Tom Tromey  <tromey@cygnus.com>
17567         * gjavah.c (F_NAN): Removed.
17568         (F_NAN_MASK): New macro.
17569         (F_POSITIVE_INFINITY): Removed.
17570         (F_NEGATIVE_INFINITY): Likewise.
17571         (java_float_finite): Rewrote.
17572         (D_NAN_MASK): Renamed.
17573         (java_double_finite): Rewrote.
17574         (D_POSITIVE_INFINITY): Removed.
17575         (D_NEGATIVE_INFINITY): Likewise.
17577         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
17578         If verbose, print underlying representation of value in hex.
17580 1998-07-24  Per Bothner  <bothner@cygnus.com>
17582         * buffer.h, buffer.c:  New files.
17583         * Makefile.in (JAVA_OBJS):  Add buffer.o.
17585         Support locals variables and writing their debug entries to .class.
17586         * jcf-write.c:  Simplify some by user new buffer type.
17587         (vode_buffer_grow):  Removed.
17588         (struct localvar_info):  New type.
17589         (localsvars, localvartable):  New buffers.
17590         (localvar_alloc, localvar_free):  New functions.
17591         (generate_bytecode_insns):  Handle local variables.
17592         (generate_classfile):  Write LocalVariableTable attribute.
17594 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17596         * jcf-io.c (open_in_zip): Check the zipfile magic number.
17597         * zipfile.h (ZIPMAGIC): New macro.
17599 1998-07-24  Tom Tromey  <tromey@cygnus.com>
17601         * Makefile.in (gjavah.o): Updated dependencies.
17602         (jcf-dump.o): Likewise.
17603         (all.indirect): Use ../gjavah.
17604         (../gjavah$(exeext)): Likewise.
17605         (clean): Don't remove gjavah.
17606         (clean): Remove parse.c, not java/parse.c.
17607         * Make-lang.in (java): Added gjavah.
17608         (gjavah$(exeext)): New target.
17609         (GJAVAH_SOURCES): New macro.
17610         (java.all.build): Added gjavah.
17611         (java.all.cross): Likewise.
17612         (java.rest.encap): Likewise.
17613         * config-lang.in (compilers, stagestuff): Added gjavah.
17615 1998-07-23  Tom Tromey  <tromey@cygnus.com>
17617         * gjavah.c (java_float_finite): New function.
17618         (java_double_finite): Likewise.
17619         (F_POSITIVE_INFINITY): New macro.
17620         (F_NEGATIVE_INFINITY): Likewise.
17621         (F_NAN): Likewise.
17622         (D_POSITIVE_INFINITY): Likewise.
17623         (D_NEGATIVE_INFINITY): Likewise.
17624         (D_NAN): Likewise.
17625         (print_field_info): Use java_float_finite and java_double_finite.
17627 1998-07-23  Per Bothner  <bothner@cygnus.com>
17629         * parse.y (method_header):  Name "this" implicit argument.
17631 1998-07-22  Per Bothner  <bothner@cygnus.com>
17633         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
17634         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
17635         (put_linenumber):  New function.
17636         (generate_bytecode_insns, generate_classfile):  Write line numbers.
17638 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17640         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
17641         (lookup_name, build_known_method_ref, build_class_init,
17642         build_invokevirtual, invoke_build_dtable, match_java_method,
17643         build_field_ref, pushdecl_force_head, build_java_binop,
17644         binary_numeric_promotion, build_decl_no_layout,
17645         build_java_arrayaccess, build_newarray, build_anewarray,
17646         build_java_array_length_access, build_java_arraynull_check): New
17647         extern function prototypes.
17648         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17649         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
17650         java-tree.h.
17651         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
17652         to NULL
17653         * jcf.h (jcf_out_of_synch): New extern function prototype.
17654         * parse.h: Static/global function implemented in parse.y
17655         prototyped and declarations moved at the end of the file.
17656         (DECL_P): Check that the argument isn't null.
17657         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
17658         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
17659         (QUAL_DECL_TYPE): New macro.
17660         (PARAMS): Macro definition removed.
17661         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
17662         (return_statement:): Call build_return.
17663         (field_access:): Call make_qualified_primary in sub rule.
17664         (method_invocation:): Build method invocation and call
17665         make_qualified_primary when processing primaries.
17666         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
17667         get_type_from_signature.
17668         (java_check_regular_method): Extra integer 0 argument when calling
17669         lookup_java_method2.
17670         (lookup_java_interface_method2): Extra method DECL argument when
17671         calling lookup_java_interface_method2.
17672         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
17673         COMPOUND_EXPR node.
17674         (java_complete_expand_method): Layout current class iff not
17675         already done. Don't process interface's methods.
17676         (java_complete_expand_method): Use super class only if it
17677         exists. Use current class otherwise.
17678         (make_qualified_primary): New function.
17679         (resolve_expression_name): Process qualified expression or
17680         expression from primary the same way.
17681         (resolve_expression_name): Two last arguments to
17682         resolve_field_access are now NULL_TREEs.
17683         (resolve_field_access): New variable is_static. Local field must
17684         be DECLs. is_static computed on field DECLs only. Append code in
17685         where_found to the field access if necessary. Use QUAL_DECL_TYPE
17686         to initialize field_type.
17687         (resolve_qualified_expression_name): New local variable,
17688         previous_call_static and is_static. Handle primaries with function
17689         calls, casts, array references and `this'. `super' now handled as
17690         `(super_class)this'. Use is_static to clarify boolean expressions.
17691         Added code to handle case where a proper handle is required to
17692         access a field. Use QUAL_DECL_TYPE where applicable.
17693         (maybe_access_field): New function.
17694         (patch_method_invocation_stmt): New arguments primary, where,
17695         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
17696         deleted. Use `where' as a type to search from if specified. Check
17697         for static method reference where forbidden. Append primary or
17698         current_this to the argument list if not calling constructor nor
17699         static methods.
17700         (check_for_static_method_reference): New function.
17701         (patch_invoke): Layout the class on which new is done if
17702         necessary.
17703         (lookup_method_invoke): Changed format to report errors on
17704         methods.
17705         (qualify_ambiguous_name): New local variable this_found. Now
17706         handle things from primaries. Method call are considered
17707         expression names.
17708         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
17709         changed into NULLs.
17710         (not_initialized_as_it_should_p): Comply with the new DECL_P.
17711         (java_complete_tree): New case fo RETURN_EXPR. Process function
17712         call arguments in separate function.
17713         (complete_function_arguments): New function.
17714         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
17715         anymore.
17716         (patch_assignment): Take the return function slot into account as
17717         a RHS. Distinguish assignment from a return.
17718         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
17719         when checking methods in interfaces.
17720         (resolve_type_during_patch): NULL argument to unresolve_type_p
17721         instead of NULL_TREE.
17722         (patch_newarray): Fixed typo in comment.
17723         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
17724         (build_return, patch_return): New functions.
17725         * typeck.c (lookup_java_constructor): Fixed typo in comment.
17727 1998-07-21  Per Bothner  <bothner@cygnus.com>
17729         * constants.c (find_name_and_type_constant, find_fieldref_index,
17730         find_methodref_index):  New methods.
17731         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
17732         just return given method.  Also, rename to build_known_method_ref.
17733         (expand_invoke):  Rename call to build_invoke_non_interface.
17734         * java-tree.h, parse.h:  Update prototype.
17735         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
17736         (such as expand_expr_stmt) if flag_emit_class_files.
17737         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
17738         STACK_TARGET, IGNORE_TARGET):  New macros.
17739         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
17740         (generate_bytecode_insn):  New function to generate method's bytecode.
17741         (generate_classfile):  Node generate Code attribute for a method.
17742         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
17743         push_long_const, field_op, adjust_typed_op, maybe_wide):
17744         New functions used by generate_bytecode_insn.
17746         * typeck.c (signature_include_return):  Remove variable.
17747         (push_java_argument_signature, build_java_argument_signature):  New.
17748         (build_java_signature):  Use push_java_argument_signature.
17749         * parse.y:  Use build_java_argument_signature instead of fiddling
17750         with signature_include_return.
17752 1998-07-17  Tom Tromey  <tromey@cygnus.com>
17754         * gjavah.c (print_c_decl): Always generate JArray<>* for array
17755         types.
17757         * Makefile.in (all.indirect): Added gjavah$(exeext).
17758         (gjavah$(exeext)): Added $(exeext).
17759         (clean): Likewise.
17761 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17763         * class.c (layout_class): Call to java_layout_parsed_class replace
17764         by safe_layout_class.
17765         * expr.c (build_java_array_length_access): Removed static storage
17766         class in the function definition.
17767         (build_java_arraynull_check): Likewise.
17768         Also fixed typos in two comments.
17769         * lex.c (java_init_lex): Initialize static global kw_length.
17770         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
17771         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
17772         java_lex_error.
17773         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
17774         * parse.h (resolve_no_layout): New static function declaration.
17775         (get_identifier_in_static): Declaration removed.
17776         (java_layout_parsed_class): Function name declaration changed to
17777         safe_layout_class.
17778         (build_newarray_node, patch_newarray, resolve_type_during_patch,
17779         not_initialized_as_it_should_p, build_this): New static function
17780         declarations.
17781         (pushdecl_force_head, build_java_binop, int_fits_type_p,
17782         binary_numeric_promotion, stabilize_reference,
17783         build_decl_no_layout, build_java_arrayaccess): Extern function
17784         declarations moved into their own section.
17785         (build_newarray, build_anewarray, build_java_array_length_access,
17786         build_java_arraynull_check): New extern function declarations.
17787         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
17788         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
17789         fake tree codes.
17790         (CALL_CONSTRUCTOR_P): New macro.
17791         * parse.y (kw_length): New static global tree node.
17792         (return_statement): Tagged <node>.
17793         (RETURN_TK): Tagged <operator>.
17794         (variable_declarator_id:): Build variable declaration with an
17795         empty initialization value if a syntax error was found in the
17796         initialization part of the variable declaration.
17797         (statement_without_trailing_substatement:): return_statement: now
17798         uses the default rule.
17799         (return_statement:): Temporarily fixed to return NULL_TREE.
17800         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
17801         (class_instance_creation_expression:): Class creation rules now
17802         call build_method_invocation upon reduction.
17803         (array_creation_expression:): Rules call build_newarray_node upon
17804         reduction.
17805         (dim_exprs:): Build a list of dimension expressions.
17806         (dim_expr:): Store location of the OSB_TK in the dimension
17807         expression node.
17808         (method_invocation:): Added a new error rule.
17809         (build_unresolved_array_type): WFL argument may also be an array
17810         on a primitive type. Name of the argument changed to reflect this.
17811         (method_declarator): Insert argument type at the beginning of the
17812         argument type list and later reverse the list.
17813         (unresolved_type_p): Argument 'returned' may be optionally
17814         NULL_TREE.
17815         (java_layout_class_from_source): Function renamed
17816         safe_layout_class.
17817         (resolve_and_layout): Now call resolve_no_layout and
17818         safe_layout_class.
17819         (resolve_no_layout): New function.
17820         (purify_type_name): New function.
17821         (complete_class_report_errors): Call purify_type_name during error
17822         report on a type not found.
17823         (process_imports): error_found local variable doesn't need to be
17824         initialized to zero.
17825         (declare_local_variables): New local type_wfl. Fixed typo in error
17826         message. type_wfl assigned to unresolved type and used to register
17827         incomplete type. Build a WFL around the variable initialization
17828         statement so that debug info can be generated on it.
17829         (source_start_java_method): Reverse argument list after they've
17830         been processed.
17831         (current_this): New static global variable.
17832         (java_complete_expand_methods): Set current_this when appropriate.
17833         (resolve_expression_name): Build correct static and non static
17834         field access bearing a simple name.
17835         (resolve_field_access): Resolve the length field of arrays. Handle
17836         f.m() cases.
17837         (patch_method_invocation_stmt): Set the type of the method
17838         invocation to error_mark_node. This value is later overridden by a
17839         valid type, if any. Don't handle qualified constructor invocation
17840         as qualified method invocation. Call lookup_method_invoke with its
17841         new flag. It's no longer necessary to access the selected method
17842         as the value of a tree list. Handle constructor invocation.
17843         (patch_invoke): Reverse argument list when invoking non interface
17844         methods. Insert call to new as the first argument of the
17845         constructor.
17846         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
17847         defined within a final class. Return INVOKE_STATIC if the invoked
17848         method is a constructor.
17849         (lookup_method_invoke): New lc argument is a flag to indicate a
17850         constructor lookup. Now handle constructor lookup. Choose the most
17851         specific method in case several were matching the invocation
17852         requirements. Return a method decl instead of a tree list featuring
17853         one single method decl element.
17854         (refine_accessible_methods_list): New lc flag argument to
17855         indicate that a constructor is being looked up.
17856         (not_initialized_as_it_should_p): New function.
17857         (java_complete_tree): Now process fake tree codes
17858         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
17859         save_expr on resolved function call arguments. Case on
17860         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
17861         (patch_assignment): LHS can be a field access expression. When
17862         dealing with reference, lhs_type is the promoted type of the
17863         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
17864         applicable.
17865         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17866         (patch_binop): Use not_initialized_as_it_should_p where
17867         applicable.
17868         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
17869         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
17870         where applicable.
17871         (resolve_type_during_patch): New function.
17872         (patch_cast): Call resolve_type_during_patch to resolve type and
17873         report error accordingly.
17874         (patch_array_ref): Use not_initialized_as_it_should_p where
17875         applicable. Array base expression is saved before being
17876         used. Promote the type of an array elements if it contains non
17877         builtin types.
17878         (build_newarray_node, patch_newarray, build_this): New functions.
17880 1998-07-16  Tom Tromey  <tromey@cygnus.com>
17882         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
17883         increment it in `for' statement.
17884         (print_field_info): If number is inf or nan, don't print it.
17885         (print_method_info): If method name is `delete', just ignore it.
17886         (print_c_decl): Special-case jstringArray.
17888         * gjavah.c (help): New function.
17889         (no_argument): New function.
17890         (usage): Changed text.
17891         (main): Rewrote argument handling.  Now handles -v, --help,
17892         --version.
17893         (version): New function.
17894         (found_error): New global.
17895         (main): Return found_error.
17896         (generate_access): Set found_error.
17897         (print_c_decl): Likewise.
17899 1998-07-15  Tom Tromey  <tromey@cygnus.com>
17901         * gjavah.c (print_c_decl): Don't print "," when examining field.
17902         Skip type name when looking at "[L" types.
17903         (process_file): Now static.
17904         (generate_access): Now returns int.
17905         (last_access_generated): New global.
17906         (process_file): Clear last_access_generated; make multiple passes
17907         over the class.
17908         (print_field_info): Just return if generate_access returns true.
17909         (print_method_info): Likewise.  Also, allow <init> functions to
17910         pass through.
17911         (print_c_decl): Added is_init argument.  Print constructors
17912         properly.
17913         (print_cxx_classname): Use UTF8_GET to extract characters from
17914         string.
17915         (print_base_classname): New function.
17916         (print_class_decls): New function.
17917         (process_file): Use it.
17918         (utf8_cmp): New function.
17920 1998-07-13  Nick Clifton  <nickc@cygnus.com>
17922         * lang-options.h: Format changed to match changes in gcc/toplev.c
17923         to implement a --help option.
17925 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
17927         * decl.c (init_decl_processing): Revert change to dtable_type.
17929 1998-07-09  Per Bothner  <bothner@cygnus.com>
17931         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
17933 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
17935         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
17937         * lang.c (lang_init): Default flag_exceptions to 1, without
17938         checking to see if it's 2 first.
17940 1998-07-08  Jeffrey A Law  (law@cygnus.com)
17942         * constants.c: Include "system.h".
17943         * decl.c: Likewise.
17944         * lang.c (flag_new_exceptions): Get via extern now.
17945         (lang_init_options): New functions.  Turn on flag_new_exceptions.
17947 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17949         * lex.c (java_lex): Return 0 when we see an invalid character in
17950         the input.
17952         * lex.c (java_read_char): Specify extra argument when calling
17953         java_lex_error.
17954         (java_read_unicode, java_parse_end_comment,
17955         java_parse_escape_sequence): Likewise,
17956         (java_lex): Specify extra argument when calling
17957         java_lex_error. Test that IDs are beginning with a legal character
17958         for IDs. Handle invalid characters with an error message and a
17959         call to java_lex_error.
17960         (java_lex_error): Adjust column position by new argument
17961         `forward'. Issue an error even if in the middle of reporting an
17962         other error.
17964 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
17966         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
17967         we don't explicitly put a null pointer when we're copying it.
17969 1998-07-07  Tom Tromey  <tromey@cygnus.com>
17971         * gjavah.c (print_cxx_classname): New function.
17972         (super_class_name): Likewise.
17973         (print_super_fields): Removed.
17974         (in_super): Removed.
17975         (print_field_info): Never generate #defines.
17976         (print_c_decl): Changed generated types to match JNI.  No longer
17977         print class name before method name.
17978         (print_method_info): Print "static" before static methods.
17979         Print "virtual" before non-final methods.
17980         (usage): Use exit(1), not exit(-1).
17981         (main): Likewise.
17982         (print_field_info): Use %.17g to print a double.
17983         (last_access): New globals.
17984         (process_file): Initialize last_access.
17985         (usage): Now static.
17986         (ACC_VISIBILITY): New define.
17987         (generate_access): New function.
17988         (print_field_info): Call it.
17989         (print_method_info): Likewise.  Also, generate information for all
17990         methods, not just native methods.  Return void.
17991         (print_c_decl): Return void.
17992         (print_field_info): Return void.
17994 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17996         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
17997         processing the jc1 grammar file. Prefix bison functions and
17998         variables with java_.
17999         (parse.c): Dependencies on parse.h and lex.h
18000         * expr.c (build_java_arrayaccess): Function now global.
18001         * java-tree.h: Comment reorganized to carry on previous
18002         classification effort.
18003         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
18004         RESOLVE_TYPE_NAME_P): New flags on WFLs.
18005         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
18006         java_parse (new prefix java_ generated by bison).
18007         (java_layout_parsed_class, java_register_parsed_class): Function
18008         call removed.
18009         (yyparse): Removed unnecessary call to init_outgoing_cpool.
18010         * lex.c (static tree wfl_op): Variable deleted.
18011         (java_init_lex): Initialize kw_super and kw_this. Initialize more
18012         ctxp fields to NULL_TREE.
18013         (java_lex): No longer create WFL for operators. Filename caching
18014         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
18015         created as STRING_CST and later expanded. Removed extra argument
18016         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
18017         and SUPER.
18018         (build_wfl_node): Removed code in comments.
18019         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
18020         store token and location data in the current bison token.
18021         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
18022         static/extern function declaration at the beginning of the file.
18023         (struct qualification): Data structure definition deleted.
18024         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
18025         (qualify_ambiguous_name): Function declaration modified. Function
18026         now returns nothing.
18027         (build_array_ref, patch_array_ref, make_qualified_name,
18028         resolve_qualified_expression_name, maybe_generate_clinit,
18029         resolve_field_access): New static function declarations.
18030         (build_java_arrayaccess): New extern function declaration.
18031         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
18032         (CALL_EXPR_PRIMARY): Macro deleted.
18033         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
18034         (struct parser_ctxt): Field initialized_final
18035         removed. non_static_initialized, static_initialized: New fields.
18036         * parse.y (static tree kw_super, static tree kw_this): New global
18037         static.
18038         (%union): tree wfl field of operator member replaced by int
18039         location. WFLs are non longer created for operators.
18040         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
18041         (qualified_name:): Now calls make_qualified_name to build the
18042         identifier.
18043         (type_declaration:): Consider generating <clinit> when class
18044         parsing completed.
18045         (variable_declarator:): Directly build an assignment node when the
18046         variable is initialized when declared.
18047         (this_or_super:): Build a WFL and set current location when THIS
18048         or SUPER are parsed.
18049         (expression_statement:): Wrap statement around a WFL.
18050         (primary_no_new_array:): Fixed typo. Changed value returned by
18051         THIS_TK because of its new type (temporary).
18052         (dim_exprs:): Temporary fix because of OSB_TK's new type.
18053         (field_access:): Build qualified name with SUPER.
18054         (method_invocation:): Fixed returned value because of SUPER's new
18055         type.
18056         (array_access:): Use OSB_TK location information.
18057         (post_increment_expression:, post_decrement_expression:,
18058         unary_expression:, pre_increment_expression:,
18059         pre_decrement_expression:, unary_expression_not_plus_minus:,
18060         cast_expression:, multiplicative_expression:,
18061         additive_expression:, shift_expression:, relational_expression:,
18062         equality_expression:, and_expression:, exclusive_or_expression:,
18063         inclusive_or_expression:, conditional_and_expression:,
18064         conditional_or_expression:, assignment:): Use new location/token
18065         information available on operators.
18066         (create_class): Set super_decl_type to NULL_TREE when processing
18067         java.lang.Object.
18068         (register_fields): Field initialization is now a MODIFY_EXPR
18069         node. Chain initialization code to the matching lists (according
18070         to the field declaration modifiers).
18071         (maybe_generate_clinit): New function.
18072         (method_header): Don't set method's DECL_NAME to a WFL when adding
18073         methods to java.lang.Object.
18074         (resolve_and_layout): Now can return NULL_TREE if the type
18075         resolution fails. Otherwise, return the class DECL instead of its
18076         TYPE.
18077         (check_method_redefinition): Don't patch method DECL_NAME if it
18078         belongs to java.lang.Object.
18079         (process_imports): Simply assign error_found to the value returned
18080         by check_pkg_class_access.
18081         (declare_local_variables): Don't use their init statements (if
18082         any) when parsing error were previously found. Reuse MODIFY_EXPR
18083         build during parsing as an init statement.
18084         (java_method_add_stmt): Now return the current method body.
18085         (java_layout_parsed_class, java_register_parsed_class): Functions
18086         removed.
18087         (java_complete_expand_methods): Initialize the constant pool on a
18088         per class basis. Layout the classes before expanding their method
18089         bodies. Don't try expand artificial constructor code if error were
18090         found. Make the classes data and register them if no error were
18091         found.
18092         (java_complete_expand_method): Retrieve an artificial constructor
18093         argument list before entering its body. Assign the top block to
18094         the artificial constructor function body and set types of declared
18095         blocks and compound statements to void. Walk method body if not an
18096         artificial constructor.
18097         (make_qualified_name, cut_identifier_in_qualified): New functions.
18098         (resolve_expression_name): Fixed comments. Save/restore the
18099         current class CLASS_LOADED_P flag value. Build non qualified
18100         static field access and handle qualified expression names.
18101         (resolve_field_access, resolve_qualified_expression_name): New
18102         functions.
18103         (patch_method_invocation_stmt): Use the new expression resolution
18104         scheme, calling resolve_field_access when the function call is
18105         resolved as an expression.
18106         (qualify_ambiguous_name): Function rewritten to work on qualified
18107         expression produced by make_qualified_name.
18108         (java_complete_tree): Promote type when function's argument are
18109         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
18110         the assignment to discover further errors if RHS is a expression
18111         name that fails to evaluate. Declare LHS initialized even though
18112         the assignment failed. Don't use the location variable and removed
18113         extra argument in patch function calls. Now handle the ARRAY_REF
18114         case and build internal string representation when STRING_CSTs are
18115         walked.
18116         (build_method_invocation): Don't wrap function call around a WFL.
18117         (build_assignment): Likewise. Use the operator location
18118         information.
18119         (patch_assignment): Handle array access LHSs. Handle error
18120         provenance, resulting in a better error report.
18121         (build_binop): Use op_location from operator as binop location
18122         information.
18123         (build_unaryop, build_incdec, build_cast): Likewise.
18124         (patch_binop): Extract location information from the node. Fixed
18125         typo in error message.
18126         (patch_unary_op): Extract location information from the node.
18127         (build_array_ref, patch_array_ref): New functions.
18129 1998-07-01  Tom Tromey  <tromey@cygnus.com>
18131         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
18132         match _Jv_IsInstanceOf.
18133         * decl.c (init_decl_processing): Use _Jv_NewArray, not
18134         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
18136 1998-06-30  Tom Tromey  <tromey@cygnus.com>
18138         * decl.c (init_decl_processing): Functions are now named
18139         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
18141 1998-06-29  Per Bothner  <bothner@cygnus.com>
18143         * java-tree.h (load_class):  Add prototype.
18144         * class.c (is_compiled_class):  Add missing arg to load_class.
18145         * expr.c (expand_java_NEW):  Call load_class.
18146         * parse.y (process_import):  Removed bogus use of void return value.
18148 1998-06-25  Per Bothner  <bothner@cygnus.com>
18150         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
18151         Function name is "_Jv_Throw" instead of "soft_athrow".
18152         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
18153         Function name is "_Jv_AllocObject" instead of "soft_new".
18154         Takes an extra parameter (object size).
18155         * expr.c:  Update calls.
18157 1998-06-24  Per Bothner  <bothner@cygnus.com>
18159         * lex.c (java_get_line_col):  Handle end-of-file.
18160         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
18162 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
18164         * lang.c (lang_init): Make -fexceptions the default.
18165         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
18166         exception handling is not turned on.
18168 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
18170         * lang.c (flag_new_exceptions): Make this this default.
18171         * decl.c (end_java_method): Call emit_handlers.
18172         * except.c (method_init_exceptions): Set language code and version.
18173         (expand_start_java_handler): Enable exception, and call
18174         expand_eh_region_start.
18175         (expand_end_java_handler): Enable exception, and set up catch blocks.
18176         (emit_handlers): New routine to generate the saved handlers.
18177         * java-except.h (emit_handlers): Add prototype.
18179 1998-06-12  Per Bothner  <bothner@cygnus.com>
18181         We used to have three different representations of the constant pool:
18182         the CPool structure, the tree_constant_pool, and the constructures
18183         used to build the Class object (which may need class and string
18184         constants) in compiled code.  None were appropriate for compiling
18185         to .class files, so I did a major overhaul.
18187         First, the tree_constant_pool array was removed.  Things were
18188         modified to the CPool structure in the JCF could be used.
18189         Second, a "capacity" field was added to the CPool, and functions
18190         written to search for a matching constant, adding one if not found.
18191         The code that generated the Class object was changed to use a CPool.
18192         The actual TREE_LISTs used to build the CONSTRUCTORs used for
18193         the static Class object are now only in build_constants_constructor.
18194         Finally, I wrote code which can generate a .class file (including its
18195         constant pool) from the RECORD_TYPE of a class.  This is a big step
18196         on the way to compiling Java source into .class files.
18198         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
18199         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
18201         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
18202         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
18203         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
18204         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
18205         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
18206         (lang_type):  Removed constant_pool field.
18207         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
18208         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
18209         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
18210         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
18212         * constants.c (current_constant_pool_tags, current_constant_pool_data,
18213         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
18214         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
18215         (set_constant_entry, find_constant1, find_constant2,
18216         find_class_constant, count_constant_pool_bytes, write_constant_pool,
18217         find_utf8_constant, find_class_or_string_constant):  New functions.
18219         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
18220         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
18221         (give_name_to_class, get_class_constant):  Likewise.
18222         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
18223         (get_name_and_type_constant, get_ref_constant):  Removed.
18224         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
18225         * parse.y:  Don't save/restore tree_constant_pool.
18226         * verify.c (verify_jvm_instructions):  Update for new approach.
18227         * expr.c (expand_invoke, expand_java_field_op): Likewise.
18229         * lang-options.h:  Added -femit-class-file, -femit-class-files.
18230         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
18231         (lang_f_options):  Added "emit-class-file(s)".
18233         * expr.c (build_java_arrayaccess):  Generate more efficient array
18234         bounds checking, by using unsigned compare.
18236         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
18238 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18240         * parse.h: New comment on the handling of unresolved type
18241         identifiers. JDEPs are now part of the jdep_code enum.
18242         (typedef struct jdep): Now use enum jdep_code or int, depending on
18243         availability. Both are narrowed down to an 8 bits bitfield.
18244         (CALL_EXPR_PRIMARY): Fixed comment.
18246 1998-06-10  Tom Tromey  <tromey@cygnus.com>
18248         * Make-lang.in (java): Added gjavac and jvgenmain.
18249         (java.start.encap): Depend on gjavac.
18250         (java.rest.encap): Depend on jvgenmain.
18252         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
18253         (JAVA_CROSS_NAME): Likewise.
18254         (java.all.build): Depend on jvgenmain and gjavac.
18255         (java.all.cross): Depend on jvgenmain and gjavac-cross.
18256         (jvgenmain$(exeext)): New target.
18257         (java.install-common): Wrote.
18258         * config-lang.in (compilers, stagestuff): Added gjavac and
18259         jvgenmain.
18261 1998-06-10  Dave Brolley  <brolley@cygnus.com>
18263         * lang.c (lang_decode_option): New argc/argv interface.
18265 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18267         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
18268         * decl.c (build_decl_no_layout): New function.
18269         * expr.c (java_lang_expand_expr): Layout declarations found in
18270         blocks before they're pushed.
18271         * jcf-parse.c (load_class): Save current line when parsing class
18272         file.
18273         (parse_source_file): Register class before expanding their
18274         methods.
18275         * lang.c (put_decl_node): Produce `null' when `void *' is
18276         processed.
18277         * lex.c (static tree wfl_op): New static global, for error report
18278         on casts.
18279         (java_init_lex): wfl_operator and wfl_op initialized
18280         here. Filename caching added for wfl_op. Return wfl_op when `(' is
18281         parsed.
18282         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
18283         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
18284         build_unresolved_array_type): New static function definitions.
18285         (build_decl_no_layout): New extern function declared.
18286         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
18287         faulty modifier exists.
18288         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
18289         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
18290         (UNARY_PLUS_EXPR): New fake operator.
18291         (struct parser_ctxt): New field osb_number.
18292         * parse.y (static tree wfl_operator): New static WFL for operator
18293         bound error messages.
18294         (DECR_TK, INCR_TK): Moved.
18295         (OP_TK): Tagged <operator>.
18296         (array_type:): Now call build_unresolved_array_type.
18297         (dim_expr:): Count the number of '[' seen.
18298         (post_increment_expression, post_decrement_expression,
18299         pre_increment_expression, pre_decrement_expression,
18300         unary_expression_not_plus_minus, unary_expression:): Actions are
18301         now building the corresponding unary expressions.
18302         (cast_expression:): Actions are now building cast expressions.
18303         (build_unresolved_array_type): New function.
18304         (create_interface): Reset the number of declared interfaces.
18305         (create_class): Likewise.
18306         (method_header): Methods declared within the scope of an interface
18307         are now implicitly set public and abstract.
18308         (java_complete_class): Variable's and parameter's type are patched
18309         with a promoted type.
18310         (declare_local_variables): Resolved non builtin types are promoted
18311         before being used to build a variable decl. Removed type patch
18312         posted on variable initialization statement.
18313         (source_start_java_method): Use build_decl_no_layout to build the
18314         decl of a parameter of incomplete type.
18315         (java_register_parsed_class): Process interfaces too. Call
18316         rest_of_decl_compilation on each processed class declarations.
18317         (java_complete_expand_methods): Don't attempt to expand things in
18318         interfaces.
18319         (java_complete_tree): Process CONVERT_EXPR, even though it always
18320         has a type. Propagate error_mark_node to node's type too. Promote
18321         method's call argument type and return error_mark_node if
18322         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
18323         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
18324         handle unary operator nodes.
18325         (build_assignment): Added comment.
18326         (print_int_node): New function.
18327         (patch_assignment): New second argument. New error handling. Use
18328         print_int_node. Handle references. Use can_cast_to_p to issue
18329         different error message according to the context and check upon
18330         the initialization of the RHS.
18331         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
18332         (operator_string): Handle more operators.
18333         (patch_binop): No longer use a function static
18334         wfl_operator. Improved error message on shift distance.
18335         (build_unaryop, build_incdec, build_cast, patch_unaryop,
18336         patch_cast): New functions.
18338 1998-06-05  Per Bothner  <bothner@cygnus.com>
18340         * jvspec.c:  New file.
18341         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
18343         * java-tree.h (identifier_subst):  Add declaration.
18345 1998-06-04  Tom Tromey  <tromey@cygnus.com>
18347         * jvgenmain.c (main): Generate call to JvRunMain.
18349         * class.c (make_class_data): Push value for "sync_info" field.
18350         * decl.c (init_decl_processing): Push "sync_info" field.
18352 1998-06-03  Per Bothner  <bothner@cygnus.com>
18354         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
18355         Java (source) name, not signature.
18356         Set TYPE_ALIGN to (at least) that of element_type.
18358 1998-06-02  Per Bothner  <bothner@cygnus.com>
18360         * class.c:  Moved classname-mangling-rekated code to ...
18361         * mangle.c:  ... this new file.
18362         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
18363         * Makefile.in:  Update for above changes.
18365 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18367         * expr.c (truthvalue_conversion): Convert integer and floating
18368         point value to their truth value.
18369         * lex.c (java_lex): Handle the `null' literal.
18370         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
18371         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
18372         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
18373         New macros.
18375         * parse.y: Reorganization/documentation on token declaration.
18376         (binop_lookup[]): New added new tree codes.
18377         (relational_expression): Build corresponding binary operators.
18378         (equality_expression, conditional_and_expression,
18379         conditional_or_expression): Likewise.
18380         (java_complete_class): Fix crash in debug message.
18381         (java_complete_tree): Check initialization of method call
18382         arguments. Further bogus node evaluation to detect more error
18383         during assignments. Handles more binary operators.
18384         (patch_assignment): Use DECL_P.
18385         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
18386         code.
18387         (operator_string): Handle more case. Compacted source.
18388         (patch_binop): Changed function comment. Checking for
18389         uninitialized first operand takes the compound assignment into
18390         account and uses DECL_P. Checking for uninitialized second operand
18391         delayed to routine's end. Use macros to issue type bound error
18392         messages and issue messages on both operands if their types are
18393         different. Force fixed type into node. Handle all binary
18394         operators.
18396 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18398         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
18399         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
18400         build operator node and return tokens.
18401         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
18402         * parse.h (java_complete_tree): Changed returned type in prototype.
18403         (build_method_invocation, build_assignment, patch_assignment,
18404         patch_binop): New static function declarations.
18405         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
18406         BUILD_EXPR_WFL): New macros.
18407         * parse.y (enum tree_code binop_lookup[]): New static for token to
18408         TREE_CODE lookup.
18409         (%union): Parser union has new sub-structure `operator'.
18410         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
18411         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
18412         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
18413         ASSIGN_ANY_TK): Tokens tagged `operator'.
18414         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
18415         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
18416         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
18417         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
18418         (assignment_operator:): Rule tagged `operator'.
18419         (expression_statement:): Re-installed default rule.
18420         (method_invocation:): Sub rules call build_method_invocation.
18421         (postfix_expression:): Don't attempt to resolve name here. Just
18422         return an ID.
18423         (multiplicative_expression:): Sub-rules build corresponding binop
18424         expression node.
18425         (additive_expression:, shift_expression:, and_expression:,
18426         exclusive_or_expression:, inclusive_or_expression:): Likewise.
18427         (assignment:): Sub rule invoke build_assignment.
18428         (assignment_operator:): Default rules on sub rules.
18429         (force_error): Added documentation on this variable.
18430         (declare_local_variables): Build initialization calling
18431         build_assignment.
18432         (expand_start_java_method): Removed unused rtx declaration. Mark
18433         arguments as already initialized.
18434         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
18435         (java_complete_expand_methods): Don't process next method if
18436         completion of the previous one triggered errors.
18437         (java_complete_expand_method): Call source_end_java_method if no
18438         error were found during completion.
18439         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
18440         locals declaratilon. Handle names found within a class. Return
18441         error_mark_node when things aren't found.
18442         (patch_method_invocation_stmt): Return error_mark_node on failures.
18443         (patch_invoke): Removed unused local. Return the correct node.
18444         (java_complete_tree): Now returns a value. The BLOCK section binds
18445         local identifiers and the type of a BLOCK is now void. Assign the
18446         result of operand completion on COMPOUND_EXPR. Assign the
18447         encapsulated node of a WFL to the result of its completion, except
18448         when the node is an identifier. Now handle MODIFY_EXPR and several
18449         binary operators. Return error_mark_node on errors.
18450         (build_method_invocation, build_assignment, patch_assignment,
18451         build_binop, operator_string, patch_binop): New functions.
18452         * typeck.c (binary_numeric_promotion): New function.
18454 1998-05-21  Per Bothner  <bothner@cygnus.com>
18456         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
18457         Replace most uses of ident_subst by identifier_subst.
18459         * class.c (push_class_static_dummy_field):  Removed function.
18460         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
18461         instead of looking got "class" static field.  Create that decl here.
18462         (class_identifier_node):  Removed;  no longer needed.
18463         (init_class_processing):  Don't init class_identifier_node.
18464         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
18465         Do nreverse 0 times (instead of twice) for Object and Class.
18466         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
18468 1998-05-20  Per Bothner  <bothner@cygnus.com>
18470         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
18471         while initializing linenumber_count and linenumber_table.
18472         Do it before init_function_start (which calls emit_line_note).
18473         * expr.c (expand_byte_code):  Don't need to clear lineno here.
18475 1998-05-18  Tom Tromey  <tromey@cygnus.com>
18477         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
18478         then mangle number as _N_.
18480         * class.c (mangle_class_field): New function.
18481         (build_class_ref): Set assembler name of class reference using
18482         mangle_class_field.
18483         (push_class_static_dummy_field): Likewise.
18485 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
18487         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
18488         of assigning to TREE_CODE.  The latter method exploits a feature
18489         of GCC that is not ANSI compliant.
18491 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18493         * decl.c (pushdecl_force_head): New function.
18494         (pushlevel): Removed conditional printf.
18495         (complete_start_java_method): Don't enter local variable scope if
18496         function is compiled from source code.
18497         * expr.c: parse.h now included
18498         (java_lang_expand_expr): New function.
18499         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
18500         printf. Terminate buffer when doing directories.
18501         * jcf-parse.c (parse_source_file): Call lang_init_source before
18502         parsing and before code generation.
18503         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
18504         use printf if the macro is defined.
18505         * lang.c (lang_init): Install lang_expand_expr hook on
18506         java_lang_expand_expr.
18507         (java_dummy_print): New function.
18508         (lang_init_source): New function.
18509         * lex.c (java_lex): Remember location of an opening brace at the
18510         second nesting level.
18511         (java_is_eol): Unget character seen after a CR if it is EOF.
18512         * parse.h: Now includes lex.h
18513         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
18514         printf if the macro is defined.
18515         (expand_start_java_method, build_expr_block, enter_block,
18516         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
18517         New static function declarations.
18518         (pushdecl_force_head): New extern function declaration.
18519         (INCOMPLETE_TYPE_P): New macro.
18520         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
18521         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
18522         BLOCK_EXPR_ORIGIN): New macros.
18523         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
18524         DECL_SOURCE_LINE_LAST): New macros.
18525         (struct parser_ctxt): Removed field current_method_decl, redundant
18526         with the field current_function_decl. Added fields
18527         first_ccb_indent1 and pending_block.
18528         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
18529         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
18530         tagged <node>
18531         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
18532         (compilation_unit:): Cosmetic on sub rule.
18533         (type_declaration:): Cosmetic on sub rules. Added an error rule.
18534         (variable_initializer:): Installed default rule on expression:.
18535         (method_declaration:): method_header: starts a new
18536         method. method_body: installs the function body, absorbs blocks
18537         emitted for temporary variable scopings, pops function's body block
18538         and merges function's last statement lineno in DECL_SOURCE_LINE.
18539         (method_body:): Installed default rules.
18540         (block:): Call enter_block when an opening brace is seen.  Absorb
18541         scoping blocks and call exit_block when a closing brace is seen.
18542         (block_statement:): Cosmetic changes.
18543         (method_invocation:): Create WFL around CALL_EXPR node.
18544         (patch_stage): Added comment around definition.
18545         (method_header): Try to use first_ccb_indent1 as the first line of
18546         the method, so BP debug info are emitted at the first opening
18547         brace of the function. If the function has no body, use the
18548         location of the function's name. Override currently defined method
18549         name with the matching WFL so we can point redefinition errors
18550         using the location where the function's name was declared.
18551         (check_abstract_method_header): Interprets DECL_NAME as an
18552         identifier or as a WFL, accordingly.
18553         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
18554         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
18555         location and name information out of it and reinstall DECL_NAME to
18556         its original identifier node value.
18557         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
18558         function's source code).
18559         (read_import_dir): Test the value returned by find_class and issue
18560         a fatal accordingly.
18561         (declare_local_variables): Push a new block for the scope of the
18562         new variable(s) if code has been already generated at that nesting
18563         level. Pinpoint redefinition errors using the variable id
18564         WFLs. Generate initialization code if necessary. If the variable
18565         type is incomplete, register a patch on its decl.
18566         (source_start_java_method): Rewritten. Define a new block for the
18567         function's parameters. Build parameter decl out of function's
18568         arguments and register them for a patch if their types are
18569         incomplete.
18570         (expand_start_java_method): Includes the part of
18571         source_start_java_method that was pushing the parameter decls and
18572         completing the method start code.
18573         (source_end_java_method): Removed call the expand_end_bindings and
18574         poplevel (already taken care of). Reinstall function's arguments
18575         and get function's last line of code before calling
18576         expand_function_end.
18577         (java_method_add_stmt): New comment before the function's
18578         code. Complement the second operand of the current COMPOUND_EXPR
18579         if necessary.
18580         (java_complete_expand_methods): Don't generate debug info on line
18581         zero when expanding a generated constructor.
18582         (java_complete_expand_method): Set start and end line numbers for
18583         a artificially generated constructor to one and manually call
18584         enter_block and exit_block when defining it. For all methods:
18585         expand function's start calling the new expand_start_java_method
18586         and invoke java_complete_tree on the effective method's body, if
18587         any.
18588         (resolve_expression_name): Now use lookup_name_in_blocks to search
18589         local variable decls and print out an error when variables are
18590         undefined.
18591         (patch_method_invocation_stmt): Inserted comment before the
18592         function's code.
18593         (lookup_method_invoke): Chain method's arguments using chainon
18594         with the current arg list as a second argument. Inserted missing
18595         IDENTIFIER_POINTER when reporting an error on methods not found.
18596         (refine_accessible_methods_list): Don't retain constructors.
18597         (patch_arguments): Function removed.
18598         (java_complete_tree): Inserted comment before the function's
18599         code. New case for BLOCKs. Moved the WFL case a bit
18600         further. Complete function's arguments.
18601         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
18602         maybe_absorb_scoping_blocks): New functions.
18604 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18606         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
18607         previously set.
18608         * jcf-parse.c (parse_source_file, java_error_count): New forward
18609         and extern declarations.
18610         (java_parse_abort_on_error): Macro moved.
18611         (jcf_parse_source): fatal called if fopen fails. Now calls
18612         parse_source_file.
18613         (parse_source_file): New parse_only parameter. Reflects the
18614         elimination of the second pass.
18615         (yyparse): parse_source_file called with argument set to 0.
18616         * jcf.h (JCF_ZERO): Sets java_source to zero.
18617         * lex.c (java_init_lex): pass argument is gone. Function modified
18618         to be called once during the analysis of a file.
18619         (java_unget_unicode): Fixed typo in fatal message.
18620         (java_get_line_col): Likewise.
18621         (java_lval): Likewise. String literals no longer built during
18622         second pass.
18623         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
18624         account.
18625         * parse.h (MODIFIER_WFL): New macro.
18626         (parse_check_super, parser_check_super_interface): Now return int.
18627         (parser_chain_incomplete_item, not_builtin_p,
18628         complete_method_decl): Declarations removed.
18629         (build_method_invocation_stmt, build_invoke): Renamed using the
18630         `patch' instead of `build'
18631         (register-incomplete_type, obtain_incomplete_type,
18632         java_complete_tree, java_complete_expand_method,
18633         unresolved_type_p, create_jdep_list): New function declarations.
18634         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
18635         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
18636         (jdep): New typedef on new struct _jdep.
18637         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
18638         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
18639         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
18640         JDEP_RESOLVED_P): New macros.
18641         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
18642         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
18643         JDEP_VARIABLE): New enum values and jdep kinds.
18644         (jdeplist): New typedef on struct _jdeplist.
18645         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
18646         macros.
18647         (CALL_EXPR_PRIMARY): New macro.
18648         (struct parser_ctxt): Fields java_pass, current_method_decl,
18649         method_decl_list deleted. New field jdeplist.
18650         (INCOMPLETE_P): Macro deleted.
18651         * parse.y (single_type_import_declaration:): Removed pass switch.
18652         (type_import_on_demand_declaration): Likewise.
18653         (field_declaration:): Removed pass switch on all sub rules.
18654         (class_declaration:): Call the complete_class_decl removed on
18655         class_body rules.
18656         (method_declaration:): Removed second pass switch. No longer chain
18657         methods decl when method_header reduced.
18658         (method_header:): Sub rules no longer depend on pass switch.
18659         (method_declarator:): Likewise.
18660         (method_body:): Likewise.
18661         (abstract_method_declaration:): Likewise.
18662         (block_statement:): Likewise.
18663         (local_variable_declaration:): Likewise.
18664         (argument_list:): Likewise.
18665         (method_invocation:): Likewise. Call to build_method_invocation_stmt
18666         removed. Partial CLASS_EXPR tree node built instead.
18667         (postfix_expression:): Removed pass switch on all sub rules.
18668         (java_pop_parser_context): Free classd_list content.
18669         (yyerror): Call obstrack_grow0 to finalize error message.
18670         (check_class_interface_creation): Comment modified to reflect new
18671         returned value meaning. Removed second pass switch. Return 1 if an
18672         error was found, 0 otherwise. Adjust pointer on filename if a
18673         leading path separator was found.
18674         (maybe_create_class_interface_decl): Removed first pass switch
18675         when linking the class decl to the class_list. Install a new
18676         jdep_list for the class.
18677         (add_superinterfaces): List of unresolved interfaces is
18678         gone. Unresolved interfaces are directly added to the current
18679         dependencies list.
18680         (create_interface): Second pass shortcut removed.
18681         ctpx->modifier_ctx access through MODIFIER_WFL.
18682         (create_class): Second pass shortcut removed. Call to
18683         register_incomplete_type replaces the call to
18684         parser_chain_incomplete_item.
18685         (complete_class_decl): Function removed.
18686         (duplicate_declaration_error): New way of retrieving redeclared
18687         item type.
18688         (register_fields): Call to lookup_modifier_cl replaced by
18689         MODIFIER_WFL. New way of handling unresolved type, using
18690         unresolved_type_p and obtain_incomplete_type.
18691         register_incomplete_type replaces call to parser_chain_incomplete_item.
18692         (patch_stage): New static global variable.
18693         (method_header): New way of handling unresolved type, using
18694         unresolved_type_p and obtain_incomplete_type. patch_stage used to
18695         indicates that the method decl needs to be patched.
18696         (check_abstract_method_header): Call to lookup_modifier_cl
18697         replaced by MODIFIER_WFL.
18698         (method_declarator): Incomplete argument type are registered
18699         calling register_incomplete_type. Patch on the declared method is
18700         issued in that case.
18701         (unresolved_type_p): New function.
18702         (parser_check_super_interface): New comment to reflect function's
18703         modified returned type (int). Function and has a new argument
18704         this_wfl. Call to parse_error_context uses this_wfl instead of
18705         relying on lookup_cl.
18706         (parser_check_super): Comment reflects function's new returned
18707         type (int). Function returns nonzero value on error.
18708         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
18709         register_incomplete_type, jdep_resolve_class): New functions to
18710         handle incomplete types in declarations.
18711         (java_complete_class): Rewritten to work with the new incomplete
18712         type handling scheme.
18713         (complete_class_report_errors): Likewise.
18714         (complete_method_decl): Removed: it jobs is now handled by
18715         java_complete_class.
18716         (do_resolve_class): Class loaded in not already loaded and not
18717         found in Java source code.
18718         (java_check_regular_methods, java_check_abstract_methods): Don't
18719         call complete_method_decl anymore.
18720         (lookup_modifier_cl, not_builtin_p): Functions deleted.
18721         (read_import_dir): Got rid of the pass number dependency.
18722         (declare_local_variables): New handling of unresolved types (patch
18723         issued).
18724         (source_start_java_method): New parameter level. Function called
18725         with level set to 1 when argument types are potentially
18726         unresolved.  Called to complete the job with level set to 2 once
18727         types are complete.
18728         (source_end_java_method): Call to permanent_allocation
18729         removed. Waiting to be replaced by a more suitable obstack
18730         management.
18731         (java_complete_expand_methods, java_complete_expand_method,
18732         java_expand_finals): New functions.
18733         (build_method_invocation_stmt): Renamed
18734         patch_method_invocation_stmt. Extracts function call expression
18735         (wfl) and arguments (args) from CALL_EXPR tree operands.
18736         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
18737         call. Patch the function and argument operand of the CALL_EXPR
18738         tree argument.
18739         (patch_argument, java_complete_tree): New functions.
18741 1998-04-20  Per Bothner  <bothner@cygnus.com>
18743         Recover from missing fields and methods (i.e. error instead of fatal).
18744         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
18745         * expr.c (expand_invoke):  Recover from missing method.
18746         (expand_java_field_op):  Recover from missing field.
18747         Inline references to java.lang.{Integer,Char,...}.TYPE.
18748         * typeck.c (get_type_from_signature), java-tree.h:  New function.
18749         * class.c (add_method):  Use get_type_from_signature.
18750         (build_class_ref):  Handle a class that was not found.
18751         * typeck.c (convert):  Handle conversion to pointers (for convenience).
18752         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
18753         instead of lookup_field to handle missing fields.
18755         * jcf-parse.c (process_zip_dir):  Set java_source.
18757 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
18759         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
18761 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18763         * jcf-parse.c (load_class): Don't change input_filename before
18764         calling jcf_parse_source (but still do it before calling
18765         jcf_parse).
18766         (jcf_parse_source): Assign input_filename after having saved the
18767         parser context.
18768         * lex.c (java_init_lex): Chain a WFL node to the import on demand
18769         list. ctxp->modifier_ctx zeroed according to its new
18770         definition. ctxp->filename initialized. Removed
18771         JAVA_MODIFIER_CTX_UNMARK.
18772         (java_unget_unicode): Update the character based column position.
18773         (java_allocate_new_line): ref_count not used anymore. Always free
18774         ctxp->p_line. Initialize c_line->char_col to 0.
18775         (java_get_unicode): Update the character based column position.
18776         (java_lex): Use ctxp->elc to store current position in source
18777         file, at the beginning of the parsed token. Set modifier_ctx entry
18778         corresponding to the parse modifier to a WFL node. Return a WFL
18779         node when an identifier is parsed.
18780         (java_lex_error): Now uses ctxp->elc to store current position in
18781         source.
18782         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
18783         * lex.h (build_wfl_node): New function definitions.
18784         (struct java_line): ref_count and next fields are gone. New field
18785         char_col.
18786         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
18787         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
18788         (JAVA_COLUMN_DELTA): New macro.
18789         (java_lc): New typedef on new struct _java_lc.
18790         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
18791         (parse_error_context, parse_warning_context): Changed prototypes.
18792         (java_get_line_col): Added as an available global function.
18793         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
18794         (IC_DECL): Replaced by macro IC_TYPE
18795         (DEPEND_WFL): New macro.
18796         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
18797         wrong modifier.
18798         (exit_java_complete_class): Removed a commented out statement.
18799         (struct parser_ctxt): Added comments on fields. modifier_ctx is
18800         now an array of tree nodes. Deleted fields line_list and
18801         e_line. New field elc, to replace e_line.
18802         * parse.y (array_type:): Build WFL node.
18803         (qualified_name:): Build a single WFL node out of two. Retain
18804         the location information of the first node in the resulting node.
18805         (package_declaration:): Use package name as a WFL node
18806         (single_type_import_declaration:): Use imported name as a WFL node.
18807         (type_import_on_demand_declaration:): Use root of the imported
18808         packages as a WFL node.
18809         (field_declaration:): Removed unused local variable cl.
18810         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
18811         (yyerror): New static elc. Removed static error_line, error_pos.
18812         New local code_from_source. Save ctxp->elc into elc at the first
18813         pass. Call java_get_line_col to get a string of the line where
18814         the error occurred.
18815         (debug_line): Removed static function.
18816         (parse_error_context, parse_warning_context): Parameter cl is now
18817         a WFL node. Use its value to initialize ctxp->elc.
18818         (redefinition_error): Parameter cl is now a WFL node.
18819         (parse_add_interface): New parameter wfl. No longer call
18820         lookup_cl, use wfl instead.
18821         (check_class_interface_creation): Parameter cl is now a WFL node.
18822         (maybe_create_class_interface_decl): Likewise.
18823         (add_superinterfaces): New function.
18824         (create_interface): Removed local cl, node, super_decl,
18825         super_decl_type.  Function now uses id as a WFL node. Better
18826         warning/error report on obsolete or forbidden mix of
18827         modifiers. Now calls add_superinterfaces to register interfaces.
18828         (create_class): Removed local cl, node. Local variable id is used
18829         as a WFL node. Better error report on forbidden modifier
18830         mix. Uses add_superinterfaces to register interfaces.
18831         (find_field): Argument cl is now a WFL node. Now store the WFL
18832         node of a fields that needs to be checked for their
18833         initialization.
18834         (method_header): Local variable node non longer used. Local
18835         variable id replaces cl.
18836         (check_modifiers_consistency): Local variable cl is now a WFL
18837         node.
18838         (method_declarator): Local variable cl replaced by parameter id.
18839         (parser_qualified_name): Now uses parameter name as a WFL node.
18840         (parser_check_super_interface): New parameter wfl, for achieve
18841         greater accuracy during error reports.
18842         (parser_chain_incomplete_item): New parameter named location. Used,
18843         along the decl, to construct the incomplete item node.
18844         (java_complete_class): resolve_class now uses WFL node extracted
18845         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
18846         where appropriate.
18847         (complete_method_decl): Unresolved function's argument types are WFL.
18848         (resolve_class): Parameter cl is now a WFL node.
18849         (resolve_and_layout): Likewise.
18850         (do_resolve_class): Likewise. Try first to use cl and then do the
18851         lookup on the decl when calling check_pkg_class_access.
18852         (complete_class_report_errors): Use IC_TYPE in place of
18853         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
18854         instead of doing a lookup over the decl.
18855         (java_check_final): Use WFL info from field tree list.
18856         (lookup_cl): Rewritten and returns a statically defined WFL node.
18857         (lookup_modifier_cl): Now uses information from WFL nodes.
18858         (process_imports): Likewise.
18859         (read_import_dir): name and cl arguments replaced by a single WFL
18860         node. Function modified accordingly.
18861         (find_in_imports_on_demand): Now uses WFL node.
18862         (check_pkg_class_access): cl argument is now a WFL node.
18863         (declare_local_variables): Fixed to use WFL nodes.
18864         (resolve_expression_name): Likewise.
18865         (build_method_invocation_stmt): name_combo argument renamed
18866         wfl. Function modified to use WFL nodes.
18867         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
18868         (lookup_method_invoke): cl is now a WFL node. Added missing
18869         IDENTIFIER_POINTER to class type decl name.
18871 1998-04-14  Dave Brolley  <brolley@cygnus.com>
18873         * lang.c (init_parse): Now returns char* containing the filename.
18875 1998-04-10  Per Bothner  <bothner@cygnus.com>
18877         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
18879         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
18880         * class.c (make_class_data):  If flag_assume_compiled, initial class
18881         state is CSTATE_PREPARED; make superclass and interfaces direct
18882         references, rather than constant pool indexes.
18884 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18886         * parser.y: Include flags.h. Removed debug variable pl.
18887         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
18888         (block:): Likewise.
18889         (labeled_statement_nsi:): Generate debug info when reducing
18890         expression_statement:.
18891         (check_pkg_class_access): get_access_flags_from_decl invocation
18892         fixed for new CLASS_* flags location.
18893         (source_end_java_method): Save/restore parser context when
18894         entering/leaving this routine. Restore lineno to its right value
18895         before calling expand_end_bindings.
18896         (build_method_invocation_stmt): build_invoke called with the
18897         current line information.
18898         (build_invoke): New argument cl. Wrap the function call around a
18899         wfl node.
18900         (refine_accessible_methods_list): Changed comment, removed
18901         unnecessary code.
18902         * parse.h: Fixed typo in comments.
18903         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
18904         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
18905         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
18906         parser_ccb_indent.
18907         * lex.c (java_lex): Record the last closing curly bracket of a
18908         function.
18909         * jcf-parse.c (jcf_parse_source): Now calls
18910         java_check_methods. Clarified comment, fixed typo.
18912 1998-04-09  Dave Brolley  <brolley@cygnus.com>
18914         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
18915         (finish_parse): Expose for non USE_CPPLIB builds.
18917 1998-04-08  Jeffrey A Law  (law@cygnus.com)
18919         * lang.c (lang_print_xnode): New function.
18921 1998-04-03  Per Bothner  <bothner@cygnus.com>
18923         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
18924         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
18925         used to build a class's dispatch table.
18926         (make_class_data):  Generate dispatch table if flag_assume_compiled.
18927         Set dtable of class object to address of class_dtable_decl.
18929         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
18930         be volatile and have side effects - generates better code.
18932         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
18933         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
18935         * expr.c (expand_invoke):  If class is final, method is
18936         effectively final, so can call it directly.
18938         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
18940         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
18942 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18944         * parse.y (build_method_invocation_stmt): Removed extra argument
18945         to build_invoke.
18947 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18949         * expr.c (dtable_indent): Now static global.
18950         (expand_invoke): Now call invoke_build_dtable and
18951         build_invokevirtual.
18952         (invoke_build_dtable, build_invokevirtual): New functions.
18953         * jcf-io.c (find_class): Defer issuing a warning by setting
18954         jcf->outofsynch to 1.
18955         * jcf-parse.c (jcf_out_of_synch): New function.
18956         (load_class): Test this_jcf.outofsynch flag and call
18957         jcf_out_of_synch accordingly.
18958         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
18959         comment indentation.
18960         * lex.c (java_get_unicode): Fixed code indentation.
18961         (java_lex): Create string literal. Fixed typo. Removed several
18962         premature obstack_free.
18963         * parse.h: New enums for name resolution and invocation mode.
18964         (struct qualification): New data structure.
18965         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
18966         (do_resolve_class, build_method_invocation_stmt,
18967         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
18968         debug_line, identical_subpath_p, invocation_mode,
18969         refine_accessible_methods_list, build_invoke,
18970         lookup_method_invoke): New functions declared.
18971         (build_invokevirtual, invoke_build_dtable, match_java_method,
18972         build_field_ref, jcf_out_of_synch): New references to external
18973         functions.
18974         (struct parse_ctxt): Removed artificial_constructor field.
18975         * parse.y: (array_type:): Type defined for this rule.
18976         (class_type:): Installed default rule for interface_type:.
18977         (array_type:): Now build Java array type.
18978         (qualified_name:): Now use obstack_grow0.
18979         (method_declaration:): Skip the artificial constructor added to
18980         the list, if any.
18981         (abstract_method_declaration:): Execute the code only during pass 1.
18982         (block:): Installed default rule in block_statements:.
18983         (block_statement:): Add the statement to the method during pass 2.
18984         (statement_expression): Installed default rule for
18985         method_invocation:.
18986         (argument_list:): Added code to build the argument list.
18987         (method_invocation:): Added call to create the method invocation
18988         node.
18989         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
18990         (debug_line): New function for debug.
18991         (complete_class_decl): No longer do something during pass 1.
18992         (method_header): Use BUILD_PTR_FROM_NAME.
18993         (parser_qualified_classname): Use obstack_grow0. Removed bogus
18994         obstack_free.
18995         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
18996         function's main comment.
18997         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
18998         classes.
18999         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
19000         (resolve_class): Now works with arrays.
19001         (do_resolve_class, resolve_and_layout): New functions.
19002         (java_check_regular_methods): Reverse method list before and after
19003         having processed it. No longer set ctxp->artificial_constructor.
19004         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
19005         accordingly. Fixed typo in issued error message. Now use
19006         obstack_grow0.
19007         (find_in_imports_on_demand): Now use obstack_grow0.
19008         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
19009         (source_end_java_method): Call expand_expr_stmt instead of
19010         expand_expr. Calls it before calling expand_function_end.
19011         (java_method_add_stmt): Do nothing if errors were found during
19012         parsing.
19013         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
19014         (build_method_invocation_stmt, build_invoke, invocation_mode,
19015         lookup_method_invoke, refine_accessible_methods_list,
19016         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
19017         New functions.
19018         * typeck.c (build_java_signature): Properly end method signature
19019         if return type skipped.
19020         (match_java_method): New function.
19022 1998-03-16  Per Bothner  <bothner@cygnus.com>
19024         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
19026 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19028         * expr.c (build_invoke_non_interface): New function.
19029         (methods_ident, ncode_ident): Now static globals.
19030         (expand_invoke): Use build_invoke_non_interface.
19031         * java-tree.h (struct lang_decl): New field function_decl_body.
19032         (DECL_FUNCTION_BODY): New macro.
19033         * jcf-parse.c (jcf_parse_source): Deeper check before setting
19034         CLASS_FROM_SOURCE_P.
19035         (parse_source_file): Fixed typos. Call java_layout_parsed_class
19036         before starting pass 2. Call to java_generate_parsed_class replaced
19037         by java_register_parsed_class.
19038         * lex.c: Fixed typo in header. Some line width related formating.
19039         * lex.h: Some line width related formating.
19040         * parse.h (source_end_java_method, resolve_expression_name,
19041         complete_class_decl, maybe_create_class_interface_decl,
19042         check_class_interface_creation): New static function declarations.
19043         (java_layout_parsed_class, java_method_add_stmt): New function
19044         declarations.
19045         (struct parser_ctxt): Field mark_class_generate removed. New
19046         fields class_list and artificial_constructor.
19047         * parse.y: Fixed typo in header.
19048         (class_declaration:): Call complete_class_decl when class body
19049         parsed.
19050         (method_declaration:): Call source_end_java_method in pass 2 when
19051         the method body is defined.
19052         (postfix_expression:): Do expression name resolution on sub-rule
19053         name during pass 2.
19054         (create_class, create_interface): Merged common pieces.
19055         (check_class_interface_creation, maybe_create_class_interface_decl):
19056         New functions.
19057         (complete_class_decl): New function.
19058         (register_fields): Fixed line width related typo.
19059         (method_header): Correctly skip first argument when fixing
19060         argument line. Changed the loop.
19061         (java_check_circular_reference): Now use ctxp->class_list.
19062         (java_complete_class): Removed start/stop marking.
19063         (java_check_regular_methods): Now takes a class decl as an
19064         argument.  Add default constructor if none were encountered.
19065         (java_check_methods): Now use ctxp->class_list. Changed call to
19066         java_check_regular_methods.
19067         (source_start_java_method): Set DECL_ARG_TYPE for each function
19068         arguments.
19069         (source_end_java_method, java_method_add_stmt): New functions.
19070         (java_generate_parsed_class): No longer exists.
19071         (java_layout_parsed_class, java_register_parsed_class): New functions.
19072         (resolve_expression_name): New function.
19074 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19076         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
19077         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
19078         until pass initializations are done. Call read_import_dir with
19079         pass set to 0.
19080         * parse.h: (lookup_modifier_cl): New function declared.
19081         (INTERFACE_FIELD_MODIFIERS): New macro.
19082         (OBSOLETE_MODIFIER_WARNING): New macro.
19083         * parse.y: (register_fields): Class type and current field name in
19084         local variables. Check modifier(s) if adding field(s) to an interface.
19085         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
19086         and report errors using the faulty modifier line context.
19087         (lookup_modifier_cl): New function.
19088         (read_import_dir): Detect and report default import processing
19089         failure.
19091 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
19093         Add a pair of -fassume-compiled/-fno-assume-compiled options.
19094         * class.c (is_compiled_class): Return 1 after making sure it
19095         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
19096         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
19097         * java-tree.h (flag_assume_compiled): Add decl.
19098         * lang.c (lang_f_options): Add the flag.
19099         (flag_assume_compiled): Add decl, default to 0.
19101 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19103         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
19104         (is_compiled_class): Likewise.
19105         (layout_class): Likewise.
19106         (layout_class): Detect and lay out classes defined in source code.
19107         (interface_of_p, add_interface_do, may_add_interface): New
19108         function.
19109         (add_interface): Now use add_interface_do.
19110         (add_method_1): New function.
19111         (add_method): Now use add_method_1.
19112         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
19113         (complete_start_java_method): New function.
19114         (start_java_mehod): Now call complete_start_java_method.
19115         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
19116         (expand_invoke): Likewise and fixed typo.
19117         *gjava.c: (print_super_field): Use new argument to find_class
19118         DO_CLASS_FILE.
19119         (main): Likewise.
19120         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
19121         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
19122         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
19123         IDENTIFIER_NODE.
19124         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
19125         (add_method_1, push_class): New prototypes.
19126         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
19127         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
19128         directory where the class was found.
19129         (find_class): New argument DO_CLASS_FILE. Function find_class
19130         modified accordingly.
19131         *jcf-parse.c: (fix_class_path): New function.
19132         (load_class): Use new VERBOSE argument. load_class now finds and
19133         loads/parses .class/.java files. Save read_state of current_jcf
19134         if necessary.
19135         (java_parser_abort_on_error): New macro.
19136         (jcf_parse_source, parse_source_file): New function.
19137         (jcf_parse): Fixed typo.
19138         (yyparse): Call parse_source_file () only.
19139         (process_zip_dir): Fixed typo, fix zdir->filename_length when
19140         writing the real class name back in the zip directory entry.
19141         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
19142         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
19143         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
19144         (find_class): Prototype fixed.
19145         *lex.c: Added 1998 time stamp.
19146         Removed all static global variables, moved into the parser
19147         context data structure.. Now include unistd.h if SEEK_SET not
19148         defined.
19149         (java_init_lex): Rewritten.
19150         (java_sneak_unicode): Modified current unicode access in current line.
19151         (java_unget_unicode): Likewise.
19152         (java_allocate_new_line): New allocation management.
19153         (java_read_char): Modified access and storage of unget_utf8_value.
19154         New way of processing current unicode.
19155         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
19156         (java_get_unicode): Now use the parser context.
19157         (java_lineterminator): Likewise.
19158         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
19159         of the reentrant parser implementation. Function now use the
19160         parser context data structure and java_lval. Fixed production of
19161         the float and double constant "out of range" error message. Fixed
19162         obstack use. Return integer value when hitting a modifier. Now
19163         return type for TRUE, FALSE and other predefined types. Return
19164         identifier as a TREE_LIST list containing the current line context
19165         as the TREE_VALUE sub-node.
19166         (java_unicode_2_utf8): Fixed typo in declaration.
19167         (java_lex_error): Now use the parser context data structure.
19168         *lex.h: Added 1998 time stamp.
19169         (struct java_line): New fields ref_count and next.
19170         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
19171         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
19172         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
19173         *parse.h: Added 1998 time stamp.
19174         (java_parse_source_file): Renamed from parse_source_file.
19175         (YYERROR_NOW, YYNOT_TWICE): Fixed.
19176         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
19177         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
19178         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
19179         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
19180         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
19181         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
19182         (struct parser_ctxt): New data structure to keep the parser context.
19183         *parse.y: Added 1998 time stamp, got rid of static global variables.
19184         (java_error_count, ctxp): New global variables.
19185         (%union): New value field.
19186         (numeric_type, integral_type): Rules removed.
19187         (primitive_type): Rule defined to handle integral, float, double and
19188         boolean types.
19189         (qualified_name, package_declaration,
19190         single_type_import_declaration, type_import_on_demand_declaration,
19191         modifiers, class_declaration, super, interfaces,
19192         interface_type_list, class_body, field_declaration,
19193         field_declaration, variable_declarators, variable_declarator,
19194         variable_declarator_id, method_declaration, method_header,
19195         formal_parameter_list, formal_parameter, method_body, block,
19196         static, interface_declaration, extends_interfaces,
19197         abstract_method_declaration, local_variable_declarators): Rules now
19198         define actions.
19199         (force_error, do_warning): New global statics.
19200         (push_parser_context, parser_context_save_global,
19201         parser_context_restore_global, pop_parser_context): New functions.
19202         (yyerror): Now uses the global parser context. Fixed use of obstack.
19203         (parse_error, parse_error_context, parse_warning_context,
19204         java_accstring_lookup, redefinition_error, check_modifiers,
19205         parser_add_interface, create_interface, create_class, find_field,
19206         duplicate_declaration_error, register_fields, method_header,
19207         check_modifiers_consistency, check_abstract_method_header,
19208         method_declarator, parser_qualified_classname,
19209         parser_check_super_interface, parser_check_super,
19210         parser_chain_incomplete_item, java_check_circular_reference,
19211         layout_class_from_source, java_complete_class,
19212         complete_method_decl, resolve_class, complete_class_report_errors,
19213         java_check_final, check_method_redefinition,
19214         java_check_regular_methods, java_check_abstract_methods,
19215         java_check_methods, lookup_java_interface_method2,
19216         lookup_java_method2, lookup_cl, find_name_in_single_imports,
19217         process_imports, find_in_imports, read_import_entry,
19218         read_import_dir, find_in_imports_on_demand,
19219         check_pkg_class_access, not_builtin_p, declare_local_variables,
19220         source_start_java_method, java_generate_parsed_class): New
19221         functions.
19222         *typeck.c: (signature_include_return): New global variable.
19223         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
19224         to add the function returned type in the signature.
19226 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
19228         * jcf-io.c (open_in_zip): Use strncmp and LEN.
19230 1998-01-29  Dave Brolley  <brolley@cygnus.com>
19232         * Make-lang.in (java.info): Added.
19233         (java.install-info): Added
19235 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
19237         * Makefile.in (clean): Also remove java/parse.c.
19239 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
19241         Add a pair of -fbounds-check/-fno-bounds-check options.
19242         * lang.c (lang_decode_option): Add code to grok arguments.
19243         (flag_bounds_check): Add decl.
19244         (lang_f_options): New array w/ the option in it.
19245         * java-tree.h (flag_bounds_check): Add decl.
19246         * lang-options.h: New file.
19247         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
19248         of a static macro value.
19249         (JAVA_ARRAY_EXCEPTION): Delete macro.
19251 1998-01-23  Per Bothner  <bothner@cygnus.com>
19253         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
19254         * expr.c (build_anewarray):  Add missing promote_type.
19256 1998-01-22  Per Bothner  <bothner@cygnus.com>
19258         Add array types with known length to optimize bounds checking.
19259         * typeck.c (build_java_array_type):  Take length parameter.
19260         (java_array_type_length, build_prim_array_type):  New functions.
19261         * java-tree.h:  Update for new functions.
19262         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
19263         * class.c:  Use build_prim_array_type.
19264         * expr.c (can_widen_reference_to):  Handle known-length array types.
19265         (verify_jvm_instructions):  Keep track of integer push instructions
19266         followed by newarray/anewarray, so we can build known-length arrays.
19267         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
19268         (java_array_data_offset):  New function.
19269         (build_java_array_length_access):  New function.  Optimize if constant.
19270         (build_java_arrayaccess):  Constant fold bounds check.
19271         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
19272         (build_newarray, build_anewarray):  New functions.
19273         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
19274         * verify.c (merge_types):  Handle known-lengh array types.
19276 1998-01-19  Per Bothner  <bothner@cygnus.com>
19278         * expr.c (expand_byte_code):  Fix performace bug, which caused
19279         searching linenumber_table to be linear rather than constant.
19281 1997-12-12  Per Bothner  <bothner@cygnus.com>
19283         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
19285         * decl.c, java-tree.h (soft_fmod_node):  New global.
19286         * decl.c (init_decl_processing):  Define __builtin_fmod.
19287         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
19288         using __builtin_fmod.
19290 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19292         * keyword.h: New file, output of keyword.gperf as processed by
19293         gperf.
19294         * lex.c (java_lex_init): Initialize java_error_flag.
19295         * parse.c (YYERROR_NOW): Uses java_error_flag.
19296         * parse.y: New static java_error_flag. Useless definition of
19297         buffer_error gone.
19298         * parse.y (java_error): Portable error recovery using
19299         java_error_flag (not yet completely tuned).
19301 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
19303         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
19305 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19307         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
19308         (parse.c, lex.c, keyword.h): New rules for Java source code
19309         front-end.
19310         * parse.c: Renamed into jcf-parse.c.
19311         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
19312         * keyword.gperf: New file, Java keywords.
19313         * parse.y: New file, Java language grammar.
19314         * parse.h: New file, Java language grammar definitions.
19315         * lex.c: New file, Java language lexer.
19316         * lex.h: New file, Java language lexer definitions.
19318 1997-12-03  Per Bothner  <bothner@cygnus.com>
19320         * decl.c (clinit_identifier_node), java-tree.h:  New global.
19321         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
19322         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
19323         * expr.c (expand_java_field_op):  Check for invalid assignment
19324         to final field.
19326         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
19328 1997-10-27  Per Bothner  <bothner@cygnus.com>
19330         * verify.c (verify_jvm_instructions):  When processing a handler,
19331         attempt to set the current_subr to the right value.
19332         (More complicated code combines Sep 17 and Oct 22 versions.)
19334 1997-10-24  Per Bothner  <bothner@cygnus.com>
19336         * class.c (push_class):  Figure out (guess) name of source file.
19337         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
19338         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
19339         (parse_class_file):  Change return type from int to void.
19340         Call debug_start_source_file/debug_end_source_file.
19342         * expr.c (build_java_binop):  Fix masking 2nd operand.
19343         * decl.c (init_decl_processing):  Set sizetype first.
19345 1997-10-22  Per Bothner  <bothner@cygnus.com>
19347         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
19348         (Revert Sep 17 change.)
19350 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19352         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
19353         .class extension in their name and fix thing so we don't process
19354         them parse_zip_file_entries().
19355         (parse_zip_file_entries): Cleaned unused local variables.
19357 1997-10-20  Per Bothner  <bothner@cygnus.com>
19359         * expr.c (can_widen_reference_to):  Allows equal array element types.
19360         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
19361         * jcf-dump.c (RET):  Get (and print) index.
19363         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
19364         Promote element type to POINTER_TYPE.
19366 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19368         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
19369         find_in_current_zip, jcf_figure_file_type): Moved from
19370         jcf-reader.c to parse.c.
19371         * zextract.c: (read_zip_archive): takes file_comment_length possible
19372         field into account.
19374 1997-10-20  Per Bothner  <bothner@cygnus.com>
19376         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
19378         * verify.c (merge_types):  Handle array types even better ...
19380 1997-10-17  Per Bothner  <bothner@cygnus.com>
19382         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
19384         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
19385         * class.c (make_class_data):  Don't build fields_decl if no fields.
19386         When building fields_decl, skip if DECL_ARTIFICIAL.
19388         * expr.c (java_stack_swap):  Update stack_type_map.
19389         * verify.c (merge_types):  Handle array types better.
19391 1997-10-15  Per Bothner  <bothner@cygnus.com>
19393         * class.c (add_field):  Don't promote short integral fields to
19394         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
19395         * expr.c (push_value):  Promote and convert short integral values.
19397         * decl.c, java-tree.h (integer_two_node):  New constant node.
19398         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
19400 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19402         * class.c (append_gpp_mangled_type): Use function argument
19403         unpromoted type to generate mangled name.
19405 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19407         * constants.c (build_constant_data_ref): Now uses current_class
19408         instead of main_class.
19409         (build_constants_constructor): Now uses current_class instead of
19410         main_class.
19411         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
19412         of the global variable SeepZipFiles done here.
19413         * zextract.c (read_zip_archive): extra_field optional field taken
19414         into account while computing the position of the class file in the
19415         archive.
19416         * verify.c (verify_jvm_instructions): Use current_jcf to search
19417         the constant pool.
19418         * parse.c (load_class): First search for the class to load in the
19419         current zip file. Saves current_jcf (restored before returning
19420         from that function). Don't call JCF_FINISH in the class was found
19421         in the current ZIP file.
19422         (jcf_parse): If the class was found in the current ZIP file, save
19423         its tree_constant_pool (for later reuse).
19424         (parse_class_file): New function. Process each method defined in
19425         the current class and record the class as to be later registered.
19426         (yyparse): Rewritten. Figure the type of the current file and switch
19427         accordingly.
19428         * lang.c: New global variable current_jcf.
19429         (lang_init): Removed compiling_from_source test (done later, in
19430         yyparse). Removed call the jcf_parse ().
19431         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
19432         (typedef struct JCF): New fields seen_in_zip (to mark a class found
19433         in the current ZIP file) and zip_offset (offset to the class data in
19434         the current zip file).
19435         * jcf-reader.c: zipfile.h included.
19436         localToFile: New ZipFileCache static global variable
19437         (parse_zip_file_entries): New function. Browse the current ZIP
19438         file directory and process each class found.
19439         (process_zip_dir): New function. Register each class found in the
19440         ZIP file directory. The class aren't parsed but a valid JCF is
19441         link to each of them.
19442         (find_in_current_zip): New function. Search for a class in the
19443         current ZIP file directory. If found, prepare the class so that it
19444         can be loaded.
19445         (jcf_figure_file_type): New function. Examine the file structure
19446         to figure a class file, a ZIP file. If none of these categories are
19447         matched, a source file is assumed.
19448         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
19449         SeenZipFile: New global variable.
19450         (open_in_zip): Use zipmember's length to accelerate the search for
19451         a member. If zipmember was NULL and zip file successfully read,
19452         return 0.
19453         * java-tree.h: New global variable current_jcf declared.  Added
19454         declaration for current_constant_pool_tags, current_constant_pool_data,
19455         current_constant_pool_length, current_constant_pool_data_ref.
19456         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
19457         store the JCF of classes seen in a zip file) and tree *constant_pool
19458         (to save a loaded class constant pool). current_class declared here.
19459         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
19460         retrieve method_ref_constant.
19461         (PUSHC): java_push_constant_from_pool now uses current_jcf.
19462         (OBJECT): get_class_constant now uses current_jcf.
19463         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
19464         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
19465         (expand_invoke): Now uses current_class instead of main_class
19466         (build_class_init): Now uses current_class instead of main_class
19467         * class.c: New static global variable registered_class.
19468         (register_class): New function.
19469         (emit_register_class): Modified to use registered_class instead of
19470         main_class
19471         (is_compiled_class): Now take into account class seen in the archive.
19473 1997-10-06  Per Bothner  <bothner@cygnus.com>
19475         * except.h:  Renamed to: java-except.h.
19476         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
19477         * except.c:  Add semi-working (commented out) implementation.
19479         * expr.c (expand_iinc):  Add needed flush_quick_stack.
19480         * parse.c (set_source_filename):  New function.
19481         (give_name_to_class):  Set input_filename from package.classname.java.
19483         * jcf-io.c (find_class):  Don't look first in ".".
19485 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19487         * zextract.c (read_zip_archive): Now takes into account the
19488         extra_field field.
19489         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
19491 1997-09-20  Per Bothner  <bothner@cygnus.com>
19493         * constants.c, java-tree.h (build_internal_class_name):  New function.
19494         (alloc_class_constant):  Re-implement using build_internal_class_name.
19495         * class.c (make_class_data):  Likewise.
19496         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
19498 1997-09-17  Per Bothner  <bothner@cygnus.com>
19500         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
19501         to NULL before pushing an exception handler target.
19503         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
19504         (java_stack_swap, java_stack_dup):  Re-write to be safe from
19505         clobbering registers.
19506         (build_class_init):  New function.
19508 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19510         * typeck.c (build_java_array_type): Temporary use
19511         permanent_obstack to create the array 'length' field.
19512         * expr.c (lookup_label): Temporay use permanent_obstack to create
19513         label if not found.
19514         * class.c (push_super_field): Tempory use permanent_obstack.
19516 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19518         * typeck.c (type_for_mode): Now handles double_type_node and
19519         float_type_node.
19520         * verify.c (verify_jvm_instructions): The instruction following
19521         the wide bytecode is checked. OPCODE_ret added to the list of
19522         wide.
19524 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19526         * class.c (make_class): Temporary use permanent_obstack. Set the
19527         class CLASS_P field to 1.
19528         (push_class): Temporary use permanent_obstack.
19529         (set_super_info): Temporary use permanent_obstack.
19530         (add_method): Temporary use permanent_obstack, set
19531         METHOD_TRANSIENT().
19532         (add_field): Temporary use permanent_obstack. Sets
19533         FIELD_VOLATILE() and FIELD_TRANSIENT().
19534         (build_class_ref): Temporary use permanent_obstack if the class
19535         isn't compiled.
19536         (build_static_field_ref): Temporary use permanent_obstack when
19537         creating field's rtl.
19538         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
19539         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
19540         and fields. Function finalized, as far as flag handling.
19541         (push_class_static_dummy_field): Temporary use permanent_obstack.
19542         (emit_register_class): Force generation of class registration at
19543         -O3 or deeper.
19544         * decl.c (end_java_method): Call permanent_allocation() before
19545         returning.
19546         * expr.c (can_widen_reference_to): Added comment to interface
19547         handling, fixed typo.
19548         (lookup_field): Now uses CLASS_P() to correct FIXME
19549         (expand_invoke): Verification on public && !static &&
19550         !abstract moved into soft_lookupinterfacemethod (kaffe).
19551         Use Object class dtable if objectref is an array when expanding
19552         invokeinterface.
19553         (java_push_constant_from_pool): Temporary use permanent_obstack
19554         for CONSTANT_string
19555         * parse.c (get_ref_constant): Temporary use permanent_obstack to
19556         create constant references.
19557         (get_constant): Temporary use permanent_obstack to create constant.
19558         (load_class): Temporary use permanent_obstack to load class.
19559         (jcf_parse): Temporary use permanent_obstack to perform class
19560         layout.
19561         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
19562         (build_java_signature): Temporary use permanent_obstack.
19563         * verify.c: (verify_jvm_instruction): removed unnecessary verification
19564         on ACC_SUPER flag.
19565         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
19566         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
19567         (CLASS_P): Defined
19569 1997-09-11  Per Bothner  <bothner@cygnus.com>
19571         * class.c (append_gpp_mangled_type):  Fix typo.
19572         (emit_register_class):  Use main_class to get class object, rather
19573         than looking for no-longer-existing static decl starting with _CL.
19574         * typeck.c (parse_signature_type):  Promote array element type
19575         if it is a RECORD_TYPE.
19577 1997-09-10  Per Bothner  <bothner@cygnus.com>
19579         * class.c (push_class_static_dummy_field):  New function.
19580         (mangle_static_field):  New. Do G++-style mangling of static fields.
19581         (layout_class):  Mandle static fields here, not in add_field.
19582         (build_class_ref):  The class object is now a dummy static field.
19583         * decl.c (find_local_variable):  Look for best, instead of first match.
19584         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
19585         (build_java_athrow):  Don't check here if exception is Throwable.
19586         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
19587         (TYPE_USED):  Removed.  No longer used ...
19588         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
19589         * verify.c (push_pending_label):  New function.
19590         (push_pending_block):  Renamed to check_pending_block.
19591         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
19592         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
19593         re-checking possible handlers) after a store (less wasted work).
19594         Check for null handler (finally) before calling add_handler.
19595         Various changes to (finally?) correctly handle try/finally.
19597 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
19599         * class.c: Include stdio.h.
19601 1997-09-04  Per Bothner  <bothner@cygnus.com>
19603         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
19604         to make sure class is initialized before static/special invoke.
19606         * verify.c (verify_jvm_instructions):  On a store instruction,
19607         call find_local_variable to force pre-allocation of decl and rtx.
19608         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
19610 1997-09-03  Per Bothner  <bothner@cygnus.com>
19612         * class.c (build_class_ref):   Strip off "promoted_" if need be.
19613         (make_field_value): Call build_java_signature when needed.
19614         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
19615         * expr.c (build_java_athrow):  Don't push_value of exception.
19616         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
19617         match specification of [fd]cmp[lg] for NaNs.
19618         (expand_byte_code):  Add support for exception handler ranges.
19619         * except.c:  Add skeleton for EH code-generation.
19620         * verify.c (merge_types):  Treat all promoted integral types as equal.
19621         * constants.c (build_constants_constructor):  To force creation of
19622         current_constant_pool_data_ref, call build_constant_data_ref.
19624         * javaop.def (lload):  Fix typo.
19625         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
19627 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
19629         * parse.c: Don't include function.h.
19631 1997-08-27  Per Bothner  <bothner@cygnus.com>
19633         * except.[ch]:  New files.
19634         * Makefile.in (JAVA_OBJS):  Add except.o
19635         * expr.c:  Temporary warning about unimplemented exceptions.
19636         * verify.c:  Verify exception handlers.
19638         * jcf-dump.c (disassemble_method):  Print exception table.
19640 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19642         * expr.c (verify_jvm_instructions): Started a thorough
19643         verification of invoke* bytecodes.
19644         (expand_byte_code): flush quick stack if PC is the target of a
19645         branch.  and undef RET (conflicting with config/i386/i386.h).
19646         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
19647         used.
19648         (expand_invoke): Now handles invokeinterface and do more
19649         verification according to the bytecode.
19650         (lookup_field): Don't try to load the class if processing
19651         dtable_type.
19652         (can_widen_reference_to): Now handles interfaces.
19653         * decl.c (init_decl_processing): New global variable
19654         soft_lookupinterfacemethod_node, declared in java-tree.h.
19655         Call set_super_info on string_type_node.
19656         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
19657         defined.
19658         * class.c (set_super_info): Fills the CLASS_* flags according to
19659         access_flags.
19660         (get_access_flags_from_decl): Handles all class flags.
19662 1997-08-26  Per Bothner  <bothner@cygnus.com>
19664         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
19665         * parse.c (yyparse):  Check for abstract method, and missing code.
19666         * expr.c (expand_byte_code):  Change interface.
19667         * lang.c (put_decl_node):  Print promoted types prettier.
19668         * verify.c (verify_jvm_instruction):  Change interface.
19669         Partial support for scanning exception table.
19670         For load instructions, handle promoted integral types.
19672 1997-08-21  Per Bothner  <bothner@cygnus.com>
19674         * verify.c:  New file, with contents moved from expr.c.
19675         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
19676         * typeck.c (is_array_type_p):  Moved here from expr.c.
19677         * java-tree.h:  Add some now-needed function declarations.
19678         * Makefile.in (JAVA_OBJS): Added verify.o.
19680 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19682         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
19683         METHOD_ABSTRACT flag.
19685         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
19686         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
19687         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
19689         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
19690         variables.
19691         (start_java_method): Hook for SYNCHRONIZED methods.
19693         * expr.c (build_java_jsr, build_java_ret): New functions
19694         (JSR,PRE): New macros
19695         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
19696         (verify_jvm_instructions): tableswitch, lookupswitch,
19697         monitorenter, monitorexit, goto_w: verified.
19698         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
19699         (build_java_monitor): New function.
19700         (MONITOR_OPERATION): Modified to call build_java_monitor()
19701         (verify_jvm_instructions): Started a thorough verification of
19702         invoke* bytecodes.
19704 1997-08-19  Per Bothner  <bothner@cygnus.com>
19706         Support verification of jsr/ret subroutines (used for try/finally).
19707         * decl.c (return_address_type_node):  New type node.
19708         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
19709         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
19710         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
19711         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
19712         TYPE_USED):  New macros for special types in type_map.
19714         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
19715         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
19716         BCODE_JUMP_TARGET.
19717         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
19719         * expr.c (can_widen_reference_to):  New function.
19720         (pop_type):  Use it.
19721         (merge_type_state):  Support handling start of subroutine.
19722         (push_pending_block):  Return char* error message, instead of calling
19723         fatal on an error.  Also handle subroutines.
19724         (verify_jvm_instructions):  Handle errors from push_poending_block.
19725         Support jsr and ret instructions.
19727 1997-08-19  Per Bothner  <bothner@cygnus.com>
19729         * jcf-io.c (find_classfile):  Fix thinko.
19730         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
19732 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
19734         * Makefile.in (BISON): Remove.
19736 1997-08-07  Per Bothner  <bothner@cygnus.com>
19738         * Makefile.in:  Convert to autoconf.
19739         * config-lang.in (outputs):  Added java/Makefile.
19741         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
19742         Rename cc1java to jc1.
19744         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
19745         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
19747         * class.c (class_depth):  Do load_class if needed.
19749         Mostly better verification.
19750         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
19751         (init_decl_processing):  Change return type of soft_checkcast.
19752         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
19753         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
19754         lang_print_error):  New functions.
19755         (lang_init):  Set global hook print_error_function to lang_print_error.
19756         * expr.c:  In the type_map ptr_type_node is only used for null now.
19757         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
19758         (merge_types):  Dererence pointer to record types before comparing.
19759         (decode_newarray_type, merge_types):  On error just return NULL.
19760         (build_java_binop):  Add preliminary implementation (with warning)
19761         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
19762         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
19763         (expand_compare, expand_java_goto, expand_java_call):  Don't
19764         push_pending_block, since that only makes sense when verifying.
19765         (merge_type_state):  Different return codes.
19766         (push_pending_block):  A block may need to be verified more than once.
19767         (expand_byte_code):  Warn about unused code at code generation time.
19768         (verify_jvm_instruction):  Changed logic, since code may need to be
19769         re-verified if type-state has changed.  Also, better error handling.
19770         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
19771         Improve newarray, anewarray, ?aload, athrow,
19772         * java-tree.h (LABEL_CHANGED):  New macro.
19774 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19776         * decl.c (soft_athrow_node): New global variable initialized.
19777         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
19778         * typeck.c (convert): Added support for REAL_TYPE.
19779         (convert_to_char): New function.
19780         (convert): Handle CHAR_TYPE.
19781         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
19782         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
19783         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
19784         promoted type.
19785         (verify_jvm_instructions): Added break a the end of bogus unop: label.
19786         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
19787         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
19788         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
19789         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
19790         to Use The Right Things.
19791         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
19792         compatible with INT. BOOLEAN is made equivalent to BYTE.
19793         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
19794         OPCODE_ifnonnull): Now supported.
19795         (build_java_athrow): New function.
19797 1997-08-04  Per Bothner  <bothner@cygnus.com>
19799         Rename method name <init> to match G++ (and fix mangling).
19800         * class.c (layout_class):  Replace method name of <init> by class name.
19801         (make_method_value):  Do inverse renaming of constructor from <init>.
19802         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
19803         * typeck.c (lookup_java_constructor):  New function.
19804         * expr.c (expand_invoke):  If method_name is <init>, call
19805         lookup_java_constructor to find constructor.
19807         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
19809 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19811         * parse.c (get_class_constant): Modified to handle array "classes"
19812         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
19813         wide type.
19814         (convert): Modified to handle real type.
19815         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
19816         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
19817         variables declared.
19818         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
19819         soft_multianewarray, soft_newarray_node, soft_throw_node): New
19820         global variables initialized.
19821         (find_local_variable): Handles the case of a pointer
19822         (end_java_method): Restore the use of one more scope
19823         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
19824         build_java_array_length_access, expand_java_arrayload,
19825         expand_java_arraystore, expand_java_array_length,
19826         expand_java_multianewarray, expand_java_anewarray,
19827         build_java_check_indexed_type, is_array_type_p,
19828         build_java_throw_out_of_bound_exception): New functions.
19829         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
19830         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
19831         OPCODE_<t>aload): Implemented code for verification.
19832         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
19833         ARRAY_NEW_MULTI): Macro defined.
19834         (CONVERT): Modified to invoke convert().
19835         (case OPCODE_aload2): Fixed index typo from 2 to 1.
19837 1997-07-31  Per Bothner  <bothner@cygnus.com>
19839         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
19840         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
19841         (make_class_data):  Field name needs '/' as package prefix.
19842         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
19844 1997-07-25  Per Bothner  <bothner@cygnus.com>
19846         Implement debug information for local variables.
19847         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
19848         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
19849         DECL_LOCAL_SLOT_CHAIN):  New macros.
19850         (struct lang_decl_var):  New type.
19851         * parse.c (give_name_to_locals):  Move to decl.c.
19852         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
19853         (start_java_method):  Re-write parameter handling.
19854         (pending_local_decls):  New global variable.
19855         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
19856         (find_local_variable):  Accept pc so we can skips decls not in range.
19857         (struct binding_level):  Add end_pc field.
19858         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
19859         (various):  Change so current pc gets passed to find_local_variable.
19861         * decl.c (init_decl_processing):  Re-arrange fields in
19862         class_type_node and and method_type_node to match kaffe 0.9.1.
19863         * class.c (make_method_value, make_class_data):  Update
19864         initializations to match.
19866 1997-07-16  Per Bothner  <bothner@cygnus.com>
19868         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
19869         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
19870         (push_super_field):  New function.
19871         (make_class_data):  Handle inheritance of class static initializer.
19872         (layout_class):  New name mangling.
19873         * constants.c (build_constant_data_ref):  Init type of data array
19874         to a one-element array.
19875         (build_constants_constructor):  Set DECL_SIZE from complete array type.
19876         * decl.c:  Rename class_type, object_type etc to class_type_node,
19877         object_type_node etc.  Make former inherit from latter.
19878         * expr.c (expand_invoke):  Add cast of function address.
19879         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
19880         * parse.c (yyparse):  Don't call layout_class here.
19881         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
19883 1997-06-14  Per Bothner  <bothner@cygnus.com>
19885         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
19886         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
19887         (alloc_class_constant):  New.
19888         * expr.c (expand_invoke):  Make sure method's class is initialized.
19889         * class.c (interits_from_p, emit_register_class):  New functions.
19890         * parse.c (yyparse):  Call emit_register_class.
19892 1997-06-09  Per Bothner  <bothner@cygnus.com>
19894         * constants.c:  New file, to handle constant pool.
19895         * Makefile.in (JAVA_OBJS):  Add constants.o.
19896         * decl.c (init_decl_processing):  Update, fix, finish various structs.
19897         (pushdecl_top_level):  New.
19898         * parse.c (layout_class):  Moved to class.c.
19899         * expr.c (java_push_constant_from_pool):  New function.
19900         * class.c (build_class_ref):  Make work fully
19901         (make_class_data):  Emit super-class, constant pool, interface vector.
19903 1997-06-03  Per Bothner  <bothner@cygnus.com>
19905         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
19906         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
19907         * class.c (class_depth):  New function.
19908         (lookup_named_class):  Replaced by new function lookup_class.
19909         * decl.c (object_type_node, string_type_node):  New.
19910         Remove various types that we no longer need.
19911         * expr.c (verify_jvm_instructions):  New separate verifier pass.
19912         (push_type, pop_type):  New functions for verifier.
19913         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
19914         (expand_byte_code):  Simplify, since we assume already verified.
19915         (expand_invoke):  Now mostly works.
19916         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
19917         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
19918         * parse.c:  Wait to allocate class object until we know its name.
19919         (layout_class):  Calculate DECL_VINDEX for each virtual method.
19920         * typeck.c (get_array_type):  Rename to ...
19921         (build_java_array_type):  ... and provide working implementation.
19922         (build_java_signature):  New function - build Java signature of type.
19923         (set_java_signature):  New function - cache signature with type.
19924         (lookup_java_method):  New function.
19926 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
19928         * class.c (ident_subst):  Take extra SUFFIX parameter.
19929         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
19930         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
19931         (build_class_ref):  Actually implement.
19932         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
19933         * decl.c (builtin_function):  New.
19934         (init_decl_processing):  Update for current Kaffe.  Declare some
19935         builtin Kaffe functions.
19936         * expr.c (build_address_of):  New.
19937         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
19938         Renamed (from expand_java_new etc), and added working implementations.
19939         (build_field_ref):  Now also handle static fields.
19940         (expand_invoke):  Implement invokestatic, and start implement rest.
19941         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
19942         * javaop.def:  Rename invokevirt -> invokevirtual.
19943         * lang.c (use_handles):  Removed.
19944         * parse.c:  Add support for ConstantValue attribute.
19945         Handle nested loading of a class.  (JPOOL_UTF):  New.
19947 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
19949         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
19951 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
19953         * Make-lang.in (java.install-man):  New empty rule.
19954         * typeck.c (set_local_type):  New function.
19955         * expr.c (STORE_INTERNAL):  Call find_local_variable,
19956         not find_stack_slot.  Call set_local_type.
19958 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
19960         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
19961         and building RECORD_TYPE CONSTRUCTORs.
19962         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
19964         * lang.c (use_handles):  Change the default to 0.
19965         * decl.c:  Define and build class_type, field_type, utf8const_type.
19966         * class.c (make_class_data, make_field_value,
19967         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
19968         hashUtf8String, strLengthUtf8, mangled_classname:
19969         Functions to build reflective data structures.
19970         * parse.c (yyparse):  Call make_class_data.
19972         * jcf-io.c (open_class, find_classfile):  New functions.
19973         * jcf-dump.c:  Support reading classfile from explicitly-named
19974         class file (without CLASSPATH searching).
19976 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19978         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
19979         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
19980         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
19981         (get_constant):  Now trivial for CONSTANT_Utf8.
19983         * jcf.h:  Make NEW_CPOOL the default.
19984         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
19986 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
19988         New directory.