OSDN Git Service

65a28f4f8530c1ef1117f8ded8bfa7a2007aef65
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2008-06-24  Tom Tromey  <tromey@redhat.com>
2
3         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
4         * expr.c (add_type_assertion): Rename argument.
5         (build_java_arrayaccess): Don't name variable 'throw'.
6         (ARRAY_NEW_MULTI): Don't name variable 'class'.
7         * jcf-io.c (find_class): Don't name variable 'class'.
8         * mangle.c (compression_table_add): Don't name variable 'new'.
9         * constants.c (cpool_for_class): Rename argument.
10         (alloc_constant_fieldref): Likewise.
11         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
12         'class'.
13         (read_class): Likewise.
14         (parse_zip_file_entries): Likewise.
15         (process_zip_dir): Likewise.
16         * decl.c (java_mark_class_local): Rename argument.
17         * class.c (GEN_TABLE): Use type_name, not typename.
18         (gen_indirect_dispatch_tables): Likewise.
19         (add_field): Rename argument.
20         (is_compiled_class): Likewise.
21         (safe_layout_class): Likewise.
22         (emit_assertion_table): Likewise.
23         * typeck.c (has_method): Rename argument.
24
25 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
26
27         * class.c (ident_subst, mangled_classname, unmangle_classname,
28         gen_indirect_dispatch_tables, add_method_1,
29         build_fieldref_cache_entry, make_local_function_alias,
30         layout_class, java_treetreehash_find, java_treetreehash_new,
31         split_qualified_name): Fix for -Wc++-compat.
32         * constants.c (set_constant_entry, cpool_for_class): Likewise.
33         * decl.c (make_binding_level, java_dup_lang_specific_decl,
34         start_java_method): Likewise.
35         * except.c (prepare_eh_table_type): Likewise.
36         * expr.c (type_assertion_hash, note_instructions): Likewise.
37         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
38         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
39         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
40         Likewise.
41         * jcf-parse.c (reverse, java_read_sourcefilenames,
42         annotation_grow, rewrite_reflection_indexes, java_parse_file,
43         process_zip_dir): Likewise.
44         * jcf-path.c (add_entry, add_path, jcf_path_init,
45         jcf_path_extdirs_arg): Likewise.
46         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
47         * jvgenmain.c (do_mangle_classname): Likewise.
48         * lang.c (put_decl_string): Likewise.
49         * verify-impl.c (make_state_copy, make_state, add_new_state):
50         Likewise.
51
52 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
53
54         * gcj.texi: Expand TABs, remove whitespace from blank lines.
55
56 2008-06-14  Tom Tromey  <tromey@redhat.com>
57
58         PR java/36247:
59         * class.c (build_class_ref): Initialize this_classdollar when
60         needed.
61
62 2008-05-23  Andrew Haley  <aph@redhat.com>
63
64         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
65         pathname of source file.
66
67 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
68
69         * jcf-dump.c (print_constant): Use
70         HOST_LONG_LONG_FORMAT.
71
72 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
73
74         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
75         DECL_PURE_P.
76
77 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
78
79         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
80         (build_classdollar_field): Don't set TREE_INVARIANT.
81         (get_dispatch_table): Don't set TREE_INVARIANT.
82         (make_class_data): Don't set TREE_INVARIANT.
83         (build_symbol_entry): Don't set TREE_INVARIANT.
84         (emit_symbol_table): Don't set TREE_INVARIANT.
85         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
86         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
87         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
88         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
89
90 2008-04-03  Tom Tromey  <tromey@redhat.com>
91
92         * Make-lang.in (java_OBJS): New variable.
93
94 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
95
96         * java-tree.h (insert_block): Kill.
97         * decl.c (insert_block): Kill.
98                 
99 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
100
101         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
102         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
103         gpl.texi.
104
105 2008-03-27  Tom Tromey  <tromey@redhat.com>
106
107         * Make-lang.in: Revert automatic dependency patch.
108
109 2008-03-25  Tom Tromey  <tromey@redhat.com>
110
111         * Make-lang.in: Removed most explicit .o targets.
112         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
113         ($(GCJ)$(exeext)): Update.
114         (JAVA_OBJS): New variable.
115         (JCFDUMP_OBJS): Reformat.
116         (java_OBJS): New variable.
117         (java/jvspec.o-warn): Update.
118         (java/parse.o-warn): Remove.
119         (JAVA_TREE_H): Remove.
120         (java/jcf-io.o): Reduce to variable setting.
121         (ALL_CPPFLAGS): Likewise.
122
123 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
124
125         * mangle.c (java_mangle_decl): Remove dead check.
126
127 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
128
129         * jcf-parse.c (java_parse_file): Assert binding levels are
130         left in order.
131         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
132         Delete.
133
134 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
135
136         * jcf-dump.c (version): Update copyright notice dates.
137
138 2008-02-29  Tom Tromey  <tromey@redhat.com>
139
140         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
141         method.
142         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
143
144 2008-02-26  Tom Tromey  <tromey@redhat.com>
145
146         * lang.c (java_post_options): Remove conditional.
147         * expr.c (expand_byte_code): Remove old location code.
148         * jcf-parse.c (set_source_filename): Remove old location code.
149         (give_name_to_class): Likewise.
150         (jcf_parse): Likewise.
151         (duplicate_class_warning): Likewise.
152         (parse_class_file): Likewise.
153         (java_parse_file): Likewise.
154         * decl.c (finish_method): Remove old location code.
155         * class.c (push_class): Remove old location code.
156
157 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
158
159         PR other/35107
160         * Make-lang.in (jc1): Add $(GMPLIBS).
161
162 2008-01-23  David Daney  <ddaney@avtrex.com>
163
164         * class.c (hide)  Rename to...
165         (java_hide_decl) ... this throughout, and make public.
166         * resource.c (Jr_count): Remove.
167         (compile_resource_data): Call java_mangle_resource_name to generate
168         decl name.  Make resource decl public and hidden.
169         * mangle.c (java_mangle_resource_name): New function.
170         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
171         functions.
172
173 2008-01-04  Andrew Haley  <aph@redhat.com>
174
175         PR java/17779
176         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
177         C90.
178
179 2008-01-03  Andrew Haley  <aph@redhat.com>
180
181         PR java/17779
182         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
183         we're about to re-layout the type.
184
185 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
186
187         * lang.c (java_classify_record): Don't return
188         RECORD_IS_INTERFACE for now.
189
190 2007-12-18  Andrew Haley  <aph@redhat.com>
191
192         PR java/27643
193         * jcf-parse.c (java_parse_file): Remove call to
194         java_mark_class_local.
195         (parse_class_file): Reinstate call to java_mark_class_local here.
196         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
197         already set, call java_mangle_decl() and make_decl_rtl() to
198         rewrite its name as a hidden alias.
199
200 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
201
202         PR debug/7081
203         * lang.c (java_classify_record): New.
204         (LANG_HOOKS_CLASSIFY_RECORD): Override.
205
206 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
207
208         PR 34081/C++
209         * decl.c (finish_method): Pass 'false' for the new
210         allocate_struct_function parameter.
211
212 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
213
214         * expr.c (build_jni_stub): Use the computed jni func type for
215         variable meth.
216
217 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
218
219         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
220
221 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
222
223         * expr.c (type_assertion_hash): Hash type uids rather than
224         tree pointers.
225
226 2007-11-17  David Daney  <ddaney@avtrex.com>
227             Andrew Haley  <aph@redhat.com>
228
229         * constants.c (build_constants_constructor):  Use POINTER_SIZE
230         insead of BITS_PER_WORD in big-endian work around.
231
232 2007-11-07  Tom Tromey  <tromey@redhat.com>
233
234         PR java/34019:
235         * gcj.texi (Input Options): Add missing noun.
236
237 2007-11-02  Tom Tromey  <tromey@redhat.com>
238
239         PR java/33765:
240         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
241         * zipfile.h (ZIPEMPTYMAGIC): New define.
242
243 2007-11-01  Tom Tromey  <tromey@redhat.com>
244
245         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
246         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
247         (java/jcf-io.o): Depend on zipfile.h.
248
249 2007-10-17  Richard Guenther  <rguenther@suse.de>
250
251         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
252         dependencies.
253
254 2007-10-03  Andrew Haley  <aph@redhat.com>
255
256         PR java/33639
257         * class.c (mangled_classname): Detect and replace illegal
258         characters in assembly language symbols.
259         (gen_indirect_dispatch_tables): Call mangled_classname() on
260         the type.
261
262 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
263
264         * lang.c (java_print_error_function): Add third argument.
265
266 2007-09-15  Tom Tromey  <tromey@redhat.com>
267
268         * java-tree.h (struct lang_decl_func) <function_decl_body>:
269         Remove.
270         <init_final>: Likewise.
271         * lang.c (java_dump_tree): Update.
272         * java-tree.h (DECL_FUNCTION_BODY): Remove.
273
274 2007-09-11  Jan Hubicka <jh@suse.cz>
275
276         * decl.c (java_expand_body): Kill.
277         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
278
279 2007-09-06  Tom Tromey  <tromey@redhat.com>
280
281         * jcf-parse.c (parse_class_file): Re-enter the current file.
282
283 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
284
285         * boehm.c (mark_reference_fields): Move misaligned pointer check
286         after JREFERENCE_TYPE_P test
287
288 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
289
290         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
291         if pointer is misaligned.
292
293 2007-09-06  Tom Tromey  <tromey@redhat.com>
294
295         * lang.c (java_post_options): Update.
296         * jcf-parse.c (set_source_filename): Update.
297         (give_name_to_class): Update.
298         (jcf_parse): Update.
299         (duplicate_class_warning): Update.
300         (parse_class_file): Update.
301         (java_parse_file): Update.
302         * expr.c (expand_byte_code): Update.
303
304 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
305
306         * decl.c (finish_method): Use set_cfun.
307
308 2007-09-04  Andrew Haley  <aph@redhat.com>
309
310         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
311         when using the ARM EABI.
312
313 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
314
315         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
316
317 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
318
319         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
320         CONST_CAST.
321         * jcf.h (JCF_FINISH): Likewise.
322
323 2007-08-28  Tom Tromey  <tromey@redhat.com>
324
325         * Make-lang.in (java.tags): Don't tag '*.y' files.
326
327 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
328
329         * lang.c (java_decl_ok_for_sibcall): Likewise.
330
331 2007-08-21  Paul Brook  <paul@codesourcery.com>
332             Nathan Sidwell  <nathan@codesourcery.com>
333             Mark Mitchell  <mark@codesourcery.com>
334             Joseph Myers  <joseph@codesourcery.com>
335
336         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
337         date.
338
339 2007-08-20  Richard Guenther  <rguenther@suse.de>
340
341         * lang.c (java_tree_inlining_walk_subtrees): Remove.
342         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
343
344 2007-08-17  Tom Tromey  <tromey@redhat.com>
345
346         * typeck.c (find_method_in_interfaces): Update.
347         * jcf-parse.c (load_class): Update.
348         * java-gimplify.c (java_gimplify_component_ref): Removed.
349         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
350         arguments.
351         (java_gimplify_expr): Update.
352         * decl.c (java_init_decl_processing): Update.
353         * class.c (set_constant_value): Update.
354         (make_class_data): Update.
355         (finish_class): Update.
356         (build_static_field_ref): Update.
357         (is_compiled_class): Update.
358         (maybe_layout_super_class): Update.
359         (layout_class): Update.
360         (layout_class_method): Update.
361         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
362         (lang_decl_var) <am, final_iud, cif>: Removed fields.
363         (lang_decl_func) <init_calls_this>: Removed field.
364         (lang_type) <dot_class, verify_method>: Removed fields.
365         (FIELD_NESTED_ACCESS): Removed.
366         (FIELD_NESTED_ACCESS_P): Removed.
367         (DECL_FIELD_FINAL_IUD): Removed.
368         (DECL_LOCAL_FINAL_IUD): Removed
369         (LOCAL_FINAL_P): Removed.
370         (FINAL_VARIABLE_P): Removed.
371         (CLASS_FINAL_VARIABLE_P): Removed.
372         (DECL_BIT_INDEX): Removed.
373         (DECL_INIT_CALLS_THIS): Removed.
374         (FIELD_LOCAL_ALIAS): Removed.
375         (FIELD_LOCAL_ALIAS_USED): Removed.
376         (FIELD_THISN): Removed.
377         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
378         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
379         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
380         (TYPE_DOT_CLASS): Removed.
381         (TYPE_VERIFY_METHOD): Removed.
382         (ID_CLASSDOLLAR_P): Removed.
383         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
384         Removed.
385         (classdollar_identifier_node): Removed.
386         (TYPE_UNKNOWN): Removed.
387         (CLASS_FROM_SOURCE_P): Removed.
388         * expr.c (build_jni_stub): Update.
389         (force_evaluation_order): Update.
390         (build_java_empty_stmt): Update.
391         (build_class_init): Update.
392         (java_stack_swap): Update.
393         (build_jni_stub): Update.
394
395 2007-08-17  Tom Tromey  <tromey@redhat.com>
396
397         * java-tree.h (LABEL_TYPE_STATE): Removed.
398         (load_type_state): Removed.
399         (LABEL_PC): Removed.
400         (LABEL_VERIFIED): Removed.
401         (type_states): Declare.
402         * expr.c (type_states): New global.
403         (load_type_state): Now static.  Use type_states.  Changed
404         argument.
405         (lookup_label): Don't set LABEL_PC.
406         (expand_byte_code): Don't use LABEL_VERIFIED.
407         (note_instructions): Initialize type_states.
408         * verify-glue.c (vfy_note_stack_depth): Rewrote.
409         (vfy_note_stack_type): Use type_states.
410         (vfy_note_local_type): Likewise.
411
412 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
413
414         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
415         * jcf.h (JCF_FINISH): Likewise.
416
417 2007-07-31  Nick Clifton  <nickc@redhat.com>
418
419         * java-gimplify.c: Change copyright header to refer to version 3
420         of the GNU General Public License and to point readers at the
421         COPYING3 file and the FSF's license web page.
422         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
423         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
424         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
425         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
426         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
427         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
428         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
429
430 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
431
432         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
433
434 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
435
436         * lang.c (java_get_callee_fndecl): Constify.
437
438 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
439
440         * mangle.c (set_type_package_list): Constify.
441         * verify-glue.c (vfy_make_string): Delete.
442         * verify.h (vfy_make_string): Likewise.
443
444 2007-07-26  Tom Tromey  <tromey@redhat.com>
445
446         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
447         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
448         EXIT_BLOCK_LABELED_BLOCK): Likewise.
449         * lang.c (java_tree_inlining_walk_subtrees): Update.
450         (java_dump_tree): Likewise.
451         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
452         Remove.
453         * decl.c (push_labeled_block, pop_labeled_block): Remove.
454         * java-gimplify.c (java_gimplify_labeled_block_expr,
455         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
456         (java_gimplify_expr): Update.
457
458 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
459
460         * class.c (java_treetreehash_hash, java_treetreehash_compare):
461         Constify. 
462         * expr.c (type_assertion_eq): Likewise.
463         * jcf-io.c (compare_path): Likewise.
464         * jcf-parse.c (cmpstringp): Likewise.
465         * verify-impl.c (get_one_type, compute_argument_types,
466         compute_return_type): Likewise. 
467
468 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
469
470         PR target/32462
471         PR libgcj/32465
472         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
473
474 2007-07-12  Richard Guenther  <rguenther@suse.de>
475
476         * expr.c (expand_java_return): RETURN_EXPR has void type.
477         (build_jni_stub): Likewise.  Use a comparison against zero
478         for null-pointer test in COND_EXPR.
479         (build_field_ref): Build POINTER_PLUS_EXPR with correct
480         type.  Convert result instead.
481         (build_invokevirtual): Likewise.
482
483 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
484
485         PR 32617
486         * lang.c (java_init): Remove setting of force_align_functions_log.
487         * class.c (add_method_1): Set DECL_ALIGN of non-static method
488         to cope with ptrmemfunc_vbit_in_pfn.
489
490 2007-07-03  David Daney  <ddaney@avtrex.com>
491
492         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
493         include path.
494         (doc/gcj.dvi): Same.
495         (doc/gcj.pdf): Same.
496         (java/index.html): Same.
497
498 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
499
500         * class.c (make_class_data): Build the index in sizetype.
501         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
502         adding to a pointer type.
503         (build_symbol_entry): Likewise.
504         * expr.c (build_java_arrayaccess): Likewise.
505         (build_field_ref): Likewise.
506         (build_known_method_ref): Likewise.
507         (build_invokevirtual): Likewise.
508         * except.c (build_exception_object_ref): Do a
509         NEGATIVE and then a POINTER_PLUS_EXPR instead
510         of a MINUS_EXPR.
511
512 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
513
514         * typeck.c (java_signed_type): Remove.
515         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
516         * java-tree.h (java_signed_type): Remove.
517
518 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
519
520         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
521         (print_constant): Likewise.
522
523 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
524
525         * expr.c (build_java_binop): Use unsigned_type_for instead of
526         java_unsigned_type.
527         * java-tree.h (java_unsigned_type): Remove.
528         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
529         * typeck.c (java_unsigned_type): Remove.
530
531 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
532
533         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
534         instead of checking GIMPLE_STMT_P in chain_next.
535
536 2007-04-06  Colin Walters  <walters@redhat.com>
537
538         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
539         * jcf-io.c (open_class): Copy 'filename'.
540
541 2007-04-03  Andrew Haley  <aph@redhat.com>
542
543         * jvgenmain.c (main): Change main to use class$, not class$$.
544         (do_mangle_classname): Likewise.
545         * class.c (hide): New function.
546         (add_field): Hide everything that shouldn't be visible outside a
547         DSO.
548         (build_static_class_ref): Likewise.
549         (build_classdollar_field): Likewise.
550         (make_class_data): Likewise.
551         (layout_class_method): Likewise.
552         * expr.c (special_method_p): New function.
553
554         * class.c (push_class): Don't bogusly guess the source filename.
555         * jcf-parse.c (give_name_to_class): Don't set input_location from
556         DECL_ARTIFICIAL decls.
557
558 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
559
560         * typeck.c (java_signed_or_unsigned_type): Removed.
561         (java_signed_type): use get_signed_or_unsigned_type instead of
562         java_signed_or_unsigned_type.
563         (java_unsigned_type): Ditto.
564         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
565         * java-tree.h (java_signed_or_unsigned_type): Removed.
566
567 2007-03-26  Tom Tromey  <tromey@redhat.com>
568
569         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
570         (java.maintainer-clean): Likewise.
571         (java.install-man): Likewise.
572         (.INTERMEDIATE): Removed grmiregistry.pod.
573         (grmiregistry.pod): Removed.
574         * gcj.texi (Invoking gcjh): Removed.
575         (Invoking gjnih): Likewise.
576         (Invoking grmiregistry): Likewise.
577         (direntry): Updated.
578         (Top): Likewise.
579         (which-gcj): Removed.
580
581 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
582
583         * Make-lang.in: Add install-pdf target as copied from
584         automake v1.10 rules.
585
586 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
587
588         * gcj.texi: Standardize title page.
589
590 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
591
592         * class.c: Fix a comment typo.
593
594 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
595             Brooks Moses  <brooks.moses@codesourcery.com>
596             Lee Millward  <lee.millward@codesourcery.com>
597
598         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
599         of build3.
600         (BUILD_MONITOR_EXIT): Likewise.
601
602         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
603         (java_gimplify_modify_expr): Likewise.
604
605         * class.c (cache_this_class_ref): Use build_call_expr.
606         (build_static_field_ref): Likewise.
607         (emit_indirect_register_classes): Likewise.
608         (emit_register_classes): Likewise.
609
610         * resource.c (write_resource_constructor): Use build_call_expr.
611
612         * builtins.c (builtin_creator_function): Change interpretation of
613         the second parameter to be the whole CALL_EXPR instead of the arglist.
614         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
615         (min_builtin): Likewise.
616         (abs_builtin): Likewise.
617         (java_build_function_call_expr): Likewise.
618         (convert_real): Likewise.
619         (UNMARSHAL3): Likewise.
620         (UNMARSHAL4): Likewise.
621         (UNMARSHAL5): Likewise.
622         (build_arglist_for_builtin): Delete.  Fix callers to use
623         build_call_expr instead.
624         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
625         accessors.
626         (compareAndSwapInt_builtin): Likewise.
627         (compareAndSwapLong_builtin): Likewise.
628         (compareAndSwapObject_builtin): Likewise.
629         (putVolatile_builtin): Likewise.
630         (getVolatile_builtin): Likewise.
631         (VMSupportsCS8_builtin): Likewise.
632         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
633         instead of arglist.
634
635         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
636         (build_java_throw_out_of_bounds_exception): Likewise.
637         (java_check_reference): Likewise.
638         (build_java_arraystore_check): Likewise.
639         (build_newarray): Likewise.
640         (build_anewarray): Likewise.
641         (expand_java_multinewarray): Use build_call_list instead of build3.
642         (build_java_monitor): Use build_call_nary instead of build3.
643         (java_create_object): Likewise.
644         (expand_java_NEW): Likewise.
645         (build_instanceof): Likewise.
646         (expand_java_CHECKCAST): Likewise.
647         (build_java_soft_divmod): Likewise.
648         (build_java_binop): Likewise.
649         (build_field_ref): Likewise.
650         (build_class_init): Likewise.
651         (rewrite_arglist_getcaller): Use build_call_expr.
652         (build_invokeinterface):  Use build_call_nary instead of build3.
653         (expand_invoke): Use build_call_list instead of build3.
654         (build_jni_stub): Use build_call_nary, build_call_list, or
655         build_call_expr instead of build3.
656         (expand_java_field_op): Use build_call_expr instead of build3.
657         (force_evaluation_order): Use new CALL_EXPR accessors.
658
659         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
660
661 2007-02-15  David Daney  <ddaney@avtrex.com>
662
663         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
664         (java.maintainer-clean):Add gc-analyze.1.
665         (.INTERMEDIATE): Add gc-analyze.pod.
666         (gc-analyze.pod): New rule.
667         (java.install-man): Install gc-analyze.1
668         * gcj.texi: Add new section for the gc-analyze program.
669
670 2007-02-07  Andrew Haley  <aph@redhat.com>
671
672         * class.c (uncache_this_class_ref): New.
673         * expr.c (build_jni_stub): Initialize the class.
674         (expand_byte_code): Call uncache_this_class_ref after generating
675         code.
676
677 2007-02-06  Tom Tromey  <tromey@redhat.com>
678
679         PR java/30714:
680         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
681
682 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
683
684         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
685
686 2007-02-02  Andrew Haley  <aph@redhat.com>
687
688         * expr.c (expand_byte_code): Call cache_this_class_ref() and
689         cache_cpool_data_ref().
690         Set TYPE_CPOOL_DATA_REF.
691         (cache_cpool_data_ref): New function.
692         * constants.c (build_ref_from_constant_pool): Remove special-case
693         code for flag_indirect_classes.
694         (build_constant_data_ref): Move special-case code for
695         flag_indirect_classes here from build_ref_from_constant_pool.
696         * decl.c (finish_method): Move class initialization from here to
697         cache_this_class_ref.
698         * class.c (cache_this_class_ref): New function.
699         (build_class_ref): Use this_classdollar for the ouput class.
700
701 2007-02-02  David Daney  <ddaney@avtrex.com>
702
703         * class.c (is_compiled_class): Move check to avoid reloading
704         current class.
705         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
706         already set.
707
708 2007-02-01  Andrew Haley  <aph@redhat.com>
709
710         PR java/30641
711         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
712
713 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
714
715         * class.c, jcf-parse.c: Fix comment typos.
716
717 2007-01-30  Tom Tromey  <tromey@redhat.com>
718
719         * gcj.texi (Strings): Fix documentation for JvNewString.
720
721 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
722
723         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
724         typos.
725
726 2007-01-30  Ben Elliston  <bje@au.ibm.com>
727
728         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
729
730 2007-01-29  Tom Tromey  <tromey@redhat.com>
731
732         PR java/30607:
733         * jvspec.c (lang_specific_driver): Handle separate -I argument.
734         * lang.opt (-I): Add 'Separate'.
735
736 2007-01-29  Andrew Haley  <aph@redhat.com>
737
738         * class.c (add_method_1): Mark fndecl as external unless we are
739         compiling it into this object file.
740
741 2007-01-24  Andrew Haley  <aph@redhat.com>
742
743         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
744         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
745
746 2007-01-22  Andrew Haley  <aph@redhat.com>
747
748         * builtins.c (VMSupportsCS8_builtin): New function.
749
750 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
751
752         PR java/30454
753         * jcf-io.c (opendir_in_zip): Close the file
754         and free zipf before returning after an error.
755
756 2007-01-16  Tom Tromey  <tromey@redhat.com>
757
758         * java-tree.def: Added copyright header.
759
760 2007-01-15  Tom Tromey  <tromey@redhat.com>
761
762         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
763         case.
764         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
765         Removed case.
766         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
767         (EXPR_WFL_NODE): Likewise.
768         (EXPR_WFL_LINECOL): Likewise.
769         (EXPR_WFL_FILENAME): Likewise.
770         (EXPR_WFL_LINENO): Likewise.
771         (build_expr_wfl, expr_add_location): Don't declare.
772         (build_unknown_wfl): Removed.
773         (EXPR_WFL_FILENAME_NODE): Removed.
774         (EXPR_WFL_COLNO): Removed.
775         (EXPR_WFL_SET_LINECOL): Removed.
776         (DECL_FUNCTION_WFL): Removed.
777         (DECL_FIELD_FINAL_WFL): Removed.
778         (struct lang_decl_func) <wfl>: Removed field.
779         <called_constructor>: Likewise.
780         <inner_access>: Likewise.
781         (struct lang_decl_var) <wfl>: Removed field.
782         (DECL_CONSTRUCTOR_CALLS): Removed.
783         (DECL_FUNCTION_ACCESS_DECL): Likewise.
784         (DECL_FUNCTION_INNER_ACCESS): Likewise.
785         (DECL_SPECIFIC_COUNT): Likewise.
786         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
787         * expr.c (build_expr_wfl): Removed.
788         (expr_add_location): Likewise.
789
790 2007-01-12  Tom Tromey  <tromey@redhat.com>
791
792         * jcf-dump.c (main): Updated call to find_class.
793         * lang.c (java_init): Removed dead code.
794         * jcf-parse.c (read_class): Don't use java_source field.  Removed
795         dead code.
796         (parse_zip_file_entries): Don't use java_source field.
797         (process_zip_dir): Likewise.
798         (jcf_parse): Removed dead code.
799         (java_parse_file): Likewise.
800         (read_class): Updated call to find_class.
801         * jcf-io.c (find_class): Don't use java_source field.  Removed
802         'source_ok' argument, .java logic.
803         * jcf.h (JCF) <java_source>: Removed field.
804         (JCF_ZERO): Updated.    (find_class): Updated.
805         * decl.c: Removed dead code.
806         * class.c: Removed dead code.
807
808 2007-01-11  Tom Tromey  <tromey@redhat.com>
809
810         * typeck.c (convert): Don't use flag_emit_class_files.
811         * lang.c (java_post_options): Don't use flag_emit_class_files.
812         (java_handle_option): Don't use flag_extraneous_semicolon or
813         flag_redundant.
814         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
815         flag_emit_class_files.
816         (load_class): Likewise.
817         * java-tree.h (flag_emit_class_files): Don't declare.
818         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
819         (flag_extraneous_semicolon): Don't declare.
820         (flag_not_overriding): Likewise.
821         (flag_static_local_jdk1_1): Likewise.
822         (flag_redundant): Likewise.
823         * expr.c (build_newarray): Don't use flag_emit_class_files.
824         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
825         flag_emit_class_files.
826         (build_class_ref): Likewise.
827         * builtins.c (check_for_builtin): Don't use
828         flag_emit_class_files.
829
830 2007-01-10  Tom Tromey  <tromey@redhat.com>
831
832         * lang.c (java_can_use_bit_fields_p): Removed.
833         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
834
835 2007-01-09  Andrew Haley  <aph@redhat.com>
836
837         * expr.c (build_java_arrayaccess): Rewrite to generate array
838         access in canonical form.
839         (expand_java_arraystore): Use build_fold_addr_expr() on address of
840         array access.
841
842 2007-01-03  Andrew Haley  <aph@redhat.com>
843
844         PR java/28754
845         * expr.c (expand_java_field_op): If we're initializing a field's
846         declaring interface we should not also initialize the class
847         context in which it was referenced.
848
849 2007-01-02  Tom Tromey  <tromey@redhat.com>
850
851         * java-tree.h (compiling_from_source, current_encoding,
852         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
853         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
854         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
855         JTI_WFL_OPERATOR): Removed
856         (finit_identifier_node, instinit_identifier_node,
857         length_identifier_node, super_identifier_node,
858         continue_identifier_node, access0_identifier_node, wfl_operator):
859         Removed.
860         (cyclic_inheritance_report,
861         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
862         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
863         DECL_FIXED_CONSTRUCTOR_P): Removed.
864         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
865         Removed.
866         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
867         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
868         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
869         import_list, import_demand_list>: Removed.
870         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
871         cxx_keyword_p): Removed.
872         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
873         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
874         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
875         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
876         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
877         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
878         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
879         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
880         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
881         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
882         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
883         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
884         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
885         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
886         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
887         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
888         java_parse_abort_on_error, extract_field_decl): Removed.
889         (finput): Declare.
890         * lang.c: (compiling_from_source, current_encoding): Removed.
891         (java_handle_option): Ignore -fencoding.
892         * parse.h: Don't include lex.h.
893         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
894         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
895         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
896         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
897         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
898         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
899         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
900         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
901         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
902         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
903         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
904         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
905         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
906         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
907         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
908         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
909         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
910         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
911         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
912         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
913         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
914         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
915         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
916         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
917         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
918         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
919         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
920         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
921         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
922         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
923         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
924         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
925         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
926         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
927         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
928         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
929         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
930         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
931         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
932         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
933         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
934         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
935         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
936         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
937         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
938         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
939         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
940         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
941         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
942         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
943         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
944         SET_CPC_STATIC_INITIALIZER_STMT,
945         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
946         java_complete_class, java_check_circular_reference,
947         java_fix_constructors, java_layout_classes, java_reorder_fields,
948         java_method_add_stmt, java_get_line_col, reset_report,
949         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
950         java_finish_classes, ctxp, ctxp_for_generation,
951         ctxp_for_generation_last): Removed.
952         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
953         * mangle.c (utf8_cmp): New function.
954         (cxx_keywords): New global.
955         (cxx_keyword_p): New function.
956         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
957         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
958         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
959         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
960         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
961         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
962         * Make-lang.in (java.srcextra): Do nothing.
963         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
964         (JAVA_OBJS): Don't mention deleted files.
965         (java.mostlyclean): Likewise.
966         (java.clean): Likewise.
967         (JAVA_LEX_C): Removed.
968         (buffer.o, check-init.o, parse.o): Remove unused targets.
969         (typeck.o): Updated.
970         * jcf-parse.c (read_class): Comment out unused code.
971         (java_layout_seen_class_methods): New function.
972         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
973         Removed.
974         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
975         (init_jcf_parse): Removed.
976         * config-lang.in (gtfiles): Remove deleted files.
977         * decl.c (java_init_decl_processing): Don't initialize
978         finit_identifier_node, instinit_identifier_node,
979         length_identifier_node, super_identifier_node,
980         continue_identifier_node, access0_identifier_node.  Don't call
981         init_jcf_parse.
982         * class.c (cyclic_inheritance_report): New global.
983         (add_method_1): Don't use
984         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
985         (maybe_layout_super_class): Comment out code.
986         (safe_layout_class): New function.
987         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
988         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
989         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
990         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
991         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
992         (java_gimplify_case_expr): Removed.
993         (java_gimplify_default_expr): Likewise.
994         (java_gimplify_new_array_init): Likewise.
995         * parse.y: Removed.
996         * keyword.gperf, keyword.h: Removed.
997         * chartables.h: Removed.
998         * check-init.c: Removed.
999         * buffer.c, buffer.h: Removed.
1000         * convert.h: Removed.
1001         * gen-table.pl: Removed.
1002         * lex.c, lex.h: Removed.
1003
1004 2007-01-02  Andrew Haley  <aph@redhat.com>
1005
1006         * expr.c (expand_java_arraystore): Make sure we perform a bounds
1007         check at runtime before we perform a type check.
1008
1009 2006-12-19  Andrew Haley  <aph@redhat.com>
1010
1011         * decl.c: Bump minor BC ABI version.
1012
1013 2006-12-13  Gary Benson  <gbenson@redhat.com>
1014
1015         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1016
1017 2006-12-12  Tom Tromey  <tromey@redhat.com>
1018
1019         * lang-specs.h: Pass -M options to jc1.
1020         * jcf-depend.c (jcf_dependency_add_file): Don't emit
1021         dependencies.
1022
1023 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
1024
1025         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1026
1027 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
1028
1029         * lang-specs.h: Pass '%U'-based options as separate arguments.
1030
1031 2006-12-05  Tom Tromey  <tromey@redhat.com>
1032
1033         PR java/29495:
1034         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1035         classes as well.
1036         * class.c (add_field): Handle ACC_SYNTHETIC.
1037         (add_method_1): Likewise.  Handle bridge and varargs.
1038         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1039         annotation.
1040         (set_class_decl_access_flags): Handle synthetic and annotation.
1041         * java-tree.h (METHOD_BRIDGE): New macro.
1042         (METHOD_VARARGS): Likewise.
1043         (TYPE_SYNTHETIC): Likewise.
1044         (TYPE_ANNOTATION): Likewise.
1045         (lang_type): New fields 'synthetic' and 'annotation'.
1046         (lang_decl_func): New fields 'varargs' and 'bridge'.
1047
1048 2006-12-04  Andrew Haley  <aph@redhat.com>
1049
1050         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1051         there's no map.
1052
1053 2006-11-29  Gary Benson  <gbenson@redhat.com>
1054
1055         * expr.c (rewrite_arglist_getcaller): Reorder.
1056
1057 2006-11-29  Andrew Haley  <aph@redhat.com>
1058
1059         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1060         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1061
1062 2006-11-23  Andrew Haley  <aph@redhat.com>
1063
1064         * expr.c (rewrite_arglist_getcaller): New.
1065         (rewrite_arglist_getclass): Fix indentation.
1066         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
1067         gnu.classpath.VMStackWalker.getCallingClassLoader().
1068         * builtins.c (initialize_builtins): Remove duplicate def'n of
1069         __sync_synchronize.
1070         Add __builtin_return_address.
1071
1072 2006-11-22  Andrew Haley  <aph@redhat.com>
1073
1074         * jcf-reader.c (get_attribute): Mark attr_type unused.
1075
1076         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1077
1078 2007-01-08  Richard Guenther  <rguenther@suse.de>
1079
1080         * lex.c (do_java_lex): Use build_int_cst_wide_type.
1081         * jcf-parse.c (get_constant): Likewise.
1082
1083 2006-11-12  Jan Hubicka  <jh@suse.cz>
1084
1085         * resource.c (compile_resource_data): Update for new varpool names.
1086         * java/class.c (build_utf8_ref): Likewise.
1087
1088 2006-11-12  David Daney  <ddaney@avtrex.com>
1089
1090         PR java/29805
1091         * typeck.c (build_java_array_type): Increase buffer sizes.
1092
1093 2006-11-11  Richard Guenther  <rguenther@suse.de>
1094
1095         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1096         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1097
1098 2006-11-06  Andrew Haley  <aph@redhat.com>
1099
1100         * java-tree.h (CONSTANT_LazyFlag): New.
1101         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1102         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1103         reflection_data.
1104         (handle_constant): Return 0 for dummy cpool entries.
1105         Handle constants of kind Class.
1106         Handle constants of kind NameAndType.
1107         (handle_enclosingmethod_attribute): New.
1108         (handle_signature_attribute): New.
1109         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1110         (HANDLE_SIGNATURE_ATTRIBUTE): New.
1111         (handle_constant): Use unmangle_classname()rather than calling
1112         identifier_subst() directly.
1113
1114 2006-11-02  Andrew Haley  <aph@redhat.com>
1115
1116         * java-tree.h (FIELD_ENUM): New.
1117         (lang_decl_var.field_enum): New.
1118         (lang_type.enum_class): New.
1119         (CLASS_ENUM): New.
1120         * class.c (set_class_decl_access_flags): Handle enum types.
1121         (add_field): Handle enum fields.
1122         (get_access_flags_from_decl): Likewise.
1123
1124         * class.c (make_class_data): Put reflection_data into rodata.
1125
1126 2006-11-01  Andrew Haley  <aph@redhat.com>
1127
1128         * jcf-parse.c (field_offsets, bit_obstack): New variables.
1129         (jcf_parse): Write end marker to annotation_data.
1130         (java_parse_file): Create field_offsets bitmap.  Destroy it.
1131         (annotation_grow, annotation_rewrite_byte) 
1132         (annotation_rewrite_short, annotation_rewrite_int) 
1133         (annotation_read_short, annotation_write_byte) 
1134         (annotation_write_short, annotation_write_int) 
1135         (handle_long_constant, handle_constant, handle_element_value) 
1136         (handle_annotation, handle_annotations) 
1137         (handle_annotation_attribute, rewrite_reflection_indexes) 
1138         (handle_member_annotations, handle_parameter_annotations) 
1139         (handle_default_annotation): New functions.
1140         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
1141         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
1142         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1143         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1144         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1145         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
1146         (TYPE_REFLECTION_DATA): New.
1147         (TYPE_REFLECTION_DATASIZE): New.
1148         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1149         an enum.
1150         * jcf-reader.c (get_attribute): Pass field/method index and
1151         attribute type to get_attribute().
1152         * constants.c (find_class_or_string_constant): Make nonstatic.
1153         (cpool_for_class): Likewise.
1154         (build_constants_constructor): Separate string and scalar types.
1155         * class.c (make_class_data): Generate field_indexes permutation.
1156         Pass it to rewrite_reflection_indexes().
1157         (make_class_data): Generate constructor for reflection_data field.
1158
1159 2006-10-20  Tom Tromey  <tromey@redhat.com>
1160
1161         * gcj.texi (Top): Don't mention jv-scan.
1162         (Invoking gcj): Likewise.
1163         (Invoking gcjh): Likewise.
1164         (Invoking gjnih): Likewise.
1165         (Invoking gij): Likewise.
1166         (Invoking gcj-dbtool): Likewise.
1167         (Invoking jv-scan): Removed.
1168         * parse-scan.y: Removed.
1169         * jv-scan.c: Removed.
1170         * config-lang.in (stagestuff): Don't mention jv-scan.
1171         * Make-lang.in (java): Removed jv-scan.
1172         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1173         (JVSCAN_OBJS): Removed.
1174         (jv-scan$(exeext)): Likewise.
1175         (JAVA_MANFILES): Removed jv-scan.1.
1176         (java.uninstall): Don't mention jv-scan.
1177         (java.mostlyclean): Likewise.
1178         (java.maintainer-clean): Likewise.
1179         (.INTERMEDIATE): Likewise.
1180         (java/jv-scan.o): Removed.
1181         (jv-scan.pod): Likewise.
1182         (java.srcextra): Don't mention parse-scan.c.
1183         (java.mostlyclean): Likewise.
1184         (java/parse-scan.c): Removed.
1185         (java/parse-scan.o-warn): Removed.
1186         (java/parse-scan.o): Removed.
1187
1188 2006-10-20  Tom Tromey  <tromey@redhat.com>
1189
1190         * lang.c (java_handle_option): Don't use
1191         jcf_write_base_directory.
1192         * jcf.h (jcf_write_base_directory): Removed.
1193         * parse.y (java_expand_classes): Don't call write_classfile.
1194         * config-lang.in (gtfiles): Removed jcf-write.c.
1195         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1196         (java/jcf-write.o): Removed.
1197         * jcf-parse.c (parse_class_file): Don't call write_classfile.
1198         * java-tree.h (write_classfile): Removed declaration.
1199         * jcf-write.c: Removed.
1200
1201 2006-10-20  Tom Tromey  <tromey@redhat.com>
1202
1203         * Make-lang.in (java): Removed gjnih, gcjh.
1204         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1205         (GCJH_OBJS): Removed.
1206         (GJNIH_OBJS): Likewise.
1207         (gjnih$(exeext)): Likewise.
1208         (gcjh$(exeext)): Likewise.
1209         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1210         (java.install-common): Don't special case gcjh.
1211         (java.uninstall): Don't mention gcjh, gjnih.
1212         (java.mostlyclean): Likewise.
1213         (java.maintainer-clean): Likewise.
1214         (.INTERMEDIATE): Likewise.
1215         (gcjh.pod): Removed.
1216         (gjnih.pod): Likewise.
1217         (GCJH_TARGET_INSTALL_NAME): Removed.
1218         (java/gjavah-jni.o): Removed.
1219         (java/gjavah.o): Likewise.
1220         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1221         * gjavah.c: Removed.
1222
1223 2006-10-17  Tom Tromey  <tromey@redhat.com>
1224
1225         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1226         "string" case.
1227
1228 2006-10-17  Tom Tromey  <tromey@redhat.com>
1229
1230         * jvgenmain.c (main): Handle -findirect-dispatch.
1231         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1232         jvgenmain.
1233
1234 2006-10-06  Andrew Haley  <aph@redhat.com>
1235
1236         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1237         have a compare_and_swap builtin.
1238         (compareAndSwapLong_builtin): Likewise.
1239         (compareAndSwapObject_builtin): Likewise.
1240
1241 2006-10-04  Andrew Haley  <aph@redhat.com>
1242
1243         * builtins.c (java_builtins): Add compareAndSwapInt,
1244         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1245         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1246         putObjectVolatile, getObjectVolatile, getIntVolatile,
1247         getLongVolatile, getLong.
1248         (UNMARSHAL3): New macro.
1249         (UNMARSHAL4): Likewise.
1250         (UNMARSHAL5): Likewise.
1251         (build_arglist_for_builtin): New function.
1252         (build_addr_sum, build_check_this): New functions.
1253         (putObject_builtin. compareAndSwapInt_builtin,
1254         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1255         putVolatile_builtin, getVolatile_builtin): New builtins.
1256
1257 2006-06-08  Andrew Haley  <aph@redhat.com>
1258  
1259         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1260         get_symbol_table_index().
1261         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1262         private method.
1263         (build_known_method_ref): New arg: special.  Pass it to
1264         get_symbol_table_index.
1265         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1266         the method list.
1267         (build_invokevirtual): New arg: special.  Pass it to
1268         get_symbol_table_index.
1269         (expand_invoke): New variable: special.
1270         Pass it to maybe_rewrite_invocation().
1271         Pass it to build_known_method_ref().
1272         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1273         build the symbol table conbstructor.
1274         (emit_symbol_table): Extract SPECIAL from the method list and pass
1275         it to build_symbol_entry().
1276         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1277         special accordingly.
1278  
1279 2006-09-08  Andrew Haley  <aph@redhat.com>
1280
1281         * class.c (layout_class_method): Use build_java_signature, not
1282         build_java_argument_signature.  Use lookup_java_method, not
1283         lookup_argument_method.
1284
1285 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1286             Bryce McKinlay  <bryce@mckinlay.net.nz>
1287
1288         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1289
1290 2006-07-18  Tom Tromey  <tromey@redhat.com>
1291
1292         * lang.opt: Added missing -W options.
1293
1294 2006-07-12  Tom Tromey  <tromey@redhat.com>
1295
1296         PR java/28329:
1297         * lang-specs.h: Pass '%U'-based options as separate arguments.
1298         Use -faux-classpath.
1299         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1300         * lang.opt (faux-classpath): New option.
1301
1302 2006-07-07  Tom Tromey  <tromey@redhat.com>
1303
1304         * class.c (make_class_data): Set value for reflection_data field.
1305         * decl.c (java_init_decl_processing): Add reflection_data field.
1306
1307 2006-07-07  Tom Tromey  <tromey@redhat.com>
1308
1309         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1310         earlier.
1311         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1312
1313 2006-07-07  Andrew Haley  <aph@redhat.com>
1314
1315         * jcf-parse.c (set_source_filename): Don't check for
1316         CLASS_FROM_CURRENTLY_COMPILED_P.
1317         Remove // comments.
1318
1319 2006-07-07  Andrew Haley  <aph@redhat.com>
1320
1321         * java-tree.h (java_read_sourcefilenames): Declare.
1322         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1323         * lang.opt (fsource-filename): New opt.
1324         * lang-specs.h: Add -fsource-filename.
1325         * jcf-parse.c (num_files, filenames): New variables.
1326         (reverse, cmpstringp, java_read_sourcefilenames,
1327         find_sourcefile): New.
1328         (set_source_filename): Call find_sourcefile to find the real name
1329         of a source file.
1330
1331 2006-06-27  Tom Tromey  <tromey@redhat.com>
1332
1333         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1334         Signature, LocalVariableTypeTable, annotation attributes.
1335         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1336         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1337         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1338         (HANDLE_METHOD): Likewise.
1339         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1340         (print_annotation): New function.
1341         (print_element_value): Likewise.
1342         (indent): Likewise.
1343         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1344         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1345         (print_parameter_annotations): New function.
1346         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1347         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1348         Likewise.
1349         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1350         (print_annotations): New function.
1351
1352 2006-06-23  Tom Tromey  <tromey@redhat.com>
1353
1354         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1355         emitting class files, always use 1.5.
1356         * gcj.texi (Input Options): Document -fsource.
1357         (Code Generation): Document -ftarget.
1358
1359 2006-06-21  Tom Tromey  <tromey@redhat.com>
1360
1361         PR java/28089:
1362         * expr.c (expand_java_field_op): Initialize field's declaring
1363         class.
1364
1365 2006-06-20  Tom Tromey  <tromey@redhat.com>
1366
1367         * expr.c (push_value): Always flush quick stack.
1368
1369 2006-06-19  Tom Tromey  <tromey@redhat.com>
1370
1371         * expr.c (push_value): Also flush quick stack if value is a
1372         component_ref.
1373
1374 2006-06-19  Tom Tromey  <tromey@redhat.com>
1375
1376         * expr.c (push_value): Flush quick stack if value has side
1377         effects.
1378
1379 2006-06-13  Tom Tromey  <tromey@redhat.com>
1380
1381         * class.c (is_compiled_class): Explicitly check for current
1382         class.
1383
1384 2006-06-09  Tom Tromey  <tromey@redhat.com>
1385
1386         * gjavah.c (decompile_method): Don't decompile a static field
1387         accessor method.
1388
1389 2006-06-06  Tom Tromey  <tromey@redhat.com>
1390
1391         * lang-specs.h <jc1>: Add .jar file to command line if
1392         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1393
1394 2006-06-05  Tom Tromey  <tromey@redhat.com>
1395
1396         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1397         synthetic, enum, annotation.
1398         * jcf.h (ACC_BRIDGE): New macro.
1399         (ACC_VARARGS): Likewise.
1400         (ACC_SYNTHETIC): Likewise.
1401         (ACC_ENUM): Likewise.
1402         (ACC_ANNOTATION): Likewise.
1403
1404 2006-06-04  Tom Tromey  <tromey@redhat.com>
1405
1406         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1407         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1408         and -ftarget.
1409         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1410         when needed.  Handle classpath-setting.
1411         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1412         * lang-specs.h: Rewrote.
1413
1414 2006-06-04  Tom Tromey  <tromey@redhat.com>
1415
1416         * jcf-io.c (find_class): Set source_ok to 0.
1417         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1418         (parse_class_file): Don't call java_mark_class_local.
1419         (java_parse_file): Skip .java files.  Call java_mark_class_local
1420         before lowering any code.
1421         (parse_zip_file_entries): Don't call duplicate_class_warning
1422         here.
1423         (process_zip_dir): ... call it here.
1424         * class.c (add_field): Don't mark field external if it is being
1425         compiled into this object.
1426         (make_class_data): Handle situation where class_dtable_decl is
1427         created before Class is compiled.
1428         (is_compiled_class): Don't assume files in zip are compiled into
1429         this object.
1430         (layout_class_method): Don't mark method external if it is being
1431         compiled into this object.
1432
1433 2006-06-04  Tom Tromey  <tromey@redhat.com>
1434
1435         * jcf-path.c (jcf_path_compute): New function.
1436         * jcf.h (jcf_path_compute): Declare.
1437
1438 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
1439
1440         * decl.c: Include langhooks.h.
1441         (builtin_function): Remove.
1442         (java_init_decl_processing): Replace calls to builtin_function
1443         with add_builtin_function.
1444         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1445         (java/decl.o): Depend on langhooks.h.
1446         * java-tree.h (builtin_function): Remove.
1447
1448 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1449
1450         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1451
1452 2006-09-12  Tom Tromey  <tromey@redhat.com>
1453
1454         * expr.c (push_value): Always flush quick stack.
1455
1456 2006-09-12  Tom Tromey  <tromey@redhat.com>
1457
1458         PR java/29013:
1459         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1460         the push of the called method's return result.
1461
1462 2006-09-12  Tom Tromey  <tromey@redhat.com>
1463
1464         * jvspec.c (lang_specific_driver): Read spec file even if
1465         -fsyntax-only.
1466
1467 2006-09-12  Tom Tromey  <tromey@redhat.com>
1468
1469         PR java/28754:
1470         * expr.c (expand_java_field_op): Initialize field's declaring
1471         interface if necessary.
1472
1473 2006-09-12  Tom Tromey  <tromey@redhat.com>
1474
1475         PR java/28892:
1476         * expr.c (expand_java_field_op): No error for assignments not in
1477         class initializer or constructor.
1478
1479 2006-08-22  Andrew Haley  <aph@redhat.com>
1480
1481         * decl.c (java_add_stmt): Give the statement list a type.
1482
1483 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1484             Bryce McKinlay  <bryce@mckinlay.net.nz>
1485
1486         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1487
1488 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1489
1490         PR java/8923
1491         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1492         or '--' is used with a constant operand.
1493         (java_complete_lhs): When processing a '++' or '--' expression,
1494         don't call java_complete_tree but java_complete_lhs, so that a
1495         static final variable operand is never replaced by its value. This
1496         avoids an ICE later on.
1497         (patch_unaryop): Fixed typo in comment.
1498
1499 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1500
1501         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1502
1503 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1504
1505         * builtins.c (check_for_builtin): If a builtin could result in a
1506         direct call being generated, don't use it if flag_indirect_dispatch
1507         is set.
1508
1509 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1510
1511         * gcj.texi (Invocation): Corrections for Invocation API example.
1512
1513 2006-07-04  Andrew Haley  <aph@redhat.com>
1514
1515         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1516         entry.
1517
1518 2006-06-21  Andrew Haley  <aph@redhat.com>
1519
1520         * java-tree.h (update_aliases): Remove
1521         * expr.c (expand_iinc): Remove call to update_aliases().
1522         (STORE_INTERNAL): Likewise.
1523         * decl.c (update_aliases, initialize_local_variable) 
1524         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1525
1526 2006-06-19  Andrew Haley  <aph@redhat.com>
1527
1528         PR java/1305
1529         PR java/27908
1530         * expr.c (java_modify_addr_for_volatile): New function.
1531         (expand_java_field_op): Handle volatile fields.
1532         * java-gimplify.c (java_gimplify_component_ref): Call
1533         java_modify_addr_for_volatile to give the field_ref the correct
1534         volatile type.
1535         (java_gimplify_modify_expr): Likewise.
1536         * java-tree.h (java_modify_addr_for_volatile): New decl.
1537
1538 2006-06-17  Karl Berry  <karl@gnu.org>
1539
1540         * gcj.texi (@dircategory): Use "Software development" instead
1541         of "Programming", following the Free Software Directory.
1542
1543 2006-06-16  Andrew Haley  <aph@redhat.com>
1544
1545         * class.c (make_class_data): When using flag_indirect_classes,
1546         don't initialize the vtable of Class instances.
1547
1548 2006-06-09  Andrew Haley  <aph@redhat.com>
1549
1550         PR java/1305
1551         PR java/27908
1552         * builtins.c (initialize_builtins): Add __sync_synchronize().
1553         * class.c (add_field): Mark volatile fields.
1554         * java-gimplify.c (java_gimplify_expr): Call new functions to
1555         handle self-modifying exprs and COMPONENT_REFs.
1556         (java_gimplify_component_ref): New.
1557         (java_gimplify_modify_expr): Add handling for volatiles.
1558
1559 2006-06-08  Tom Tromey  <tromey@redhat.com>
1560
1561         * gcj.texi (libgcj Runtime Properties): Document
1562         gnu.gcj.user.realname.
1563
1564 2006-06-08  Andrew Haley  <aph@redhat.com>
1565
1566         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1567         get_symbol_table_index().
1568         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1569         private method.
1570         (build_known_method_ref): New arg: special.  Pass it to
1571         get_symbol_table_index.
1572         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1573         the method list.
1574         (build_invokevirtual): New arg: special.  Pass it to
1575         get_symbol_table_index.
1576         (expand_invoke): New variable: special.
1577         Pass it to maybe_rewrite_invocation().
1578         Pass it to build_known_method_ref().
1579         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1580         build the symbol table conbstructor.
1581         (emit_symbol_table): Extract SPECIAL from the method list and pass
1582         it to build_symbol_entry().
1583         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1584         special accordingly.
1585
1586 2006-06-06  David Daney  <ddaney@avtrex.com>
1587
1588         * gcj.texi (libgcj Runtime Properties): Document
1589         gnu.gcj.runtime.NameFinder.show_raw and
1590         gnu.gcj.runtime.NameFinder.remove_unknown.
1591
1592 2006-06-06  Tom Tromey  <tromey@redhat.com>
1593
1594         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1595         synthetic, enum, annotation.
1596         * jcf.h (ACC_BRIDGE): New macro.
1597         (ACC_VARARGS): Likewise.
1598         (ACC_SYNTHETIC): Likewise.
1599         (ACC_ENUM): Likewise.
1600         (ACC_ANNOTATION): Likewise.
1601
1602 2006-06-06  Mike Stump  <mrs@apple.com>
1603
1604         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1605         installing during build.
1606
1607 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1608
1609         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1610         classname-to-library resolution mechanism.
1611         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1612         mechanism deprecated.
1613         (libgcj Runtime Properties): Document
1614         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1615
1616 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1617
1618         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1619         bit wide type.
1620         (jword): Define to uint64 on 64-bit arches.
1621         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1622
1623 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1624
1625         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1626         typos.
1627
1628 2006-05-26  Tom Tromey  <tromey@redhat.com>
1629
1630         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1631         * verify-glue.c (vfy_class_type): New function.
1632         * verify-impl.c (check_constant): Allow 'ldc class'.
1633         * verify.h (vfy_class_type): Declare.
1634
1635 2006-05-25  Andrew Haley  <aph@redhat.com>
1636
1637         PR java/27756
1638         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1639         update all lifetimes, not just the first one.
1640
1641 2006-05-24  Tom Tromey  <tromey@redhat.com>
1642
1643         * java-tree.h: Fixed flag documentation.
1644
1645 2006-05-24  Tom Tromey  <tromey@redhat.com>
1646
1647         PR libgcj/27729:
1648         * jcf.h (ACC_INVISIBLE): Changed value.
1649
1650 2006-05-24  Andrew Haley  <aph@redhat.com>
1651
1652         PR java/27754
1653         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1654         COMPOUND_EXPR.
1655
1656 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1657
1658         * lang.opt (femit-class-file): Remove VarExists.
1659
1660 2006-05-16  Tom Tromey  <tromey@redhat.com>
1661
1662         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1663         for Object.<init>.
1664
1665 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1666
1667         PR driver/26885
1668         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1669         $(GCC_OBJS).
1670
1671 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1672
1673         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1674         (java/expr.o): Replace target.h with $(TARGET_H).
1675         (java/parse.o): Likewise.
1676
1677 2006-05-10  Andrew Haley  <aph@redhat.com>
1678
1679         * class.c (emit_indirect_register_classes): Fix comment.
1680
1681 2006-05-04  Tom Tromey  <tromey@redhat.com>
1682
1683         * java-tree.h (uses_jv_markobj_p): Declare.
1684         * class.c (uses_jv_markobj_p): Removed.
1685         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1686         (get_boehm_type_descriptor): Use it.
1687         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1688
1689 2006-05-04  Tom Tromey  <tromey@redhat.com>
1690
1691         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1692
1693 2006-05-04  Andrew Haley  <aph@redhat.com>
1694
1695         * class.c (make_field_value): Always build_address_of fdecl if
1696         there is an initializer.
1697
1698 2006-05-03  Andrew Haley  <aph@redhat.com>
1699
1700         PR libgcj/27352
1701         * expr.c (maybe_rewrite_invocation): New function.
1702         (rewrite_arglist_getclass): Likewise.
1703         (rules): New.
1704         (expand_invoke): Call maybe_rewrite_invocation.
1705         * parse.y (patch_invoke): Likewise.
1706         * java-tree.h: (maybe_rewrite_invocation): New function.
1707
1708 2006-04-21  Andrew Haley  <aph@redhat.com>
1709
1710         * lang.c (java_init): Handle flag_indirect_classes.
1711         * jvgenmain.c: Use "class$$" instead of "class$".
1712         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1713         DECLs.
1714         (mangle_class_field): Special case "class$$" as well as "class$".
1715         * constants.c (build_ref_from_constant_pool): If
1716         flag_indirect_classes, generate a ref into the heap.
1717         * decl.c (constants_field_decl_node,
1718         constants_data_field_decl_node): New.
1719         * class.c (build_static_class_ref): New.
1720         (build_classdollar_field): Factor out from build_class_ref().
1721         (make_field_value): Handle static fields in heap.
1722         (make_class_data): Make sure we get a static ref to class.
1723         Make class initializer const if flag_indirect_classes.
1724         (register_class): Build a class_ref for initialization if
1725         flag_indirect_classes.
1726         (emit_indirect_register_classes): New.
1727
1728 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1729
1730         * expr.c, gjavah.c: Fix comment typos.
1731
1732 2006-04-03  Andrew Haley  <aph@redhat.com>
1733
1734         PR java/26858
1735         * expr.c (build_field_ref): Don't check the field offset if
1736         flag_syntax_only.
1737
1738 2006-03-30  Andrew Haley  <aph@redhat.com>
1739
1740         PR java/26858
1741         * lang.c (java_attribute_table): New.
1742         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1743         * expr.c (build_field_ref): Add a null pointer check for all
1744         fields of offset > 4k.  Don't do so for accesses via the this
1745         pointer, which we know can never be null.
1746         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1747         methods nonnull.
1748
1749 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1750
1751         * Make-lang.in: Rename docdir to gcc_docdir.
1752
1753 2006-03-30  Tom Tromey  <tromey@redhat.com>
1754
1755         PR java/26042:
1756         * parse.y (java_reorder_fields): Reset superclass field's size as
1757         well.
1758
1759 2006-03-28  Tom Tromey  <tromey@redhat.com>
1760
1761         PR java/26390:
1762         * parse.y (find_most_specific_methods_list): Added 'class'
1763         argument.
1764         (lookup_method_invoke): Updated.
1765
1766 2006-03-15  Tom Tromey  <tromey@redhat.com>
1767
1768         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1769         non-static method calls.
1770
1771 2006-03-15  David Daney  <ddaney@avtrex.com>
1772
1773         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1774         declaration.
1775
1776 2006-03-15  David Daney  <ddaney@avtrex.com>
1777
1778         * lang.opt (-freduced-reflection): New option.
1779         * lang.c (java_post_options): Generate an error if
1780         -freduced-reflection used with -fjni or -findirect-dispatch.
1781         * java-tree.h (flag_reduced_reflection): Declare new variable.
1782         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1783         if bitmap overflows and flag_reduced_reflection set.
1784         * class.c (uses_jv_markobj_p): New function.
1785         (make_class_data): Moved generation of vtable to before
1786         reflection data, generate less reflection data if
1787         flag_reduced_reflection set.
1788         * gcj.texi: Document -freduced-reflection.
1789
1790 2006-03-15  Tom Tromey  <tromey@redhat.com>
1791
1792         PR java/26638:
1793         * class.c (get_interface_method_index): Don't put <clinit> into
1794         interface table.
1795
1796 2006-03-15  Tom Tromey  <tromey@redhat.com>
1797
1798         * parse.y (analyze_clinit_body): Ignore empty statements.
1799
1800 2006-03-08  David Daney  <ddaney@avtrex.com>
1801
1802         * gcj.texi: Document -static-libgcj option.
1803
1804 2006-02-20  Andrew Haley  <aph@redhat.com>
1805
1806         * jcf-parse.c (parse_class_file): Set input_location from
1807         current_class.
1808
1809 2006-02-15  Andrew Haley  <aph@redhat.com>
1810
1811         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1812         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1813         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1814
1815 2006-02-09  Andrew Haley  <aph@redhat.com>
1816
1817         PR java/26192
1818         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1819         in their superclass.
1820
1821         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1822         array types.
1823         
1824 2006-02-08  Tom Tromey  <tromey@redhat.com>
1825
1826         PR java/22578:
1827         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1828         * builtins.c (convert_real): New function.
1829         (java_builtins): Handle Float.intBitsToFloat,
1830         Float.floatToRawIntBits, Double.longBitsToDouble,
1831         Double.doubleToRawLongBits.
1832
1833 2006-02-07  Andrew Haley  <aph@redhat.com>
1834
1835         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1836         class other than the one in which we expected to find it, ignore
1837         the result.
1838
1839         PR java/25535
1840         * constants.c (build_constants_constructor): move initializer into
1841         first halfword on a 64-bit big-endian machine.
1842
1843 2006-02-04  Tom Tromey  <tromey@redhat.com>
1844
1845         PR java/25676:
1846         * builtins.c (max_builtin): Skip floating point 'max'.
1847         (min_builtin): Skip floating point 'min'.
1848         (check_for_builtin): Never return NULL_TREE.
1849
1850 2006-02-04  Tom Tromey  <tromey@redhat.com>
1851
1852         PR java/26097:
1853         * expr.c (push_type): Avoid side effect in gcc_assert.
1854
1855 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1856
1857         * decl.c (java_init_decl_processing): Create char_type_node as a
1858         regular INTEGER_TYPE node.
1859         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1860         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1861         test for char_type_node and promoted_char_type_node as special
1862         instances of INTEGER_TYPE tree codes.
1863         (promote_type,build_java_signature): Likewise.
1864         * jcf-write.c (adjust_typed_op): Likewise.
1865         * mangle.c (mangle_type): Likewise.
1866         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1867         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1868
1869 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1870
1871         * expr.c (java_stack_swap): Revert gcc_assert patch.
1872
1873 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1874
1875         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1876         * typeck.c: Likewise.
1877         * verify-impl.c: Likewise.
1878         * class.c: Likewise.
1879         * decl.c: Likewise.
1880         * jcf-parse.c: Likewise.
1881         * constants.c: Likewise.
1882         * check-init.c: Likewise.
1883         * jcf-write.c: Likewise.
1884         * verify-glue.c: Likewise.
1885         * mangle.c: Likewise.
1886         * expr.c: Likewise.
1887         * lang.c: Likewise.
1888         * boehm.c: Likewise.
1889
1890 2006-02-01  Jan Hubicka  <jh@suse.cz>
1891
1892         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1893         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1894
1895 2006-01-30  Andrew Haley  <aph@redhat.com>
1896
1897         PR java/21428
1898         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1899
1900 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1901
1902         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1903         Update copyright notice dates.
1904
1905 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1906
1907         * jvspec.c (lang_specific_spec_functions): Remove.
1908
1909 2006-01-06  Tom Tromey  <tromey@redhat.com>
1910
1911         * gcj.texi (Arrays): Added more documentation for
1912         JvNewObjectArray.
1913         (Primitive types): Correct information about primitive classes.
1914         (Reference types): New node.
1915         (Index): New node.
1916
1917 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1918
1919         * jcf-parse.c (set_source_filename): Set the decl source location
1920         even when returning early.
1921
1922 2005-12-15  Tom Tromey  <tromey@redhat.com>
1923             Andrew Haley  <aph@redhat.com>
1924
1925         PR java/25429
1926         * parse.y (resolve_expression_name): Don't generate accessor
1927         methods for constant fields.
1928
1929 2005-12-13  Andrew Haley  <aph@redhat.com>
1930
1931         PR java/25366
1932         PR java/25368
1933         * class.c (maybe_layout_super_class): Update current_class before
1934         calling do_resolve_class.
1935
1936 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1937
1938         PR java/25330
1939         * jcf-write.c (write_classfile): Use PID in temporary class
1940         file. Save/restore errno when reporting error.
1941
1942 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1943
1944         PR java/9861
1945         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1946         to bare_function_type and including the return type
1947         * builtins.c (initialize_builtins) : Change builtin mangled name
1948         constants to conform to new mangling scheme
1949
1950 2005-12-08  Andrew Haley  <aph@redhat.com>
1951
1952         PR libgcj/25265
1953         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1954         (soft_abstractmethod_node): New.
1955         * expr.c (build_field_ref): Add in-line check for missing field.
1956         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1957
1958 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1959
1960         * Make-lang.in (java.all.build, java.install-normal): Remove.
1961
1962 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1963
1964         * Make-lang.in: Remove all dependencies on s-gtype, except for
1965         gt-java-parse.h.
1966
1967 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1968
1969         * class.c (build_utf8_ref, emit_register_classes): Use
1970         switch_to_section and get_section.
1971
1972 2005-12-06  Tom Tromey  <tromey@redhat.com>
1973
1974         PR java/25283:
1975         * parse.y (patch_new_array_init): Revert previous patch.
1976         (lookup_method_invoke): Use size-less array type when creating an
1977         anonymous constructor.
1978
1979 2005-12-05  Tom Tromey  <tromey@redhat.com>
1980
1981         * parse.y (patch_new_array_init): Don't set length on array.
1982
1983 2005-12-02  Richard Guenther  <rguenther@suse.de>
1984
1985         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1986         buildN instead of build.
1987         * class.c (finish_class): Likewise.
1988         * expr.c (java_create_object): Likewise.
1989
1990 2005-11-28  Tom Tromey  <tromey@redhat.com>
1991
1992         PR java/18278:
1993         * expr.c (build_jni_stub): Unwrap the return value.
1994         * java-tree.h (soft_unwrapjni_node): New define.
1995         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1996         * decl.c (java_init_decl_processing): Initialize
1997         soft_unwrapjni_node.
1998
1999 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
2000
2001         * gcj.texi (gij options): Add -Xss documentation.
2002
2003 2005-11-08  Wil Mahan  <wmahan@gmail.com>
2004
2005         PR java/23617
2006         * zextract.c (read_zip_archive): Fix out of memory error when
2007         reading jar files with zip-style comments.
2008
2009 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
2010
2011         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2012         formats.
2013         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2014
2015 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2016             Wil Mahan <wmahan@gmail.com>
2017
2018         PR java/23620
2019         * class.c (make_class): Create empty binfo here.
2020         (set_super_info): Only create binfo if we have superclasses.
2021
2022 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
2023
2024         PR java/24127
2025         * parse.y (method_header): Make the result of the rule a NULL_TREE
2026         when a parsing error occurs.
2027
2028 2005-09-29  Tom Tromey  <tromey@redhat.com>
2029
2030         PR java/24120:
2031         * jcf-io.c (memoized_dirlist_hash): New function.
2032         (caching_stat): Use it.
2033
2034 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
2035
2036         PR java/21418
2037         * class.c (inherits_from_p): Try to lay out super class
2038         if it is not already laid out.
2039         (maybe_layout_super_class): Handle the case where SUPER_CLASS
2040         is a NULL_TREE.
2041
2042 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
2043
2044         * builtins.c (max_builtin, min_builtin, abs_builtin,
2045         java_build_function_call_expr): Use fold_buildN.
2046         * class.c (layout_class_method): Likewise.
2047         * expr.c (java_truthvalue_conversion, build_java_jsr,
2048         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2049         build_java_binop, build_field_ref, expand_compare,
2050         build_known_method_ref, build_invokevirtual,
2051         process_jvm_instruction): Likewise.
2052         * parse.y (patch_binop, patch_exit_expr): Likewise.
2053         * typeck.c (convert_ieee_real_to_integer): Likewise.
2054         (convert): Don't call fold after convert_ieee_real_to_integer.
2055
2056 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
2057
2058         PR java/23891
2059         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2060         the newly created type. Set import lists here, not in create_class.
2061         (jdep_resolve_class): Set current_class.
2062         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
2063         the current package context, not ctxp->package.
2064         (cicp_cache): Removed.
2065         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2066         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2067         * java-tree.h (TYPE_PACKAGE): New macro.
2068         (struct lang_type): New member 'package'.
2069
2070 2005-09-09  Andrew Haley  <aph@redhat.com>
2071
2072         PR libgcj/23182 
2073         * expr.c (pop_type_0): If the expected type is object or ptr
2074         (i.e. void*), return the type of the object we just popped from
2075         the stack.
2076
2077 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
2078
2079         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2080         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2081
2082 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2083
2084         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2085         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2086         typos.  Follow spelling conventions.
2087
2088 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
2089
2090         PR java/23431
2091         * typeck.c (lookup_do): Look up interfaces for the original class,
2092         not the base class.
2093         * parse.y (java_check_regular_methods): Fix diagnostic message for
2094         more restrictive overriding of a method from an interface.
2095
2096 2005-08-16  Tom Tromey  <tromey@redhat.com>
2097
2098         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2099         class' initial state.
2100
2101 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2102
2103         PR java/22113
2104         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2105         `literal_token' for large numeric input tokens.
2106
2107 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2108
2109         PR java/19870
2110         * parse.y (nested_field_access_p): Rename to nested_member_access_p
2111         and expand to handle method accesses across nested classes.
2112         (build_outer_method_access_method): Rename to
2113         build_nested_method_access_method.  Minor adjustments to comments.
2114         (resolve_expression_name): Use the newly-renamed
2115         nested_member_access_p method.
2116         (resolve_qualified_expression_name): Likewise.
2117         (patch_method_invocation): Also consider static methods for access
2118         method generation.  Minor adjustments to comments.
2119         (maybe_use_access_method): Use the more general
2120         nested_memeber_access_p to determine access across nested class
2121         boundaries.  Allow THIS_ARG to be NULL (for static methods).
2122
2123 2005-08-15  Tom Tromey  <tromey@redhat.com>
2124
2125         PR java/23300.
2126         * expr.c (build_field_ref): Don't generate otable reference when
2127         DECL_FIELD_OFFSET is 0.
2128         * class.c (maybe_layout_super_class): Pass outer class to
2129         do_resolve_class.
2130
2131 2005-08-15  Tom Tromey  <tromey@redhat.com>
2132
2133         * java-tree.h (LABEL_IN_SUBR): Removed.
2134         (LABEL_IN_SUBR): Likewise.
2135         (LABEL_IS_SUBR_START): Likewise.
2136         (LABEL_SUBR_START): Likewise.
2137         (LABEL_SUBR_CONTEXT): Likewise.
2138         (LABEL_CHANGED): Likewise.
2139         (LABEL_RETURN_LABEL): Likewise.
2140         (LABEL_RETURN_TYPE_STATE): Likewise.
2141         (LABEL_RETURN_LABELS): Likewise.
2142         (RETURN_MAP_ADJUSTED): Likewise.
2143         (LABEL_PENDING_CHAIN): Likewise.
2144
2145 2005-08-15  Tom Tromey  <tromey@redhat.com>
2146
2147         * Make-lang.in (JAVA_OBJS): Removed verify.o
2148         (java/verify.o): Removed.
2149         * verify.c: Removed.
2150         * lang.c (flag_new_verifier): Removed.
2151         (java_post_options): Updated.
2152         * java-tree.h (flag_new_verifier): Removed.
2153         (verify_jvm_instructions): Removed.
2154         * expr.c (pop_type_0): Assume flag_new_verifier is true.
2155         (build_java_check_indexed_type): Likewise.
2156         (expand_java_arraystore): Likewise.
2157         (expand_java_arrayload): Likewise.
2158         (pop_arguments): Likewise.
2159         (expand_byte_code): Likewise.
2160         (process_jvm_instruction): Likewise.
2161
2162 2005-08-10  Andrew Haley  <aph@redhat.com>
2163
2164         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2165         type mismatches to make legal GIMPLE.
2166
2167 2005-08-10  Robin Green <greenrd@greenrd.org>
2168
2169         PR java/23230:
2170         * parse.y (maybe_use_access_method): Generalize check from
2171         java.lang.Object to any superclass of current_class
2172
2173 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2174
2175         * class.c (build_class_ref): Wrap the primary class type in a
2176         NOP_EXPR.
2177         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2178         primary class type from the NOP_EXPR in which it was placed.
2179
2180 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
2181
2182         * expr.c (expand_load_internal): Fix missing parens in
2183         predicate.
2184
2185 2005-07-28  Andrew Haley  <aph@redhat.com>
2186
2187         * expr.c (expand_load_internal): Convert to destination type.
2188
2189 2005-07-22  Manfred Hollstein  <mh@suse.com>
2190
2191         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2192         (check_constant): Likewise.
2193         (check_wide_constant): Likewise.
2194
2195 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2196
2197         Make CONSTRUCTOR use VEC to store initializers.
2198         * check-init.c (check_init): Update to cope with VEC in
2199         CONSTRUCTOR_ELTS.
2200         * class.c (make_field_value, make_method_value, get_dispatch_table,
2201         make_class_data, emit_symbol_table, emit_catch_table,
2202         emit_assertion_table): Use build_constructor_from_list instead of
2203         build_constructor.
2204         * constants.c (build_constants_constructor): Likewise.
2205         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2206         VEC in CONSTRUCTOR_ELTS.
2207         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2208         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2209         of a TREE_LIST.
2210         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2211         CONSTRUCTOR_ELTS.
2212         * parse.y (build_new_array_init): Use build_constructor_from_list
2213         instead of build_constructor.
2214         (patch_new_array_init): Update to cope with VEC in
2215         CONSTRUCTOR_ELTS.
2216         (array_constructor_check_entry): Likewise.
2217
2218 2005-07-12  Tom Tromey  <tromey@redhat.com>
2219
2220         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2221         command line.
2222
2223 2005-07-12  Tom Tromey  <tromey@redhat.com>
2224
2225         PR java/19674:
2226         * parse-scan.y (interface_member_declaration): Added
2227         empty_statement.
2228
2229 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2230         
2231         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2232         (LABEL_PENDING_CHAIN): Ditto.
2233         (LABEL_PC): Ditto.
2234         (DECL_BIT_INDEX): Ditto.        
2235
2236 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2237
2238         PR java/18119
2239         * parse.y (inner_class_accessible): New function. Logic moved from
2240         check_inner_class_access.
2241         (check_inner_class_access): Use inner_class_accessible.
2242         (resolve_inner_class): Simplify arguments. Create circularity hash
2243         here. Keep looking for classes if we found one that was inaccessible. 
2244         Return the inaccessible class only if there is no other match.
2245         (do_resolve_class): Update for new resolve_inner_class arguments.
2246         Don't create circularity_hash here.
2247
2248 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2249
2250         PR java/21045
2251         * parse.y (add_exception_to_throws): New function.
2252         (purge_unchecked_exceptions): Removed.
2253         (get_constructor_super): Renamed from verify_constructor_super. Now
2254         returns the super constructor after verification.
2255         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2256         or save/restore the exception list.
2257         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2258         class initializers and constructors to the throws clause of the method. 
2259
2260 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2261
2262         PR java/19674
2263         * parse.y (interface_member_declaration): Allow empty statements in
2264         interface declarations.
2265
2266 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2267
2268         * Makefile.in (parse.o): Adjust dependencies.
2269         * parse.y: Include tree-dump.h.
2270
2271 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2272
2273         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2274         flag for quoting.
2275
2276 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2277
2278         * parse.y (issue_warning_error_from_context): Call
2279         pp_output_formatted_text to be able to get the buffer.
2280
2281 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2282
2283         * parse.y (issue_warning_error_from_context): Update for the
2284         renaming of pp_format_text to pp_format.
2285
2286 2005-06-28  Paul Brook  <paul@codesourcery.com>
2287
2288         * decl.c (java_init_decl_processing): Call
2289         default_init_unwind_resume_libfunc.
2290
2291 2005-06-27  Tom Tromey  <tromey@redhat.com>
2292
2293         PR java/21540, PR java/13788:
2294         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2295         fold_constant_for_init.
2296         (patch_binop): Added 'folding' argument.  Updated all callers.
2297         (patch_unaryop) <NOP_EXPR>: New case.
2298         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2299         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2300
2301 2005-06-25  Jan Hubicka  <jh@suse.cz>
2302
2303         * builtins.c (define_builtin): Accept new flags parameter.
2304         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2305
2306 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2307
2308         * all files: Update FSF address in copyright headers.
2309
2310 2005-06-24  Tom Tromey  <tromey@redhat.com>
2311
2312         * verify-impl.c (verify_instructions_0): Correctly handle
2313         situation where PC falls off end.
2314
2315 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2316
2317         PR java/20697
2318         * parse.y (find_most_specific_methods_list): Remove special case for
2319         inner classes.
2320
2321 2005-06-15  Tom Tromey  <tromey@redhat.com>
2322
2323         PR libgcj/21906:
2324         * class.c (make_method_value): Use soft_abstractmethod_node for
2325         abstract method.
2326         * java-tree.h (soft_abstractmethod_node): New define.
2327         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2328         * decl.c (java_init_decl_processing): Initialize
2329         soft_abstractmethod_node.
2330
2331 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2332
2333         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2334
2335 2005-06-13  Per Bothner  <per@bothner.com>
2336
2337         * expr.c (int highest_label_pc_this_method,
2338         start_label_pc_this_method): New globals.
2339         (lookup_label): Add start_label_pc_this_method to pc for label, and
2340         update highest_label_pc_this_method.  This prevents conflicts between
2341         labels from different methods.
2342         * java-tree.h: Declare new globals.
2343         * jcf-parse.c (parse_class_file): If needed bump
2344         start_label_pc_this_method and reset highest_label_pc_this_method.
2345
2346 2005-06-13  Tom Tromey  <tromey@redhat.com>
2347
2348         PR java/21844:
2349         * parse.y (nested_field_access_p): Handle case where outer field
2350         is inherited by enclosing class.
2351
2352 2005-06-12  Per Bothner  <per@bothner.com>
2353
2354         * class.c (inherits_from_p): Do load_class if needed.
2355
2356 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2357
2358         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2359         * java-tree.h (parse_error_context): Move...
2360         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2361         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2362         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2363
2364 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2365
2366         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2367
2368 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2369
2370         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2371         msgid for argument name.
2372         * gjavah.c (error): Likewise.
2373         * java-tree.h (parse_error_context): Likewise.
2374         * parse.y (parse_error_context, parse_warning_context,
2375         issue_warning_error_from_context): Likewise.
2376
2377 2005-06-01  Tom Tromey  <tromey@redhat.com>
2378
2379         PR java/21722:
2380         * class.c (build_static_field_ref): Don't fold constant fields if
2381         current class is from a .class file and we're using indirect
2382         dispatch.
2383
2384 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2385
2386         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2387         * java/Make-lang.in: Updates dependencies.
2388
2389 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2390
2391         PR java/19870.
2392         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2393         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2394         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2395         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2396         * jcf-write.c (generate_classfile): Use
2397         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2398         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2399         * parse.y (build_outer_field_access): Rename to
2400         build_nested_field_access. Support static fields and outer-to-inner
2401         class accesses.
2402         (outer_field_access_p): Rename to nested_field_access_p. Support
2403         static fields and generalise to outer-to-inner class and sibling
2404         inner class accesses.
2405         (outer_field_expanded_access_p): Rename to
2406         nested_field_expanded_access_p and support static fields.
2407         (outer_field_access_fix): Rename to nested_field_access_fix and
2408         support static fields.
2409         (build_outer_field_access_expr): Rename to
2410         build_nested_field_access_expr and support static fields.
2411         (build_outer_field_access_methods): Rename to
2412         build_nested_field_access_methods and support static fields. For
2413         static fields, generate accessors without class instance parameters.
2414         (build_outer_field_access_method): Rename to
2415         build_nested_field_access_method and support static fields.
2416         (build_outer_method_access_method): Use
2417         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2418         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2419         (resolve_expression_name): Consider static field accesses across
2420         nested classes.
2421         (resolve_qualified_expression_name): Likewise.
2422         (java_complete_lhs): Use nested_field_access_fix instead of
2423         outer_field_access_fix.
2424         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2425         Use nested_field_expanded_access_p instead of
2426         outer_field_expanded_access_p. Use nested_field_access_fix instead
2427         of outer_field_access_fix.
2428         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2429         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2430
2431 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2432
2433         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2434         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2435         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2436         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2437         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2438         (parse_version): Calculate version ID using new method. Use bit-flags
2439         for flag_indirect_dispatch and flag_bootstrap_classes.
2440
2441 2005-05-25  Richard Henderson  <rth@redhat.com>
2442
2443         PR libgcj/21692
2444         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2445         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2446         DECL_CONTEXT; avoid pushdecl_top_level.
2447         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2448         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2449         (layout_class_method): Likewise.
2450         * decl.c (java_mark_cni_decl_local): New.
2451         (java_mark_class_local): Use it.
2452         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2453         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2454         (struct lang_decl_func): Add local_cni;
2455         (struct lang_decl_var): Add class_field, vtable.
2456         (java_mangle_decl): Declare.
2457         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2458         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2459         (mangle_obstack_1): New.
2460         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2461         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2462         lhd_set_decl_assembler_name for things that don't need mangling.
2463         (mangle_class_field): Rename from java_mangle_class_field, make
2464         static, don't call init_mangling or finish_mangling.
2465         (mangle_vtable): Similarly.
2466         (mangle_local_cni_method_decl): New.
2467         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2468         gcc_assert, and MANGLE_RAW_STRING.
2469         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2470
2471 2005-05-25  DJ Delorie  <dj@redhat.com>
2472
2473         * class.c (set_constant_value): Move warning control from if() to
2474         warning(OPT_*).
2475
2476 2005-05-24  Richard Henderson  <rth@redhat.com>
2477
2478         * builtins.c (define_builtin): Don't call make_decl_rtl.
2479         * constants.c (build_constant_data_ref): Likewise.
2480         * class.c (build_utf8_ref): Likewise.
2481         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2482         (get_dispatch_table, layout_class_method): Likewise.
2483         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2484         by hand.
2485         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2486         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2487         to determine if we need a non-zero address.
2488         * decl.c (builtin_function): Don't call make_decl_rtl.
2489         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2490         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2491         * resource.c (compile_resource_data): Likewise.
2492         * parse.y (resolve_field_access): Re-word comment to avoid
2493         building DECL_RTL.
2494
2495 2005-05-24  Richard Henderson  <rth@redhat.com>
2496
2497         * class.c (registered_class): Take it out of class_roots; turn into
2498         a vec of trees.
2499         (register_class): Make static.  Don't duplicate decl node.  Use
2500         VEC_safe_push.
2501         (emit_register_classes): Use VEC_iterate.  Use output_constant
2502         instead of assemble_integer.  Don't call mark_decl_referenced
2503         directly.
2504         * java-tree.h (register_class): Remove decl.
2505
2506 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2507
2508         PR java/17845
2509
2510         * parse.y (register_package, package_list): Remove.
2511         (package_declaration): Do not call register_package.
2512         (do_resolve_class): Do not use package_list.
2513
2514 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2515
2516         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2517         unused variable.
2518
2519 2005-05-15  Tom Tromey  <tromey@redhat.com>
2520
2521         PR java/21519:
2522         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2523         NOTE_PUSH.
2524
2525 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2526
2527         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2528
2529 2005-05-11  Tom Tromey  <tromey@redhat.com>
2530
2531         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2532         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2533         (parse_version): Use it.
2534         * lang.opt (-fbootstrap-classes): New option.
2535
2536 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2537
2538         PR java/21436
2539         * class.c (maybe_layout_super_class): Look for imports in this_class.
2540         * parse.h (ctxp_for_generation_last): New.
2541         (do_resolve_class): Add a parameter.
2542         * parse.y (ctxp_for_generation_last): New.
2543         (java_pop_parser_context): Add at end of list.
2544         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2545         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2546         the given type are NULL.
2547         (do_resolve_class): Look into the imports of the new second parameter.
2548         Adjust recursive calls.
2549         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2550         calls to do_resolve_class.
2551         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2552         (java_complete_class): Do not do that here.
2553
2554 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2555
2556         PR java/20309
2557         * Make-lang.in (java): Add gjnih.
2558         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2559         (GJNIH_OBJS): New variable.
2560         (gjnih$(exeext)): New target.
2561         (JAVA_MANFILES): Add gjnih.1.
2562         (java.uninstall): Add gjnih.1.
2563         (java.mostlyclean): Add gjnih.
2564         (java.maintainer-clean): Add gjnih.1.
2565         (java/gjavah-jni.o): New target.
2566         (.INTERMEDIATE): Add gjnih.pod.
2567         (gjnih.pod): New target.
2568         * config-lang.in (stagestuff): Add gjnih.
2569         * gcj.texi (Top): Add gjnih node.
2570         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2571         -bootclasspath options.
2572         (Invoking gjnih): New node.
2573         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2574         (TOOLNAME): New macro.
2575         (error): Replace hard-coded gcjh with TOOLNAME.
2576         (process_file): Likewise.
2577         (usage): Likewise.
2578         (version): Likewise.
2579         (help): Likewise.  Add help output for -force, -old, -trace and -J
2580         options.
2581         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2582         (options): Add force, old, trace and J fields.
2583         (main): Handle -force, -old, -trace and -J options.
2584
2585 2005-05-03  Tom Tromey  <tromey@redhat.com>
2586
2587         PR java/21245:
2588         * gjavah.c (main): Unlink output file on error.
2589
2590 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2591
2592         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2593         copyright.
2594
2595 2005-04-29  Tom Tromey  <tromey@redhat.com>
2596
2597         * expr.c (build_jni_stub): Updated for change to build_block.
2598
2599 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2600
2601         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2602
2603 2005-04-28  Andrew Haley  <aph@redhat.com>
2604
2605         PR java/19285
2606         * java-tree.h (soft_resolvepoolentry_node): New.
2607         (alloc_constant_fieldref): Declare.
2608         * expr.c (expand_java_field_op): Don't call class_init for
2609         accesses to static fields with indirect dispatch.
2610         * builtins.c (initialize_builtins): Add "__builtin_expect".
2611         * decl.c (soft_resolvepoolentry_node): New variable.
2612         (java_init_decl_processing): Create a decl for
2613         "_Jv_ResolvePoolEntry".
2614         * class.c (build_fieldref_cache_entry): New function.
2615         (build_static_field_ref): Rewrite for indirect dispatch.
2616         * constants.c (find_name_and_type_constant_tree): New function.
2617         (alloc_constant_fieldref): Likewise.
2618         (build_constants_constructor): Handle CONSTANT_Fieldref and
2619         CONSTANT_NameAndType.
2620
2621         PR java/21115
2622         * expr.c (force_evaluation_order): Convert outgoing args smaller
2623         than integer.
2624
2625 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2626
2627         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2628         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2629         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2630
2631 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2632
2633         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2634         to `unlock_stream' with `unlock_std_streams'.
2635
2636 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2637
2638         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2639         instead of just expr.h.
2640
2641 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2642
2643         * gjavah.c (main): Unlock the stdio streams.
2644         * jcf-dump.c (main): Likewise.
2645         * jv-scan.c (main): Likewise.
2646         * jvgenmain.c (main): Likewise.
2647
2648 2005-04-23  DJ Delorie  <dj@redhat.com>
2649
2650         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2651         parse.y: Adjust warning() callers.
2652
2653 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2654
2655         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2656         contructor.
2657
2658 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2659
2660         * gcj.texi: Fix typos and bogus example.
2661
2662 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2663
2664         * except.c: Fix a comment typo.
2665
2666 2005-04-19  Julian Brown  <julian@codesourcery.com>
2667
2668         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2669         indirect dispatch with PIC.
2670
2671 2005-04-18  Andrew Haley  <aph@redhat.com>
2672
2673         * java-except.h (struct eh_range.handler): Remove unused field.
2674         (handle_nested_ranges): Remove function declaration.
2675         (sanity_check_exception_range): Add function declaration.       
2676         * verify.c (verify_jvm_instructions): Remove call to
2677         handle_nested_ranges.
2678         * verify-glue.c (verify_jvm_instructions_new): Call
2679         sanity_check_exception_range.
2680         * except.c (link_handler, eh_range_freelist, link_handler,
2681         handle_nested_ranges): Remove.
2682         (add_handler): Rewrite.
2683         (sanity_check_exception_range): New function.
2684         (print_ranges): New function.
2685
2686 2005-04-13  Julian Brown  <julian@codesourcery.com>
2687
2688         * decl.c (finish_method): Give methods once-only linkage.
2689
2690 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2691
2692         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2693
2694 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2695
2696         * java-tree.h: Don't use PARAMS().
2697
2698 2005-04-07  Per Bothner  <per@bothner.com>
2699
2700         * class.c (push_class): By default, suppress debug output.
2701         (finish_class): Enable debug output for classes we're emitting.
2702
2703 2005-04-07  Andrew Haley  <aph@redhat.com>
2704
2705         * gcj.texi: Correct gcj-dbtool instructions.
2706
2707 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2708
2709         * gcj.texi: Fix a typo.
2710         * lang.c: Fix a comment typo.
2711
2712 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2713
2714         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2715         Mention recognized-and-ignored compatibility options.
2716         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2717         JvFree.
2718         (About CNI): Add Memory allocation section.
2719
2720 2005-04-01  Tom Tromey  <tromey@redhat.com>
2721
2722         * decl.c (java_init_decl_processing): Fix types of
2723         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2724         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2725         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2726
2727 2005-03-31  Jan Hubicka  <jh@suse.cz>
2728
2729         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2730         * class.c: Include cgraph.h
2731         (make_local_functoin_alias): Mark aslias as needed.
2732         * resource.c: Include cgraph.h
2733         (compile_resource_data): Go via cgraph interface.
2734
2735 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2736
2737         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2738
2739 2005-03-30  Tom Tromey  <tromey@redhat.com>
2740
2741         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2742         inner_class_info_index==0 or outer_class_info_index==0.
2743
2744 2005-03-29  Tom Tromey  <tromey@redhat.com>
2745
2746         * gcj.texi (libgcj Runtime Properties): Document
2747         gnu.gcj.runtime.endorsed.dirs.
2748
2749 2005-03-24  Anthony Green  <green@redhat.com>
2750
2751         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2752         'gcj-dbtool -p'.
2753
2754 2005-03-23  Tom Tromey  <tromey@redhat.com>
2755
2756         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2757         (parse_version): Use it.
2758
2759 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2760
2761         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2762
2763 2005-03-18  Andrew Haley  <aph@redhat.com>
2764
2765         PR java/20522
2766         * decl.c (update_aliases): Don't update variables that are about
2767         to die.
2768         (maybe_poplevels): Add comment.
2769
2770 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2771
2772         PR java/20502
2773         * jcf-parse.c (duplicate_class_warning): New function.
2774         (java_parse_file): Call duplicate_class_warning if 
2775         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2776         (parse_zip_file_entries): Likewise. Also set
2777         CLASS_FROM_CURRENTLY_COMPILED_P.
2778
2779 2005-03-16  Andrew Haley  <aph@redhat.com>
2780
2781         * expr.c (expand_java_arrayload): Don't generate a
2782         NullPointerException based on the type of the node.
2783         (build_java_array_length_access): Likewise.
2784
2785 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2786
2787         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2788
2789 2005-03-11  Tom Tromey  <tromey@redhat.com>
2790
2791         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2792         (libgcj Runtime Properties): Document the default .db.
2793
2794 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2795
2796         PR java/20312
2797         * parse.y (checks_throws_clauses): Check exceptions list even when
2798         the base class does not come from a source file being compiled.
2799         (java_complete_lhs): Remove unused variable 'wfl'.
2800
2801 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2802
2803         PR java/20338
2804         * decl.c (finish_method): Emit _Jv_InitClass for private static
2805         methods inside inner classes as well.
2806
2807 2005-03-08  Julian Brown  <julian@codesourcery.com>
2808         * Revert patch from 2005-03-08 for causing bootstrap failure on
2809         ppc-darwin.
2810
2811 2005-03-08  Julian Brown  <julian@codesourcery.com>
2812
2813         * decl.c (finish_method): Give methods once-only linkage.
2814
2815 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2816
2817         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2818
2819 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2820
2821         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2822         can_widen_reference_to if the C++ ABI is in use.
2823         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2824         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2825         type_isresolved, init_state, set_pc, state_get_pc,
2826         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2827         (verify_fail): Report the current PC from the verifier context.
2828         (free_state): Remove #if 0 block to enable this function.
2829         (free_verifier_context): Call free_state on state_list iterator
2830         values before freeing them.
2831         * expr.c (pop_type_0): Pop correct type for error message when stack
2832         contains a multi-word type.
2833
2834 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2835
2836         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2837         for known NULL array length access.
2838
2839 2005-03-07  Tom Tromey  <tromey@redhat.com>
2840
2841         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2842
2843 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2844
2845         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2846         typeck.c: Update copyright.
2847
2848 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2849
2850         Remove xref code.
2851         * xref.c, xref.h: Remove file.
2852         * Make-lang.in (java/xref.o): Remove.
2853         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2854         * lang.c (flag_emit_xref): Remove definition.
2855         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2856         * typeck.c (convert): Remove use of do_not_fold.
2857         * parse.y (do_not_fold): Remove definition.
2858         (parser grammar): Remove xref code.
2859         (maybe_create_class_interface_decl, create_class): Likewise.
2860         (register_fields, method_header, finish_method_declaration): Likewise.
2861         (declare_local_variables, source_end_java_method): Likewise.
2862         (java_complete_expand_classes): Do not set do_not_fold.
2863         (java_complete_expand_method): Remove xref code.
2864         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2865         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2866         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2867         (patch_synchronized_statement, patch_throw_statement): Likewise.
2868         (maybe_build_class_init_for_field): Likewise.
2869
2870 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2871
2872         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2873         instead of IS_NON_TYPE_CODE_CLASS.
2874
2875 2005-03-04  Andrew Haley  <aph@redhat.com>
2876
2877         PR java/18362
2878         * class.c (set_method_index): Don't set method_index if it is
2879         NULL_TREE.
2880         (layout_class_method): Don't complain about "non-static method foo
2881         overrides static method" in the case of indirect dispatch.
2882
2883 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2884
2885         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2886         warning.
2887         * Make-lang.in: Don't elide warnings in jcf-io.c.
2888
2889 2005-03-01  Per Bothner  <per@bothner.com>
2890
2891         PR java/8608
2892         * check-init.c (wfl): Remove static.
2893         (final_assign_error, check_init): Replace calls to parse_error_context
2894         by plain error.
2895         (check_init): Save, set, and restore input_location for each exp.
2896
2897 2005-03-01  Per Bothner  <per@bothner.com>
2898
2899         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2900         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2901         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2902
2903 2005-03-01  Per Bothner  <per@bothner.com>
2904
2905         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2906
2907 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2908
2909         PR libgcj/16923
2910         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2911         JvVMOption.
2912
2913 2005-02-22  Tom Tromey  <tromey@redhat.com>
2914
2915         PR java/20056:
2916         * verify-impl.c (EITHER): New define.
2917         (types_compatible): Handle it.
2918         (check_field_constant): Use it.
2919
2920 2005-02-18  Tom Tromey  <tromey@redhat.com>
2921
2922         PR java/20056:
2923         * verify-impl.c (types_equal): Fixed test.
2924
2925         PR java/20056:
2926         * verify-glue.c (vfy_class_has_field): New function.
2927         * verify.h (vfy_class_has_field): Declare.
2928         * verify-impl.c (check_field_constant): Added 'putfield'
2929         argument.
2930         (verify_instructions_0): Updated.
2931         (types_equal): New function.
2932
2933 2005-02-14  Tom Tromey  <tromey@redhat.com>
2934
2935         PR java/19921:
2936         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2937         stack effect of multianewarray.
2938
2939 2005-02-14  Andrew Haley  <aph@redhat.com>
2940
2941         PR java/19907
2942         * expr.c (expand_byte_code): Call promote_arguments().
2943         (promote_arguments): New function.
2944         * decl.c (check_local_unnamed_variable): Remove special case for
2945         new verifier.
2946         (find_local_variable): Promote all boolean types to int
2947         when searching for local variable decls.
2948
2949 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2950
2951         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2952         parse-scan.y: Update copyright.
2953
2954 2005-02-11  Per Bothner  <per@bothner.com>
2955
2956         PR java/15543
2957         * parse-scan.y (input_location): Remove variable.
2958         (main_input_filename): New - replaces input_filename, which isn't
2959         settable if USE_MAPPED_LOCATION.
2960         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2961         so we don't reference input_location or wfl_operator in that case.
2962         * jv-scan.c (expand_location): Remove - no longer used.
2963         (main): Set main_input_filename rather than input_filename.
2964
2965 2005-02-09  Richard Henderson  <rth@redhat.com>
2966
2967         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2968         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2969
2970 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2971
2972         * expr.c (add_type_assertion): Use the proper enumeration type,
2973         since this is what htab_find_slot() is expecting.
2974
2975 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2976
2977         * gcj.texi: Update copyright dates.
2978
2979 2005-02-02  Tom Tromey  <tromey@redhat.com>
2980
2981         * gcj.texi (libgcj Runtime Properties): Default library_control
2982         to 'cache'.
2983
2984 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2985
2986         PR java/15543
2987         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2988         (modifiers) when square brackets are present in a declaration for
2989         a final paramter.
2990         * jv-scan.c (main): Set input_filename and input_line.
2991
2992 2005-02-01  Tom Tromey  <tromey@redhat.com>
2993
2994         PR java/19742:
2995         * gjavah.c (get_field_name): Don't override name for JNI header.
2996
2997 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2998
2999         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3000         of unsigned types using iushr and lushr JVM bytecodes.
3001
3002 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3003
3004         PR java/19738
3005         * gjavah.c (jni_print_float): Do not emit floating-point
3006         initialiser for a static final field.
3007         (jni_print_double): Likewise.
3008
3009 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
3010
3011         Revert:
3012         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3013         * gjavah.c (print_field_info): Mark static data members of
3014         floating-point type with "__extension__".
3015
3016 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3017
3018         * gjavah.c (print_field_info): Mark static data members of
3019         floating-point type with "__extension__".
3020
3021 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3022
3023         PR java/9157
3024         * parse.y (build_string_concatenation): Remove redundant if.
3025         (patch_conditional_expr): Attempt to patch_string() the condition
3026         of a ?: as well, in addition to its other operands.
3027
3028 2005-01-25  Tom Tromey  <tromey@redhat.com>
3029
3030         * Make-lang.in (java/java-tree-inline.o): Removed.
3031
3032 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
3033
3034         PR java/19070
3035         * parse.y (patch_binop): Allow comparisons against NULL only
3036         if the other operand is of a reference type.
3037
3038 2005-01-24  Tom Tromey  <tromey@redhat.com>
3039
3040         * java-tree.h (gcj_abi_version): Declare.
3041         * class.c (make_class_data): Push gcj_abi_version into "next"
3042         field.  Renamed field.
3043         * decl.c (gcj_abi_version): New global.
3044         (parse_version): New function.
3045         (java_init_decl_processing): Call it.  Renamed 'next' field.
3046         Include version.h.
3047         (GCJ_BINARYCOMPAT_ADDITION): New define.
3048
3049 2005-01-24  Roger Sayle  <roger@eyesopen.com>
3050
3051         PR java/19295
3052         * jcf-write.c (generate_bytecode_insns): Conversions between
3053         integer types of the same precision shouldn't generate widening
3054         or narrowing conversion bytecodes.
3055
3056 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
3057
3058         * java-except.h, java-tree.h: Remove unused prototypes.
3059
3060 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
3061
3062         PR java/18091:
3063         * jcf-write.c (perform_relocations): Don't call memcpy if source
3064         and destination are the same.
3065
3066 2005-01-17  Tom Tromey  <tromey@redhat.com>
3067
3068         * verify-impl.c (get_short): Sign extend.
3069         (get_int): Likewise.
3070
3071 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
3072
3073         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3074         with TYPE_SIZE.
3075
3076 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3077
3078         * verify.c: Revert to the version before the BC-ABI merge.
3079
3080 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3081
3082         PR java/19277
3083         * check-init.c (check_init): Take care of references that do not
3084         have an explicit final variable declaration (e.g. array length
3085         access) for pre/post in/de-crement operators.
3086
3087 2005-01-08  Mark Wielaard  <mark@klomp.org>
3088
3089         * parse.y (process_imports): Allocate (and free) original_name only
3090         when not already defined.
3091         * jcf-parse.c (read_class): Free results of find_class() and
3092         lrealpath().
3093         (java_parse_file): Keep pointer to head of file_list and free when
3094         done. Free result of lrealpath().
3095
3096 2005-01-05  Tom Tromey  <tromey@redhat.com>
3097
3098         * gcj.texi (Standard Properties): java.ext.dirs is now used.
3099
3100 2004-12-20  Andrew Haley  <aph@redhat.com>
3101
3102         * typeck.c: Use fold_convert for ints and booleans.
3103
3104 2004-12-17  Andrew Haley  <aph@redhat.com>
3105
3106         PR java/18931
3107         * typeck.c (convert): Use a CONVERT_EXPR when converting to
3108         BOOLEAN_TYPE or CHAR_TYPE.
3109         (convert_to_boolean, convert_to_char) : Remove.
3110         * convert.h (convert_to_boolean, convert_to_char) : Remove.
3111         * expr.c (expand_load_internal): Do type conversion if type is not
3112         as required.
3113
3114 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
3115
3116         PR target/18459
3117         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3118         Update comment.
3119
3120 2004-12-07  Andrew Haley  <aph@redhat.com>
3121
3122         PR java/18811:
3123         * jcf-parse.c (load_class): Remove sanity test for missing inner
3124         class file.
3125
3126 2004-12-06  Tom Tromey  <tromey@redhat.com>
3127
3128         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3129         (java.uninstall): Likewise.
3130         (java.maintainer-clean): Likewise.
3131         (.INTERMEDIATE): Likewise.
3132         (java.install-man): Likewise.
3133         (gcj-dbtool.pod): New target.
3134         * gcj.texi (Code Generation): Document -findirect-dispatch.
3135         (libgcj Runtime Properties): Document
3136         gnu.gcj.precompiled.db.path.
3137         (Top): Link to "Invoking gcj-dbtool".
3138
3139 2004-12-06  Tom Tromey  <tromey@redhat.com>
3140
3141         PR java/14853:
3142         * java-tree.h (extract_field_decl): Declare.
3143         * parse.y (extract_field_decl): Renamed from
3144         strip_out_static_field_access_decl.  No longer static.
3145         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3146
3147 2004-12-03  Tom Tromey  <tromey@redhat.com>
3148
3149         * lang.c (flag_new_verifier): Define.
3150         (java_post_options): Set flag_new_verifier if indirect dispatch
3151         is being used.
3152         * lang.opt (fnew-verifier): Removed.
3153
3154 2004-12-03  Tom Tromey  <tromey@redhat.com>
3155
3156         PR bootstrap/14614:
3157         * Make-lang.in (java.install-common): Only install transformed
3158         gcjh if gcj-cross exists.
3159
3160 2004-12-03  Andrew Haley  <aph@redhat.com>
3161
3162         PR java/18812
3163         * except.c (link_handler): Patch 'outer' field of siblings of the
3164         range we're demoting.
3165
3166 2004-12-03  Andrew Haley  <aph@redhat.com>
3167
3168         PR java/18697
3169         * class.c (layout_class_method): Don't fail to override a method
3170         simply because it has DECL_ARTIFICIAL set.
3171
3172 2004-12-02  Tom Tromey  <tromey@redhat.com>
3173
3174         PR java/16675:
3175         * parse.y (craft_constructor): Special case null_pointer_node.
3176
3177 2004-12-02  Tom Tromey  <tromey@redhat.com>
3178
3179         PR java/18741:
3180         * java-gimplify.c (java_gimplify_expr): Don't call
3181         SET_EXPR_LOCATION unless wrapped tree is an expression.
3182
3183 2004-11-27  Per Bothner  <per@bothner.com>
3184
3185         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
3186         Fix fencepost error in 'i', which got executed one too many times.
3187         Also, fold memcpy into explicit loop, as originally intended.
3188         Also, free temporary 'buf' which otherwise leaks.
3189
3190 2004-11-27  Per Bothner  <per@bothner.com>
3191
3192         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3193         local static variables if not USE_MAPPED_LOCATION.
3194
3195 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
3196
3197         * class.c, decl.c, expr.c: Fix comment typos.
3198
3199 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3200
3201         PR java/18305
3202         * decl.c (end_java_method): Call
3203         attach_init_test_initialization_flags on all the init_decls.
3204         * parse.y (attach_init_test_initialization_flags): Move to ...
3205         * expr.c (attach_init_test_initialization_flags): here and
3206         support BIND_EXPR also.
3207         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3208         * jcf-parse.c (parse_class_file): Don't disable class init
3209         optimization.
3210
3211 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3212
3213         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3214         in diagnostics.
3215
3216 2004-11-24  Richard Henderson  <rth@redhat.com>
3217
3218         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3219         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3220
3221 2004-11-24  Tom Tromey  <tromey@redhat.com>
3222
3223         * verify.c (defer_merging): Don't use C++-style comment.
3224         * verify.h (java_opcode): Added java_opcode_end.
3225         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3226
3227         * verify-impl.c (vfy_push_type): Removed bogus "return".
3228         (initialize_stack): Use vfy_alloc and vfy_free.
3229         (verify_instructions_0): Likewise.
3230
3231         * Merged gcj-abi-2-dev-branch to trunk.
3232
3233 2004-11-24  Andrew Haley  <aph@redhat.com>
3234
3235         * jcf-parse.c (parse_class_file): Set file_start_location.
3236
3237 2004-11-10  Tom Tromey  <tromey@redhat.com>
3238
3239         * class.c (make_field_value): Don't call build_static_field_ref.
3240         (build_static_field_ref): Don't emit direct references when using
3241         indirect dispatch.
3242
3243         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3244         -verbose:class into man page synopsis.
3245
3246 2004-11-09  Tom Tromey  <tromey@redhat.com>
3247
3248         * expr.c (build_java_arraystore_check): Still generate check if
3249         element type is itself an array.
3250
3251 2004-11-08  Tom Tromey  <tromey@redhat.com>
3252
3253         * java-tree.h (soft_check_assignment_node): Removed.
3254         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3255         * decl.c (java_init_decl_processing): Don't initialize
3256         soft_check_assignment_node.
3257
3258 2004-11-05  Tom Tromey  <tromey@redhat.com>
3259
3260         * class.c (layout_class_methods): Don't add Miranda methods when
3261         using indirect dispatch.
3262
3263 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3264
3265         * class.c (make_class_data): Call emit_assertion_table to set the
3266         'assertion_table' field.
3267         (build_signature_for_libgcj): Move here from expr.c.
3268         (add_assertion_table_entry): New function. Callback for assertion
3269         hashtable traversal.
3270         (emit_assertion_table): New. Take class argument, and generate
3271         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3272         * decl.c (init_decl_processing): Define assertion_entry_type record.
3273         Push 'assertion_table' class field instead of 'verify'.
3274         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3275         (type_assertion_hash): Include 'assertion_code' in hash.
3276         (add_type_assertion): Rewritten. Take class and assertion_code
3277         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3278         (can_widen_reference_to): Use new add_type_assertion() arguments.
3279         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3280         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3281         (verify_identifier_node): Removed.
3282         (assertion_entry_type, assertion_table_type): New.
3283         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3284         assertion code definitions.
3285         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3286         'target_type' to 'op1' and 'op2'.
3287         (add_type_assertion): Declare.
3288         (lang_printable_name_wls): Remove unused definition.
3289         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3290         to emit runtime assertion.
3291         (vfy_note_stack_type): Clean up non-C90 declarations.
3292         (vfy_note_local_type): Likewise.
3293         * verify.h (vfy_is_assignable_from): Declare.
3294         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3295         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3296         instead of is_assignable_from_slow().
3297         (types_compatible): Reinstate ref_compatible() call.
3298
3299 2004-11-04  Tom Tromey  <tromey@redhat.com>
3300
3301         * class.c (build_static_field_ref): Reverted previous patch.
3302
3303         * class.c (build_static_field_ref): Don't emit direct references
3304         when using indirect dispatch.
3305
3306 2004-11-03  Tom Tromey  <tromey@redhat.com>
3307
3308         * expr.c (expand_java_arrayload): Set lhs_type_node.
3309         (expand_java_arraystore): Set rhs_type_node.
3310
3311 2004-11-02  Tom Tromey  <tromey@redhat.com>
3312
3313         * jcf-parse.c (compute_class_name): Use filename length from zip
3314         directory, not strlen.
3315
3316         * expr.c (expand_invoke): Mark new interface methods as abstract.
3317
3318 2004-11-01  Tom Tromey  <tromey@redhat.com>
3319
3320         * verify-impl.c (push_jump): Removed check for uninitialized
3321         objects.
3322         (push_exception_jump): Likewise.
3323         (handle_ret_insn): Likewise.
3324         (handle_jsr_insn): Likewise.
3325         (state_check_no_uninitialized_objects): Removed.
3326
3327         * decl.c (check_local_unnamed_variable): Recognize
3328         promoted-to-int parameters when using the new verifier.
3329         * expr.c (expand_java_arraystore): Explicitly request array type
3330         when using new verifier.
3331         (expand_java_arrayload): Likewise.
3332         (invoke_build_dtable): Don't pass object_type_node as
3333         expression argument to build_java_indirect_ref.
3334         (build_java_check_indexed_type): Do nothing.
3335         (build_java_arraystore_check): Handle case where array doesn't
3336         have array type.
3337         (build_java_array_length_access): Likewise.
3338         (expand_invoke): Handle case where interface overrides a method
3339         from Object.
3340         (pop_type_0): Always succeed for reference types.
3341         (process_jvm_instruction): Don't pop a value in a dead
3342         exception handler.
3343         (pop_arguments): Convert arguments to correct types.
3344
3345 2004-10-29  Andrew Haley  <aph@redhat.com>
3346
3347         * jcf-parse.c (give_name_to_class): Remove line that was
3348         incorrectly merged.
3349
3350 2004-10-29  Andrew Haley  <aph@redhat.com>
3351
3352         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3353
3354 2004-10-20  Andrew Haley  <aph@redhat.com>
3355
3356         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3357
3358 2004-10-26  Tom Tromey  <tromey@redhat.com>
3359
3360         * verify.h (vfy_notify_verified): Removed.
3361         * verify-glue.c (vfy_notify_verified): Removed.
3362
3363 2004-10-26  Tom Tromey  <tromey@redhat.com>
3364
3365         * verify-impl.c (debug_print_state): Declare `i' before code.
3366         (merge_types): Modify `t' when it is null_type.
3367
3368 2004-10-26  Tom Tromey  <tromey@redhat.com>
3369
3370         * verify-impl.c (type_print): Renamed from print.  Now static and
3371         takes an argument.
3372         (debug_print_state): Use type_print.
3373
3374 2004-10-25  Tom Tromey  <tromey@redhat.com>
3375
3376         * expr.c (build_invokeinterface): Compute correct offset for
3377         index into interface methods.
3378
3379 2004-10-20  Tom Tromey  <tromey@redhat.com>
3380
3381         * java-tree.h (verify_jvm_instructions_new): Declare.
3382
3383         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3384         command line.
3385
3386         * verify-impl.c (verify_instructions): Correctly handle wide
3387         types on the stack.
3388         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3389         (vfy_get_component_type): Strip pointer types.
3390         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3391         types.
3392         Include java-except.h.
3393
3394 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3395
3396         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3397         vfy_push_type_t, set_variable, add_new_state, merge_into,
3398         handle_jsr_insn, branch_prepass, check_class_constant,
3399         check_wide_constant, get_one_type, compute_static_types,
3400         verify_instructions_0): Clean up C99 declarations after statements.
3401
3402 2004-10-20  Tom Tromey  <tromey@redhat.com>
3403
3404         * verify-impl.c (merge_refs): Compare reference against iterator,
3405         not ref2.
3406
3407         * verify-glue.c (vfy_tag): Mask off resolved flag.
3408
3409 2004-10-19  Tom Tromey  <tromey@redhat.com>
3410
3411         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3412         (init_state_with_stack): Initialize `this_type' in state.
3413         (verify_method): Use debug_print.
3414         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3415         (vfy_note_stack_depth): Reverted last patch.
3416         (vfy_note_stack_type): Note pointer to Object, not Object.
3417         (vfy_note_local_type): Likewise.
3418
3419         * verify.h (vfy_note_instruction_seen): Declare.
3420         * verify-glue.c (verify_jvm_instructions_new): Set
3421         BCODE_EXCEPTION_TARGET on target instruction.
3422         (vfy_note_instruction_seen): New function.
3423         * verify-impl.c (FLAG_INSN_SEEN): New define.
3424         (verify_instructions_0): Set flag on instruction.  Save state for
3425         PC=0 later.
3426         (verify_instructions): Call vfy_note_instruction_seen.
3427
3428         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3429         (verify_jvm_instructions_new): Call method_init_exceptions,
3430         add_handler, and handle_nested_ranges.
3431         * verify-impl.c (verify_method): Return 1 on success.
3432         (verify_instructions_0): Save the state at PC=0.
3433
3434         * verify-impl.c (init_type_from_class): Set is_resolved and
3435         ref_next on new ref_intersection.
3436         (init_type_from_string): Likewise.
3437
3438 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3439
3440         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3441         if flag_new_verifier is set.
3442         * java-tree.h (flag_new_verifier): Declare.
3443         * lang.opt (fnew-verifier): New option.
3444         * verify-impl.c: Work around namespace pollution by undef'ing
3445         'current_class'.
3446         (struct verifier_context): Make 'bytecode' const.
3447         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3448         (types_compatible): For the BC-ABI, always consider reference types
3449         compatible.
3450         (check_class_constant): Use vfr->current_class.
3451         (check_constant): Likewise.
3452         (check_wide_constant): Likewise.
3453         (check_field_constant): Check for 'L' at start of type name.
3454         (get_one_type): Return pointer instead of type. Set type result in
3455         caller via passed type pointer.
3456         (compute_argument_types): Update to use new get_one_type arguments.
3457         (compute_return_type): Likewise.
3458         (make_verifier_context): New. Allocate and initialize 'vfr'.
3459         (free_verifier_context): New. Free 'vfr' and its contents.
3460         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3461         and free_verifier_context.
3462
3463 2004-10-15  Tom Tromey  <tromey@redhat.com>
3464
3465         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3466         * verify.h (vfy_fail): Fixed formatting.
3467
3468         * verify-impl.c (vfr): Fixed comment formatting.
3469         (collapse_type): New function.
3470         (verify_instructions): Notify compiler about type map.
3471         * verify.h (vfy_note_stack_depth): Updated.
3472         (vfy_note_stack_type): Likewise.
3473         (vfy_note_local_type): Likewise.
3474         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3475         Declare.
3476         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3477         state.  Added `method' argument.
3478         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3479         argument.
3480         (vfy_note_local_type): New function.
3481         (vfy_unsuitable_type): Likewise.
3482         (vfy_return_address_type): Likewise.
3483         (vfy_null_type): Likewise.
3484
3485         * verify.h (VFY_IN_GCC): Removed.
3486         (VFY_WANT_TYPEMAP): Removed.
3487         * verify-impl.c (verify_instructions_0): Removed useless "\".
3488         (struct state) <next>: Uncomment.
3489
3490 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3491
3492         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3493         C-style.
3494
3495 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3496
3497         * Make-lang.in (verify.o): Re-enabled this target.
3498         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3499         (vfy_get_interface): Likewise.
3500         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3501         * verify.h (verify_jvm_instructions_new): Declare.
3502         * verify-impl.c (free_state): Temporarily comment out unused
3503         function.
3504
3505 2004-10-06  Tom Tromey  <tromey@redhat.com>
3506
3507         * java-tree.h (JV_STATE_READ): New enum value.
3508
3509 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3510
3511         * verify.h: New file.
3512
3513 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3514
3515         * verify-impl.c, verify-glue.c, verify.h: New files.
3516         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3517
3518 2004-09-24  Andrew Haley  <aph@redhat.com>
3519
3520         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3521         for a slot if it's of pointer type.
3522
3523 2004-09-14  Tom Tromey  <tromey@redhat.com>
3524
3525         * class.c (make_class_data): Correctly initialize "state" field.
3526         Initialize "engine" field.
3527         * decl.c (java_init_decl_processing): Add "engine" field.
3528
3529 2004-09-10  Andrew Haley  <aph@redhat.com>
3530
3531         PR java/12760
3532         * expr.c (build_invokeinterface): Use fast method for interface
3533         dispatch.
3534         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3535         JTI_ITABLE_PTR_TYPE.
3536         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3537         (emit_symbol_table): Add new arg, element_size.
3538         * decl.c (java_init_decl_processing): Initialize Class.itable.
3539         * class.c (GEN_TABLE): New macro.
3540         (gen_indirect_dispatch_tables): Use it.  Add itable.
3541         (make_class_data): Add new arg for emit_symbol_table().
3542         Emit itable.
3543         (add_miranda_methods): Make sure search_class has been parsed.
3544         (emit_symbol_table): Add new arg, element_size.
3545
3546 2004-09-06  Andrew Haley  <aph@redhat.com>
3547
3548         * verify.c (merge_types): Return Object for all merges of
3549         interfaces.
3550         * expr.c (add_type_assertion): Don't generate assertions when
3551         source type is array of Object.
3552
3553 2004-09-03  Andrew Haley  <aph@redhat.com>
3554
3555         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3556
3557         * lang.c (java_post_options): Force flag_verify_invocations if
3558         we're not using indirect dispatch.
3559
3560         * expr.c (pop_type_0): Move test for interfaces before call to
3561         can_widen_reference_to().
3562         (build_signature_for_libgcj): Remove generation of canonical array
3563         type.
3564         (add_type_assertion): Canonicalize both arrays.
3565         Don't assert that type X can be assigned to Object.
3566         Don't assert that type X an be assigned to type X.
3567         Don't assert that Object can be assigned to type X.
3568         (can_widen_reference_to): Warn whenever we generate an assertion.
3569         (process_jvm_instruction): Use throwable_type_node for the type of
3570         an exception class.
3571
3572 2004-09-01  Andrew Haley  <aph@redhat.com>
3573
3574         * decl.c (java_init_decl_processing): Change
3575         verify_identifier_node to "__verify".
3576         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3577         * java-tree.h (verify_identifier_node): Change to "__verify".
3578
3579         * expr.c (build_signature_for_libgcj): New function.
3580         (add_type_assertion): Use it to construct signatures for
3581         source_type and target_type.
3582
3583 2004-08-27  Andrew Haley  <aph@redhat.com>
3584
3585         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3586         (verify_identifier_node): New.
3587         (TYPE_VERIFY_METHOD): New.
3588         (struct type_assertion): New type.
3589         * expr.c (type_assertion_eq): New function.
3590         (type_assertion_hash): New function.
3591         (add_type_assertion): New function.
3592         (can_widen_reference_to): Call add_type_assertion().
3593         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3594         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3595         (finish_class): Output TYPE_VERIFY_METHOD (type).
3596
3597         * decl.c (end_java_method): Nullify unused fields.
3598
3599 2004-08-17  Andrew Haley  <aph@redhat.com>
3600
3601         * verify.c (defer_merging): Quieten.
3602         * jcf-parse.c (load_class): Only try to open a class file if it's
3603         java.lang.Object or if it's part of the current compilation.
3604         Check that the class we just tried to load is the class we just
3605         loaded.  Quieten.
3606         (java_parse_file): Set flag_verify_invocations off if we're
3607         compiling from .class.
3608         (parse_zip_file_entries): Abort if we try to read a dummy class.
3609         * expr.c (can_widen_reference_to): Quieten.
3610         (build_invokevirtual): Abort if we try to invokevirtual an
3611         interface.
3612         (expand_invoke): Don't build a non-interface call to an interface.
3613         (build_instanceof): Don't do premature optimization if
3614         flag_verify_invocations is not set.
3615         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3616         from superclass.
3617         (build_static_field_ref): Add correct type conversion for
3618         field_address.
3619         (add_miranda_methods): Disable generation of Miranda methods for
3620         dummy classes.
3621         (layout_class_method): Don't complain about non-static method
3622         overrides static method with dummy classes.
3623
3624 2004-08-13  Tom Tromey  <tromey@redhat.com>
3625
3626         * class.c (build_static_field_ref): Re-enable atable lookups for
3627         static fields.
3628
3629         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3630
3631 2004-08-11  Tom Tromey  <tromey@redhat.com>
3632
3633         * gcj.texi (libgcj Runtime Properties): Document new properties.
3634
3635 2004-08-06  Andrew Haley  <aph@redhat.com>
3636
3637         * jcf-parse.c (load_class): Check that we really have loaded the
3638         class we're looking for.
3639
3640 2004-07-19  Andrew Haley  <aph@redhat.com>
3641
3642         * verify.c (verify_jvm_instructions): Comment change only.
3643
3644         * typeck.c (build_java_array_type): Add size field to array name.
3645
3646         * java-tree.h (LOCAL_SLOT_P): New.
3647         (update_aliases): Add PC argument.
3648         (pushdecl_function_level): New function.
3649
3650         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3651         MODIFY_EXPR, and SAVE_EXPR.
3652         (java_gimplify_modify_expr): New function.
3653
3654         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3655         (expand_iinc): Pass PC to update_aliases().
3656         (STORE_INTERNAL): Likewise.
3657         (process_jvm_instruction): Likewise.
3658
3659         * decl.c (base_decl_map): New variable.
3660         (uniq): New variable.
3661         (update_aliases): Rewrite with more thorough checking.
3662         (debug_variable_p): New function.
3663         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3664         (check_local_named_variable): Delete whole function.
3665         (initialize_local_variable): New function.
3666         (check_local_unnamed_variable): Add checks and comments.
3667         (find_local_variable): Rewrite.
3668         (java_replace_reference): New function.
3669         (function_binding_level): New variable.
3670         (pushdecl_function_level): New function.
3671         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3672         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3673         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3674         function_binding_level.
3675         (end_java_method): Null unused fields to save memory.
3676
3677 2004-06-29  Andrew Haley  <aph@redhat.com>
3678
3679         * except.c (expand_start_java_handler): Push a new binding level.
3680         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3681         register_exception_range() to register where we'll do it.
3682         (expand_end_java_handler): Remove old bogus code.  Replace with
3683         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3684         the top of the expression we're curently building.
3685         (maybe_end_try): Delete.
3686         * decl.c (binding_level.exception_range): New field.
3687         (clear_binding_level): Add field exception_range.  Reformat.
3688         (poplevel): Call expand_end_java_handler().
3689         (poplevel): Call java_add_stmt only if functionbody is false.
3690         (maybe_poplevels): Don't call maybe_end_try() from here.
3691         (end_java_method): Clear no longer used trees in function decl.
3692         (register_exception_range): New function.
3693         * java-tree.h (register_exception_range, struct eh_range): Declare.
3694
3695 2004-06-22  Andrew Haley  <aph@redhat.com>
3696
3697         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3698         the otable.
3699         * check-init.c (get_variable_decl): Teach check-init about
3700         FIELD_DECLs addressed via the otable.
3701         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3702         CLASS_PARSED_P.
3703
3704 2004-05-28  Andrew Haley  <aph@redhat.com>
3705
3706         * jcf-parse.c (load_class): Don't try to read a class that we've
3707         already read.
3708
3709         * expr.c (build_invokeinterface): Use the old-fashioned way of
3710         doing indirect dispatch: look up interfaces by name.
3711         * java-tree.h (enum java_tree_index): Add
3712         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3713         * decl.c (java_init_decl_processing): Add
3714         soft_lookupinterfacemethodbyname_node.
3715
3716         * gjavah.c (print_method_info): Final methods have vtable entries,
3717         so gjavah needs to output them.
3718         * class.c (layout_class_method): Generate vtable entries for final
3719         methods.
3720         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3721         dispatch, even if a method is final.
3722
3723 2004-05-25  Andrew Haley  <aph@redhat.com>
3724
3725         * class.c (build_symbol_entry): Convert the names of constructors
3726         to init_identifier_node when generating an entry for the indirect
3727         dispatch table.
3728
3729         * expr.c (build_known_method_ref): Generate indirect calls for
3730         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3731
3732 2004-05-24  Andrew Haley  <aph@redhat.com>
3733
3734         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3735         atable element is of the right type.
3736
3737         * class.c (build_static_field_ref): Cast pointer to correct type
3738         for field.
3739
3740 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3741
3742         * Merged with HEAD as of 20040514. Diff against
3743         gcj-abi-2-merge-20040514.
3744
3745 2004-04-16  Andrew Haley  <aph@redhat.com>
3746
3747         * verify.c (check_pending_block): Disable subroutine checks.
3748         (defer_merging): New function.
3749         (merge_types): If types are dummy, use defer_merging to combine them.
3750         (verify_jvm_instructions): If invocation is invokeinterface and
3751         target is dummy, assume target really is an interface.
3752
3753         * parse.y (patch_invoke): Break out call to java_create_object.
3754
3755         * lang.c (flag_verify_invocations): New.
3756
3757         * jcf-parse.c (load_class): If we've already failed to load a
3758         class, don't try again.
3759         (load_class): If we can't find a .class file, don't fail, but emit
3760         a warning.
3761         (parse_class_file): Don't act on dummy methods.
3762
3763         * java-tree.h (flag_verify_invocations): New.
3764         (TYPE_DUMMY): New.
3765         (lang_type.dummy_class): New field.
3766         (java_create_object): New function.
3767         (METHOD_DUMMY): New.
3768
3769         * expr.c (build_field_ref): Widen field offset.
3770         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3771         that each of its elements is compatible with the one we're
3772         popping.
3773         (pop_type_0): Issue a warning to say that we need to generate a
3774         runtime check.
3775         (java_create_object): New function.
3776         (build_field_ref): Only generate hard refs if we're not using
3777         indirect dispatch.
3778         (expand_java_field_op): If we're using !verify_invocations and we
3779         see a missing field, generate a decl for it.
3780
3781         (expand_invoke): If a class doesn't have the method we seek and
3782         we're using !flag_verify_invocations, generate a decl for the
3783         method now.
3784
3785         (build_known_method_ref): Always use indirect dispatch via the
3786         atable for static methods.
3787
3788         (expand_java_NEW): Break out object creation into new function,
3789         java_create_object.
3790
3791         (can_widen_reference_to): Issue a warning to say that we need to
3792         generate a runtime check.
3793
3794         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3795         (make_method_value): Also use index for interfaces.
3796         (make_class_data): Skip dummy field for inherited data.
3797         Don't build method array for dummy methods.
3798         Set size_in_byte to -1 when using inirect dispatch
3799         Don't build a hard class ref if we don't have a hard ref to our
3800         superclass, or if we're using inirect dispatch.
3801         Null out dispatch tables.
3802
3803         (layout_class_method): Don't complain about non-static method
3804         overrides static method is method is artificial.
3805
3806         (build_static_field_ref): Disable atable references to static
3807         fields for the time being.
3808
3809         (layout_class_methods): Check for CLASS_INTERFACE as
3810         well as CLASS_ABSTRACT.
3811
3812 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3813
3814         * class.c (make_class_data): Don't check flag_inline_functions.
3815         * lang.c (flag_really_inline): Remove unused flag.
3816         (java_handle_option): Don't set it here.  Remove special handling
3817         of flag_inline_functions for Java.
3818         (java_init): Don't set flag_inline_trees here.  Already done...
3819         (java_post_options): ...here.  Don't clear flag_inline_functions.
3820
3821 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3822
3823         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3824         (java_gimplify_exit_block_expr): New function.
3825         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3826         LABELED_BLOCK_EXPR.
3827         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3828         (EXIT_BLOCK_EXPR): Likewise.
3829         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3830         (LABELED_BLOCK_BODY): Likewise.
3831         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3832         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3833         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3834         TREE_OPERAND.
3835         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3836         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3837         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3838         second operand of EXIT_BLOCK_EXPR.
3839         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3840         TREE_OPERAND.
3841         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3842
3843 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3844
3845         * xref.h (xref_flag_value): Remove.
3846         (xref_set_data, xref_get_data): Likewise.
3847         (xref_set_current_fp): Likewise.
3848         (XREF_NONE): Likewise.
3849         (XREF_GET_DATA): Likewise.
3850         * xref.c (xref_flag_value): Remove.
3851         (xref_set_data, xref_get_data): Likewise.
3852         (xref_set_current_fp): Likewise.
3853
3854 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3855
3856         * gjavah.c (output_directory): Make static.
3857         (temp_directory): Likewise.
3858
3859 2004-11-15  Tom Tromey  <tromey@redhat.com>
3860
3861         * decl.c (instn_ptr_type_node): Removed.
3862         (lineNumbers_ptr_type_node): Removed.
3863         (jint_type): Removed.
3864         (jint_ptr_type): Removed.
3865
3866 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3867
3868         PR java/15576
3869         * check-init.c (check_init): Ignore DECL_EXPR.
3870         * expr.c (always_initialize_class_p): Reenable.
3871         (build_class_init): Use a variable to store the decl.  Also use
3872         boolean_false_node instead of integer_zero_node.
3873         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3874         to the block.
3875
3876 2004-11-08  Tom Tromey  <tromey@redhat.com>
3877
3878         PR java/16843:
3879         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3880         generating a JNI header.
3881         (print_field_info): Handle JNI headers.
3882         (jni_print_float): Likewise.
3883         (jni_print_double): Likewise.
3884
3885 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3886
3887         * decl.c (end_java_method): Remove duplicated code.
3888
3889 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3890             Gerald Pfeifer  <gerald@pfeifer.com>
3891
3892         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3893         as well.
3894
3895 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3896
3897         PR java/17265
3898         * class.c: Reinstate 2004-08-18 patch.
3899         (make_local_function_alias): Don't create an alias for extern (native)
3900         functions.
3901
3902 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3903
3904         PR java/17265
3905         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3906         (make_method_value): Likewise.
3907
3908 2004-10-21  Andrew Haley  <aph@redhat.com>
3909
3910         PR java/18091:
3911         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3912
3913 2004-10-20  Andrew Haley  <aph@redhat.com>
3914
3915         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3916         Remove duplicated code block.
3917
3918 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3919
3920         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3921         New rules to work around old Bison warnings.
3922
3923 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3924
3925         * class.c (ident_subst): Always alloca buffer.
3926         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3927         opcode after including javaop.def.
3928         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3929         conditional expression that exits, to avoid warnings.
3930         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3931         a user of an extension.
3932         * win32-host.c: Move check down to have non-empty file when
3933         WIN32 is not defined.
3934
3935         * Make-lang.in (java-warn): Add STRICT_WARN.
3936         (java/jcf-io.o-warn): Don't have Werror for this file.
3937         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3938
3939 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3940
3941         * expr.c (expr_add_location): Move declaration to before all
3942         statements.
3943         * parse.y (java_expand_classes): Ditto.
3944         * lex.c (java_peek_unicode): Ditto.
3945
3946 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3947
3948         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3949         if possible, else convert `foo' to 'foo'.
3950         * class.c: Likewise.
3951         * decl.c: Likewise.
3952         * expr.c: Likewise.
3953         * jcf-io.c: Likewise.
3954         * jcf-parse.c: Likewise.
3955         * lang.c: Likewise.
3956         * lex.c: Likewise.
3957         * parse.h: Likewise.
3958
3959 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3960
3961         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3962         rename parameter 'msg' to 'msgid' in function declaration.
3963         (issue_warning_error_from_context): Likewise.
3964         (yyerror): Rename parameter 'msg' to 'msgid'.
3965         (all over): Use new quoting style for diagnostics.
3966
3967 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3968
3969         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3970         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3971         Update copyright.
3972
3973 2004-10-14  Matt Austern  <austern@apple.com>
3974
3975         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3976         pointer_set_t* now.
3977
3978 2004-10-13  Tom Tromey  <tromey@redhat.com>
3979
3980         PR java/15578:
3981         * lang.opt (--extdirs): Document.
3982         * jvspec.c (lang_specific_driver): Recognize -encoding and
3983         -extdirs.
3984
3985 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3986
3987         * parse.y (issue_warning_error_from_context): Use va_list *
3988         instead of va_list parameter.
3989         (parse_error_context): Update call.
3990         (parse_warning_context): Likewise.
3991
3992 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3993
3994         * parse.y, parse-scan.y: Add list of diagnostic messages to
3995         insulate translation template from version of yacc/bison used
3996         to compile the grammar.
3997
3998 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3999
4000         Prepare for %q, %< and %> in diagnostic message strings.
4001         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4002         Name second parameter 'msgid'.
4003         * parse.y: Additionally include pretty-print.h and diagnostic.h.
4004         (issue_warning_error_from_context): Use pretty-printer functions
4005         instead of vsprintf for constructing formatted messages. Rename
4006         parameter 'msg' to 'msgid'.
4007         (parse_error_context): Rename parameter 'msg' to 'msgid'.
4008         (parse_warning_context): Likewise.
4009
4010 2004-10-05  Andrew Haley  <aph@redhat.com>
4011
4012         PR java/17779
4013         * jcf-parse.c (parse_zip_file_entries): If a class has a
4014         superclass and a TYPE_SIZE of zero, lay it out.
4015
4016 2004-09-30  Andrew Haley  <aph@redhat.com>
4017
4018         PR java/17733
4019         * jcf-parse.c (compute_class_name): Rewrite.
4020
4021 2004-10-01  Jan Hubicka  <jh@suse.cz>
4022
4023         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4024
4025 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4026
4027         * lex.c: Fix a comment typo.
4028
4029 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4030
4031         * java-tree.h: Fix a comment typo.
4032
4033 2004-09-30  Per Bothner  <per@bothner.com>
4034
4035         Simplify lexer.  Implement --enable-mapped-location support.
4036         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
4037         (parse_source_file_1): Pass filename as extra parameter, so we can call
4038         linemap_add and set input_location here, rather than in both callers.
4039         (read_class): Pass copied filename to parse_source_file_1.
4040         Don't initialize wfl_operator - only needed for source compilation.
4041         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
4042         * lex.h:  Remove a bunch of debugging macros.
4043         * lex.h (struct_java_line, struct java_error):  Remove types.
4044         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
4045         (struct java_lc_s):  Remove prev_col field.
4046         (struct java_lexer):  New fields next_unicode, next_columns, and
4047         avail_unicode.  New position field, and maybe token_start field.
4048         Don't need hit_eof field - use next_unicode == -1 instead.
4049         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
4050         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
4051         * parse.h:  Various changes for USE_MAPPED_LOCATION.
4052         (EXPR_WFL_EMIT_LINE_NOTE): XXX
4053         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4054         (struct parser_ctxt):  New file_start_location field.
4055         Remove p_line, c_line fields since we no longer save lines.
4056         Remove elc, lineno, and current_jcf fields - no longer used.
4057         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
4058         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4059         source_location and is probably not needed anymore anyway.
4060         Use new expr_add_Location function.
4061         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
4062         (java_pop_parser_context):  Minor cleanup.
4063         (java_parser_context_save_global, java_parser_context_restore_global,
4064         java_pop_parser_context):  Save/restore input_location as a unit.
4065         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
4066         a source_location instead of a wfl context node.
4067         (check_class_interface_creation):  input_filename is not addressable.
4068         (create_artificial_method):  Calling java_parser_context_save_global
4069         and java_parser_context_restore_global is overkill.  Instead,
4070         temporarily set input_location from class decl.
4071         (java_layout_seen_class_methods): Set input_location from method decl.
4072         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4073         (finish_loop_body):  Likewise.
4074         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
4075         (java_sprint_unicode):  Take a character, not index in line.
4076         (java_sneak_uncode):  Replaced by java_peek_unicode.
4077         (java_unget_unicode):  No longer used.
4078         (java_allocate_new_line. java_store_unicode):  Removed, since we
4079         no longer remember "lines".
4080         (java_new_lexer):  Update for new data structures.
4081         (java_read_char):  Move unget_value checking to java_read_unicode.
4082         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4083         efficient functions that are used directly when lexing.
4084         (java_read_unicode_collapsing_terminators):  No longer needed.
4085         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4086         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4087         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
4088         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
4089         combine switch branches, and test for common token kinds earlier.
4090         (java_lex_error):  Rewrite.
4091         * jv-scan.c (expand_location): New function, copied from tree.c.
4092         (main): Set ctxp->filename instead of setting input_filename directly.
4093
4094 2004-09-30  Per Bothner  <per@bothner.com>
4095
4096         More cleanup for --enable-mapped-location.
4097         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
4098         input_location here.  Instead do it in give_name_to_class.
4099         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4100         * expr.c (expand_byte_code): Call linemap_line_start.
4101         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
4102         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
4103         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
4104         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
4105         to USE_MAPPED_LOCATION case.
4106
4107         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
4108         * jcf-parse.c (java_parse_file): Don't set input_filename.
4109         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4110         Create a list of TRANSLATION_UNIT_DECL.
4111         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
4112         reason is so we can set a DECL_SOURCE_LOCATION for each file.
4113         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4114         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4115         (file_start_location):  New static.
4116         (set_source_filename):  Avoid extra access to input_filename macro.
4117         Concatenate new name with class's package prefix.
4118         (set_source_filename, give_name_to_class): Update.
4119         (give_name_to_class):  Set class's "line 0" input_location here.
4120         (parse_class_file):  Set input_location as a unit.
4121
4122         * jcf-parse.c (load_class): Sanity test if missing inner class file.
4123
4124 2004-09-29  Per Bothner  <per@bothner.com>
4125
4126         * java-tree.h:  Redefine some macros and add some declaration
4127         to handle the USE_MAPPED_LOCATION case.
4128         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
4129         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
4130         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4131         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4132
4133         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4134         * decl.c (finish_method, java_add_stmt): Likewise.
4135         * java-gimplify.c (java-gimplify.c):  Likewise.
4136         * jcf-write.c (generate_bytecode_insns):  Likewise.
4137         * lang.c (java_post_options): Likewise - call linemap_add.
4138
4139 2004-09-29  Andrew Haley  <aph@redhat.com>
4140
4141         PR java/17007
4142         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4143         result of TRUNC_MOD_EXPR.
4144         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4145         * decl.c (java_init_decl_processing): Mark
4146         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4147
4148 2004-09-28  Tom Tromey  <tromey@redhat.com>
4149
4150         PR java/15710:
4151         * class.c (add_miranda_methods): Load superinterface if not
4152         already loaded.
4153
4154 2004-09-28  Andrew Haley  <aph@redhat.com>
4155
4156         PR java/17586
4157         * jcf-parse.c (load_class): Don't try to read a class that we've
4158         already read.
4159
4160 2004-09-28  Andrew Haley  <aph@redhat.com>
4161
4162         * jcf-parse.c (load_class): Back out previous broken patch.
4163
4164 2004-09-28  Andrew Haley  <aph@redhat.com>
4165
4166         PR java/17586
4167         * jcf-parse.c (load_class): Don't try to read a class that we've
4168         already read.
4169         Check that we really did read the right class.
4170
4171 2004-09-25  Tom Tromey  <tromey@redhat.com>
4172
4173         PR java/17500:
4174         * parse.y (create_artificial_method): Use add_method_1.
4175
4176 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
4177
4178         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4179         comment typos.
4180         * gcj.texi: Fix typos.
4181
4182 2004-09-24  Tom Tromey  <tromey@redhat.com>
4183
4184         PR java/15656:
4185         * parse.y (class_instance_creation_expression): Set `$$' to NULL
4186         in error parts of rule.
4187         (unary_expression): Don't call error_if_numeric_overflow when $1
4188         is NULL.
4189
4190 2004-09-24  Tom Tromey  <tromey@redhat.com>
4191
4192         PR java/16789:
4193         * parse.y (resolve_qualified_expression_name): Set
4194         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4195         * expr.c (force_evaluation_order): Check for empty argument list
4196         after stripping COMPOUND_EXPR.
4197
4198 2004-09-23  Andrew Haley  <aph@redhat.com>
4199
4200         PR java/16927:
4201         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4202         COND_EXPRs.
4203
4204 2004-09-23  Tom Tromey  <tromey@redhat.com>
4205
4206         PR java/17329:
4207         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4208         where operand is null.
4209
4210 2004-09-23  Tom Tromey  <tromey@redhat.com>
4211
4212         PR java/17380:
4213         * parse.y (not_accessible_p): Allow access to protected members
4214         even when class is not static.
4215
4216 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4217
4218         * Make-lang.in: Revert the gcc-none.o change.
4219
4220 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4221
4222         * parse.y (patch_anonymous_class): VEC_space returns true if there
4223         is space.
4224
4225 2004-09-21  Matt Austern  <austern@apple.com>
4226
4227         Fix bootstrap.
4228         * gjavah.c (free_method_name_list): Fix function definition so
4229         it's a proper C prototype.
4230
4231 2004-09-21  Tom Tromey  <tromey@redhat.com>
4232
4233         PR java/17575:
4234         * gjavah.c (free_method_name_list): New method.
4235         (main): Call it.
4236
4237 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4238             Zack Weinberg  <zack@codesourcery.com>
4239
4240         * java-tree.def: Use tree_code_class enumeration constants
4241         instead of code letters.
4242         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4243         new tree-class enumeration constants.
4244
4245 2004-09-13  Tom Tromey  <tromey@redhat.com>
4246
4247         PR java/17216:
4248         * class.c (layout_class_method): Put synthetic methods into the
4249         vtable.
4250
4251 2004-09-11  Andrew Pinski  <apinski@apple.com>
4252
4253         * Make-lang.in (java/ggc-none.c): Change dependency
4254         for ggc.h into $(GGC_H).
4255
4256 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4257
4258         * Make-lang.in (java/win32-host.o): Add dependency on
4259         coretypes.h.
4260         * win32-host.c: Add includes for coretypes.h, jcf.h
4261
4262 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4263
4264         * Make-lang.in (GCJH_OBJS): Change dependency from
4265         ggc-none.o to java/ggc-none.o
4266         (JCFDUMP_OBJS): Likewise.
4267         (java/ggc-none.o): New target.
4268
4269 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4270
4271         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4272         * class.c (build_utf8_ref, build_static_field_ref,
4273         make_field_value, make_method_value, get_dispatch_table,
4274         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4275         * constants.c (get_tag_node, build_ref_from_constant_pool,
4276         build_constants_constructor): Likewise.
4277         * decl.c (java_init_decl_processing): Likewise.
4278         * expr.c (build_java_array_length_access, build_newarray,
4279         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4280         build_java_binop, build_field_ref, expand_java_add_case,
4281         expand_java_call, build_known_method_ref, build_invokevirtual,
4282         build_invokeinterface, build_jni_stub): Likewise.
4283         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4284         * jcf-parse.c (get_constant): Likewise.
4285         * lex.c (do_java_lex): Likewise.
4286         * parse.y (patch_binop, patch_unaryop, patch_cast,
4287         build_newarray_node, patch_newarray): Likewise.
4288         * resource.c (compile_resource_data): Likewise.
4289         * typeck.c (build_prim_array_type): Likewise.
4290
4291 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4292
4293         * decl.c (java_init_decl_processing): Adjust
4294         initialize_sizetypes call.
4295
4296 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4297
4298         * jv-scan.c (fancy_abort): Add.
4299
4300 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4301
4302         * expr.c (build_java_arrayaccess): Use convert to change
4303         len's type.
4304
4305 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4306
4307         * class.c (make_local_function_alias): Allocate extra space for 'L'
4308         in name buffer. Reported by Thomas Neumann.
4309
4310 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4311
4312         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4313         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4314         * lex.c (do_java_lex): Adjust.
4315         (error_if_numeric_overflow): Likewise.
4316
4317 2004-08-18  Andrew Pinski  <apinski@apple.com>
4318
4319         * class.c (make_local_function_alias): Only make a new decl if we
4320         support alias attribute on all decls.
4321
4322 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4323
4324         * class.c (make_local_function_alias): New function. Create local
4325         alias for public method DECL.
4326         (make_method_value): Use make_local_function_alias.
4327         * parse.y (craft_constructor): Don't special-case anonymous classes.
4328         Always set ctor_name to init_identifier_node.
4329         (lookup_method_invoke): Call layout_class_method when creating
4330         anonymous class constructor.
4331
4332 2004-08-18  Richard Henderson  <rth@redhat.com>
4333
4334         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4335         default case.  Treat '<' similarly.  Update for
4336         is_gimple_formal_tmp_var name change.
4337
4338 2004-08-17  Andrew Haley  <aph@redhat.com>
4339
4340         * lang.c (lang_printable_name): Obey verbose flag.
4341         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4342         lang_printable_name().
4343         (verify_constructor_circularity, get_printable_method_name,
4344         check_abstract_method_definitions, java_check_regular_methods,
4345         java_check_abstract_methods, check_inner_class_access,
4346         fix_constructors, patch_method_invocation, patch_return):
4347         Likewise.
4348         * expr.c (pop_type_0): Likewise.
4349
4350         * java-tree.h (lang_printable_name_wls): Delete.
4351
4352 2004-08-16  Tom Tromey  <tromey@redhat.com>
4353
4354         PR java/8473:
4355         * parse.y (primary): Changed for initialized and uninitialized
4356         array creations.
4357         (array_access): Handle array_creation_initialized.
4358         (array_creation_expression): Split into
4359         array_creation_initialized and array_creation_uninitialized.
4360
4361 2004-08-16  Andrew Haley  <aph@redhat.com>
4362
4363         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4364         generating bytecode.
4365
4366 2004-08-16  Elliot Lee <sopwith@redhat.com>
4367
4368         PR java/9677
4369         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4370         spaces, and quoted filelists.
4371
4372 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4373
4374         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4375         * class.c (build_utf8_ref, build_static_field_ref,
4376         make_field_value, make_method_value, get_dispatch_table,
4377         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4378         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4379         build_constants_constructor): Likewise.
4380         * decl.c (java_init_decl_processing): Likewise.
4381         * expr.c (build_java_array_length_access, build_newarray,
4382         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4383         build_java_binop, build_field_ref, expand_java_add_case,
4384         expand_java_call, build_known_method_ref, build_invokevirtual,
4385         build_invokeinterface, build_jni_stub): Likewise.
4386         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4387         * jcf-parse.c (get_constant): Likewise.
4388         * lex.c (do_java_lex): Likewise.
4389         * parse.y (patch_binop, patch_unaryop, patch_cast,
4390         build_null_of_type, patch_newarray): Likewise.
4391         * resource.c (compile_resource_data): Likewise.
4392         * typeck.c (build_prim_array_type): Likewise.
4393
4394 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4395
4396         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4397         Don't create BLOCK here or call java_gimplify_block.
4398
4399 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4400
4401         * java-tree.h (flag_deprecated): Removed.
4402         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4403         * parse.y (check_deprecation): Check warn_deprecated instead of
4404         flag_deprecated.
4405
4406 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4407
4408         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4409         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4410         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4411         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4412         flag_force_classes_archive_check, flag_optimize_sci,
4413         flag_indirect_dispatch): Remove explicit declarations.
4414         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4415         final comment.
4416
4417 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4418
4419         PR bootstrap/14893
4420         * Make-lang.in (java.install-man): Install from either build
4421         tree or source tree, whichever has the file first.
4422
4423 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4424
4425         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4426         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4427         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4428         (do_java_lex): Likewise. Adjust force_fit_type call.
4429
4430 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4431             Andrew Haley  <aph@redhat.com>
4432
4433         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4434         checking trees as they're being built.
4435         (convert): Call convert_ieee_real_to_integer if we're
4436         converting a constant, even if we're writing a class file.
4437
4438 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4439
4440         PR java/16701
4441         * parse.y (fold_constant_for_init): Call resolve_field_access with
4442         correct current_class context.
4443
4444 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4445
4446         * decl.c (update_aliases, initialize_local_variable): Replace calls
4447         to build with calls to buildN.
4448         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4449         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4450         * parse.h (BUILD_THROW): Likewise.
4451         * parse.y (switch_expression, synchronized_statement,
4452         catch_clause_parameter, array_creation_expression,
4453         conditional_expression, make_qualified_name,
4454         resolve_qualified_expression_name, patch_method_invocation,
4455         patch_invoke, build_method_invocation, build_new_invocation,
4456         build_assignment, patch_assignment, build_binop, patch_binop,
4457         build_string_concatenation, build_incdec, patch_unaryop,
4458         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4459         patch_return, build_if_else_statement, build_labeled_block,
4460         build_new_loop, build_loop_body, build_bc_statement,
4461         build_assertion, encapsulate_with_try_catch, build_try_statement,
4462         build_try_finally_statement, patch_synchronized_statement,
4463         emit_test_initialization): Likewise, replace build with buildN.
4464
4465 2004-07-28  Eric Christopher  <echristo@redhat.com>
4466
4467         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4468         (java_unsafe_for_reeval): Ditto.
4469
4470 2004-07-26    <hp@bitrange.com>
4471
4472         * parse.y (build_super_invocation): Adjust declaration order to
4473         avoid declaration after statement.
4474
4475 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4476
4477         * decl.c: Rename all identifiers named `class' to `cl'.
4478
4479 2004-07-25  Richard Henderson  <rth@redhat.com>
4480
4481         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4482
4483 2004-07-23  Mike Stump  <mrs@apple.com>
4484
4485         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4486         * gjavah.c (throwable_p, decode_signature_piece,
4487         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4488         process_file): Likewise.
4489         * jcf-dump.c (main): Likewise.
4490         * jcf-io.c (read_zip_member): Likewise.
4491         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4492         give_name_to_class, get_class_constant): Likewise.
4493         * jcf-write.c (find_constant_wide, push_long_const,
4494         generate_classfile): Likewise.
4495         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4496         * parse.y (read_import_dir): Likewise.
4497         * typeck.c (parse_signature_type): Likewise.
4498         * verify.c (verify_jvm_instructions): Likewise.
4499         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4500
4501 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4502
4503         * Make-lang.in: Replace rmic and rmiregistry references with
4504         grmic and grmiregistry.
4505         * gcj.texi: Likewise.
4506
4507 2004-07-20  Andrew Haley  <aph@redhat.com>
4508
4509         PR java/16431.
4510         * verify.c (verify_jvm_instructions): Comment change only.
4511
4512         * typeck.c (build_java_array_type): Add size field to array name.
4513
4514         * java-tree.h (LOCAL_SLOT_P): New.
4515         (update_aliases): Add PC argument.
4516         (pushdecl_function_level): New function.
4517
4518         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4519         MODIFY_EXPR, and SAVE_EXPR.
4520         (java_gimplify_modify_expr): New function.
4521
4522         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4523         (expand_iinc): Pass PC to update_aliases().
4524         (STORE_INTERNAL): Likewise.
4525         (process_jvm_instruction): Likewise.
4526
4527         * decl.c (base_decl_map): New variable.
4528         (uniq): New variable.
4529         (update_aliases): Rewrite with more thorough checking.
4530         (debug_variable_p): New function.
4531         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4532         (check_local_named_variable): Delete whole function.
4533         (initialize_local_variable): New function.
4534         (check_local_unnamed_variable): Add checks and comments.
4535         (find_local_variable): Rewrite.
4536         (java_replace_reference): New function.
4537         (function_binding_level): New variable.
4538         (pushdecl_function_level): New function.
4539         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4540         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4541         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4542         function_binding_level.
4543         (end_java_method): Null unused fields to save memory.
4544
4545 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4546
4547         * class.c (add_interface_do): Remove.
4548         (set_super_info, interface_of_p, maybe_add_interface,
4549         add_interface, make_class_data, layout_class,
4550         add_miranda_methods): Adjust BINFO accessors and addition.
4551         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4552         accessors.
4553         * jcf-write.c (generate_classfile): Likewise.
4554         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4555         check_circular_reference, java_complete_class,
4556         check_abstract_method_definitions,
4557         java_check_abstract_method_definitions,
4558         check_interface_throws_clauses, java_check_abstract_methods,
4559         lookup_java_interface_method2,
4560         find_applicable_accessible_methods_list): Adjust BINFO accessors
4561         and addition.
4562         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4563
4564 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4565
4566         * builtins.c (max_builtin, min_builtin,
4567         java_build_function_call_expr): Replace calls to build with buildN.
4568         * class.c (build_class_ref, build_static_field_ref,
4569         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4570         * constants.c (build_ref_from_constant_pool): Likewise.
4571         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4572         add_stmt_to_compound): Likewise.
4573         * except.c (build_exception_object_ref, expand_end_java_handler):
4574         Likewise.
4575         * java-gimplify.c (java_gimplify_case_expr,
4576         java_gimplify_default_expr, java_gimplify_block,
4577         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4578         * jcf-write.c (generate_bytecode_insns): Likewise.
4579         * typeck.c (convert_ieee_real_to_integer): Likewise.
4580
4581 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4582
4583         * java-tree.h (builtin_function): Declare.
4584
4585 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4586
4587         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4588         abuse restore_line_number_status.
4589
4590 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4591
4592         g++/15861
4593         * jcf-parse.c (java_emit_static_constructor): Specify default
4594         priority.
4595
4596 2004-07-13  Per Bothner  <per@bothner.com>
4597
4598         * java-tree.h (all_class_filename):  Remove useless macro.
4599         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4600         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4601         * parse.y (java_parser_context_restore_global):  Replace
4602         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4603         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4604
4605 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4606
4607         PR java/16474
4608         gjavah.c (print_field_info): Emit constant only if field is static.
4609
4610 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4611
4612         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4613         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4614         build_java_ret, build_java_throw_out_of_bounds_exception,
4615         build_java_array_length_access, java_check_reference,
4616         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4617         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4618         expand_java_arrayload, build_java_monitor, expand_java_return,
4619         expand_load_internal, expand_java_NEW, build_get_class,
4620         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4621         build_java_soft_divmod, build_java_binop, build_field_ref,
4622         expand_compare, expand_java_goto, expand_java_switch,
4623         expand_java_add_case, build_class_init, build_known_method_ref,
4624         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4625         expand_invoke, build_jni_stub, expand_java_field_op,
4626         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4627         force_evaluation_order, emit_init_test_initialization): Convert
4628         calls to "build" into calls to the prefered "buildN" functions.
4629
4630 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4631
4632         * java-tree.h (set_block): Remove.
4633         * lang.c (java_clear_binding_stack): New.
4634         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4635         * decl.c (struct binding_level): Remove this_block.
4636         (clear_binding_level): Likewise.
4637         (poplevel): Don't handle this_block.
4638         (set_block): Remove.
4639
4640 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4641
4642         * class.c (common_enclosing_context_p): Remove statement with no
4643         side-effects.
4644
4645 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4646
4647         PR java/8618
4648         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4649         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4650         (craft_constructor): Inherit access flags for implicit constructor
4651         from the enclosing class.
4652         (create_class): Fix comment typo.
4653         (resolve_qualified_expression_name): Pass type of qualifier to
4654         not_accessible_p, not the type in which target field was found.
4655         (not_accessible_p): Handle inner classes. Expand protected
4656         qualifier-subtype check to enclosing instances, but don't apply this
4657         check to static members. Allow protected access to inner classes
4658         of a subtype. Allow private access within common enclosing context.
4659         (build_super_invocation): Get WFL line number info from current
4660         class decl.
4661         (build_incomplete_class_ref): Update for new create_anonymous_class
4662         signature.
4663         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4664         common_enclosing_instance_p.
4665         * class.c (common_enclosing_context_p): New. Determine if types
4666         share a common enclosing context, even across static contexts.
4667         (common_enclosing_instance_p): Renamed from
4668         common_enclosing_context_p. Determines if types share a common
4669         non-static enclosing instance.
4670         * java-tree.h (common_enclosing_instance_p): Declare.
4671         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4672         for inner class constructors.
4673         (generate_classfile): Use get_method_access_flags.
4674
4675 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4676
4677         * class.c (interface_of_p): Check for null TYPE_BINFO.
4678
4679 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4680
4681         * class.c (make_class): Do not create binfo here.
4682         (set_super_info): Create it here.
4683         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4684
4685 2004-07-08  Richard Henderson  <rth@redhat.com>
4686
4687         * expr.c (case_identity, get_primitive_array_vtable,
4688         java_expand_expr, emit_init_test_initialization): Remove.
4689         * java-tree.h (java_expand_expr): Remove.
4690         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4691
4692 2004-07-07  Per Bothner  <per@bothner.com>
4693
4694         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4695         get internal error due to mismatched types.
4696
4697         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4698
4699         * gcj.texi (Linking):   New node.  Document -lgij usage.
4700
4701 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4702
4703         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4704         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4705         * java/class.c (set_super_info, class_depth, interface_of_p,
4706         maybe_add_interface, add_interface, make_class_data,
4707         layout_class, add_miranda_methods): Adjust BINFO macros.
4708         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4709         * jcf-write.c (generate_classfile): Likewise.
4710         * parse.y (patch_anonymous_class,
4711         check_inner_circular_reference, check_circular_reference,
4712         java_complete_class, check_abstract_method_definitions,
4713         java_check_abstract_method_definitions,
4714         check_interface_throws_clauses, java_check_abstract_methods,
4715         lookup_java_interface_method2,
4716         find_applicable_accessible_methods_list): Likewise.
4717         * typeck.c (find_method_in_interface): Likewise.
4718         * verify.c (merge_types): Likewise.
4719
4720 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4721
4722         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4723         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4724
4725 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4726
4727         * class.c (make_class): Use make_tree_binfo.
4728         (set_super_info, add_interface_do): Likewise.
4729         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4730
4731 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4732
4733         * verify.c: Correct array element access formatting thinko.
4734
4735 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4736
4737         * verify.c: Insert a short blurb at the start referring to the JVMS.
4738         (merge_type_state): Remove redundant nested if statement.
4739         (verify_jvm_instructions): Ensure current_subr is initialised to
4740         NULL_TREE.
4741         Minor formatting fixes all over the place.
4742
4743 2004-07-02  Richard Henderson  <rth@redhat.com>
4744
4745         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4746
4747 2004-07-01  Richard Henderson  <rth@redhat.com>
4748
4749         * class.c (registerClass_libfunc): Remove.
4750         (init_class_processing): Don't set it.
4751         (emit_register_classes): Take list_p parameter.  Fill it in
4752         with _Jv_RegisterClass calls.
4753         * decl.c (java_init_decl_processing): Don't call
4754         init_resource_processing.
4755         * jcf-parse.c (java_emit_static_constructor): New.
4756         (java_parse_file): Call it.
4757         * resource.c (registerResource_libfunc): Remove.
4758         (init_resource_processing): Remove.
4759         (write_resource_constructor): Take list_p parameter.  Fill it in
4760         with _Jv_RegisterResource calls.
4761         * java-tree.h: Update prototypes.
4762
4763 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4764
4765         PR java/1262
4766         * class.c (layout_class_method): Do not override package-private
4767         method if its in a different package.
4768         (split_qualified_name): Move here from parse.y. Rename from
4769         breakdown_qualified. Add comment.
4770         (in_same_package): Move here from parse.y. Add comment.
4771         * java-tree.h (break_down_qualified, in_same_package): Declare.
4772         (in_same_package): Likewise.
4773         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4774         Callers updated.
4775
4776 2004-06-29  Andrew Haley  <aph@redhat.com>
4777
4778         * except.c (expand_start_java_handler): Push a new binding level.
4779         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4780         register_exception_range() to register where we'll do it.
4781         (expand_end_java_handler): Remove old bogus code.  Replace with
4782         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4783         the top of the expression we're curently building.
4784         (maybe_end_try): Delete.
4785         * decl.c (binding_level.exception_range): New field.
4786         (clear_binding_level): Add field exception_range.  Reformat.
4787         (poplevel): Call expand_end_java_handler().
4788         (poplevel): Call java_add_stmt only if functionbody is false.
4789         (maybe_poplevels): Don't call maybe_end_try() from here.
4790         (end_java_method): Clear no longer used trees in function decl.
4791         (register_exception_range): New function.
4792         * java-tree.h (register_exception_range, struct eh_range): Declare.
4793
4794 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4795
4796         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4797
4798 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4799
4800         Formatting fixes.
4801         * expr.c (class_has_finalize_method): Fix method name indentation.
4802         (expand_java_call): Remove K&R style parameter declaration.
4803         (expand_invoke): Fix statement indentation.
4804         (expand_java_field_op): Likewise.
4805         * parse-scan.y: Fix typo.
4806         (reset_report): Fix method name indentation.
4807         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4808         line. Fix typos.
4809         * verify.c (verify_jvm_instructions): Document parameters, insert
4810         page break.
4811         * lang.c (lang_init_source): Fix method name indentation.
4812         * class.c (common_enclosing_context_p): Likewise.
4813         (emit_symbol_table): Fix parameter list indentation.
4814         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4815         parameter declaration.
4816         * constants.c: Fix copyright notice indentation.
4817         * typeck.c (find_method_in_superclasses): Fix parameter list
4818         indentation.
4819         (find_method_in_interfaces): Likewise.
4820         * zextract.c (makelong): Fix method name indentation.
4821
4822 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4823
4824         PR java/15715.
4825         * parse.y (create_interface): Set correct access modifiers for
4826         interfaces.
4827         * jcf-write.c (get_classfile_modifiers): New function.
4828         (generate_classfile): Use get_classfile_modifiers, not
4829         get_access_flags.
4830
4831 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4832
4833         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4834         dependency to current parser context, not NULL_TREE, for top-level
4835         classes.
4836         (jdep_resolve_class): Enable member access check for all inner
4837         class dependencies.
4838
4839 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4840
4841         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4842         load_class.
4843
4844 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4845
4846         PR java/15734
4847         * expr.c (expand_java_field_op): Ensure that target class for static
4848         field access has been loaded.
4849
4850 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4851             Ranjit Mathew  <rmathew@hotmail.com>
4852
4853         PR java/1207, java/16178
4854         * jcf-parse.c (load_class): Return immediately if passed a type decl
4855         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4856         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4857         before calling load_class.
4858         (qualify_and_find): Likewise.
4859         (find_in_imports_on_demand): Likewise.
4860         (find_applicable_accessible_methods_list): Likewise.
4861
4862 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4863
4864         * parse.y (java_layout_seen_class_methods): Don't call load_class
4865         on class defined by source parser.
4866
4867 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4868
4869         * parse.y (set_nested_class_simple_name_value): Removed.
4870         (java_complete_expand_class): Remove calls to
4871         set_nested_class_simple_name_value.
4872
4873 2004-06-22  Andrew Haley  <aph@redhat.com>
4874             Ranjit Mathew  <rmathew@hotmail.com>
4875
4876         Fixes PR java/16113.
4877         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4878
4879 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4880
4881         * parse.y (create_class): Correct diagnostic message about
4882         java.lang.Object extending anything else.
4883
4884 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4885
4886         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4887         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4888         * constants.c (build_ref_from_constant_pool): Likewise.
4889         * expr.c (build_java_array_length_access): Likewise.
4890         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4891         (invoke_build_dtable, build_invokevirtual): Likewise.
4892         (build_invokeinterface, java_expand_expr): Likewise.
4893         (emit_init_test_initialization): Likewise.
4894         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4895         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4896
4897 2004-06-21  Andrew Haley  <aph@redhat.com>
4898
4899         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4900         block.
4901
4902 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4903
4904         * jcf.h (struct JCF): Change java_source, right_zip and finished
4905         to unsigned int.
4906         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4907         byte_swap and use_fallback to unsigned int.
4908         * parse.h (struct _jdep): Change flag0 to unsigned int.
4909
4910 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4911
4912         Fixes PR java/13948
4913         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4914         before trying to lay out its methods.
4915         * jcf-parse.c (read_class): Track parsed files using canonical paths
4916         obtained via lrealpath from libiberty.
4917         (java_parse_file): Likewise.
4918         (parse_source_file_1): Rename formal parameter to reflect its
4919         modified purpose. Minor formatting fix.
4920
4921 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4922
4923         * class.c (emit_register_classes): Make the function uninlinable,
4924         do not set current_function_cannot_inline.
4925         * resource.c (write_resource_constructor): Do not reset
4926         flag_inline_functions around rest_of_compilation.
4927
4928 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4929
4930         PR java/15769
4931         * expr.c (java_truthvalue_conversion): Handle
4932         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4933         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4934         i.e. return the expression.
4935
4936 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4937
4938         * gjavah.c: Include version.h
4939
4940 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4941
4942         * jcf-write.c (generate_bytecode_conditional): Correct handling
4943         of unordered conditionals. Add comment.
4944
4945 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4946             Per Bothner  <per@bothner.com>
4947
4948         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4949         local variable was initialised upon declaration.
4950         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4951         variable was final and initialised upon declaration.
4952         * check-init.c (check_final_reassigned): Give error only if a blank
4953         final is not definitely unassigned or if an initialised final is
4954         reassigned.
4955         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4956         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4957         (check_init): Perform initialised-variable-removing-optimisation
4958         only on non-final local variables.
4959
4960 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4961
4962         * jcf-write.c (generate_bytecode_conditional): Handle binops
4963         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4964         and LTGT_EXPR.
4965         (generate_bytecode_insns): Likewise.
4966
4967 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4968
4969         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4970         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4971
4972 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4973
4974         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4975         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4976
4977 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4978
4979         * decl.c (struct binding_level): Add GTY marker. Compile
4980         binding_depth unconditionally.
4981         (current_binding_level, free_binding_level, global_binding_level):
4982         Likewise.
4983         (clear_binding_level): Unconditionally set binding_depth.
4984         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4985
4986 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4987
4988         * lex.c (java_new_lexer): Set 'encoding'.
4989         (java_read_char): Improve error message for unrecognized characters.
4990         * lex.h (struct java_lexer): New field 'encoding'.
4991
4992 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4993
4994         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4995
4996 2004-05-21  Mark Wielaard  <mark@klomp.org>
4997
4998         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4999         extern.
5000
5001 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
5002
5003         * typeck.c: Remove non-printable character 160.
5004
5005 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
5006
5007         * check-init.c: Correct minor typos.
5008
5009 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5010
5011         * Make-lang.in, expr.c, java-gimplify.c: Rename
5012         tree-simple.[ch] to tree-gimple.[ch].
5013
5014 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
5015
5016         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5017
5018 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5019
5020         Merge from tree-ssa-20020619-branch.  See
5021         ChangeLog.tree-ssa for details.
5022
5023         * Make-lang.in, builtins.c, check-init.c, class.c,
5024         constants.c, decl.c, except.c, expr.c, java-except.h,
5025         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5026         lang.c, lang.opt, parse.y, resource.c: Merged.
5027         * java-gimplify.c: New file.
5028
5029 2004-05-10  Andrew Haley  <aph@redhat.com>
5030
5031         * parse.y (create_class): Set TYPE_VFIELD.
5032         * decl.c (java_init_decl_processing): Likewise.
5033
5034         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5035         * class.c (make_method_value): Replace DECL_VINDEX with call to
5036         get_method_index().
5037         (get_dispatch_vector): Likewise.
5038         (layout_class_method): Likewise.
5039         Replace set of DECL_VINDEX with call to set_method_index().
5040         (set_method_index): New function.
5041         (get_method_index): New function.
5042         * java-tree.h (set_method_index): New function decl.
5043         (get_method_index): New function decl.
5044
5045 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
5046
5047         * parse.y (check_pkg_class_access): Add new argument
5048         and use it when cl is NULL to call lookup_cl on it.
5049         (parser_check_super_interface): Do not call lookup_cl.
5050         Pass this_decl to check_pkg_class_access and NULL
5051         instead of lookup_cl.
5052         (parser_check_super): Update for change in
5053         check_pkg_class_access.
5054         (do_resolve_class): Likewise.
5055         (process_imports): Likewise.
5056         (find_in_imports_on_demand): Likewise.
5057         (resolve_qualified_expression_name): Likewise.
5058
5059 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
5060
5061         Fixes PR java/9685, PR java/15073
5062         * parse.y (accessibility_string): New method.
5063         (not_accessible_field_error): Use accessibility_string()
5064         instead of java_accstring_lookup().
5065         (resolve_qualified_expression_name): Check with
5066         check_pkg_class_access() before allowing access using
5067         qualified names.
5068         Fix comment typo.
5069         Use check_pkg_class_access() instead of not_accessible_p()
5070         for unqualified types.
5071         (not_accessible_p): Use DECL_CONTEXT (member) instead of
5072         REFERENCE for package-private access checking.
5073         (patch_method_invocation): Use accessibility_string() instead
5074         of java_accstring_lookup().
5075
5076 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
5077
5078         Fixes PR java/15133
5079         * gjavah.c (struct method_name): Add member is_native.
5080         (overloaded_jni_method_exists_p): Match candidate method only if
5081         it is native.
5082         (print_method_info): Initialise is_native flag from the method's
5083         access flags.
5084
5085 2004-04-30  Roger Sayle  <roger@eyesopen.com>
5086
5087         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5088         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5089
5090 2004-04-22  Roger Sayle  <roger@eyesopen.com>
5091
5092         * resource.c (write_resource_constructor): Guard call to possibly
5093         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5094
5095 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
5096
5097         * class.c (make_class_data): Add new field aux_info.
5098         * decl.c (java_init_decl_processing): Push type and decl for
5099         `aux_info'.
5100
5101 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5102
5103         * expr.c (expand_java_NEW): Don't use size argument for
5104         _Jv_AllocObject calls.
5105         * parse.y (patch_invoke): Likewise.
5106
5107 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5108
5109         * expr.c (build_invokeinterface): Remove unused variables to
5110         fix warnings.
5111
5112 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5113
5114         * class.c (get_interface_method_index): New function. Return dispatch
5115         index for interface method.
5116         (make_method_value): For interface methods, set index field to
5117         iface dispatch index, not DECL_VINDEX.
5118         * expr.c (build_invokeinterface): Use get_interface_method_index.
5119
5120 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5121
5122         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5123
5124 2004-03-31  Andrew Haley  <aph@redhat.com>
5125
5126         PR java/14104
5127         * jcf-io.c (opendir_in_zip): Tidy up error handling.
5128
5129 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5130
5131         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5132         form of GTY markers.
5133
5134 2004-03-25  Marcus Meissner  <meissner@suse.de>
5135
5136         PR java/14689:
5137         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5138
5139 2004-03-23  Tom Tromey  <tromey@redhat.com>
5140
5141         PR java/14315:
5142         * jcf-write.c (make_class_file_name): Don't report if mkdir
5143         failed with EEXIST.
5144
5145 2004-03-23  Tom Tromey  <tromey@redhat.com>
5146
5147         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5148
5149 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
5150
5151         * class.c, gjavah.c, lang.c: Fix comment typos.
5152         * gcj.texi: Fix typos.
5153
5154 2004-03-19  Per Bothner  <per@bothner.com>
5155
5156         * gcj.texi (Code Generation):  Document new flags and assert defaults.
5157
5158         * class.c (assume_compiled_node_struct):  Rename type to
5159         class_flag_node_struct, as it is now also used for enable_assertions.
5160         Rename assume_compiled_node typedef.  Rename excludep field to value.
5161         (find_assume_compiled_node):  Rename function to find_class_flag_node.
5162         Minor optimization - avoid needless strlen.
5163         (add_assume_compiled):  Some tweaking and optimization.
5164         Rename and generalize to add_class_flag takem an extra parameter.
5165         (add_assume_compled):  New just calls add_class_flag.
5166         (add_enable_assert, enable_assertions):  New functions.
5167         (enable_assert_tree):  New static.
5168         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5169         * lang.opt (fenable-assertions, fenable-assertions=,
5170         fdisable-assertions, fdisable-assertions=):  New options.
5171         * lang.c (java_handle_option):  Handle new options.
5172         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
5173         class in an interface - create helper class nested in outer interface.
5174         (build_assertion):  Short-circuit if enable_assertions is false.
5175
5176 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5177
5178         * java-tree.h: Changes throughout to add checking to macros
5179         and numerous whitespace changes.
5180         (VAR_OR_FIELD_CHECK): New macro.
5181         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5182         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5183
5184 2004-03-16  Per Bothner  <per@bothner.com>
5185
5186         * jcf-jump.c (options):  New --print-constants option.
5187         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
5188
5189         * jcf-dump.c (flag_print_constant_pool):  Default to off.
5190         (print_constant_terse_with_index):  New helper function.
5191         (various places):  Check flag_print_constant_pool where missing.
5192         (main):  If verbose set flag_print_constant_pool.
5193         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
5194
5195 2004-03-15  Andrew Haley  <aph@redhat.com>
5196
5197         PR java/14581
5198         * parse.y (java_complete_lhs): Check that final variable has an
5199         initializer.
5200
5201 2004-03-12  Andrew Haley  <aph@redhat.com>
5202
5203         PR java/14551
5204         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5205         conversion.
5206
5207 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5208
5209         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5210         is NULL.
5211
5212 2004-02-27  Per Bothner  <per@bothner.com>
5213
5214         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5215         suggestion:  Use build_incomplete_class_ref.
5216         This fixes PR java/13508, java/11714.
5217
5218 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5219
5220         * java/parse.h: Update copyright.
5221
5222 2004-02-26  Andrew Haley  <aph@redhat.com>
5223
5224         PR java/14231:
5225         * parse.y (check_interface_throws_clauses): Check for
5226         !METHOD_INVISIBLE (iface_method).
5227         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5228         well as CLASS_ABSTRACT.
5229
5230 2004-02-25  Per Bothner  <per@bothner.com>
5231
5232         * parse.y (build_assertion):  If we're in an inner class, create the
5233         class$ helper routine in the outer class.
5234
5235 2004-02-19  Richard Henderson  <rth@redhat.com>
5236
5237         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5238
5239 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5240
5241         * Make-lang.in (java.install-man): Add extra dependencies.
5242
5243 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5244
5245         * Make-lang.in: Install man pages under the same names
5246         (possibly transformed) as the program they document.
5247
5248 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5249
5250         * gjavah.c: Include "intl.h".
5251         (error): New function.
5252         (main): Call gcc_init_libintl.
5253         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5254         print_stub_or_jni, process_file, main): Use error rather than
5255         fprintf.
5256         (print_method_info, usage, help, version, main): Mark strings for
5257         translation with _.  Avoid splitting up sentences.  Send
5258         information messages to stdout.
5259         * jcf-dump.c: Include "intl.h".
5260         (main): Call gcc_init_libintl.
5261         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5262         Mark error, usage and version messages for translation with _.
5263         Avoid splitting up sentences.
5264         * jv-scan.c: Include "intl.h".
5265         (fatal_error, warning): Change parameter s to msgid.  Translate
5266         messages.
5267         (main): Call gcc_init_libintl.
5268         (usage, help, version): Mark error, usage and version messages for
5269         translation with _.  Avoid splitting up sentences.
5270         * jvgenmain.c: Include "intl.h".
5271         (main): Call gcc_init_libintl.
5272         (usage, main): Mark error messages for translation with _.
5273         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5274         JVGENMAIN_OBJS): Add intl.o.
5275         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5276         java/jvgenmain.o): Update dependencies.
5277
5278 2004-02-08  Per Bothner  <per@bothner.com>
5279
5280         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5281         class don't use not_accessible_field_error, which can get confused.
5282
5283 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5284
5285         Make-lang.in (po-generated):  Delete.
5286
5287 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5288
5289         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5290         Depend on target.h.
5291         * decl.c: Include target.h.
5292         (start_java_method): Replace PROMOTE_PROTOTYPES with
5293         targetm.calls.promote_prototypes.
5294         * expr.c: Include target.h.
5295         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5296         targetm.calls.promote_prototypes.
5297         * parse.y: Include target.h.
5298         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5299         with targetm.calls.promote_prototypes.
5300
5301 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5302
5303         * typeck.c: Update copyright.
5304
5305 2004-02-02  Tom Tromey  <tromey@redhat.com>
5306
5307         * decl.c (java_init_decl_processing): Remove duplicate
5308         gnu/gcj/RawData.
5309
5310 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5311
5312         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5313
5314 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5315
5316         * expr.c (build_field_ref): Move variable
5317         definition up.
5318
5319 2004-01-28  Andrew Haley  <aph@redhat.com>
5320
5321         * expr.c (build_field_ref): Widen field offset.
5322
5323 2004-01-27  Andrew Haley  <aph@redhat.com>
5324
5325         java/13273
5326         * parse.y (check_interface_throws_clauses): Make sure class_decl
5327         has been loaded.
5328
5329 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5330
5331         PR java/13733
5332         * parse.y (patch_assignment): Don't modify lhs_type for
5333         reference assignments.
5334
5335 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5336
5337         * Make-lang.in: Replace $(docdir) with doc.
5338         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5339         (java.install-man): Revamp rule.
5340
5341 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5342
5343         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5344         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5345         instead of deferred backquote.
5346
5347 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5348
5349         * typeck.c (find_method_in_interfaces): Move variable
5350         definition up.
5351
5352 2004-01-16  Andrew Haley  <aph@redhat.com>
5353
5354         PR java/13273:
5355         * typeck.c (shallow_find_method): New.
5356         (find_method_in_superclasses): New.
5357         (find_method_in_interfaces): New.
5358         (lookup_do): Rewrite.
5359         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5360
5361         * jcf-parse.c (read_class): Save and restore output_class.
5362         * decl.c (java_expand_body): Set output_class from fndecl.
5363
5364 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5365
5366         * class.c (gen_indirect_dispatch_tables): Fix string length
5367         calculations.
5368
5369 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5370
5371         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5372         (java.srcextra): Copy above back to source directory if requested.
5373         (po-generated): Delete reference to $(parsedir).
5374         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5375         Use implicit rule.
5376
5377 2004-01-14  Jan Hubicka  <jh@suse.cz>
5378
5379         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5380         estimation.
5381
5382 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5383
5384         * java-tree.h (java_expand_expr): Change prototype.
5385         * expr.c (java_expand_expr): Add alt_rtl parameter.
5386
5387 2004-01-09  Andrew Haley  <aph@redhat.com>
5388
5389         PR java/12755:
5390         * parse.y (java_fix_constructors):  Set output_class.
5391         (java_reorder_fields): Likewise.
5392         (java_layout_classes): Likewise.
5393         (java_expand_classes): Generate indirect dispatch tables.
5394         (java_expand_classes): Set output_class.
5395         (java_finish_classes): Likewise.
5396         * lang.c (java_init): Turn on always_initialize_class_p if we're
5397         using indirect dis[atch.
5398         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5399         (java_get_callee_fndecl): Use class local atable.
5400         * jcf-parse.c
5401         (always_initialize_class_p): Decl moved to java-tree.h.
5402         (HANDLE_CLASS_INFO): Set output_class.
5403         (read_class): Likewise.
5404         (parse_class_file): Call gen_indirect_dispatch_tables.
5405         (parse_zip_file_entries): Set output_class.
5406         (java_parse_file): Set output_class.  Don't emit symbol tables.
5407         * java-tree.h (output_class): New.
5408         Remove global declarations for otable, atable, and ctable.
5409         (always_initialize_class_p): moved here from decl.c.
5410         (DECL_OWNER): New.
5411         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5412         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5413         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5414         (struct lang_type): Add otable_methods, otable_decl,
5415         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5416         ctable_decl, catch_classes, type_to_runtime_map.
5417         * expr.c (build_field_ref): Make otable, atable, and ctable class
5418         local rather than global.
5419         (build_known_method_ref): Likewise.
5420         (build_invokeinterface): Likewise.
5421         (java_expand_expr): Pass runtime type (rather than actual type) to
5422         expand_start_catch.
5423         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5424         this class.  Look up each class in that map to delete duplicates.
5425         (expand_end_java_handler): Pass runtime type (rather than actual
5426         type) to expand_start_catch.
5427         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5428         (do_nothing): New.
5429         (java_init_decl_processing): Rearrange things.  Remove global
5430         declarations of otable, atable, and ctable.
5431         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5432         (java_expand_body): Set output_class.
5433         * constants.c (build_constant_data_ref): Use output_class, not
5434         current_class.
5435         (alloc_name_constant): Likewise.
5436         * class.c (gen_indirect_dispatch_tables): New.
5437         (build_class_ref): Generate hard reference to superclass, even if
5438         using indirect dispatch.
5439         (build_static_field_ref): Use class local atable.
5440         (make_class_data): Generate hard reference to superclass, even if
5441         using indirect dispatch.
5442         Generate symbolic references to interfaces when using indirect
5443         dispatch.
5444         (make_class_data): Emit otable, atable, and ctable.
5445         Make otable, atable, and ctable class local rather than global.
5446         (emit_catch_table): Make otable, atable, and ctable class local
5447         rather than global.
5448
5449 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5450
5451         * parse.y (catch_clause_parameter): Fix typo.
5452
5453         PR java/13404
5454         * parse.y: (catch_clause_parameter): Return early if $3, aka
5455         formal_parameter, is null.
5456
5457 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5458
5459         * class.c: Remove uses of "register" specifier in
5460         declarations of arguments and local variables.
5461         * decl.c: Likewise.
5462         * expr.c: Likewise.
5463         * gjavah.c: Likewise.
5464         * jcf-dump.c: Likewise.
5465         * jcf-io.c: Likewise.
5466         * jcf-parse.c: Likewise.
5467         * jcf-write.c: Likewise.
5468         * keyword.h: Likewise.
5469         * parse.y: Likewise.
5470         * typeck.c: Likewise.
5471         * verify.c: Likewise.
5472
5473 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5474
5475         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5476         (java.install_common, java.install-man): Adjust for above.
5477         (java.uninstall): Likewise.
5478
5479 2003-12-03  Michael Koch  <konqueror@gmx.de>
5480
5481         * class.c (make_class_data):
5482         Push field value to 'hack_signers' instead of 'signers'.
5483         * decl.c (java_init_decl_processing):
5484         Push field 'hack_signers' instead of 'signers'.
5485
5486 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5487
5488         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5489         including iconv.h.
5490
5491 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5492
5493         PR java/12374:
5494         * parse.y (qualify_ambiguous_name): Remove lots of broken
5495         field access processing - there's no need to do that here,
5496         because we have resolve_field_access.  Remove
5497         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5498         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5499         used.
5500
5501 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5502
5503         Fix PR java/13237
5504         * parse.y (java_complete_lhs): Save location prior to patching
5505         CALL_EXPR.
5506
5507 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5508
5509         PR java/12548
5510         * resource.c (write_resource_constructor): Append
5511         "_resource" to constructor identifier name.
5512
5513 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5514
5515         Fix PR java/13183.
5516         * constants.c (cpool_for_class): New function.
5517         (outgoing_cpool): Remove global variable.
5518         (alloc_name_constant): Use cpool_for_class.
5519         (build_constants_constructor): Likewise.
5520         * decl.c (java_expand_body): Set current_class.
5521         * java-tree.h (outgoing_cpool) Remove declaration.
5522         (init_outgoing_cpool): Likewise.
5523         * jcf-parse.c (init_outgoing_cpool): Remove function.
5524         (parse_class_file): Don't call init_outgoing_cpool.
5525         * parse.y (java_complete_expand_methods): Don't call
5526         init_outgoing_cpool.  Don't save outgoing_cpool.
5527         (java_expand_classes): Don't restore outgoing_cpool.
5528         (java_finish_classes): Likewise.
5529
5530 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5531
5532         * Make-lang.in: (java.install-common) Add
5533         symlink for $(target_noncanonical)-gcjh for
5534         native builds.
5535
5536 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5537
5538         * Make-lang.in (java.extraclean): Delete.
5539
5540 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5541
5542         * Make-lang.in (check-java): Add.
5543
5544 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5545
5546         Fix PR java/13024.
5547         * except.c (prepare_eh_table_type): Allocate variable-sized
5548         buffer `buf' with alloca.
5549
5550 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5551
5552         Fix PR java/12857.
5553
5554         decl.c (java_init_decl_processing): Don't initialize
5555         class_not_found_type_node, no_class_def_found_type_node.
5556
5557         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5558         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5559         (class_not_found_type_node, no_class_def_found_type_node):
5560         Don't define.
5561
5562         parse.y (build_dot_class_method_invocation): Add this_class
5563         argument.  Qualify method invocations to a different class.
5564         (create_new_parser_context): Initialize saved_data_ctx to 0.
5565         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5566         (build_dot_class_method): Don't load classes.  Register
5567         incomplete types.
5568         (build_incomplete_class_ref): Special cases for interfaces
5569         and inner classes.  Move build_dot_class_method call to here...
5570         (patch_incomplete_class_ref): ...from here.  Pass current_class
5571         to build_dot_class_method_invocation.
5572         (build_assertion): Pass class_type to
5573         build_dot_class_method_invocation.
5574         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5575
5576 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5577
5578         Fix PR java/12739.
5579         * java-tree.h (BLOCK_EMPTY_P): Define.
5580         * parse.y (java_complete_lhs): Check for empty blocks
5581         in TRY_FINALLY_EXPR case.
5582
5583 2003-11-17  Andrew Haley  <aph@redhat.com>
5584
5585         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5586         (struct lang_decl_var:freed): New variable.
5587         * decl.c (poplevel): Mark local vars that have gone out of scope.
5588         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5589         scope.
5590
5591 2003-11-16  Jason Merrill  <jason@redhat.com>
5592
5593         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5594         and TAGS files that include them for each front end.
5595
5596 2003-11-15  Tom Tromey  <tromey@redhat.com>
5597
5598         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5599
5600 2003-11-12  Jason Merrill  <jason@redhat.com>
5601
5602         PR optimization/12547
5603         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5604         BLOCK_EXPR_BODY directly.
5605
5606 2003-11-12  Andrew Haley  <aph@redhat.com>
5607
5608         PR java/11045
5609         * parse.y (fold_constant_for_init): Check that we really do have a
5610         constant.
5611
5612         PR java/11533
5613         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5614         init_test_decls being inlined.
5615
5616         PR java/12890:
5617         * parse.y (do_resolve_class): Check return value from
5618         breakdown_qualified().
5619
5620 2003-11-11  Tom Tromey  <tromey@redhat.com>
5621
5622         PR java/12915:
5623         * parse.y (merge_string_cste): Handle case where we have a
5624         pointer that happens to be zero, not null_pointer_node.
5625
5626 2003-11-10  Tom Tromey  <tromey@redhat.com>
5627
5628         * jcf-parse.c (classify_zip_file): Correctly compare
5629         filename_length against length of manifest file's name.
5630
5631 2003-11-08  Tom Tromey  <tromey@redhat.com>
5632
5633         PR java/12894:
5634         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5635
5636 2003-11-06  Andrew Haley  <aph@redhat.com>
5637
5638         * expr.c (java_stack_swap): Make sure destination stack slots are
5639         of the correct type.
5640
5641 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5642
5643         * Make-lang.in (dvi): Move targets to $(docobjdir).
5644         (gcj.dvi): Simplify rule and adjust target.
5645         (gcj.info): Simplify rule.
5646         (gcj.pod): New intermediate rule.
5647         (gcjh.pod): Likewise.
5648         (jv-scan.pod): Likewise.
5649         (jcf-dump.pod): Likewise.
5650         (gij.pod): Likewise.
5651         (jv-convert.pod): Likewise.
5652         (rmic.pod): Likewise.
5653         (rmiregistry.pod): Likewise.
5654         (gcj.1): Delete.
5655         (gcjh.1): Delete.
5656         (jv-scan.1): Delete.
5657         (jcf-dump.1): Delete.
5658         (gij.1): Delete.
5659         (jv-convert.1): Delete.
5660         (rmic.1): Delete.
5661         (rmiregistry.1): Delete.
5662
5663 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5664
5665         Fixes PR java/12866.
5666         * parse.y (resolve_qualified_expression_name): Move test
5667         for outer field access methods from here...
5668         (check_thrown_exceptions) ...to here.
5669
5670 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5671
5672         * .cvsignore: Delete.
5673
5674 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5675
5676         * verify.c (verify_jvm_instructions): Don't warn about legal
5677         eh binding regions generated for example by jdk 1.4.1.
5678
5679 2003-10-24  David S. Miller  <davem@redhat.com>
5680
5681         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5682
5683 2003-10-22  Andrew Haley  <aph@redhat.com>
5684
5685         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5686         (java_get_callee_fndecl): New.
5687
5688         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5689
5690         * java-tree.h (ctable_decl): New.
5691         (catch_classes):  New.
5692         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5693
5694         * decl.c (java_init_decl_processing): Add catch_class_type.
5695         Add ctable_decl.
5696         Add catch_classes field.
5697
5698         * class.c (build_indirect_class_ref): Break out from
5699         build_class_ref.
5700         (make_field_value): Check flag_indirect_dispatch.
5701         (make_class_data): Ditto.
5702         Tidy uses of PUSH_FIELD_VALUE.
5703         Add field catch_classes.
5704         (make_catch_class_record): New.
5705
5706         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5707
5708 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5709
5710         * jcf-write.c: Follow spelling conventions.
5711         * parse.y: Likewise.
5712
5713 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5714
5715         * ChangeLog: Fix typos.
5716         * expr.c: Fix comment typos.
5717         * jcf-write.c: Likewise.
5718         * lang.c: Likewise.
5719         * lex.c: Likewise.
5720         * mangle.c: Likewise.
5721         * parse-scan.y: Likewise.
5722         * parse.y: Likewise.
5723
5724 2003-10-22  Tom Tromey  <tromey@redhat.com>
5725
5726         * expr.c (expand_byte_code): Only warn about dead bytecode when
5727         extra_warnings is set.
5728
5729 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5730
5731         Fix for PR java/12586.
5732         * mangle.c (find_compression_record_match): Don't iterate through
5733         package namespace elements unless they all match compression_table
5734         entries.
5735
5736 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5737
5738         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5739         (generate-manpages): Likewise.
5740         (java.maintainer-clean): Likewise.
5741         (gcj.info): Likewise.
5742         (gcj.1): Likewise.
5743         (gcjh.1): Likewise.
5744         (jv-scan.1): Likewise.
5745         (jcf-dump.1): Likewise.
5746         (gij.1): Likewise.
5747         (jv-convert.1): Likewise.
5748         (rmic.1): Likewise.
5749         (rmiregistry.1): Likewise.
5750         (java.install-man): Likewise.
5751         (parse-scan.o): Move and define complete compile line.
5752         (parse.o): Likewise.
5753         (jcf-tree-inline.o): Move.
5754
5755 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5756
5757         * Make-lang.in (info): Update dependencies.
5758         (java.install-info): Remove.
5759         ($(srcdir)/java/gcj.info): Replace with ...
5760         ($(docobjdir)/gcj.info): ... this.
5761
5762 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5763
5764         * Make-lang.in: Replace uses of $(target_alias) with
5765         $(target_noncanonical).
5766
5767 2003-10-09  Tom Tromey  <tromey@redhat.com>
5768
5769         * decl.c (java_init_decl_processing): Declare signers field.
5770         * class.c (make_class_data): Set signers field.
5771
5772 2003-10-09  Jason Merrill  <jason@redhat.com>
5773
5774         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5775         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5776         POINTER_TYPE.
5777
5778 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5779
5780         * Make-lang.in (java.info): Replace with ...
5781         (info): ... this.
5782         (java.dvi): Replace with ...
5783         (dvi): ... this.
5784         (java.generated-manpages): Replace with ...
5785
5786 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5787
5788         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5789
5790 2003-10-01  Andrew Haley  <aph@redhat.com>
5791
5792         * jcf-parse.c (java_parse_file): Write otable and atable.
5793         * java-tree.h (atable_methods): New.
5794         (atable_decl): New.
5795         (atable_syms_decl): New.
5796         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5797         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5798         (symbol_*type): Rename method_symbol* to symbol*type.
5799         (emit_offset_symbol_table): Delete.
5800         (emit_symbol_table): New.
5801         (get_symbol_table_index): New.
5802         (atable_type): New.
5803         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5804         (build_known_method_ref): Likewise.
5805         (get_symbol_table_index): Rename from get_offset_table_index.
5806         Parameterize to allow re-use by differing types of symbol table.
5807         (build_invokevirtual): Pass table to get_offset_table_index.
5808         * decl.c (java_init_decl_processing): Push types and decls for
5809         atable and atable_syyms.
5810         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5811         (make_class_data): Add new fields atable and atable_syms.
5812         (emit_symbol_table): Rename from emit_offset_symbol_table.
5813         Parameterize to allow re-use by different types of symbol table.
5814         (build_symbol_entry): Renamed from build_method_symbols_entry.
5815
5816 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5817
5818         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5819         semantics for SAVE_EXPR, by caching the result in a temporary.
5820
5821 2003-09-28  Richard Henderson  <rth@redhat.com>
5822
5823         * check-init.c (check_init): Save and restore input_location
5824         instead of file and line separately.
5825         * decl.c (java_expand_body): Likewise.
5826         * jcf-write.c (generate_bytecode_insns): Likewise.
5827         * parse.y (safe_layout_class): Likewise.
5828         * jcf-parse.c (read_class, parse_class_file): Likewise.
5829         (java_parse_file): Use %H for warning locator.
5830
5831 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5832
5833         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5834         with void-type branches instead of using a COMPOUND_EXPR.
5835
5836 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5837
5838         * decl.c (java_optimize_inline, dump_function): Remove.
5839         * java-tree.h (java_optimize_inline): Remove declaration.
5840         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5841         * parse.y (source_end_java_method, java_expand_classes):
5842         Likewise.  Remove dead code.
5843
5844 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5845
5846         * lang.c (java_init_options): Set flag_evaluation_order.
5847         * expr.c (force_evaluation_order): Don't attempt to force
5848         evaluation order of binary operations using save_expr.
5849         * parse.y (java_complete_lhs): No longer need to call
5850         force_evaluation_order when constructing binary operators.
5851
5852 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5853             Bryce McKinlay  <bryce@mckinlay.net.nz>
5854
5855         PR java/1333:
5856         * parse.y (not_accessible_field_error): New function.
5857         (resolve_expression_name): Check field access permissions.
5858         (resolve_qualified_expression_name): Use
5859         not_accessible_field_error.
5860         (resolve_qualified_expression_name): Likewise.
5861
5862 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5863
5864         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5865
5866 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5867
5868         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5869         with equal operands without side-effects.
5870
5871 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5872
5873         * decl.c (java_init_decl_processing): Don't emit otable decls
5874         if flag_indirect_dispatch is not set.
5875
5876 2003-09-21  Richard Henderson  <rth@redhat.com>
5877
5878         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5879         resource.c: Revert.
5880
5881 2003-09-21  Richard Henderson  <rth@redhat.com>
5882
5883         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5884         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5885
5886 2003-09-20  Richard Henderson  <rth@redhat.com>
5887
5888         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5889
5890 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5891
5892         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5893         * check-init.c (check_init): Likewise.
5894
5895 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5896
5897         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5898
5899 2003-09-16  Andrew Haley  <aph@redhat.com>
5900
5901         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5902
5903 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5904
5905         Fixes PR java/9577
5906         * mangle.c (find_compression_record_match): Skip
5907         over a "6JArray" (the array template mangled string)
5908         IDENTIFIER_NODE.
5909         (mangle_array_type): Correct minor typo.
5910         (atms): Move definition to the beginning.
5911
5912 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5913
5914         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5915         out. Fix for PR java/12254.
5916
5917 2003-09-11  Richard Henderson  <rth@redhat.com>
5918
5919         * parse.y (source_end_java_method): Update for new
5920         cgraph_finalize_function argument.
5921
5922 2003-09-09  Richard Henderson  <rth@redhat.com>
5923
5924         * parse.y (source_end_java_method): Update call to
5925         cgraph_finalize_function.
5926
5927 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5928
5929         * decl.c (java_expand_body): New function.
5930         * expr.c (build_class_init): Set DECL_IGNORED_P.
5931         * java-tree.h (start_complete_expand_method,
5932         java_expand_body): Declare.
5933         * jcf-parse.c (cgraph.h): Include.
5934         (java_parse_file): Handle flag_unit_at_a_time.
5935         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5936         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5937         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5938         (java_start_inlining): New function.
5939         * parse.h (java_finish_classes): Declare.
5940         * parse.y: Include cgraph.h.
5941         (block): Don't special-case empty block production.
5942         (craft_constructor): Set DECL_INLINE.
5943         (source_end_java_method): Handle flag_unit_at_a_time.
5944         Replace inline code with call to java_expand_body.
5945         (start_complete_expand_method): Remove static modifier.
5946         (java_expand_method_bodies): Patch function tree for
5947         class initialization and/or synchronization as needed.
5948         Don't begin RTL expansion yet.
5949         (java_expand_classes): Check flag_unit_at_a_time before
5950         calling finish_class.
5951         (java_finish_classes): New function.
5952         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5953         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5954         (emit_test_initialization): Set DECL_IGNORED_P.
5955
5956 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5957
5958         * builtins.c (enum builtin_type): Delete unused enumeration.
5959         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5960
5961 2003-08-28  Tom Tromey  <tromey@redhat.com>
5962
5963         * gcj.texi (Extensions): Document gcjlib URLs.
5964
5965 2003-08-20  Tom Tromey  <tromey@redhat.com>
5966
5967         * gcj.texi (Extensions): Added xref.
5968         (libgcj Runtime Properties): Document
5969         gnu.gcj.runtime.VMClassLoader.library_control.
5970
5971 2003-08-20  Andrew Haley  <aph@redhat.com>
5972
5973         * except.c (prepare_eh_table_type): Use new encoding for exception
5974         handlers when using -fno-assume-compiled.
5975
5976 2003-08-13  Tom Tromey  <tromey@redhat.com>
5977
5978         * gcj.texi (Invoking gij): Document -X and -?.
5979
5980 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5981
5982         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5983         GCJH_OBJS, JCFDUMP_OBJS
5984         * win32-host.c: Removed the unnecessary and broken dependency
5985         on jcf.h
5986
5987 2003-08-11  Tom Tromey  <tromey@redhat.com>
5988
5989         * parse.y (java_check_regular_methods): Typo fixes.  Call
5990         check_interface_throws_clauses.  Use
5991         check_concrete_throws_clauses.
5992         (check_interface_throws_clauses): New function.
5993         (check_concrete_throws_clauses): New function.
5994         (hack_is_accessible_p): New function.
5995         (find_most_specific_methods_list): Added FIXME.
5996         * typeck.c (lookup_do): Use `flags' argument to decide what to
5997         do.  Reimplemented.
5998         (lookup_argument_method_generic): New function.
5999         (lookup_argument_method2): Removed.
6000         * jcf.h (ACC_INVISIBLE): New define.
6001         * jcf-write.c (generate_classfile): Skip invisible methods.
6002         * class.c (add_miranda_methods): New function.
6003         (layout_class_methods): Use it.
6004         (get_access_flags_from_decl): Use ACC_INVISIBLE.
6005         * java-tree.h (METHOD_INVISIBLE): New define.
6006         (lang_decl_func) [invisible]: New field.
6007         (lookup_argument_method_generic): Declare.
6008         (SEARCH_INTERFACE): New define.
6009         (SEARCH_SUPER): Likewise.
6010         (SEARCH_ONLY_INTERFACE): Likewise.
6011         (SEARCH_VISIBLE): Likewise.
6012         (lookup_argument_method2): Removed declaration.
6013
6014 2003-08-05  Tom Tromey  <tromey@redhat.com>
6015
6016         Fix for PR java/11600:
6017         * parse.y (java_complete_lhs): See whether we're calling a method
6018         on an array.
6019         (check_thrown_exceptions): Added `is_array_call' argument;
6020         fixed `clone' checking; updated all callers.
6021
6022 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
6023
6024         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6025
6026 2003-08-03  Tom Tromey  <tromey@redhat.com>
6027
6028         * java-tree.h (METHOD_TRANSIENT): Removed.
6029         * decl.c (pushdecl): Removed some dead code.
6030         * class.c (get_access_flags_from_decl): Can't have transient
6031         method.
6032         (add_method_1): Can't have a transient method.
6033
6034 2003-07-28  Andreas Jaeger  <aj@suse.de>
6035
6036         * jvspec.c: Convert to ISO C90 prototypes.
6037
6038 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6039
6040         * decl.c (force_poplevels): Fix warning call.
6041
6042 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6043
6044         * expr.c (expand_java_field_op): Don't use xxx_with_decl
6045         (expand_java_field_op): Likewise.
6046         * class.c (layout_class_method): Likewise
6047         (emit_register_classes): Likewise.
6048         * decl.c (pushdecl): Likewise.
6049         (poplevel): Likewise.
6050         (force_poplevels): Likewise.
6051         (give_name_to_locals): Likewise.
6052         * check-init.c (check_for_initialization): Likewise.
6053
6054 2003-07-24  Jason Merrill  <jason@redhat.com>
6055
6056         * java-tree.h: Move boolean_type_node et al to the back end.
6057
6058 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6059
6060         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6061         casts.
6062
6063 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
6064
6065         * lang.opt: Don't show -MD_ and -MDD_.
6066
6067 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
6068
6069         * lang-options.h: Remove.
6070         * lang.opt: Add help text.
6071
6072 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
6073
6074         * expr.c: Remove the last argument to expand_assignment().
6075
6076 2003-07-09  Jan Hubicka  <jh@suse.cz>
6077
6078         * java-tree.h (DECL_NUM_STMTS): Rename to...
6079         (DECL_ESTIMATED_INSNS): ... this.
6080         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6081         New static functions.
6082         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6083         * parser.y (add_stmt_to_compound): Do not account statements.
6084
6085 2003-07-08  Mark Wielaard  <mark@klomp.org>
6086
6087         * gcj.texi: CNI now expands to Compiled Native Interface.
6088
6089 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6090
6091         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6092
6093 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6094
6095         * expr.c (expand_byte_code): Adjist emit_line_note call.
6096
6097 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
6098
6099         * lang.c (java_handle_option): Don't handle filenames.
6100
6101 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
6102
6103         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6104         DIR_SEPARATOR.
6105         Use FILENAME_CMP.
6106         * jcf-write.c: Don't default-define DIR_SEPARATOR.
6107         * jcf.h: Delete COMPARE_FILENAMES definition.
6108
6109 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
6110
6111         * lang.c (java_init_options): Update prototype.
6112
6113 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
6114
6115         * decl.c (poplevel): Adjust define_label call.
6116
6117 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
6118
6119         * gjavah.c (flag_jni): Make non-static.
6120         * parse-scan.y (ctxp): Make non-static.
6121
6122         * class.c (build_method_symbols_entry)
6123         * expr.c (get_offset_table_index)
6124         * jcf-parse.c (jcf_parse):
6125         Mark the definition static, matching the forward declaration.
6126
6127 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
6128
6129         * lang.c (java_handle_option): Don't check for missing arguments.
6130
6131 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6132
6133         * class.c (push_class): Use a location_t to save place.
6134         (emit_register_classes): Set input_location. Adjust
6135         expand_function_end call.
6136         * resource.c (write_resource_constructor): Likewise.
6137         * decl.c (end_java_method): Adjust expand_function_end call.
6138         * parse.y (source_end_java_method): Likewise.
6139
6140 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
6141
6142         * lang.c (java_handle_option): Likewise.
6143
6144 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6145
6146         * lang.c (java_handle_option): Special-casing of optional
6147         joined arguments no longer needed.
6148         * lang.opt: Update switches that take optional argument.
6149
6150 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6151
6152         * lang.opt: Declare Java.
6153         * lang.c (java_init_options): Update.
6154
6155 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6156
6157         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6158
6159 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6160
6161         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6162         * lang.c (java_handle_option): -MD and -MMD have an underscore.
6163         * lang.opt: -MD and -MMD have an underscore.
6164
6165 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6166
6167         * class.c (emit_register_classes): Adjust init_function_start
6168         call.
6169         * decl.c (complete_start_java_method): Likewise.
6170         * resource.c (write_resource_constructor): Likewise.
6171
6172 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6173
6174         * Make-lang.in: Update to use options.c and options.h.
6175         * lang.c: Include options.h not j-options.h.
6176         (java_handle_option): Abort on unrecognized option.
6177         (java_init_options): Request Java switches.
6178
6179 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
6180
6181         * Make-lang.in: Handle mostlyclean.
6182
6183 2003-06-11  Tom Tromey  <tromey@redhat.com>
6184
6185         * lang.c (java_handle_option): Update dependency_tracking for
6186         OPT_MF case.
6187
6188         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6189         empty argument.
6190
6191 2003-06-10  Andrew Haley  <aph@redhat.com>
6192
6193         * resource.c (write_resource_constructor): Use expand_expr to
6194         generate the address of the label attached to a resource.
6195         * Make-lang.in (java/resource.o): Add expr.h
6196
6197 2003-06-10  Andrew Haley  <aph@redhat.com>
6198
6199         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6200         (java_decl_ok_for_sibcall): New.
6201
6202 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6203
6204         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6205         (java/j-options.c, java/j-options.h): New.
6206         * java-tree.h (resource_name, compile_resource_file,
6207         compile_resource_data): Constify.
6208         * jcf-write.c (jcf_write_base_directory): Similarly.
6209         * jcf.h (jcf_write_base_directory): Similarly.
6210         * lang.c: Include j-options.h.
6211         (cl_options_count, cl_options, string_option, java_decode_option,
6212         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6213         process_option_with_no): Remove.
6214         (resource_name): Constify.
6215         (LANG_HOOKS_HANDLE_OPTION): Override.
6216         (java_handle_option): New.
6217         (java_init): Don't call jcf_path_init.
6218         (java_init_options): Call jcf_path_init.
6219         * lang.opt: New.
6220         * resource.c (compile_resource_data, compile_resource_file): Constify.
6221
6222 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6223
6224         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6225         (struct lang_decl_func): Add last_line field.
6226         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6227         DECL_SOURCE_LINE_LAST): Remove.
6228         * parse.y (missing_return_error, finish_method_declaration,
6229         lookup_cl, start_artificial_method_body, source_end_java_method,
6230         start_complete_expand_method): Adjust.
6231
6232 2003-06-08  Tom Tromey  <tromey@redhat.com>
6233
6234         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6235         fno-assume-compiled.
6236
6237 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6238
6239         * builtins.c (define_builtin_type, builtin_types): Delete.
6240         (define_builtin): Rewritten to take just the built-in code,
6241         the function's name, type and fallback library function name.
6242         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6243         (initialize_builtins): Overhaul to define the GCC builtins
6244         used by gcj manually, providing the Java run-time's
6245         implementations as the fallback library function.
6246
6247 2003-06-08  Anthony Green  <green@redhat.com>
6248
6249         * parse.y (patch_cast): Fix conversions from floating-point to
6250         integral types.
6251
6252 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6253
6254         * Make-lang.in: Update.
6255         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6256
6257 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6258
6259         * lang.c (java_init_options): Update.
6260
6261 2003-06-05  Jan Hubicka  <jh@suse.cz>
6262
6263         * Make-lang.in:  Add support for stageprofile and stagefeedback
6264
6265 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6266
6267         * lang.c (java_init_options): Prescribe wrap-around two's
6268         complement arithmetic overflow by setting flag_wrapv.
6269
6270 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6271
6272         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6273         (builtin_record): Add an additional builtin_code field to
6274         record which GCC built-in corresponds to the Java function.
6275         (java_builtins):  Add new entries for atan, atan2, exp, log,
6276         pow and tan.
6277         (max_builtin, min_builtin, abs_builtin): Perform constant
6278         folding on the resulting tree.
6279         (java_build_function_call_expr): Likewise, perform constant
6280         folding on the resulting tree.
6281         (initialize_builtins): The NULL creators are now allowed in
6282         the java_builtins table, which is now terminated by an entry
6283         with builtin_code == END_BUILTINS.
6284         (check_for_builtin): Likewise.  If the matching creator is
6285         NULL, construct the call using java_build_function_call_expr
6286         directly with the decl for the corresponding builtin_code.
6287
6288 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6289
6290         * win32-host.c: Normalize copyright boilerplate.
6291
6292 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6293
6294         * parse.y (print_int_node): Use string concatentation on
6295         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6296         function calls into one.
6297
6298 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6299
6300         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6301         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6302         all the affected error messages.
6303
6304 2003-05-13  Richard Henderson  <rth@redhat.com>
6305
6306         * class.c (layout_class_method): Set DECL_EXTERNAL.
6307         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6308         * java-tree.h (java_mark_class_local): Declare.
6309         * jcf-parse.c (parse_class_file): Use it.
6310         * parse.y (java_expand_classes): Likewise.
6311
6312 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6313
6314         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6315         * lex.h: #include input.h.
6316         * jv-scan.c (input_filename): Remove.
6317
6318 2003-05-02  Tom Tromey  <tromey@redhat.com>
6319
6320         PR java/10491:
6321         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6322         (handle_inner_classes): New function.
6323
6324 2003-05-01  Tom Tromey  <tromey@redhat.com>
6325
6326         PR java/10459:
6327         * parse.y (finish_for_loop): Do nothing if update expression is a
6328         EXPR_WFL_NODE wrapping nothing.
6329         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6330
6331 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6332
6333         * lex.h (input_lineno): Remove declaration.
6334         * parse-scan.y: #include input.h.
6335         (input_filename): Remove declaration.
6336         (input_location): Add definition.
6337         (input_line): Remove definition.
6338
6339 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6340
6341         * lex.h (lineno): Rename to ...
6342         (input_line): ... here
6343         * parse-scan.y (lineno): Rename to ...
6344         (input_line): ... here.
6345         (reset_report): Rename lineno to input_line.
6346         * check-init.c (check_init): Likewise.
6347         * class.c (push_class): Likewise.
6348         * decl.c (complete_start_java_method, end_java_method): Likewise.
6349         * expr.c (expand_byte_code): Likewise.
6350         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6351         * jcf-write.c (generate_bytecode_insns): Likewise.
6352         * lex.c (java_init_lex, java_allocate_new_line,
6353         do_java_lex): Likewise.
6354         * parse.h (YYNOT_TWICE): Likewise.
6355         * parse.y (empty_statement, expression_statement,
6356         java_pop_parser_context, java_parser_context_save_global,
6357         yyerror, register_fields, method_header, safe_layout_class,
6358         find_in_imports_on_demand, create_artificial_method,
6359         source_end_java_method, start_complete_expand_method,
6360         build_thisn_assign, java_complete_lhs,
6361         maybe_absorb_scoping_block): Likewise.
6362
6363 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6364
6365         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6366         '/' when computing java source filename
6367
6368 2003-04-13  Tom Tromey  <tromey@redhat.com>
6369
6370         * gjavah.c (print_c_decl): Indentation fix.
6371
6372 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6373
6374         * class.c (make_field_value, make_method_value, get_dispatch_table)
6375         (make_class_data, emit_offset_symbol_table)
6376         * constants.c (build_constants_constructor)
6377         * java-tree.h (START_RECORD_CONSTRUCTOR)
6378         * parse.y (maybe_build_array_element_wfl):
6379         Use build_constructor.
6380
6381 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6382
6383         PR java/10253:
6384         * parse.y (string_convert_int_cst): Always use at least one digit
6385         in string conversion. Remove ASCII dependence.
6386         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6387
6388 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6389
6390         * Make-lang.in: added win32-host.c
6391         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6392         resolves to open() on non-Win32 platforms and
6393         Win32-specific jcf_open_exact_case() on Win32
6394         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6395         when trying .java and .class files
6396         * win32-host.c: added to repository. Defines
6397         Win32-specific jcf_open_exact_case()
6398
6399 2003-04-10  Andrew Haley  <aph@redhat.com>
6400
6401         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6402         (maybe_free_localvar): Renamed from localvar_free.
6403         Add new arg, really.
6404         (generate_bytecode_insns): Set new variable, jsrs.
6405         Only free local vars if no jsr insns have been emittted.
6406         Call maybe_free_localvar, not localvar_free.
6407
6408 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6409
6410         * gcj.texi: Remove @ at start of file.
6411
6412 2003-03-25  Tom Tromey  <tromey@redhat.com>
6413
6414         * parse.y (create_interface): Call CHECK_DEPRECATED.
6415
6416 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6417
6418         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6419
6420 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6421
6422         * javaop.h (jfloat, jdouble): Make them structures mirroring
6423         the bit fields of IEEE float and double respectively.
6424         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6425         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6426         (union Word, union DWord): Delete.
6427         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6428
6429         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6430         D_NAN_MASK): Delete.
6431         (jni_print_float, jni_print_double): New.  Generate
6432         hexadecimal floating constants.
6433         (print_field_info): Use jni_print_float/double.
6434
6435         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6436         finite floating point numbers for output; special case
6437         non-finite floats.
6438
6439 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6440
6441         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6442         Replace 0 and 1 with true and false in return statements.
6443
6444 2003-03-19  Tom Tromey  <tromey@redhat.com>
6445
6446         * lex.c (do_java_lex): Renamed from java_lex.
6447         (java_lex): New function.
6448         Include timevar.h.
6449
6450 2003-03-13  Tom Tromey  <tromey@redhat.com>
6451
6452         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6453         type.
6454
6455 2003-03-04  Andrew Haley  <aph@redhat.com>
6456
6457         * gjavah.c (is_first_data_member): New global variable.
6458         (print_c_decl): If it's the first data member, align it as the
6459         superclass.
6460         (process_file): Set is_first_data_member.
6461
6462 2003-03-11  Tom Tromey  <tromey@redhat.com>
6463
6464         * parse.y (resolve_field_access): Initialize class if field is
6465         found in another static field.
6466         * expr.c (build_class_init): Don't optimize out initialization of
6467         implemented interface.
6468
6469 2003-03-11  Andrew Haley  <aph@redhat.com>
6470
6471         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6472         warning.
6473
6474 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6475
6476         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6477         and DIR_SEPARATOR_2 for a target.
6478         Correct minor typos.
6479
6480         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6481         and DIR_SEPARATOR_2 for a target into account.
6482
6483 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6484
6485         * lang.c (java_init): Update prototype, move code to java_post_options.
6486         (java_post_options): Similarly.
6487
6488 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6489
6490         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6491         compare file name components depending on the case-sensitivity
6492         or otherwise of the host file system.
6493
6494         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6495         "strcmp" to compare file name components.
6496         Use IS_DIR_SEPARATOR instead of comparing directly against
6497         DIR_SEPARATOR.
6498         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6499         comparing directly against DIR_SEPARATOR.
6500
6501 2003-03-04  Tom Tromey  <tromey@redhat.com>
6502
6503         * Make-lang.in (java.tags): New target.
6504
6505 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6506
6507         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6508         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6509
6510 2003-03-01  Tom Tromey  <tromey@redhat.com>
6511
6512         * parse.y (jdep_resolve_class): Only check deprecation if we found
6513         a decl.
6514
6515 2003-02-28  Tom Tromey  <tromey@redhat.com>
6516
6517         PR java/9695:
6518         * class.c (maybe_layout_super_class): Always pass a WFL to
6519         do_resolve_class.
6520         * parse.y (do_resolve_class): Updated comment to explain
6521         parameters.
6522
6523 2003-02-26  Tom Tromey  <tromey@redhat.com>
6524
6525         * jcf-write.c (generate_classfile): Check whether class is
6526         deprecated before writing attribute count.
6527
6528 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6529
6530         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6531         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6532
6533 2003-02-23  Tom Tromey  <tromey@redhat.com>
6534
6535         * lang-options.h: Added -Wdeprecated.
6536         * gcj.texi (Warnings): Document -Wdeprecated.
6537         * java-tree.h (flag_deprecated): Declare.
6538         * lang.c (lang_W_options): Added deprecated.
6539         (flag_deprecated): New global.
6540         * chartables.h: Rebuilt.
6541         * gen-table.pl (process_one): Look at whitespace.
6542         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6543         * parse.h (CLEAR_DEPRECATED): New macro.
6544         (CHECK_DEPRECATED_NO_RESET): New macro.
6545         * jcf-parse.c (handle_deprecated): New function.
6546         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6547         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6548         * parse.y (resolve_type_during_patch): Check deprecation.
6549         (jdep_resolve_class): Likewise.
6550         (process_imports): Likewise.
6551         (resolve_expression_name): Likewise.
6552         (check_deprecation): Strip arrays from decl.  Check
6553         flag_deprecated.
6554         (patch_method_invocation): Also check the particular constructor
6555         for deprecation.
6556         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6557         * jcf-write.c (append_deprecated_attribute): New function.
6558         (generate_classfile): Generate deprecated attribute when
6559         appropriate.
6560         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6561         (java_lex) [case '*']: Simplify logic.
6562         (java_start_char_p): Use LETTER_MASK.
6563         (java_part_char_p): Likewise.
6564         (java_space_char_p): New function.
6565
6566 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6567
6568         Change base class access representation.
6569         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6570         (add_interface_do): Likewise.
6571
6572 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6573
6574         * decl.c (java_init_decl_processing): Change
6575         soft_lookupjnimethod_node to reflect the change in
6576         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6577         * expr.c (build_jni_stub): Calculate and pass the size
6578         on the stack of the arguments to a JNI function. Use
6579         new target macro MODIFY_JNI_METHOD_CALL to allow a
6580         target to modify the call to a JNI method.
6581
6582 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6583
6584         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6585         instead of basename to avoid compiler warnings on Tru64.
6586
6587 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6588
6589         * gcj.texi: Update to GFDL 1.2.
6590
6591 2003-01-31  Andrew Haley  <aph@redhat.com>
6592
6593         * parse.y (java_expand_classes): Scan the whole class list looking
6594         for access methods that haven't yet been expanded.
6595
6596 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6597
6598         Fix for java/4269:
6599
6600         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6601         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6602         * jcf-parse.c: Likewise.
6603
6604 2003-01-31  Mark Wielaard  <mark@klomp.org>
6605
6606         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6607
6608 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6609
6610         * class.c (make_class): Use BINFO_ELTS.
6611         (set_super_info): Likewse.
6612         (add_interface_do): Likewise.
6613
6614 2003-01-30  Tom Tromey  <tromey@redhat.com>
6615
6616         * jcf-parse.c (read_class): Update identifier's class value if it
6617         changed during parsing.
6618
6619 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6620
6621         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6622         Propagate change to all other rules as required.
6623         (java/parse-scan.o): Add explicit dependency on
6624         $(parsedir)/java/parse-scan.c .
6625
6626 2003-01-29  Tom Tromey  <tromey@redhat.com>
6627
6628         * parse.y (patch_assignment): Only transform the rhs of an
6629         assignment when compiling to native.
6630
6631 2003-01-28  Tom Tromey  <tromey@redhat.com>
6632
6633         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6634
6635 2003-01-28  Tom Tromey  <tromey@redhat.com>
6636
6637         * lex.c (java_lex): Don't include UEOF as part of token.
6638         (java_read_unicode): Error if \u sequence prematurely terminated.
6639
6640 2003-01-27  Tom Tromey  <tromey@redhat.com>
6641
6642         * parse.y (java_check_regular_methods): Check for construct after
6643         checking types in throws clause.
6644
6645 2003-01-24  Tom Tromey  <tromey@redhat.com>
6646
6647         * class.c (build_static_field_ref): Only a String or numeric field
6648         can fold to a constant.
6649
6650 2003-01-23  Tom Tromey  <tromey@redhat.com>
6651
6652         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6653         file name in resource buffer.
6654
6655 2003-01-23  Tom Tromey  <tromey@redhat.com>
6656
6657         * expr.c (build_known_method_ref): Use method's context to find
6658         method table index.
6659
6660 2003-01-23  Tom Tromey  <tromey@redhat.com>
6661
6662         * constants.c (set_constant_entry): Allocated cleared memory.
6663
6664 2003-01-22  Tom Tromey  <tromey@redhat.com>
6665
6666         * java-tree.h: Don't use PARAMS.
6667         * resource.c: Add prototypes for all functions.
6668         (write_resource_constructor): Use `const char *' to avoid
6669         warning.
6670
6671 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6672
6673         * jcf-parse.c (process_zip_dir): Remove unused variable.
6674
6675 2003-01-22  Tom Tromey  <tromey@redhat.com>
6676
6677         * expr.c (build_invokeinterface): Abort if method's context is not
6678         an interface.
6679
6680 2003-01-22  Tom Tromey  <tromey@redhat.com>
6681
6682         * gcj.texi (Input and output files): Mention non-class entries.
6683         * decl.c (java_init_decl_processing): Call
6684         init_resource_processing.
6685         * java-tree.h (compile_resource_data, write_resource_constructor,
6686         compile_resource_file, init_resource_processing): Declare.
6687         * config-lang.in (gtfiles): Added resource.c.
6688         * Make-lang.in (gt-java-resource.h): New target.
6689         (JAVA_OBJS): Added resource.o.
6690         (java/resource.o): New target.
6691         * resource.c: New file.
6692         * class.c (compile_resource_file): Moved to resource.c.
6693         (registerResource_libfunc): Likewise.
6694         (utf8_decl_list): Mark with GTY; now static.
6695         * jcf-parse.c (classify_zip_file): New function.
6696         (parse_zip_file_entries): Use it; compile .properties files.
6697         (process_zip_dir): Use classify_zip_file and compute_class_name.
6698         Don't write class name into zip directory.
6699         (java_parse_file): Call write_resource_constructor.
6700         (compute_class_name): New function.
6701         * jcf-io.c (read_zip_member): Reindented.
6702
6703 2003-01-21  Tom Tromey  <tromey@redhat.com>
6704
6705         * class.c (supers_all_compiled): New function.
6706         (make_class_data): Use it.
6707
6708 2003-01-21  Tom Tromey  <tromey@redhat.com>
6709
6710         * parse.y (method_header): Native method can't be strictfp.
6711         No method can be transient or volatile.
6712
6713 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6714
6715         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6716
6717 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6718
6719         * check-init.c: Fix comment typos.
6720         * class.c: Likewise.
6721         * constants.c: Likewise.
6722         * decl.c: Likewise.
6723         * except.c: Likewise.
6724         * expr.c: Likewise.
6725         * java-except.h: Likewise.
6726         * java-tree.h: Likewise.
6727         * javaop.h: Likewise.
6728         * jcf-dump.c: Likewise.
6729         * jcf-io.c: Likewise.
6730         * jcf-parse.c: Likewise.
6731         * jcf-write.c: Likewise.
6732         * lang.c: Likewise.
6733         * mangle.c: Likewise.
6734         * typeck.c: Likewise.
6735         * verify.c: Likewise.
6736
6737 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6738
6739         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6740         * jcf-write.c: Include "tm_p.h".
6741
6742 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6743
6744         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6745
6746 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6747
6748         * builtins.c (java_build_function_call_expr): Renamed from
6749         build_function_call_expr.  All callers changed.
6750
6751         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6752         * jcf-parse.c: Include tm_p.h.
6753
6754         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6755         warning.
6756
6757 2003-01-14  Tom Tromey  <tromey@redhat.com>
6758
6759         * class.c (make_class_data): Check that super is compiled before
6760         building class reference to it.
6761
6762 2003-01-14  Andrew Haley  <aph@redhat.com>
6763
6764         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6765         varargs function -- correct.
6766
6767 2003-01-14  Andrew Haley  <aph@redhat.com>
6768
6769         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6770
6771 2003-01-14  Andrew Haley  <aph@redhat.com>
6772
6773         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6774         varargs function -- correct.
6775
6776         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6777         temporary if the RHS is a reference.
6778
6779 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6780
6781         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6782         * keyword.h: Regenerated.
6783
6784         * All Files: Convert to ISO C style function definitions.
6785
6786 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6787
6788         * parse.y (check_pkg_class_access): ANSIfy definition.
6789
6790 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6791
6792         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6793         xmalloc et al.
6794
6795         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6796
6797 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6798
6799         Merge from pch-branch:
6800
6801         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6802
6803         * Make-lang.in (java/gjavah.o): Update dependencies.
6804         * gjavah.c: Include ggc.h.
6805
6806         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6807
6808         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6809         (JCFDUMP_OBJS): Add ggc-none.o.
6810         (java/jcf-dump.o): Depend on GGC_H.
6811         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6812         CPool substructures.
6813         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6814         * jcf-dump.c: Include ggc.h.
6815
6816         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6817
6818         * jcf.h (union cpool_entry): New.
6819         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6820         an array of unions.
6821         (struct JCF): Use gengtype to mark.
6822         (CPOOL_UINT): Update for new cpool_entry type.
6823         (CPOOL_USHORT1): Likewise.
6824         (CPOOL_USHORT2): Likewise.
6825         (CPOOL_FINISH): Use GC to free cpool subfields.
6826         * parse.h (struct parser_ctxt): Mark field current_jcf.
6827         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6828         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6829         (main_jcf): Use gengtype to mark.
6830         (ggc_mark_jcf): Delete.
6831         (get_constant): Update for new cpool_entry type.
6832         (give_name_to_class): Likewise.
6833         (get_class_constant): Likewise.
6834         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6835         (java_parse_file): Use GGC to allocate struct JCF.
6836         (init_jcf_parse): Don't call ggc_add_root.
6837         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6838         cpool_entry type.
6839         * java-tree.h (current_jcf): Use gengtype to mark.
6840         (CPOOL_UTF): Update for new cpool_entry type.
6841         (outgoing_cpool): Use gengtype to mark.
6842         (struct lang_type): GC struct JCF and struct CPool.
6843         * config-lang.in (gtfiles): Add jcf.h.
6844         * constants.c (find_tree_constant): New.
6845         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6846         for new cpool_entry type.
6847         (find_constant1): Update for new cpool_entry type.
6848         (find_constant2): Likewise.
6849         (find_utf8_constant): Use find_tree_constant.
6850         (find_class_or_string_constant): Remove unnecessary cast to jword.
6851         Update for new cpool_entry type.
6852         (count_constant_pool_bytes): Update for new cpool_entry type.
6853         (write_constant_pool): Likewise.
6854         (alloc_name_constant): Use find_tree_constant.
6855         (build_constants_constructor): Update for new cpool_entry type.
6856
6857         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6858
6859         * parse.y (mark_parser_ctxt): Delete.
6860         (goal): Don't use ggc_add_root.
6861         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6862         (java_pop_parser_context): Let GC free parser_ctxt.
6863         (java_parser_context_resume): Likewise.
6864         * parse.h (struct parser_ctxt): Use gengtype to mark.
6865         (ctxp): Likewise.
6866         (ctxp_for_generation): Likewise.
6867         * lex.h (struct java_lc_s): Mark for gengtype.
6868         (java_lexer): Rearrange for gengtype.
6869         * config-lang.in (gtfiles): Add lex.h, parse.h.
6870
6871 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6872
6873         * All Files: Remove PARAMS macro.
6874
6875         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6876         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6877         `__STDC__' macros.
6878
6879         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6880         VA_CLOSE.
6881
6882 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6883
6884         * Make-lang.in (java.install-common, java.uninstall,
6885         java.install-info, java.install-man): Prepend $(DESTDIR)
6886         to destination paths in all (un)installation commands.
6887         (java.install-common): Rewrite $(LN) command to support
6888         DESTDIR with "ln" as well as with "ln -s".
6889
6890 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6891
6892         * java-tree.h: Protect against multiple inclusion.
6893
6894 2003-01-07  Tom Tromey  <tromey@redhat.com>
6895
6896         * class.c (add_assume_compiled): Don't adjust parent if we're
6897         already at the root of tree.
6898
6899 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6900
6901         * lang.c (dump_compound_expr): Prototype.
6902
6903 2003-01-03  Tom Tromey  <tromey@redhat.com>
6904
6905         Fix for PR java/8712:
6906         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6907         when simply checking against `null'.
6908
6909 2003-01-03  Tom Tromey  <tromey@redhat.com>
6910
6911         * gcj.texi (Standard Properties): Document http.proxyHost and
6912         http.proxyPort.
6913
6914         * gcj.texi (GNU Classpath Properties): Document new properties.
6915
6916 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6917
6918         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6919         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6920         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6921
6922 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6923
6924         * Make-lang.in, boehm.c, buffer.c,
6925           buffer.h, builtins.c, class.c,
6926           config-lang.in, constants.c,
6927           convert.h, decl.c, except.c,
6928           expr.c, java-except.h,
6929           java-tree.h, javaop.def,
6930           jcf-parse.c, jcf-write.c,
6931           jv-scan.c, jvgenmain.c,
6932           jvspec.c, keyword.gperf,
6933           keyword.h, lang-options.h,
6934           lang-specs.h, lang.c, lex.c,
6935           lex.h, mangle.c, mangle_name.c,
6936           parse-scan.y, parse.h, parse.y,
6937           typeck.c, verify.c, xref.c,
6938           xref.h: Replace "GNU CC" with
6939           "GCC" in the copyright header.
6940
6941         * check-init.c, gjavah.c, javaop.h,
6942           jcf-depend.c, jcf-dump.c, jcf-io.c,
6943           jcf-path.c, jcf-reader.c, jcf.h,
6944           zextract.c, zipfile.h: These files are
6945           "part of GCC". Also say "GCC" not "GNU CC".
6946
6947 2002-12-30  DJ Delorie  <dj@redhat.com>
6948
6949         * Make-lang.in: Protect against texi2pod/pod2man failing.
6950
6951 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6952
6953         * gcj.texi: Use @copying.
6954
6955 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6956
6957         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6958         print_cxx_classname.
6959         (print_cxx_classname): Add add_scope parameter.
6960         (print_class_decls): Do not emit a semicolon after the extern
6961         "Java" block.
6962         (process_file): Adjust calls to print_cxx_classname.
6963
6964 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6965
6966         * gcj.texi: Include Cover Texts in man page.
6967
6968 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6969
6970         * class.c (build_static_field_ref): Check FIELD_FINAL.
6971
6972         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6973         instead of current_constant_pool_data_ref.
6974         * java-tree.h (current_constant_pool_data_ref): Undefine.
6975         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6976         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6977         current_constant_pool_data_ref.
6978
6979         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6980         not build_internal_class_name.
6981
6982         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6983         Use it when class ref isn't certain to be compiled.
6984
6985 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6986
6987         * gcj.texi: Include gcc-common.texi.
6988         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6989         $(srcdir)/doc/include/gcc-common.texi.
6990
6991 2002-12-22  Anthony Green  <green@redhat.com>
6992
6993         * gcj.texi (Limitations): Add note about org.xml.sax and
6994         org.w3c.dom.
6995
6996 2002-12-20  Tom Tromey  <tromey@redhat.com>
6997
6998         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6999         where minimum case value is Integer.MIN_VALUE.
7000         Fixes PR java/8955.
7001
7002 2002-12-18  Andrew Haley  <aph@redhat.com>
7003
7004         * parse.y (patch_invoke): Force evaluation order when `check' is
7005         set.  For PR libgcj/8945.
7006
7007 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
7008
7009         * gcj.texi: Change version number to 3.4.
7010
7011 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
7012         Andrew Haley <aph@redhat.com>
7013
7014         * parse.y (source_end_java_method): Remove custom encoding of line
7015         numbers for a function decl before passing it to the back end.
7016
7017 2002-12-03  Andrew Haley  <aph@redhat.com>
7018
7019         * class.c (make_class_data): New field, "chain".
7020         * decl.c (java_init_decl_processing): Likewise.
7021
7022 2002-12-02  Tom Tromey  <tromey@redhat.com>
7023
7024         For PR java/8740:
7025         * parse.y (do_resolve_class): Handle qualified name via
7026         recursion.
7027
7028 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7029
7030         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7031         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7032         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7033         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7034         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7035         Include coretypes.h and tm.h.
7036         * Make-lang.in: Update dependencies.
7037
7038 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7039
7040         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7041
7042 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7043
7044         * jcf-reader.c: Don't expand JCF_readu4 inside the
7045         expansion of JCF_SKIP.
7046
7047 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7048
7049         * jcf-reader.c: Don't expand JCF_readu4 inside the
7050         expansion of JCF_SKIP.
7051
7052 2002-11-22  Tom Tromey  <tromey@redhat.com>
7053
7054         * parse.y (patch_binop): Cast right hand side of shift expression
7055         to `int'.  Fixes PR java/8676.
7056
7057 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
7058             Andrew Haley <aph@redhat.com>
7059
7060         * gcc/java/jcf-write.c (write_classfile): Remove target
7061         class file, if it exists, before renaming the temporary
7062         class file to it.
7063
7064 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7065
7066         * jvspec.c (lang_specific_spec_functions): New.
7067
7068 2002-11-18  Tom Tromey  <tromey@redhat.com>
7069
7070         Fix for PR java/7912:
7071         * expr.c (can_widen_reference_to): Allow cast of array to
7072         Cloneable or Serializable.
7073         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7074         (java_io_serializable_identifier_node): Likewise.
7075         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7076         (valid_ref_assignconv_cast_p): Use new identifier nodes.
7077         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7078         java_io_serializable.
7079         * decl.c (java_init_decl_processing): Initialize
7080         java_lang_cloneable_identifier_node and
7081         java_io_serializable_identifier_node.
7082         (java_lang_cloneable_identifier_node): New global.
7083         (java_io_serializable_identifier_node): Likewise.
7084
7085 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
7086
7087         * buffer.c: Remove unnecessary casts.
7088         * check-init.c: Likewise.
7089         * class.c: Likewise.
7090         * constants.c: Likewise.
7091         * decl.c: Likewise.
7092         * except.c: Likewise.
7093         * gjavah.c: Likewise.
7094         * jcf-io.c: Likewise.
7095         * jcf-parse.c: Likewise.
7096         * jcf-path.c: Likewise.
7097         * jvspec.c: Likewise.
7098         * lang.c: Likewise.
7099         * lex.c: Likewise.
7100         * verify.c: Likewise.
7101
7102 2002-11-06  Tom Tromey  <tromey@redhat.com>
7103
7104         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7105         a JNI header.
7106
7107 2002-11-05  Tom Tromey  <tromey@redhat.com>
7108
7109         Fix for PR java/6388.
7110         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7111         * java-tree.h (enum java_tree_index): New values
7112         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7113         (decimal_int_max, decimal_long_max): New defines.
7114         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
7115         (error_if_numeric_overflow): Rewrote range checking.
7116         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7117         decimal_long_max.
7118
7119 2002-11-02  Tom Tromey  <tromey@redhat.com>
7120
7121         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7122
7123         * class.c (make_method_value): Put class name, not signature, into
7124         `throws' field.  For PR java/8415.
7125
7126 2002-10-24  Tom Tromey  <tromey@redhat.com>
7127
7128         * gcj.texi (Invoking gij): Document --showversion.
7129         (Standard Properties): java.library.path now set.
7130
7131 2002-10-23  Tom Tromey  <tromey@redhat.com>
7132
7133         * gjavah.c (decode_signature_piece): In JNI mode, print
7134         `jobjectArray' when array depth is nonzero.
7135         Fixes PR java/8296.
7136
7137 2002-10-15  Andrew Haley  <aph@redhat.com>
7138
7139         * parse.y (patch_invoke): Call force_evaluation_order on a static
7140         arg list.
7141         (resolve_qualified_expression_name): Call force_evaluation_order
7142         on a arg list that is part of a Qualified Expression Name.
7143
7144         * lang.c (dump_compound_expr): New.
7145         (java_dump_tree): New.
7146
7147 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
7148
7149         * gcj.texi: Added item describing the GCJ runtime property
7150         "gnu.gcj.progname".
7151
7152 2002-10-15  Richard Henderson  <rth@redhat.com>
7153
7154         * jcf-parse.c (get_constant): Fix type warning.
7155
7156 2002-10-15  Andrew Haley  <aph@redhat.com>
7157
7158         * java-tree.h (java_inlining_merge_static_initializers): Declare.
7159         (java_inlining_map_static_initializers): Declare.
7160
7161 2002-10-14  Andrew Haley  <aph@redhat.com>
7162
7163         * tree-inline.c (remap_block): All local class initialization
7164         flags go in the outermost scope.
7165         (expand_call_inline): Call java_inlining_map_static_initializers.
7166         (expand_call_inline): Call java_inlining_merge_static_initializers.
7167         * java/lang.c (merge_init_test_initialization): New.
7168         (java_inlining_merge_static_initializers): New.
7169         (inline_init_test_initialization): New.
7170         (java_inlining_map_static_initializers): New.
7171
7172 2002-10-11  Mark Wielaard  <mark@klomp.org>
7173
7174         * gcj.texi (Compatibility): Add Limitations and Extensions section.
7175
7176 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7177
7178         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7179
7180 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7181
7182         * parse.y (merge_string_cste): Add parentheses around & within |.
7183
7184 2002-10-08  Tom Tromey  <tromey@redhat.com>
7185
7186         * parse.y (variable_declarator_id): Simplify error path for
7187         array declarator error.  For PR java/8003.
7188
7189 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
7190
7191         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7192         bug_report_url.
7193
7194 2002-10-08  Andrew Haley  <aph@redhat.com>
7195
7196         * parse.y (attach_init_test_initialization_flags): Check for
7197         error_mark_node.
7198
7199 2002-10-07  Anthony Green  <green@redhat.com>
7200
7201         * parse.y (merge_string_cste): Fix bug in string concatenation.
7202
7203 2002-10-03  Michael Koch  <konqueror@gmx.de>
7204
7205         * gcj.texi (Standard properties):
7206         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7207
7208 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7209
7210         PR optimization/6627
7211         * lang.c (java_init): If storing the vbit in function
7212         pointers, ensure that force_align_functions_log is atleast
7213         one to aid compatability with g++ vtables.
7214
7215 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7216
7217         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7218         foul of type-based aliasing.
7219
7220 2002-09-30  Anthony Green  <green@redhat.com>
7221
7222         * gcj.texi (Invoking jv-scan): Fix texinfo.
7223
7224 2002-09-28  Anthony Green  <green@redhat.com>
7225
7226         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7227         (Code Generation): Add -fno-assert documentation.
7228         * jv-scan.c (flag_assert): New global.
7229         (options): Add assert option.
7230         (help): Add --no-assert documentation.
7231         * parse-scan.y (flag_assert): New global.
7232         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7233         (flag_assert): New global.
7234         * java-tree.h (flag_assert): New global.
7235         * lex.c (java_lex): Obey flag_assert.
7236         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7237         calling cc1.
7238
7239 2002-09-26  Andrew Haley  <aph@redhat.com>
7240
7241         * expr.c (build_java_array_length_access): Check for null pointer.
7242         * expr.c (expand_java_arrayload): Likewise.
7243
7244 2002-09-21  Richard Henderson  <rth@redhat.com>
7245
7246         * jcf-parse.c (get_constant): Decode from IEEE no matter
7247         what the target format.
7248
7249 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7250
7251         * ChangeLog: Follow spelling conventions.
7252         * class.c: Likewise.
7253         * decl.c: Likewise.
7254         * expr.c: Likewise.
7255         * gjavah.c: Likewise.
7256         * java-tree.h: Likewise.
7257         * jcf-dump.c: Likewise.
7258         * jcf-parse.c: Likewise.
7259         * jvspec.c: Likewise.
7260         * lang.c: Likewise.
7261         * mangle.c: Likewise.
7262         * parse.y: Likewise.
7263
7264 2002-09-17  Tom Tromey  <tromey@redhat.com>
7265
7266         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7267         where \r appears at EOF.  Fixes PR java/7950.
7268
7269 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7270
7271         * jvspec.c (lang_specific_driver): Remove unused variable.
7272
7273 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7274
7275         * java-tree.h (union lang_tree_node): Add chain_next option.
7276
7277 2002-09-16  Richard Henderson  <rth@redhat.com>
7278
7279         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7280         use new real.h interface.
7281         * jcf-write.c (find_constant_index): Use new real.h interface.
7282         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7283
7284 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7285
7286         * lang.c: Follow spelling conventions.
7287
7288 2002-09-11  Per Bothner  <per@bothner.com>
7289
7290         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7291         constant to the type of the field.
7292         (java_complete_tree):  Remove now-redundant code.
7293
7294         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7295
7296 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7297
7298         For PR java/5794:
7299         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7300         return label if a ret instruction for the jsr has been reached.
7301
7302 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7303
7304         * parse.y (DIR_SEPARATOR): Don't define.
7305         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7306
7307 2002-08-28  Andrew Haley  <aph@redhat.com>
7308
7309         * verify.c (verify_jvm_instructions): Allow exception handler
7310         inside code that is being protected, but generate a warning.
7311         * except.c (link_handler): Initialize `expanded' in new eh_range.
7312         (binding_depth, is_class_level, current_pc): Declare extern.
7313
7314 2002-09-01  Mark Wielaard <mark@klomp.org>
7315
7316         * gcj.texi: Add chapter about system properties.
7317         Fixed some typos.
7318
7319 2002-08-26  Tom Tromey  <tromey@redhat.com>
7320
7321         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7322         conversion if RHS_TYPE is byte, short, or char.
7323
7324 2002-08-22  Tom Tromey  <tromey@redhat.com>
7325
7326         * gcj.texi (Invoking gij): Document -cp and -classpath.
7327
7328 2002-08-21  Tom Tromey  <tromey@redhat.com>
7329
7330         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7331         $(prefix)/share.  For PR libgcj/7633.
7332
7333         For PR java/6005 and PR java/7611:
7334         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7335         (java_can_use_bit_fields_p): New function.
7336
7337 2002-08-16  Tom Tromey  <tromey@redhat.com>
7338
7339         * gcj.texi (Class Initialization): Mention class initialization of
7340         arrays.
7341
7342 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7343
7344         * Make-lang.in (java-tree-inline.o): New.
7345         (JAVA_OBJS): Add java-tree-inline.o.
7346         * parse.y (source_end_java_method): Call java_optimize_inline.
7347         (java_expand_method_bodies): Save method's tree in
7348         DECL_SAVED_TREE.
7349         (add_stmt_to_compound): Keep track of the number of statments.
7350         * lang.c (java_init): Enable flag_inline_trees.
7351         (java_post_options): If flag_inline_functions is on, enable
7352         flag_inline_trees instread.
7353         (decl_constant_value): New.
7354         (java_tree_inlining_walk_subtrees): New.
7355         * java-tree.h (DECL_NUM_STMTS): New macro.
7356         (java_optimize_inline): Declare.
7357         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7358         Handle a LABEL_EXPR.
7359         * decl.c (build_result_decl): If we already have a DECL_RESULT
7360         don't make another.
7361         (dump_function): New.
7362         (java_optimize_inline): New.
7363         (dump_function): New.
7364
7365 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7366
7367         For PR java/7483:
7368         * parse.y (build_assertion): Invert return from
7369         desiredAssertionStatus.
7370
7371 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7372
7373         * jcf-write.c (get_access_flags): Return correct access flags for
7374         private and protected inner classes.
7375
7376 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7377
7378         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7379
7380 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7381
7382         * mangle_name.c: Don't include obstack.h twice.
7383         * xref.c: Don't include obstack.h.
7384
7385 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7386
7387         * class.c: (permanent_obstack): Delete declaration.
7388         * constants.c: (permanent_obstack): Delete declaration.
7389         * except.c: (permanent_obstack): Delete declaration.
7390         * expr.c: (permanent_obstack): Delete declaration.
7391         * jcf-parse.c: (permanent_obstack): Delete declaration.
7392         (saveable_obstack): Delete declaration.
7393         * parse.h: (permanent_obstack): Delete declaration.
7394         * typeck.c: (permanent_obstack): Delete declaration.
7395
7396 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7397
7398         * gcj.texi (version-gcc): Increase to 3.3.
7399
7400 2002-07-22  Tom Tromey  <tromey@redhat.com>
7401
7402         * lex.c (java_lex): Check for `e' or `E' after 0.
7403
7404 2002-07-21  Richard Henderson  <rth@redhat.com>
7405
7406         * lang.c (java_unsafe_for_reeval): New.
7407         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7408
7409 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7410
7411         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7412         (jcf_path_init): Use GET_ENVIRONMENT.
7413
7414 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7415             Zack Weinberg <zack@codesourcery.com>
7416
7417         * builtins.c (initialize_builtins): Remove defines that
7418         handled C/C++ specific junk hereby removed from builtins.def.
7419
7420 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7421
7422         * lang.c (java_post_options): Update prototype.
7423
7424 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7425
7426         * builtins.c (initialize_builtins): Ignore the additional
7427         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7428         the builtins.def file.
7429
7430 2002-07-01  Tom Tromey  <tromey@redhat.com>
7431
7432         For PR libgcj/7073:
7433         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7434         specially.
7435
7436 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7437
7438         * java/decl.c (builtin_function): Accept additional parameter.
7439         (java_init_decl_processing): Pass an additional NULL_TREE
7440         argument to builtin_function.
7441
7442 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7443
7444         * gcj.texi: Fixed gcj invocation example so that it compiles.
7445
7446 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7447
7448         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7449         * parse.y (mark_parser_ctxt): Likewise.
7450         (check_modifiers, declare_local_variables): Avoid incorrect
7451         hardcoded constant 10.
7452
7453         * lex.c (java_read_char): Avoid "comparison is always true"
7454         warning.
7455
7456 2002-06-25  Andreas Schwab  <schwab@suse.de>
7457
7458         * expr.c (JSR): Avoid undefined operation on PC.
7459
7460 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7461
7462         * decl.c (clear_binding_level): Const-ify.
7463
7464 2002-06-13  Akim Demaille  <akim@epita.fr>
7465
7466         * parse.y (class_declaration, interface_declaration): Make sure
7467         all their rules have an action, in order to avoid meaningless `$$
7468         = $1' and their type clashes.
7469
7470 2002-06-11  Tom Tromey  <tromey@redhat.com>
7471
7472         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7473         * parse-scan.y (statement_without_trailing_substatement): Added
7474         assert_statement.
7475         (assert_statement): New rule.
7476         * java-tree.h (struct lang_type) [assertions]: New field.
7477         (TYPE_USES_ASSERTIONS): New macro.
7478         (CLASS_USES_ASSERTIONS): Likewise.
7479         (FIELD_SYNTHETIC): New define.
7480         * lex.c (java_lval;): Added ASSERT_TK.
7481         * parse.y (ASSERT_TK): Added.
7482         (statement_without_trailing_substatement): Added assert_statement.
7483         (assert_statement): New rule.
7484         (build_assertion): New function.
7485         (maybe_generate_pre_expand_clinit): Create and initialize
7486         $assertionsDisabled.
7487         (lookup_package_type): Removed decl.
7488         * keyword.h: Rebuilt.
7489         * keyword.gperf (assert): New token.
7490
7491 2002-06-10  Akim Demaille  <akim@epita.fr>
7492
7493         * parse.y (interface_type_list, class_member_declaration)
7494         (unary_expression_not_plus_minus): Remove duplicate %type.
7495         Whitespace changes.
7496
7497 2002-06-09  Tom Tromey  <tromey@redhat.com>
7498
7499         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7500
7501         * parse.y (method_header): Give error message in all cases.
7502         Fixes PR java/6865.
7503
7504 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7505
7506         Don't use RTL inlining. Fix for PR java/6820.
7507         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7508         (flag_really_inline): New.
7509         (java_decode_option): Set flag_really_inline if -finline-functions
7510         is seen.
7511         (java_post_options): New function. Turn off inlining unless
7512         flag_really_inline is set.
7513
7514 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7515
7516         * gjavah.c (throwable_p): Accept argument as either a classname or
7517         signature fragment. Create null-terminated classname string for super
7518         when calling itself recursively.
7519         (decode_signature_piece): Skip first character from class name
7520         signature when calling throwable_p.
7521
7522 2002-06-08  H.J. Lu  (hjl@gnu.org)
7523
7524         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7525
7526 2002-06-04  Tom Tromey  <tromey@redhat.com>
7527
7528         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7529
7530 2002-06-04  Michael Koch  <konqueror@gmx.de>
7531
7532         * gcj.texi (Input Options): Fixed typo.
7533
7534 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7535
7536         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7537         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7538         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7539         and all now-pointless local variables.  Rename other local
7540         variables to reflect their not being handles.
7541
7542         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7543         #if JCF_USE_STDIO blocks.
7544
7545         * parse.y: Add missing semicolon at end of rule.
7546
7547 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7548
7549         * check-init.c (attach_initialized_static_class): Delete, unused.
7550         * parse.y: Use htab_t instead of struct hashtable, update
7551         all uses.
7552         * java-tree.h: Include hashtab.h instead of hash.h.
7553         (struct lang_decl_func): Use htab_t, set up for gengtype.
7554         (struct init_test_hash_entry): Delete.
7555         (struct treetreehash_entry): New.
7556         (java_treetreehash_find): New
7557         (java_treetreehash_new): New prototype.
7558         (java_treetreehash_create): New prototype.
7559         (java_mark_tree): Delete prototype.
7560         (java_hash_hash_tree_node): Delete prototype.
7561         (java_hash_compare_tree_node): Delete prototype.
7562         (attach_initialized_static_class): Delete prototype.
7563         * expr.c (build_class_init): Update to use java_treetreehash
7564         functions.
7565         (java_expand_expr): Update to use htab_t.
7566         (emit_init_test_initialization): Likewise.
7567         * decl.c (java_mark_tree): Delete.
7568         * class.c (init_test_hash_newfunc): Delete.
7569         (java_hash_hash_tree_node): Delete.
7570         (java_hash_compare_tree_node): Delete.
7571         (add_method_1): Update to use java_treetreehash functions.
7572         (JAVA_TREEHASHHASH_H): New macro.
7573         (java_treetreehash_hash): New function.
7574         (java_treetreehash_compare): New function.
7575         (java_treetreehash_find): New function.
7576         (java_treetreehash_new): New function.
7577         (java_treetreehash_create): New function.
7578         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7579
7580         * Make-lang.in (java/parse.o): Depend on debug.h.
7581         * java-tree.h (struct lang_identifier): Use gengtype.
7582         (union lang_tree_node): New.
7583         (struct lang_decl_func): Use gengtype.
7584         (struct lang_decl_var): Likewise.
7585         (struct lang_decl): Likewise.
7586         * parse.y: Include debug.h.
7587         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7588
7589         * lang.c (struct language_function): New dummy structure.
7590
7591         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7592         descriminator for DECL_LANG_SPECIFIC.
7593         (struct lang_decl_func): Rename from struct lang_decl.
7594         (enum lang_decl_desc): New.
7595         (struct lang_decl): Make it a union.  Update all the accessor macros.
7596         (struct lang_type): Use gengtype.
7597         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7598         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7599         are now the same size.
7600         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7601         use discriminator to mark DECL_LANG_SPECIFIC.
7602
7603         * Make-lang.in (gt-java-builtins.h): New rule.
7604         (java/builtins.o): Add dependency on gt-<filename>.h.
7605         * builtins.c: Use gengtype for roots.
7606         (union string_or_tree): Use gengtype.
7607         (struct builtin_record): Use gengtype.
7608         * config-lang.in (gtfiles): Add builtins.c.
7609
7610         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7611         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7612         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7613         gt-java-parse.h, gtype-java.h): Add rules to generate.
7614         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7615         (class.o): Add dependency on gt-*.h.
7616         (constants.o): Likewise.
7617         (decl.o): Likewise.
7618         (expr.o): Likewise.
7619         (jcf-parse.o): Likewise.
7620         (jcf-write.o): Likewise.
7621         (lang.o): Likewise.
7622         * config-lang.in (gtfiles): New.
7623         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7624         * constants.c: Replace uses of ggc_add_* with GTY markers.
7625         Include gt-*.h.
7626         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7627         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7628         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7629         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7630         Include gt-*.h.
7631         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7632         Include gt-*.h.
7633         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7634         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7635         gt-*.h.
7636         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7637         Include gtype-java.h.
7638
7639 2002-06-02  Tom Tromey  <tromey@redhat.com>
7640
7641         Fix for PR java/5913:
7642         * parse.y (patch_binop): Call patch_string on op1.
7643
7644 2002-06-02  Tom Tromey  <tromey@redhat.com>
7645
7646         Fix for PR java/1343, PR java/6336:
7647         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7648         formatting.  Changed return type.
7649         (anonymous_class_counter): Moved to top of file.
7650         (maybe_make_nested_class_name): Append number to class name for
7651         function-local classes.
7652
7653 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7654
7655         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7656         * Make-lang.in: Update dependency lists.
7657
7658 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7659
7660         * gjavah.c (throwable_p): Do not free the name of the class after
7661         passing it to find_class.
7662         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7663         * jcf-io.c (dirent.h): Include it.
7664         (fnmatch.h): Likewise.
7665         (compare_path): New function.
7666         (java_or_class_file): Likewise.
7667         (memoized_dirlist_entry): New type.
7668         (memoized_dirlist_lookup_eq): New function.
7669         (memoized_dirlists): New variable.
7670         (caching_stat): New function.
7671         (memoized_class_lookup_eq): New function.
7672         (memoized_class_lookups): Likewise.
7673         (find_class): Use memoized_class_lookups and caching_stat.
7674         * jcf.h (JCF_USE_SCANDIR): Define.
7675         * parse.y (java_expand_classes): Write the class files in reverse
7676         order.
7677
7678 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7679
7680         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7681
7682 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7683
7684         * jcf-write.c (write_classfile): Unlink the temporary file if it
7685         cannot be renamed.  Use concat to build up the name of the
7686         temporary file.
7687
7688 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7689
7690         * jcf-write.c (write_classfile): Write the file to a
7691         temporary file and then rename it.
7692
7693 2002-05-07  Tom Tromey  <tromey@redhat.com>
7694
7695         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7696
7697         Fix for PR java/1200:
7698         * gjavah.c (throwable_p): New function.
7699         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7700         same as a `jweak'.
7701         Include hashtab.h.
7702         (gcjh_streq): New function.
7703
7704 2002-05-07  Andreas Jaeger  <aj@suse.de>
7705
7706         * parse.y (finish_for_loop): Fix if statement.
7707
7708 2002-05-06  Tom Tromey  <tromey@redhat.com>
7709
7710         Fix for PR java/5941:
7711         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7712         loop update expression.
7713         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7714         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7715
7716 2002-05-04  Mark Wielaard  <mark@klomp.org>
7717
7718         For PR java/6519:
7719         * parse.y (build_string_concatenation): Return just op1 only when op2
7720         is null and op1 is a STRING_CST, otherwise always construct a
7721         StringBuffer.
7722
7723 2002-04-27  Tom Tromey  <tromey@redhat.com>
7724
7725         For PR java/6382:
7726         * parse.y (string_convert_int_cst): New function.
7727         (merge_string_cste): Use it.
7728
7729 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7730
7731         * java-tree.h (java_parse_file): Update.
7732         (java_set_yydebug): Remove.
7733         * jcf-parse.c (yydebug): Remove.
7734         (java_set_yydebug): Die.
7735         (java_parse_file): Update.
7736         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7737
7738 2002-04-24  Tom Tromey  <tromey@redhat.com>
7739
7740         For PR java/6425:
7741         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7742         EXPR_WFL_QUALIFICATION of qual_wfl.
7743
7744 2002-04-23  Per Bothner  <per@bothner.com>
7745
7746         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7747         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7748         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7749
7750 2002-04-23  Tom Tromey  <tromey@redhat.com>
7751
7752         For PR java/6314:
7753         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7754         recognize `-fcompile-resource='.
7755         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7756         a bit.
7757
7758 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7759
7760         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7761         paths. Fixes PR java/2791.
7762
7763 2002-04-19  Andrew Haley  <aph@redhat.com>
7764
7765         * jcf-write.c (push_long_const): lo, hi: New variables.
7766         Use rshift_double to extract the high part of a 64-bit long.
7767         Use WORD_TO_INT to extract the low part.
7768
7769         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7770         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7771         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7772
7773 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7774
7775         * typeck.c (incomplete_type_error): Remove.
7776
7777 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7778
7779         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7780         for hash synchronization.
7781         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7782         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7783         class_type_node.
7784
7785 2002-04-16  Mark Wielaard  <mark@klomp.org>
7786
7787         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7788         negative zero.
7789
7790 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7791
7792         Fix for PR java/6294:
7793         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7794         interfaces.
7795
7796 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7797
7798         Fix for PR java/6085:
7799         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7800         to get enclosing "this" argument for inner-class constructor
7801         invocation. Pass correct arguments to build_access_to_thisn.
7802
7803 2002-04-10  Andreas Jaeger  <aj@suse.de>
7804
7805         * gcj.texi (Input Options): Fix extdirs patch.
7806
7807 2002-04-10  Anthony Green  <green@redhat.com>
7808
7809         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7810
7811 2002-04-09  Anthony Green  <green@redhat.com>
7812
7813         * gcj.texi (Input Options): Add --extdirs documentation.
7814         * jcf-dump.c (OPT_extdirs): New macro.
7815         (options): Add extdirs option.
7816         (help): Describe --extdirs.
7817         (main): Handle OPT_extdirs.
7818         * gjavah.c (OPT_extdirs): New macro.
7819         (options): Add extdirs option.
7820         (help): Describe --extdirs.
7821         (main): Handle OPT_extdirs.
7822         * jcf-path.c (jcf_path_init): Add extdirs support.
7823         (jcf_path_extdirs_arg): New function.
7824         (extensions): New variable to hold extensions path entries.
7825         * jvspec.c: Remove -fextdirs= when compiling main().
7826         * lang.c (java_decode_option): Handle -fextdirs=.
7827         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7828         * Make-lang.in: Compile jcf-path with version info for use in
7829         identifying the appropriate libgcj.jar.
7830
7831 2002-04-08  Tom Tromey  <tromey@redhat.com>
7832
7833         For PR libgcj/5303:
7834         * .cvsignore: Added rmic.1 and rmiregistry.1.
7835         * gcj.texi (Top): Link to new nodes.
7836         (Invoking rmic): New node.
7837         (Invoking rmiregistry): Likewise.
7838         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7839         rmiregistry.1.
7840         (java.maintainer-clean): Likewise.
7841         ($(srcdir)/java/rmic.1): New target.
7842         ($(srcdir)/java/rmiregistry.1): Likewise.
7843         (java.install-man): Handle rmic.1 and rmiregistry.1.
7844
7845 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7846
7847         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7848         Add note about handling uncaught exceptions. Add an exception handler
7849         to example.
7850
7851 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7852
7853         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7854         after using it to patch CALL_EXPR.
7855
7856 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7857
7858         * gcj.texi (Invocation): Document CNI invocation API.
7859
7860 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7861
7862         * expr.c (truthvalue_conversion): Rename.  Update.
7863         (expand_compare): Update.
7864         * java-tree.h (java_truthvalue_conversion): New.
7865         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7866
7867 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7868
7869         * java-tree.h (java_mark_addressable): New.
7870         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7871         * typeck.c (mark_addressable): Rename, update.
7872
7873 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7874
7875         * expr.c (build_java_binop): Update.
7876         * java-tree.h (java_signed_type, java_unsigned_type,
7877         java_signed_or_unsigned_type): Update.
7878         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7879         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7880         * parse.y (patch_binop): Update.
7881         * typeck.c (signed_or_unsigned_type, unsigned_type,
7882         signed_type): Update.
7883
7884 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7885
7886         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7887         (java_dummy_print): Remove.
7888         (lang_print_error): Rename.  Exit early if inhibiting output.
7889         (inhibit_error_printing_function): New.
7890         (java_init): Don't set hook.
7891         (lang_init_source): Use new boolean.
7892
7893 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7894
7895         * parse.y (do_resolve_class): Fix infinite recursion.
7896
7897 2002-03-29  Tom Tromey  <tromey@redhat.com>
7898
7899         * parse.y (check_inner_circular_reference): Ignore incomplete
7900         types.
7901
7902 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7903
7904         * Make-lang.in (builtins.o): Update.
7905         * boehm.c (get_boehm_type_descriptor): Update.
7906         * builtins.c: Include langhooks.h.
7907         * decl.c (java_init_decl_processing): Update.
7908         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7909         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7910         Redefine.
7911         * typeck.c (type_for_mode, type_for_size): Update.
7912
7913 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7914
7915         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7916
7917 2002-03-28  Tom Tromey  <tromey@redhat.com>
7918
7919         * except.c (expand_end_java_handler): If the handler type is NULL,
7920         use java.lang.Throwable.  Fixes PR java/5986.
7921
7922 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7923
7924         Fix for PR java/4715:
7925         * jcf-parse.c (parse_source_file_3): New function.
7926         (read_class): Call it.
7927         (java_parse_file): Likewise.
7928
7929 2002-03-28  Jan Hubicka  <jh@suse.cz>
7930
7931         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7932
7933 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7934
7935         * parse.y (resolve_package): Initialize "decl".
7936         (lookup_package_type): Remove unused function.
7937
7938 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7939
7940         Fix for PR java/5993:
7941         * parse.y (resolve_package): Return the decl if resolution was
7942         successful. Don't special case "java.lang" and "java.lang.reflect"
7943         packages. Set type_name to the merged identifier.
7944         (resolved_qualified_expression_name): Print error using "name" if
7945         resolve_package returns NULL_TREE.
7946
7947 2002-03-27  Tom Tromey  <tromey@redhat.com>
7948
7949         * expr.c (expand_invoke): Don't generate null pointer check if
7950         we're calling <init>.
7951
7952 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7953
7954         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7955         fix prototype.
7956         * java-tree.h (java_lang_expand_expr): Similarly.
7957         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7958         (java_init): Don't set hook.
7959
7960 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7961
7962         Fix for PR java/5850:
7963         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7964         context if field was not found in the current scope.
7965         * expr.c (lookup_field): Don't look in enclosing contexts.
7966
7967 2002-03-26  Tom Tromey  <tromey@redhat.com>
7968
7969         Fix for PR java/5942:
7970         * parse.y (init_src_parse): Added sanity check.
7971         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7972         elements, not 11.
7973
7974 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7975
7976         * decl.c (lang_mark_tree): Rename java_mark_tree.
7977         * java-tree.h (java_mark_tree): New.
7978         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7979
7980 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7981
7982         * lex.c: Change java_perform_atof to take normal parameters
7983         instead of a pointer to a parameter block.  Call it directly
7984         from java_lex.
7985
7986 2002-03-22  Mark Wielaard  <mark@klomp.org>
7987
7988         Fix for PR java/5368:
7989         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7990         when printing error message.
7991
7992 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7993
7994         * decl.c (maybe_build_cleanup): Remove.
7995
7996 2002-03-22  Tom Tromey  <tromey@redhat.com>
7997
7998         Andrew Haley  <aph@cambridge.redhat.com>
7999
8000         * expr.c (build_field_ref): Don't build a check if the field is a
8001         member of `this'.
8002
8003 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
8004
8005         Fix for PR java/6026:
8006         * lex.c (java_lex): Fix parsing of consecutive floats.
8007
8008 2002-03-21  Tom Tromey  <tromey@redhat.com>
8009
8010         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8011         class.
8012
8013 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8014
8015         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8016         insert_block, getdecls, kept_level_p, global_bindings_p): New.
8017
8018 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8019
8020         * gcj.texi: @code{gcj} becomes @command{gcj}.
8021         @code{gcc} becomes @command{gcc}.
8022         GcjRaw changed to gnu.gcc.RawData.
8023
8024 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8025
8026         * decl.c (start_java_method): Use new hook.
8027         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8028         (java_init): Remove old hook.
8029
8030 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8031
8032         * builtins.c (define_builtin): Do nothing if `type' is null.
8033         Fixes PR java/5876.
8034
8035 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8036
8037         * parse.y (parser_check_super_interface): Fix error message
8038         grammar/order.
8039
8040 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8041
8042         * jcf-parse.c (get_constant): Delete unused variables.
8043
8044 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8045
8046         * java-tree.h (java_parse_file): New.
8047         * jcf-parse.c (yyparse): Rename java_parse_file.
8048         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8049
8050 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8051
8052         * parse.y (craft_constructor): Return the constructor decl.
8053         (java_expand_classes): Update comments.
8054         (lookup_method_invoke): Call fix_constructors immediately for
8055         anonymous class. Fixes PR java/5935.
8056
8057 2002-03-15  Anthony Green  <green@redhat.com>
8058
8059         * jcf-parse.c (yyparse): Don't emit class registration
8060         constructor when compiling resource files.
8061
8062 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8063
8064         * lang.c (java_tree_code_type, java_tree_code_length,
8065         tree_code_name): Delete.
8066         (tree_code_type, tree_code_length, tree_code_name): Define.
8067         (java_init): Don't try to copy into the various tree_code
8068         arrays.
8069
8070 2002-03-12  Tom Tromey  <tromey@redhat.com>
8071
8072         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8073         UTF-8, not UCS-2.  Fixes PR java/5923.
8074
8075         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8076         a call_expr wrapped in a convert.  Fixes PR java/5848.
8077
8078 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8079
8080         * jcf-write.c (write_classfile): Improve error strings.
8081
8082 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8083
8084         * lex.c: Adjust comments to GNU standards.
8085
8086 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8087
8088         Fix for PR java/5902:
8089         * lex.c (java_lex): Fix parsing of literals.
8090
8091 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8092
8093         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8094         to prevent it getting evaluated twice in the store checking case.
8095         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8096         examining OBJECT.
8097
8098 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8099
8100         * decl.c (java_init_decl_processing): Make sure class_type_node
8101         alignment is not less than 64 bits if hash synchronization is enabled.
8102
8103 2002-03-08  Per Bothner  <per@bothner.com>
8104
8105         * parse.y (java_complete_lhs):  Check if patch_assignment
8106         returned an error-mark.
8107
8108         * parse.y (try_builtin_assignconv):  Don't special-case zero.
8109
8110 2002-03-08  Per Bothner  <per@bothner.com>
8111
8112         Fix for PR java/5812.
8113         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
8114         here instead of in JSR macro.  Likewise with load_type_state call.
8115         Do the latter on if the return_pc has been verified (the jsr returns).
8116         (JSR):  Now just call build_java_jsr.
8117
8118 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
8119
8120         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8121         (java.install-common): Link native driver to
8122         JAVA_TARGET_INSTALL_NAME.
8123
8124 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
8125
8126         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8127         * builtins.c(sin_builtin): Likewise
8128         * builtins.c(sqrt_builtin): Likewise
8129
8130 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
8131
8132         * java/expr.c, java/jcf-parse.c, java/lex.c:
8133         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8134         REAL_ARITHMETIC blocks unconditional.  Delete some further
8135         #ifdef blocks predicated on REAL_ARITHMETIC.
8136
8137 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8138
8139         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8140         explicit sizeof/sizeof.
8141         * decl.c (java_init_decl_processing): Likewise.
8142         * jcf-parse.c (init_jcf_parse): Likewise.
8143         * parse.y (init_src_parse): Likewise.
8144
8145 2002-03-02  Per Bothner  <per@bothner.com>
8146
8147         Make --CLASSPATH by a synonym for --classpath and -classpath.
8148         Implement --bootclasspath.
8149         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
8150         (classpath_l):  Remove.
8151         (jcf_path_CLASSPATH_arg):  Remove.
8152         (jcf_path_bootclasspath_arg):  New function.
8153         (jcf_path_seal):  Simplify accordingly.
8154
8155         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
8156         (jcf_path_CLASSPATH):  Remove declaration.
8157         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
8158         (lang_specific_driver):  Translate -bootclasspath.
8159         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
8160         * lang.c (decode_lang_options):  Do jcf_path_init first.
8161         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
8162         * gjavah.c:  Also handle --bootclasspath.
8163         Handle --CLASSPATH as a synonum for --classpath.
8164         * jcf-dump.c: Likewise.
8165
8166         "." is not part of system path, but is the default for --classpath.
8167         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
8168         (jcf_path_seal):  Add "." if no CLASSPATH specified.
8169
8170         * gcj.texi:  Document changes.
8171
8172 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8173
8174         * expr.c (build_java_arraystore_check): Fix formatting.
8175
8176 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8177
8178         Fix for PR java/5758, java/5632:
8179         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8180         inner-class separator too.
8181         * parse.y (do_resolve_class): New local `decl_result.'
8182         Progressively build a name for what can have been loaded.
8183
8184 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8185
8186         * expr.c (java_array_data_offset): Removed function.
8187         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8188         (build_java_array_length_access): Obtain "length" value using a
8189         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8190         (build_java_arrayaccess): Correct comment. Access "data" using a
8191         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8192         (build_java_arraystore_check): New function.
8193         (expand_java_arraystore): Use build_java_arraystore_check.
8194         * parse.y (patch_assignment): Simplify code to insert a store check
8195         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8196         * check-init.c (check_init): Update to reflect that an array length
8197         access is now a COMPONENT_REF.
8198         * gcj.texi (Code Generation): Improve documentation of
8199         -fno-bounds-check. Add documentation for -fno-store-check.
8200         * java-tree.h (flag_store_check): Declare.
8201         (build_java_arraystore_check): Declare.
8202         * lang.c (flag_store_check): Initialize to 1.
8203         (lang_f_options): Add store-check option.
8204         * jvspec.c: Don't pass store-check option to jvgenmain.
8205         * lang-options.h: Add help string for -fno-store-check.
8206
8207 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8208
8209         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8210         * java-tree.h (java_dup_lang_specific_decl): New.
8211         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8212
8213 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8214
8215         * builtins.c, decl.c: Delete traditional-mode-related code
8216         copied from the C front end but not used, or used only to
8217         permit the compiler to link.
8218
8219 2002-02-22  Tom Tromey  <tromey@redhat.com>
8220
8221         Fix for PR java/2369:
8222         * jvspec.c (verify_class_name): New function.
8223         (lang_specific_driver): Call it.
8224         (JAVA_START_CHAR_P): New macro.
8225         (JAVA_PART_CHAR_P): Likewise.
8226
8227 2002-02-22  Per Bothner  <per@bothner.com>
8228
8229         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8230         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8231         type_info pointer (currently unimplemented hence NULL) to vtable.
8232         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8233         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8234         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8235         (build_dtable_decl):  Add declarations for new fields.
8236
8237 2002-02-20  Per Bothner  <per@bothner.com>
8238
8239         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8240         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8241         don't need to set it on the COMPOUND_EXPR - the caller does that.
8242
8243 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8244
8245         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8246         `--CLASSPATH' becomes `--classpath.'
8247         * gjavah.c: Likewise.
8248         * jcf-dump.c: Likewise.
8249         * lang-options.h: Likewise.
8250         * lang.c: Likewise.
8251         * jcf-path.c: Updated comment.
8252         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8253         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8254         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8255         (jcf_path_CLASSPATH_arg): Ditto.
8256         (classpath_u): Updated leading comment.
8257
8258 2002-02-20  Per Bothner  <per@bothner.com>
8259
8260         * builtins.c (check_for_builtin):  New function.
8261         (build_call_or_builtin):  Remove.
8262         * java-tree.h:  Update accordingly.
8263         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8264         of build_call_or_builtin.
8265         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8266         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8267         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8268
8269 2002-02-17  Tom Tromey  <tromey@redhat.com>
8270
8271         * java-tree.h (TYPE_STRICTFP): New macro.
8272         (struct lang_type) [strictfp]: New field.
8273         (CLASS_STRICTFP): New macro.
8274         (METHOD_STRICTFP): New macro.
8275         (struct lang_decl) [strictfp]: New field.
8276         * parse.y (method_header): Disallow strictfp constructor or
8277         abstract method.
8278         (STRICT_TK): Move before MODIFIER_TK.
8279         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8280         (METHOD_MODIFIERS): Likewise.
8281         (INTERFACE_MODIFIERS): Likewise.
8282         * jcf-write.c (get_access_flags): Likewise.
8283         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8284         (add_method_1): Likewise.
8285         (get_access_flags_from_decl): Likewise.
8286         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8287         recognize strictfp flag.
8288         * jcf.h (ACC_STRICT): New define.
8289
8290 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8291
8292         * class.c(build_utf8_ref): Move declaration of decl_size
8293
8294 2002-02-07  Tom Tromey  <tromey@redhat.com>
8295
8296         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8297         path.
8298
8299 2002-02-04  Anthony Green  <green@redhat.com>
8300
8301         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8302         sections if available.
8303
8304 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8305
8306         * parse.y (java_expand_classes): Fix typo in static field loop.
8307
8308 2002-02-02  Richard Henderson  <rth@redhat.com>
8309
8310         * class.c (add_field): Mark static fields external.
8311         (build_class_ref): Remove redundant set.
8312         * parse.y (java_expand_classes): Mark static fields of classes
8313         to be compiled as local.
8314         * jcf-parse.c (parse_class_file): Likewise.
8315
8316 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8317
8318         * gcj.texi (About CNI): New node.
8319
8320 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8321
8322         PR java/5080
8323         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8324         setlocale() with LC_CTYPE as a parameter.
8325         * jv-scan.c: Same.
8326
8327 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8328
8329         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8330         Follow GNU Coding Standards for --version.
8331
8332 2002-01-28  Tom Tromey  <tromey@redhat.com>
8333
8334         * expr.c (build_jni_stub): Ensure storage for `meth' is
8335         generated.
8336         * parse.y (java_complete_expand_methods): Set
8337         current_function_decl before building JNI stub.
8338
8339 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8340
8341         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8342         BUILT_IN_SQRTF.
8343
8344 2002-01-22  Tom Tromey  <tromey@redhat.com>
8345
8346         * decl.c (java_init_decl_processing): Use add_predefined_file.
8347         Predefine RawData.java.
8348         (predef_filenames): Removed.
8349         (java_init_decl_processing): Don't register predef_filenames.
8350         * jcf-parse.c (add_predefined_file): New function.
8351         (predefined_filename_p): Rewrote.
8352         (predefined_filename_p): No longer static.
8353         * decl.c (java_init_decl_processing): Call initialize_builtins.
8354         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8355         (java/builtins.o): New target.
8356         * builtins.c: New file.
8357         * parse.y (patch_invoke): Use build_call_or_builtin.
8358         * java-tree.h (build_call_or_builtin): Declare.
8359         (initialize_builtins): Declare.
8360         (java_set_exception_lang_code): Removed unused declaration.
8361         (PREDEF_FILENAMES_SIZE): Removed.
8362         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8363         (predef_filenames): New define.
8364         (add_predefined_file): Declare.
8365         (predefined_filename_p): Declare.
8366         * expr.c (expand_invoke): Use build_call_or_builtin.
8367
8368 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8369
8370         * parse.y (patch_switch_statement): Fix format specifier.
8371
8372 2002-01-16  Tom Tromey  <tromey@redhat.com>
8373
8374         More for PR java/5365:
8375         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8376         default.
8377         (process_file): Generate include for
8378         java.lang.UnsupportedOperationExceptions.
8379
8380 2002-01-15  Andreas Jaeger  <aj@suse.de>
8381
8382         * .cvsignore: Add man pages.
8383
8384 2002-01-15  Tom Tromey  <tromey@redhat.com>
8385
8386         Fix for PR java/5365:
8387         * gjavah.c (process_file): Turn class name into a file name.
8388
8389 2002-01-14  Matthias Klose  <doko@debian.org>
8390
8391         * gcj.texi: Fix whitespace and formatting errors in the
8392         synopsis of the man pages. Update copyright.
8393
8394 2002-01-14  Tom Tromey  <tromey@redhat.com>
8395
8396         For PR libgcj/5303:
8397         * Make-lang.in (java.install-man): Handle jv-convert man page.
8398         (java.generated-manpages): Added jv-convert.1.
8399         (java.uninstall): Remove jv-convert.1.
8400         (java.maintainer-clean): Likewise.
8401         ($(srcdir)/java/jv-convert.1): New target.
8402         * gcj.texi (Top): Link to jv-convert node.
8403         (Individual utilities): Likewise.
8404         (Invoking jv-convert): New node.
8405
8406 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8407             Martin Kahlert  <martin.kahlert@infineon.com>
8408
8409         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8410         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8411
8412 2002-01-03  Graham Stott  <grahams@redhat.com>
8413
8414         * class.c (compile_resource_file): Update copyright date.
8415         Constify filename parameter.
8416         (java-tree.h): Update copyright date.
8417         (compile_resource_file): Constify filename parameter.
8418
8419 2002-01-03  Graham Stott  <grahams@redhat.com>
8420
8421         * gcc/jcf-parse.c: Update copyright date.
8422         (yyparse): Constify resource_filename.
8423
8424 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8425
8426         * parse.y (src_parse_roots): Don't needlessly zero init.
8427
8428 2001-12-31  Tom Tromey  <tromey@redhat.com>
8429
8430         * parse.y (dump_java_tree): New function.
8431         (source_end_java_method): Call it.
8432         (end_class_declaration): Likewise.
8433         * lang.c (java_decode_option): Call dump_switch_p.
8434
8435 2001-12-28  Tom Tromey  <tromey@redhat.com>
8436
8437         * gen-table.pl: Don't process characters after \uffff.  Added
8438         comment pointing to input file.
8439
8440 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8441
8442         * gen-table.pl: Const-ify output.  Document the location of a
8443         suitable unicode input file.
8444
8445         * chartables.h: Regenerate.
8446
8447 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8448
8449         * chartables.h: Const-ify.
8450         * gjavah.c (options): Likewise.
8451         * jcf-dump.c (options): Likewise.
8452         * jv-scan.c (options): Likewise.
8453         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8454         * parse.y (binop_lookup): Likewise.
8455
8456 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8457
8458         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8459         the static arrays that are output.
8460         * jvspec.c (jvgenmain_spec): Make static.
8461         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8462         * keyword.h: Regenerate.
8463         * lang.c (string_option, process_option_with_no, lang_f_options,
8464         lang_W_options): Const-ify.
8465         * lex.c (java_lex): Likewise.
8466
8467 2001-12-21  Richard Henderson  <rth@redhat.com>
8468
8469         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8470         (get_boehm_type_descriptor): ... here.  Arrange for the
8471         TREE_TYPE to get set properly.
8472
8473 2001-12-21  Richard Henderson  <rth@redhat.com>
8474
8475         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8476         only if the target requires collect2.
8477
8478         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8479
8480 2001-12-20  Tom Tromey  <tromey@redhat.com>
8481
8482         For PR java/4509:
8483         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8484         CAN_COMPLETE_NORMALLY for the node.
8485         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8486         generate code for second branch if first branch can't complete
8487         normally.
8488         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8489         the loop head if the loop body can't complete normally.
8490
8491 2001-12-20  Tom Tromey  <tromey@redhat.com>
8492
8493         For PR java/4766:
8494         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8495         case where `finally' clause can't complete normally.
8496
8497 2001-12-20  Tom Tromey  <tromey@redhat.com>
8498
8499         Fixes PR java/5057:
8500         * parse.y (analyze_clinit_body): Added this_class parameter.
8501         Check for more cases where we must keep <clinit>.
8502         (maybe_yank_clinit): Cleaned up flow control.
8503
8504 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8505
8506         * decl.c (java_init_decl_processing): Don't initialize
8507         finit_leg_identifier_node.
8508         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8509         (finit_leg_identifier_node): Remove.
8510         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8511
8512 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8513
8514         * mangle.c (mangle_member_name): Don't special-case for
8515         NO_DOLLAR_IN_LABEL.
8516         * mangle_name.c (unicode_mangling_length): Likewise.
8517         (append_unicode_mangled_name): Likewise.
8518         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8519         code.
8520
8521 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8522
8523         * expr.c (build_java_array_length_access): Don't force null pointer
8524         check unless flag_check_references is set.
8525
8526 2001-12-20  Tom Tromey  <tromey@redhat.com>
8527
8528         Fix for PR java/3417:
8529         * parse.y (patch_assignment): Added special processing for
8530         `return'.
8531         (patch_return): Don't convert booleans to integers, and don't
8532         special-case `null'.
8533
8534 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8535
8536         * config-lang.in (diff_excludes): Remove.
8537
8538 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8539
8540         * gcj.texi: Update link to GCC manual.
8541
8542 2001-12-17  Tom Tromey  <tromey@redhat.com>
8543
8544         * parse.y (link_nested_class_to_enclosing): Removed useless
8545         statement.
8546
8547 2001-12-16  Tom Tromey  <tromey@redhat.com>
8548
8549         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8550         Fixes PR java/5088.
8551
8552 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8553
8554         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8555         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8556         spelling errors.
8557
8558 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8559
8560         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8561
8562 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8563
8564         * decl.c (java_init_decl_processing): Build otable_type correctly.
8565         otable_decl is an otable_type.
8566
8567 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8568
8569         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8570         otable_type, otable_ptr_type, method_symbol_type,
8571         method_symbols_array_type, method_symbols_array_ptr_type): New
8572         field/global tree definitions.
8573         (flag_indirect_dispatch): New flag.
8574         * decl.c (java_init_decl_processing): Initialize new otable and
8575         otable_syms type nodes and decls. Add new field "index" to
8576         method_type_node.
8577         * class.c (build_method_symbols_entry): New function.
8578         (make_method_value): Set "index" to to method's vtable index for
8579         virtual methods when indirect-dispatch is not used.
8580         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8581         and set vtable_method_count to -1. Set otable and otable_syms field
8582         if indirect-dispatch is used and there was something to put in them.
8583         (build_method_symbols_entry): New function.
8584         (emit_offset_symbol_table): New function.
8585         * expr.c (get_offset_table_index): New function.
8586         (build_invokevirtual): Build array reference to otable at the index
8587         returned by get_offset_table_index, and use the result as the vtable
8588         offset.
8589         (build_invokeinterface): Similar.
8590         * jcf-parse.c (yyparse): If indirect-dispatch, call
8591         emit_offset_symbol_table at the end of compilation, after all classes
8592         have been generated.
8593         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8594         * lang.c (flag_indirect_dispatch): Define.
8595         (lang_f_options): Add indirect-dispatch flag.
8596
8597 2001-12-14  Matthias Klose  <doko@debian.org>
8598
8599         * gcj.texi: Markup for man page generation. Document missing
8600         options printed by <tool> --help.
8601         Terminate description of gij's -ms option with a dot.
8602         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8603         (java.generated-manpages java.install-man, java.uninstall,
8604         java-maintainer-clean) Updated.
8605
8606 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8607
8608         * class.c (get_dispatch_table): Fix java vtable layout
8609         for TARGET_VTABLE_USES_DESCRIPTORS.
8610         * decl.c (java_init_decl_processing): Initialize
8611         alloc_no_finalizer_node, finalize_identifier_node.
8612         * expr.c (class_has_finalize_method): New function.
8613         (expand_java_NEW): Generate calls for finalizer-free allocation.
8614         (build_invokevirtual): Fix java vtable layout for
8615         TARGET_VTABLE_USES_DESCRIPTORS.
8616         * java-tree.h (enum java_tree_index): New entries:
8617         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8618         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8619         (class_has_finalize_method): declare.
8620         (HAS_FINALIZER_P): New macro.
8621         * parse.y (patch_invoke): Generate calls for finalizer-free
8622         allocation.
8623
8624 2001-12-12  Matthias Klose  <doko@debian.org>
8625
8626         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8627         whitespace at end of line.
8628
8629 2001-12-11  Tom Tromey  <tromey@redhat.com>
8630
8631         * lex.c (java_init_lex): Define wfl_to_string as
8632         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8633
8634 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8635
8636         * class.c (make_method_value): Use null_pointer_node to
8637         represent empty exception table.
8638
8639 2001-12-10  Tom Tromey  <tromey@redhat.com>
8640
8641         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8642
8643 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8644
8645         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8646
8647 2001-12-09  Per Bothner  <per@bothner.com>
8648
8649         * check-init.c (current_switch_has_default):  New static field.
8650         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8651         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8652         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8653
8654 2001-12-09  Tom Tromey  <tromey@redhat.com>
8655
8656         * check-init.c (check_init): Don't allow pre- or post- increment
8657         or decrement of final variable.
8658         (final_assign_error): Minor error message rewording.
8659
8660 2001-12-08  Tom Tromey  <tromey@redhat.com>
8661
8662         * java-tree.h: Fixed typo.
8663
8664         * gjavah.c (decompile_method): Don't decompile to `return this'
8665         for static methods.
8666
8667         * gjavah.c (cxx_keywords): Re-sorted.
8668         * lex.c (cxx_keywords): Re-sorted.
8669
8670         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8671         else.
8672
8673         * gjavah.c (print_namelet): Clear subnamelets.
8674         (HANDLE_METHOD): Set `method_printed' earlier.
8675
8676 2001-12-07  Tom Tromey  <tromey@redhat.com>
8677
8678         * lang.c (lang_f_options): Added
8679         optimize-static-class-initialization.
8680         (java_decode_option): Removed special case.
8681
8682 2001-12-07  Per Bothner  <per@bothner.com>
8683
8684         * check-init.c (check_init):  Fix typo freeing memory twice.
8685
8686 2001-12-05  Per Bothner  <per@bothner.com>
8687
8688         Restore support for static class initialization optimization.
8689         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8690         * check-init.c (check_int):  At end of BLOCK handle initialization
8691         blocks, which used to be done in java_complete_expand_method but did
8692         not handle the case where check_for_initialization might allocate
8693         more than a word of bits.
8694         * decl.c (lang_make_tree):  The smic field is now a tree.
8695         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8696         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8697
8698         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8699
8700         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8701         Change from a hash table to a list.
8702         (struct_lang_decl):  Change field 'smic' to match.
8703         * class.c (add_method_1):  Initialize
8704         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8705         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8706         (java_expand_method_bodies): -here, since 'smic' is now a list.
8707         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8708
8709         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8710
8711         * class.c (java_hash_compare_tree_node):  Fix casts.
8712
8713 2001-12-04  Per Bothner  <per@bothner.com>
8714
8715         * check-init.c:   Handle definite unassignment to finals in addition
8716         to definite assignment.
8717         (loop_current_locals):  New field.
8718         (num_current_locals, int start_current_locals, num_current_words):
8719         Make static.
8720         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8721         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8722         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8723         (get_variable_decl, check_final_reassigned):  New functions.
8724         (check_init, check_bool_init):  Modify as needed for checking finals.
8725         (check_for_initialization):  Take extra parameter and return void.
8726         Do extra start-up logic to check final fields for assignment.
8727         * parse.y (check_static_final_variable_assignment_flag,
8728         reset_static_final_variable_assignment_flag, check_final_assignment,
8729         check_final_variable_local_assignment_flag,
8730         reset_final_variable_indirect_assignment_flag,
8731         reset_final_variable_global_assignment_flag):  Remove functions.
8732         (java_complete_expand_methods, outer_field_access_fix,
8733         patch_assignment): Remove no-longer used logic.
8734         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8735         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8736
8737         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8738         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8739         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8740
8741         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8742
8743         * java-tree.h (DECL FINAL):  New bit-field.
8744         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8745         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8746         (DECL_INIT_CALLS_THIS):  New macro.
8747         (struct lang_decl):  New bit-field init_calls_this.
8748         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8749         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8750         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8751         use it for both local variables and final fields.
8752         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8753         and local_final.
8754         (struct lang_type):  Remove hfv bit-field.
8755         (check_for_initialization):  Change to return void.
8756
8757         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8758         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8759         * check-init.c (final_assign_error):  New helper function.
8760         (check_final_reassigned, check_init):  Use it.
8761         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8762
8763         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8764         bit-fields to unsigned.
8765
8766 2001-12-03  Per Bothner  <per@bothner.com>
8767
8768         * parse.y (patch_binop):  Minor constant folding.
8769
8770         * parse.y (build_current_thisn):  Shorter 'buffer'.
8771
8772 2001-12-03  Per Bothner  <per@bothner.com>
8773
8774         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8775         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8776         * jcf-write.c (generate_bytecode_insns):  Remove support for
8777         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8778         * check-init.c (check_init):  Likewise.
8779
8780 2001-12-03  Per Bothner  <per@bothner.com>
8781
8782         * verify.c (subroutine_nesting):  New function.
8783         (verify_jvm_instructions):  Use it to fix logic for checking that
8784         we're done with the current subroutine.
8785
8786         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8787         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8788
8789 2001-12-03  Per Bothner  <per@bothner.com>
8790
8791         * jcf.h:  Fix obvious typo in comment.
8792         * typeck.c (build_null_signature):  Add comment.
8793
8794 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8795
8796         * expr.c: Remove leading capital from diagnostic messages, as
8797         per GNU coding standards.
8798         * jcf-io.c: Similarly.
8799         * jcf-parse.c: Similarly.
8800         * jv-scan.c: Similarly.
8801         * jvspec.c: Similarly.
8802         * mangle.c: Similarly.
8803
8804 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8805             Alexandre Petit-Bianco  <apbianco@redhat.com>
8806
8807         * expr.c (build_java_arrayaccess): Call save_expr on array for
8808         correct evaluation order, modified comment, fixed indentation.
8809         * parse.y: (patch_assignment): Correctly extract the array base
8810         from the tree generate by build_java_arrayaccess, added comments.
8811         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8812         Fixes PR java/3096, PR java/3803, PR java/3965.
8813
8814 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8815
8816         * expr.c (expand_byte_code): Remove trailing periods from messages.
8817         * jcf-parse.c (load_class, jcf_parse): Similarly.
8818         * jcf-write.c (generate_classfile): Similarly.
8819         * lex.c (java_lex): Similarly.
8820
8821 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8822
8823         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8824
8825 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8826
8827         * Make-lang.in (java.generated-manpages): New dummy target.
8828
8829 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8830
8831         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8832         ASM_FINAL_SPEC.
8833         (lang_specific_pre_link): Use set_input to set input_filename.
8834         Append `main' here.
8835         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8836         (main): Fix definition.
8837         Strip `main' from classname.
8838         Fixes PR java/227.
8839
8840 2001-11-18  Roger Sayle <roger@eyesopen.com>
8841
8842         * parse.h (java_expand_switch): Remove old prototype.
8843
8844 2001-11-18  Tom Tromey  <tromey@redhat.com>
8845
8846         Fix for PR java/1401:
8847         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8848         arg0 is null.
8849         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8850         correctly.
8851
8852 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8853
8854         * lang.c (finish_parse): Rename to java_finish.
8855         (LANG_HOOKS_FINISH, java_finish): New.
8856
8857 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8858
8859         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8860         * java-tree.h: New prototype.
8861         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8862
8863 2001-11-13  Tom Tromey  <tromey@redhat.com>
8864
8865         * gjavah.c (method_signature): New global.
8866         (HANDLE_METHOD): Set it.
8867         (decompile_return_statement): New function.
8868         (decompile_method): Use it.
8869         (print_method_info): Removed `synth' argument.
8870
8871 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8872
8873         * java-tree.h (java_set_yydebug): New.
8874         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8875         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8876         (print_lang_decl, print_lang_type, print_lang_identifier,
8877         print_lang_statistics, lang_print_xnode): Remove.
8878
8879 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8880
8881         * jcf-parse.c (init_lex): Remove.
8882         * lang.c (language_string, lang_identify): Remove.
8883         (struct lang_hooks): Constify.
8884         (LANG_HOOKS_NAME): Override.
8885         (init_parse): Update.
8886
8887 2001-11-08  Andreas Franck  <afranck@gmx.de>
8888
8889         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8890         program_transform_name the way suggested by autoconf.
8891         (java.install-common): Also transform auxiliary program names with
8892         program_transform_name.
8893
8894 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8895
8896         * parse.y (trap_overflow_corner_case): New rule.
8897         (unary_expression): Use it.
8898         * lex.c (java_init_lex): Don't set minus_seen.
8899         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8900         it to handle.
8901         (error_if_numeric_overflow): New function.
8902         * parse.h (minus_seen): Removed field.
8903         (JAVA_RADIX10_FLAG): New define.
8904
8905 2001-11-07  Tom Tromey  <tromey@redhat.com>
8906
8907         Patch for PR java/1414:
8908         * parse.y (case_label_list): New global.
8909         (goal): Register case_label_list with GC.
8910         (java_complete_lhs): Save new case on case_label_list.
8911         (patch_switch_statement): Check for duplicate case labels.
8912
8913 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8914
8915         * parse.y (patch_assignment): Removed unused third argument.
8916         (java_complete_lhs): Removed unused third argument to patch_assignment.
8917
8918 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8919
8920         * lang.c: Include langhooks-def.h.
8921         * Make-lang.in: Update.
8922
8923 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8924
8925         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8926
8927 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8928
8929         * mangle.c (find_compression_record_match): Don't match compression
8930         records for package name elements unless they occur at the start of
8931         the name. Fix for PR java/4717.
8932
8933 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8934
8935         * expr.c (expand_java_field_op): Don't special-case references to
8936         java.lang.PRIMTYPE.TYPE.
8937         (build_primtype_type_ref): Removed.
8938         * java-tree.h (build_primtype_type_ref): Remove prototype.
8939         * parse.y (maybe_build_primttype_type_ref): Removed.
8940         (complete_function_arguments): Don't special-case references to
8941         java.lang.PRIMTYPE.TYPE.
8942         (patch_assignment): Likewise.
8943         (array_constructor_check_entry): Likewise.
8944
8945 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8946
8947         * mangle.c (static tree compression_table): Fixed leading comment.
8948         * parse.h (struct parser_ctxt): Fixed field comment.
8949         * parse.y (check_pkg_class_access): New prototype, fixed leading
8950         comment, new parameter used to emit error only if passed as true.
8951         (parse_check_super): Pass extra argument to check_pkg_class_access.
8952         (do_resolve_class): Likewise.
8953         (process_imports): Likewise.
8954         (read_import_dir): Fixed indentation.
8955         (find_in_imports_on_demand): New local class_type_name. Local
8956         node_to_use deleted. while loop changed into for loop. Report
8957         multiple definition only for accessible classes. Improved error
8958         message.
8959         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8960         assigned to parameter list, fixed indentation. while loop changed
8961         into for loop, restore TREE_CHAIN on local `tem' before the next
8962         iteration.
8963
8964 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8965
8966         * lang.c (lang_get_alias_set): Deleted.
8967
8968 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8969
8970         * gjavah.c (jni_print_char): Fix thinko in last change.
8971
8972         * gjavah.c (jni_print_char, decode_signature_piece): Use
8973         safe-ctype macros and/or fold extra calls into fewer ones.
8974         * lex.c (java_read_unicode, java_lex): Likewise.
8975         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8976         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8977         * mangle_name.c (append_unicode_mangled_name,
8978         unicode_mangling_length): Likewise.
8979
8980 2001-10-17  Richard Henderson  <rth@redhat.com>
8981
8982         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8983
8984 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8985
8986         * lang.c (langhooks.h): Included.
8987         (LANG_HOOKS_INIT): Redefined.
8988         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8989         (LANG_HOOKS_DECODE_OPTION): Likewise.
8990         (struct lang_hooks lang_hooks): New initialization.
8991
8992 2001-10-11  Per Bothner  <per@bothner.com>
8993
8994         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8995         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8996         The former is simpler, and jcf-write.c handles it better.
8997         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8998         or WITH_CLEANUP_EXPR.
8999         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
9000         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9001
9002         * parse.y (patch_if_else_statement):  If the condition is constant,
9003         optimize away the test.
9004
9005 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9006
9007         * parse.y (patch_cast): Call patch_string on the first operand of
9008         the incoming node, update it if necessary. Fixes PR java/4510.
9009
9010 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9011
9012         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9013         when name qualifier matches a package name.
9014
9015 2001-10-08  Tom Tromey  <tromey@redhat.com>
9016
9017         Fix for PR java/4489:
9018         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9019         force a new label when computing `body_block'.
9020
9021 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9022
9023         * jcf-io.c (format_uint): Const-ify.
9024         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9025         * lex.c (java_get_line_col): Likewise.
9026         * parse.y (build_incdec): Likewise.
9027
9028 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9029
9030         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9031         a NULL enclosing context if appropriate. Fixes PR java/4466.
9032
9033 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9034
9035         * parse.y (patch_assignment): Use lvalue's original TYPE when
9036         building the final COMPOUND_EXPR.
9037         (try_reference_assignconv): Fixed leading comment.
9038
9039 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9040
9041         * parse.y (check_final_variable_indirect_assignment): For
9042         COMPOUND_EXPR, return only if finals were found initialized
9043         properly, if not, keep on checking.
9044         (check_final_variable_global_assignment_flag): New local
9045         error_found, set when appropriate and used to decide whether to
9046         report uninitialized finals. Fixed typo in comment.
9047
9048 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9049
9050         * decl.c (init_decl_processing): Fixed typo in predef_filenames
9051         last three initializations. Fixes PR java/4360.
9052
9053 2001-09-21  Richard Henderson  <rth@redhat.com>
9054
9055         * class.c (get_dispatch_table): Handle function descriptors.
9056         (build_dtable_decl): Likewise.
9057         * expr.c (build_invokevirtual): Likewise.
9058
9059 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9060
9061         * parse.y (patch_method_invocation): Build class initialization
9062         when static finals are used to qualify method invocation.
9063         Fixes PR java/4366.
9064
9065 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
9066
9067         * parse.h: (WFL_STRIP_BRACKET): Re-written using
9068         build_type_name_from_array_name.
9069         (STRING_STRIP_BRACKETS): New macro.
9070         * parse.y (build_type_name_from_array_name): New function.
9071         (array_creation_expression:): Accumulate []s instead of [s.
9072         (cast_expression:): Accumulate []s instead of [s after cast type
9073         name.
9074         (build_array_from_name): Local string deleted, use
9075         build_type_name_from_array_name.
9076         (build_unresolved_array_type): Accumulate []s instead of [s after
9077         type name.
9078         (register_fields): Fixed comment.
9079         (resolve_class): Local name, base deleted, new locals tname and
9080         array_dims. Use build_type_name_from_array_name. Use array_dims to
9081         build array type.
9082         (purify_type_name): Use STRING_STRIP_BRACKETS.
9083
9084 2001-09-18  Andreas Jaeger  <aj@suse.de>
9085
9086         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9087         * jv-scan.c: Likewise.
9088
9089 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9090
9091         * parse.y (patch_method_invocation): Inner class creation context
9092         check not enforced within constructors. Fixes PR java/1873.
9093
9094 2001-09-16  Tom Tromey  <tromey@redhat.com>
9095
9096         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9097         NOTE_PUSH for single-case push.  Fixes PR java/4189.
9098
9099 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9100
9101         * java-tree.h (TYPE_IMPORT_LIST): New macro.
9102         (TYPE_IMPORT_DEMAND_LIST): Likewise.
9103         (struct lang_type): New fields import_list and import_demand_list.
9104         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9105         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9106         (do_resolve_class): New local saved_enclosing_type, initialized,
9107         passed as parameter to find_in_imports and find_in_imports_on_demand.
9108         (find_in_imports): Added paramater enclosing_type, use its
9109         TYPE_IMPORT_LIST when applicable.
9110         (find_in_imports_on_demand): Added parameter enclosing_type, use
9111         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9112         declaration and initialization.
9113         (fold_constant_for_init): Switch/restore current_class to the
9114         appropriate context.
9115
9116 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
9117
9118         * verify.c (verify_jvm_instructions): Fix typo.
9119
9120 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9121
9122         * expr.c (expand_invoke): Const-ification.
9123         * parse.y (patch_method_invocation): Likewise.
9124
9125 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9126
9127         * gjavah.c (cxx_keywords): Const-ification.
9128         * keyword.gperf (java_keyword): Likewise.
9129         * lang.c (java_tree_code_name): Likewise.
9130         * lex.c (cxx_keywords): Likewise.
9131         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9132
9133 2001-09-11  Richard Henderson  <rth@redhat.com>
9134
9135         * parse.h (ctxp_for_generation): Mark extern.
9136
9137 2001-09-10  Richard Henderson  <rth@redhat.com>
9138
9139         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9140
9141 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9142
9143         * typeck.c (java_array_type_length, build_prim_array_type):
9144         Represent empty arrays by NULL index.
9145
9146 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
9147
9148         * java-tree.h (compile_resource_file): Grouped with other prototypes.
9149         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9150
9151 2001-09-06  Anthony Green  <green@redhat.com>
9152
9153         * class.c (O_BINARY): Define if necessary.
9154         (registerResource_libfunc): Declare.
9155         (init_class_processing): Initilize registerResource_libfunc.
9156         (compile_resource_file): New function.
9157         * java-tree.h (resource_name): Declare.
9158         (compile_resource_file): Declare.
9159         * jcf-parse.c (yyparse): Handle compiling java resource files.
9160         * lang.c (java_decode_option): Handle -fcompile-resource option.
9161         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9162         resource files.
9163         * gcj.texi (Code Generation): Add documentation for -R flag.
9164
9165 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
9166
9167         * jcf-write.c (generate_classfile): Issue an error in case of
9168         field/initial value mismatch.
9169         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9170         being initialized and we're generating bytecode.
9171         (java_complete_lhs): In MODIFY_EXPR section: added comments,
9172         set DECL_INITIAL properly when appropriate.
9173         Fixes PR java/4230
9174         Fixes PR java/4204
9175
9176 2001-09-01  Per Bothner  <per@bothner.com>
9177
9178         * parse.y (maybe_yank_clinit):  A field without an initializer is not
9179         relevant.  All initializers except static final and constant require
9180         <clinit>, regardless of flag_emit_class_files.
9181
9182 2001-08-31  Per Bothner  <per@bothner.com>
9183
9184         * class.c (set_constant_value):  When not emitting class files, then a
9185         String ConstantValue is a utf8const_ptr_type.
9186
9187 2001-08-30  Per Bothner  <per@bothner.com>
9188
9189         * jcf-write.c (generate_classfile):  Check that field is primitive
9190         or string before emitting ConstantValue attribute.
9191
9192 2001-08-30  Per Bothner  <per@bothner.com>
9193
9194         * parse.y (resolve_qualified_expression_name):  If creating a
9195         COMPOUND_EXPR, set it's type correctly.
9196
9197 2001-08-30  Per Bothner  <per@bothner.com>
9198
9199         * jcf-io.c (open_class):  Set filename field.
9200
9201         * jcf-parse,c (parse_class_file):  Set current_function_decl
9202         for better error message when Code attribute is missing.
9203
9204         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9205         better diagnostics, especially for constructors.
9206
9207 2001-08-30  Per Bothner  <per@bothner.com>
9208
9209         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9210         attribute if field is not final, for compatibility with jdk.
9211
9212         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9213         to correct type.  Work-around for front-end bug.
9214         * class.c (set_constant_value):  Error if constant has wrong type.
9215
9216 2001-08-30  Per Bothner  <per@bothner.com>
9217
9218         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9219         "Double" are printed at verbosity 1.
9220
9221         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9222
9223         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9224
9225 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9226
9227         * parse.y (patch_assignment): Don't verify final re-assignment here.
9228         (java_complete_lhs): Verify assignments to finals calling
9229         patch_assignment. Verify re-assignments to finals before calling
9230         patch_assignment.
9231
9232 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9233
9234         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9235         Fixes PR java/1413
9236
9237 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9238
9239         * lex.c (java_lex): new local found_hex_digits. Set and then used
9240         in test to reject invalid hexadecimal numbers.
9241         * parse.y (java_complete_tree): Prevent unwanted cast with
9242         initialized floating point finals.
9243         (patch_binop): Emit a warning when detecting a division by zero,
9244         mark result not constant, don't simplify non integer division.
9245
9246 2001-08-28  Per Bothner  <per@bothner.com>
9247
9248         * jcf-write.c  (generate_bytecode_insns):  For increments and
9249         decrements just recurse to push constant.  Improvement on Mark's patch.
9250
9251 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9252
9253         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9254         real conversion for increments and decrements of reals.
9255
9256 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9257
9258         * parse.y (resolve_qualified_expression_name): Handle unresolved
9259         qualified expressions, prevent numerical qualifiers, fixed typo.
9260         Fixes PR java/4141
9261
9262 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9263
9264         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9265         don't report anything but deprecated class when marked so. Handle
9266         VAR_DECL.
9267         (patch_method_invocation): Check deprecation on methods and types.
9268         (patch_binop): code becomes an enum tree_code, added default: to
9269         switch to handle that. Detect division by zero, try to fold and
9270         return before using a subroutine.
9271
9272 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9273
9274         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9275         file smaller than 4 bytes.
9276         * parse.y (check_inner_circular_reference): New function.
9277         (check_circular_reference): Likewise.
9278         (array_initializer:): Accept {,}.
9279         (java_check_circular_reference): Rewritten using
9280         check_circular_reference and check_inner_circular_reference.
9281         (java_complete_expand_method): Unconditionally save and restore
9282         the unpurged exception list.
9283         (build_dot_class_method_invocation): Unmangle signature parameter.
9284
9285 2001-08-21  Tom Tromey  <tromey@redhat.com>
9286
9287         * decl.c (init_decl_processing): Add `throws' field to method
9288         descriptor.
9289         * class.c (make_method_value): Compute `throws' field for method.
9290
9291 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9292
9293         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9294         circularity is detected.
9295         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9296
9297 2001-08-17  Richard Henderson  <rth@redhat.com>
9298
9299         * class.c (emit_register_classes): Add align parameter to
9300         call to assemble_integer.
9301
9302 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9303
9304         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9305         loading a class_or_name fails, try considering an innerclass name
9306         and load the enclosing context.
9307         * parse.y (resolve_inner_class): New function.
9308         (find_as_inner_class): Added leading comment.
9309         (register_incomplete_type): Keep the current context as enclosing
9310         context for JDEP_FIELD dependencies.
9311         (do_resolve_class): Locals new_class_decl and super initialized to
9312         NULL. Call resolve_inner_class, explore the enclosing context
9313         superclass if necessary.
9314         Fixes PR java/4007
9315
9316 2001-08-16  Tom Tromey  <tromey@redhat.com>
9317
9318         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9319         * gjavah.c (main): Updated for change to jcf_path_seal.
9320         * lang.c (version_flag): New global.
9321         (java_decode_option): Recognize `-version'.
9322         (java_init): Update for change to jcf_path_seal.
9323         * jcf.h (jcf_path_seal): Added `print' argument.
9324         * jcf-path.c (jcf_path_seal): Added `print' argument.
9325
9326 2001-08-13  Zack Weinberg  <zackw@panix.com>
9327
9328         * Make-lang.in (java/decl.o): Update dependencies.
9329         * decl.c: Include libfuncs.h, don't include toplev.h.
9330
9331 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9332
9333         * decl.c (init_decl_processing): exception_type_node,
9334         class_not_found_type_node, and no_class_def_found_type_node
9335         initialized. predef_filenames augmented accordingly.
9336         instinit_identifier_node initialized.
9337         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9338         * java-tree.h (enum java_tree_index): New entries
9339         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9340         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9341         (exception_type_node): New macro.
9342         (class_not_found_type_node): Likewise.
9343         (no_class_def_found_type_node): Likewise.
9344         (instinit_identifier_node): Likewise.
9345         (PREDEF_FILENAMES_SIZE): Adjusted.
9346         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9347         (struct lang_type): Fixed typo in bitfield name.
9348         (DECL_INSTINIT_P): New macro.
9349         (ID_INSTINIT_P): Likewise.
9350         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9351         attribute.
9352         * parse.y (encapsulate_with_try_catch): New function.
9353         (generate_instinit): Likewise.
9354         (build_instinit_invocation): Likewise.
9355         (ctors_unchecked_throws_clause_p): Likewise.
9356         (add_instance_initializer): Deleted.
9357         (build_instance_initializer): Likewise.
9358         (in_instance_initializer): Likewise.
9359         (check_method_redefinition): instinit$ not to be verified.
9360         (java_complete_expand_methods): Generate instinit$, simplified code.
9361         (build_dot_class_method): Eliminated unnecessary locals. Use
9362         encapsulate_with_try_catch, removed unnecessary code.
9363         (fix_constructors): New local iii. Use build_instinit_invocation.
9364         (patch_method_invocation): Added comment.
9365         (maybe_use_access_method): Don't consider instinit$.
9366         (find_applicable_accessible_methods_list): Shorten the search for
9367         instinit$ too.
9368         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9369         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9370         (patch_throw_statement): Likewise. Fixed typo.
9371
9372 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9373
9374         Revert:
9375         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9376         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9377         ASM_FINAL_SPEC.
9378         (lang_specific_pre_link): Use set_input to set input_filename.
9379         Append `main' here.
9380         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9381         (main): Fix definition.
9382         Strip `main' from classname.
9383         Fixes PR java/227.
9384
9385 2001-08-11  Zack Weinberg  <zackw@panix.com>
9386
9387         * lex.h: Don't include setjmp.h.  Don't define
9388         SET_FLOAT_HANDLER or prototype set_float_handler.
9389
9390 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9391
9392         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9393         `poplevel' in the right order.
9394
9395 2001-08-09  Richard Henderson  <rth@redhat.com>
9396
9397         * Make-lang.in (class.o): Depend on TARGET_H.
9398         * class.c (emit_register_classes): Use target hooks instead of
9399         assemble_constructor and assemble_destructor.
9400
9401 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9402
9403         * check-init.c (flags.h): Include
9404         (check_init): Don't report uninitialized static class
9405         initialization flags, don't free bit index when doing static class
9406         initialization optimization.
9407         (check_for_initialization): Return type changed to `unsigned int.'
9408         (attach_initialized_static_class): New function.
9409         * class.c (add_method_1): Create the initialized static class
9410         table if necessary.
9411         (finish_class): Always emit deferred inline methods.
9412         * decl.c (emit_init_test_initialization): Moved to expr.c
9413         (complete_start_java_method): Don't traverse
9414         DECL_FUNCTION_INIT_TEST_TABLE.
9415         (lang_mark_tree): Mark hash tables in function decls.
9416         * expr.c (emit_init_test_initialization): Moved from decl.c.
9417         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9418         initialization flag, set DECL_CONTEXT and
9419         LOCAL_CLASS_INITIALIZATION_FLAG.
9420         (java_lang_expand_expr): Emit initialization code for static class
9421         initialized flags when entering block, if necessary.
9422         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9423         * java-tree.h (flag_optimize_sci): New global variable declaration.
9424         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9425         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9426         (LOCAL_FINAL_P): Fixed typo in comment.
9427         (FINAL_VARIABLE_P): Likewise.
9428         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9429         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9430         (struct lang_decl): New fields `ict', `smic' and `cif.'
9431         (check_for_initialization): New returned value for global.
9432         (attach_initialized_static_class): New global function.
9433         (STATIC_CLASS_INIT_OPT_P): New macro.
9434         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9435         * lang.c (java_decode_option): Handle
9436         `-fno-optimize-static-class-initialization'
9437         * parse.y (start_complete_expand_method): New function.
9438         (java_expand_method_bodies): Likewise.
9439         (attach_init_test_initialization_flags): Likewise.
9440         (adjust_init_test_initialization): Likewise.
9441         (emit_test_initialization): Likewise.
9442         (java_complete_expand_methods): Nullify abstract and native method
9443         bodies.
9444         (java_complete_expand_method): New locals `fbody', `block_body'
9445         and `exception_copy.' Reorganized: directly return on empty method
9446         bodies, call `start_complete_expand_method', remember definitely
9447         initialized static class in function, don't expand method bodies.
9448         (java_expand_classes): Call `java_expand_method_bodies' before
9449         `finish_class' when compiling to native.
9450         (resolve_expression_name): Use `orig' after building outer class
9451         field access.
9452         (patch_invoke): Remember static method invocations.
9453
9454 2001-08-06  Richard Henderson  <rth@redhat.com>
9455
9456         * class.c (emit_register_classes): Pass a symbol_ref and priority
9457         to assemble_constructor.
9458
9459 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9460
9461         * java-tree.h (all_class_filename): New macro.
9462         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9463         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9464         newly created IDENTIFIER_NODE to `all_class_filename.'
9465
9466 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9467
9468         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9469         Use ggc_add_tree_root to register roots.
9470
9471 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9472
9473         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9474         second operand calling check_init.
9475         * decl.c (complete_start_java_method): Swaped second and third
9476         arguments while creating WITH_CLEANUP_EXPR node.
9477         * jcf-write.c (generate_bytecode_insns): Use second operand
9478         instead of third when handling WITH_CLEANUP_EXPR.
9479         * parse.y (java_complete_lhs): Expand second operand of
9480         WITH_CLEANUP_EXPR nodes.
9481         (patch_synchronized_statement): Swaped second and third arguments
9482         while creating WITH_CLEANUP_EXPR node.
9483
9484 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9485
9486         * parse.y (create_interface): Avoid cyclic inheritance report when
9487         syntax error encountered during class definition.
9488         Fixes PR java/2956
9489
9490 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9491
9492         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9493         ASM_FINAL_SPEC.
9494         (lang_specific_pre_link): Use set_input to set input_filename.
9495         Append `main' here.
9496         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9497         (main): Fix definition.
9498         Strip `main' from classname.
9499         Fixes PR java/227.
9500
9501 2001-07-18  Tom Tromey  <tromey@redhat.com>
9502
9503         For PR java/2812:
9504         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9505         * lex.c (java_new_lexer): Use ICONV_CONST.
9506         (java_read_char): Likewise.
9507         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9508         (jv-scan$(exeext)): Likewise.
9509
9510 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9511
9512         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9513         * parse.y (check_class_interface_creation): Allow `private' if the
9514         enclosing is not an interface.
9515         (create_interface): Interface tagged public if the enclosing
9516         context is an interface.
9517         (create_class): Class tagged public if the enclosing context
9518         is an interface.
9519         Fixes PR java/2959
9520
9521 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9522
9523         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9524         Fixes PR java/2665
9525
9526 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9527
9528         * check-init.c (check_init): Remove references to EXPON_EXPR.
9529
9530 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9531
9532         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9533         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9534         Fixes PR java/3602
9535
9536 2001-07-13  Tom Tromey  <tromey@redhat.com>
9537
9538         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9539         invocation.
9540
9541 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9542
9543         * parse.y (patch_method_invocation): Don't override primary if one
9544         is already provided, but let this$<n> be built. Fixed comment.
9545
9546 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9547
9548         * parse.y (empty_statement:): Report empty statement error only
9549         when found at class declaration level.
9550         Fixes PR java/3635
9551
9552 2001-07-12  Tom Tromey  <tromey@redhat.com>
9553
9554         * expr.c (expand_load_internal): New function.
9555         (LOAD_INTERNAL): Use it.
9556
9557 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9558
9559         * parse.y (verify_constructor_super): Compare anonymous class ctor
9560         args with `valid_method_invocation_conversion_p.'
9561         Fixes PR java/3285
9562
9563 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9564
9565         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9566         `-fsyntax-only.' Fixes PR java/3248
9567
9568 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9569
9570         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9571
9572 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9573
9574         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9575         current function is static. Fixes PR java/1970
9576
9577 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9578
9579         * parse.y (patch_method_invocation): Add enclosing context to ctor
9580         calls if necessary. Fixes PR java/2953
9581
9582 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9583
9584         * parse.y (resolve_package): Abort if qualified expression member
9585         isn't right.
9586         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9587         Fixes PR java/1391
9588
9589 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9590
9591         * verify.c: Don't use // comments.
9592
9593 2001-07-05  Tom Tromey  <tromey@redhat.com>
9594
9595         * lang.c (flag_assume_compiled): Removed.
9596         * java-tree.h (flag_assume_compiled): Removed.
9597         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9598         -fhash-synchronization, -fuse-divide-subroutine,
9599         -fcheck-references, -femit-class-file, -femit-class-files,
9600         -fassume-compiled.  Updated --encoding information.  Changed
9601         -foutput-class-dir to `-d'.
9602
9603 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9604
9605         * jcf-parse.c (parse_class_file): Add lineno parameter to
9606         debug_start_source_file call.
9607
9608 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9609
9610         * gcj.texi: Use gpl.texi.
9611         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9612         dependencies and use doc/include in search path.
9613
9614 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9615
9616         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9617         `this'.  If so, don't build instance initializers.
9618
9619 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9620
9621         * parse.y (resolve_expression_name): Improved error message for
9622         inner class cases. Fixes PR java/1958
9623
9624 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9625
9626         * lang.c: #include diagnostic.h
9627         (lang_print_error): Add a `diagnostic_context *' parameter.
9628         (java_dummy_print): Likewise.
9629         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9630
9631 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9632
9633         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9634         * jcf.h (typedef struct JCF): New bitfield `finished.'
9635         (JCF_FINISH): Set `finished.'
9636         (JCF_ZERO): Reset `finished.'
9637         Fixes PR java/2633
9638
9639 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9640
9641         * parse.y (class_body_declaration:): Don't install empty instance
9642         initializers.
9643         Fixes PR java/1314
9644
9645 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9646
9647         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9648         (set_class_decl_access_flags): New function.
9649         * java-tree.h (set_class_decl_access_flags): New prototype.
9650         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9651         (parse_class_file): New local `decl_max_locals.' Take wide types
9652         into account to compute DECL_MAX_LOCALS.
9653         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9654         imports on demand.
9655
9656 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9657
9658         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9659
9660 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9661
9662         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9663         * parse.y (do_resolve_class): Moved comments out to leading comment
9664         section. Removed local `start', New local `_ht' and
9665         `circularity_hash.'  Record `enclosing' in hash table and search
9666         it to detect circularity.  Use `enclosing' as an argument to
9667         `lookup_cl.' Free the hash table when done.
9668
9669 2001-06-19  Tom Tromey  <tromey@redhat.com>
9670
9671         * lex.c (java_read_char): Disallow invalid and overlong
9672         sequences.  Fixes PR java/2319.
9673
9674 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9675
9676         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9677
9678 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9679
9680         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9681         arguments accordingly.
9682
9683 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9684
9685         * gcj.texi: Move contents to just after title page.
9686
9687 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9688
9689         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9690         builtin type.
9691         (patch_incomplete_class_ref): Build the class ref, build the class
9692         init if necessary, complete the tree.
9693         Fixes PR java/2605
9694
9695 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9696
9697         * parse.y (lookup_field_wrapper): Test `name' code.
9698         (resolve_qualified_expression_name): Test `qual_wfl' code.
9699         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9700         handle `qual_wfl' by code.
9701         (maybe_build_primttype_type_ref): Test `wfl' code.
9702
9703 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9704
9705         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9706         fdl.texi.
9707         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9708         the dvi file in the java directory.
9709
9710 2001-05-25  Sam TH  <sam@uchicago.edu>
9711
9712         * gen-table.pl javaop.h jcf.h lex.h,
9713         parse.h: Fix header include guards.
9714
9715 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9716
9717         * jv-scan.c (version): Update copyright year.
9718
9719 2001-05-21  Per Bothner  <per@bothner.com>
9720
9721         * jcf-parse.c (read_class):  If class is from .class or .zip file
9722         and it's already been read, don't push/pop parser context.
9723
9724 2001-05-18  Per Bothner  <per@bothner.com>
9725
9726         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9727         command line so the jvgenmain-generated main program comes first.
9728
9729 2001-05-15  Tom Tromey  <tromey@redhat.com>
9730
9731         * class.c (build_utf8_ref): Don't generate identifier based on
9732         utf8const contents.
9733
9734 2001-05-12  Richard Henderson  <rth@redhat.com>
9735
9736         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9737         * expr.c (java_lang_expand_expr): Expand it.
9738         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9739         calling build_exception_object_ref.
9740         * parse.y (catch_clause_parameter): Likewise.
9741         (build_dot_class_method): Likewise.
9742         (try_reference_assignconv): Likewise.
9743         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9744         * jcf-write.c (generate_bytecode_insns): Likewise.
9745
9746 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9747
9748         * parse.y (build_unresolved_array_type): Set
9749         EXPR_WFL_QUALIFICATION on the newly created wfl.
9750         Fixes PR java/2538. Fixes PR java/2535.
9751
9752 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9753
9754         * parse.y (fix_constructors): Removed unnecessary assignment to
9755         local. Moved assignment to `this$<n>', fixed comments and
9756         indentation.
9757         (build_wfl_wrap): Fixed indentation.
9758         Fixes PR java/2598, java/2579 and java/2658.
9759
9760 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9761
9762         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9763         check for byte swap.
9764
9765 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9766
9767         * expr.c (build_class_init): Move MODIFY_EXPR
9768         outside of COND_EXPR.  Remove variable `call'.
9769
9770 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9771
9772         * decl.c: NULL_PTR -> NULL.
9773         * jcf-write.c: Likewise.
9774
9775 2001-05-01  Tom Tromey  <tromey@redhat.com>
9776
9777         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9778         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9779         * gcj.texi: Updated copyright text.  Include fdl.texi.
9780         (Top): Link to new node.
9781
9782 2001-05-01  Per Bothner  <per@bothner.com>
9783
9784         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9785
9786 2001-05-01  Per Bothner  <per@bothner.com>
9787
9788         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9789         import_list contains the name, not the TREE_PURPOSE.
9790
9791 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9792
9793         * jcf-io.c (read_zip_member): Cast to long in comparison with
9794         signed value.
9795
9796         * jvspec.c (lang_specific_driver): Initialize variables.
9797
9798         * mangle.c (find_compression_record_match): Likewise.
9799
9800         * typeck.c (build_null_signature): Provide static prototype.  Mark
9801         parameter with ATTRIBUTE_UNUSED.
9802
9803         * verify.c (verify_jvm_instructions): Initialize variable.
9804
9805 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9806
9807         * parse.y (do_resolve_class): Check for cyclic inheritance during
9808         inner class resolution.
9809
9810 2001-04-27  Per Bothner  <per@bothner.com>
9811
9812         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9813         while iterating, since that could cause gc to lose stuff.
9814
9815 2001-04-26  Per Bothner  <per@bothner.com>
9816
9817         Fix method search wrt scope of inner classes to match JLS2.
9818         * typeck.c (build_null_signature):  New static function.
9819         (has_method):  New function.  Uses build_null_signature and lookup_do.
9820         * java-tree.h (has_method):  New declaration.
9821         * parse.y (find_applicable_accessible_methods_list):  Do not search
9822         context of inner classes here.
9823         (patch_method_invocation):  Search scope, ie. current and outer clases,
9824         for method matching simple name, to find class.
9825
9826 2001-04-26  Per Bothner  <per@bothner.com>
9827
9828         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9829         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9830
9831         * constants.c (find_methodref_with_class_index):  New function.
9832         (find_methodref_index):  Use find_methodref_with_class_index.
9833         * java-tree.h (find_methodref_with_class_index):  New declaration.
9834         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9835         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9836         If context changed from interface to class, don't use invokeinterface.
9837
9838 2001-04-25  Per Bothner  <per@bothner.com>
9839
9840         * verify.c (verify_jvm_instructions):  For field instructions,
9841         check that field index is valid.  For invoke instructions, check that
9842         method index is valid.
9843
9844 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9845
9846         * config-lang.in (target_libs): Copy from $libgcj_saved.
9847
9848 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9849
9850         * decl.c (init_decl_processing): Add new class "protectionDomain"
9851         field.
9852         * class.c (make_class_data): Set initial value for "protectionDomain".
9853
9854 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9855
9856         * jvspec.c (lang_specific_driver): Fix memory allocation
9857         deficit, by using concat in lieu of xmalloc/sprintf.
9858
9859 2001-04-20  Per Bothner  <per@bothner.com>
9860
9861         Fixes to compile multiple .class files at once.
9862         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9863         * java-tree.h (CLASS_PARSED_P):  New macro.
9864         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9865         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9866         (read_class):  Avoid some code duplication.
9867         Don't call JCF_FINISH for a .class file - might be needed later.
9868         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9869         rather than CLASS_LOADED_P, since latter implies class laid out.
9870         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9871         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9872
9873 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9874
9875         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9876
9877         * boehm.c: Include toplev.h.
9878
9879 2001-04-06  Tom Tromey  <tromey@redhat.com>
9880             Alexandre Petit-Bianco  <apbianco@redhat.com>
9881
9882         Fix for PR gcj/1404 and PR gcj/2332:
9883         * parse.y (build_array_from_name): If we use the type_wfl then
9884         accumulate dimensions from the original type as well.
9885         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9886
9887 2001-04-06  Tom Tromey  <tromey@redhat.com>
9888
9889         * parse.y (analyze_clinit_body): Return true if the second operand
9890         of a METHOD_EXPR is nonzero.
9891
9892 2001-04-06  Tom Tromey  <tromey@redhat.com>
9893
9894         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9895         directory.
9896         ($(srcdir)/java/parse.c): Likewise.
9897
9898 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9899
9900         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9901         (version-gcc): Initialized.
9902         (which-gcj): Likewise.
9903
9904 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9905
9906         * java-tree.h (struct lang_decl): New macro
9907         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9908         * parse.y (build_instance_initializer): New function.
9909         (add_instance_initializer): Use it.
9910         (java_fix_constructors): Set `current_class' before fix pass.
9911         (fix_constructors): Just return if already fixed. Move `super()'
9912         invocation ahead. Use `build_instance_initializer.'
9913         Fixes PR java/1315.
9914
9915 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9916
9917         * parse.y (resolve_qualified_expression_name): Pass field's
9918         DECL_CONTEXT to `not_accessible_p.'
9919         (not_accessible_p): Changed parameters order in `inherits_from_p'
9920         invocation.
9921
9922 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9923
9924         * lang-options.h: Add flag_check_references.
9925
9926 2001-04-04  Per Bothner  <per@bothner.com>
9927
9928         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9929         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9930         * parse.y (maybe_build_class_init_for_field):  New static function.
9931         (resolve_expression_name, resolve_field_access):  Use
9932         maybe_build_class_init_for_field instead of build_class_init
9933         This does not do the init if the field is compile-time-constant.
9934         (resolve_field_access):  Simplify.
9935
9936         * parse.y (fold_constant_for_init):  Merge test into switch.
9937
9938 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9939
9940         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9941         on gansidecl.h.
9942         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9943
9944 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9945
9946         * expr.c (pop_type_0): Save the result of the first
9947         lang_printable_name call in a scratch buffer, so it
9948         won't be clobbered by the second call.
9949
9950 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9951
9952         * parse-scan.y (array_type:): Rewritten.
9953         (type_declaration:): `empty_statement' replaces `SC_TK.'
9954         (class_member_declaration:): `empty statement' added.
9955         (method_body:): Simplified.
9956         (static_initializer:): Likewise.
9957         (primary_no_new_array:): Use `type_literals.'
9958         (type_literals:): New rule.
9959         (dims:): Set and update `bracket_count.'
9960         Fixes PR java/1074. Fixes PR java/2412.
9961
9962 2001-03-28  Hans Boehm  <boehm@acm.org>
9963
9964         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9965         (get_boehm_type_descriptor): Set type on returned value to be a
9966         pointer length integer.
9967
9968 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9969
9970         * expr.c (pop_type_0): Call `concat' rather than building the
9971         string manually.
9972         (pop_type): Add format specifier in call to `error'.
9973
9974         * parse.y (patch_method_invocation): Avoid casting away
9975         const-ness.
9976
9977 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9978
9979         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9980
9981 2001-03-28  Richard Henderson  <rth@redhat.com>
9982
9983         IA-64 ABI Exception Handling:
9984         * Make-lang.in (except.o): Don't depend on eh-common.h.
9985         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9986         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9987         [soft_exceptioninfo_call_node]: Remove.
9988         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9989         (end_java_method): No emit_handlers.
9990         * except.c (java_set_exception_lang_code): Remove.
9991         (method_init_exceptions): Don't call it.
9992         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9993         (build_exception_object_ref): New.
9994         (expand_end_java_handler): Update for except.h name changes.
9995         (emit_handlers, expand_resume_after_catch): Remove.
9996         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9997         (process_jvm_instruction): Use build_exception_object_ref.
9998         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9999         (soft_exceptioninfo_call_node): Remove.
10000         (build_exception_object_ref): Declare.
10001         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10002         soft_exceptioninfo_call_node.  Move processing ...
10003         [EXC_PTR_EXPR]: ... here.
10004         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10005         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10006         (source_end_java_method): No java_set_exception_lang_code or
10007         emit_handlers.
10008         (build_dot_class_method): Use build_exception_object_ref.
10009         (try_reference_assignconv): Check EXC_PTR_EXPR not
10010         soft_exceptioninfo_call_node.
10011
10012 2001-03-28  Richard Henderson  <rth@redhat.com>
10013
10014         * java-tree.h (throw_node): Define as a single member of
10015         java_global_trees instead of a separate array.
10016         (JTI_THROW_NODE): New.
10017         * decl.c (throw_node): Don't declare.
10018         (init_decl_processing): Init a scalar throw_node.
10019         Don't register it for gc.
10020         * check-init.c (check_init): Reference scalar throw_node.
10021         * expr.c (build_java_athrow): Likewise.
10022         * jcf-write.c (generate_bytecode_insns): Likewise.
10023         * parse.h (BUILD_THROW): Likewise.
10024
10025 2001-03-28  Richard Henderson  <rth@redhat.com>
10026
10027         * decl.c (end_java_method): Do not save and restore
10028         flag_non_call_exceptions.
10029         * parse.y (source_end_java_method): Likewise.
10030         * lang.c (flag_exceptions): Don't declare.
10031         (java_init_options): Set flag_non_call_exceptions.  Set
10032         flag_exceptions here ...
10033         (java_init): ... not here.
10034
10035 2001-03-27  Richard Henderson  <rth@redhat.com>
10036
10037         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10038         exceptions_via_longjmp.
10039
10040         * lang.c (flag_new_exceptions): Don't declare it.
10041         (java_init_options): Or set it.
10042
10043 2001-03-27  Richard Henderson  <rth@redhat.com>
10044
10045         * decl.c (end_java_method): Rename asynchronous_exceptions to
10046         flag_non_call_exceptions.
10047         * parse.y (source_end_java_method): Likewise.
10048
10049 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10050
10051         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10052
10053 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10054
10055         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10056
10057 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10058
10059         * parse.y (find_as_inner_class): Follow current package
10060         indications not to mistakingly load an unrelated class.
10061
10062 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10063
10064         * constants.c (PUTN): Use memcpy, not bcopy.
10065
10066         * lex.c (java_read_char): Use memmove, not bcopy.
10067
10068         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10069
10070 2001-03-23  Per Bothner  <per@bothner.com>
10071
10072         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
10073         macro for better error pin-pointing.
10074         * java-tree.h:  Fix typo in comment.
10075
10076         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
10077         Don't include jsr/goto in exception range.
10078         Check if start and end of exception range are the same (also TRY_EXPR).
10079         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10080         However, do emit the following goto even if try_block is empty.
10081         Defer freeing exception_decl until after the finalizer, to make
10082         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
10083
10084         * parse.y (java_complete_lhs):  If the try-clause is empty, just
10085         return the finally-clause and vice versa.
10086
10087 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10088
10089         * gcj.texi (Input Options): documented the check for attribute
10090         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10091         * java-tree.h (flag_force_classes_archive_check): Declared extern.
10092         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10093         (jcf_parse): Check for the right classes archive if necessary.
10094         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10095         (jcf_parse_fields): Fixed indentation.
10096         * jcf-write.c (append_gcj_attribute): New function.
10097         (generate_classfile): Compute the attribute count, invoke
10098         `append_gcj_attribute'.
10099         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10100         turned into bit-fields. New bit-field `right_zip.'
10101         (JCF_ZERO): Set `right_zip' to zero.
10102         * lang-options.h (-fforce-classes-archive-check): Added flag.
10103         * lang.c (flag_force_classes_archive_check): New flag.
10104         (lang_f_options): New entry `force-classes-archive-check.'
10105         Fixes PR java/1213.
10106
10107 2001-02-07  Andrew Haley  <aph@redhat.com>
10108
10109         * gcj.texi (Configure-time Options): Add -fcheck-references.
10110         * expr.c (build_java_indirect_ref): New function.
10111         (java_check_reference): New function.
10112         (build_java_array_length_access): Use build_java_indirect_ref to
10113         check for null references.
10114         (build_java_arrayaccess): Likewise.
10115         (build_get_class): Likewise.
10116         (build_field_ref): Likewise.
10117         (invoke_build_dtable): Likewise.
10118         (build_invokeinterface): Likewise.
10119         * lang.c (lang_f_options): Add flag_check_references.
10120         * jvspec.c (jvgenmain_spec): Add flag_check_references.
10121         * java-tree.h (flag_check_references): New variable.
10122         * lang.c (flag_check_references): Likewise.
10123         * parse.y (patch_invoke): Use java_check_reference.
10124         (patch_assignment): Allow for extra nesting in
10125         _Jv_CheckArrayStore.
10126
10127 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
10128
10129         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10130         * lex.c (cxx_keywords): Likewise.
10131
10132 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10133
10134         * parse.y (qualify_ambiguous_name): Broaden `length'
10135         recognition. Help MODIFY_EXPR be resolved as expression names.
10136         Fixes PR java/2066. Fixes PR java/2400.
10137
10138 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
10139
10140         * gjavah.c (process_file): Mark interface definitions with
10141         "__attribute__ ((java_interface))".
10142
10143 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10144
10145         * class.c (layout_class): Fixed push_super_field's second
10146         argument. Fixes PR java/2333.
10147         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10148         too early to lay innerclasses out.
10149
10150 2001-03-20  Tom Tromey  <tromey@redhat.com>
10151             Alexandre Petit-Bianco <apbianco@redhat.com>
10152
10153         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10154         inside an array reference. Insertion of the array store check
10155         rewritten. Fixes PR java/2299.
10156
10157 2001-03-20  Tom Tromey  <tromey@redhat.com>
10158
10159         * lex.c (java_read_unicode): Only accept leading `u's.
10160
10161 2001-03-20  Tom Tromey  <tromey@redhat.com>
10162
10163         * jcf-parse.c (read_class): Initialize `class'.
10164
10165 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10166
10167         * jcf_parse.c (jcf_parse): Eliminate unused variable.
10168
10169 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10170
10171         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10172         (layout_class): Likewise.
10173         (layout_class_method): Likewise.
10174         (emit_register_classes): Likewise.
10175         * decl.c (builtin_function): Likewise.
10176         (give_name_to_locals): Likewise.
10177
10178 2001-03-19  Per Bothner  <per@bothner.com>
10179
10180         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
10181         before trying to load an inner class.
10182
10183         Fixes to process to command-line .class files in two passes.
10184         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
10185         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
10186         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
10187         * class.c (is_compiled_class):  Fix for renamed flag.
10188         * parse.y (maybe_create_class_interface_decl):  Likewise.
10189         * jcf-parse.c (yyparse):  Also set if compiling .class files.
10190         * jcf-parse.c (read_class);  Read current_class.
10191         (jcf_parse):  Make static.
10192         (load_inner_classes):  New function, with code moved from jcf_parse,
10193         because we need to inner classes after the command-line files are read.
10194         (yyparse):  Set finput to NULL when it doesn't need to be closed.
10195         Reduce use of main_jcf (basically only for archive) and
10196         use finput instead of main_jcf->read_state.
10197         Inline jcf_figure_file_type into yyparse.
10198         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10199         Defer load_inner_classes and parse_class_file to a second pass,
10200         after we've correctly mapped command-line .clas fiels to classes.
10201         (jcf_figure_file_type):  Removed.
10202         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10203         (JCF_ZERO):  Also clear zipd field.
10204         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10205
10206 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10207
10208         * jcf-parse.c (yyparse): Change ch from char * to char.
10209
10210 2001-03-19  Per Bothner  <per@bothner.com>
10211
10212         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10213         Add constructed filelist-file at end, following -xjava.  Thus any .o
10214         and library files are not affected by the -xjava.  Also wrap
10215         explicit @FILE with -xjava and -xnone.
10216
10217 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10218
10219         * class.c (build_static_field_ref): Call make_decl_rtl() after
10220         setting the DECL_EXTERNAL flag.
10221
10222 2001-03-17  Per Bothner  <per@bothner.com>
10223
10224         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10225
10226         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10227         when result is is needed (target is STACK_TARGET).
10228
10229         * parse.h (JDEP_SOLV):  Removed.
10230         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10231
10232         * parse.y (incomplete_class_list): Removed.
10233         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10234         It doesn't work if resolve_class changes the name of an array type
10235         that is on the list and then someone else looks for the modified name.
10236         Also, seems liable to break when compiling multiple source files at
10237         once.  So the simplest is to just remove incomplete_class_list -
10238         it is only a minor space win and it is not even clear it saves time.
10239
10240         * parse.y (resolve_class):  Remove unneeded promote_type.
10241
10242 2001-03-15  Per Bothner  <per@bothner.com>
10243
10244         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10245         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10246         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10247         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10248
10249         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10250         * parse.y (java_expand_classes):  Likewise.
10251
10252         * parse.y (expand_start_java_method):  Was only called once and had a
10253         misleading name, so inline in caller java_complete_expand_method.
10254         (enter_a_block):  Likewise inline in enter_block and remove.
10255
10256         Remove junk from when gcc/java was created (by copying from C/C++).
10257         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10258         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10259         more_cleanups_ok, have_cleanups (which have never been used).
10260         (pushlevel, poplevel):  Remove related useless code.
10261
10262         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10263         vtable for Class) should be external, except when compiling Class.
10264
10265         * jvspec.c (lang_specific_driver):  Fix -C handling.
10266         Check -save-temps to see if temp @FILE should be deleted.
10267         Follow-up to/fix for February 16 patch.
10268
10269         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10270         (type_stack_dup):  Remove no-longer neded error check.
10271
10272 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10273
10274         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10275         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10276         don't surround the element with 'N..E' if the type name is
10277         unqualified.
10278
10279 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10280
10281         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10282         DECL_RTL_SET_P, etc.
10283         (make_method_value): Likewise.
10284         (get_dispatch_table): Likewise.
10285
10286         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10287
10288 2001-03-07  Tom Tromey  <tromey@redhat.com>
10289
10290         * config-lang.in (lang_requires): Define.
10291
10292 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10293
10294         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10295         not flag_fast_math.
10296
10297 2001-03-05  Per Bothner  <per@bothner.com>
10298
10299         Fix a problem where rest_of_decl_compilation applied to
10300         class_dtable_decl causes problems because it was done too early,
10301         before output file was opened.
10302         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10303         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10304         (make_class_data):  Define class_dtable_decl.
10305         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10306
10307 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10308
10309         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10310         uses of 'boolean' with 'bool'.
10311
10312 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10313
10314         * lang-specs.h: Add zero initializer for cpp_spec field to all
10315         array elements.
10316
10317 2001-02-16  Per Bothner  <per@bothner.com>
10318
10319         Handle compiling multiple input files at once, and @FILE syntax.
10320         * gcj.texi:  Updated documentation to match.
10321         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10322         * jcf-parse.c (parse_source_file):  Split into ...
10323         (parse_source_file_1):  New function - and:
10324         (parse_source_file_2):  New function.
10325         (yyparse):  On -ffilelist-file, open and scan named file.
10326         On first pass over files, only do parse_source_file_1.
10327         A new second pass calls parse_source_file_2 for each file to compile.
10328         (init_jcf_parse):  Call init_src_parse.
10329         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10330         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10331         as multiple input file combined in one compilation.
10332         * lang-options.h:  Add -ffilelist-file
10333         * lang.c (flag_filelist_file):  New flag variable.
10334         (lang_f_options):  Handle -ffilelist-file.
10335         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10336         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10337         gclass_list - use global fields of src_parse_roots instead.
10338         * parse.y (src_parse_roots):  New array.
10339         (incomplete_class_list, gclass_list):  New macros.
10340         (push_parser_context, java_pop_parser_context,
10341         java_parser_context_resume):  Don't fiddle with deleted fields.
10342         (various):  Use incomplete_class gclass_list and global macros
10343         instead of parse_ctxt fields - the lists are global.
10344         (init_src_parse):  New function.
10345
10346 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10347
10348         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10349
10350 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10351
10352         * parse.y (check_inner_class_access): Moved declaration of local
10353         `enclosing_decl_type' to the right location.
10354
10355 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10356
10357         * parse.y (parser_check_super_interface): Don't call
10358         check_pkg_class_access for an inner interface.
10359         (parser_check_super): Don't call check_pkg_class_access for inner
10360         class.
10361         (do_resolve_class): Simplify enclosing type loop. Don't call
10362         check_pkg_class_access if CL and DECL are not set.
10363         (find_in_imports_on_demand): Set DECL if class_type needed to be
10364         loaded. Don't call check_pkg_class_access for an inner class.
10365         (check_inner_class_access): Rewritten to implement member access
10366         rules as per spec 6.6.1.
10367         (check_pkg_class_access): Handle the empty package correctly.
10368         (in_same_package): New function. Determine if two classes are in the
10369         same package.
10370
10371 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10372
10373         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10374         method into array types.
10375         * parse.y (patch_method_invocation): Bypass access check on clone call
10376         to array instance.
10377
10378 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10379
10380         * expr.c (build_instanceof): Check for arrays when trying fold to
10381         false.
10382
10383 2001-02-15  Jim Meyering  <meyering@lucent.com>
10384
10385         * Make-lang.in (java.install-common): Depend on `installdirs'.
10386         (java.install-info): Likewise.
10387
10388 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10389
10390         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10391
10392 2001-02-14  Tom Tromey  <tromey@redhat.com>
10393             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10394
10395         Fix for PR java/1261.
10396         * typeck.c (build_java_array_type): Add public `clone' method to
10397         arrays.
10398         * parse.y (resolve_qualified_expression_name): Use current_class
10399         when checking for inaccessibility.
10400         (patch_method_invocation): Fixed error message when accessibility
10401         denied.  Added `from_super' argument.
10402
10403 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10404
10405         * parse.y (resolve_class): Don't build a fake decl. Use the one
10406         already built.
10407         * typeck.c (build_java_array_type): Build and assign decl to array
10408         type.
10409
10410 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10411
10412         * parse.y (not_accessible_p): Changed leading comment. Added extra
10413         `where' argument. Use it to enforce protected access rules.
10414         (resolve_qualified_expression_name): Added extra argument to
10415         not_accessible_p.
10416         (patch_method_invocation): Use argument `primary' to provide
10417         not_accessible_p with an extra argument.
10418         (lookup_method_invoke): Added extra argument to not_accessible_p.
10419         (search_applicable_method_list): Likewise.
10420
10421 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10422
10423         * parse.y (resolve_qualified_expression_name): Try to resolve as
10424         an inner class access only if `decl' is a TYPE_DECL.
10425
10426 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10427
10428         * decl.c (classdollar_identifier_node): Initialize.
10429         * java-tree.h (enum java_tree_index): New entry
10430         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10431         (classdollar_identifier_node): New macro.
10432         (ID_CLASSDOLLAR_P): Likewise.
10433         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10434         (build_dot_class_method_invocation): Likewise.
10435         (find_applicable_accessible_methods_list): `class$' can't be
10436         inherited.
10437
10438 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10439
10440         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10441
10442 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10443
10444         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10445         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10446         gone.
10447
10448 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10449
10450         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10451         outside of the `__U' sequence too.
10452         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10453         sequence too.
10454
10455 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10456
10457         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10458
10459 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10460
10461         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10462         (JVGENMAIN_OBJS): Likewise.
10463         * java-tree.h (append_gpp_mangled_name): New prototype.
10464         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10465         Removed cast calling `gcc_add_root.'
10466         * jvgenmain.c (mangle_obstack): New global, initialized.
10467         (main): Use it.
10468         (do_mangle_class): Constify local `ptr.'
10469         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10470         append_gpp_mangle_name and update `count' if necessary.
10471         Use `mangle_obstack.'
10472         * mangle.c (append_unicode_mangled_name): Removed.
10473         (append_gpp_mangled_name): Likewise.
10474         (unicode_mangling_length): Likewise.
10475         (mangle_member_name): Return type set to `void.'
10476         (mangle_field_decl): Don't append `U' in escaped names.
10477         (mangle_method_decl): Likewise.
10478         (mangle_member_name): Just use `append_gpp_mangled_name.'
10479         * mangle_name.c: New file.
10480
10481 2001-02-07  Per Bothner  <per@bothner.com>
10482
10483         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10484
10485         * check-init.c (check_init):  Don't call done_alternative after
10486         processing loop code, as a LOOP_EXPR never terminates normally.
10487
10488 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10489
10490         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10491
10492 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10493
10494         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10495         DECLs.
10496
10497 2001-02-06  Tom Tromey  <tromey@redhat.com>
10498
10499         * lex.c (java_new_lexer): Longer error message.
10500
10501 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10502             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10503
10504         * typeck.c (build_prim_array_type): Added leading comment.
10505         (build_java_array_type): Moved locals out of
10506         block. Always create the `data' field, fixed alignment to match
10507         C++.
10508
10509 2001-02-04  Tom Tromey  <tromey@redhat.com>
10510
10511         * expr.c (java_lang_expand_expr): Don't bother recomputing
10512         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10513         Fixes PR java/1866.
10514
10515 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10516
10517         * parse.y (process_imports): Save the original name of the import
10518         for better error report.
10519
10520 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10521
10522         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10523         of macros used when compiling jvspec.c.
10524         * jvspec.c (lang_specific_driver): Link with the shared
10525         libgcc by default.
10526
10527 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10528
10529         * check-init.c (check_init): Call internal_error instead of fatal.
10530         * expr.c (java_lang_expand_expr): Likewise.
10531         * jcf-parse.c (get_constant): Likewise.
10532         * mangle.c (java_mangle_decl): Likewise.
10533         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10534         (operator_string): Likewise.
10535         * check-init.c (check_init): Call abort instead of fatal.
10536         * class.c (build_class_ref): Likewise.
10537         * constants.c (write_constant_pool): Likewise.
10538         * decl.c (start_java_method): Likewise.
10539         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10540         (java_stack_dup, encode_newarray_type): Likewise.
10541         (build_java_array_length_access): Likewise.
10542         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10543         (build_java_soft_divmod, build_invokeinterface): Likewise.
10544         * java-tree.h (INNER_CLASS_P): Likewise.
10545         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10546         (give_name_to_class, get_class_constant): Likewise.
10547         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10548         (find_constant_index, generate_bytecode_conditional): Likewise.
10549         (generate_bytecode_insns, perform_relocations): Likewise.
10550         * lex.c (java_unget_unicode, java_lex): Likewise.
10551         * mangle.c (mangle_type, mangle_record_type): Likewise.
10552         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10553         (finish_mangling): Likewise.
10554         * parse.h (MARK_FINAL_PARMS): Likewise.
10555         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10556         (obtain_incomplete_type, java_complete_class): Likewise.
10557         (java_check_regular_methods, java_complete_expand_method): Likewise.
10558         (cut_identifier_in_qualified, check_deprecation): Likewise.
10559         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10560         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10561         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10562         * typeck.c (set_local_type, parse_signature_type): Likewise.
10563         (parse_signature_string, build_java_signature): Likewise;
10564         (set_java_signature): Likewise.
10565         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10566         * class.c (add_method): Call fatal_error instead of fatal.
10567         (build_static_field_ref): Likewise.
10568         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10569         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10570         * lex.c (java_new_new_lexer): Likewise.
10571         * jv-scan.c (main): Likewise.
10572         (fatal_error): Renamed from fatal.
10573         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10574         pfatal_with_name.
10575         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10576         (yyparse): Likewise.
10577         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10578         * lex.c (java_get_line_col): Likewise.
10579         * jcf-parse.c (load_class): Make errors non-fatal.
10580         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10581
10582 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10583
10584         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10585         (error): Remove unused function.
10586         (main): Don't use "__attribute__ alias" on generated class symbol.
10587
10588 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10589
10590         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10591         argument.
10592         * parse.y (finish_method_declaration): Code accounting for WFLed
10593         method DECL_NAMEs deleted.
10594         (check_abstract_method_definitions): Likewise.
10595         (resolve_type_during_patch): Layout resolved type.
10596         * typeck.c (lookup_do): Removed unused local.
10597
10598 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10599
10600         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10601         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10602         integer_negative_one_node.
10603         * expr.c (build_java_binop): Likewise.
10604
10605 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10606
10607         * zextract.c (read_zip_archive): Read file_offset before writing
10608         zipd and consequently clobbering the header contents.
10609
10610 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10611
10612         * Make-lang.in: Remove all dependencies on defaults.h.
10613         * decl.c: Don't include defaults.h.
10614         * expr.c: Likewise.
10615         * parse.y: Likewise.
10616
10617 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10618
10619         * ChangeLog (2001-01-21): Fixed typo.
10620         * class.c (layout_class_method): Code accounting for WFLed
10621         method DECL_NAMEs deleted.
10622         * constant.c (find_methodref_index): Likewise.
10623         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10624         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10625         (struct lang_decl): New field `wfl'.
10626         (java_get_real_method_name): Prototype deleted.
10627         * mangle.c (mangle_method_decl): Code accounting for WFLed
10628         method DECL_NAMEs deleted.
10629         * parse.h (GET_METHOD_NAME): Macro deleted.
10630         * parse.y (reset_method_name): Deleted.
10631         (method_header): Set DECL_FUNCTION_WFL.
10632         (check_abstract_method_header): Code accounting for WFLed method
10633         DECL_NAMEs deleted.
10634         (java_get_real_method_name): Deleted.
10635         (check_method_redefinition): Code accounting for WFLed method
10636         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10637         (java_check_regular_methods): Likewise.
10638         (java_check_abstract_methods): Likewise.
10639         (java_expand_classes): Don't call `reset_method_name.'
10640         (search_applicable_method_list): Use DECL_NAMEs instead of
10641         GET_METHOD_NAME.
10642         * typeck.c (lookup_do): Code accounting for WFLed method
10643         DECL_NAMEs deleted.
10644
10645 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10646
10647         * lex.c (java_read_char): Check for EOF from getc first.
10648
10649 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10650
10651         * class.c (layout_class): Don't lay the superclass out if it's
10652         already being laid out.
10653         * jcf-parse.c (handle_innerclass_attribute): New function.
10654         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10655         handle_innerclasses_attribute.
10656         (jcf_parse): Don't load an innerclasses if it's already being
10657         laid out.
10658         * jcf-write.c (append_innerclass_attribute_entry): Static
10659         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10660         to be zero for anonymous classes.
10661
10662 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10663
10664         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10665         necessary.
10666         * jcf-parse.c (set_source_filename): Use
10667         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10668
10669 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10670
10671         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10672         gets a unique asm name.
10673
10674 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10675
10676         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10677         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10678         if necessary.
10679         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10680         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10681         * parse.y (lookup_package_type_and_set_next): Deleted.
10682         (resolve_package): Removed unnecessary code.
10683         (find_applicable_accessible_methods_list): `finit$' can't be
10684         inherited.
10685         * verify.c (pop_argument_types): Added missing prototype.
10686
10687 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10688
10689         * config-lang.in: Disable java by default.
10690
10691 2001-01-23  Tom Tromey  <tromey@redhat.com>
10692
10693         * gcj.texi (Copying): New node.
10694         Added copyright information.
10695
10696 2001-01-21  Per Bothner  <per@bothner.com>
10697
10698         Various fixes to allow compiling a compressed .jar/.zip archive.
10699         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10700         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10701         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10702         * jcf.h (struct ZipDirectory):  Add forward declaration.
10703         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10704         Remove seen_in_zip and zip_offset fields.
10705         (JCF_SEEN_IN_ZIP):  New macro.
10706         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10707         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10708         (read_zip_member):  New function.
10709         (open_in_zip):  Call read_zip_member.
10710         * jcf-parse.c (find_in_current_zip):  Remove function.
10711         (read_class):  Merge in find_in_current_zip functionality.
10712         Call read_zip_member if needed.
10713         (parse_zip_file_entries):  Use read_zip_member.
10714         (process_zip_dir):  Update for removed and added JCF fields.
10715         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10716
10717 2001-01-21  Per Bothner  <per@bothner.com>
10718
10719         Minor optimization of static ggc roots.
10720         * jcf-parse.c (parse_roots):  New static field.
10721         (current_field, current_method, current_file_list):  Replace by macros
10722         naming fields of parse_roots.
10723         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10724         * class.c (class_roots):  New static field.
10725         (registered_class, fields_ident, info_ident, class_list):
10726         New macros naming fields of parse_roots.
10727         (build_static_field_ref):  Don't register roots here.
10728         (layout_class):  Static field list replaced by macro class_list.
10729         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10730         Initialize fields_ident and info_ident here.
10731
10732 2001-01-21  Per Bothner  <per@bothner.com>
10733
10734         * jcf-parse.c (ggc_mark_jcf):  New function.
10735         (init_jcf_parse):  Register current_jcf as ggc root.
10736
10737 2001-01-21  Per Bothner  <per@bothner.com>
10738
10739         * lang.c (put_decl_node):  Print method's name.
10740
10741 2001-01-21  Per Bothner  <per@bothner.com>
10742
10743         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10744         (verify_jvm_instructions):  Use it, for better error messages on loads.
10745
10746 2001-01-21  Per Bothner  <per@bothner.com>
10747
10748         * verify.c (merge_type_state):  Still may have to merge even if
10749         LABEL_VERIFIED (label).
10750
10751 2001-01-21  Per Bothner  <per@bothner.com>
10752
10753         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10754         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10755
10756 2001-01-19  Per Bothner  <per@bothner.com>
10757
10758         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10759         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10760
10761 2001-01-18  Per Bothner  <per@bothner.com>
10762
10763         * gcj.texi (Input Options): Mention .java files.
10764
10765 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10766
10767         * lang-options.h (-Wunsupported-jdk11): Removed.
10768         * lang.c (flag_not_overriding): Deleted.
10769         (flag_static_local_jdk1_1): Likewise.
10770         (lang_W_options): Removed "unsupported-jdk11" entry.
10771         * parse.y (java_check_methods): Removed dead code.
10772
10773 2001-01-17  Tom Tromey  <tromey@redhat.com>
10774
10775         Changes suggested by Per Bothner:
10776         * gcj.texi (Input Options): Don't mention input files.
10777         (Code Generation): Updated --main information.
10778         (Invoking jcf-dump): Mention that --javap is incomplete.
10779         From Alexandre Petit-Bianco:
10780         (Warnings): Don't mention -Wunsupported-jdk11.
10781         My stuff:
10782         (Compatibility): Mention JDK 1.2-ness of libraries.
10783         (Resources): Mention resources used when writing gcj.
10784
10785 2001-01-17  Tom Tromey  <tromey@redhat.com>
10786
10787         * gcj.texi: New file.
10788         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10789         (java.info): Depend on gcj.info.
10790         (java/gcj.dvi): New target.
10791         (java.dvi): Depend on gcj.dvi.
10792         (java.install-info): Wrote.
10793
10794 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10795
10796         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10797         having called make_decl_rtl.
10798
10799 2001-01-14  Per Bothner  <per@bothner.com>
10800
10801         Various patches to emit better messages on verification errors.
10802         * expr.c (push_type_0):  Return error indication on stack overflow,
10803         instead of callinfg fatal.
10804         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10805         (pop_type_0):  Return detailed error message (in a char** argument).
10806         (pop_type):  If pop_type_0 fails, print error message.
10807         (pop_argument_types):  Moved to verify.c.
10808         * verify.c (pop_argument_types):  Moved from expr.c.
10809         Return a (possible) error message, rather than void.
10810         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10811         (verify_jvm_instruction):  Use new macros, improving error messages.
10812         For case OPCODE_astore use object_ptr_type_node.
10813         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10814         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10815
10816         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10817         constant, return body without wrapper.  (Improves constant folding.)
10818         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10819
10820 2001-01-13  Per Bothner  <per@bothner.com>
10821
10822         * expr.c (expand_java_field_op):  Assigning to a final field outside
10823         an initializer does not violate JVM spec, so should be warning, not
10824         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10825
10826 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10827
10828         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10829         to 2001.
10830
10831 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10832
10833         * parse.y (resolve_expression_name): Permit instance variables from
10834         enclosing context in super constructor call.
10835         (resolve_qualified_expression_name): Permit enclosing class's qualified
10836         "this" in super constructor call.
10837
10838 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10839
10840         * class.c (build_utf8_ref): Remove last argument in call to
10841         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10842         (build_class_ref): Likewise.
10843         (build_static_field_ref): Likewise.
10844         (get_dispatch_table): Likewise.
10845         (layout_class_method): Likewise.
10846         (emit_register_classes): Likewise.
10847         * constants.c (build_constant_data_ref): Likewise.
10848         * decl.c (builtin_function): Likewise.
10849         (create_primitive_vtable): Likewise.
10850         * expr.c (build_known_method_def): Likewise.
10851         (build_jni_stub): Likewise.
10852         (java_lang_expand_expr): Likewise.
10853
10854 2001-01-10  Tom Tromey  <tromey@redhat.com>
10855
10856         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10857
10858 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10859
10860         * java-tree.h (lang_printable_name_wls): New prototype.
10861         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10862         rather than `current_class' to print type name. Don't prepend type
10863         names when printing constructor names.
10864         (lang_printable_name_wls): New function.
10865         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10866         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10867         * parse.y (patch_method_invocation): Message tuned for constructors.
10868         (not_accessible_p): Grant `private' access from within
10869         enclosing contexts.
10870
10871 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10872
10873         All files with updated copyright when applicable.
10874         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10875         * class.c (mangle_class_field): Function removed.
10876         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10877         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10878         (build_class_ref): Call `java_mangle_class_field' instead of
10879         `mangle_class_field.'
10880         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10881         (layout_class): Call `java_mangle_decl' instead of
10882         `mangle_static_field.'
10883         (cxx_keywords): Initialized static array moved to `lex.c.'
10884         (layout_class_method): Changed leading comment. Simplified to
10885         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10886         * decl.c (lang_mark_tree): Mark field `package_list.'
10887         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10888         (struct lang_type): New field `package_list.'
10889         (unicode_mangling_length): Prototype removed.
10890         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10891         emit_unicode_mangled_name): Likewise.
10892         (cxx_keyword_p): New prototype.
10893         (java_mangle_decl, java_mangle_class_field,
10894         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10895         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10896         `build_expr_wfl.'
10897         * jvgenmain.c (main_method_prefix): Global variable removed.
10898         (main_method_suffix): Likewise.
10899         (do_mangle_classname): New function.
10900         (main): Call it. Format changed to accommodate new mangling scheme.
10901         * lex.c: (utf8_cmp): Conditionally prototyped.
10902         (cxx_keywords): Moved from class.c, conditionally defined.
10903         (utf8_cmp, cxx_keyword_p): Likewise.
10904         * mangle.c (obstack.h, ggc.h): Included.
10905         (mangle_field_decl): New function.
10906         (mangle_method_decl, mangle_type, mangle_pointer_type,
10907         mangle_array_type, mangle_record_type,
10908         find_compression_pointer_match, find_compression_array_match,
10909         find_compression_record_match,
10910         find_compression_array_template_match, set_type_package_list,
10911         entry_match_pointer_p, emit_compression_string, init_mangling,
10912         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10913         (mangle_obstack): New global.
10914         (MANGLE_RAW_STRING): New macro.
10915         (unicode_mangling_length): Turned static.
10916         (append_unicode_mangled_name): Renamed from
10917         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10918         replaces `obstack', removed from the parameter list.
10919         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10920         replaces parameter `obstack', removed from the parameter list. Call
10921         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10922         (append_gpp_mangled_classtype): Removed.
10923         (compression_table, compression_next): New static variables.
10924         * parse.y (temporary_obstack): Extern declaration removed.
10925
10926 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10927
10928         * parse.y (patch_binop): Compute missing type in error situations.
10929
10930 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10931
10932         * class.c (make_class_data): Push initial value for "arrayclass".
10933         * decl.c (init_decl_processing): Add new class field "arrayclass".
10934
10935 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10936
10937         From patha@softlab.ericsson.se:
10938         * parse.y (switch_label): Use build, not build1, to construct
10939         DEFAULT_EXPR.
10940
10941 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10942
10943         * lang.c (lang_decode_option): Change -MA to -MP.
10944         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10945         Update to new prototype; do quote targets.
10946         (jcf_dependency_write): Update.
10947
10948 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10949
10950         Shorten primitive array allocation path:
10951         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10952         to create new primitive arrays.
10953         * expr.c (build_newarray): If generating native code, call
10954         soft_newarray_node with a reference to the primitive TYPE identifier
10955         instead of type_value.
10956
10957 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10958
10959         Fix for PRs gcj/312 and gcj/253:
10960         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10961         dest if they arn't already.
10962         * class.c (layout_class): Call maybe_layout_super_class on
10963         superinterfaces also, but only if compiling from bytecode.
10964
10965         Fix for PR gcj/373:
10966         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10967         interface.
10968
10969 2000-12-15  Tom Tromey  <tromey@redhat.com>
10970
10971         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10972         set.
10973
10974 2000-12-14  Andrew Haley  <aph@redhat.com>
10975
10976         * boehm.c (mark_reference_fields): Change test to correctly detect
10977         bitmap overflow.
10978
10979 2000-12-15  Andreas Jaeger  <aj@suse.de>
10980
10981         * config-lang.in (lang_dirs): Added.
10982
10983 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10984
10985         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10986         Credits go to rth for finding it.
10987
10988 2000-12-13  Mike Stump  <mrs@wrs.com>
10989
10990         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10991
10992 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10993
10994         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10995         * lex.c (java_ignorable_control_p): Removed.
10996         (java_letter_or_digit_p): Removed.
10997         (java_start_char_p): New function.
10998         (java_read_char): Return `int', not `unicode_t'.  Changed
10999         callers.
11000         (java_read_unicode): Likewise.
11001         (java_read_unicode_collapsing_terminators): Likewise.
11002         (java_get_unicode): Likewise.
11003         (java_new_lexer): Initialize hit_eof.
11004         (java_parse_end_comment): Take `int' argument.
11005         (java_parse_doc_section): Likewise.
11006         (java_parse_escape_sequence): Don't allow backlash-newline.
11007         Return `int'.
11008         * lex.h (JAVA_DIGIT_P): Removed.
11009         (_JAVA_LETTER_OR_DIGIT_P): Removed.
11010         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11011         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11012         (JAVA_PART_CHAR_P): New macro.
11013         (UEOF): Now -1.
11014         (JAVA_CHAR_ERROR): Now -2.
11015         (java_lexer): New field `hit_eof'.
11016         * chartables.h: New file.
11017         * gen-table.pl: new file.
11018
11019 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11020             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11021
11022         * parse.y (java_complete_lhs): Only allow compound assignment of
11023         reference type if type is String.
11024
11025 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11026
11027         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11028         jcf-path.c: Likewise.
11029
11030 2000-12-09  Anthony Green  <green@redhat.com>
11031
11032         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11033         filestart and filename_length as int values.
11034
11035 2000-12-07  Mo DeJong  <mdejong@redhat.com>
11036
11037         * jcf-io.c (find_class): Correct the logic that tests to see if a
11038         .java file is newer than its .class file. The compiler was
11039         incorrectly printing a warning when file mod times were equal.
11040
11041 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
11042
11043         * jvgenmain.c: Use ISPRINT not isascii.
11044
11045 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11046
11047         * parse.y (end_artificial_method_body): Fixed typo.
11048
11049 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11050
11051         * parse.y (patch_method_invocation): Pick the correct enclosing
11052         context when creating inner class instances.
11053         Fixes gcj/332.
11054
11055 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
11056
11057         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11058         Update copyright year to 2000.
11059
11060 2000-11-23  Anthony Green  <green@redhat.com>
11061
11062         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11063         Move current_file_list out of yyparse and make it static.
11064
11065         * expr.c: Declare quick_stack and tree_list_free_list as static
11066         (init_expr_processing): Register quick_stack and
11067         tree_list_free_list roots.
11068
11069 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11070
11071         * parse.y (build_outer_field_access): New local `decl_ctx', use
11072         it. Check for field's context and current class immediate outer
11073         context inheritance.
11074         (outer_field_access_p): Consider fields inherited from the last
11075         enclosing context.
11076         (build_access_to_thisn): Stop at the last enclosing context if
11077         necessary.
11078         Fixes gcj/367.
11079
11080 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11081
11082         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11083
11084 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
11085
11086         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11087         scratch buffer.
11088
11089 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11090
11091         * jv-scan.c (help): Document --complexity.
11092         (options): Added --complexity.
11093         (flag_complexity): New global.
11094         (main): Call `report'.
11095         * parse-scan.y (complexity): New global.
11096         (if_then_statement, if_then_else_statement,
11097         if_then_else_statement_nsi, switch_block_statement_group,
11098         while_expression, do_statement, for_begin, continue_statement,
11099         throw_statement, catch_clause, finally, method_invocation,
11100         conditional_and_expression, conditional_or_expression,
11101         conditional_expression): Update complexity.
11102         (reset_report): Reset complexity.
11103         (report): New function.
11104
11105 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11106
11107         * lex.c (yylex): Added STRICT_TK case.
11108         * parse.y (STRICT_TK): Added.
11109         * parse-scan.y (STRICT_TK): Added.
11110         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11111         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
11112         file.
11113         * keyword.h: Rebuilt.
11114         * keyword.gperf (strictfp): Added.
11115
11116 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11117
11118         * lex.c (yylex): Recognize floating point constants with leading
11119         0.
11120
11121 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11122
11123         * java-tree.h (cyclic_inheritance_report): Constify.
11124         * parse.y (cyclic_inheritance_report): Likewise.
11125
11126 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11127
11128         * parse.y (goal): Remove call to ggc_add_string_root.
11129
11130 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11131
11132         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11133         Create string in scratch buffer, then pass to build_string.
11134
11135 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11136
11137         * parse.y (issue_warning_error_from_context): Add
11138         ATTRIBUTE_PRINTF.
11139
11140 2000-11-11  Anthony Green  <green@redhat.com>
11141
11142         * jcf-parse.c (process_zip_dir): Add finput parameter.
11143         (jcf_figure_file_type): Call process_zip_dir with appropriate
11144         argument.
11145
11146 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11147
11148         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11149         * jcf-parse.c (jcf_figure_file_type): Likewise.
11150
11151 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11152
11153         * parse.y (create_new_parser_context): Use memset () instead of
11154         bzero ().
11155
11156 2000-11-08  Tom Tromey  <tromey@cygnus.com>
11157
11158         * gjavah.c (process_file): Only include gcj/cni.h when generating
11159         CNI stubs.
11160
11161 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11162
11163         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11164         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11165         instead of bzero ().
11166
11167 2000-11-05  Tom Tromey  <tromey@cygnus.com>
11168
11169         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11170         * lex.c (IS_ZERO): New define.
11171         (java_perform_atof): Error on floating point underflow.
11172
11173 2000-11-04  Tom Tromey  <tromey@cygnus.com>
11174
11175         * lex.c (java_parse_escape_sequence): Only read two octal
11176         characters if the first one is greater than 3.  Don't allow
11177         "octal" numbers to include the digits 8 or 9.
11178
11179 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11180
11181         * Make-lang.in (java.distdir): Remove.
11182
11183 2000-11-03  Tom Tromey  <tromey@cygnus.com>
11184
11185         * Make-lang.in (java.dvi): New target.
11186         Partial fix for PR other/567.
11187
11188         * lang-options.h: Mention -Wout-of-date.
11189         * jcf-dump.c (flag_newer): New global.
11190         * gjavah.c (flag_newer): New global.
11191         * jcf-io.c (find_class): Only warn when flag_newer set.
11192         * lang.c (flag_newer): New global.
11193         (struct string_option): New declaration.
11194         (lang_W_options): New global.
11195         (process_option_with_no): New function.
11196         (lang_decode_option): Use it.
11197
11198         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11199         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11200         `$'.
11201
11202         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11203         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11204         * lex.c (java_read_unicode): Removed `term_context' argument.
11205         Recognize any number of `u' in `\u'.
11206         (java_read_unicode_collapsing_terminators): New function.
11207         (java_get_unicode): Use it.
11208         (java_lineterminator): Removed.
11209         (yylex): Produce error if character literal is newline or single
11210         quote.  Return if eof found in middle of `//' comment.  EOF in
11211         `//' comment is only an error if pedantic.
11212         (java_ignorable_control_p): New function.
11213         (java_parse_end_comment): Return if eof found in middle of
11214         comment.
11215         Include flags.h.
11216         * jv-scan.c (pedantic): New global.
11217
11218 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11219
11220         * parse.y (outer_field_access_p): Inherited fields aren't
11221         consider outer fields.
11222         (maybe_build_thisn_access_method): Use
11223         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11224         (resolve_expression_name): Trigger an error if a static field
11225         is being accessed as an outer field.
11226
11227 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11228
11229         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11230         Fixes gcj/365.
11231
11232 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11233
11234         * Make-lang.in: Move all build rules here from Makefile.in,
11235         adapt to new context.  Wrap all rules that change the current
11236         directory in parentheses.  Expunge all references to $(P).
11237         When one command depends on another and they're run all at
11238         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11239         all object-file generation rules.  Delete obsolete variables.
11240
11241         * Makefile.in: Delete.
11242         * config-lang.in: Delete outputs= line.
11243
11244 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11245
11246         * parse.y (patch_method_invocation): NULLify this_arg when already
11247         inserted.
11248         (maybe_use_access_method): Handle call to methods unrelated to the
11249         current class. Fixed comment.
11250         Fixes gcj/361.
11251
11252 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11253
11254         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11255         scope.
11256
11257 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11258
11259         * lex.c (java_new_lexer): Initialize new fields.  Work around
11260         broken iconv() implementations.
11261         (java_read_char): Swap bytes if required.  Use fallback decoder if
11262         required.
11263         (byteswap_init, need_byteswap): New globals.
11264         (java_destroy_lexer): Only close iconv handle if it is in use.
11265         * lex.h (java_lexer): New fields read_anything, byte_swap,
11266         use_fallback.
11267         Made out_buffer unsigned.
11268
11269 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11270
11271         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11272         where an enclosing context can be set on the jdep.
11273         (do_resolve_class): Fixed identation.
11274
11275 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11276
11277         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11278
11279         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11280         when requested.
11281
11282         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11283
11284         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11285
11286 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11287
11288         * jcf-write.c (OP1): Update `last_bc'.
11289         (struct jcf_block): Fixed indentation and typo in comments.  New
11290         field `last_bc'.
11291         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11292         follows `monitorenter'.
11293         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11294         `patch_string'.
11295         Fixes gcj/232.
11296
11297 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11298
11299         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11300         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11301         * lang-options.h: Added -MA, -MT, -MF..
11302         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11303         (DEPEND_TARGET_SET): New macro.
11304         (DEPEND_FILE_ALREADY_SET): Likewise.
11305         (init_parse): Handle new flags.
11306         * jcf.h (jcf_dependency_print_dummies): Declare.
11307         * Make-lang.in (s-java): Added mkdeps.o.
11308         * Makefile.in (BACKEND): Added mkdeps.o.
11309         (../gcjh$(exeext)): Added mkdeps.o.
11310         (../jcf-dump$(exeext)): Added mkdeps.o.
11311         * jcf-depend.c: Include mkdeps.h.
11312         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11313         add_entry): Removed.
11314         (jcf_dependency_reset): Rewrote.
11315         (dependencies): New global.
11316         (jcf_dependency_set_target): Rewrote.
11317         (jcf_dependency_add_target): Likewise.
11318         (jcf_dependency_add_file): Likewise.
11319         (munge): Removed.
11320         (print_ents): Removed.
11321         (jcf_dependency_write): Rewrote.
11322         (print_dummies): New global.
11323         (jcf_dependency_print_dummies): New function
11324         (jcf_dependency_write): Call deps_dummy_targets if required.
11325
11326 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11327
11328         * gjavah.c (add_class_decl): Removed unused variables `tname',
11329         `tlen' and `name_index'.
11330         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11331         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11332         in `wfl_operator' with value.
11333         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11334         (jcf_figure_file_type): Fixed identation.
11335         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11336         * parse.y (analyze_clinit_body): New function.
11337         (static_initializer:): Reset `current_static_block'.
11338         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11339         `wfl_operator' with new value.
11340         (lookup_cl): Use EXPR_WFL_FILENAME.
11341         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11342         analyze_clinit_body.
11343         (build_outer_field_access): Access to this$<n> built from
11344         current_class, not its outer context.
11345         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11346         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11347         (patch_method_invocation): Use `is_static_flag' when already
11348         initialized.
11349         (patch_newarray): Removed assignment in ternary operator.
11350
11351 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11352
11353         * except.c (free_eh_ranges): Don't free `whole_range'.
11354
11355 2000-10-15  Anthony Green  <green@redhat.com>
11356
11357         * decl.c (init_decl_processing): Call init_class_processing before
11358         anything else.
11359
11360 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11361
11362         * check-init.c (check_init): Fixed leading comment. Use
11363         LOCAL_FINAL_P.
11364         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11365         (give_name_to_locals): Likewise.
11366         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11367         fields in lang_decl_var.
11368         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11369         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11370         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11371         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11372         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11373         (LOCAL_FINAL): Rewritten.
11374         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11375         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11376         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11377         `init_final' fields.
11378         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11379         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11380         (TYPE_HAS_FINAL_VARIABLE): New macro.
11381         (struct lang_type): Added `afv' field.
11382         * parse.y (check_static_final_variable_assignment_flag): New function.
11383         (reset_static_final_variable_assignment_flag): Likewise.
11384         (check_final_variable_local_assignment_flag): Likewise.
11385         (reset_final_variable_local_assignment_flag): Likewise.
11386         (check_final_variable_indirect_assignment): Likewise.
11387         (check_final_variable_global_assignment_flag): Likewise.
11388         (add_inner_class_fields): Use LOCAL_FINAL_P.
11389         (register_fields): Handle local finals and final variables.
11390         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11391         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11392         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11393         on local finals.
11394         (java_complete_expand_methods): Loop to set
11395         TYPE_HAS_FINAL_VARIABLE. Call
11396         `reset_final_variable_local_assignment_flag' and
11397         `check_final_variable_local_assignment_flag' accordingly before
11398         and after constructor expansion. Call
11399         `reset_static_final_variable_assignment_flag'
11400         before expanding <clinit> and after call
11401         `check_static_final_variable_assignment_flag' if the
11402         current_class isn't an interface. After all methods have been
11403         expanded, call `check_final_variable_global_assignment_flag' and
11404         `check_static_final_variable_assignment_flag' if the current class
11405         is an interface.
11406         (maybe_yank_clinit): Fixed typo in comment.
11407         (build_outer_field_access_methods): Removed old sanity check. Use
11408         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11409         Don't create access methods for finals.
11410         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11411         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11412         existing DECL_INIT has been processed.
11413         (java_complete_lhs): Likewise.
11414         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11415         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11416         logic.
11417         (patch_assignment): Use LOCAL_FINAL_P.
11418         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11419         DECL_INITIAL is nullified.
11420         Fixes gcj/163.
11421
11422 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11423
11424         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11425
11426         * Makefile.in (parse.c, parse-scan.c): Likewise.
11427
11428 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11429
11430         * class.c (temporary_obstack): Remove.
11431         (make_class): Don't mess with obstascks.
11432         (push_class): Likewise.
11433         (set_super_info): Likewise.
11434         (add_method_1): Likewise.
11435         (add_method): Likewise.
11436         (add_field): Likewise.
11437         (build_utf8_ref): Likewise.
11438         (build_class_ref): Likewise.
11439         (build_static_field_ref): Likewise.
11440         (finish_class): Likewise.
11441         (push_super_field): Likewise.
11442         (layout_class): Likewise.
11443         (layout_class_methods): Likewise.
11444         (init_class_processing): Likewise.
11445         * constants.c (get_tag_node): Likewise.
11446         (build_constant_data_ref): Likewise.
11447         * decl.c (ggc_p): Remove.
11448         (copy_lang_decl): Use ggc_alloc.
11449         (complete_start_java_method): Don't mess with obstacks.
11450         (start_java_method): Likewise.
11451         (end_java_method): Likewise.
11452         * except.c (link_handler): Use xmalloc.
11453         (free_eh_ranges): New function.
11454         (method_init_exceptions): Use it.
11455         (add_handler): Use xmalloc.
11456         (expand_start_java_handler): Don't mess with obstacks.
11457         (prepare_eh_table_type): Likewise.
11458         (expand_end_java_handler): Likewise.
11459         * expr.c (push_value): Likewise.
11460         (create_label_decl): Likewise.
11461         (build_jni_stub): Likewise.
11462         (java_lang_expand_expr): Likewise.
11463         (note_instructions): Use xrealloc.
11464         (java_push_constant_from_pool): Don't mess with obstacks.
11465         (process_jvm_instruction): Likewise.
11466         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11467         declaration.
11468         * jcf-parse.c (get_constant): Don't mess with obstacks.
11469         (read_class): Likewise.
11470         (jcf_parse): Likewise.
11471         * lex.c (expression_obstack): Remove.
11472         (java_lex): Don't use obstack_free.
11473         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11474         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11475         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11476         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11477         * parse.y (gaol): Add more GC roots.
11478         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11479         (lookup_field_wrapper): Likewise.
11480         (obtain_incomplete_type): Don't mess with obstacks.
11481         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11482         macros.
11483         (craft_constructor): Don't mess with obstacks.
11484         (safe_layout_class): Likewise.
11485         (java_complete_class): Likewise.
11486         (source_end_java_method): Likewise.
11487         (build_outer_field_access_methods): Likewise.
11488         (build_outer_method_access_method): Likewise.
11489         (maybe_build_thisn_access_method): Likewise.
11490         (build_dot_class_method_invocation): Likewise.
11491         (java_complete_tree): Likewise.
11492         (java_complete_lhs): Likewise.
11493         (do_merge_string_cste): Likewise.
11494         (patch_string_cst): Likewise.
11495         (array_constructor_check_entry): Likewise.
11496         * typeck.c (build_java_array_type): Likewise.
11497         (parse_signature_string): Likewise.
11498         (build_java_signature): Likewise.
11499
11500 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11501
11502         Fix for PR gcj/356:
11503         * gjavah.c (add_class_decl): Don't special-case inner classes.
11504         (add_namelet): Likewise.
11505
11506 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11507
11508         * java-tree.h: Constify current_encoding.
11509         * lang.c: Constify current_encoding.
11510
11511 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11512
11513         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11514         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11515
11516 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11517
11518         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11519         patch. Fixes gcj/340.
11520
11521 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11522
11523         * lex.c (java_new_lexer): Initialize out_first and out_last
11524         fields.
11525         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11526
11527 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11528
11529         * parse.y (pop_current_osb): New function.
11530         (array_type:): Use `dims:', changed actions
11531         accordingly. Suggested by Anthony Green.
11532         (array_creation_expression:): Used pop_current_osb.
11533         (cast_expression:): Likewise.
11534         (search_applicable_method_list): Fixed indentation.
11535
11536 2000-10-08  Anthony Green  <green@redhat.com>
11537
11538         * parse.y (array_type_literal): Remove production.
11539         (type_literals): Refer to array_type, not array_type_literal.
11540
11541 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11542
11543         Patch contributed by Corey Minyard.
11544         * decl.c (check_local_named_variable): New function.
11545         (tree check_local_unnamed_variable): Likewise.
11546         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11547
11548 2000-10-07  Anthony Green  <green@redhat.com>
11549
11550         * class.c (layout_class): Handle case where superclass can't be
11551         layed out yet.
11552
11553 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11554
11555         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11556         gperf.
11557
11558 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11559
11560         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11561         * jvgenmain.c (class_mangling_prefix): Removed.
11562         (class_mangling_suffix): New global.
11563         (main): Use it.
11564         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11565         `$'.
11566         (print_method_info): Handle overrides for static and final
11567         methods.
11568         (process_file): Generate declaration for class object field.
11569         * class.c (cxx_keywords): New array.
11570         (utf8_cmp): New function.
11571         (cxx_keyword_p): New function.
11572         (layout_class_method): Mangle C++ keywords by appending `$'.
11573         (mangle_field): New function.
11574         (mangle_class_field): Use mangle_field.  Mangle class name as
11575         `class$'.
11576         (mangle_static_field): Use mangle_field.
11577
11578 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11579
11580         * decl.c (find_local_variable): Removed uncessary type check and
11581         fixed range check typo. From Corey Minyard.
11582
11583 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11584
11585         * decl.c (give_name_to_locals): New local `code_offset'. Call
11586         `maybe_adjust_start_pc'.
11587         * expr.c (note_instructions): New function.
11588         (expand_byte_code): Don't collect insn starts here.
11589         (peek_opcode_at_pc): New function.
11590         (maybe_adjust_start_pc): Likewise.
11591         * java-tree.h (maybe_adjust_start_pc): Declare.
11592         (note_instructions): Likewise.
11593         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11594
11595 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11596
11597         * parse.y (field_access:): Fixed indentation.
11598         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11599
11600 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11601
11602         Fix for PR gcj/307:
11603         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11604         JPRIMITIVE_TYPE_P, for arithmetic operators.
11605         (patch_method_invocation): Indentation fix.
11606         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11607         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11608         (do_unary_numeric_promotion): Cleaned up code.
11609         (valid_cast_to_p): Handle boolean correctly.
11610
11611 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11612
11613         * lex.c (java_read_unicode): Reset bs_count when finished with
11614         `\u' sequence.
11615
11616 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11617
11618         Convert to GC.
11619         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11620         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11621         (typeck.o): Depend on ggc.h.
11622         * class.c (add_method_1): Use GC functions for allocation.
11623         (init_class_processing): Register roots.
11624         * decl.c (ggc_p): Set to 1.
11625         (pending_local_decls): Make it static.
11626         (push_jvm_slot): Use GC functions for allocation.
11627         (init_decl_processing): Register roots.
11628         (give_name_to_locals): Use GC functions for allocation.
11629         (lang_mark_tree): New function.
11630         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11631         functions for allocation.
11632         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11633         * lex.c (java_lex): Use build_string, rather than replicating it
11634         inline.
11635         * parse.y (goal): Add more roots.
11636         (mark_parser_ctxt): New function.
11637         * typeck.c: Include ggc.h.
11638
11639 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11640
11641         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11642         contains something else than MODIFY_EXPR.
11643
11644 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11645
11646         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11647         * Makefile.in (parse.o): Depend on ggc.h.
11648         (class.o): Likewise.
11649         (constants.o): Likewise.
11650         (decl.o): Likewise.
11651         (expr.o): Likewise.
11652         (jcf-parse.o): Likewise.
11653         (jcf-write.o): Likewise.
11654         (mangle.o): Likewise.
11655         * class.c: Include ggc.h.
11656         (build_static_field_ref): Register GC roots.
11657         (layout_class): Likewise.
11658         (init_class_processing): Likewise.
11659         * constants.c: Include ggc.h.
11660         (current_constant_pool_data_ref): Remove.
11661         (tag_nodes): Move it to ...
11662         (get_tag_node): ... here.  Register GC roots.
11663         * decl.c: Include ggc.h.  Remove many global tree definitions.
11664         (throw_node): Define.
11665         (java_global_trees): Likewise.
11666         (predef_filenames): Make the size a constant.
11667         (init_decl_processing): Adjust accordingly.
11668         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11669         * expr.c: Include ggc.h.
11670         (init_expr_processing): Register GC roots.
11671         (build_invokeinterface): Likewise.
11672         * java-tree.h: Replace extern tree declarations with macros.
11673         (java_global_trees): New variable.
11674         (java_tree_index): New enumeration.
11675         (init_jcf_parse): Declare.
11676         * jcf-parse.c: Include ggc.h.
11677         (current_class): Remove declaration.
11678         (main_class): Likewise.
11679         (all_class_list): Likewise.
11680         (predefined_filename_p): Adjust for constant size of
11681         predef_filenames.
11682         (init_jcf_parse): New function.
11683         * jcf-write.c: Include ggc.h.
11684         (generate_classfile): Register GC roots.
11685         (append_synthetic_attribute): Likewise.
11686         (append_innerclass_attribute_entry): Likewise.
11687         * lang.c: Include ggc.h.
11688         (lang_print_error): Register GC roots.
11689         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11690         with macros.
11691         * parse.y: Include ggc.h.
11692         (wfl_operator): Remove.
11693         (goal): Register GC roots.
11694         (java_pop_parser_context): Adjust for new field names.
11695         (java_parser_context_save_global): Likewse.
11696         (java_parser_context_restore_global): Likewise.
11697         (java_parser_context_suspend): Likewise.
11698         (java_parser_context_resume): Likewise.
11699         (verify_constructor_circularity): Register GC roots.
11700         (lookup_cl): Likewise.
11701         (java_reorder_fields): Likewise.
11702         (build_current_this): Likewise.
11703         (class_in_current_package): Likewise.
11704         (argument_types_convertible): Likewise.
11705         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11706
11707 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11708
11709         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11710
11711 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11712
11713         * jcf-parse.c: Include <locale.h>.
11714         * jv-scan.c: Include <locale.h>.
11715
11716 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11717
11718         * expr.c (pop_type_0): Return `Object' if trying to merge two
11719         interface types.
11720         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11721         interface types; `Object' is always a valid supertype.
11722
11723 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11724
11725         Fix for PR gcj/33:
11726         * jv-scan.c (help): Document --encoding.
11727         (options): Added `encoding' entry.
11728         (OPT_ENCODING): New define.
11729         (main): Handle --encoding.
11730         Include <langinfo.h> if nl_langinfo exists.
11731         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11732         --encoding.
11733         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11734         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11735         argument.  Use nl_langinfo to determine default encoding.
11736         * java-tree.h (current_encoding): Declare.
11737         * parse.y (java_parser_context_restore_global): Don't restore
11738         `finput'.
11739         (java_parser_context_save_global): Don't set `finput' field.
11740         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11741         if required.
11742         * lang.c (current_encoding): New global.
11743         (lang_decode_option): Recognize `-fencoding='.
11744         (finish_parse): Don't close finput.
11745         * parse.h (struct parser_ctxt): Removed `finput' and
11746         `unget_utf8_value' fields.  Added `lexer' field.
11747         (java_init_lex): Fixed declaration.
11748         * lex.c (java_new_lexer): New function.
11749         (java_destroy_lexer): Likewise.
11750         (java_read_char): Added `lex' argument.  Handle iconv case.
11751         (java_read_unicode): Added `lex' argument.  Count backslashes in
11752         lexer structure.
11753         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11754         `lexer' field in ctxp.
11755         (BAD_UTF8_VALUE): Removed.
11756         (java_lex): Handle seeing UEOF in the middle of a string literal.
11757         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11758         (java_lexer): New structure.
11759         (UNGETC): Removed.
11760         (GETC): Removed.
11761         (DEFAULT_ENCODING): New define.
11762         (java_destroy_lexer): Declare.
11763
11764 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11765
11766         Fix for PR gcj/343:
11767         * lex.c (java_init_lex): Initialize java_io_serializable.
11768         * parse.y (java_io_serializable): New global.
11769         (valid_ref_assignconv_cast_p): An array can be cast to
11770         serializable.
11771
11772 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11773
11774         * decl.c, expr.c: Include defaults.h if not already included.
11775         Don't define the *_TYPE_SIZE macros.
11776
11777 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11778
11779         * typeck.c (build_java_array_type): Correct first parameter
11780         in ADJUST_FIELD_ALIGN invocation.
11781
11782 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11783
11784         * lang-specs.h: Also recognize `-femit-class-files'.
11785
11786 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11787
11788         * verify.c (merge_types): Load the types to merge if necessary.
11789
11790 2000-09-02  Anthony Green  <green@redhat.com>
11791
11792         * jcf-io.c: Include zlib.h.
11793         (open_in_zip): Read compressed class file archives.
11794         * zipfile.h (ZipDirectory): Add uncompressed_size and
11795         compression_method fields.
11796         * zextract.c (read_zip_archive): Collect file compression info.
11797
11798 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11799
11800         * parse.y (do_resolve_class): Also explore superclasses of
11801         intermediate enclosing contexts when searching for inner classes.
11802
11803 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11804
11805         * parse.y (variable_declarator_id:): Better error message.
11806         (expression_statement:): Use YYNOT_TWICE.
11807         (cast_expression:): Likewise.
11808         (assignment:): Likewise.
11809
11810 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11811
11812         * parse.y (do_merge_string_cste): New locals. Create new
11813         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11814
11815 2000-08-07  Hans Boehm  <boehm@acm.org>
11816
11817         * boehm.c (mark_reference_fields): Set marking bits for all words in
11818         a multiple-word record.
11819         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11820         java.lang.Class.
11821
11822 2000-08-31  Mike Stump  <mrs@wrs.com>
11823
11824         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11825         jcf-dump$(exeext)): Make parallel safe.
11826
11827 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11828
11829         * jcf-parse.c (set_source_filename): Constify a char *.
11830         * jcf-write.c (append_innerclasses_attribute,
11831         make_class_file_name): Constify a char *.  Don't recycle a
11832         variable for an unrelated purpose.
11833         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11834         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11835
11836 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11837
11838         * expr.c (can_widen_reference_to): Fixed indentation.
11839         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11840         * parse.y: `finit$' replaces `$finit$' in comments.
11841         (try_builtin_assignconv): Fixed leading comment.
11842
11843 2000-08-25  Greg McGary  <greg@mcgary.org>
11844
11845         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11846
11847 2000-08-24  Greg McGary  <greg@mcgary.org>
11848
11849         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11850         * parse.y (BINOP_LOOKUP): Likewise.
11851
11852 2000-08-22  Andrew Haley  <aph@cygnus.com>
11853
11854         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11855         sign extending. Fixes gcj/321.
11856         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11857         combining to make a jlong. Fixes gcj/321.
11858
11859 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11860
11861         * lang-specs.h: Do not process -o or run the assembler if
11862         -fsyntax-only.
11863
11864 2000-08-16  Andrew Haley  <aph@cygnus.com>
11865
11866         * typeck.c (build_java_array_type): Rewrite code to do array
11867         alignment.  Take into account back-end macros when aligning array
11868         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11869         user to set alignment. Fixes gcj/252 and 160.
11870
11871 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11872
11873         * parse.y (check_abstract_method_definitions): Now return `int'.
11874         Check implemented interfaces.  Fixes PR gcj/305.
11875
11876         * parse.y (patch_switch_statement): Disallow `long' in switch
11877         expressions.  Fixes PR gcj/310.
11878
11879 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11880
11881         * decl.c (finit_leg_identifier_node): New global.
11882         (init_decl_processing): Use `finit$' to initialize
11883         finit_identifier_node. Use `$finit$' to initialize
11884         finit_leg_identifier_node.
11885         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11886         * java-tree.h (finit_identifier_node): Changed attached comment.
11887         (finit_leg_identifier_node): New declaration.
11888         (ID_FINIT_P): Take finit_identifier_node and
11889         finit_leg_identifier_node into account. This is a backward
11890         compatibility hack.
11891
11892 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11893
11894         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11895         Jan 6 2000 patch.
11896         (generate_bytecode_insns): Check `nargs' before emitting it.
11897         * verify.c (merge_type_state): Fixed typo.
11898         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11899         generate_bytecode_{conditional,insns}.
11900
11901 2000-08-13  Anthony Green  <green@redhat.com>
11902
11903         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11904         for -pg builds).
11905
11906 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11907
11908         * class.c (maybe_layout_super_class): Fixed indentation.
11909         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11910         (java_check_methods): New function declaration.
11911         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11912         instead of `str_ptr'.
11913         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11914         of a `invokeinterface' at the right time.
11915         * parse.h (WFL_STRIP_BRACKET): New macro.
11916         (SET_TYPE_FOR_RESOLUTION): Use it.
11917         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11918         (check_class_interface_creation): Don't check for cross package
11919         innerclass name clashes.
11920         (method_header): Behave properly if MDECL is `error_mark_node'.
11921         (method_declarator): Return `error_mark_node' if bogus current
11922         class.
11923         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11924         (resolve_and_layout): New local `decl_type', set and used. Call
11925         java_check_methods.
11926         (java_check_methods): New method.
11927         (java_layout_classes): Use it.
11928         (resolve_qualified_expression_name): No EH check necessary in
11929         access$<n>.
11930         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11931         `case' statement.
11932         (patch_assignment): Set DECL_INITIAL on integral final local.
11933
11934 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11935
11936         * java-tree.h (flag_extraneous_semicolon): New extern.
11937         * lang-options.h: (-Wextraneous-semicolon): New option.
11938         * lang.c (flag_redundant): Fixed typo in leading comment.
11939         (flag_extraneous_semicolon): New global.
11940         (lang_decode_option): Set `flag_extraneous_semicolon' when
11941         -Wall. Decode `-Wextraneous-semicolon'.
11942         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11943         `empty_statement' rule.
11944         (class_body_declaration): Likewise.
11945         (method_body:): Accept `;' as a method body.
11946         (static_initializer:): Removed `SC_TK' hack.
11947         (constructor_block_end:): Likewise.
11948         (empty_statement:): Report deprecated empty declaration. Fixes
11949         gcj/295
11950
11951 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11952
11953         * parse.y (build_dot_class_method_invocation): Changed parameter
11954         name to `type'. Build signature from `type' and convert it to a
11955         STRING_CST if it's an array.
11956         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11957         to use `ref_type' directly.
11958
11959 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11960
11961         * lang-options.h: Added a comma after the last element to avoid
11962         syntax errors when other languages define additional options.
11963
11964 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11965
11966         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11967         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11968         (jc1): Link with $(BACKEND).
11969         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11970
11971 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11972
11973         * jvspec.c: Adjust type of second argument to
11974         lang_specific_driver, and update code as necessary.
11975
11976         * class.c (build_dtable_decl): Initialize dummy.
11977
11978 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11979
11980         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11981         method bodies not to rule out discarding `<clinit>'; don't use
11982         <clinit> to initialize static fields with constant initializers.
11983
11984 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11985
11986         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11987         synthetic methods.
11988         (method_synthetic): New global.
11989         (HANDLE_METHOD): Recognize synthetic method and tell
11990         `print_method_info' about it.
11991         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11992         processing a synthetic method.
11993         * jcf-reader.c (skip_attribute): New function.
11994         ( skip_attribute): Likewise.
11995
11996 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11997
11998         * parse.y (build_outer_field_access): Fixed comments.
11999         (fix_constructors): Emit the initialization of this$<n> before
12000         calling $finit$.
12001         (resolve_qualified_expression_name): Build an access to `decl' if
12002         necessary.
12003
12004 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12005
12006         * parse-scan.y (curent_class): Non longer const.
12007         (inner_qualifier, inner_qualifier_length): Deleted.
12008         (current_class_length): New global.
12009         (bracket_count): Fixed typo in leading comment.
12010         (anonymous_count): New global.
12011         (class_instance_creation_expression:): Handle anonymous classes.
12012         (anonymous_class_creation:): New rule.
12013         (push_class_context): Rewritten.
12014         (pop_class_context): Likewise.
12015         (INNER_QUALIFIER): Macro deleted.
12016         (report_class_declaration): call `push_class_context' when
12017         entering the function. `fprintf' format modified not to use
12018         INNER_QUALIFIER.
12019         (report_class_declaration): Assign `package_name' and
12020         `current_class' to NULL separately.
12021
12022 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12023
12024         * expr.c (build_invokeinterface): Call layout_class_methods on
12025         target interface.
12026
12027 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12028             Anthony Green  <green@cygnus.com>
12029             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12030
12031         * class.c (make_class_data): Create vtable for abstract classes.
12032         (get_dispatch_table): Changed to cope with abstract classes.
12033
12034 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12035
12036         * parse.y (patch_method_invocation): Don't reverse the argument
12037         list when dealing with anonymous class constructors. Fixed typo in
12038         comment.
12039
12040 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12041
12042         * parse.y (build_alias_initializer_parameter_list): Reverse
12043         crafted list when building aliases for anonymous class
12044         constructors.
12045
12046 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12047
12048         * parse.y (jdep_resolve_class): Don't bother checking potential
12049         innerclass access if `decl' is NULL.
12050         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12051         WFL.
12052
12053 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12054
12055         * parse.c: Remove (again.)
12056
12057 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12058
12059         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12060         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12061         outside the `if' statement, alias to innerclass removed, `decl'
12062         used to mark the class complete.
12063
12064 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12065
12066         * parse.y (simple_name:): Fixed typo in error message.
12067
12068 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12069
12070         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12071         or its first operand can be error marks.
12072
12073 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12074
12075         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12076         * parse.y (method_header): Likewise.
12077
12078 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12079
12080         * parse.y (process_imports): Consider that one might be trying to
12081         import an innerclass. Fixes gcj/254
12082
12083 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12084
12085         * parse.y (find_as_inner_class): Handle the case where the
12086         enclosing context of an innerclass has been loaded as bytecode.
12087
12088 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12089
12090         * parse.y (simple_name:): Reject `$' in type names.
12091         (resolve_type_during_patch): Use `type' as a second
12092         argument to resolve_no_layout. Fixes gcj/257.
12093
12094 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
12095
12096         * parse.y (find_most_specific_methods_list): Select the only
12097         non-abstract method even if max has been set.
12098         Fixes gcj/285, gcj/298.
12099
12100 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
12101
12102         * lang-specs.h: Added %(jc1) to java compiler options.
12103
12104 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12105
12106         * .cvsignore: New file.
12107
12108 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12109
12110         * parse.y (not_accessible_p): Access granted to innerclasses
12111         (indirectly) extending the reference type. Fixes gcj/249.
12112
12113 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12114
12115         * parse.y (patch_method_invocation): Fixed comment.
12116         (maybe_use_access_method): Build this$<n>s to the context of the
12117         target method, or a type that extends it. Fixes gcj/242.
12118
12119 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12120
12121         * parse.c: Remove.
12122
12123 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12124
12125         * parse.y (fold_constant_for_init): Avoid bullish conversion.
12126
12127 2000-07-13  Tom Tromey  <tromey@cygnus.com>
12128
12129         * lang-specs.h: Added %{I*}.
12130
12131 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12132
12133         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12134
12135 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12136
12137         * parse-scan.c: Remove.
12138
12139 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12140
12141         * class.c (set_super_info): Handled protected inner classes.
12142         (common_enclosing_context_p): Bail early if arguments aren't both
12143         inner classes.
12144         (get_access_flags_from_decl): Handle private and protected inner
12145         classes.
12146         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12147         (CLASS_PROTECTED): Likewise.
12148         (struct lang_type): New bitfield `poic'.
12149         * parse.y (jdep_resolve_class): Call check_inner_class_access on
12150         inner classes only.
12151         (check_inner_class_access): Renamed arguments, added
12152         comments. Handles protected inner classes (fixes gcj/225)
12153         (not_accessible_p): Fixed comments. Avoid handling inner classes.
12154
12155 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12156
12157         * parse.y (resolve_qualified_expression_name): Verify qualified
12158         access to `this'. Fixes gcj/239.
12159
12160 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12161
12162         * jcf-write.c (generate_classfile): Don't install ConstantValue
12163         for null pointers.
12164
12165 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12166
12167         * parse.y (resolve_qualified_expression_name): Handle inner class
12168         access. Fixes gcj/256.
12169
12170 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12171
12172         * jcf-write.c (generate_classfile): Properly install the
12173         ConstantValue attribute and the initial value constant pool index
12174         on string constants.
12175         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12176         class files.
12177
12178 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12179
12180         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12181         construct.
12182         * parse.y (find_as_inner_class): Fixed typo.
12183         (do_resolve_class): Explore enclosing contexts when searching for
12184         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12185         (check_inner_class_access): Check `decl' which can be null in case
12186         of previous errors.
12187
12188 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12189
12190         * java-tree.h (java_debug_context): Declared `extern'.
12191         (safe_layout_class): Likewise.
12192         * parse.y (resolve_field_access): Field must be `static' in order
12193         to be replaced by its initial value. Added comments.
12194         (find_applicable_accessible_methods_list): Fixed typo.
12195         (find_most_specific_methods_list): Methods found in innerclasses
12196         take over methods founds in the enclosing contexts.
12197         (java_complete_tree): Loosen restrictions on the type of DECLs
12198         that can be replaced by their initialization values.
12199         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12200
12201 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12202
12203         * Make-lang.in (PARSE_DIR): New macro.
12204         (PARSE_RELDIR): Likewise.
12205         (PARSE_C): Likewise.
12206         (PARSE_SCAN_C): Likewise.
12207         ($(PARSE_C)): New target.
12208         ($(PARSE_SCAN_C)): Likewise.
12209         (SET_BISON): New macro.
12210         (BISONFLAGS): Likewise.
12211         (JAVABISONFLAGS): Likewise.
12212
12213 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12214
12215         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12216         argument on the first pass for CNI as well as JNI.
12217         (print_method_info): Set up method name on the first pass only.
12218
12219 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12220
12221         * parse.y (parser_qualified_classname): Removed parameter
12222         `is_static'.
12223         (create_interface): Removed first passed parameter to
12224         parser_qualified_classname.
12225         (create_class): Likewise. Don't install alias on static
12226         innerclasses. Fixes gcj/275.
12227
12228 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12229
12230         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12231         debugable statement with empty_stmt_node. Fixes gcj/272
12232
12233 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12234
12235         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12236         gcj/271.
12237
12238 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12239
12240         * jcf-write.c (push_long_const): Appropriately cast short negative
12241         constant to jword.
12242
12243 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12244
12245         * parse.y (verify_constructor_super): Use loop variable
12246         `m_arg_type' initialized with `mdecl_arg_type'.
12247
12248 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12249
12250         * parse.y (resolve_field_access): Handle case where `type_found'
12251         is NULL.
12252
12253 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12254
12255         * expr.c (lookup_field): The same field can be found through two
12256         different interface. Don't declare it ambiguous in that case.
12257
12258 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12259
12260         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12261         follows \r, then unget it at a lower level.
12262
12263 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12264
12265         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12266         java_complete_tree.
12267
12268 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12269
12270         * parse.y (for_statement): Wrap expression in a WFL if it is a
12271         constant.  For PR gcj/268.
12272
12273 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12274
12275         * parse.y (do_resolve_class): Minor optimiztion in the package
12276         list search. Removed unnecessary test and return statement.
12277         (valid_ref_assignconv_cast_p): Order of arguments to
12278         enclosing_context_p fixed.
12279
12280 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12281
12282         * expr.c (lookup_field): Print error and return error_mark_node if
12283         field reference is ambiguous.
12284
12285         * parse.y (check_abstract_method_definitions): Also check if
12286         `other_method' is abstract.
12287
12288 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12289
12290         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12291         classes.
12292         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12293         (struct lang_type): New field `pic'.
12294         (CLASS_PRIVATE): New macro.
12295         * parse.y (check_inner_class_access): New function.
12296         (jdep_resolve_class): Call it.
12297
12298 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12299
12300         * parse.y (patch_incomplete_class_ref): Initialize the returned
12301         class.  For PR gcj/260.
12302
12303 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12304
12305         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12306
12307 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12308
12309         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12310         Java specific checks.
12311         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12312         screened by DECL_P.
12313         * java-tree.def (CASE_EXPR): Marked 'e'.
12314         (DEFAULT_EXPR): Likewise.
12315         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12316         screened by DECL_P.
12317         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12318         Java specific checks.
12319         (generate_bytecode_insns): Test try_block for BLOCK before using
12320         BLOCK_EXPR_BODY.
12321         * parse.y (build_wfl_wrap): Added `location' argument. Set
12322         EXPR_WFL_LINECOL accordingly.
12323         (dim_expr:): Wrap constants with WFLs.
12324         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12325         (resolve_package): Check for `stmt' not being a BLOCK before
12326         building a debuggable statement with it.
12327         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12328         invocation.
12329         (resolve_field_access): Make sure `decl' is a DECL before treating
12330         it as such.
12331         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12332         IDENTIFIER_NODE before treating it as such.
12333         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12334         treating it as such.
12335         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12336         to be applied only on non array types.
12337
12338 2000-06-16  Per Bothner  <per@bothner.com>
12339
12340         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12341         define in terms of DECL_RESULT, as that fails when --enable-checking.
12342
12343 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12344
12345         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12346         types the same in comparison.
12347         (CHECK_OP): Add static prototype.
12348
12349 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12350
12351         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12352         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12353         * parse.c: Rebuilt.
12354
12355 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12356
12357         * decl.c (create_primitive_vtable): Prototype.
12358
12359         * jcf-write.c (generate_bytecode_insns): Initialize variable
12360         `saved_context'.
12361
12362         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12363
12364 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12365
12366         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12367         to track searched classes, and do not search the same class more than
12368         once. Call find_applicable_accessible_methods_list on immediate
12369         superclass, instead of search_applicable_method_list on all ancestors.
12370         Fix for PR gcj/238.
12371
12372 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12373
12374         * parse.y (register_fields): Permit static fields in inner classes
12375         if they are final. Fix for PR gcj/255.
12376
12377 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12378
12379         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12380         * parse.y (find_in_imports): Returned type changed to void,
12381         leading comment fixed.
12382         (register_package): New function.
12383         (qualify_and_find): Likewise.
12384         (package_declaration:): Use `register_package'.
12385         (single_type_import_declaration:): Removed local variable
12386         `node'. Added missing `;' for consistency.
12387         (type_import_on_demand_declaration:): Use `chainon' to link new
12388         entries.
12389         (lookup_field_wrapper): Lookup local variables defined in outer
12390         contexts first.
12391         (java_complete_class): Don't reverse the list of imported on demand.
12392         (do_resolve_class): Reorganized. Removed local variable
12393         `original_name'. Call `qualify_and_find' with the current package
12394         name, invoke `find_in_imports_on_demand' right after. Call
12395         `qualify_and_find' with the packages we've seen so far. Fixed
12396         operations numbering in comments.
12397         (java_expand_class): Don't reverse `package_list'.
12398         (find_most_specific_methods_list): New local variables `abstract'
12399         and `candidates'. Use them to pick the right method.
12400
12401 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12402
12403         * parse.y (check_modifiers_consistency): Don't subtract out
12404         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12405
12406 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12407
12408         * Makefile.in (INTLLIBS): New.
12409         (LIBS): Add above.
12410         (DEPLIBS): Ditto.
12411
12412 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12413
12414         * class.c (get_dispatch_table): Build the vtable dummy entry list
12415         element with a null purpose. Fixed leading comment.
12416         (build_dtable_decl): Build an accurate dtable type when appropriate
12417         and use it.
12418
12419 2000-06-02  Richard Henderson  <rth@cygnus.com>
12420
12421         * lang.c (lang_get_alias_set): New.
12422
12423 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12424
12425         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12426         before using it as the accessed field.
12427
12428 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12429
12430         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12431         char_array_vtable, short_array_vtable, int_array_vtable,
12432         long_array_vtable, float_array_vtable, double_array_vtable):
12433         Declare.
12434         * expr.c (get_primitive_array_vtable): New function.
12435         (create_primitive_vtable): New function.
12436         (java_lang_expand_expr): Enable code to statically generate
12437         arrays.
12438         * decl.c (init_decl_processing): Create primitive vtables.
12439         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12440         short_array_vtable, int_array_vtable, long_array_vtable,
12441         float_array_vtable, double_array_vtable): Define.
12442
12443 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12444
12445         * java/parse.y (find_applicable_accessible_methods_list):
12446         Don't add an uninitialized value to the list.
12447
12448 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12449
12450         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12451         when trying to see if field's class should be initialized.  Always
12452         initialize field's declaring class, not qualified class.
12453         For PR gcj/162.
12454
12455         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12456         `wfl_operator', to maybe_build_primttype_type_ref.
12457         Fixes PR gcj/235.
12458
12459 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12460
12461         * parse.y (patch_method_invocation): Don't try to lookup methods
12462         in primitive types.
12463
12464 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12465
12466         * parse.y (resolve_field_access): Call the appropriate <clinit>
12467         before accessing the length of a static array. Craft a decl for
12468         the field while its time. Fixes PR gcj/129.
12469
12470 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12471
12472         * parse.y (resolve_package): Correctly set `*next' (was off by
12473         one.)
12474         (resolve_qualified_expression_name): Fixed comment.
12475
12476 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12477
12478         * jcf-parse.c (jcf_parse_source): Reset current_class and
12479         current_function_decl to NULL before parsing a new file.
12480
12481 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12482
12483         * parse.y (block_end:): If the collected block doesn't feature a
12484         statement, insert an empty statement.
12485
12486 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12487
12488         * parse.y (maybe_yank_clinit): New function.
12489         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12490         end of the list of methods belonging to a class.
12491         (java_complete_expand_method): Check whether <clinit> is really
12492         necessary and expand it accordingly.
12493
12494 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12495
12496         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12497         processed by the method's switch statement.
12498
12499 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12500
12501         * java-tree.h: Added init state enum.
12502         * decl.c (emit_init_test_initialization): Initialize class
12503         initialization check variable by looking at class' state.
12504
12505 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12506
12507         * java-tree.h (build_instanceof): Declare.
12508         (build_get_class): Declare.
12509         * parse.y (patch_binop): Use build_instanceof.
12510         * expr.c (build_instanceof): New function.  If class is final,
12511         don't make a function call.
12512         (expand_java_INSTANCEOF): Use it.
12513         (build_get_class): New function.
12514
12515 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12516
12517         * jcf-write.c (generate_classfile): Scan the source_file for
12518         slashes with the right pointer variable.
12519
12520 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12521
12522         * lang.c (lang_decode_option): Update -Wunused flags by calling
12523         set_Wunused.
12524         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12525
12526 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12527
12528         * check_init.c (check_init): Constify local char *.
12529         * class.c (push_class): Constify local char *.
12530         * java_tree.h: Update prototypes.
12531         * jcf-io.c (open_class): Constify filename parameter and
12532         return value.
12533         (find_class): Remove redundant string copy.  Cast return from
12534         open_class.
12535         * jcf-parse.c (read_class, parse_class_file, yyparse):
12536         Constify local char *.
12537         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12538         Constify local char *.
12539         * jcf.h (JCF): Constify filename and classname.
12540         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12541         * lang.c (init_parse): Constify parameter and return value.
12542         * lex.c (java_get_line_col): Constify filename parameter.
12543         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12544         * parse.y (java_parser_context_suspend,
12545         issue_warning_error_from_context, safe_layout_class): Constify
12546         local char *.
12547         * parse.c: Regenerate.
12548
12549 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12550
12551         * expr.c (build_jni_stub): Cache the result of
12552         _Jv_LookupJNIMethod.
12553
12554 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12555
12556         * decl.c (predef_filenames_size): Now 7.
12557         (predef_filenames): New seventh entry.
12558
12559 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12560
12561         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12562         Keep track of when we've seen a reference field after a
12563         non-reference field.
12564         (get_boehm_type_descriptor): Handle case where we see
12565         non-reference fields but no trailing reference field.
12566         * decl.c (rawdata_ptr_type_node): Define.
12567         (init_decl_processing): Initialize rawdata_ptr_type_node.
12568         * java-tree.h (rawdata_ptr_type_node): Declare.
12569
12570 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12571
12572         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12573         specifiers in calls to fprintf.
12574
12575 2000-05-03  Andrew Haley  <aph@cygnus.com>
12576
12577         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12578
12579         * javaop.h (WORD_TO_INT): New function.
12580         (IMMEDIATE_s4): Use WORD_TO_INT.
12581         * jcf.h (JPOOL_INT): Ditto.
12582
12583         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12584         separator.
12585
12586 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12587
12588         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12589         on native function.
12590         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12591         JNI methods.
12592         * expr.c (build_jni_stub): New function.
12593         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12594         * parse.c: Rebuilt.
12595         * parse.y (java_complete_expand_methods): Expand a native method
12596         and call build_jni_stub if -fjni given.
12597         * lang-options.h: Document -fjni.
12598         * lang.c (flag_jni): New global.
12599         (lang_f_options): Added `jni' entry.
12600         * java-tree.h (soft_lookupjnimethod_node,
12601         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12602         Declare.
12603         (flag_jni): Declare.
12604         (build_jni_stub): Declare.
12605         (struct lang_decl): Added `native' flag.
12606         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12607         structure.
12608         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12609         soft_jnipopsystemframe_node): New globals.
12610         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12611         argument.
12612
12613         * java-tree.def: Put into `C' mode.
12614
12615 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12616
12617         Fix for PR gcj/2:
12618         * expr.c (expand_invoke): Generate check to see if object pointer
12619         is null in nonvirtual invocation case.
12620         * java-tree.h (soft_nullpointer_node): Declare.
12621         * decl.c (soft_nullpointer_node): New global.
12622         (init_decl_processing): Initialize soft_nullpointer_node.
12623         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12624         or `private' methods.
12625         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12626
12627 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12628
12629         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12630         from <clinit>
12631
12632 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12633
12634         * zextract.c (find_zip_file_start): New function.
12635         (read_zip_archive): Use it.
12636
12637 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12638
12639         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12640
12641 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12642
12643         * class.c (common_enclosing_context_p): New function.
12644         * java-tree.h (common_enclosing_context_p): Added prototype.
12645         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12646         classes sharing an outer context with the current instance.
12647         * parse.y (build_access_to_thisn): Fixed leading comment.
12648         (verify_constructor_super): New local `supper_inner'. Skip
12649         enclosing context argument in the case of inner class constructors.
12650         (patch_method_invocation): Insert proper context as second
12651         parameter to pure inner class constructor super invocations.
12652
12653 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12654
12655         * parse.y (end_class_declaration): Reset the interface number
12656         counter.
12657
12658 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12659
12660         * parse.y (source_start_java_method): Deleted unnecessary code.
12661         (patch_method_invocation): Fixed comment.
12662
12663 2000-04-24  Robert Lipe <robertlipe@usa.net>
12664
12665         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12666
12667 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12668
12669         * boehm.c (mark_reference_fields): Use int_byte_position.
12670
12671 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12672
12673         * boehm.c (mark_reference_fields): Only call byte_position on
12674         non-static fields.
12675
12676 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12677
12678         * boehm.c (mark_reference_fields): Added `last_view_index'
12679         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12680
12681 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12682
12683         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12684         * parse.y (check_class_interface_creation): Fixed comments. Select
12685         permitted modifiers for (inner) interfaces. Changed error message
12686         to report rejected modifiers used with local classes.
12687
12688 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12689
12690         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12691         of directly inherited type considered in scope.
12692         * parse.y (do_resolve_class): Search inherited classes for inner
12693         classes.
12694
12695 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12696
12697         * parse.y (not_accessible_p): Use member's class, not current
12698         class, when doing inheritance check for protected reference.
12699         Fixes PR gcj/124.
12700
12701 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12702
12703         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12704
12705 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12706
12707         * parse.y (lookup_field_wrapper): Search for final local aliases.
12708         (resolve_expression_name): Let lookup_field_wrapper search for
12709         final local aliases. Force the value of `name' if one is found.
12710         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12711         an expression name. Fixed comments.
12712
12713 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12714
12715         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12716
12717 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12718
12719         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12720
12721 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12722
12723         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12724
12725 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12726
12727         PR gcj/211:
12728         * gjavah.c (utf8_cmp): Changed return value.
12729         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12730         result.
12731         (cxx_keywords): New global.
12732         (get_field_name): Handle new result of cxx_keyword_subst.
12733         (print_method_info): Likewise.
12734
12735 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12736
12737         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12738         with a newline, for CNI.
12739         (print_stub_or_jni): Print a space or newline before method name for
12740         CNI as well as JNI.
12741         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12742         (process_file): Include gcj/cni.h if generating CNI stubs.
12743
12744 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12745
12746         * gjavah.c (decompile_method): Use print_field_name.
12747         Fixes PR gcj/205.
12748
12749 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12750
12751         * parse.y (java_expand_classes): Reverse the package list once.
12752         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12753         reduction.
12754         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12755         the `==' and `!=' operators.
12756
12757 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12758
12759         * jcf-write.c (generate_bytecode_insns): At invocation time,
12760         always relate an interface method to the type of its selector.
12761
12762 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12763
12764         Fix for PR gcj/2:
12765         * expr.c (expand_invoke): Generate check to see if object pointer
12766         is null in nonvirtual invocation case.
12767         * java-tree.h (soft_nullpointer_node): Declare.
12768         * decl.c (soft_nullpointer_node): New global.
12769         (init_decl_processing): Initialize soft_nullpointer_node.
12770         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12771         or `private' methods.
12772         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12773
12774 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12775
12776         Fix for PR gcj/140:
12777         * parse.y (check_final_assignment): Recognize assignments to the
12778         `length' field of an array when generating class files.
12779
12780 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12781
12782         * class.c (decl_hash): Prototype removed.
12783         (decl_compare): Likewise.
12784
12785 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12786
12787         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12788         * parse.y (check_modifiers_consistency): Check for final/volatile
12789         clash.  Fixes PR gcj/164.
12790
12791 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12792
12793         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12794         made global.
12795         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12796         global.
12797         (add_method_1): Use `java_hash_hash_tree_node' and
12798         `java_hash_compare_tree_node'.
12799         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12800         (java_hash_compare_tree_node): Likewise.
12801         * parse.y (find_applicable_accessible_methods_list): Create,
12802         delete and use a hash table to remember already searched interfaces.
12803
12804 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12805
12806         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12807         with latest entry.
12808
12809 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12810
12811         * boehm.c (mark_reference_fields, set_bit): Prototype.
12812         (set_bit): Un-ANSI-fy definition.
12813
12814         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12815         Prototype.
12816
12817         * decl.c (emit_init_test_initialization): Likewise.
12818
12819         * gjavah.c (jni_print_char): Likewise.
12820
12821         * parse.y (create_new_parser_context): Likewise.
12822
12823 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12824
12825         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12826         patch missing hunk. Fixed indentation.
12827
12828 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12829
12830         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12831         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12832
12833 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12834
12835         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12836         when negative *before* using it as an array index.
12837         * ChangeLog: Fixed typo.
12838
12839 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12840
12841         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12842         to 0 when it reaches -1.
12843
12844 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12845
12846         * jcf-parse.c (get_constant): Properly cast `num' during the
12847         invocation of `add_double'.
12848         * jcf-write.c (push_long_const): Properly cast `lo' before
12849         comparing it to short bounds.
12850         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12851         `interface_body:' is reduced after the current interface is
12852         pushed.
12853
12854 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12855
12856         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12857         Java-specific `-f' option.
12858
12859 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12860
12861         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12862         Adjust order of making types.
12863         Make bitsize_*_node values.
12864
12865 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12866
12867         * class.c (make_field_value): Use byte_position.
12868         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12869         (java_array_data_offset): Likewise.
12870         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12871         bzero call.
12872
12873 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12874
12875         * parse.y (check_abstract_method_definitions): New local
12876         `end_type_reached'. Make sure we also consider `end_type'.
12877         (java_check_abstract_method_definitions): Make sure we eventually
12878         consider `java.lang.Object'.
12879         (maybe_use_access_method): Don't use access method if not in the
12880         context of a pure inner class or if the method's context is right.
12881         (find_applicable_accessible_methods_list): New static flag
12882         `object_done'. Don't search abstract classes as interfaces. Fixed
12883         indentation. Fixed the `java.lang.Object' only search. Search
12884         class interface(s) first, then fully search enclosing contexts.
12885         (find_most_specific_methods_list): Pick the closest candidate when
12886         they're all abstract.
12887
12888 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12889
12890         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12891         properly initialize `finished_label'. Don't emit gotos for empty
12892         try statements.
12893
12894 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12895
12896         * except.c (emit_handlers): Clear catch_clauses_last.
12897
12898 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12899
12900         * parse.y (check_method_types_complete): New function.
12901         (create_class): Reset anonymous class counter only when seeing an
12902         non inner classe.
12903         (java_complete_class): JDEP_METHOD: Don't recompute signature
12904         if incomplete.
12905
12906 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12907
12908         * class.c (build_static_ref): Fixed indentation in comment.
12909         * java-tree.def (TRY_EXPR): Fixed typo in name.
12910         (CLASS_LITERAL): Likewise.
12911         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12912         (struct lang_type): New field `dot_class'.
12913         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12914         (generate_classfile): Method `class$' is synthetic.
12915         * parse.y (build_do_class_method): New function.
12916         (build_dot_class_method_invocation): Likewise.
12917         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12918         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12919         (qualify_ambiguous_name): Likewise.
12920         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12921         (build_try_statement): Fixed leading comment.
12922
12923 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12924
12925         * class.c (make_field_value): Properly handle sizes.
12926         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12927         (layout_class_method): Count using trees.
12928         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12929         * expr.c (java_array_data_offset): Use int_bit_position.
12930         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12931         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12932
12933 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12934
12935         * lang.c (flag_hash_synchronization): New global.
12936         (lang_f_options): Added `hash-synchronization'.
12937         * lang-options.h: Mention -fhash-synchronization.
12938         * java-tree.h (flag_hash_synchronization): Declare.
12939         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12940         hash table synchronization is disabled.
12941         * decl.c (init_decl_processing): Only push `sync_info' value when
12942         hash table synchronization is disabled.
12943         * class.c (make_class_data): Only push `sync_info' field when hash
12944         table synchronization is disabled.  Removed dead code.
12945
12946 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12947
12948         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12949
12950 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12951
12952         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12953         classes.
12954         * parse.y (patch_method_invocation): Handle anonymous classes
12955         creation in static context.
12956
12957 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12958
12959         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12960         * parse.y (resolve_qualified_expression_name): Use it.
12961         (patch_method_invocation): Likewise.
12962
12963 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12964
12965         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12966         depending on the type of dependency which dictates what the
12967         current class is.
12968         (unresolved_type_p): Resolved types limited to the current class.
12969
12970 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12971
12972         * decl.c (init_decl_processing): Set type of `sync_info' to be
12973         pointer to Object.
12974
12975         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12976         Correctly compute bit number for current slot.  Zero `high' and
12977         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12978         mark_reference_fields.
12979         (mark_reference_fields): New function.
12980
12981 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12982
12983         * parse.y (register_incomplete_type): Fixed initialization of
12984         JDEP_ENCLOSING.
12985
12986 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12987
12988         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12989         static globals.
12990         (push_class_context, pop_class_context): New function.
12991         (class_body:): Call pop_class_context.
12992         (interface_body:): Likewise.
12993         (INNER_QUALIFIER): New macro.
12994         (report_class_declaration): Changed output format and use
12995         INNER_QUALIFIER. Call push_class_context.
12996
12997 2000-02-14  Andrew Haley  <aph@cygnus.com>
12998
12999         * check-init.c (check_init): Add new cases for unary and binary
13000         tree nodes.
13001
13002 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13003
13004         * parse.y (resolve_package): Set `next' once a type name has been
13005         progressively discovered.
13006         (resolve_qualified_expression_name): Propagate resolution only if
13007         there are remaining qualifiers. Take into account `q' might have
13008         been cleared after re-qualification.
13009         * parse.y (patch_method_invocation): New local `resolved'.
13010         Section dealing with qualified expression rewritten to use
13011         resolve_field_access.
13012
13013 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13014
13015         * parse.h (PUSH_CPC): Fixed indentation.
13016         (DEBUG_CPC): New macro.
13017         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13018         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13019         * parse.y (class_body_declaration:): Use
13020         SET_CPC_INSTANCE_INITIALIZER_STMT.
13021         (method_declaration:): Check for null current_function_decl.
13022         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13023         (java_parser_context_pop_initialized_field): Better handling of
13024         empty lists.
13025         (maybe_make_nested_class_name): Mark nested class name as
13026         qualified when necessary.
13027         (end_class_declaration): Don't call java_parse_context_resume when
13028         one or more error occurred.
13029         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13030         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13031         SET_CPC_INITIALIZER_STMT.
13032         (method_header): Check for inner classes declaring static methods.
13033         (resolve_qualified_expression_name): Handle situation where `this'
13034         is implied.
13035
13036 2000-03-13  Hans Boehm <boehm@acm.org>
13037
13038         * typeck.c (build_prim_array_type): Correctly set the high word too.
13039
13040 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13041
13042         * parse.y (java_complete_expand_methods): Leave <clinit> out of
13043         ordinary methods.
13044         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13045         list of methods for interfaces.
13046
13047 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13048
13049         * parse.y (qualify_ambiguous_name): Properly handle expressions
13050         using `null'.
13051
13052 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13053
13054         * parse.y (check_final_assignment): Extended to process
13055         COMPOUND_EXPR.
13056         (patch_assignment): Have check_final_assignment called only once.
13057
13058 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13059
13060         * java-tree.h (IS_INIT_CHECKED): New flag.
13061         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13062         * parse.y (patch_string): Call force_evaluation_order on the
13063         completed string concatenation tree.
13064         * expr.c (force_evaluation_order): Call force_evaluation_order on
13065         function's arguments too.
13066
13067 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13068
13069         * decl.c (emit_init_test_initialization): Mark KEY as unused.
13070         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13071         (build_anewarray): Likewise.
13072         * parse.y (patch_newarray): Likewise.
13073         * parse.c: Regenerated.
13074
13075 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
13076
13077         * decl.c (init_decl_processing): Added new class fields `depth',
13078         `ancestors', and `idt' to class_type_node. Use
13079         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13080         * class.c (make_class_data): Push initial values for new fields.
13081         * java-tree.h: Updated prototype for `build_invokeinterface'.
13082         * expr.c (build_invokeinterface): Changed parameters to accept
13083         `method' tree. Calculate index of `method' in its declaring
13084         interface. Build call to _Jv_LookupInterfaceMethodIdx.
13085         (expand_invoke): Call `build_invokeinterface' with new parameters.
13086         * parse.y (patch_invoke): Call `build_invokeinterface' with new
13087         parameters.
13088
13089 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
13090
13091         * typeck.c (lookup_do): Search superinterfaces first
13092         when looking up an interface method. From Godmar Back
13093         <gback@cs.utah.edu>
13094
13095 2000-03-06  Tom Tromey  <tromey@cygnus.com>
13096
13097         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13098
13099 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13100
13101         * java-tree.h (lookup_argument_method2): Declared.
13102         (safe_layout_class): Prototype moved from parse.h.
13103         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13104         * parse.y (java_check_regular_methods): Local `super_class' gone.
13105         Call lookup_argument_method2 instead of lookup_argument_method.
13106         Perform modifier match for methods found declared in implemented
13107         interfaces. Fixed indentation problem. Overriding/hiding error
13108         report to take place only for methods found in classes.
13109         * typeck.c (lookup_argument_method): Changed leading
13110         comment. Re-written by calling lookup_do.
13111         (lookup_argument_method2): New function.
13112         (lookup_java_method): Re-written by calling lookup_do.
13113         (lookup_do): New function.
13114
13115 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13116
13117         * check-init.c (check_init): Removed dead code. Handle (blank)
13118         final variables.
13119         * parse.y (declare_local_variables): New local `final_p', set it
13120         and use it to initialize LOCAL_FINAL.
13121         (check_final_assignment): Only check FIELD_DECLs.
13122
13123 2000-02-17  Tom Tromey  <tromey@cygnus.com>
13124
13125         * Makefile.in (JAVA_OBJS): Added boehm.o.
13126         (boehm.o): New target.
13127         * Make-lang.in (JAVA_SRCS): Added boehm.c.
13128         * java-tree.h (flag_use_boehm_gc): Declare.
13129         (get_boehm_type_descriptor): Declare.
13130         * lang.c (lang_f_options): Added `use-boehm-gc'.
13131         (flag_use_boehm_gc): New global.
13132         * lang-options.h: Added -fuse-boehm-gc.
13133         * boehm.c: New file.
13134         * class.c (get_dispatch_table): If class uses a Boehm type
13135         descriptor, put it in the vtable.
13136         (make_class_data): Removed dead code.
13137
13138 2000-03-03  Per Bothner  <per@bothner.com>
13139
13140         * decl.c (init_decl_processing):  Initialize sizetype properly.
13141
13142 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13143
13144         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13145         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13146         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13147         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13148         (jcf_parse): New local `current'. Load innerclasses seen in outer
13149         context being processed.
13150         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13151         * jcf-write.c (append_innerclasses_attribute): New function.
13152         (append_innerclasses_attribute_entry): Likewise.
13153         (get_access_flags): Handle static classes. Set anonymous and local
13154         classes to be private.
13155         (generate_classfile): Attribute count adjusted. Call
13156         append_innerclasses_attribute.
13157         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13158         PURE_INNER_CLASS_TYPE_P.
13159         * parse.y (parser_qualified_classname): New parameter `is_static',
13160         produce non qualified name accordingly.
13161         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13162         (create_interface): Added argument to parser_qualified_classname.
13163         (create_class): Added argument to parser_qualified_classname. Setup
13164         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13165         (add_inner_class_fields): Fixed indentation.
13166         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13167         (method_declarator): Fixed typo in comment.
13168         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13169         (build_current_thisn): Likewise.
13170         (patch_method_invocation): Likewise.
13171
13172 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13173
13174         * decl.c (current_function_decl): Move to toplev.c.
13175
13176 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13177
13178         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13179         (DECL_BIT_INDEX): Use underlying representation.
13180         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13181
13182 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13183
13184         * expr.c (build_java_ret): Pass proper type to size_binop.
13185
13186 2000-02-25  Anthony Green  <green@cygnus.com>
13187
13188         * expr.c (build_class_init): Mark the decl to be ignored by
13189         check_init.
13190         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13191         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13192         * class.c (init_test_hash_newfunc): New function.
13193         (decl_hash): New function.
13194         (decl_compare): New function.
13195         * decl.c (emit_init_test_initialization): New function.
13196         (complete_start_java_method): Traverse the init test hashtable,
13197         calling emit_init_test_initialization.
13198         (always_initialize_class_p): Define.
13199         * expr.c (build_class_init): Use initialization tests when
13200         emitting class initialization code.
13201         (always_initialize_class_p): Declare.
13202         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13203         1.
13204         * java-tree.h: Include hash.h.
13205         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13206         (struct lang_decl): Add init_test_table field.
13207         (init_test_hash_entry): Define.
13208
13209 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13210
13211         * gjavah.c (main): Avoid using `argi' to report unimplemented
13212         options.
13213
13214 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13215
13216         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13217         initialize locals to avoid warnings. Local `exception_type' moved
13218         into if statement.
13219
13220 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13221
13222         * parse.y (resolve_expression_name): Use `orig' as a second
13223         argument to resolve_field_access.
13224         (resolve_field_access): Removed unnecessary code when dealing with
13225         static fields.
13226
13227 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13228
13229         * class.c (push_super_field): Don't push the field twice.
13230         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13231         * parse.h (java_reorder_fields): Prototyped.
13232         * parse.y (java_reorder_fields): New function.
13233         (java_layout_class): Simplified not to worry about re-ordering.
13234
13235 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13236
13237         * gjavah.c (print_name): In JNI case, correctly quote string.
13238         (print_method_info): Don't handle overrides in JNI mode.
13239
13240 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13241
13242         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13243         value type set to `boolean_type_node'.
13244
13245 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13246
13247         * jcf-dump.c (main): Test for correct condition after
13248         output file creation.
13249
13250 2000-02-19  Anthony Green  <green@cygnus.com>
13251
13252         * jcf-depend.c (add_entry): Fix test for first list entry.
13253
13254 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13255
13256         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13257         * constants.c (build_constants_constructor): Likewise.
13258
13259 2000-02-19  Anthony Green  <green@cygnus.com>
13260
13261         * jcf-depend.c (add_entry): Add entries to the end of the list.
13262
13263 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13264
13265         * decl.c (INT_TYPE_SIZE): Define if necessary.
13266         (expand_java_return): Handle the case of a native integer smaller
13267         than a JVM integer.
13268
13269 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13270
13271         * gjavah.c (help): Use GCCBUGURL.
13272         * jv-scan.c (help): Likewise.
13273         * jcf-dump.c (help): Likewise.
13274
13275 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13276
13277         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13278         `finally' clauses.
13279
13280 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13281
13282         * jcf-parse.c (load_class): Call `fatal' if no file containing
13283         the target class are found.
13284
13285 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13286
13287         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13288         lex.c, lex.h, and PARSE_H to...
13289         (parse.o, parse-scan.o): ...here, respectively.
13290
13291         * lex.c: Split out code that may trigger SIGFPE from yylex()
13292         to its own function.
13293         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13294
13295 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13296
13297         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13298
13299 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13300
13301         * parse.y (outer_field_access_p): Stop in time when outer contexts
13302         are exhausted.
13303         (resolve_qualified_expression_name): Properly qualify *everything*
13304         after a package.type to be resoled as expression names.
13305         (find_applicable_accessible_methods_list): Save/restore `class' to
13306         isolate it from a possible outer context search.
13307
13308 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13309
13310         * gjavah.c (jni_print_char): New function.
13311         (print_full_cxx_name): Use it.
13312         (decode_signature_piece): Likewise.
13313         (print_cxx_classname): Likewise.
13314
13315 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13316
13317         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13318         version.o.
13319         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13320
13321         * gjavah.c: Include version.h.
13322
13323         * jcf-dump.c: Likewise.
13324
13325         * jv-scan.c: Likewise.
13326
13327 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13328
13329         * parse.y (outer_field_access_fix): First parameter now a tree
13330         node. Check for assignment to final. First argument to
13331         build_outer_field_access_fix modified to accommodate prototype.
13332         (build_outer_field_access): Don't check for assignment to final
13333         here.
13334         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13335         possibly returned by outer_field_access_fix. Changed
13336         outer_field_access_fix's first argument.
13337         (check_final_assignment): $finit$'s context is OK.
13338         (patch_unaryop): Use node instead of its line/column value when
13339         calling outer_field_access_fix.
13340
13341 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13342
13343         * parse.y (interface_declaration:): No longer tagged
13344         <node>. Re-installed default action.
13345         (class_member_declaration:): Handle inner interfaces.
13346         (interface_member_declaration): Handle inner interfaces and
13347         classes.
13348         (create_interface): Push error if one seen. Suspend parsing
13349         context when processing an inner interface.
13350         (register_fields): Inner class static field limitations not to
13351         apply to inner interfaces.
13352
13353 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13354
13355         * jcf-parse.c (load_class): Update `java_error_count' when a
13356         class' file can't be found.
13357         (parse.y): Avoid (byte)code generation when errors seen.
13358
13359 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13360
13361         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13362         decodes a valid node.
13363         (patch_binop): Handle TRUNC_DIV_EXPR.
13364
13365 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13366
13367         * parse.y (resolve_package): New local `acc'. Try to progressively
13368         build and guess a package and type name.
13369
13370 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13371
13372         * parse.y (find_applicable_accessible_methods_list): Load and
13373         layout the search class if necessary.
13374         (java_complete_tree): Keep to original type of the folded initial
13375         value.
13376
13377 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13378
13379         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13380         Generate error message if circularity is detected. New static
13381         local `list'.
13382         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13383         * jcf-write.c (generate_bytecode_insns): Very simply handle
13384         SAVE_EXPR.
13385         * parse.y (java_check_circular_reference): Use
13386         `cyclic_inheritance_report' during report, if necessary.
13387         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13388         walking NEW_ARRAY_INIT twice.
13389
13390 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13391
13392         * parse.y (check_class_interface_creation): Allow inner classes to
13393         be `private' or `protected', check modifiers' consistency. Prevent
13394         block local classes from bearing any modifiers.
13395
13396 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13397
13398         * except.c (check_start_handlers): Re-add prototype lost in last
13399         patch.
13400         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13401
13402 2000-02-09  Andrew Haley  <aph@cygnus.com>
13403
13404         * decl.c (clear_binding_level): Remove excess initializer.
13405         (maybe_poplevels): Remove unused variable.
13406         (force_poplevels): Ditto.
13407         (struct binding_level): Add comment.
13408
13409 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13410
13411         * jcf-write.c (generate_classfile): Don't consider
13412         pre-initialization with reference value (use <clinit> instead.)
13413         * parse.y (java_fix_constructors): No generated constructor for
13414         interfaces.
13415         (build_outer_field_access): Removed debug message.
13416         (outer_field_expanded_access_p): Adapted to bytecode generation.
13417         (build_outer_field_access_method): Use fix_method_argument_names.
13418         (build_outer_method_access_method): Fixed indentation. Added
13419         comment. Handle access method generation for static and also void
13420         methods.
13421         (build_access_to_thisn): Inserted debug message.
13422         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13423         (resolve_qualified_expression_name): Fixed comment.
13424         (not_accessible_p): Adapted to bytecode generation. Added comment.
13425         (patch_method_invocation): Added comment.
13426         (maybe_use_access_method): Fixed leading comment. Handle static
13427         methods.
13428         (java_complete_lhs): Don't shortcut handling of initialized upon
13429         declaration String type static fields when generating bytecode.
13430         (patch_unaryop): Handle outer field access when generating
13431         bytecode.
13432
13433 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13434
13435         * java-tree.h (FIELD_THISN): New macro.
13436         * jcf-write.c (append_synthetic_attribute): New function.
13437         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13438         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13439         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13440         this$<n> fields.
13441         (build_outer_field_access): Turned on access functions usage and
13442         generation when compiling to bytecode.
13443         (maybe_use_access_method): Likewise.
13444
13445 2000-01-25  Andrew Haley  <aph@cygnus.com>
13446
13447         * java-except.h (struct eh_range): Add `expanded' field.
13448         (maybe_start_try): Add end_pc arg.
13449         (maybe_end_try): Ditto.
13450         * java-tree.h (force_poplevels): new function.
13451         * expr.c (expand_byte_code): Don't call maybe_start_try or
13452         maybe_end_try.
13453         * except.c (add_handler): Reset expanded.
13454         (expand_start_java_handler): Set expanded.
13455         (check_start_handlers): Don't expand a start handler that's
13456         already been expanded.
13457         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13458         ends after end_pc.
13459         (expand_end_java_handler): call force_poplevels.
13460         (force_poplevels): new function.
13461         * decl.c (binding_level): Add start_pc of binding level.
13462         (maybe_pushlevels): Call maybe_start_try when pushing binding
13463         levels.
13464         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13465         (LARGEST_PC): Define.
13466         (clear_binding_level): Use LARGEST_PC.
13467
13468         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13469         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13470         (binding_depth, is_class_level, current_pc): new variables.
13471         (struct binding_level): ditto.
13472         (indent): new function.
13473         (push_jvm_slot): add debugging info.
13474         (maybe_pushlevels): ditto.
13475         (maybe_poplevels): ditto.
13476         (pushlevel): ditto.
13477         (poplevel): ditto.
13478         (start_java_method): ditto.
13479         (give_name_to_locals): comment only.
13480         * except.c (binding_depth, is_class_level, current_pc):
13481         new variables.
13482         (expand_start_java_handler): add debugging info.
13483         (expand_end_java_handler): ditto.
13484
13485 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13486
13487         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13488         (print_name_for_stub_or_jni, process_file): Constify a char*.
13489
13490 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13491
13492         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13493
13494 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13495
13496         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13497         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13498         defined to be 1.
13499
13500 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13501
13502         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13503         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13504         (struct lang_type): New field `ii_block'.
13505         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13506         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13507         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13508         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13509         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13510         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13511         macros.
13512         * parse.y (add_instance_initializer): New function.
13513         (in_instance_initializer): New static global.
13514         (class_body_declaration:): Link instance initializer block.
13515         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13516         (array_creation_expression:): Remove unused local.
13517         (java_parser_context_push_initialized_field): Fixed leading
13518         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13519         CPC_INSTANCE_INITIALIZER_LIST.
13520         (java_parser_context_pop_initialized_field): Likewise.
13521         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13522         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13523         CPC_INITIALIZER_STMT.
13524         (fix_constructors): New local `class_type'. Use it. Call
13525         add_instance_initializer.
13526         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13527         (patch_return): Forbid return in instance initializers.
13528         (patch_throw_statement): Enforce exception handling in the context
13529         of instance initializers.
13530
13531 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13532
13533         * Make-lang.in (java.mostlyclean): Remove executables in
13534         `mostlyclean'.
13535
13536 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13537
13538         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13539         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13540         (java_float_finite): Convert to use union Word from javaop.h.
13541         (java_double_finite): Convert to use union DWord from javaop.h.
13542
13543 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13544
13545         * gjavah.c (options): Added `jni' entry.
13546         (help): Document -jni.
13547         (flag_jni): New global.
13548         (process_file): Handle JNI output.  Don't print text from
13549         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13550         suffix if it actually exists.
13551         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13552         correct output file name with `--jni'.
13553         (print_include): Mangle header name differently in JNI case.
13554         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13555         method list.
13556         (print_method_info): Handle JNI case.  Put signature info into
13557         method name.  Handle case when STREAM is NULL.
13558         (print_name_for_stub_or_jni): New function.
13559         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13560         (print_cxx_classname): Handle JNI.
13561         (print_full_cxx_name): Likewise.
13562         (decode_signature_piece): Likewise.
13563         (overloaded_jni_method_exists_p): New function.
13564         (struct method_name): Added `signature' and `sig_length' fields.
13565         (HANDLE_END_FIELD): Do nothing in JNI mode.
13566
13567 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13568
13569         * jv-scan.c: Include version.c, <getopt.h>.
13570         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13571         (options): New array.
13572         (usage): New function.
13573         (version): New function.
13574         (main): Use getopt_long to parse command line.
13575         * jcf-dump.c: Include version.c, <getopt.h>.
13576         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13577         OPT_JAVAP): New macros.
13578         (options): New array.
13579         (usage): Return `void'.  Changed message.
13580         (help): New function.
13581         (version): New function.
13582         (main): Use getopt_long_only to parse command line.
13583         * gjavah.c: Include <getopt.h>.
13584         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13585         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13586         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13587         (options): New array.
13588         (java_no_argument): Removed.
13589         (help): Updated with missing options.
13590         (main): Use getopt_long_only to parse command line.
13591         (usage): Changed message.
13592
13593 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13594
13595         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13596         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13597         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13598         * parse.y (array_creation_expression:): Handle anonymous arrays.
13599         (build_array_from_name): Don't set `ret_name' if null.
13600         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13601         (qualify_ambiguous_name): Likewise.
13602         (java_complete_expand_class): Likewise.
13603
13604 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13605
13606         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13607         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13608         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13609         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13610         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13611         AIPL_FUNCTION_COMPLETED_INVOCATION.
13612         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13613         AIPL_FUNCTION_INVOCATION_READY.
13614         (AIPL_FUNCTION_DECLARATION): New enum entry.
13615         * parse.y (reorder_static_initialized): New function.
13616         (java_parser_context_pop_initialized_field): Use it.
13617         (add_inner_class_fields): Use
13618         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13619         augmented. Install marker after last alias initializer, if any.
13620         (generate_finit): Fixed typo. Don't try to retain only the used
13621         fields.
13622         (method_header): Compute and set DECL_FUNCTION_NAP.
13623         (method_declarator): Fixed comment. Insert alias initializer in
13624         parameter list.
13625         (build_alias_initializer_parameter_list): Fixed leading
13626         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13627         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13628         (java_complete_expand_class): Code to retain only used aliases
13629         removed.
13630         (java_complete_expand_methods): New local `first_decl'. Generate
13631         $finit$ first, then expand the constructors, regular methods and
13632         <clinit>.
13633         (java_complete_expand_method): Don't report error on missing
13634         return statement if previously detected bogus.
13635         (fix_constructors): Don't patch constructor parameters list.
13636         (patch_method_invocation): Use new AIPL enum values. Reverse
13637         alias initializer list for anonymous classes.
13638
13639 2000-01-30  Anthony Green  <green@redhat.com>
13640
13641         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13642         determine how many stack slots to pop.
13643
13644 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13645
13646         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13647         error handling/recovery.
13648         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13649
13650 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13651
13652         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13653         FIELD_LOCAL_ALIAS_USED): New macros.
13654         (DECL_FUNCTION_NAP): New macro.
13655         (struct lang_decl): New field `nap'.
13656         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13657         (struct lang_type): New fields `finit_stmt_list' and
13658         `clinit_stmt_list'.
13659         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13660         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13661         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13662         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13663         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13664         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13665         (BUILD_THROW): Macro line separator re-indented.
13666         * parse.y (end_class_declaration): New function.
13667         (maybe_generate_pre_expand_clinit): New name for
13668         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13669         pre-expand static fields.
13670         (maybe_generate_clinit): Function deleted.
13671         (check_for_static_method_reference): Prototype's parameter list
13672         indented.
13673         (generate_finit): New name for maybe_generate_finit. Changed
13674         leading comment. Function rewritten to use
13675         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13676         (build_alias_initializer_parameter_list): New function.
13677         (java_parser_context_pop_initialized_field): Likewise.
13678         (add_inner_class_fields): Likewise.
13679         (type_declaration:): Call end_class_declaration.
13680         (class_member_declaration:): Likewise.
13681         (formal_parameter_list:): Fixed typos.
13682         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13683         element. Improved error handling.
13684         (block_statement:): Call end_class_declaration.
13685         (anonymous_class_creation:): Likewise.
13686         (create_anonymous_class): Fixed comments.
13687         (create_class): Call add_inner_class_fields.
13688         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13689         (method_header): Use MARK_FINAL_PARMS.
13690         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13691         (method_declarator): Propagate final argument flag.
13692         (craft_constructor): New local `artificial'. Call
13693         build_alias_initializer_parameter_list. Use
13694         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13695         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13696         necessary.
13697         (complete_expand_class): Get rid of unused outer context local
13698         alias fields.
13699         (java_complete_expand_methods): Fixed leading
13700         comment. Generate/pre-expand <clinit> first. Changed method
13701         expansion order to regular, $finit$, constructors, <clinit>.
13702         (java_complete_expand_method): Set current_function_decl.
13703         (fix_constructors): Fix constructor parameter list to account for
13704         outer context local alias initializers.
13705         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13706         (resolve_expression_name): Lookup outer context local aliases. New
13707         local `access', use it.
13708         (patch_method_invocation): Patch inner class ctor invocation with
13709         outer context local aliases initialization values. $finit$
13710         invocation patching now includes things generated with
13711         build_alias_initializer_parameter_list.
13712         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13713         (build_super_invocation): Likewise.
13714         (patch_assignment): Changed comment.
13715
13716 2000-01-27  Andrew Haley  <aph@cygnus.com>
13717
13718         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13719         (emit_if): Ditto.
13720         (emit_jsr): Ditto.
13721
13722 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13723
13724         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13725         concatenation.
13726         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13727
13728         * parse.y (register_fields): Don't pass a format specifier to
13729         OBSOLETE_MODIFIER_WARNING.
13730         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13731         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13732         specifier.
13733         (check_modifiers): Change function into a macro.
13734         (check_class_interface_creation): Pass a literal format string.
13735
13736 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13737
13738         * buffer.h: PROTO -> PARAMS.
13739         * check-init.c: Likewise.
13740         * class.c: Likewise.
13741         * constants.c: Likewise.
13742         * convert.h: Likewise.
13743         * decl.c: Likewise.
13744         * except.c: Likewise.
13745         * expr.c: Likewise.
13746         * gjavah.c: Likewise.
13747         * java-except.h: Likewise.
13748         * java-tree.h: Likewise.
13749         * jcf-depend.c: Likewise.
13750         * jcf-dump.c: Likewise.
13751         * jcf-parse.c: Likewise.
13752         * jcf-path.c: Likewise.
13753         * jcf-reader.c: Likewise.
13754         * jcf-write.c: Likewise.
13755         * jcf.h: Likewise.
13756         * jv-scan.c: Likewise.
13757         * jvgenmain.c: Likewise.
13758         * jvspec.c: Likewise.
13759         * lang.c: Likewise.
13760         * lex.c: Likewise.
13761         * lex.h: Likewise.
13762         * parse-scan.y: Likewise.
13763         * parse.h: Likewise.
13764         * parse.y: Likewise.
13765         * typeck.c: Likewise.
13766         * verify.c: Likewise.
13767         * xref.c: Likewise.
13768         * xref.h: Likewise.
13769         * zextract.c: Likewise.
13770         * zipfile.h: Likewise.
13771
13772 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13773
13774         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13775         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13776         * constants.c (build_constant_data_ref): Check for cached
13777         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13778         in TYPE_CPOOL_DATE_REF.
13779         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13780         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13781         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13782         (LOCAL_FINAL): New macro.
13783         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13784         constant pool -- don't try to reuse.
13785         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13786         TYPE_LANG_SPECIFIC.
13787         (find_in_current_zip): Use TYPE_JCF.
13788         * parse.h (java_check_final): Prototype removed.
13789         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13790         (maybe_create_class_interface_decl,
13791         check_class_interface_creation): Likewise.
13792         (java_expand_finals): Function removed.
13793         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13794         (block_statement:): Fixed comment.
13795         (anonymous_class_creation:): Likewise.
13796         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13797         argument patch.
13798         (check_class_interface_creation): Loosened error report on (inner)
13799         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13800         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13801         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13802         argument patch.
13803         (create_interface): Likewise.
13804         (anonymous_class_counter): New static global.
13805         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13806         patch. Fixed comments.
13807         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13808         anonymous_class_counter when declaring a toplevel class.
13809         (craft_constructor): Fixed constructor name when handling
13810         anonymous classes. Anonymous class constructors to feature hidden
13811         this$<n> parameter.
13812         (java_fix_constructors): Added comment.
13813         (java_check_final): Function removed.
13814         (java_complete_expand_methods): Fixed comment. Don't generate
13815         class data, save its outgoing constant pool instead.
13816         (verify_constructor_super): Skip anonymous class constructor
13817         hidden this$<n> parameter.
13818         (java_expand_classes): New local `saved_ctxp'. Removed call to
13819         java_expand_finals and java_check_final. Expand anonymous class
13820         constructors. Generate class data.
13821         (build_super_invocation): Skip anonymous class hidden this$<n>
13822         parameter.
13823         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13824         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13825         (set_java_signature): Likewise.
13826
13827 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13828
13829         * gjavah.c: Delete ACC_VISIBILITY define.
13830         * jcf.h: Add ACC_VISIBILITY define.
13831         * parse.y: final: rule tagged <value>.
13832         (java_check_regular_methods): Use ACC_VISIBILITY define for
13833         default package access check.
13834         (local_variable_declaration_statement): Use final: rule.
13835
13836 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13837
13838         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13839         (final:): New rule.
13840
13841 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13842
13843         * gjavah.c (print_field_info): Allow non-static final fields.
13844
13845 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13846
13847         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13848         * parse.y (patch_anonymous_class): New function.
13849         (create_anonymous_class): Register incomplete type when the
13850         class/interface to extends/implement isn't known yet.
13851         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13852         (verify_constructor_super): Tuned error message.
13853
13854 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13855
13856         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13857         (ANONYMOUS_CLASS_P): New macro.
13858         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13859         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13860         * parse.y (create_class): Added leading argument.
13861         (maybe_create_class_interface_decl,
13862         check_class_interface_creation): Likewise.
13863         (craft_constructor): New function.
13864         (verify_constructor_super): Added argument in prototype.
13865         (class_declaration:): Inserted leading argument.
13866         (for_begin:): Use FOR_LOOP_P.
13867         (anonymous_class_creation): Create WFL of the anonymous class to
13868         instantiate. Call build_new_invocation. Added comments.
13869         (check_class_interface_creation): Handle parameter `anonymous' in
13870         verbose mode class creation announce.
13871         (link_nested_class_to_enclosing): Exclude anonymous classes.
13872         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13873         anonymous class, even though they appear to have an enclosing
13874         context.
13875         (create_interface): Pass extra argument to
13876         check_class_interface_creation.
13877         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13878         (create_class): Call check_class_interface_creation and
13879         maybe_create_class_interface_decl with extra new argument. Don't
13880         add private this$<n> to anonymous classes.
13881         (method_declarator): Insert hidden this$<n> to anonymous class
13882         constructors.
13883         (java_fix_constructors): Deleted code creating default
13884         constructor. Call craft_constructor instead.
13885         (java_check_regular_methods): Set `saw_constructor' to 1 for
13886         anonymous classes.
13887         (fix_constructors): Pass extra argument to verify_constructor_super.
13888         (verify_constructor_super): New local `sdecl', use it. Search for
13889         matching constructor (possibly featuring arguments) in super
13890         class.
13891         (lookup_method_invoke): Craft constructor according to arguments
13892         list when dealing with anonymous class constructors.
13893         (build_super_invocation): Pass arguments to anonymous class super
13894         constructors.
13895         (search_loop): Use FOR_LOOP_P.
13896         (labeled_block_contains_loop_p): Likewise.
13897
13898 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13899
13900         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13901         (enclosing_context_p): New function.
13902         (get_access_flags_from_decl): Handle CLASS_STATIC.
13903         (maybe_layout_super_class): Extra first argument passed to
13904         do_resolve_class.
13905         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13906         ID_INIT_P.
13907         * decl.c (access0_identifier_node): New global.
13908         (init_decl_processing): access0_identifier_node initialized.
13909         (pushdecl): Set DECL_CONTEXT only on non type decls.
13910         * expr.c (lookup_field): Lookup inner class fields in enclosing
13911         contexts.
13912         (expand_invoke): Use ID_INIT_P.
13913         (expand_java_field_op): Use DECL_CLINIT_P.
13914         * java-tree.def (CLASS_LITERAL): New tree code.
13915         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13916         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13917         (struct lang_decl): New field `inner_access'.
13918         (enclosing_context_p): Prototyped.
13919         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13920         ID_CLINIT_P): New macros.
13921         (CLASS_STATIC): New macro.
13922         (CLASS_ACCESS0_GENERATED_P): New macro.
13923         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13924         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13925         INNER_CLASS_P): New macros.
13926         (DECL_INNER_CLASS_LIST): New macro.
13927         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13928         concatenation.
13929         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13930         the shift value to int. Fixed typo in comment.
13931         * lex.c (inst_id, wpv_id): Initialize.
13932         * mangle.c (unicode_mangling_length): Take `$' into account.
13933         * parse.h (DRECOVER, RECOVER): Terminate properly.
13934         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13935         (typedef struct _jdep): New field `enclosing'.
13936         (JDEP_ENCLOSING): New macro.
13937         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13938         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13939         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13940         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13941         GET_ENCLOSING_CPC_CONTEXT): New macros.
13942         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13943         (do_resolve_class): Added extra argument in prototype.
13944         * parse.y (resolve_class): Added extra argument in prototype.
13945         (maybe_create_class_interface_decl): Likewise.
13946         (maybe_use_access_method, build_wfl_wrap): New functions.
13947         (java_complete_expand_classes, java_complete_expand_class):
13948         Likewise.
13949         (java_parser_context_push_initialized_field,
13950         java_parser_context_suspend, java_parser_context_resume):
13951         Likewise.
13952         (maybe_make_nested_class_name, make_nested_class_name,
13953         set_nested_class_simple_name_value,
13954         link_nested_class_to_enclosing, find_as_inner_class,
13955         find_as_inner_class_do, check_inner_class_redefinition,
13956         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13957         maybe_build_thisn_access_method, build_outer_field_access,
13958         build_outer_field_access_methods, build_outer_field_access_expr,
13959         build_outer_method_access_method, build_new_access_id,
13960         build_outer_field_access_method, outer_field_access_p,
13961         outer_field_expanded_access_p, outer_field_access_fix,
13962         build_incomplete_class_ref, patch_incomplete_class_ref,
13963         create_anonymous_class): Likewise.
13964         (inst_id, wpv_id): New static global variables.
13965         (synchronized:): New rule, tagged <node>.
13966         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13967         rules.
13968         (anonymous_class_creation:): New rule, tagged <node>.
13969         (NEW_TK): Tagged <node>.
13970         (type_literals, array_type_literal): New rules, tagged <node>.
13971         (class_declaration:): Removed action when reducing by class_body:
13972         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13973         using GET_CPC in sub-rules.
13974         (class_member_declaration): Handle inner classes.
13975         (method_declaration): When reducing method_header:, reset
13976         current_function_decl when appropriate.
13977         (method_declarator:): Set the number of formal parameter to 0 for
13978         method declared without arguments.
13979         (constructor_declarator:): Likewise.
13980         (static_initializer:): List of elements kept in a list.
13981         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13982         use of the keyword `static' for type declarations.
13983         (block_statement:): Handle inner class declarations.
13984         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13985         type qualified `this'.
13986         (class_instance_creation_expression): Use anonymous_class_creation:
13987         to handle inner class instances creation. Handle qualified `new'.
13988         (something_dot_new): Added appropriate actions.
13989         (create_new_parser_context): New function.
13990         (java_push_parser_context, java_parser_context_save_global,
13991         java_parser_context_suspend): Use create_new_parser_context.
13992         (check_modifiers): Changed leading comment.
13993         (check_class_interface_creation): Handle interclasses.
13994         (add_superinterfaces): Fixed comment.
13995         (create_interface): Build qualified name from the raw_name instead
13996         of its matching WFL. Push the initialized fields list. raw_name added
13997         as an extra argument to maybe_create_class_interface_decl.
13998         (create_class): Build qualified name from the raw_name instead of
13999         its matching WFL. Removed assignment to current_parsed_class_un.
14000         Call PUSH_ERROR before returning an error. Suspend the current
14001         parser context when processing an inner class. Push the
14002         initialized fields list. raw_name added as an extra argument to
14003         maybe_create_class_interface_decl. Add the private this$<n>
14004         field.
14005         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14006         (register_fields): Get the class type from GET_CPC and handle
14007         previous errors.  Added code to handle the creation of static
14008         fields in inner classes. Initialized fields initialization
14009         statements kept in a list of lists.
14010         (maybe_generate_finit): Initialized fields initialization
14011         statements kept in a list of lists. Use GET_CPC.
14012         (maybe_generate_clinit): Likewise.
14013         (method_header): Use GET_CPC and GET_CPC_UN.
14014         (parser_qualified_classname): Handle inner classes.
14015         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14016         (java_fix_constructors): Hide pointer to enclosing context
14017         instance in constructor list when dealing with inner classes.
14018         (jdep_resolve_class): Call resolve_class with extra first argument
14019         JDEP_ENCLOSING.
14020         (resolve_class): Add enclosing context as a first extra argument
14021         to do_resolve_class.
14022         (do_resolve_class): Call find_as_inner_class. Handle WFLs
14023         properly.
14024         (resolve_no_layout): Extra argument added to resolve_class
14025         invocation.
14026         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14027         (java_get_real_method_name): Use GET_CPC_UN.
14028         (check_abstract_method_definitions): Use DECL_CLINIT_P.
14029         (java_check_abstract_methods): Handle static method declared in
14030         inner classes by an error.
14031         (java_check_regular_methods): Use DECL_CLINIT_P.
14032         (source_start_java_method): Also set DECL_MAX_LOCALS.
14033         (create_artificial_method): Call java_parser_context_save_global
14034         and java_parser_context_restore_global instead of saving/restoring
14035         the context by hand.
14036         (expand_start_java_method): Improved verbose mode message.
14037         (java_complete_expand_methods): Fixed leading comment. Use
14038         DECL_CLINIT_P.
14039         (fix_constructors): Added assignment to this$<n> if necessary.
14040         (java_expand_classes): Call java_complete_expand_classes instead
14041         of java_complete_expand_methods.
14042         (make_qualified_primary): Simplified.
14043         (merge_qualified_name): Optimized for missing left or right parts.
14044         (resolve_expression_name): Handle access to outer class fields from
14045         interclasses.
14046         (resolve_qualified_expression_name): New macro
14047         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14048         classes. Report error on non appropriate qualification of
14049         `new'. Handle qualified `this'.
14050         (not_accessible_p): Allow access to outer class private fields from
14051         inner classes.
14052         (patch_method_invocation): Handle method invocations through
14053         access methods and inner class constructor invocations.
14054         (find_applicable_accessible_methods_list): Search enclosing
14055         contexts of an inner class.
14056         (search_applicable_methods_list): Fixed typo.
14057         (argument_types_convertible): Handle inner class constructors'
14058         hidden outer context reference argument.
14059         (qualify_ambiguous_name): Handle qualified `this'.
14060         (java_complete_lhs): Handle use of field accessed through
14061         artificial access methods in various cases of assignments. Handle
14062         CLASS_LITERAL node.
14063         (check_final_assignment): Use DECL_CLINIT_P.
14064         (valid_ref_assignconv_cast_p): Handle the destination being an
14065         enclosing context of the source.
14066         (patch_unaryop): Handle use of field accessed through artificial
14067         access methods.
14068         (patch_return): Use DECL_CLINIT_P.
14069         (patch_throw_statement): Use DECL_CLINIT_P.
14070         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14071         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14072         ID_INIT_P.
14073
14074 2000-01-16  Anthony Green  <green@cygnus.com>
14075
14076         * parse.y (build_string_concatenation): Only use
14077         StringBuffer(String) shortcut if String arg is constant.
14078
14079 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14080
14081         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14082         the shift value to int. Fixed typo in comment.
14083
14084 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14085
14086         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14087         * jcf-write.c: Likewise.
14088         * parse.y: Likewise.
14089         * parse.c: Regenerate.
14090
14091 2000-01-09  Anthony Green  <green@cygnus.com>
14092
14093         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14094         bytecodes in the correct order.
14095
14096 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14097
14098         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14099
14100 2000-01-06  Anthony Green  <green@cygnus.com>
14101
14102         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14103         before building constant array decl.
14104
14105 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14106
14107         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14108         method invocation and typo in conditional expression.
14109         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14110         the appropriate NOTE_POP.
14111         * parse.y (patch_binop): Shift value mask to feature the right
14112         type.
14113
14114 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14115
14116         * class.c (assume_compiled, assume_compiled_node): Add static
14117         prototype.
14118         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14119
14120         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14121
14122         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14123
14124         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14125         to `__modifier' to avoid stringifying it.
14126
14127         * parse.y (verify_constructor_circularity): Don't call a variadic
14128         function with a non-literal format string.
14129         (java_check_abstract_methods): Move unreachable code inside
14130         `continue' statement.
14131         (lookup_method_invoke): Call xstrdup, not strdup.
14132
14133         * expr.c (expand_java_field_op): Avoid the use of ANSI string
14134         concatenation.
14135
14136         * jcf-parse.c (yyparse): Likewise.
14137
14138         * jv-scan.c (main): Likewise.
14139
14140 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14141
14142         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14143         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14144         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14145         concatenation.
14146
14147         * parse.y (synchronized, variable_redefinition_error,
14148         check_class_interface_creation, create_interface, create_class,
14149         method_header, finish_method_declaration,
14150         check_modifiers_consistency, method_declarator,
14151         complete_class_report_errors, check_abstract_method_definitions,
14152         java_check_regular_methods, check_throws_clauses,
14153         java_check_abstract_methods, read_import_dir,
14154         check_pkg_class_access, declare_local_variables, fix_constructors,
14155         cut_identifier_in_qualified, resolve_expression_name,
14156         resolve_qualified_expression_name, patch_method_invocation,
14157         java_complete_lhs, patch_assignment, try_builtin_assignconv,
14158         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14159         patch_exit_expr, patch_exit_expr, patch_switch_statement,
14160         patch_try_statement, patch_synchronized_statement,
14161         patch_throw_statement, check_thrown_exceptions,
14162         patch_conditional_expr): Likewise.
14163
14164 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14165
14166         * Makefile.in (LIBDEPS): Added gcc's errors.o
14167         (../jcf-dump$(exeext):): Link with gcc's errors.o
14168         (../gcjh$(exeext):): Likewise.
14169         * expr.c (expand_java_NEW): Layout the entire target type instead of
14170         laying out its methods only.
14171         (lookup_field): Layout the class after having loaded it.
14172         * java-tree.h (java_debug_context): Declared.
14173         * jcf-io.c (toplev.h): Included.
14174         (find_class): Removed assignment to jcf's outofsynch
14175         field. Force source file to be read if newer than its matching
14176         class file. Tweaked debug messages.
14177         * jcf-parse.c (jcf_out_of_synch): Deleted.
14178         (read_class): Call to jcf_out_of_synch removed.
14179         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14180         (jcf_out_of_synch): Prototype deleted.
14181         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14182         `deprecated' and `class_err': integer turned into bit-fields.
14183         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14184         * parse.y (package_list): New global.
14185         (package_declaration:): Record newly parsed package name.
14186         (extra_ctxp_pushed_p): Static global deleted.
14187         (java_parser_context_save_global): Create buffer context for the
14188         purpose of saving globals, if necessary.
14189         (java_parser_context_restore_global): Pop context pushed for the
14190         purpose of saving globals, if necessary.
14191         (java_debug_context_do): New prototype and function.
14192         (java_debug_context): Likewise.
14193         (do_resolve_class): Use already parsed package names to qualify
14194         and lookup class candidate.
14195         (java_pre_expand_clinit): Removed unnecessary local variable.
14196
14197 1999-12-17  Tom Tromey  <tromey@cygnus.com>
14198
14199         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14200         fixes PR gcj/119.
14201         (process_file): Use `\n\' at end of each line in string.
14202
14203 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14204
14205         * expr.c (expand_invoke): Layout the loaded class before
14206         attempting to use it.
14207         (expand_java_field_op): Allow final field assignments to take
14208         place in $finit$.
14209         * typeck.c (convert): Return error_mark_node if expr is null.
14210
14211 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14212
14213         * class.c (class_depth): Return -1 if the class doesn't load
14214         properly.
14215         * expr.c (can_widen_reference_to): Check for errors during depth
14216         computation and return 0 accordingly.
14217         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14218         create default constructors and add an other error check.
14219         * parse.h (java_fix_constructors): Prototyped.
14220         * parse.y (java_pre_expand_clinit): Likewise.
14221         (build_super_invocation): Re-prototyped to feature one argument.
14222         (java_check_circular_reference): Directly use `current'.
14223         (java_fix_constructors): New function.
14224         (java_check_regular_methods): Don't create default constructors
14225         here, but abort if none were found.
14226         (java_complete_expand_methods): Pre-process <clinit> calling
14227         java_pre_expand_clinit.
14228         (java_pre_expand_clinit): New function.
14229         (fix_constructors): build_super_invocation invoked with the
14230         current method declaration as an argument.
14231         (build_super_invocation): Use the context of the processed method
14232         decl argument instead of current_class.
14233         * typeck.c (lookup_java_method): Take WFLs in method names into
14234         account.
14235
14236 1999-12-14  Per Bothner  <per@bothner.com>
14237
14238         * class.c (make_class_data): flag_keep_inline_functions to keep
14239         private methods in the method array.
14240
14241 1999-12-15  Anthony Green  <green@cygnus.com>
14242
14243         * check-init.c (check_init): Take into account both types of
14244         `throw's when checking for uninitialized variables.
14245
14246 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14247
14248         * parse.y (java_complete_lhs): Force conversion of array
14249         dimensions to int_type_node, that's what runtime's ABI expects.
14250
14251 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14252
14253         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14254         operand of a WFL, until the Java front-end gets fixed with regard
14255         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14256
14257 1999-12-10  Andrew Haley  <aph@cygnus.com>
14258
14259         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14260         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14261         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14262         java-tree.h: Ditto.
14263         jcf-write.c: Ditto.
14264
14265 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14266
14267         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14268         before calling expand_eh_region_start and expand_start_all_catch.
14269         * except.c (expand_start_java_handler): Switch to permanent
14270         obstack before calling expand_eh_region_start.
14271         (expand_end_java_handler): Switch to permanent obstack before
14272         calling expand_start_all_catch.
14273
14274 1999-12-5  Anthony Green  <green@cygnus.com>
14275
14276         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14277         function with side effects.
14278         (init_decl_processing): Mark all memory allocating DECLs with
14279         DECL_IS_MALLOC.
14280
14281 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14282
14283         * except.c (expand_end_java_handler): Call
14284         expand_resume_after_catch and end_catch_handler.
14285
14286 1999-11-30  Anthony Green  <green@cygnus.com>
14287
14288         * verify.c (verify_jvm_instructions): Create new return label
14289         chain if non existent (don't rely on the verified state of the jsr
14290         target.)
14291
14292 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14293
14294         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14295         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14296
14297         * parse.y (patch_assignment): Removed bogus final class test on
14298         lhs when checking on whether to emit an ArrayStoreException runtime
14299         check.
14300         * expr.c (expand_java_arraystore): Likewise.
14301
14302 1999-11-28 Anthony Green <green@cygnus.com>
14303
14304         * decl.c (find_local_variable): Reuse single slot decls when
14305           appropriate.
14306
14307 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14308
14309         * jcf-parse.c (saw_java_source): Global variable removed.
14310         (read_class): Don't use `saw_java_source'. Added extra braces.
14311         (yyparse): Code setting `saw_java_source' removed.
14312
14313 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14314
14315         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14316
14317 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14318
14319         * verify.c (merge_type_state): Non verified subroutines being
14320         considered more than once to trigger passive type merge.
14321
14322 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14323
14324         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14325         in case of error. Error message tuned.
14326
14327 1999-11-21  Anthony Green  <green@cygnus.com>
14328
14329         * constants.c (find_methodref_index): Unwrap method names before
14330         inserting them in the constant pool.
14331
14332         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14333
14334         * class.c (assume_compiled_node): New typedef.
14335         (assume_compiled_tree): New static data.
14336         (find_assume_compiled_node): New function.
14337         (add_assume_compiled): New function.
14338         (assume_compiled): New function.
14339         * class.c (make_class_data): Use assume_compiled.
14340         (is_compiled_class): Use assume_compiled.
14341
14342         * java-tree.h (add_assume_compiled): Declare.
14343
14344         * lang.c (lang_decode_option): Parse new options.
14345
14346 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14347
14348         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14349         int_type_node: that's what `_Jv_AllocObject' expects.
14350
14351 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14352
14353         * parse.y (lookup_method_invoke): Use lang_printable_name to
14354         reliably build the type name during error report. Fixes PR gcj/97.
14355
14356 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14357
14358         * jcf-path.c: Include <sys/stat.h>.
14359         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14360         (DIR_UP): New macro.
14361
14362 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14363
14364         * parse.y (source_end_java_method): Resume permanent allocation,
14365         reversing Apr 27 1998 patch.
14366         (patch_string_cst): Pop obstacks after having pushed the permanent
14367         ones.
14368
14369 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14370
14371         * class.c (finish_class): Emit inlined methods if any native
14372         methods exist in the class.  Fixes PR gcj/85.
14373
14374 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14375
14376         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14377         (qualify_ambiguous_name): Likewise.
14378
14379 1999-11-03  Godmar Back <gback@cs.utah.edu>
14380
14381         * typeck.c: (lookup_java_method):  search all inherited
14382         interfaces when looking up interface method.
14383
14384 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14385
14386         * parse.y (method_header:): Issue error message for rule `type
14387         error'.
14388         (synchronized:): Error report when not using synchronized.
14389
14390 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14391
14392         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14393         being used before the superclass constructor has been called.
14394         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14395         instead of `CALL_THIS_CONSTRUCTOR_P'.
14396
14397 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14398
14399         * check-init.c: Fix typo in comment.
14400
14401 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14402
14403         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14404         and final method.
14405
14406 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14407
14408         * parse.y (expression_statement:): Call function to report
14409         improper invocation of a constructor.
14410         (parse_ctor_invocation_error): New function.
14411
14412 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14413
14414         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14415         remember_end_note.
14416
14417 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14418
14419         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14420         in generated `main'.
14421
14422 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14423
14424         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14425         (qualify_ambiguous_name): Likewise.
14426
14427 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14428
14429         * parse.y (java_complete_tree): fold_constant_for_init to work on
14430         permanent_obstack.
14431         (java_complete_lhs): Likewise.
14432         (array_constructor_check_entry): Complete an initializer element
14433         on permanent_obstack.
14434
14435 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14436
14437         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14438         From Mike Moreton <mike@pillim.demon.co.uk>.
14439
14440 1999-10-15  Greg McGary  <gkm@gnu.org>
14441
14442         * java-tree.h (flag_bounds_check): Remove extern decl.
14443         * lang.c (flag_bounds_check): Remove global variable.
14444         (lang_f_options): Remove "bounds-check" entry.
14445         (lang_init_options): Default flag_bounds_check to "on".
14446
14447 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14448
14449         * jvgenmain.c (usage): New function.
14450         (main): Use it.  Also, handle `-D' options.
14451         * jvspec.c (lang_specific_driver): Recognize -D.
14452         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14453
14454         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14455
14456 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14457
14458         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14459         variadic function with a non-literal format string.
14460
14461         * parse-scan.y (report_main_declaration): Likewise.
14462
14463         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14464
14465         * parse.y (read_import_dir, patch_assignment, patch_binop,
14466         patch_array_ref): Likewise.
14467
14468         * typeck.c (build_java_array_type): Likewise.
14469
14470         * verify.c (verify_jvm_instructions): Likewise.
14471
14472 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14473
14474         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14475
14476 1999-10-07  Anthony Green  <green@cygnus.com>
14477
14478         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14479         where CHECK_PUT may fail for valid reasons.
14480
14481         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14482         UNSAFE_PUTN): New macros.
14483
14484 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14485
14486         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14487         well.  Fixes Java PR gcj/59.
14488         * parse-scan.y (yyerror): Report errors.
14489
14490 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14491
14492         * decl.c (insert_block): Remove unconditional `abort'.
14493
14494 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14495
14496         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14497         FUNCTION_CODE now of type int.  All callers changed.
14498         Set the builtin's DECL_BUILT_IN_CLASS.
14499
14500 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14501
14502         * jvspec.c (lang_specific_driver): Don't read spec file if
14503         -fsyntax-only given.
14504
14505 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14506
14507         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14508
14509         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14510         (WORDS_TO_LONG): Likewise.
14511         (WORDS_TO_DOUBLE): Likewise.
14512
14513 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14514
14515         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14516         (RELOCATION_VALUE_1): Likewise.
14517         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14518         push_in_const, push_long_const): Prototyped.
14519         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14520         (push_constant2): Likewise.
14521         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14522         (find_constant_wide): Cast find_constant2's integer arguments to
14523         `jword'.
14524         (find_constant_index): Cast find_constant2's and find_constant2's
14525         integer arguments to `jword'.
14526         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14527         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14528         (emit_if): Use RELOCATION_VALUE_1.
14529         (emit_goto): Likewise.
14530         (emit_jsr): Likewise.
14531         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14532         argument to push_long_const to HOST_WIDE_INT.
14533
14534 1999-09-15  Andreas Schwab  <schwab@suse.de>
14535
14536         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14537
14538 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14539
14540         * lang.c (lang_decode_option): Extend comment.
14541
14542 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14543
14544         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14545         instead of fndecl.
14546
14547 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14548
14549         * gjavah.c (get_field_name, print_method_info, print_include,
14550         add_namelet): Use xmalloc, not malloc.
14551
14552         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14553         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14554         NULL pointer.
14555
14556         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14557
14558         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14559
14560         * jcf-path.c (add_entry): Likewise.
14561
14562         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14563
14564         * jv-scan.c (xmalloc): Remove definition.
14565
14566         * jvgenmain.c (xmalloc): Likewise.
14567
14568         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14569
14570         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14571
14572         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14573         concat, not xmalloc/sprintf.
14574         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14575         (xstrdup): Remove definition.
14576
14577         * parse.y (duplicate_declaration_error_p,
14578         constructor_circularity_msg, verify_constructor_circularity,
14579         check_abstract_method_definitions, java_check_regular_methods,
14580         java_check_abstract_methods, patch_method_invocation,
14581         check_for_static_method_reference, patch_assignment, patch_binop,
14582         patch_cast, array_constructor_check_entry, patch_return,
14583         patch_conditional_expr): Use xstrdup, not strdup.
14584
14585         * zextract.c (ALLOC): Use xmalloc, not malloc.
14586
14587 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14588
14589         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14590
14591         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14592         (do_spec, lang_specific_pre_link, lang_specific_driver,
14593         input_filename, input_filename_length): Don't declare.
14594         (main_class_name, jvgenmain_spec, lang_specific_driver):
14595         Constify a char*.
14596         (lang_specific_driver): All calls to the function pointer
14597         parameter now explicitly call `fatal'.
14598
14599 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14600
14601         * parse.y (find_applicable_accessible_methods_list): Search
14602         abstract classes as interfaces.
14603
14604 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14605
14606         * class.c (finish_class): We're now outside a valid method
14607         declaration. Tell the rest of gcc so.
14608
14609 1999-09-08  Bruce Korb  autogen@linuxbox.com
14610
14611         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14612
14613 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14614
14615         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14616         java-array.h.
14617         (decode_signature_piece): Don't emit "::" in JArray<>.
14618         (print_namelet): Only print trailing `;' when printing a class.
14619
14620 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14621
14622         * java-tree.h: Delete declarations for all tree nodes now moved to
14623         global_trees.
14624         * decl.c: Delete their definitions.
14625
14626 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14627
14628         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14629         * Makefile.in (OBJS): Add ggc-callbacks.o.
14630         (OBJDEPS): Likewise.
14631
14632 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14633
14634         * parse.y (strip_out_static_field_access_decl): Return operand if
14635         it satisfies JDECL_P.
14636
14637 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14638
14639         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14640         Handle nested arrays, like `[[I'.
14641
14642 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14643
14644         * class.c (finish_class): Remove unused parameter, all callers
14645         changed.
14646
14647         * expr.c (build_java_athrow): Change return type to void.
14648         (java_lang_expand_expr): Make sure each case in switch returns a
14649         value.
14650
14651         * java-tree.h (finish_class): Fix prototype to take void args.
14652
14653         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14654         (main): Issue return from main, not exit.
14655
14656         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14657
14658         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14659
14660         * jv-scan.c (main): Issue return from main, not exit.
14661
14662         * parse.y (check_abstract_method_definitions,
14663         java_check_abstract_method_definitions): Add static prototypes.
14664         (java_complete_expand_methods): Fix call to `finish_class'.
14665
14666         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14667         and `prevpc'.
14668
14669 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14670
14671         * lang.c (language_string): Constify.
14672
14673 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14674
14675         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14676         Remove hacks for stuff which comes from libiberty.
14677
14678         * Make-lang.in: Likewise.
14679
14680 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14681
14682         * Makefile.in (xref.o): Depend on xref.c explicitly.
14683
14684 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14685
14686         * java-tree.h (lang_printable_name): Constify a char*.
14687
14688         * lang.c (lang_printable_name): Likewise.
14689
14690 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14691
14692         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14693         comments in C code.
14694
14695 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14696
14697         * gjavah.c (print_cxx_classname): Print "::" before qualified
14698         name.
14699
14700 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14701
14702         * parse.y (lookup_cl): Changed leading comment. Now does its best
14703         to set the column number.
14704         (qualify_ambiguous_name): Take WFL wrappers into account.
14705
14706 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14707
14708         * verify.c (verify_jvm_instructions): Don't check instruction
14709         validity beyond end of method.
14710
14711 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14712
14713         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14714
14715 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14716
14717         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14718         cxx_keyword_subst, generate_access, name_is_method_p,
14719         get_field_name, print_field_name, super_class_name, print_include,
14720         decode_signature_piece, print_class_decls, usage, help,
14721         java_no_argument, version, add_namelet, print_namelet): Add static
14722         prototype.
14723         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14724         name_is_method_p): Constify a char*.
14725         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14726         Provide a final else clause in an if-else-if.
14727         (print_field_info): Add missing final arg in function call to
14728         `print_field_name'.
14729         (print_method_info, decompile_method, decode_signature_piece,
14730         print_c_decl, print_full_cxx_name, print_stub,
14731         print_mangled_classname, super_class_name, print_include,
14732         add_namelet, add_class_decl, print_class_decls, process_file,
14733         help): Constify a char*.
14734
14735         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14736         push_int_const, find_constant_wide, find_constant_index,
14737         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14738         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14739         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14740         emit_if, emit_goto, emit_jsr, call_cleanups,
14741         make_class_file_name): Add static prototypes.
14742         (generate_bytecode_return, generate_bytecode_insns): Pass a
14743         NULL_PTR, not a NULL_TREE.
14744
14745         * jv-scan.c: Include "jcf.h".
14746         (main): Declare using DEFUN macro.
14747
14748         * jvspec.c (find_spec_file, lang_specific_pre_link,
14749         lang_specific_driver): Add prototypes.
14750         (find_spec_file): Constify a char*.
14751
14752         * keyword.gperf (hash, java_keyword): Add prototypes.
14753
14754         * lang.c (lang_print_error): Add static prototype.
14755         (lang_init): Prefer memcpy over bcopy to avoid casts.
14756
14757         * lex.c (yylex): Add static prototype.
14758
14759         * parse-scan.y: Include "lex.c" earlier.
14760
14761         * parse.h: Remove redundant declaration for `yylex'.
14762
14763         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14764         labeled_block_contains_loop_p): Add static prototypes.
14765         (not_accessible_p): Make static to match prototype.
14766
14767         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14768
14769 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14770
14771         * parse.y (check_method_redefinition): Changed leading comment.
14772         (check_abstract_method_definitions): New function.
14773         (java_check_abstract_method_definitions): New function.
14774         (java_check_regular_methods): Call it.
14775         (verify_constructor_super): Fixed indentation.
14776         (lookup_method_invoke): Likewise.
14777
14778 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14779
14780         * parse.y (method_header): Return a null pointer if the current
14781         class node is null.
14782         (finish_method_declaration): Return if the current function decl
14783         is null.
14784         (source_start_java_method): Likewise.
14785         (java_method_add_stmt): Likewise.
14786
14787 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14788
14789         * class.c (emit_register_class): Removed unnecessary call to
14790         start_sequence.
14791         * parse.y (labeled_block_contains_loop_p): Removed unused local
14792         variable.
14793
14794 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14795
14796         * parse.y (java_refold): Added prototype.
14797
14798 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14799
14800         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14801         (java_stabilize_reference): Removed unnecessary `else'.
14802         (java_complete_lhs): Set flag to remember boolean. Call
14803         java_refold. Added comments.
14804         (java_decl_equiv): New function.
14805         (binop_compound_p): Likewise.
14806         (java_refold): Likewise.
14807         (patch_unaryop): Striped static field access assigned to decl and
14808         op. Changed promotion scheme for ++/-- operators.
14809         (search_loop): New function.
14810         (labeled_block_contains_loop_p): Likewise.
14811         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14812         comment.
14813         (patch_bc_statement): Call search_loop. Fixed comment.
14814
14815 1999-08-14  Anthony Green  <green@cygnus.com>
14816
14817         * expr.c (java_lang_expand_expr): Mark static array data as
14818         referenced.
14819
14820 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14821
14822         * jvgenmain.c (main): NUL-terminate name_obstack.
14823
14824 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14825
14826         * check-init.c (check_bool2_init, done_alternative): Add static
14827         prototypes.
14828
14829         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14830         (add_method, build_utf8_ref, build_class_ref,
14831         append_gpp_mangled_type, layout_class_method): Constify a char*.
14832
14833         * decl.c (push_promoted_type, make_binding_level): Add static
14834         prototypes.
14835         (push_promoted_type, pushdecl): Constify a char*.
14836
14837         * except.c (find_handler_in_range, link_handler,
14838         check_start_handlers): Add static prototypes.
14839
14840         * expr.c (process_jvm_instruction): Constify a char*.
14841
14842         * gjavah.c (main): Constify a char*.
14843
14844         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14845         Constify a char*.
14846
14847         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14848         static prototypes.
14849         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14850         munge, print_ents): Constify a char*.
14851
14852         * jcf-dump.c (disassemble_method): Constify a char*.
14853         (print_constant_pool, print_exception_table): Add static prototypes.
14854         (print_constant, print_exception_table, main, disassemble_method):
14855         Constify a char*.
14856
14857         * jcf-io.c (find_classfile, find_class): Likewise.
14858
14859         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14860         (set_source_filename, predefined_filename_p): Add static prototypes.
14861         (set_source_filename, get_constant, get_class_constant,
14862         find_in_current_zip): Constify a char*.
14863
14864         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14865         static prototypes.
14866         (add_entry, add_path, jcf_path_classpath_arg,
14867         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14868
14869         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14870         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14871         jcf_parse_one_method, jcf_parse_methods,
14872         jcf_parse_final_attributes): Add static prototypes.
14873         (get_attribute): Constify a char*.
14874
14875         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14876         jcf_dependency_add_target, jcf_path_classpath_arg,
14877         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14878
14879         * jv-scan.c (main): Constify a char*.
14880         (gcc_obstack_init): Add prototype arguments.
14881
14882         * jvgenmain.c (gcc_obstack_init): Likewise.
14883         (main): Constify a char*.
14884
14885         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14886         static prototypes.
14887         (put_decl_string, lang_print_error): Constify a char*.
14888         (lang_init): Remove redundant extern prototype.
14889
14890         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14891
14892         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14893         Add static prototypes.
14894         (get_type_from_signature): Constify a char*.
14895
14896         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14897         Add static prototypes.
14898         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14899         (verify_jvm_instructions): Constify a char*.
14900
14901         * xref.c (xref_flag_value): Likewise.
14902
14903         * xref.h (xref_flag_value): Likewise.
14904
14905         * zextract.c (makeword, makelong): Add static prototypes.
14906         (makeword, makelong): Constify a uch*.
14907
14908 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14909
14910         * lang.c (java_dummy_print): Constify a char*.
14911         (lang_print_error): Likewise.
14912         (lang_init): Remove redundant prototype for `print_error_function'.
14913         (lang_init_source): Likewise.
14914         (lang_identify): Constify a char*.
14915
14916 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14917
14918         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14919         (WORDS_TO_LONG): Likewise.
14920         (WORDS_TO_DOUBLE): Likewise.
14921
14922 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14923
14924         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14925
14926         * expr.c (java_stack_pop, java_array_data_offset,
14927         build_java_throw_out_of_bounds_exception, case_identity,
14928         build_java_check_indexed_type): Add static prototypes.
14929         (linenumber_table, expand_invoke, expand_java_field_op,
14930         build_primtype_type_ref, expand_byte_code): Constify a char*.
14931
14932         * java-tree.h (build_primtype_type_ref, linenumber_table):
14933         Constify a char*.
14934         (java_lang_expand_expr): Add prototype.
14935
14936         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14937         `java_lang_expand_expr'.
14938
14939         * lex.c (java_lex_error): Constify a char*.
14940         (java_get_unicode, java_read_char, java_allocate_new_line,
14941         java_unget_unicode, java_sneak_unicode): Prototype.
14942
14943         * parse-scan.y (current_class, package_name, method_declarator,
14944         report_class_declaration, yyerror): Constify a char*.
14945
14946         * parse.h (java_report_errors): Prototype.
14947         (yyerror): Constify a char*.
14948
14949         * parse.y (classitf_redefinition_error, check_modifiers,
14950         parse_jdk1_1_error, lookup_package_type,
14951         lookup_package_type_and_set_next, get_printable_method_name,
14952         purify_type_name): Constify a char*.
14953         (build_super_invocation, maybe_generate_finit,
14954         verify_constructor_super, parser_add_interface,
14955         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14956         java_complete_expand_methods, java_expand_finals,
14957         cut_identifier_in_qualified, java_stabilize_reference,
14958         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14959         merge_string_cste): Prototype.
14960         (single_type_import_declaration, yyerror,
14961         variable_redefinition_error, build_array_from_name,
14962         build_unresolved_array_type, check_class_interface_creation,
14963         resolve_class, complete_class_report_errors,
14964         note_possible_classname, read_import_dir,
14965         find_in_imports_on_demand, resolve_package, fix_constructors,
14966         check_deprecation, lookup_method_invoke,
14967         maybe_build_primttype_type_ref, array_constructor_check_entry):
14968         Constify a char*.
14969         (java_complete_expand_methods, java_expand_finals): Make static.
14970         (convert_narrow): Remove static prototype.
14971
14972 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14973
14974         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14975
14976 1999-08-02  Richard Henderson  <rth@cygnus.com>
14977
14978         * decl.c: Include defaults.h instead of expr.h.
14979         * parse.y: Likewise.
14980
14981 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14982
14983         * java/decl.c (start_java_method): Change all uses of
14984         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14985         Ensure expr.h is included.
14986         * java/expr.c (pop_arguments): Ditto.
14987         * java/parse.y (expand_start_java_method): Ditto.
14988
14989 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14990
14991         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14992
14993 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14994
14995         * decl.c: Include "function.h".
14996         * except.c: Likewise.
14997         * parse.y: Likewise.
14998         * Makefile.in: Update dependencies.
14999
15000 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15001
15002         * expr.c (build_java_soft_divmod): Provide a default case in switch.
15003         (java_lang_expand_expr): Mark parameters `target', `tmode' and
15004         `modifier' with ATTRIBUTE_UNUSED.
15005
15006         * gjavah.c (process_file): Add braces around ambiguous `else'.
15007
15008         * jcf-dump.c (print_access_flags, localvar_free): Change return
15009         type to void.
15010
15011         * parse.y (java_complete_expand_method): Initialize variable
15012         `exception_copy'.
15013         (resolve_qualified_expression_name): Likewise for `field_decl'.
15014         (patch_method_invocation): Likewise for `class_to_search'.
15015         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15016         (patch_assignment): Likewise for `lhs_type'.
15017
15018         * verify.c (verify_jvm_instructions): Remove unused variable
15019         `caller'.
15020
15021 1999-07-25  Richard Henderson  <rth@cygnus.com>
15022
15023         * decl.c (va_list_type_node): New.
15024
15025 1999-07-25  Anthony Green  <green@cygnus.com>
15026
15027         * gjavah.c (print_stub): New function.
15028         (METHOD_IS_NATIVE): New macro.
15029         (print_mangled_classname): Make static.
15030         (HANDLE_END_FIELD): Don't emit fields during stub generation.
15031         (process_file): Perform stub generation.
15032         (HANDLE_METHOD): Don't emit class decls during stub
15033         generation.
15034         (HANDLE_END_METHOD): Take into account stub generation.
15035         (print_method_info): Handle stub generation.
15036         (print_stub): New function.
15037         (print_cxx_classname): Make signature consistant with others.
15038         (help): Describe -stubs option.
15039         (main): Create stub file.
15040         (version): Use version.c.
15041         (print_full_cxx_name): New function.
15042         (print_c_decl): Use print_full_cxx_name.
15043
15044 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15045
15046         * check-init.c (check_init): Handle MAX_EXPR.
15047
15048 1999-07-15  Andrew Haley  <aph@cygnus.com>
15049
15050         * lang.c (flag_use_divide_subroutine): New variable.
15051         * typeck.c: (convert_ieee_real_to_integer): Bounds check
15052         fp-to-integer conversion.
15053         (convert): Call convert_ieee_real_to_integer when flag_fast_math
15054         is not set.
15055
15056         * expr.c (build_java_soft_divmod): New function.
15057         (build_java_binop): Call build_java_soft_divmod if
15058         flag_use_divide_subroutine is set.
15059         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15060         soft_lrem_node: new builtin functions.
15061         (init_decl_processing) Initialize the new builtins.
15062         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15063         soft_lrem_node: new builtin functions.
15064         (build_java_soft_divmod): New function.
15065         * parse.y: Call build_java_soft_divmod if
15066         flag_use_divide_subroutine is set.
15067         * parse.c: Rebuilt.
15068
15069         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15070         a --specs= arg) even if not linking.
15071         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15072         -fuse-divide-subroutine
15073
15074 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15075
15076         * parse.y (resolve_and_layout): Check methods only once.
15077         (resolve_qualified_expression_name): Verify thrown exceptions
15078         compatibility.
15079         (check_thrown_exceptions): Reject exceptions thrown in
15080         initializer. Error message tuned.
15081
15082 1999-07-14  Andrew Haley  <aph@cygnus.com>
15083
15084         * expr.c (expand_expr): Do not return the last statement in a
15085         block as the block's value.
15086
15087 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15088
15089         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15090         CALL_EXPR, to avoid order of evaluation changes.
15091
15092 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15093
15094         * parse.y (qualify_ambiguous_name): Do not use
15095         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15096
15097 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15098
15099         * check-init.c (check_init): Handle MAX_EXPR.
15100         * expr.c (force_evaluation_order): Force method call arguments to
15101         be evaluated in left-to-right order.
15102         * parse.y (qualify_ambiguous_name): Loop again to qualify
15103         NEW_ARRAY_EXPR properly.
15104
15105 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15106
15107         * parse.y (patch_invoke): Resolve unresolved invoked method
15108         returned type.
15109         (qualify_ambiguous_name): STRING_CST to qualify expression for
15110         type name resolution.
15111
15112 1999-06-24  Andrew Haley  <aph@cygnus.com>
15113
15114         * class.c (finish_class): Whenever a deferred method is
15115         output, rescan the list of methods to see if a new candidate for
15116         output can be found.
15117
15118 1999-06-28  Tom Tromey  <tromey@cygnus.com>
15119
15120         * jvspec.c (lang_specific_driver): Recognize --help.
15121
15122 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15123
15124         * parse.y (resolve_package): Fixed bogus return statement.
15125         (patch_method_invocation): Resolve method invocation beginning with
15126         a package name qualifier.
15127
15128 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15129
15130         * Make-lang.in (java.stage1): Depend on stage1-start.
15131         (java.stage2): Likewise for stage2-start.
15132         (java.stage3): Likewise for stage3-start.
15133         (java.stage4): Likewise for stage4-start.
15134
15135 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15136
15137         * parse.y (java_complete_lhs): When doing cross referencing, don't
15138         try to keep file location on a WFL expanded as a CALL_EXPR.
15139
15140 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15141
15142         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15143         compiling to class file a void method with an empty method body.
15144         As a side effect, the bytecode backend will generate the
15145         appropriate `return' instruction.
15146
15147 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15148
15149         * parse.y (lookup_package_type_and_set_next): New function prototype.
15150         (resolve_package): Search current and imported packages.
15151         (lookup_package_type_and_set_next): New function.
15152
15153 1999-06-22  Andrew Haley  <aph@cygnus.com>
15154
15155         * verify.c (verify_jvm_instructions): Check for pending blocks
15156         before invalid PC test and opcode switch, not after.
15157
15158 1999-06-21  Andrew Haley  <aph@cygnus.com>
15159
15160         * except.c (find_handler_in_range): The upper limit for exception
15161         ranges is exclusive, not inclusive: (start <= pc < end).
15162         (link_handler): find child pointer which points to outer by
15163         searching sibling list: previous code incorrectly assumed that
15164         outer->outer->first_child must point to outer.
15165         * verify.c (verify_jvm_instructions): FIXME added to code for
15166         `athrow'.
15167         (verify_jvm_instructions): Do not assume that the last block
15168         processed in a subroutine is a block which ends with a `ret'
15169         instruction.  With some control flows it is possible that the last
15170         block ends with an `athrow'.
15171
15172 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15173
15174         * parse.y (qualify_ambiguous_name): Reorganized the post
15175         evaluation of non WFL leading expression nodes.
15176
15177 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15178
15179         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15180         CONVERT_EXPR.
15181
15182 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15183
15184         * parse.y (qualify_ambiguous_name): Handle qualified expression
15185         beginning with a STRING_CST.
15186
15187 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15188
15189         * parse.y (register_fields): Set DECL_INITIAL on both
15190         pre-initialized static and public fields.
15191         (resolve_field_access): Static field access expressions to always
15192         use pointer types.
15193         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15194         qualification. CONVERT_EXPR to be resolved as an expression name.
15195         (java_complete_lhs): Identify and access qualified final
15196         initialized field in switch statement case expression.
15197         (fold_constant_for_init): Pre-initialized field decl constant to
15198         be folded.
15199
15200 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15201
15202         * parse.y (note_possible_classname): Mark returned node with
15203         QUALIFIED_P only if the original class name contained a '/'.
15204
15205 1999-06-05  Anthony Green  <green@cygnus.com>
15206
15207         * Make-lang.in (gcjh): More parallel build fixes.
15208
15209 1999-06-03  Mike Stump  <mrs@wrs.com>
15210
15211         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15212
15213 1999-06-02  Anthony Green  <green@cygnus.com>
15214
15215         * except.c (link_handler): Chain exception handlers in order.
15216
15217 1999-06-02  Anthony Green  <green@cygnus.com>
15218
15219         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15220         with nops and process as usual in order to always set correct EH
15221         ranges.  Emit detailed warnings about unreachable bytecodes.
15222
15223 1999-06-02  Anthony Green  <green@cygnus.com>
15224
15225         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15226         constant.
15227
15228 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15229
15230         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15231           or the searched field decl.
15232
15233 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15234
15235         * parse.y (fold_constant_for_init): Convert numerical constant
15236         values to the type of the assigned field.
15237
15238 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15239
15240         * expr.c (lookup_field): Relaxed the test on class loading error
15241         detection.
15242         * parse.y (fold_constant_for_init): Enabeled old code.
15243
15244 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15245
15246         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15247         decide the validity of the cast of a java.lang.Cloneable reference
15248         to an array.
15249         (patch_conditional_expr): Fixed first argument passed to
15250         binary_numeric_promotion.
15251
15252 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15253
15254         * parse.y (qualify_ambiguous_name): Take into account that a
15255         CONVERT_EXPR might specify a type as a WFL.
15256
15257 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15258
15259         * parse.y (patch_assignment): Save the rhs before using it as an
15260         argument to _Jv_CheckArrayStore.
15261
15262 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15263
15264         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15265
15266 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15267
15268         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15269         floating point literal only when the exponent indicator has been
15270         parsed.
15271
15272 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15273
15274         * parse.y (formal_parameter:): Construct argument tree list
15275         element even if a yet unsupported final parameter was encountered.
15276
15277 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15278
15279         * parse.y (finish_method_declaration): Issue errors for native or
15280         abstract methods declared with a method body, as well as for non
15281         native or non abstract methods with no method body.
15282
15283 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15284
15285         * class.c (build_utf8_ref): Initialize variable `field'.
15286
15287         * decl.c (init_decl_processing): Initialize variable `field'.
15288
15289         * expr.c (build_known_method_ref): Mark parameters `method_type',
15290         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15291         (process_jvm_instruction): Likewise for parameter `length'.
15292
15293         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15294         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15295         ATTRIBUTE_UNUSED.
15296
15297         * parse.y (maybe_generate_clinit): Remove unused variable
15298         `has_non_primitive_fields'.
15299         (find_in_imports_on_demand): Initialize variables `node_to_use'
15300         and `cl'.
15301         (patch_binop): Likewise for variable `prom_type'.
15302         (patch_unaryop): Likewise for variable `prom_type'.
15303
15304         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15305
15306         * xref.c (xref_table): Add missing initializer.
15307
15308 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15309
15310         * java-except.h (struct eh_range): Removed unused `next' member.
15311         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15312         after adding all exception handlers.  Sort exception ranges in
15313         order of start PC.
15314         (struct pc_index): New structure.
15315         (start_pc_cmp): New function.
15316         * except.c (add_handler): Return `void'.  Don't call link_handler;
15317         instead construct an ordinary linked list and do range
15318         coalescing.
15319         (check_nested_ranges): New function.
15320         (link_handler): Changed interface to allow merging of eh_ranges.
15321         Split overlapping ranges.  Return `void'.
15322
15323 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15324
15325         * parse.y (constructor_block_end:): New rule, tagged <node>.
15326         (constructor_body:): Use `constructor_block_end' instead of
15327         `block_end'.
15328
15329 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15330
15331         * parse.y (statement_nsi:): Pop `for' statement block.
15332         (java_complete_lhs): Labeled blocks containing no statement are
15333         marked as completing normally.
15334
15335 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15336
15337         * xref.c (xref_set_current_fp): New function, defined.
15338         * xref.h (xref_set_current_fp): New function, prototyped.
15339
15340 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15341
15342         * check-init.c (check_init): Take into account that
15343         LABELED_BLOCK_STMT can be empty.
15344
15345 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15346
15347         * parse.y (java_check_regular_methods): Warning check on not
15348         overriding methods with default access in other packages does not
15349         apply to `<clinit>'.
15350         (java_complete_lhs): If block body is an empty_stmt_node, replace
15351         it by NULL_TREE. This prevents gcc from generating an irrelevant
15352         warning.
15353
15354 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15355
15356         * check-init.c (check_init): Removed code accepting to see things
15357         falling through default:, when doing xrefs.
15358         * java-tree.h (do_not_fold): New global variable, declared.
15359         * parse.y (do_not_fold): New global variable, defined.
15360         (java_complete_expand_method): Set `do_not_fold' to the value of
15361         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15362         and reinstall them after them have been purged; do not check for
15363         initializations; do not issue missing return errors.
15364         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15365         when doing xrefs.
15366         (patch_binop): Skip the fold part when doing xrefs.
15367         (build_string_concatenation): Skip the concatenation part when
15368         doing xrefs.
15369         (patch_synchronized_statement): Do not generate a try-finally when
15370         doing xrefs.
15371         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15372         and keep the location where the throw was seen.
15373         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15374         any treatment on the converted node an simply return a NOP_EXPR of
15375         the targeted type.
15376         * xref.c (xref_get_data): New function, defined.
15377         * xref.h (xref_get_data): New function, declared.
15378         (XREF_GET_DATA): Use xref_get_data.
15379
15380 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15381
15382         * gjavah.c (print_include): Cast the result of `strlen' to int
15383         when comparing against a signed value.
15384         (add_namelet): Likewise.
15385
15386 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15387
15388         * expr.c (expand_invoke): Mark parameter `nargs' with
15389         ATTRIBUTE_UNUSED.
15390         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15391
15392         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15393         ATTRIBUTE_UNUSED.
15394
15395         * jcf-reader.c (get_attribute): Cast a value to long
15396         when comparing against a signed expression.  Likewise.
15397
15398         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15399         HOST_BITS_PER_CHAR.
15400
15401 1999-05-11  Andrew Haley  <aph@cygnus.com>
15402
15403         * parse.y (source_end_java_method): If the current method contains
15404         any exception handlers, force asynchronous_exceptions: this is
15405         necessary because signal handlers in libjava may throw exceptions.
15406         * decl.c (end_java_method): Ditto.
15407
15408 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15409
15410         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15411         flags.
15412         * jvspec.c (THREAD_NAME): Removed.
15413         (GC_NAME): Likewise.
15414         (MATHLIB): Likewise.
15415         (WITHLIBC): Likewise.
15416         (GCLIB): Likewise.
15417         (THREADLIB): Likewise.
15418         (MATH_LIBRARY): Likewise.
15419         (lang_specific_driver): Don't add `-l' options to command line.
15420         Instead, add a single --specs option.  Recognize `-L' options and
15421         use them to search for spec file.
15422         (find_spec_file): New function.
15423         (SPEC_FILE): New define.
15424
15425 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15426
15427         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15428         cpplib-enabled build.
15429
15430 1999-05-05  Per Bothner  <bothner@cygnus.com>
15431
15432         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15433         temporarily zero it while calling rest_of_decl_compilation.
15434
15435         * java-tree.h (string_ptr_type_node):  Add declaration.
15436         * decl.c:  Define and initialize string_ptr_type_node.
15437         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15438
15439         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15440         * parse.y (for_statement):  Now unconditionally exit_block.
15441         (finish_labeled_statement):  No longer exit_block if for-loop.
15442         (patch_loop_statement):  Check harder if the loop is already labeled.
15443
15444         * parse.y (patch_initialized_static_field):  Removed function.
15445         (maybe_generate_clinit):  Removed special handling for interfaces.
15446         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15447         on <clinit> to determine if it can be removed.
15448         (java_complete_expand_method):  Remove special handling for <clinit>.
15449         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15450         optimize if we get back empty_stmt_node.
15451         For MODIFY_EXPR, re-do checking of static initializers.
15452         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15453         For VAR_DECL, pass correct context.
15454
15455         * verify.c (verify_jvm_instructions):  Better error messages.
15456
15457 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15458
15459         * parse-scan.y (interface_declaration): Call
15460         report_class_declaration for interfaces.
15461
15462 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15463
15464         * Makefile.in: Remove -v from bison command lines.
15465
15466 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15467
15468         * check-init.c (check_init): Exclude a case of error when doing
15469         xrefs.
15470         * class.c (layout_class_method): Don't generate the error message
15471         twice when compiling from source.
15472         * lang-options.h: Added `-Wredundant-modifers' and
15473         `-Wunusupported-jdk11' flags and help text.
15474         * lang.c (lang_decode_option): Added support for
15475         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15476         flag_static_local_jdk11 and flag_redundant set accordingly.
15477         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15478         * parse.h (EXPR_WFL_ADD_COL): New macro.
15479         (DECL_END_SOURCE_LINE): Likewise.
15480         (DECL_INHERITED_SOURCE_LINE): Likewise.
15481         * parse.y (static_ref_err): New function, prototyped.
15482         (CCB_TK): Now tagged <operator>.
15483         (class_body:): Remember the location of the closing '}' of a class
15484         definition when doing xrefs.
15485         (block:): Likewise.
15486         (block_end:): Likewise.
15487         (create_class): Remember the location of the inherited class
15488         identifier when doing xrefs.
15489         (register_fields): Added test on first operand of `init' before
15490         testing it TREE_CODE.
15491         (method_header): Store the location of the class identifier in the
15492         class decl when doing xrefs.
15493         (finish_method_declaration): Don't combine first/last method line
15494         when doing xref.
15495         (java_check_regular_methods): Warning check on not overriding
15496         methods with default access on other packages move before check on
15497         static methods. Initialization of `aflags' also moved up.
15498         (resolve_expression_name): Call static_ref_err to report the error.
15499         (static_ref_err): New function, implemented.
15500         (resolve_field_access): Returned simplified static field access
15501         when doing xrefs.
15502         (resolve_qualified_expression_name): Check for illegal use of
15503         static fields in a non static context. Call static_ref_err to
15504         report error in various places.
15505         (java_complete_tree): Do not fold initialized static fields when
15506         doing xrefs.
15507         (java_complete_lhs): Likewise.
15508
15509 1999-04-29  Anthony Green  <green@cygnus.com>
15510
15511         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15512         create internal labels.
15513         (lookup_label): Ditto.
15514
15515 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15516
15517         * class.c (layout_class_method): Generate <clinit>'s rtl for
15518         interfaces.
15519         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15520         for interfaces' <clinit>.
15521         * expr.c (lookup_field): Search for fields in interfaces.
15522         (expand_invoke): Fixed indentation.
15523         (expand_java_field_op): Likewise. Use IS_CLINIT.
15524         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15525         (IS_CLINIT): New macro.
15526         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15527         interface was parsed.
15528         (maybe_generate_clinit): Don't generate if the current class is an
15529         interface with only fields of primitive types.
15530         (reset_method_name): Use IS_CLINIT.
15531         (java_complete_expand_method): Expand <clinit> when it exists for
15532         interfaces. Use IS_CLINIT.
15533         (resolve_expression_name): Use DECL_CONTEXT instead of
15534         current_class to build static field references.
15535         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15536         ARRAY_REF when doing xreferencing.
15537         (check_final_assignment): Fixed typo in leading comment. Use
15538         IS_CLINIT.
15539         (patch_array_ref): Don't fully expand array references when
15540         xreferencing.
15541         (patch_return): Use IS_CLINIT.
15542         (patch_throw_statement): Likewise.
15543
15544 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15545
15546         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15547
15548 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15549
15550         * decl.c (predef_filenames, predef_filenames_size): New globals
15551         (init_decl_processing): predef_filenames and predef_filenames_size
15552         initialized.
15553         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15554         extern.
15555         * jcf-parse.c (predefined_filename_p): New function.
15556         (yyparse): Check that files on the command line are specified only
15557         once and issue a warning otherwise.
15558         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15559         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15560         avoid a gcc warning with -W -Wall turned on.
15561         (java_expand_classes): Abort if errors were encountered.
15562         (java_complete_lhs): If the cross reference flag is set, wrap
15563         field DECL node around a WFL when resolving expression name.
15564
15565 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15566
15567         * lang.c (lang_decode_option): Fixed returned value when parsing
15568         `-fxref=...' and `-Wall'.
15569         * parse.y (source_end_java_method): Do not generate code when
15570         flag_emit_xref is set.
15571         (resolve_expression_name): Do not build static field access when
15572         flag_emit_xref is set.
15573         (resolve_field_access): No special treatment on `length' when
15574         flag_emit_xref is set. Do not build qualified static field access
15575         when flag_emit_xref is set.
15576         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15577         when flag_emit_xref is set.
15578         (patch_assignment): Do not generate array store runtime check when
15579         flag_emit_xref is set.
15580         * xref.c (xref_flag_value): Fixed function declaration
15581         indentation.
15582         (xset_set_data): New function.
15583         * xref.h (xref_set_data): Added prototype for new function.
15584         (typedef struct xref_flag_table): New field data.
15585         (XREF_GET_DATA): New macro.
15586
15587 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15588
15589         * xref.h (enum): Removed trailing comma.
15590
15591         * parse.y (resolve_qualified_expression_name): Added missing
15592         `break'.
15593
15594 1999-04-15  Anthony Green  <green@cygnus.com>
15595
15596         * gjavah.c: New prototypes for java_float_finite and
15597         java_double_finite.
15598
15599 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15600
15601         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15602         references.
15603
15604 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15605
15606         * Makefile.in (TREE_H): Add tree-check.h.
15607         (RTL_H): Add genrtl.h.
15608
15609 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15610
15611         * parse.y (patch_assignment): Added ArrayStoreException runtime
15612         check.
15613
15614 1999-04-06  Per Bothner  <bothner@cygnus.com>
15615
15616         * expr.c (pop_type_0):  New function.
15617         (pop_type):  Use pop_type_0.
15618         * java-tree.h (pop_type_0):  New declaration.
15619         * verify.c (verify_jvm_instructions):  Check return instructions.
15620
15621         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15622         class files.
15623
15624 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15625
15626         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15627
15628         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15629         (main_jcf): Don't define.
15630         (process_file): Don't set `main_jcf'.
15631
15632         * java-tree.h (main_jcf): Don't declare.
15633
15634         * jcf-parse.c (main_jcf): Add static definition.
15635
15636         * lang.c (main_jcf): Don't define.
15637
15638 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15639
15640         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15641
15642         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15643
15644         * jcf-depend.c: Include "config.h", not <config.h>.
15645
15646         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15647         `bcopy' to PTR.
15648
15649         * jcf-path.c: Include "config.h", not <config.h>.
15650
15651         * lex.c: Don't include various system header files.
15652         (java_init_lex): Cast the argument of `bzero' to PTR
15653
15654         * parse-scan.y (java_push_parser_context): Likewise.
15655
15656         * parse.y (java_push_parser_context): Likewise.
15657         (patch_bc_statement): Match format specifier to variable argument.
15658
15659         * xref.c: Don't include <stdio.h>.
15660
15661 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15662
15663         * parse.y (struct parser_ctxt *ctxp): Now global.
15664         (declare_local_variables): Use WFL compound value for the
15665         declaration source line value, when doing cross-referencing.
15666
15667 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15668
15669         * gjavah.c (print_field_info): Allow constants of other types.
15670         (print_include): Generate include when new name is proper prefix
15671         of already printed name.
15672         (add_namelet): Likewise.
15673         (cxx_keyword_subst): New function.
15674         (print_method_info): Use it.
15675         (print_field_name): New function.
15676         (get_field_name): New function.
15677         (print_field_info): Use get_field_name and print_field_name.
15678
15679 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15680
15681         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15682         'KR-C', so gperf uses the `const' keyword on strings.
15683
15684         * keyword.gperf (java_keyword): Const-ify a char*.
15685
15686 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15687
15688         * parse.y (patch_bc_statement): Fixed identation and a bogus
15689         `printf' format.
15690
15691 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15692
15693         * parse.y (patch_assignment): Allow static variables in other
15694         classes to be assigned.
15695
15696 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15697
15698         * class.c (maybe_add_interface): Remove unused variable
15699         `interface_binfo'.
15700         (make_class_data): Use = for assignment, not ==.  Likewise.
15701         (emit_register_classes): Remove unused variable `decl'.
15702
15703         * lex.c: Fix comment so as not to contain an embedded `/*'.
15704
15705         * verify.c (verify_jvm_instructions): Remove unused variable
15706         `self_type'.
15707
15708 1999-03-27  Per Bothner  <bothner@cygnus.com>
15709
15710         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15711         (complete_labeled_statement):  Rename to finish_labeled_statement.
15712         (complete_for_loop):  Rename to finish_for_loop.
15713         (complete_method_declaration):  Rename to finish_method_declaration.
15714
15715         * java-tree.h (continue_identifier_node):  New global node.
15716         * decl.c:  Define and initialize continue_identifier_node.
15717         * parse.y (generate_labeled_block):  Remove - no longer needed.
15718         (build_loop_body):  Use continue_identifier_node for continue block.
15719         (finish_labeled_statement):  Also do pop_labeled_block actions.
15720         (java_complete_lhs):  POP_LOOP even if error.
15721         (build_labeled_block):  Special handling for continue_identifier_node.
15722         (patch_loop_statement):  Re-organize.
15723         (patch_bc_statement):  Re-write.
15724
15725 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15726
15727         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15728         using a WFL compound value.
15729         * parse.y (xref.h): Include.
15730         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15731         WFL compound value.
15732         (register_fields): Set WFL compound value to lineno if doing
15733         xrefs.
15734         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15735         is set.
15736         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15737         * xref.h (expand_xref): Prototype renamed from xref_generate.
15738
15739 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15740
15741         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15742         (GET_CURRENT_BLOCK): New macro.
15743         * parse.y (current_static_block): New global variable.
15744         (method_body:): Define action.
15745         (complete_method_declaration): Set current_function_decl to NULL
15746         when work on the current method is done.
15747         (declare_local_variables): Use GET_CURRENT_BLOCK.
15748         (java_method_add_stmt): Likewise.
15749         (java_complete_expand_method): Disable the use of `this' when
15750         expanding <clinit>.
15751         (enter_a_block): If no current method exist, use
15752         current_static_block to link static initializer blocks.
15753         (exit_block): Rewritten to use current_static_block when no current
15754         method decl exists.
15755         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15756         (patch_return): Forbid the use of `return' in static initializers.
15757         (patch_throw_statement): Fixed indentation. Issue specific error
15758         for uncaught thrown checked exception in static initializer
15759         blocks. Removed FIXME.
15760
15761 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15762
15763         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15764         Link gcj from gcc.o.
15765
15766 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15767
15768         * parse.y (find_applicable_accessible_methods_list): When dealing
15769         with interface: ensure that a given interface or java.lang.Object
15770         are searched only once.
15771
15772 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15773
15774         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15775
15776         * jcf-dump.c (print_access_flags): Add braces around if-else.
15777
15778         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15779         COMBINE_INPUTS.
15780
15781         * lex.c (build_wfl_node): Add static prototype.
15782
15783         * lex.h (build_wfl_node): Remove static prototype.
15784
15785         * parse.y: Include lex.c early enough to declare everything needed.
15786         Ensure calls to `build_wfl_node' pass the proper arguments.
15787         (create_class): Remove unused variable `super_decl'.
15788         (get_printable_method_name): Initialize variable `name'.
15789
15790 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15791
15792         * Changelog: Fixed 1999-03-22 typos.
15793         * lang.c (lang_decode_option): Fixed typo in error string in the
15794         XARG section.
15795
15796 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15797
15798         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15799         (xref.o): New rule.
15800         * java-tree.h (flag_emit_xref): Declared extern.
15801         * lang.c (xref.h): Included.
15802         (flag_emit_xref): New global variable.
15803         (lang_decode_option): Added support for -fxref.
15804         * xref.c: Created.
15805         * xref.h: Likewise.
15806
15807 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15808
15809         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15810         linked with.
15811
15812 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15813
15814         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15815         $(srcdir)/../system.h and $(JAVA_TREE_H).
15816         (jcf-io.o): Depend on $(JAVA_TREE_H).
15817         (mangle.o): Likewise.
15818
15819         * check-init.c (check_cond_init): Add static prototype.
15820
15821         * class.c (build_java_method_type, hashUtf8String,
15822         make_field_value, get_dispatch_vector, get_dispatch_table,
15823         append_gpp_mangled_type, mangle_static_field): Likewise.
15824         (strLengthUtf8): Hide unused definition.
15825         (hashUtf8String): Const-ify.
15826         (make_field_value): Un-ANSI-fy.
15827
15828         * constants.c: Move inclusion of jcf.h above java-tree.h.
15829         (set_constant_entry, find_class_or_string_constant,
15830         find_name_and_type_constant, get_tag_node,
15831         build_constant_data_ref): Add static prototype.
15832
15833         * decl.c (push_jvm_slot, builtin_function,
15834         lookup_name_current_level): Likewise.
15835         (builtin_function): Const-ify.
15836
15837         * except.c (expand_start_java_handler, expand_end_java_handler):
15838         Add static prototype.
15839
15840         * expr.c (flush_quick_stack, push_value, pop_value,
15841         java_stack_swap, java_stack_dup, build_java_athrow,
15842         build_java_jsr, build_java_ret, expand_java_multianewarray,
15843         expand_java_arraystore, expand_java_arrayload,
15844         expand_java_array_length, build_java_monitor, expand_java_pushc,
15845         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15846         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15847         expand_compare, expand_test, expand_cond, expand_java_goto,
15848         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15849         expand_java_field_op, java_push_constant_from_pool): Likewise.
15850
15851         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15852         (build_java_arraynull_check): Mark parameters `node' and `type'
15853         with ATTRIBUTE_UNUSED.
15854         (note_label): Likewise for parameter `current_pc'.
15855         (expand_java_call, expand_java_ret): Hide unused definition.
15856
15857         * java-tree.h (make_class, build_constants_constructor,
15858         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15859         init_outgoing_cpool, register_class, emit_register_classes,
15860         java_layout_seen_class_methods): Prototype.
15861         (unicode_mangling_length): Const-ify.
15862         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15863         emit_unicode_mangled_name, format_int, format_uint,
15864         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15865         jcf_print_utf8_replace, open_class): Prototype.
15866
15867         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15868         <stdio.h>.  Include tree.h/java-tree.h.
15869         (utf8_equal_string usage, process_class): Add static prototype.
15870         (open_class): Don't prototype this here.
15871         (utf8_equal_string): Match arguments to format specifiers.
15872         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15873         TABLE_SWITCH, disassemble_method): Likewise.
15874
15875         * jcf-io.c: Include tree.h/java-tree.h.
15876         (open_class, find_classfile, jcf_print_utf8,
15877         jcf_print_utf8_replace): Const-ify.
15878
15879         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15880         parse_class_file): Add static prototype.
15881         (find_in_current_zip): Match definition to existing static
15882         prototype.
15883
15884         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15885         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15886         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15887         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15888         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15889         generate_bytecode_return, perform_relocations, init_jcf_state,
15890         init_jcf_method, release_jcf_state, generate_classfile):
15891         Add static prototype.
15892         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15893         (make_class_file_name): Const-ify.
15894
15895         * jcf.h (find_classfile): Const-ify.
15896
15897         * jv-scan.c (reset_report): Remove prototype.
15898
15899         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15900         (error): Rewrite to allow varargs.
15901
15902         * lang.c (lang_f_options): Const-ify.
15903
15904         * lex.c (java_parse_escape_sequence): Add static prototype.
15905         (java_allocate_new_line): Match definition to existing static
15906         prototype.
15907
15908         * mangle.c Include tree.h/java-tree.h.
15909         (unicode_mangling_length, emit_unicode_mangled_name,
15910         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15911
15912         * parse.h (jdep_code): Remove trailing comma in enumeration.
15913         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15914         (reset_report): Add prototype.
15915
15916         * verify.c (push_pending_label, merge_types): Add static
15917         prototypes.
15918
15919         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15920
15921 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15922
15923         * parse.y (find_applicable_accessible_methods_list): Extend the
15924         search to superinterfaces when relevant.
15925         (search_applicable_methods_list): New function.
15926
15927 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15928
15929         * class.c (unmangle_classname): Implemented stricter testing
15930         before setting the QUALIFIED_P flag on an identifier.
15931
15932 1999-03-16  Per Bothner  <bothner@cygnus.com>
15933
15934         * parse.y (java_complete_lhs):  Call force_evaluation_order
15935         after patch_newarray.
15936         (patch_binop):  Don't call fold if there are side effects.
15937
15938 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15939
15940         * parse.y (java_stabilize_reference): Use save_expr instead of
15941         building a SAVE_EXPR node.
15942         (java_complete_lhs): Patch the resulting string of the `+='
15943         operator (if necessary) and complete the RHS after having built
15944         the cast.
15945
15946 1999-03-15  Per Bothner  <bothner@cygnus.com>
15947
15948         * class.c (make_class):  Don't set CLASS_P here (because
15949         this function is also called by build_java_array_type).
15950         (push_class):  Set CLASS_P here instead.
15951         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15952
15953         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15954         context.  If the context is class, perfer "super" over "synchronized".
15955         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15956
15957         * parse.y (create_class):  Don't call parser_check_super here;
15958         it is not robust.  Always wait until later.
15959
15960         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15961         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15962
15963 1999-03-13  Per Bothner  <bothner@cygnus.com>
15964
15965         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15966         * lex.h (UNGETC):  Change misleading macro.
15967
15968 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15969
15970         * parse.y (java_stabilize_reference): Return NODE when patching a
15971         COMPOUND_EXPR.
15972         (java_complete_lhs): Put parenthesis around truth values.
15973
15974 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15975
15976         * class.c (layout_class_method): Don't make rtl for interface
15977         methods.
15978         * parse.h (GET_TYPE_NAME): New macro.
15979         * parse.y (if_then_statement:): Fixed indentation.
15980         (if_then_else_statement:): Likewise.
15981         (for_statement:): Fixed spacing.
15982         (try_statement:): Fixed indentation.
15983         (create_interface): Don't force interfaces to be abstract.
15984         (method_header): Abstract methods are OK in interfaces.
15985         (declare_local_variables): Fixed typo in comment.
15986         (java_complete_expand_method): Fixed indentation.
15987         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15988         non accessible fields.
15989         (java_stabilize_reference): New function.
15990         (java_complete_lhs): Fixed indentation. Use
15991         java_stabilize_reference in compound assignment. Insert the
15992         cast. If not processing `+' fix string constants before processing
15993         binop.
15994
15995 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15996
15997         * constants.c (find_class_or_string_constant): Cast variable `j'
15998         to a `jword' when comparing against one.
15999
16000         * expr.c (java_lang_expand_expr): Remove unused variables
16001         `has_finally_p' and `op0'.
16002
16003         * gjavah.c (print_field_info): Cast a value to jint when comparing
16004         against one.  Likewise for a jlong.
16005         (add_namelet): Likewise cast a `sizeof' to an int when comparing
16006         against a signed quantity.
16007
16008         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16009         (print_signature): Don't needlessly dereference variable `str'
16010
16011         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16012         `max_locals' with ATTRIBUTE_UNUSED.
16013         (jcf_parse_class): Likewise for variable `index'.
16014
16015         * parse.h (reverse_jdep_list): Remove static prototype.
16016
16017         * parse.y (build_jump_to_finally): Remove prototype and definition.
16018         (reverse_jdep_list): Add static prototype.
16019
16020         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16021         `assignment' and `expr_decl'.
16022
16023         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16024
16025 1999-03-12  Andrew Haley  <aph@cygnus.com>
16026
16027         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16028         we'll need a directory separator and a null character.
16029
16030 1999-03-10  Per Bothner  <bothner@cygnus.com>
16031
16032         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
16033
16034 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16035
16036         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16037         interfaces.
16038
16039 1999-03-05  Per Bothner  <bothner@cygnus.com>
16040
16041         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
16042
16043         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
16044
16045         * class.c (layout_class_method):  A static method in a base class
16046         is never overridden, so treat it like it doesn't exist.
16047         However, do complain about private non-static method overriding
16048         public static method.
16049
16050         * parse.y:  Don't set unused INITIALIZED_P flag.
16051         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
16052
16053         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
16054         (build_array_from_name):  Re-order &index[string] to &string[index].
16055
16056         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
16057         error_mark (it might catch more errors, but it is more likely to lose).
16058
16059 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16060
16061         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16062         (parse-scan.o): Depend on toplev.h.
16063
16064         * class.c (make_method_value): Add prototype.  Make it static.
16065         Remove unused second argument, caller changed.
16066
16067         * expr.c (java_lang_expand_expr): Remove unused variable
16068         `return_label'.
16069
16070         * java-tree.h: Don't prototype find_in_current_zip.
16071         Add prototypes for verify_constant_pool, start_java_method,
16072         end_java_method, give_name_to_locals, expand_byte_code,
16073         open_in_zip, set_constant_value, find_constant1, find_constant2,
16074         find_utf8_constant, find_string_constant, find_class_constant,
16075         find_fieldref_index, find_methodref_index, write_constant_pool,
16076         count_constant_pool_bytes and encode_newarray_type.
16077
16078         * jcf-dump.c: Remove unused variable `LONG_temp'.
16079
16080         * jcf-parse.c: Include parse.h.
16081         (jcf_parse_source): Remove unused parameter, all callers changed.
16082         (jcf_figure_file_type): Add static prototype.
16083         (find_in_current_zip): Likewise.  Also remove unused parameter,
16084         all callers changed.
16085         (read_class): Initialize variable `saved_pos'.
16086
16087         * jcf-reader.c (jcf_parse_preamble): Mark variables
16088         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16089
16090         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16091         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16092         (java_parse_doc_section): Initialize variable `seen_star'.
16093         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16094         (java_lex_error): Mark parameters `msg' and `forward' with
16095         ATTRIBUTE_UNUSED.
16096         (java_get_line_col): Mark parameters `filename' and `line' with
16097         ATTRIBUTE_UNUSED.
16098
16099         * parse-scan.y: Include toplev.h.
16100         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16101
16102         * parse.h: use `struct JCF', not plain `JCF'.
16103         (java_parser_context_save_global, java_expand_classes
16104         java_parser_context_restore_global, java_parse): Add prototypes.
16105
16106         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16107         `node'.
16108
16109 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
16110
16111         *  check-init.c (check_init):  COPYN takes word count, not bit count.
16112
16113 1999-02-26  Per Bothner  <bothner@cygnus.com>
16114
16115         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
16116         explicit build_decl.  (Avoids crash in reload when optimizing.)
16117
16118 1999-02-25  Per Bothner  <bothner@cygnus.com>
16119
16120         * decl.c (complete_start_java_method):  Handle synchronized method
16121         even when compiling from bytecode.
16122
16123 1999-02-26  Tom Tromey  <tromey@cygnus.com>
16124
16125         * gjavah.c (add_class_decl): Only generate `#include' if outer
16126         class is not the name of the class we are processing.  Correctly
16127         append `.h' in #include.
16128         (process_file): Clean up newlines around generated `#include's.
16129         (decode_signature_piece): Correctly handle inner classes.
16130         (struct include): New structure.
16131         (all_includes): New global.
16132         (print_include): New function.
16133         (add_class_decl): Use it.
16134         (process_file): Likewise.
16135         (add_class_decl): Generate include for java-array.h if array
16136         seen.
16137         (process_file): Don't generate java-array.h include.
16138
16139         * gjavah.c (add_namelet): Check for standard package names here.
16140         (add_class_decl): Don't check for standard package names here.
16141
16142 1999-02-25  Tom Tromey  <tromey@cygnus.com>
16143
16144         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16145         When reading a zip file, only use strncmp if both strings are
16146         bigger than the buffer length.  Initialize `k' when looping
16147         through zip file.
16148
16149 1999-02-24  Tom Tromey  <tromey@cygnus.com>
16150
16151         * gjavah.c (struct namelet): New structure.
16152         (add_namelet): New function.
16153         (print_namelet): New function.
16154         (print_class_decls): Use add_namelet and print_namelet to generate
16155         namespaces and not classes.
16156         (method_printed): New global.
16157         (HANDLE_END_METHOD): Examine method_printed.
16158         (print_method_info): Set method_printed when required.  Print
16159         error if function to be ignored is marked virtual.  Handle $finit$
16160         method.
16161         (METHOD_IS_FINAL): New macro.
16162         (print_field_info): Use it.
16163         (HANDLE_METHOD): Clear method_printed.
16164         (method_pass): New global.
16165         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16166         (process_file): Do two passes over both fields and methods.
16167         (HANDLE_METHOD): Examine method_pass.
16168         (root): New global.
16169         (add_class_decl): New function.
16170         (print_class_decls): Don't scan over entire constant pool.
16171
16172 1999-02-23  Tom Tromey  <tromey@cygnus.com>
16173
16174         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16175         disable linking in that case.
16176
16177 1999-02-20  Tom Tromey  <tromey@cygnus.com>
16178
16179         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16180         not 0x1f.
16181
16182 1999-02-21  Per Bothner  <bothner@cygnus.com>
16183
16184         * decl.c (build_result_decl), java-tree.h:  New method.
16185         (complete_start_java_method):  Handle synchronized methods.
16186         Don't build DECL_RESULT here.  (Ordering dependency problem.)
16187         (start_java_method):  Call build_result_decl here instead  ...
16188         * parse.y (java_complete_expand_method):  ... and here.
16189         (expand_start_java_method): Don't call complete_start_java_method here.
16190         (java_complete_expand_method):  Call it here instead.
16191         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
16192         * java-tree.h:  ... here.
16193
16194         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
16195         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
16196         for ARRAY_REF - it doesn't work when array bounds are checked.
16197         (patch_array_ref):  Handle it here instead.
16198
16199         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16200
16201 1999-02-19  Per Bothner  <bothner@cygnus.com>
16202
16203         Force left-to-right evaluation of binary operations etc.
16204         * expr.c (force_evaluation_order), java-tree.h:  New function.
16205         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16206         calls, and ARRAY_REFs to force_evaluation_order.
16207         (various):  Set TREE_SIDE_EFFECTS more carefully.
16208
16209         Tolerate random (non-UTF8) encoding in comments without complaining.
16210         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16211         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16212
16213         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16214         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16215
16216         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16217         COMPOUND_EXPR.  Don't complain about empty statement after return.
16218
16219 1999-02-19  Per Bothner  <bothner@cygnus.com>
16220
16221         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16222         in TREE_LIST - just chain the POINTER_TYPEs together.
16223         (resolve_class):  If type already resolved, return decl.
16224         After resolving, update TREE_TYPE(class_type), and name (if array).
16225         * parse.h (do_resolve_class), parse.y:  Make non-static.
16226         * class.c (maybe_layout_super_class):  Take this_class argument.
16227         Do do_resolve_class if necessary.
16228         (layout_class, layout_class_methods): Adjust calls appropriately.
16229         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16230         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16231         * typeck.c (build_java_array_type):  Don't call layout_class.
16232
16233 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16234
16235         * parse.y (check_pkg_class_access): Allow private class access
16236         within the same package.
16237         (strip_out_static_field_access_decl): New function.
16238         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16239         operator argument before testing its nature.
16240
16241 1999-02-03  Per Bothner  <bothner@cygnus.com>
16242
16243         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16244         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16245         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16246         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16247         * expr.c (java_lang_expand_expr):  Likewise.
16248         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16249         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16250         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16251         (build_try_statement):  Remove finally parameter and handling.
16252         (build_try_finally_statement):  New function.
16253         (patch_try_statement):   No longer need to support finally clause.
16254         (try_statement):  Update grammar action rules.
16255         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16256         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16257
16258 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16259
16260         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16261         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16262
16263 1999-02-17  Andrew Haley  <aph@cygnus.com>
16264
16265         * class.c (build_utf8_ref): Back out broken patch which was
16266         intended to to output signatures using '.' as a separator.
16267
16268         * class.c (make_class_data): Output signatures using '.' as a
16269         separator, rather than '/'.
16270         (mangled_classname): Likewise.
16271         (make_field_value): Likewise.
16272         (make_method_value): Likewise.
16273         * constants.c (alloc_class_constant): Likewise.
16274         * expr.c (build_invokeinterface): Likewise.
16275
16276 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16277
16278         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16279         of an ancient workaround.
16280
16281 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16282
16283         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16284         here anymore.
16285
16286 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16287
16288         * lex.c (yylex): Encode \0 as UTF8.
16289
16290 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16291
16292         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16293         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16294         (libgcj_zip): Renamed.
16295         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16296         LIBJAVA_ZIP_FILE.
16297         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16298
16299         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16300         (GC_NAME): Renamed -lgc to -lgcjgc.
16301
16302 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16303
16304         * lex.c (java_lang_cloneable): Initialize.
16305         * parse.y (java_lang_cloneable): New static variable.
16306         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16307         doing one more qualification round.
16308         (valid_ref_assignconv_cast_p): Reject null source or
16309         destination. Allow an array to be cast into java.lang.Cloneable.
16310         (patch_cast): Swapped two first arguments to first call to
16311         valid_ref_assignconv_cast_p.
16312
16313 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16314
16315         * parse.h: DECL_P renamed JDECL_P.
16316         * parse.y: DECL_P replaced by JDECL_P.
16317         (build_array_from_name): Always use pointer's type.
16318         (patch_bc_statement): Extra code to search continue target in a
16319         for loop. Fixed comments. Continue target is current loop when
16320         unlabeled.
16321
16322 1999-02-05  Andrew Haley  <aph@cygnus.com>
16323
16324         * class.c (make_class_data): The superclass of an interface should
16325         be null, not class Object.
16326
16327         * lex.c (java_lex): Sign extend hex literals.
16328
16329 1999-02-04  Andrew Haley  <aph@cygnus.com>
16330
16331         * class.c (build_utf8_ref): Output signatures using '.' as a
16332         separator, rather than '/'.
16333         (make_class_data): Likewise.
16334
16335 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16336
16337         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16338         mkstemp.o.  Get them from libiberty now.
16339
16340 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16341
16342         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16343
16344 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16345
16346         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16347         from libiberty.h
16348
16349 1999-02-02  Per Bothner  <bothner@cygnus.com>
16350
16351         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16352         * jcf-write.c (generate_bytecode_return):  New function.
16353         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16354
16355         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16356         generate special [fd]const_[01] instructions.
16357
16358         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16359
16360         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16361         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16362
16363 1999-02-01  Per Bothner  <bothner@cygnus.com>
16364
16365         * parse.y (patch_method_invocation):  Handle calling static methods,
16366         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16367
16368         * parse.y (java_complete_lhs):  Don't complain about unreachable
16369         exit condition in a do-while statement.
16370
16371 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16372
16373         * lex.c (java_read_char): Fixed utf8 decoding.
16374         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16375         range.
16376         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16377         comments. Local variable `all_primitive' is gone. Broadened
16378         acceptance of `0' to floating point targets. `long' can now be
16379         widened to `double' or `float'.
16380         (valid_method_invocation_conversion_p): Added leading
16381         comment. Fixed tabulation.
16382         (build_string_concatenation): Optimize out left or right empty
16383         string constants.
16384
16385 1999-01-28  Per Bothner  <bothner@cygnus.com>
16386
16387         * jcf-write.c (localvar_alloc):  Only emit entry for
16388         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16389         (generate_bytecode_insns):  Only call put_linenumber if
16390         debug_info_level > DINFO_LEVEL_NONE.
16391         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16392         is specified, add -g1 (for compatibility wih javac).
16393
16394 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16395
16396         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16397         gjavah.o, check-init.o, jv-scan.o
16398
16399 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16400
16401         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16402
16403         * gjavah.c: Include config.h and system.h.
16404
16405         * javaop.h (inline): Don't define, its handled by system.h.
16406         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16407         from `inline' to `static inline'.
16408
16409         * jcf.h (inline): Don't define, its handled by system.h.
16410
16411         * lex.c (inline): Likewise.
16412
16413 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16414
16415         * lang-specs.h: Map -Qn to -fno-ident.
16416
16417 1999-01-29  Richard Henderson  <rth@cygnus.com>
16418
16419         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16420
16421 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16422
16423         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16424         then cast it to Object before calling `append' method.
16425
16426 1999-01-28  Per Bothner  <bothner@cygnus.com>
16427
16428         * check-init.c (check_bool2_init, check_bool_init, check_init):
16429         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16430         * jcf-write.c (generate_bytecode_insns):  Likewise.
16431
16432 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16433
16434         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16435         * parse.y (patch_cast): Allow a boolean to be cast into a
16436         boolean.
16437
16438 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16439
16440         * parse.y: (class_declaration:): Fixed indentation.
16441         (class_member_declaration:): Extra `;' after field declaration now
16442         accepted.
16443         (interface_declaration:): Removed debug messages in error reports.
16444         (patch_binop): Nodes created and returned inherit the orignal
16445         node's COMPOUND_ASSIGN_P flag value.
16446         (patch_cast): Fix cast from char to floating point.
16447
16448 1999-01-25  Andrew Haley  <aph@cygnus.com>
16449
16450         * except.c, java-except.h (expand_resume_after_catch): new
16451         function.
16452         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16453         to branch back to main flow of control after a catch block.
16454
16455 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16456
16457         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16458         $(srcdir)/../system.h.
16459         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16460         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16461         (jcf-write.o): Likewise.
16462         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16463         (mangle.o): Depend on $(srcdir)/../toplev.h.
16464         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16465         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16466
16467         * class.c: Include output.h and parse.h.
16468         (mangled_classname): Add the `const' keyword to a char*.
16469         (find_named_method): Hide unused function definition.
16470         (build_utf8_ref): Change type of variable `c' to unsigned char.
16471         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16472         (build_class_ref): Add the `const' keyword to a char*.
16473         (layout_class_method): Remove unused variable `buf'.
16474
16475         * decl.c (find_local_variable): Remove unused variable `rtl'.
16476         (pushdecl): Likewise for variables `different_binding_level' and
16477         `oldglobal'.
16478         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16479         (maybe_build_cleanup): Likewise for parameter `decl'.
16480
16481         * except.c (expand_start_java_handler): Mark parameter `range'
16482         with ATTRIBUTE_UNUSED.
16483
16484         * expr.c: Include except.h.
16485         (pop_type): Remove unused variable `i'.
16486         (pop_value): Likewise for variables `n_words' and `i'.
16487         (expand_java_arrayload): Likewise for variable `convert'.
16488         (java_lang_expand_expr): Likewise for variables `op0', `type',
16489         `mode', `unsignedp', `node' and `elements'.
16490         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16491         `eh_ranges'.
16492         (process_jvm_instruction): Add a `const' qualifier to a char*.
16493
16494         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16495         (temp_directory): Likewise.
16496         (print_c_decl): Likewise.
16497         (print_method_info): Likewise.
16498         (decode_signature_piece): Likewise.
16499         (print_mangled_classname): Likewise.
16500
16501         * java-except.h: Provide prototypes for maybe_start_try,
16502         maybe_end_try and add_handler.
16503
16504         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16505         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16506         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16507         init_expr_processing, push_super_field, init_class_processing,
16508         can_widen_reference_to, class_depth, verify_jvm_instructions,
16509         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16510         set_local_type, merge_type_state, push_type, load_type_state,
16511         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16512         emit_unicode_mangled_name): Add prototypes.
16513
16514         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16515         (print_signature_type): Use ISDIGIT, not isdigit.
16516         (print_signature): Remove unused variable `j'.
16517
16518         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16519         int when comparing against one.
16520
16521         * jcf-parse.c: Include toplev.h.
16522
16523         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16524         (localvar_free): Remove unused variable `i'.
16525         (generate_bytecode_conditional): Likewise for variable `kind'.
16526
16527         * jv-scan.c: Include config.h and system.h.  Remove redundant
16528         OS header and gansidecl.h includes.
16529         (warning): Add the `const' keyword to a char*.  Also add
16530         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16531         __STDC__, when determining whether to use ANSI-isms.
16532         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16533         (xmalloc): Don't redundantly prototype here.
16534         (main): Remove unused parameter `envp'.  Also fix the arguments
16535         passed to function `fatal' to match the format specifier.
16536
16537         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16538
16539         * mangle.c: Include toplev.h.
16540         (emit_unicode_mangled_name): Declare parameter `len'.
16541
16542         * parse.y (parse_warning_context): Add the `const' keyword to a
16543         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16544         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16545         (issue_warning_error_from_context): Add the `const' keyword to
16546         a char*.
16547         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16548         not `__STDC__' for whether to use ANSI-isms.
16549
16550         * typeck.c (incomplete_type_error): Mark parameters `value' and
16551         `type' with ATTRIBUTE_UNUSED.
16552         (parse_signature_type): Use ISDIGIT, not isdigit.
16553
16554         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16555         (verify_jvm_instructions): Likewise.  Remove unused variables
16556         `field_name' and `default_val'.
16557
16558         * zextract.c: Include config.h and system.h.  Remove redundant
16559         OS header includes.
16560
16561         * zipfile.h: Prototype `read_zip_archive'.
16562
16563 1999-01-21  Andrew Haley  <aph@cygnus.com>
16564
16565         * typeck.c (convert): Allow conversions to void type: some
16566         optimizations in gcc do this.
16567
16568 1999-01-21  Andrew Haley  <aph@cygnus.com>
16569
16570         * typeck.c (convert_ieee_real_to_integer): New function.
16571         (convert): When not using fast-math and using hardware fp, convert
16572         an IEEE NaN to zero.
16573
16574 1999-01-18  Andrew Haley  <aph@cygnus.com>
16575
16576         * parse.y (patch_binop): Do a type conversion from signed to
16577         unsigned and then back to signed when a ">>>" is found.
16578
16579 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16580
16581         * java-tree.h: (check_for_initialization): Added prototype.
16582         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16583         * parse.y (do_resolve_class): Removed unused locals.
16584         (read_import_dir): Likewise.
16585         (resolve_qualified_expression_name): Array creation
16586         expressions are valid primary expressions.
16587         (qualify_ambiguous_name): Likewise.
16588         (patch_synchronized_statement): Removed unused local.
16589
16590 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16591
16592         * Makefile.in (zextract.o): Add dependencies.
16593
16594         * Makefile.in: Do not put ^Ls at the start of a line.
16595
16596 1999-01-15  Per Bothner  <bothner@cygnus.com>
16597
16598         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16599         sub-type the result of the call that gets the exception value.
16600
16601         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16602         don't call finish_class.
16603
16604         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16605         clear found before continuing.
16606
16607         * verify.c (verify_jvm_instructions):  On an array load, allow
16608         and handle top of stack to be TYPE_NULL.
16609
16610         * gjavah.c (generate_access):  Translate Java package private or
16611         protected access to C++ public, but with a comment.
16612
16613 1999-01-13  Andrew Haley  <aph@cygnus.com>
16614
16615         * expr.c (generate_name): Name prefix changed to avoid clashes
16616         with assembler temp labels.
16617
16618         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16619         MODIFY_EXPR.  Without this, code for the assignment may not be
16620         generated at all and the synchronized statement will read an
16621         uninitialized variable.
16622
16623 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16624
16625         * class.c (maybe_layout_super_class): Fixed returned value.
16626         * lex.c: Added 1999 to the copyright.
16627         (java_init_lex): Initialize java_lang_imported.
16628         * lex.h: Added 1999 to the copyright.
16629         * parse.h: Added 1999 to the copyright.
16630         (REGISTER_IMPORT): Fixed typo in trailing macro.
16631         (CURRENT_OSB): New macro.
16632         (struct parser_ctxt): New fields osb_depth, osb_limit.
16633         * parse.y (java_lang_id): New global variable.
16634         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16635         (array_creation_expression:): Use CURRENT_OSB.
16636         (dims:): Uses a stack to keep track of array dimensions.
16637         (cast_expression:): Use CURRENT_OSB.
16638         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16639         conditions.
16640         (register_fields): Fixed typos in comment.
16641         (check_method_redefinition): Fixed comment indentation.
16642         (java_check_regular_methods): Set saved found wfl to NULL after
16643         having reinstalled it in the previously found DECL_NAME.
16644
16645 1999-01-10  Richard Henderson  <rth@cygnus.com>
16646
16647         * gjavah.c (java_float_finite): Use a union to do type punning.
16648         (java_double_finite): Likewise.
16649
16650 1999-01-09  Per Bothner  <bothner@cygnus.com>
16651
16652         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16653         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16654         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16655         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16656         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16657         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16658
16659 1999-01-08  Per Bothner  <bothner@cygnus.com>
16660
16661         * check-init.c (check_init):  If compiling to native, we don't
16662         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16663
16664 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16665
16666         * parse-scan.y (variable_declarator_id): Set or increment
16667         bracket_count.
16668         (bracket_count): New global.
16669         (formal_parameter): Handle case where bracket pairs trail variable
16670         declarator id.
16671
16672 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16673
16674         * jcf-parse.c (yyparse): variable len changed from a char to an
16675         int to prevent overflow.
16676
16677 1999-01-06  Per Bothner  <bothner@cygnus.com>
16678
16679         * java-tree.h:  Declare read_class.
16680         * jcf-parse.c (read_class):  New function.
16681         (load_class):  Now just call read_class.
16682
16683         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16684         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16685         which is needed by java_parse_abort_on_error macro,
16686         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16687
16688         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16689         constructor, if initializing a static field.
16690         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16691         * expr.c (java_lang_expand_expr):  For a static array constructor
16692         of primitive elements, allocate the array itself statically.
16693         Disabled until we can set the vtable field statically.
16694
16695         * check-init.c:  New file.  Checks for definite assignment.
16696         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16697         * parse.y (java_complete_expand_method): Call check_for_initialization.
16698         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16699
16700 1999-01-06  Graham <grahams@rcp.co.uk>
16701
16702         * parse.y : include system.h instead of including
16703         standard headers directly with the exception of <dirent.h>.
16704
16705 1999-01-06  Per Bothner  <bothner@cygnus.com>
16706
16707         * lex.h:  Moved static function declarations to lex.c,
16708         to shut up some -Wall warnings.
16709         * lex.c:  Static function declarations moved here.
16710         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16711
16712 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16713
16714         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16715
16716 1998-12-22  Per Bothner  <bothner@cygnus.com>
16717
16718         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16719         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16720
16721         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16722         (localvar_alloc):  Change return type to void,
16723         (emit_unop):  Remove unused variable size.
16724
16725         * jcf-write.c (struct jcf_block):  Add new union.
16726         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16727         (call_cleanups):  New functions.
16728         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16729         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16730         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16731         * lang.c (lang_init):  Call using_eh_for_cleanups.
16732         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16733         completing operands to patch_synchronized_statement.
16734         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16735         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16736         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16737
16738 1998-12-20  John F. Carr  <jfc@mit.edu>
16739
16740         * Make-lang.in: Comment out control-Ls; they upset some makes.
16741
16742 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16743
16744         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16745         consistently.
16746
16747 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16748
16749         * parse.y (DIR_SEPARATOR): New define.
16750         (check_class_interface_creation): Use it.
16751
16752         * parse-scan.y (report_main_declaration): Recognize
16753         `java.lang.String' in argument to main.
16754
16755 1998-12-16  Per Bothner  <bothner@cygnus.com>
16756
16757         * parse.y (create_interface):  Remove bogus test.
16758
16759 1998-12-16  Per Bothner  <bothner@cygnus.com>
16760
16761         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16762         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16763
16764 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16765
16766         * parse-scan.y (qualified_name): Use correct sprintf format.
16767
16768 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16769
16770         * gjavah.c (print_field_info): Changed how most negative number is
16771         printed.
16772
16773 1998-12-14  Per Bothner  <bothner@cygnus.com>
16774
16775         * parse.y (fold_constant_for_init):  New function.
16776         (resolve_expression_name):  Don't replace static final
16777         constant-initialized fields by its value.
16778         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16779         not replace static final constant-initialized fields by their values.
16780         (register_fields):  If there is an initializer, set DECL_INITIAL and
16781         MODIFY_EXPR_FROM_INITIALIZATION_P.
16782         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16783         Only call patch_initialized_static_field if
16784         MODIFY_EXPR_FROM_INITIALIZATION_P.
16785         (patch_initialized_static_field):  If not valid constant, clear
16786         DECL_INITIAL.
16787
16788         * parse.y (lookup_field_wrapper):  Fix thinko.
16789
16790         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16791         set and restore global lineno.
16792
16793 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16794
16795         * gjavah.c (print_field_info): If value to print is the smallest
16796         value of its size, then print as hex to avoid later warnings from
16797         C++ compiler.
16798
16799 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16800
16801         * gjavah.c (decompile_method): Decompile `return null'.
16802         (process_file): Generate `#pragma interface'.
16803         (method_declared): New global.
16804         (print_method_info): Set it.
16805         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16806         (print_method_info): Handle abstract methods.
16807
16808 1998-12-13  Per Bothner  <bothner@cygnus.com>
16809
16810         * parse.y (patch_method_invocation):  If class_decl is null
16811         (e.g. an array type), use original type.
16812
16813         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16814         errors about uncaught exception from clone (of array, specifically).
16815
16816 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16817
16818         * gjavah.c (decompile_method): Handle all types of `return'
16819         opcode.  Decompile `return this' and `return'.
16820         (method_access): New global.
16821         (print_method_info): Set it.
16822         (decompile_method): Don't decompile a synchronized method.
16823
16824 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16825
16826         * jcf-reader.c (jcf_parse_one_method): Recognize
16827         HANDLE_END_METHOD.
16828         * gjavah.c (HANDLE_END_METHOD): New macro.
16829         (HANDLE_CODE_ATTRIBUTE): New macro.
16830         (decompile_method): New function.
16831         (print_method_info): Don't print `;\n' at end of function decl.
16832         Include java-opcodes.h.
16833         (decompiled): New global.
16834
16835 1998-12-12  Per Bothner  <bothner@cygnus.com>
16836
16837         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16838         flag_emit_class_files.
16839         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16840         if flag_emit_class_files.
16841         * parse.y (java_complete_tree):  Pre-liminary support for
16842         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16843
16844         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16845         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16846
16847         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16848
16849         * zipfile.h (opendir_in_zip):  New declaration.
16850         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16851         (opendir_in_zip):  New function, using code from open_in_zip.
16852         (open_in_zip):  Call opendir_in_zip.
16853         (find_class):  Remove no-longer-used do_class_file parameter,
16854         but add source_ok parameter.  Change logic so if we find a .java file,
16855         we don't look for .class in later classpath emtries.
16856         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16857         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16858         * gjavah.c: Update call to find_class.
16859         * jcf-dump.c:  Likewise.
16860
16861         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16862         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16863         nothing if body is empty_stmt_node.
16864         Various little fixes so SP gets correctly adjusted.
16865         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16866         For CALL_EXPR, test if static first.
16867         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16868         such as the ones we create for Object and Class.
16869         Set and restore current_function_decl.
16870         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16871         (note_possible_classname):  New function.
16872         (read_import_entry):  Removed.  Merged with read_import_dir.
16873         (read_import_dir):  Don't call find_class - that only gives us
16874         the first classpath entry having the needed package.
16875         Use the struct buffer data structure from buffer.h.
16876         (read_import_dir, find_in_imports_on_demand):  The remembered
16877         class names now use '.' (not '/') as package separator.
16878
16879         * parse.y (java_complete_expand_methods):  Call write_classfile
16880         here, and not in java_expand_classes (which only gets first class).
16881
16882 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16883
16884         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16885         (register_fields):  If a static fields has an initializer, just
16886         chain it on ctxp->static_initialized, and handle later.
16887         (java_complete_expand_methods):  Force <clinit> first.
16888         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16889         - it's already been completed.
16890         (patch_initialized_static_field):  New function.
16891         (java_complete_field):  Call it.
16892
16893 1998-12-12  Per Bothner  <bothner@cygnus.com>
16894
16895         * expr.c (encode_newarray_type, build_new_array):  New functions.
16896         * java-tree.h:  Declare build_new_array.
16897         * jcf-write.c (patch_newarray):  Use build_new_array.
16898
16899         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16900         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16901
16902         * parse.y (patch_new_array_init):  Re-organize.
16903         Now is passed the actual array (pointer) type of the value.
16904         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16905         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16906         (java_complete_tree):  Update patch_new_array_init.
16907
16908         * jcf-write.c (find_constant_index):  New function.
16909         (generate_bytecode_insns):  Use find_constant_index.
16910         (generate_classfile):  Use find_constant_index for ConstantValue.
16911
16912 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16913
16914         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16915         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16916         * class.c (make_class_data): Renamed dtable -> vtable, and
16917         dtable_method_count -> vtable_method_count.
16918
16919 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16920
16921         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16922         global variables, initialized.
16923         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16924         Declared new global variables.
16925         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16926         double_zero_node, integer_zero_node upon direct matching.
16927         * parse.y (purify_type_name): Added function prototype.
16928         (duplicate_declaration_error_p): Consider new_type as potentially
16929         being a incomplete type. Use purify_type_name on type string.
16930         (method_header): saved_type: unused variable removed. Don't figure
16931         return type if method name is invalid.
16932         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16933         processed by patch_unaryop.
16934         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16935         increment/decrement node into its original type after binary
16936         numeric promotion on its operands.
16937
16938 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16939
16940         * parse.y (array_initializer:): Array init operand is NULL_TREE
16941         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16942         now an error. Fixed indentation problems.
16943         (patch_string): Handle error_mark_node as an argument.
16944         (patch_new_array_init): Fixed indentation problems.
16945         (array_constructor_check_entry): Removed check on null wfl_value.
16946         Return an error if wfl_value's walk returns an error.
16947
16948 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16949
16950         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16951         * lex.c (java_lex): Remember column position before advancing one
16952         token. Retain location information on OCB_TK.
16953         * lex.h (typedef struct java_lc): Added new field.
16954         * parse.h (GET_SKIP_TYPE): New macro.
16955         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16956         * parse.y (build_new_array_init, patch_new_array_init,
16957         patch_array_constructor, maybe_build_array_element_wfl,
16958         array_constructor_check_entry): New function prototypes.
16959         (switch_block:): Tagged <node>.
16960         (OCB_TK): Tagged <operator>.
16961         (array_initializer:): Installed actions.
16962         (variable_initializer): Build location information on element if
16963         necessary.
16964         (switch_statement:): Fixed indentation typo.
16965         (switch_block:): Redefined default action.
16966         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16967         (patch_assignment): Removed duplicate code.
16968         (maybe_build_array_element_wfl, build_new_array_init,
16969         patch_new_array_init, patch_array_constructor,
16970         array_constructor_check_entry): New functions.
16971
16972 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16973
16974         * parse.y (array_initializer): Tagged <node>.
16975         (variable_initializer:): Use default rule.
16976         (array_initializer:): Defined actions.
16977         (variable_initializers:): Likewise.
16978         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16979         non-static field accesses.
16980         (patch_invoke): Fixed indentation typo.
16981         (java_complete_tree): Likewise.
16982         (build_labeled_block): Changed leading comment. Generate an error
16983         in case of duplicate loop labels.
16984         (patch_conditional_expr): Patch results of string concatenation
16985         operations.
16986
16987 1998-12-06  Per Bothner  <bothner@cygnus.com>
16988
16989         * constants.c (find_methodref_index):  When the class is an interface,
16990         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16991
16992         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16993         "<finit>" (which Sun's verifier rejects).
16994         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16995         (generate_field_initialization_code):  Removed.
16996         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16997         (patch_method_invocation):  Add $finit$ call here.
16998
16999         * java-tree.h (CALL_USING_SUPER):  New macro.
17000         * parse.y (patch_invoke):  Remove im local variable.
17001         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
17002         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
17003         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
17004
17005         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
17006
17007         * parse.y (java_complete_tree):  Don't complain about unreachable
17008         statement if it is empty_stmt_node.
17009
17010         * jcf-write.c (find_constant_wide):  New function.
17011         (push_long_const):  Use find_constant_wide.
17012
17013         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
17014         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
17015         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17016         Emit invokeinterface when calling an interface method.
17017         Emit invokespecial also when calling super or private methods.
17018
17019         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
17020
17021 1998-12-06  Per Bothner  <bothner@cygnus.com>
17022
17023         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
17024
17025 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17026
17027         * java-tree.h (java_layout_seen_class_methods): New function
17028         prototype.
17029         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17030         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17031         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17032         * parse.y (method_declarator:): Defined action.
17033         (issue_warning_error_from_context): input_filename saved, set to
17034         the appropriate value and restored after java_error is called.
17035         (build_unresolved_array_type): Fixed comment.
17036         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17037         (method_header): Deal with return type the same way type are
17038         handled for fields and method's parameters and local variables
17039         types are handled.
17040         (check_method_redefinition): Removed extra CR.
17041         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17042         (java_layout_seen_class_methods): New function.
17043         (java_layout_classes): Call java_layout_seen_class_methods.
17044
17045 1998-12-03  Per Bothner  <bothner@cygnus.com>
17046
17047         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
17048
17049 1998-12-03  Per Bothner  <bothner@cygnus.com>
17050
17051         * jcf-dump.c (main):  Fix error message.
17052         * jcf-path.c (add_entry):  Style fix.
17053
17054 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17055
17056         * class.c (layout_class_method): Call build_java_argument_signature
17057         on constructors too.
17058         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17059         (patch_method_invocation): Define a primary when resolving an
17060         expression name. Augmented comment on code checking illegal `this'
17061         usage. Loosened it test by accepting NEW_CLASS_EXPR.
17062
17063 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17064
17065         * class.c (layout_class_method): Don't report error on non-static
17066         overriding static if the method is private.
17067         * java-tree.h (finish_class): Prototype added.
17068         * lex.c (java_get_line_col): Handle col argument -2 value.
17069         * parse.h: All static method declarations moved to parse.y.
17070         * parse.y: Now contains all static method declarations previously
17071         found in parse.h.
17072         (find_expr_with_wfl, missing_return_error,
17073         unreachable_stmt_error): New functions.
17074         (java_get_real_method_name): Identify constructors bearing class
17075         names in source code compiled classes only.
17076         (java_complete_expand_methods): Call missing_return_error.
17077         (invocation_mode): Private methods invoked as static methods.
17078         (java_complete_tree): Call unreachable_stmt_error.
17079
17080 1998-12-01  Tom Tromey  <tromey@cygnus.com>
17081
17082         * Makefile.in (+target): Removed.
17083         (+xmake_file): Likewise.
17084         (+tmake_file): Likewise.
17085         (.NOEXPORT): Removed duplicate.
17086
17087 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17088
17089         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17090
17091         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
17092
17093         * jvgenmain.c: Remove the xmalloc prototype, we get it from
17094         libiberty.h.  Provide an xmalloc definition.
17095
17096         * jvspec.c: Remove the xmalloc prototype.
17097
17098         * parse-scan.y: Include config.h and system.h.  Don't include
17099         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
17100         Provide an xstrdup definition.
17101
17102 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
17103
17104         * jcf-path.c (add_entry): Recognize ".jar" too.
17105         * lang-specs.h: Likewise.
17106
17107 1998-11-26  Per Bothner  <bothner@cygnus.com>
17108
17109         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
17110         soft_monitorenter_node, soft_monitorexit_node, throw_node.
17111
17112         * jcf-write.c (generate_bytecode_insns):
17113         Handle pre/post-increment/decrement of long.
17114
17115         * jcf-write.c (generate_bytecode_insns):
17116         Handle missing exception handler (finally for synchronized).
17117
17118 1998-11-25  Per Bothner  <bothner@cygnus.com>
17119
17120         * java-tree.h (end_params_node):  Declare global.
17121         * decl.c (end_params_node):  New global.
17122         (init_decl_processing, start_java_method):  Use end_params_node for
17123         end of list of parameter types.  Follows correct gcc conventions.
17124         * expr.c (pop_argument_types, pop_arguments):  Likewise.
17125         * lang.c (put_decl_node):  Likewise.
17126         * typeck.c (various places):  Likewise.
17127         * class.y (various places):  Likewise.
17128         * parse.y (various places):  Likewise.
17129
17130         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
17131         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
17132
17133         * class.c:  Add #include flags.h, remove no-longer needed declaration.
17134
17135         * class.c (layout_class_method):  Remove commented-out code, re-format.
17136         Don't add vtable entry (or index) for private methods.
17137         * expr.c (expand_invoke):  A private method is implicitly final.
17138         * class.c (make_class_data):  If inlining or optimizing,
17139         skip private methods.
17140
17141         * class.c (finish_class):  New function.  Calls existing methods,
17142         but alls emits deferred inline functions.
17143         * jcf-parse.c (parse_class_file):  Call finish_class.
17144         * parse.y (java_complete_expand_methods):  Likewise.
17145
17146         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
17147
17148         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
17149
17150 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
17151
17152         * jcf-write.c (generate_bytecode_conditional): Fix typo.
17153
17154 1998-11-24  Per Bothner  <bothner@cygnus.com>
17155
17156         * (generate_classfile): Always write class access flag with
17157         ACC_SUPER set.
17158
17159 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17160
17161         * class.c (maybe_layout_super_class): New function.
17162         (layout_class): Reorganized. Loop on class methods dispatched into
17163         a new function. Call maybe_layout_super_class.
17164         (layout_class_methods, layout_class_method): New functions.
17165         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17166         class.
17167         (expand_invoke): Likewise.
17168         * java-tree.h (all_class_list): New global variable declared.
17169         (layout_class_methods, layout_class_method): New function
17170         prototypes.
17171         (LAYOUT_SEEN_CLASS_METHODS): New macro.
17172         * jcf-parse.c (all_class_list): New global variable.
17173         (load_class): Extended what class_or_name can be. Use parser
17174         context mechanism to save globals before calling jcf_parse.
17175         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17176         is set on the file name.
17177         (jcf_parse): Layout class methods when Object is loaded, otherwise
17178         record class in all_class_list for delayed method layout.
17179         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17180         * lang.c (put_decl_node): Decode <init> into the decl context
17181         class name.
17182         * lex.c (java_allocate_new_line): Use xmalloc.
17183         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17184         pointers, not TREE_LIST elements.
17185         (struct parser_ctxt): Fixed comment indentations, added comments
17186         and reordered some fields.
17187         (java_check_methods): Function prototype removed.
17188         * parse.y (java_push_parser_context): Use xmalloc.
17189         (java_parser_context_restore_global): Pop extra pushed ctxp only
17190         when there's nothing next.
17191         (maybe_create_class_interface_decl): Fixed comment, add new
17192         created class decl to all_class_list.
17193         (method_header): Use GET_REAL_TYPE on argument's types.
17194         (method_declarator): Use GET_REAL_TYPE, change type to the real
17195         type in TREE_LIST dependency node. Build argument list with the
17196         real type.
17197         (create_jdep_list): Use xmalloc. Removed allocation error message.
17198         (obtain_incomplete_type): Fixed leading comment. Broadened
17199         incoming argument meaning.
17200         (register_incomplete_type): Use xmalloc. Removed allocation error
17201         message.
17202         (safe_layout_class): Fixed leading comment.
17203         (jdep_resolve_class): Reversed if statement condition and switch
17204         if and else bodies.
17205         (resolve_and_layout): Fixed leading comment. Broadened incoming
17206         argument meaning.
17207         (complete_class_report_errors): New local variable name, for
17208         clarity. purify_type_name used for all error cases.
17209         (java_get_real_method_name): Stricter check on constructors.
17210         (java_check_regular_methods): Reverse methods list only if not
17211         already laid out. Layout artificial constructor.
17212         (java_check_methods): Deleted.
17213         (source_start_java_method): Obtain incomplete type for patchable
17214         method arguments.
17215         (java_layout_classes): Fixed leading comment. Use
17216         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17217         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17218         before returning. Fixed comments.
17219         (java_expand_classes): Check for errors up front.
17220         (patch_method_invocation): Class to search is resolved and laid
17221         out.
17222
17223 1998-11-24  Per Bothner  <bothner@cygnus.com>
17224
17225         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17226
17227         * javaop.h (int8):  Removed - not used.
17228         (jbyte):  Redefine portably with correct signedness.
17229
17230         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17231
17232         * jcf-write.c (generate_bytecode_insns):  Fix typo
17233         OPCODE_getstatic to OPCODE_getfield.
17234
17235         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17236         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17237         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17238
17239 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17240
17241         * jcf-parse.c (jcf_parse_source): Function returned type is
17242         void. Added prototype.
17243         (jcf_parse): Function returned type is void.
17244         (yyparse): Remove call to fclose on the last parsed file.
17245
17246         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17247
17248 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17249
17250         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17251         (layout_class): Cope with methods featuring WFL in decl names.
17252         * decl.c (unqualified_object_id_node): New global variable,
17253         initialized.
17254         (build_decl_no_layout): Removed.
17255         * expr.c (build_primtype_type_ref): Handle Double.
17256         (java_lang_expand_expr): Fixed indentations.
17257         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17258         (flag_wall, flag_redundant, flag_not_overriding,
17259         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17260         variable declarations.
17261         (build_decl_no_layout): Removed prototype.
17262         (java_get_real_method_name): Added prototype.
17263         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17264         (java_parse_abort_on_error): Macro now just returns.
17265         * jcf-parse.c (jcf_parse_source): Check fclose returned
17266         value. Call emit_register_classes if java_report_errors returns
17267         zero.
17268         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17269         flag_static_local_jdk1_1): New integer flags.
17270         (lang_decode_option): New flags set here.
17271         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17272         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17273         the flag_redundant variable.
17274         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17275         when parsing java.lang.Object class.
17276         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17277         NULL_TREE to build.
17278         (resolve_qualified_expression_name): Fixed indentation.
17279         (patch_array_ref): Changed prototype.
17280         (not_initialized_as_it_should_p): Prototype removed.
17281         (java_report_errors): Added function prototype.
17282         * parse.y (formal_parameter:): Changed error message for not yet
17283         supported final parameters.
17284         (class_type_list:): Set both PURPOSE and VALUE of created
17285         TREE_LIST to be class_type.
17286         (primary_no_new_array:): Handle class literals on primitive types.
17287         (parse_warning_context): Reinstalled correct force_error and
17288         do_warning flags setups.
17289         (java_report_errors): Changed prototype. Return java_error_count
17290         value.
17291         (variable_redefinition_error): Consider treating variable type as
17292         a fake pointer.
17293         (create_interface): Warn about redundant abstract modifier if
17294         flag_redundant is set. Changed error message.
17295         (lookup_field_wrapper): Save/restore globals before/after looking
17296         up field.
17297         (duplicate_declaration_error_p): Consider treating declaration
17298         type as a fake pointer.
17299         (register_fields): Extract real type from dependency node. Check
17300         for duplicate field declaration after type adjustment. Use
17301         DECL_INITIAL to store static final initialized values.
17302         (method_header): Extract real function type from dependency node.
17303         (check_abstract_method_header): Use GET_METHOD_NAME.
17304         (obtain_incomplete_type): Layout fake pointer type.
17305         (safe_layout_class): Don't try to check for methods before layout.
17306         (java_complete_class): Don't check for correct throws clause
17307         elements inheritance here.
17308         (resolve_and_layout): Broadened name parameter meaning.
17309         (reset_method_name): Use GET_METHOD_NAME.
17310         (java_get_real_method_name): New function.
17311         (java_check_regular_methods): Don't check methods in
17312         java.lang.Object.  Verify lineage of throws clause elements. Use
17313         flag_no_overriding in warning report.
17314         (check_throws_clauses): Don't check if class was from
17315         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17316         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17317         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17318         warning on unsupported final local variables. Use build_decl
17319         instead of build_decl_no_layout. Get real local variable type from
17320         dependency node.
17321         (source_start_java_method): Get real parameter type from
17322         dependency node. Call build_decl instead of build_decl_no_layout.
17323         (java_layout_classes): Reverse tree and layout type and class as
17324         required. Mark class as loaded when done.
17325         (resolve_field_access): Fixed indentation. Restricted condition
17326         leading to static field access code generation. Set field_type
17327         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17328         (resolve_qualified_expression_name): Initialize type_found to
17329         null. Handle static field resolved during qualification. Fixed
17330         layout on non primitive field decl types.
17331         (not_accessible_p): Fixed typo in comment.
17332         (patch_method_invocation): Resolve and layout class to search from
17333         type.
17334         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17335         layout non primitive type, if necessary. Make method node only to
17336         report errors.
17337         (find_applicable_accessible_methods_list): Consider WFL'ed method
17338         decl names. Fixed indentation.
17339         (argument_types_convertible): Resolve and layout target type if
17340         necessary.
17341         (java_complete_tree): Fixed indentation problems. Rewrote
17342         CALL_EXPR thrown exceptions check. Re-installed further processing
17343         of the assignment in certain cases.
17344         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17345         inlining on class literals.
17346         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17347         0 literal.
17348         (valid_method_invocation_conversion_p): Likewise.
17349         (patch_string): Temporary disable forbidden use of `this' in
17350         explicit constructor invocations when doing string concatenation
17351         within their scope.
17352         (patch_unaryop): Added comment. Reinstalled code to disable
17353         further check on assignment operation with cast expression RHS.
17354         (patch_switch_statement): Fixed indentation.
17355         (build_try_statement): Call build_decl instead of
17356         build_decl_no_layout.
17357         (patch_synchronized_statement): Likewise.
17358         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17359         IS_UNCHECKED_EXPRESSION_P.
17360         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17361         layout argument exception type.
17362         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17363         of IS_UNCHECKED_EXPRESSION_P.
17364
17365 1998-11-18  Anthony Green  <green@cygnus.com>
17366
17367         * jcf-parse.c (yyparse): Open class file in binary mode.
17368
17369 1998-11-15  Per Bothner  <bothner@cygnus.com>
17370
17371         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17372
17373         * jcf-write.c (perform_relocations):  Move check out one loop.
17374
17375 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17376
17377         * Make-lang.in: Fix reference to srcdir.
17378         * jv-scan.c: Add missing xmalloc prototype.
17379         * jvgenmain.c: Ditto.
17380
17381 1998-11-15  Per Bothner  <bothner@cygnus.com>
17382
17383         * decl.c (error_mark_node), java-tree.h:  New global.
17384         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17385         (build_if_else_statement):  If missing else, use empty_stmt_node.
17386
17387         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17388         (java_complete_expand_method):  Complain if return is missing.
17389         (java_check_regular_methods):  Comment out incorrect error check.
17390         (not_accessible_p):  Fix incorrect handling of protected methods.
17391         (patch_method_invocation):  Pass correct context to not_accessible_p.
17392         (find_applicable_accessible_methods_list):  Likewise.
17393         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17394         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17395         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17396         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17397
17398         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17399         (push_int_const):  Remove reundant NOTE_PUSH.
17400         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17401         (- case SWITCH_EXPR):  Fix code generation bug.
17402         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17403         (generate_classfile):  More robust for abstract methods.
17404
17405 1998-11-15  Anthony Green  <green@cygnus.com>
17406
17407         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17408         * Make-lang.in: Ditto.
17409
17410         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17411         * jvgenmain: Ditto.
17412
17413 1998-11-15  Per Bothner  <bothner@cygnus.com>
17414
17415         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17416
17417         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17418
17419 1998-11-14  Per Bothner  <bothner@cygnus.com>
17420
17421         Allow uses of interface types to verify.  This is not really
17422         type-safe, but it matches what Sun does, and is OK as long as
17423         there are appropriate run-time checks.
17424         * verify.c (merge_types):  If merging two interface types,
17425         just set the result to java.lang.Object.
17426         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17427
17428 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17429
17430         * gjavah.c (main): Handle --output-class-directory argument.
17431         * jvspec.c (lang_specific_driver): Translate `-d' into
17432         -foutput-class-dir.
17433         * jcf.h (jcf_write_base_directory): Declare.
17434         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17435         * lang-options.h: Mention -foutput-class-dir.
17436         * jcf-write.c (jcf_write_base_directory): New global.
17437         (make_class_file_name): Put generated .class file into `-d'
17438         directory, or into source directory if -d not given.  Function now
17439         static.
17440         (write_classfile): Free class file name.  Handle case where class
17441         file name is NULL.
17442         (DIR_SEPARATOR): New macro.
17443         Include <sys/stat.h>
17444
17445         * Makefile.in (prefix): New macro.
17446
17447 1998-11-12  Per Bothner  <bothner@cygnus.com>
17448
17449         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17450         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17451         here (done in patch_invoke instead).
17452         (case_identity):  Moved here from parse.y.
17453
17454         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17455         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17456         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17457         so they can be efficiently scanned without recursion.
17458         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17459         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17460         in BLOCK iteratively, rather than recursively.
17461
17462         * parse.y (do_unary_numeric_promotion):  New function.
17463         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17464
17465         * parse.y (patch_newarray):  Various fixes.
17466
17467         Re-do handling of switch statements (for proper block scoping).
17468         * parse.y:  Add just a single block for the enture switch block,
17469         but don't create any "case blocks".
17470         (group_of_labels):  Rmeoved unneeded non-terminal.
17471         CASE_EXPR and DEFAULT_EXPR are added to current block.
17472         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17473         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17474         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17475         * parse.y (wfl_operator, print_int_node): Make non-static.
17476         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17477         as part of recursive scan of block.
17478         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17479         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17480
17481         * parse.y:  Make various production be non-typed (void).
17482         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17483         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17484         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17485
17486         * jcf-write.c (struct jcf_handler):  New type.
17487         (struct jcf_switch_state):  New type.
17488         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17489         (alloc_handler, emit_unop, emit_reloc):  New functions.
17490         (adjust_typed_op):  Add extra parameter ("max type" offset).
17491         (emit_switch_reloc, emit_case-reloc):  New function.
17492         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17493         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17494         exception handling, method calls, object/array creation, and more.
17495
17496         * class.c:  Remove some unused variables.
17497         * constants.c (find_string_constant):  New function.
17498         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17499         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17500         if flag_emit_class_files.
17501
17502 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17503
17504         * jcf-io.c (find_class): Added explanatory comment.
17505
17506         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17507         trailing slash to `.zip' entries.
17508
17509         * jvspec.c (lang_specific_driver): Correctly handle case where
17510         GC_NAME not defined.
17511
17512 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17513
17514         * jvspec.c (GC_NAME): New define.
17515         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17516         if required.
17517         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17518
17519 1998-11-11  Per Bothner  <bothner@cygnus.com>
17520
17521         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17522
17523 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17524
17525         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17526
17527 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17528
17529         * class.c (is_compiled_class): Call safe_layout_class for class
17530         compiled from source.
17531         * conver.h (convert_to_integer, convert_to_real,
17532         convert_to_pointer): Added prototypes.
17533         * decl.c (init_decl_processing): Non longer push the decls of
17534         `methodtable', `constants', `Class', `Field', `dispatchTable'
17535         `jexception' and `Method'.
17536         * expr.c (build_invokeinterface): New function.
17537         (expand_invoke): static variable CLASS_IDENT now in
17538         build_invokeinterface. Use build_invokeinterface.
17539         (expand_java_field_op): Moved code to inline
17540         java.lang.PRIMTYPE.TYPE into a function.
17541         (build_primtype_type_ref): New function.
17542         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17543         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17544         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17545         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17546         (DECL_LOCAL_STATIC_VALUE): New macro.
17547         (build_invokeinterface, build_primtype_type_ref): New function
17548         prototypes.
17549         (java_parse_abort_on_error): Macro rewritten.
17550         * jcf-parse.c (current_method): Add comment to declaration.
17551         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17552         Function prototypes fixed.
17553         (jcf_parse_source): push/pop parser context. save/restore global.
17554         (parse_source_file): Fixed leading comment. Now take a
17555         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17556         classes and pop the parser context anymore.
17557         (yyparse): Push parser context, save globals, parse the source
17558         file, restore globals and pop the parser context when processing a
17559         source file.
17560         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17561         * lex.c (java_parse_doc_section): New function.
17562         (java_lex): Call java_parse_doc_section when appropriate. Build an
17563         operator around INSTANCEOF_TK.
17564         * lex.h (java_lineterminator, java_sprint_unicode,
17565         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17566         Prototypes rewritten.
17567         (java_parse_escape_sequence, java_letter_or_digit_p,
17568         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17569         java_read_unicode, java_store_unicode, java_read_char,
17570         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17571         Added function prototypes.
17572         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17573         define.
17574         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17575         New macros
17576         (struct parser_ctxt): New fields: deprecated,
17577         current_parsed_class_un, gclass_list.
17578         (fix_method_argument_names, issue_warning_error_from_context,
17579         resolve_package, lookup_package_type): New function prototypes.
17580         (resolve_expression_name): Fixed function prototype.
17581         (find_applicable_accessible_methods_list): Fixed indentation, added
17582         extra argument in prototype.
17583         (check_final_assignment, build_null_of_type, check_deprecation,
17584         check_method_redefinition, reset_method_name,
17585         java_check_regular_methods, java_check_abstract_methods,
17586         maybe_build_primttype_type_ref): New function prototype.
17587         * parse.y (conver.h): Include.
17588         (INSTANCEOF_TK): Tagged <operator>.
17589         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17590         (relational_expression:): Build binop for instanceof.
17591         (java_push_parser_context): Remember ctxp->gclass_list across
17592         contexts.
17593         (java_pop_parser_context): Simply return if no context
17594         exists. Remember gclass_list across contexts.
17595         (issue_warning_error_from_context): New function.
17596         (parse_error_context): Don't setup ctxp->elc here. Call
17597         issue_warning_error_from_context instead.
17598         (parse_warning_context): Likewise.
17599         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17600         setup. Link new class/interface to ctxp->gclass_list.
17601         (add_superinterfaces): Register interface as incomplete if not
17602         loaded.
17603         (create_class): Remember class unqualified name in
17604         ctxp->current_parsed_class_un. Check class deprecation.
17605         (register_fields): Check field deprecation. Remember static final
17606         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17607         processing INIT.
17608         (method_header): New local variable ORIG_ARG. Use unqualified
17609         current class name for check on constructor errors. Promote return
17610         type if of record type. Argument list fix moved in
17611         fix_method_argument_names, called here. Check method deprecation.
17612         (fix_method_argument_names): New function.
17613         (method_declarator): Promote record typed arguments.
17614         (safe_layout_class): Check class methods before layout.
17615         (java_complete_class): Compute field layout when patched.
17616         (do_resolve_class): Try to load class after having it renamed
17617         after the package name.
17618         (get_printable_method_name): Use DECL_CONTEXT.
17619         (reset_method_name): New function.
17620         (check_method_redefinition): Use reset_method_name.
17621         (java_check_regular_methods): New local variable
17622         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17623         names for error report. Check for compile-time error when method
17624         found has default (package) access.
17625         (java_check_abstract_methods): Now takes an interface DECL node as
17626         an argument. Also reinstall real name on unchecked
17627         overriding/hiding methods for error report.
17628         (java_check_methods): Fixed leading comment. Get classes to verify
17629         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17630         CLASS_METHOD_CHECKED_P on class verification.
17631         (lookup_java_method2): Get real method name if necessary.
17632         (find_in_imports): Don't check package class access here.
17633         (resolve_package, lookup_package_type): New functions.
17634         (java_layout_classes): Fixed leading comment. Take classes to be
17635         laid out from ctxp->gclass_list.
17636         (java_complete_expand_methods): Don't expand native and abstract
17637         methods.
17638         (java_expand_classes): New function.
17639         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17640         values of static final field of primitive types.
17641         (resolve_field_access): Handles static final field of promotive
17642         type.
17643         (resolve_qualified_expression_name): Handle STRING_CST as
17644         primaries and package name resolution. Check deprecation on found
17645         decls. Set where_found and type_found on non static field resolved
17646         during qualification. Layout non primitive field decl types.
17647         (check_deprecation): New function.
17648         (maybe_access_field): Simplified.
17649         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17650         removed. Reverse method's argument when primary is a type. Don't
17651         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17652         instead. Include abstract class in the list of class searchable
17653         for constructors. Use DECL_CONTEXT of found method for access
17654         checks. Check method deprecation.
17655         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17656         converting arguments. Handle INVOKE_INTERFACE.
17657         (lookup_method_invoke): Search constructor using existing
17658         infrastructure (don't rely on lookup_java_constructor anymore).
17659         (find_applicable_accessible_methods_list): Extra argument flag
17660         LC. Now include constructor in the search.
17661         (qualify_ambiguous_name): Conditional expression are primaries.
17662         (not_initialized_as_it_should_p): static final are always
17663         initialized.
17664         (java_complete_tree): Pass extra NULL argument to
17665         resolve_expression_name. Stricter test to carry on patching
17666         assignments. New case for INSTANCEOF_EXPR.
17667         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17668         (check_final_assignment, maybe_build_primttype_type_ref): New
17669         functions.
17670         (patch_assignment): Detect resolved static finals and carry normal
17671         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17672         (try_builtin_assignconv): Access constant 0 on all primitive
17673         types.
17674         (valid_builtin_assignconv_identity_widening_p): Accept identical
17675         types. Accept all promoted type on int type.
17676         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17677         assigned to a reference.
17678         (valid_method_invocation_conversion_p): Accept to check null
17679         pointers.
17680         (build_binop): Merge declaration and initialization of local
17681         variable BINOP.
17682         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17683         numeric types. Improved validity test for qualify operators on
17684         references.
17685         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17686         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17687         primitive type and issue the appropriate error message.
17688         (resolve_type_during_patch): Mark class loaded when resolved.
17689         (patch_cast): Allow null to be cased to reference types.
17690         (build_null_of_type): New function.
17691         (patch_array_ref): Handle array on references correctly.
17692         (patch_return): Removed unused local variable MODIFY. Force
17693         boolean to be returned as integers. Allows null to be returned by
17694         a function returning a reference.
17695         * typeck.c (convert_to_integer, convert_to_real,
17696         convert_to_pointer): Prototypes moved to convert.h
17697         (lookup_argument_method): Use method real name, if necessary.
17698
17699 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17700
17701         * class.c (build_class_ref): Changed name of primitive classes to
17702         start with `_Jv_'.
17703
17704         * class.c (make_class_data): Renamed fields: nmethods to
17705         method_count, method_count to dtable_method_count.  Always set
17706         `state' field to 0.
17707         * decl.c (init_decl_processing): Likewise.
17708
17709 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17710
17711         * class.c (layout_class): Don't mangle <finit>, produce
17712         __finit<class> instead. Don't verify artificial methods.
17713         * decl.c (finit_identifier_node): New declared global.
17714         (init_decl_processing): finit_identifier_node initialized.
17715         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17716         * java-tree.h (finit_identifier_node): Declared as extern.
17717         (struct lang_decl): New field called_constructor.
17718         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17719         (CLASS_HAS_FINIT_P): New macro.
17720         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17721         explicit constructor invocation.
17722         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17723         CALL_SUPER_CONSTRUCTOR_P): New macros.
17724         (write_classfile): Added prototype.
17725         * jcf-parse.c (jcf_parse_source): Parse and remember for
17726         generation if the file was seen on the command line.
17727         (parse_source_file): Don't write the class file here.
17728         (yyparse): Loop on files rewritten. Set current_jcf.
17729         (parse_zip_file_entries): Parse class file only if it was found.
17730         * lang.c (init_parse): Don't open command line provided filename
17731         here.
17732         (lang_parse): Don't set main_jcf anymore.
17733         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17734         (JCONSTRUCTOR_CHECK): New macro.
17735         (JBSC_TYPE_P): New macro.
17736         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17737         (COMPLETE_CHECK_OP_2): New macro.
17738         (struct parse_ctxt): New field explicit_constructor_p.
17739         (check_class_interface_creation): Fixed prototype indentation.
17740         (patch_method_invocation_stmt): Prototype reflects added argument.
17741         (patch_invoke): Likewise.
17742         (complete_method_declaration, build_super_invocation,
17743         verify_constructor_circularity,
17744         build_this_super_qualified_invocation, get_printable_method_name,
17745         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17746         verify_constructor_super, create_artificial_method,
17747         start_artificial_method_body, end_artificial_method_body,
17748         generate_field_initialization_code): New function prototypes.
17749         * parse.y: Fixed leading comment
17750         (constructor_header:, constructor_body:, block_end:): Rules tagged
17751         <node>.
17752         (type_declaration:): Call maybe_generate_finit.
17753         (method_declaration:): Action for method_body: placed in new
17754         function complete_method_declaration, called here.
17755         (constructor_declaration:): Defined actions. Removed leading
17756         FIXME.
17757         (constructor_header:): New rule with action.
17758         (constructor_body:): Rule rewritten using block_begin: and
17759         block_end:. Defined actions.
17760         (constructor_declarator:, explicit_constructor_invocation:):
17761         Defined actions.
17762         (block:): Use new rules block_begin: block_end:.
17763         (block_begin:, block_end:): New rules and actions.
17764         (block_statements:): Fixed error message for explicit
17765         constructors.
17766         (method_invocation:): Call build_this_super_qualified_invocation
17767         if primary is `this' or `super' was seen.
17768         (conditional_expression:): Action defined.
17769         (extra_ctxp_pushed_p): New static global flag.
17770         (java_parser_context_save_global): Create parser context if
17771         necessary. Use extra_ctxp_pushed_p to remember it.
17772         (java_parser_context_restore_global): Pop extra parser context if
17773         one exists.
17774         (build_array_from_name): Array on primitive types are marked
17775         loaded.
17776         (register_fields): Restore new name in field initializer
17777         expression if type was altered. Non static fields initialized upon
17778         declaration marked initialized.
17779         (maybe_generate_finit): New function.
17780         (maybe_generate_clinit): Use create_artificial_method,
17781         start_artificial_method_body, end_artificial_method_body. Generate
17782         debug info for enclosed initialization statements.
17783         (method_header): Fixed leading comment. Check constructor
17784         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17785         accordingly.
17786         (complete_method_declaration, constructor_circularity_msg,
17787         verify_constructor_circularity): New functions.
17788         (get_printable_method_name): New function.
17789         (check_method_redefinition): Don't rename <finit> methods. Fix
17790         declared constructor names. Error message for
17791         constructors modified.
17792         (java_check_regular_methods): Local variable seen_constructor
17793         renamed saw_constructor. Skip verification on constructors. Create
17794         default constructor with create_artificial_method.
17795         (java_check_methods): Removed unnecessary empty line.
17796         (create_artificial_method, start_artificial_method_body,
17797         end_artificial_method_body): New functions.
17798         (java_layout_classes): Changed leading comment. Reverse fields
17799         list if necessary. Always layout java.lang.Object if being
17800         defined.
17801         (java_complete_expand_methods): Verify constructor circularity.
17802         (java_complete_expand_method): Call fix_constructor on
17803         constructors.  Local variable no_ac_found removed. Restore
17804         bindings if method body expansion failed.
17805         (fix_constructors, verify_constructor_super,
17806         generate_field_initialization_code): New function.
17807         (java_expand_classes): Fixed leading comment. Write class file
17808         here.
17809         (resolve_expression_name): Check for illegal instance variable
17810         usage within the argument scope of an explicit constructor
17811         invocation.
17812         (resolve_qualified_expression_name): Pass extra from_super flag
17813         when invoking patch_method_invocation_stmt. New case for
17814         conditional expression when used as a primary. Check for error
17815         when acquiring super.
17816         (patch_method_invocation_stmt): Added extra argument super. New
17817         local variable is_static_flag. Set class_to_search according to
17818         the nature of the constructor invocation. Don't add `this'
17819         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17820         invocation within the argument scope of explicit constructor
17821         invocation. Set is_static according to is_static_flag. Provide
17822         extra `super' argument to patch_invoke invocation.
17823         (patch_invoke): New argument from_super. Loop on arguments
17824         indentation fixed. Pass from_super to invocation_mode. New switch
17825         case INVOKE_SUPER. Fixed error message in switch default case.
17826         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17827         value.
17828         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17829         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17830         message takes constructors into account.
17831         (find_applicable_accessible_methods_list): Fixed indentation.
17832         (qualify_ambiguous_name): Take explicit constructor invocation
17833         into account. Deal with a conditional expression as a primary to
17834         a method call.
17835         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17836         case. Added extra argument to patch_method_invocation_stmt.
17837         Register calls made to explicit constructor `this'. Don't call
17838         save_expr in ARRAY_REF case when emitting class files. Check for
17839         illegal use of this when expanding explicit constructor invocation
17840         arguments.
17841         (complete_function_arguments): Set and reset parser context
17842         explicit_constructor_p field value when appropriate.
17843         (build_super_invocation, build_this_super_qualified_invocation):
17844         New functions.
17845         (patch_assignment): Fixed typo.
17846         (patch_unaryop): Check on final fields occurs only when a decl
17847         exits.
17848         (patch_return): Take constructors into account.
17849         (patch_conditional_expr): New function.
17850         * typeck.c (build_java_signature): Removed unnecessary empty line.
17851
17852 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17853
17854         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17855
17856 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17857
17858         * decl.c (init_decl_processing): Renamed fields.
17859         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17860         interface_len, msize fields.
17861
17862         * class.c (make_class_data): Removed subclass_head and
17863         subclass_next fields.
17864         * decl.c (init_decl_processing): Removed subclass_head and
17865         subclass_next fields.
17866
17867 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17868
17869         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17870         * mangle.c (emit_unicode_mangled_name): Similarly.
17871
17872 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17873
17874         * jcf-parse.c (get_constant): Place braces around code to compute
17875         'd' when REAL_ARITHMETIC is not defined.
17876
17877 1998-10-25  H.J. Lu  (hjl@gnu.org)
17878
17879         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17880         dependency.
17881
17882 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17883
17884         * lang-specs.h: `.zip' files are input to jc1.
17885
17886 1998-10-22  Per Bothner  <bothner@cygnus.com>
17887
17888         * jvspecs.c:  Add (but don't enable) support for combining multiple
17889         .class and .java input filenames to a single jc1 invocation.
17890         Add support for -C flag (copile to .class files).
17891         Translate -classpath and -CLASSPATH arguments.
17892         * lang-specs.h:  Don't set %2 spec.
17893
17894 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17895
17896         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17897         a .zip file.
17898         (add_path): Don't add trailing separator to non-empty path
17899         elements.
17900
17901         * lang.c (lang_decode_option): Check for -fclasspath and
17902         -fCLASSPATH before examining other `-f' options.
17903
17904         * java-tree.h (finalize_identifier_node): Don't declare.
17905         * class.c (make_class_data): Don't push "final" field.
17906         * decl.c (init_decl_processing): Don't push "final" field.
17907         (finalize_identifier_node): Removed.
17908         (init_decl_processing): Don't set finalize_identifier_node.
17909
17910         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17911
17912 1998-10-11  Anthony Green  <green@cygnus.com>
17913
17914         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17915         (JV_SCAN_SOURCES): New macro.
17916         (JCF_DUMP_SOURCES): Likewise.
17917         (jcf-dump$(exeext)): New target.
17918         (jv-scan$(exeext)): New target.
17919
17920 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17921
17922         * Makefile.in (LEX): Removed.
17923         (LEXFLAGS): Likewise.
17924         (SET_BISON): New macro.
17925         (BISON): Removed.
17926         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17927         spurious diffs in parse.c.
17928         ($(PARSE_SCAN_C)): Likewise.
17929         (PARSE_DIR): New macro.
17930         (PARSE_C): Use it.
17931         (PARSE_SCAN_C): Likewise.
17932         (PARSE_RELDIR): New macro.
17933
17934         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17935
17936         * jcf-io.c (find_class): Use saw_java_source to determine when to
17937         look for `.java' file.
17938         * jcf-parse.c (saw_java_source): New global.
17939         (yyparse): Set it if `.java' file seen.
17940
17941         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17942         (GCJH_SOURCES): Likewise.
17943         * Makefile.in (datadir): New macro.
17944         (libjava_zip): Likewise.
17945         (JAVA_OBJS): Added jcf-path.o.
17946         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17947         (../gcjh$(exeext)): Likewise.
17948         (jcf-path.o): New target.
17949         * java-tree.h (fix_classpath): Removed decl.
17950         * jcf-parse.c (fix_classpath): Removed.
17951         (load_class): Don't call fix_classpath.
17952         * parse.y (read_import_dir): Don't call fix_classpath.
17953         * lex.h: Don't mention classpath.
17954         * lex.c (java_init_lex): Don't initialize classpath.
17955         * jcf-io.c (classpath): Removed global.
17956         (find_class): Use jcf_path iteration functions.  Correctly search
17957         class path for .java file.
17958         (open_in_zip): New argument `is_system'.
17959         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17960         classpath-related options.
17961         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17962         and -I.
17963         (lang_init): Call jcf_path_init.
17964         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17965         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17966         Correctly put braces around second string in each entry.
17967         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17968         classpath-related options.
17969         (help): Updated for new options.
17970         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17971         `classpath' global.
17972         * jcf-path.c: New file.
17973
17974         * jcf-depend.c: Include jcf.h.
17975
17976         * jcf-write.c (localvar_alloc): Returns `void'.
17977         (localvar_free): Removed unused variable.
17978
17979         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17980         (init_parse): Use OBJECT_SUFFIX, not ".o".
17981
17982 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17983
17984         * class.c (emit_register_classes): Renamed from
17985         emit_register_class.
17986         * java-tree.h (emit_register_classes): Prototype renamed from
17987         emit_register_class.
17988         * jcf-parse.c (yyparse): Call emit_register_classes once before
17989         returning.
17990         * parse.y (java_expand_classes): No longer register classes.
17991
17992 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17993
17994         * class.c (is_compiled_class): New local variable
17995         seen_in_zip. Identify classes found in currently compiled source
17996         file(s).
17997         * decl.c (complete_start_java_method): Fixed typo.
17998         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17999         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18000         (CLASS_P): Moved around.
18001         (java_parse_abort_on_error): Macro moved from jcf-parse.c
18002         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18003         java-tree.h
18004         (jcf_parse_source): Changed leading comment. Removed unnecessary
18005         fclose and CLASS_FROM_SOURCE_P marking.
18006         (parse_source_file): New local variables remember_for_generation
18007         and filename. Mark parsed file name identifier node. Removed block
18008         executed when parse_only was null. Set remember_for_generation.
18009         Use it as an argument to java_pop_parser_context.
18010         (yyparse): New local variables several_files, list, next node and
18011         current_file_list. Split ampersand separated file names into
18012         current_file_list. Iterate through the list and parse accordingly.
18013         * parse.h (java_pop_parser_context): New function prototype.
18014         * parse.y (ctxp_for_generation): New static global variable.
18015         (java_pop_parser_context): New argument generate. Link popped ctxp
18016         to ctxp_for_generation list accordingly.
18017         (java_complete_expand_methods): Fixed indentation.
18018         (java_expand_classes): New function.
18019
18020 1998-10-17  Per Bothner  <bothner@cygnus.com>
18021
18022         * Makefile.in:  Link with libiberty.a instead of memmove.o.
18023
18024 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18025
18026         * lex.c (setjmp.h): No longer included.
18027         * lex.h (setjmp.h): Included.
18028         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18029         (duplicate_declaration_error_p): Renamed from
18030         duplicate_declaration_error.
18031         (build_array_from_name): New function prototype.
18032         * parse.y (setjmp.h): No longer included.
18033         (variable_declarator_id): Define action.
18034         (build_array_from_name): New function.
18035         (duplicate_declaration_error_p): Renamed from
18036         duplicate_declaration_error.  Fixed leading comment.
18037         (register_fields): Main `for' loop reorganized. Uses
18038         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18039         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18040         build_array_from_name.
18041         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18042         types.
18043         (read_import_dir): Don't try to skip `.' and `..'.
18044         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18045         build_array_from_name. Main `for' loop reorganized.
18046         (resolve_qualified_expression_name): When building access to a
18047         field, use the type where the field was found, not its own type.
18048         (maybe_access_field): Use field DECL_CONTEXT if the type where the
18049         field was found is null.
18050         (qualify_ambiguous_name): Sweep through all successive array
18051         dimensions.
18052
18053 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18054
18055         * java-tree.h (pop_labeled_block, lang_printable_name,
18056         maybe_add_interface, set_super_info, get_access_flags_from_decl,
18057         interface_of_p, inherits_from_p, fix_classpath,
18058         complete_start_java_method, emit_handlers, init_outgoing_cpool,
18059         make_class_data, register_class, alloc_name_constant): New
18060         function prototypes.
18061         * lang.c (lang_decode_option): Set argc argument unused. Fixed
18062         indentation. Added cast to remove warning.
18063         (lang_printable_name): Set v argument unused.
18064         (lang_print_error): Added argument to lang_printable_name call.
18065         (java_dummy_print, print_lang_decl, print_lang_type,
18066         print_lang_identifier, lang_print_xnode): All argument marked
18067         unused.
18068         * lex.c (java_unget_unicode): Removed unnecessary argument.
18069         (java_allocate_new_line): Unused local variable is gone.
18070         (java_read_char): Added parenthesis in expressions to remove
18071         warnings.  Added final return statement.
18072         (java_read_unicode): Added parenthesis in expression to remove
18073         warning.
18074         (java_parse_end_comment): Fixed java_unget_unicode invocation.
18075         (java_parse_escape_sequence): Likewise.
18076         (java_lex): Unused local variables are gone. Fixed
18077         java_unget_unicode invocation.
18078         * lex.h (set_float_handler): Prototype added when JC1_LITE not
18079         defined.
18080         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18081         lang_printable_name invocation in macro.
18082         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18083         Likewise.
18084         (duplicate_declaration_error): Suppressed unused argument in
18085         prototype.
18086         (identical_subpath_p): Function declaration is gone.
18087         (patch_invoke): Suppressed unused argument in prototype.
18088         (patch_cast, build_labeled_block, check_thrown_exceptions):
18089         Likewise.
18090         * parse.y (setjmp.h): Included
18091         (toplev.h): Likewise.
18092         (field_declaration:): Suppressed unused local
18093         (label_decl:): Fixed build_labeled_block invocation.
18094         (java_pop_parser_context): Put extra parenthesis around assignment
18095         in if.
18096         (yyerror): Suppressed unused local variables.
18097         (variable_redefinition_error): Fixed lang_printable_name
18098         invocation.
18099         (create_interface): Suppressed unused local variables.
18100         (create_class): Likewise.
18101         (duplicate_declaration_error): Suppressed unused argument. Fixed
18102         lang_printable_name invocation.
18103         (register_fields): Suppressed unused local variable. Fixed
18104         duplicate_declaration_error invocation.
18105         (method_header): Suppressed unused local variable.
18106         (method_declarator, parser_check_super): Likewise.
18107         (java_complete_class): Suppressed unused local variable. Fixed
18108         fatal error message.
18109         (complete_class_report_errors): Added default: in switch.
18110         (java_check_regular_methods): Fixed lang_printable_name
18111         invocations.
18112         (check_throws_clauses): Likewise.
18113         (java_check_abstract_methods): Suppressed unused local
18114         variable. Fixed lang_printable_name invocation.
18115         (read_import_entry): Added supplemental return statement.
18116         (read_import_dir): Suppressed unused local variables.
18117         (check_pkg_class_access, declare_local_variables): Likewise.
18118         (source_start_java_method): Suppressed unused extern variable
18119         declarations
18120         (expand_start_java_method): Suppressed unused extern and local
18121         variable declarations.
18122         (java_complete_expand_methods): Likewise.
18123         (java_complete_expand_method): Suppressed unused local variables.
18124         (make_qualified_name): Likewise.
18125         (resolve_qualified_expression_name): Added default: in
18126         switch. Fixed lang_printable_name invocation.
18127         (class_instance_creation_expression): Added parenthesis around
18128         expressions.
18129         (patch_method_invocation_stmt): Fixed lang_printable_name and
18130         patch_invoke invocations.
18131         (check_for_static_method_reference): Fixed lang_printable_name
18132         invocation.
18133         (patch_invoke): Suppressed unused arguments and local variables.
18134         (lookup_method_invoke): Suppressed unused local variables.
18135         (qualify_ambiguous_name): Added default: in switch.
18136         (identical_subpath_p): Function removed.
18137         (patch_assignment): Suppressed unused local variables. Suppressed
18138         unnecessary if statement. Fixed lang_printable_name invocations.
18139         (try_builtin_assignconv): Fixed lang_printable_name invocations.
18140         (valid_ref_assignconv_cast_p): Parenthesis around
18141         expression. Suppressed unused local variables.
18142         (build_binop): Suppressed unused local variables. fixed
18143         lang_printable_name invocations.
18144         (string_constant_concatenation): Suppressed unused local
18145         variables.
18146         (patch_unaryop): Fixed lang_printable_name invocation.
18147         (patch_cast): Suppressed unnecessary argument. Fixed
18148         lang_printable_name invocation.
18149         (patch_array_ref): Fixed lang_printable_name invocation.
18150         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18151         (build_labeled_block): Suppressed unused argument.
18152         (generate_labeled_block): Fixed build_labeled_block invocation.
18153         (build_loop_body): Suppressed unused local variables.
18154         (patch_loop_statement): Likewise.
18155         (patch_exit): Fixed lang_printable_name invocation.
18156         (patch_switch_statement): Likewise.
18157         (case_identity): First argument marked unused.
18158         (patch_try_statement): Fixed lang_printable_name invocations.
18159         (patch_synchronized_statement, patch_throw_statement): Likewise.
18160         (check_thrown_exceptions): Fixed check_thrown_exceptions and
18161         lang_printable_name invocations.
18162         (check_thrown_exceptions_do): Suppressed unused argument.
18163
18164 1998-10-14  Tom Tromey  <tromey@cygnus.com>
18165
18166         * jcf-write.c (write_classfile): Add output class file as target.
18167         * lang-options.h: Added -MD, -MMD, -M, and -MM.
18168         * jcf.h: Added declarations for dependency-tracking functions.
18169         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18170         * lang.c (lang_decode_option): Recognize -MD and -MMD.
18171         (finish_parse): Call jcf_dependency_write.
18172         (dependency_tracking): New global.
18173         (DEPEND_SET_FILE): New define.
18174         (DEPEND_ENABLE): New define.
18175         (init_parse): Enable dependency tracking if required.
18176         Include "flags.h".
18177         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18178         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18179         (../gcjh$(exeext)): Likewise.
18180         (jcf-depend.o): New target.
18181         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18182         (GCJH_SOURCES): Likewise.
18183         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
18184         dep_name argument.
18185         (find_classfile): Added dep_name argument.
18186         (find_class): Compute name of dependency.
18187         (open_in_zip): Call jcf_dependency_add_file.
18188         * gjavah.c (output_file): No longer global.
18189         (usage): Don't mention "gjavah".
18190         (help): Likewise.
18191         (java_no_argument): Likewise.
18192         (version): Likewise.
18193         (main): Recognize and handle -M family of options.
18194         (print_mangled_classname): Return is void.
18195         (process_file): Handle case where output is suppressed.
18196         (HANDLE_END_FIELD): Likewise.
18197         (HANDLE_METHOD): Likewise.
18198         * jcf-depend.c: New file.
18199
18200 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18201
18202         * java-tree.def: Add missing newline at EOF.
18203
18204 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18205
18206         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18207         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18208         function.
18209         Include <config.h> and "system.h".
18210         (disassemble_method): Undefine RET to avoid clash with
18211         config/i386/i386.h.
18212
18213 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18214
18215         * decl.c (runtime_exception_type_node, error_exception_type_node):
18216         New global variables.
18217         (init_decl_processing): Initialized.
18218         * expr.c (java_lang_expand_expr): Set caught exception type to
18219         null if catch handler argument doesn't exit.
18220         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18221         tree codes.
18222         * java-tree.h (runtime_exception_type_node,
18223         error_exception_type_node): Global variables declared.
18224         (DECL_FUNCTION_THROWS): New macro.
18225         (DECL_FUNCTION_BODY): Modified comment.
18226         (DECL_SPECIFIC_COUNT): Likewise.
18227         (struct lang_decl): New field throws_list.
18228         (IS_UNCHECKED_EXPRESSION_P): New macro.
18229         * lex.c (java_lex): Generate location information for THROW_TK.
18230         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18231         EXCEPTIONS_P): New macros.
18232         (enum jdep_code): New value JDEP_EXCEPTION.
18233         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18234         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18235         PATCH_METHOD_RETURN_ERROR): New macros.
18236         (patch_method_invocation_stmt): Added new argument to prototype.
18237         (patch_synchronized_statement, patch_throw_statement,
18238         check_thrown_exceptions, check_thrown_exceptions_do,
18239         purge_unchecked_exceptions, check_throws_clauses): New function
18240         prototypes.
18241         * parse.y Fixed typo in keyword section.
18242         (throw:): Rule tagged <node>.
18243         (THROW_TK): Keyword tagged <operator>.
18244         (method_header:): Last argument to call to method_header passed
18245         from throws: rule.
18246         (throws:, class_type_list:, throw_statement:,
18247         synchronized_statement:, synchronized:): Defined actions.
18248         (method_header): New local variable current. Register exceptions
18249         from throws clause.
18250         (java_complete_tree): Complete and verify exceptions from throws
18251         clause.
18252         (complete_class_report_errors): Error message on exceptions not
18253         found
18254         (java_check_regular_methods): Fixed typo. Shortcut on private
18255         overriding methods. Changed error message on method
18256         redefinition. Check for throws clause compatibility.
18257         (check_throws_clauses): New function.
18258         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18259         method. Changed error message on method redefinition.
18260         (currently_caught_type_list): New static variable.
18261         (java_complete_expand_methods): Purge unchecked exceptions from
18262         throws clause list. Call PUSH_EXCEPTIONS before walk and
18263         POP_EXCEPTIONS after.
18264         (resolve_qualified_expression_name): Pass new argument as NULL to
18265         patch_method_invocation_stmt.
18266         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18267         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18268         argument list when appropriate. Use new argument if non null to
18269         store selected method decl.
18270         (patch_invoke): Convert if necessary args of builtin types before
18271         forming CALL_EXPR. Argument list no longer reversed here.
18272         (invocation_mode): Treat final methods as static methods.
18273         (java_complete_tree): New cases for THROW_EXPR: and
18274         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18275         function call.
18276         (complete_function_arguments): No more RECORD_TYPE
18277         conversion. Function parameter nodes no longer saved.
18278         (valid_ref_assignconv_cast_p): Avoid handling null type.
18279         (patch_binop): Fixed null constant reference handling.
18280         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18281         BUILD_THROW macros.
18282         (patch_try_statement): Fixed comments. Record caught types in
18283         list, push the list, expand try block and pop the list.
18284         (patch_synchronized_statement, patch_throw_statement,
18285         check_thrown_exceptions, check_thrown_exceptions_do,
18286         purge_unchecked_exceptions): New functions.
18287         * typeck.c (lookup_argument_method): Allow WFL in place of method
18288         DECL_NAME during method definition check
18289
18290 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18291
18292         * gjavah.c (decode_signature_piece): New function.
18293         (print_c_decl): Use it.  Added `name_override' argument.
18294         (print_method_info): Use name_override argument to print_c_decl.
18295         (seen_fields): Removed.
18296         (print_field_info): Don't update seen_fields.
18297         (struct method_name): New structure.
18298         (method_name_list): New global.
18299         (print_method_info): Add new method to list of methods.
18300         (name_is_method_p): New function.
18301         (print_field_info): If field name has same name as method, then
18302         change field name.
18303         (process_file): Parse methods before fields.
18304         (field_pass): New global.
18305         (HANDLE_END_FIELD): Take field_pass into account.
18306
18307 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18308
18309         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18310         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18311
18312 1998-10-03  Anthony Green  <green@cygnus.com>
18313
18314         * jvspec.c: Fix bug in jvgenmain_spec patch.
18315
18316 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18317
18318         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18319         * decl.c (soft_exceptioninfo_call_node): New global variable.
18320         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18321         takes extra integer argument. soft_exceptioninfo_call_node
18322         initialized.
18323         * except.c (java_set_exception_lang_code): New function
18324         (method_init_exceptions): Called here.
18325         (prepare_eh_table_type): New function.
18326         (expand_end_java_handler): Called here.
18327         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18328         one argument. Modified generation of call to
18329         soft_badarrayindex_node to use new argument.
18330         (build_java_arrayaccess): Pass faulty index value to
18331         build_java_throw_out_of_bounds_exception.
18332         (generate_name): New function.
18333         (java_lang_expand_expr): New local variables node, current,
18334         has_finally_p. Expand TRY_EXPR node.
18335         (process_jvm_instruction): Replace top of the stack with thrown
18336         object reference when entering exception handler.
18337         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18338         specific tree codes.
18339         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18340         global.
18341         (DECL_SPECIFIC_COUNT): New macro.
18342         (prepare_eh_table_type, java_set_exception_lang_code,
18343         generate_name): New function declarations.
18344         (match_java_method): Declaration deleted.
18345         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18346         macros.
18347         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18348         * parse.h (redefinition_error, refine_accessible_methods_list,
18349         can_cast_to_p): Function declaration removed.
18350         (classitf_redefinition_error, variable_redefinition_error,
18351         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18352         find_most_specific_methods_list, argument_types_convertible,
18353         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18354         valid_cast_to_p, valid_method_invocation_conversion_p,
18355         try_reference_assignconv, add_stmt_to_compound,
18356         build_jump_to_finally, build_tree_list, patch_try_statement,
18357         java_get_catch_block): New function declarations.
18358         * parse.y (string_buffer_type): Global variable deleted.
18359         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18360         finally): Rules tagged <node>.
18361         (TRY_TK, CATCH_TK): Token tagged <operator>.
18362         (class_body_declaration:, class_member_declaration:,
18363         formal_parameter:, explicit_constructor_invocation:,
18364         interface_member_declaration:, constant_declaration:,
18365         primary_no_new_array:, class_instance_creation_expression:,
18366         array_creation_expression:): Issue error on unsuported JDK1.1
18367         features.
18368         (try_statement:, catches:, finally:): Define actions.
18369         (catch_clause_parameter): New rule.
18370         (catch_clause:): Use new rule catch_clause_parameter.
18371         (parse_jdk1_1_error): New function.
18372         (redefinition_error): Renamed classitf_redefinition_error.
18373         (variable_redefinition_error): New function.
18374         (check_class_interface_creation): Call
18375         classitf_redefinition_error.
18376         (java_complete_tree): Added error message on JDEP_TYPE: case.
18377         (complete_class_report_errors): Fixed indentation.
18378         (declare_local_variables): Call variable_redefinition_error.
18379         (source_end_java_method): Call java_set_exception_lang_code and
18380         emit_handlers where appropriate.
18381         (java_method_add_stmt): Call add_stmt_to_block.
18382         (add_stmt_to_block): New function.
18383         (lookup_method_invoke): Fixed outside comment. new local variable
18384         candicates.  Call find_applicable_accessible_methods_list and
18385         find_most_specific_methods_list when searching for a
18386         method. Modified error report to list possible candidates when
18387         applicable.
18388         (find_applicable_accessible_methods_list,
18389         find_most_specific_methods_list, argument_types_convertible): New
18390         function.
18391         (refine_accessible_methods_list): Function deleted.
18392         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18393         expr (if applicable) before calling patch_array_ref.
18394         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18395         (enter_block): Fixed comment.
18396         (enter_a_block): New function.
18397         (patch_assignment): Reorganized. Call try_reference_assignconv for
18398         references. Call valid_cast_to_p instead of can_cast_to_p.
18399         (try_reference_assignconv,
18400         valid_builtin_assignconv_identity_widening_p): New functions.
18401         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18402         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18403         functions.
18404         (build_string_concatenation): Don't resolve StringBuffer.
18405         (patch_cast): Fixed inverted arguments.
18406         (patch_array_ref): Code to save array expr deleted. Call
18407         valid_cast_to_p instead of can_cast_to_p.
18408         (generate_labeled_block): Call generate_name.
18409         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18410         patch_try_statement): New functions.
18411         * typeck.c (match_java_method): Function deleted.
18412
18413 1998-10-02  Anthony Green  <green@cygnus.com>
18414
18415         * jvspec.c: jvgenmain_spec uses different temporary file names.
18416
18417 1998-10-02  Anthony Green  <green@cygnus.com>
18418
18419         * jvspec.c (lang_specific_driver): Fail if user specifies
18420         --main= when not linking.
18421
18422 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18423
18424         * class.c (make_class_data): Push value for `thread' field.
18425         * decl.c (init_decl_processing): Added `thread' field to class.
18426
18427         * class.c (add_field): Always make static fields externally
18428         visible.
18429
18430 1998-09-26  Anthony Green  <green@cygnus.com>
18431
18432         * expr.c (build_java_athrow,
18433         build_java_throw_out_of_bounds_exception, expand_invoke,
18434         build_newarray, expand_java_multianewarray, build_java_monitor):
18435         Update comments to reflect _Jv_* function names.
18436
18437 1998-09-25  Per Bothner  <bothner@cygnus.com>
18438
18439         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18440         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18441         * parse.y (expand_start_java_method):  Likewise.
18442
18443 1998-09-24  Per Bothner  <bothner@cygnus.com>
18444
18445         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18446
18447         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18448         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18449         * expr.c:  Remove no-longer-needed calls to promote_type.
18450         * decl.c (give_name_to_locals):  Liekwise.
18451         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18452         * parse.y:  Add/remove promote_type calls as appropriate.
18453         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18454         (parse_signature_string):  Likewise.
18455         (build_java_array_type):  Fix for now signature convenions.
18456
18457         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18458
18459 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18460
18461         * class.c (init_class_processing): libjava function renamed to
18462         _Jv_RegisterClass.
18463
18464 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18465
18466         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18467         * java-tree.def: Fixed DEFTREECODE third argument.
18468         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18469         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18470         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18471         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18472         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18473         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18474         * lang.c (java_tree_code_type, java_tree_code_length,
18475         java_tree_code_name): New arrays.
18476         (lang_init): Append Java tree node definitions to Gcc ones.
18477         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18478         defined.
18479         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18480         wfl_to_string.
18481         (java_lex): Allow declaration of empty string constants. Retain
18482         location information on CASE_TK and DEFAULT_TK.
18483         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18484         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18485         Modified to be more robust.
18486         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18487         (build_new_invocation, try_builtin_assignconv,
18488         patch_switch_statement, string_constant_concatenation,
18489         build_string_concatenation, patch_string_cst, patch_string,
18490         java_expand_switch): New function declarations.
18491         * parse.y: Rules related to switch and EH tagged <node>.
18492         (label_id): Set to NULL_TREE
18493         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18494         tree nodes.
18495         (this_or_super:): Fixed indentation.
18496         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18497         statement_expression:): Removed call to RULE on all sub-rules.
18498         (switch_expression:, switch_labels:): New rules.
18499         (switch_statement:, switch_block:, switch_block_statement_groups:,
18500         switch_block_statement_group:, switch_labels:, switch_label:):
18501         Defined actions.
18502         (throw_statement:, synchronized_statement:, try_statement:):
18503         Defined temporary actions.
18504         (class_instance_creation_expression:): Call
18505         build_new_invocation. Fixed indentation.
18506         (field_access): Fixed indentation.
18507         (method_invocation): Likewise.
18508         (make_qualified_primary): Use THIS_EXPR.
18509         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18510         resolving from SUPER, set *type_found.
18511         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18512         (java_complete_tree): Removed unused local variable `location'. Case
18513         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18514         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18515         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18516         STRING_CST: case. default: checks for patchable strings.
18517         (complete_function_arguments): Transform string constant or
18518         crafted StringBuffer if necessary.
18519         (build_method_invocation): Fixed comments.
18520         (build_new_invocation): New function.
18521         (patch_assignment): Call try_builtin_assignconv to figure a valid
18522         assignment conversion between builtin types.
18523         (try_builtin_assignconv): New function.
18524         (build_binop): Use URSHIFT_EXPR directly to call build.
18525         (operator_string): Use UNARY_PLUS_EXPR.
18526         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18527         operator.
18528         (do_merge_string_cste, merge_string_cste,
18529         string_constant_concatenation, build_string_concatenation,
18530         patch_string, patch_string_cst): New function.
18531         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18532         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18533         (build_newarray_node): Use NEW_ARRAY_EXPR.
18534         (build_this): Use THIS_EXPR.
18535         (build_return): Enable debug information on return statement.
18536         (build_if_else_statement): Likewise.
18537         (complete_labeled_statement): Fixed related comment.
18538         (build_loop_body): Fixed comment.
18539         (build_bc_statement): Enable debug information on break/continue
18540         statements.
18541         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18542         context.
18543         (patch_switch_statement, case_identity, java_expand_switch): New
18544         functions.
18545
18546 1998-09-21  Per Bothner  <bothner@cygnus.com>
18547
18548         * buffer.h (BUFFER_INIT):  New macro.
18549         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18550         Pass (struct jcf_partial *state) to most functions.
18551         (jcf_block, jcf_relocation):  New types.
18552         Support labels, branches, conditionals, loops.
18553
18554 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18555
18556         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18557
18558 1998-09-21  Per Bothner  <bothner@cygnus.com>
18559
18560         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18561         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18562         not integer_type_node (INT_TYPE_SIZ bits).
18563
18564         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18565
18566         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18567         * jcf-dump.c (print_exception_table):  New function.
18568         (disassemble_method):  Better handling of wide instructions.
18569         Make more robust for bad input.
18570
18571 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18572
18573         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18574         FreeBSD.
18575
18576 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18577
18578         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18579
18580 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18581
18582         * Makefile.in ($(PARSE_H)): Removed target.
18583
18584 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18585
18586         * Makefile.in (JAVA_OBJS): Add memmove.o
18587         (memmove.o): New target & rules.
18588
18589 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18590
18591         * expr.c (expand_invoke): Don't generate a call to the class init
18592         code.
18593
18594 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18595
18596         * Makefile.in: Add many missing dependencies.
18597         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18598         as appropriate.
18599         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18600         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18601
18602 1998-09-11  Per Bothner  <bothner@cygnus.com>
18603
18604         * decl.c (complete_start_java_method):  If method is static (and
18605         not private) call _Jv_InitClass.
18606         * expr.c (expand_invoke):  Don't call build_class_init.
18607
18608         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18609
18610 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18611
18612         * Make-lang.in (GCJ): Define before using.
18613
18614 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18615
18616         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18617         losing due to namespace pollution in GNU getopt.h
18618
18619 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18620
18621         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18622         (java.all.cross): Likewise.
18623         (java.rest.encap): Likewise.
18624
18625 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18626
18627         * gjavah.c (print_class_decls): Fix thinko in arglist
18628         * jcv-io.c (find_classfile): Similarly.
18629
18630 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18631
18632         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18633
18634 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18635
18636         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18637         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18638         * Makefile.in (PARSE_C): New macro.
18639         (PARSE_H): Likewise.
18640         (PARSE_SCAN_C): Likewise.
18641         ($(PARSE_C)): Target renamed from parse.c.
18642         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18643         (clean): Remove parse-scan.c as well.
18644         (parse.o): Depend on $(PARSE_C).
18645
18646 1998-09-05  Anthony Green  <green@cygnus.com>
18647
18648         * README, license.terms: Removed.
18649
18650         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18651         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18652         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18653         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18654         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18655         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18656         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18657         and Java trademark attribution.
18658
18659 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18660
18661         * Makefile.in: Use gcjh, not gjavah.
18662         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18663         * Make-lang.in: Changed gjavah to gcjh everywhere.
18664
18665 1998-09-03  Per Bothner  <bothner@cygnus.com>
18666
18667         * gjavah.c:  Support new -prepend -add -append flags.
18668         (print_method_info):  Method is not virtual if class is final.
18669
18670 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18671
18672         * jv-scan.c: Fixed copyright assignment.
18673         * keyword.gperf: Likewise.
18674         * keyword.h: Likewise.
18675         * lex.c: Fixed copyright assignment.
18676         (java_lex): Push unicode back when parsing '<'.
18677         * lex.h: Fixed copyright assignment.
18678         * parse-scan.y: Likewise.
18679         * parse.h: Fixed copyright assignment.
18680         (build_debugable_stmt, complete_for_loop): New function prototypes.
18681         * parse.y: Fixed copyright assignment.
18682         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18683         size_zero_node when completing a loop with no exit condition.
18684         (for_statement_nsi:): Define action.
18685         (for_init:, for_update:): Return size_zero_node when empty.
18686         (declare_local_variables): Call build_debugable_stmt.
18687         (build_debugable_stmt): New function.
18688         (build_loop_body): Build debugable statement around loop
18689         condition part.
18690         (complete_loop_body): Take into account the debugable statement
18691         around the EXIT_EXPR.
18692         (complete_loop_body): New function.
18693         (patch_exit_expr): Fixed condition inversion.
18694
18695 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18696
18697         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18698         name of thread define.
18699         * jvspec.c (THREAD_NAME): New macro.
18700         (GCLIB): Likewise.
18701         (THREADLIB): Likewise.
18702         (lang_specific_driver): Recognize attempt to link with thread
18703         library or gc library.  Recognize -ljava on command line so it
18704         isn't linked against more than once.
18705
18706 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18707
18708         * parse-scan.y (report_main_declaration): Name of the class
18709         containing `main' can be a qualified name.
18710
18711 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18712
18713         * config-lang.in: Changed gjavac to gjc everywhere.
18714         * Make-lang.in: Changed gjavac to gjc everywhere.
18715
18716 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18717
18718         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18719         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18720         and install the files.
18721         * Makefile.in (JAVA_OBJS_LITE): New variable.
18722         (compiler:): Now include jv-scan as a dependency.
18723         (../jv-scan$(exeext), parse-scan.c): New targets.
18724         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18725         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18726         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18727         check for errors even if parse_only.
18728         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18729         defined.
18730         (yylex): New function. Uses java_lex body.
18731         (java_lex): Removed commented out statement. Remove local variable
18732         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18733         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18734         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18735         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18736         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18737         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18738         where appropriate.
18739         (java_lex_error): Empty if JC1_LITE is defined.
18740         (java_get_line_col): Return 0 if JC1_LITE is defined.
18741         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18742         SET_MODIFIER_CTX): Moved into the section containing the macros
18743         conditionally defined by JC1_LITE.
18744         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18745         argument if JC1_LITE is defined.
18746         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18747         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18748         is defined.
18749         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18750         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18751         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18752         to different values according to JC1_LITE.
18753         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18754         declared if JC1_LITE set.
18755         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18756         defined if JC1_LITE not set.
18757         (struct parser_ctx): Reorganized and skip the jc1 front end part
18758         if JC1_LITE set.
18759         (java_layout_classes): New function definition.
18760         (java_push_parser_context, java_init_lex, yyparse, yylex,
18761         yyerror): Prototype always declared. All other static function
18762         prototypes declared only if JC1_LITE is not set.
18763         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18764         declared in parse.h.
18765         (java_layout_classes): New function.
18766         (java_complete_expand_methods): No longer layout the class here.
18767         * parse-scan.y: New file.
18768         * jv-scan.c: New file.
18769
18770 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18771
18772         * gjavah.c (main): Handle -friend option.
18773         (friend_specs): New global.
18774         (generate_access): Handle friend_specs.
18775         (process_file): Likewise.
18776         (MAX_FRIENDS): New macro.
18777         (friend_count): New global.
18778         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18779         Changed all callers.
18780
18781 1998-08-24  Per Bothner  <bothner@cygnus.com>
18782
18783         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18784         (main):  Handle processing all the entries of a named .zip archive.
18785         * jcf-io.c (jcf_trim_old_input):  New function.
18786         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18787
18788 1998-08-24  Per Bothner  <bothner@cygnus.com>
18789
18790         * lang.c (flag_assume_compiled):  Make default be on.
18791
18792 1998-08-21  Per Bothner  <bothner@cygnus.com>
18793
18794         * jcf-dump.c:  Add bunches of flags to control output more.
18795         (process_class):  New function;  support printing more than one class.
18796         (main): Support new --print-main and --javap flags.
18797         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18798         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18799
18800 1998-08-20  Per Bothner  <bothner@cygnus.com>
18801
18802         Change mangling of dispatch table to match C++ vtable (w/thunks).
18803         * class.c (build_dtable_decl), java-tree.h:  New function.
18804         (make_class_data):  Call it.
18805         * decl.c (init_decl_processing):  Likewise.
18806
18807 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18808
18809         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18810         soft_anewarray; adjust args passed.
18811         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18812         match _Jv_NewObjectArray.
18813
18814 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18815
18816         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18817         * expr.c (loopup_label): Call create_label_decl.
18818         (create_label_decl): New function.
18819         (java_lang_expand_expr): Call expand_start_bindings with argument
18820         set to zero.
18821         * java-tree.h Added space after PROTO in function declarations
18822         when necessary.
18823         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18824         (create_label_decl, push_labeled_block): New function
18825         declarations.
18826         * lex.c (label_id): Initialize.
18827         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18828         switch.
18829         * parse.h Added space after PROTO in function declarations when
18830         necessary.
18831         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18832         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18833         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18834         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18835         macros.
18836         (struct parser_ctxt): New fields current_loop,
18837         current_labeled_block.
18838         (build_if_else_statement, patch_if_else_statement,
18839         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18840         generate_labeled_block, complete_labeled_statement,
18841         build_bc_statement, patch_bc_statement, patch_loop_statement,
18842         build_new_loop, build_loop_body, complete_loop_body): New function
18843         declarations.
18844         * parse.y (java_warning_count): New global variable.
18845         (label_id): New static variable.
18846         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18847         (block:): Return size_zero_node when block is empty.
18848         (empty_statement:): Return size_zero_node.
18849         (statement:): Implement supplemental action when for_statement: is
18850         reduced.
18851         (label_decl:): New rule.
18852         (labeled_statement:): Rewritten using label_decl. Actions
18853         implemented.
18854         (labeled_statement_nsi:): Likewise.
18855         (if_then_statement): Actions implemented.
18856         (while_expression): New rule.
18857         (while_statement:): Rewritten using while_expression. Actions
18858         implemented.
18859         (while_statement_nsi:): Likewise.
18860         (do_statement_begin:): New rule.
18861         (do_statement:): Rewritten using do_statement_begin. Actions
18862         implemented.
18863         (for_statement:): Rewritten using for_begin. Actions implemented.
18864         (for_statement_nsi:): Likewise.
18865         (for_header:, for_begin:): New rules.
18866         (for_init:): Actions implemented.
18867         (statement_expression_list:, break_statement:,
18868         continue_statement:): Likewise.
18869         (yyerror): Count number of issued warning(s).
18870         (java_report_errors): Report error(s) and/or warning(s).
18871         (java_complete_class): Use build_java_argument_signature to
18872         recompute completed method signature.
18873         (java_check_regular_methods): New locals method_wfl and aflags.
18874         Use method_wfl instead of lookup_cl during error reports. Fixed
18875         indentation and modified some error messages. Use
18876         lang_printable_name in method instead of the DECL_NAME. New code
18877         to issue warnings on methods not overriding corresponding methods
18878         private to a different package.
18879         (java_method_add_stmt): Call add_stmt_to_compound.
18880         (add_stmt_to_compound): New function.
18881         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18882         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18883         (build_if_else_statement, patch_if_else_statement,
18884         build_labeled_block, generate_labeled_block,
18885         complete_labeled_statement, build_new_loop, build_loop_body,
18886         complete_loop_body, patch_loop_statement, build_bc_statement,
18887         patch_bc_statement, patch_exit_expr): New functions.
18888         * typeck.c (build_java_signature): Build argument signature before
18889         enclosing it in between parenthesis.
18890
18891 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18892
18893         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18894         (JAVA_OBJS): Added reminder comment
18895
18896 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18897
18898         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18899         be interpreted as a long long.
18900
18901 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18902
18903         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18904         soft_initialise_class.  Use _Jv_NewMultiArray, not
18905         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18906         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18907         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18908         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18909
18910 1998-08-12  Per Bothner  <bothner@cygnus.com>
18911
18912         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18913         length_identifier_node):  New global tree node constants.
18914         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18915         Replace uses by super_identifier_node etc.
18916         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18917
18918         * parse.y (resolve_field_access):  Don't special-case ".length" if
18919         flag_emit_class_files.
18920         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18921         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18922         and ARRAY.length.
18923
18924 1998-08-11  Per Bothner  <bothner@cygnus.com>
18925
18926         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18927         * class.c (make_method_value):  Remove init for removed fields.
18928
18929         * class.c (layout_class):  Use build_java_argument_signature.
18930         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18931
18932         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18933         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18934         (build_java_signature):  Don't use push_java_argument_signature.
18935
18936         * typeck.c (lookup_argument_method):  New function.
18937         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18938         instead of lookup_java_method2 followed by lookup_java_method.
18939
18940         * parse.y (check_method_redefinition):  Minor optimization.
18941
18942         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18943         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18944
18945 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18946
18947         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18948         c-pragma.o.
18949
18950         * gjavah.c (java_float_finite): Use K&R-style definition.
18951         (java_double_finite): Likewise.
18952         (generate_access): Now returns void.  Changed all callers.
18953         (last_access_generated): Removed.
18954         (process_file): Only make a single pass over the .class file.
18955
18956 1998-07-29  Per Bothner  <bothner@cygnus.com>
18957
18958         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18959         for compatibility for G++ (with -fvtable-thunks).
18960         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18961
18962         * gjavah.c (process_file):  Use public inheritance for super-class.
18963
18964 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18965
18966         * lex.c (java_init_lex): Initialize ctxp->package.
18967         * parse.h (struct parser_ctxt): package and package_len replaced
18968         by tree package, an identifier node. Field method_decl_list is
18969         gone. Fixed comments.
18970         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18971         class_in_current_package): New function prototypes.
18972         * parse.y (array_type:): Set class loaded flag on primitive type
18973         arrays.
18974         (package_declaration:): Assign ctxp->package to the
18975         identifier node.
18976         (method_invocation:): Handle invocation of method qualified by
18977         `super'.
18978         (single_type_import_declaration:): Removed ambiguity check.
18979         (java_pop_parser_context): New local variable `next'. Reset and
18980         set IMPORT_CLASSFILE_NAME flags on current and previous import
18981         list.
18982         (java_accstring_lookup): Use new local macro COPY_RETURN.
18983         (lookup_field_wrapper): New function.
18984         (parser_qualified_classname): Use merge_qualified_name.
18985         (parser_check_super_interface): Broaden error message.
18986         (do_resolve_class): Check for qualified class name in the current
18987         compilation unit if appropriate.
18988         (process_imports): Check for already defined classes.
18989         (check_pkg_class_access): Got rid of call to
18990         get_access_flags_from_decl.
18991         (java_complete_expand_methods): Call safe_layout_class based on
18992         the current class size.
18993         (make_qualified_primary): Build a WFL qualification on primary if
18994         none exists.
18995         (merge_qualified_name): New function.
18996         (make_qualified_name): Use merge_qualified_name.
18997         (resolve_expression_name): Use safe_lookup_field.
18998         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18999         (resolve_qualified_expression_name): Likewise. Check on resolved
19000         element accessibility.
19001         (not_accessible_p, class_in_current_package): New functions.
19002         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19003         (patch_method_invocation_stmt): Merged common pieces. Check
19004         accessibility of invoked method.
19005         (check_for_static_method_reference): Add returned type in error
19006         message.
19007         (invocation_mode): Get rid of bogus check on PRIVATE methods.
19008         (refine_accessible_methods_list): Merged two conditions in test.
19009         (java_complete_class): Sanity check on stabilize_ref gone.
19010         * zextract.c (read_zip_archive): Cast lseek second argument to long.
19011
19012 1998-07-28  Per Bothner  <bothner@cygnus.com>
19013
19014         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
19015
19016 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19017
19018         * gjavah.c (F_NAN): Removed.
19019         (F_NAN_MASK): New macro.
19020         (F_POSITIVE_INFINITY): Removed.
19021         (F_NEGATIVE_INFINITY): Likewise.
19022         (java_float_finite): Rewrote.
19023         (D_NAN_MASK): Renamed.
19024         (java_double_finite): Rewrote.
19025         (D_POSITIVE_INFINITY): Removed.
19026         (D_NEGATIVE_INFINITY): Likewise.
19027
19028         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19029         If verbose, print underlying representation of value in hex.
19030
19031 1998-07-24  Per Bothner  <bothner@cygnus.com>
19032
19033         * buffer.h, buffer.c:  New files.
19034         * Makefile.in (JAVA_OBJS):  Add buffer.o.
19035
19036         Support locals variables and writing their debug entries to .class.
19037         * jcf-write.c:  Simplify some by user new buffer type.
19038         (vode_buffer_grow):  Removed.
19039         (struct localvar_info):  New type.
19040         (localsvars, localvartable):  New buffers.
19041         (localvar_alloc, localvar_free):  New functions.
19042         (generate_bytecode_insns):  Handle local variables.
19043         (generate_classfile):  Write LocalVariableTable attribute.
19044
19045 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19046
19047         * jcf-io.c (open_in_zip): Check the zipfile magic number.
19048         * zipfile.h (ZIPMAGIC): New macro.
19049
19050 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19051
19052         * Makefile.in (gjavah.o): Updated dependencies.
19053         (jcf-dump.o): Likewise.
19054         (all.indirect): Use ../gjavah.
19055         (../gjavah$(exeext)): Likewise.
19056         (clean): Don't remove gjavah.
19057         (clean): Remove parse.c, not java/parse.c.
19058         * Make-lang.in (java): Added gjavah.
19059         (gjavah$(exeext)): New target.
19060         (GJAVAH_SOURCES): New macro.
19061         (java.all.build): Added gjavah.
19062         (java.all.cross): Likewise.
19063         (java.rest.encap): Likewise.
19064         * config-lang.in (compilers, stagestuff): Added gjavah.
19065
19066 1998-07-23  Tom Tromey  <tromey@cygnus.com>
19067
19068         * gjavah.c (java_float_finite): New function.
19069         (java_double_finite): Likewise.
19070         (F_POSITIVE_INFINITY): New macro.
19071         (F_NEGATIVE_INFINITY): Likewise.
19072         (F_NAN): Likewise.
19073         (D_POSITIVE_INFINITY): Likewise.
19074         (D_NEGATIVE_INFINITY): Likewise.
19075         (D_NAN): Likewise.
19076         (print_field_info): Use java_float_finite and java_double_finite.
19077
19078 1998-07-23  Per Bothner  <bothner@cygnus.com>
19079
19080         * parse.y (method_header):  Name "this" implicit argument.
19081
19082 1998-07-22  Per Bothner  <bothner@cygnus.com>
19083
19084         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
19085         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
19086         (put_linenumber):  New function.
19087         (generate_bytecode_insns, generate_classfile):  Write line numbers.
19088
19089 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19090
19091         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19092         (lookup_name, build_known_method_ref, build_class_init,
19093         build_invokevirtual, invoke_build_dtable, match_java_method,
19094         build_field_ref, pushdecl_force_head, build_java_binop,
19095         binary_numeric_promotion, build_decl_no_layout,
19096         build_java_arrayaccess, build_newarray, build_anewarray,
19097         build_java_array_length_access, build_java_arraynull_check): New
19098         extern function prototypes.
19099         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19100         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19101         java-tree.h.
19102         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19103         to NULL
19104         * jcf.h (jcf_out_of_synch): New extern function prototype.
19105         * parse.h: Static/global function implemented in parse.y
19106         prototyped and declarations moved at the end of the file.
19107         (DECL_P): Check that the argument isn't null.
19108         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19109         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19110         (QUAL_DECL_TYPE): New macro.
19111         (PARAMS): Macro definition removed.
19112         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19113         (return_statement:): Call build_return.
19114         (field_access:): Call make_qualified_primary in sub rule.
19115         (method_invocation:): Build method invocation and call
19116         make_qualified_primary when processing primaries.
19117         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19118         get_type_from_signature.
19119         (java_check_regular_method): Extra integer 0 argument when calling
19120         lookup_java_method2.
19121         (lookup_java_interface_method2): Extra method DECL argument when
19122         calling lookup_java_interface_method2.
19123         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19124         COMPOUND_EXPR node.
19125         (java_complete_expand_method): Layout current class iff not
19126         already done. Don't process interface's methods.
19127         (java_complete_expand_method): Use super class only if it
19128         exists. Use current class otherwise.
19129         (make_qualified_primary): New function.
19130         (resolve_expression_name): Process qualified expression or
19131         expression from primary the same way.
19132         (resolve_expression_name): Two last arguments to
19133         resolve_field_access are now NULL_TREEs.
19134         (resolve_field_access): New variable is_static. Local field must
19135         be DECLs. is_static computed on field DECLs only. Append code in
19136         where_found to the field access if necessary. Use QUAL_DECL_TYPE
19137         to initialize field_type.
19138         (resolve_qualified_expression_name): New local variable,
19139         previous_call_static and is_static. Handle primaries with function
19140         calls, casts, array references and `this'. `super' now handled as
19141         `(super_class)this'. Use is_static to clarify boolean expressions.
19142         Added code to handle case where a proper handle is required to
19143         access a field. Use QUAL_DECL_TYPE where applicable.
19144         (maybe_access_field): New function.
19145         (patch_method_invocation_stmt): New arguments primary, where,
19146         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19147         deleted. Use `where' as a type to search from if specified. Check
19148         for static method reference where forbidden. Append primary or
19149         current_this to the argument list if not calling constructor nor
19150         static methods.
19151         (check_for_static_method_reference): New function.
19152         (patch_invoke): Layout the class on which new is done if
19153         necessary.
19154         (lookup_method_invoke): Changed format to report errors on
19155         methods.
19156         (qualify_ambiguous_name): New local variable this_found. Now
19157         handle things from primaries. Method call are considered
19158         expression names.
19159         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19160         changed into NULLs.
19161         (not_initialized_as_it_should_p): Comply with the new DECL_P.
19162         (java_complete_tree): New case fo RETURN_EXPR. Process function
19163         call arguments in separate function.
19164         (complete_function_arguments): New function.
19165         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19166         anymore.
19167         (patch_assignment): Take the return function slot into account as
19168         a RHS. Distinguish assignment from a return.
19169         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19170         when checking methods in interfaces.
19171         (resolve_type_during_patch): NULL argument to unresolve_type_p
19172         instead of NULL_TREE.
19173         (patch_newarray): Fixed typo in comment.
19174         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19175         (build_return, patch_return): New functions.
19176         * typeck.c (lookup_java_constructor): Fixed typo in comment.
19177
19178 1998-07-21  Per Bothner  <bothner@cygnus.com>
19179
19180         * constants.c (find_name_and_type_constant, find_fieldref_index,
19181         find_methodref_index):  New methods.
19182         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
19183         just return given method.  Also, rename to build_known_method_ref.
19184         (expand_invoke):  Rename call to build_invoke_non_interface.
19185         * java-tree.h, parse.h:  Update prototype.
19186         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
19187         (such as expand_expr_stmt) if flag_emit_class_files.
19188         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19189         STACK_TARGET, IGNORE_TARGET):  New macros.
19190         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
19191         (generate_bytecode_insn):  New function to generate method's bytecode.
19192         (generate_classfile):  Node generate Code attribute for a method.
19193         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19194         push_long_const, field_op, adjust_typed_op, maybe_wide):
19195         New functions used by generate_bytecode_insn.
19196
19197         * typeck.c (signature_include_return):  Remove variable.
19198         (push_java_argument_signature, build_java_argument_signature):  New.
19199         (build_java_signature):  Use push_java_argument_signature.
19200         * parse.y:  Use build_java_argument_signature instead of fiddling
19201         with signature_include_return.
19202
19203 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19204
19205         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19206         types.
19207
19208         * Makefile.in (all.indirect): Added gjavah$(exeext).
19209         (gjavah$(exeext)): Added $(exeext).
19210         (clean): Likewise.
19211
19212 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19213
19214         * class.c (layout_class): Call to java_layout_parsed_class replace
19215         by safe_layout_class.
19216         * expr.c (build_java_array_length_access): Removed static storage
19217         class in the function definition.
19218         (build_java_arraynull_check): Likewise.
19219         Also fixed typos in two comments.
19220         * lex.c (java_init_lex): Initialize static global kw_length.
19221         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19222         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19223         java_lex_error.
19224         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19225         * parse.h (resolve_no_layout): New static function declaration.
19226         (get_identifier_in_static): Declaration removed.
19227         (java_layout_parsed_class): Function name declaration changed to
19228         safe_layout_class.
19229         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19230         not_initialized_as_it_should_p, build_this): New static function
19231         declarations.
19232         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19233         binary_numeric_promotion, stabilize_reference,
19234         build_decl_no_layout, build_java_arrayaccess): Extern function
19235         declarations moved into their own section.
19236         (build_newarray, build_anewarray, build_java_array_length_access,
19237         build_java_arraynull_check): New extern function declarations.
19238         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19239         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19240         fake tree codes.
19241         (CALL_CONSTRUCTOR_P): New macro.
19242         * parse.y (kw_length): New static global tree node.
19243         (return_statement): Tagged <node>.
19244         (RETURN_TK): Tagged <operator>.
19245         (variable_declarator_id:): Build variable declaration with an
19246         empty initialization value if a syntax error was found in the
19247         initialization part of the variable declaration.
19248         (statement_without_trailing_substatement:): return_statement: now
19249         uses the default rule.
19250         (return_statement:): Temporarily fixed to return NULL_TREE.
19251         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19252         (class_instance_creation_expression:): Class creation rules now
19253         call build_method_invocation upon reduction.
19254         (array_creation_expression:): Rules call build_newarray_node upon
19255         reduction.
19256         (dim_exprs:): Build a list of dimension expressions.
19257         (dim_expr:): Store location of the OSB_TK in the dimension
19258         expression node.
19259         (method_invocation:): Added a new error rule.
19260         (build_unresolved_array_type): WFL argument may also be an array
19261         on a primitive type. Name of the argument changed to reflect this.
19262         (method_declarator): Insert argument type at the beginning of the
19263         argument type list and later reverse the list.
19264         (unresolved_type_p): Argument 'returned' may be optionally
19265         NULL_TREE.
19266         (java_layout_class_from_source): Function renamed
19267         safe_layout_class.
19268         (resolve_and_layout): Now call resolve_no_layout and
19269         safe_layout_class.
19270         (resolve_no_layout): New function.
19271         (purify_type_name): New function.
19272         (complete_class_report_errors): Call purify_type_name during error
19273         report on a type not found.
19274         (process_imports): error_found local variable doesn't need to be
19275         initialized to zero.
19276         (declare_local_variables): New local type_wfl. Fixed typo in error
19277         message. type_wfl assigned to unresolved type and used to register
19278         incomplete type. Build a WFL around the variable initialization
19279         statement so that debug info can be generated on it.
19280         (source_start_java_method): Reverse argument list after they've
19281         been processed.
19282         (current_this): New static global variable.
19283         (java_complete_expand_methods): Set current_this when appropriate.
19284         (resolve_expression_name): Build correct static and non static
19285         field access bearing a simple name.
19286         (resolve_field_access): Resolve the length field of arrays. Handle
19287         f.m() cases.
19288         (patch_method_invocation_stmt): Set the type of the method
19289         invocation to error_mark_node. This value is later overridden by a
19290         valid type, if any. Don't handle qualified constructor invocation
19291         as qualified method invocation. Call lookup_method_invoke with its
19292         new flag. It's no longer necessary to access the selected method
19293         as the value of a tree list. Handle constructor invocation.
19294         (patch_invoke): Reverse argument list when invoking non interface
19295         methods. Insert call to new as the first argument of the
19296         constructor.
19297         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19298         defined within a final class. Return INVOKE_STATIC if the invoked
19299         method is a constructor.
19300         (lookup_method_invoke): New lc argument is a flag to indicate a
19301         constructor lookup. Now handle constructor lookup. Choose the most
19302         specific method in case several were matching the invocation
19303         requirements. Return a method decl instead of a tree list featuring
19304         one single method decl element.
19305         (refine_accessible_methods_list): New lc flag argument to
19306         indicate that a constructor is being looked up.
19307         (not_initialized_as_it_should_p): New function.
19308         (java_complete_tree): Now process fake tree codes
19309         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19310         save_expr on resolved function call arguments. Case on
19311         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19312         (patch_assignment): LHS can be a field access expression. When
19313         dealing with reference, lhs_type is the promoted type of the
19314         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19315         applicable.
19316         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19317         (patch_binop): Use not_initialized_as_it_should_p where
19318         applicable.
19319         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19320         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19321         where applicable.
19322         (resolve_type_during_patch): New function.
19323         (patch_cast): Call resolve_type_during_patch to resolve type and
19324         report error accordingly.
19325         (patch_array_ref): Use not_initialized_as_it_should_p where
19326         applicable. Array base expression is saved before being
19327         used. Promote the type of an array elements if it contains non
19328         builtin types.
19329         (build_newarray_node, patch_newarray, build_this): New functions.
19330
19331 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19332
19333         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19334         increment it in `for' statement.
19335         (print_field_info): If number is inf or nan, don't print it.
19336         (print_method_info): If method name is `delete', just ignore it.
19337         (print_c_decl): Special-case jstringArray.
19338
19339         * gjavah.c (help): New function.
19340         (no_argument): New function.
19341         (usage): Changed text.
19342         (main): Rewrote argument handling.  Now handles -v, --help,
19343         --version.
19344         (version): New function.
19345         (found_error): New global.
19346         (main): Return found_error.
19347         (generate_access): Set found_error.
19348         (print_c_decl): Likewise.
19349
19350 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19351
19352         * gjavah.c (print_c_decl): Don't print "," when examining field.
19353         Skip type name when looking at "[L" types.
19354         (process_file): Now static.
19355         (generate_access): Now returns int.
19356         (last_access_generated): New global.
19357         (process_file): Clear last_access_generated; make multiple passes
19358         over the class.
19359         (print_field_info): Just return if generate_access returns true.
19360         (print_method_info): Likewise.  Also, allow <init> functions to
19361         pass through.
19362         (print_c_decl): Added is_init argument.  Print constructors
19363         properly.
19364         (print_cxx_classname): Use UTF8_GET to extract characters from
19365         string.
19366         (print_base_classname): New function.
19367         (print_class_decls): New function.
19368         (process_file): Use it.
19369         (utf8_cmp): New function.
19370
19371 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19372
19373         * lang-options.h: Format changed to match changes in gcc/toplev.c
19374         to implement a --help option.
19375
19376 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19377
19378         * decl.c (init_decl_processing): Revert change to dtable_type.
19379
19380 1998-07-09  Per Bothner  <bothner@cygnus.com>
19381
19382         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19383
19384 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19385
19386         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19387
19388         * lang.c (lang_init): Default flag_exceptions to 1, without
19389         checking to see if it's 2 first.
19390
19391 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19392
19393         * constants.c: Include "system.h".
19394         * decl.c: Likewise.
19395         * lang.c (flag_new_exceptions): Get via extern now.
19396         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19397
19398 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19399
19400         * lex.c (java_lex): Return 0 when we see an invalid character in
19401         the input.
19402
19403         * lex.c (java_read_char): Specify extra argument when calling
19404         java_lex_error.
19405         (java_read_unicode, java_parse_end_comment,
19406         java_parse_escape_sequence): Likewise,
19407         (java_lex): Specify extra argument when calling
19408         java_lex_error. Test that IDs are beginning with a legal character
19409         for IDs. Handle invalid characters with an error message and a
19410         call to java_lex_error.
19411         (java_lex_error): Adjust column position by new argument
19412         `forward'. Issue an error even if in the middle of reporting an
19413         other error.
19414
19415 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19416
19417         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19418         we don't explicitly put a null pointer when we're copying it.
19419
19420 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19421
19422         * gjavah.c (print_cxx_classname): New function.
19423         (super_class_name): Likewise.
19424         (print_super_fields): Removed.
19425         (in_super): Removed.
19426         (print_field_info): Never generate #defines.
19427         (print_c_decl): Changed generated types to match JNI.  No longer
19428         print class name before method name.
19429         (print_method_info): Print "static" before static methods.
19430         Print "virtual" before non-final methods.
19431         (usage): Use exit(1), not exit(-1).
19432         (main): Likewise.
19433         (print_field_info): Use %.17g to print a double.
19434         (last_access): New globals.
19435         (process_file): Initialize last_access.
19436         (usage): Now static.
19437         (ACC_VISIBILITY): New define.
19438         (generate_access): New function.
19439         (print_field_info): Call it.
19440         (print_method_info): Likewise.  Also, generate information for all
19441         methods, not just native methods.  Return void.
19442         (print_c_decl): Return void.
19443         (print_field_info): Return void.
19444
19445 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19446
19447         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19448         processing the jc1 grammar file. Prefix bison functions and
19449         variables with java_.
19450         (parse.c): Dependencies on parse.h and lex.h
19451         * expr.c (build_java_arrayaccess): Function now global.
19452         * java-tree.h: Comment reorganized to carry on previous
19453         classification effort.
19454         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19455         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19456         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19457         java_parse (new prefix java_ generated by bison).
19458         (java_layout_parsed_class, java_register_parsed_class): Function
19459         call removed.
19460         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19461         * lex.c (static tree wfl_op): Variable deleted.
19462         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19463         ctxp fields to NULL_TREE.
19464         (java_lex): No longer create WFL for operators. Filename caching
19465         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19466         created as STRING_CST and later expanded. Removed extra argument
19467         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19468         and SUPER.
19469         (build_wfl_node): Removed code in comments.
19470         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19471         store token and location data in the current bison token.
19472         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19473         static/extern function declaration at the beginning of the file.
19474         (struct qualification): Data structure definition deleted.
19475         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19476         (qualify_ambiguous_name): Function declaration modified. Function
19477         now returns nothing.
19478         (build_array_ref, patch_array_ref, make_qualified_name,
19479         resolve_qualified_expression_name, maybe_generate_clinit,
19480         resolve_field_access): New static function declarations.
19481         (build_java_arrayaccess): New extern function declaration.
19482         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19483         (CALL_EXPR_PRIMARY): Macro deleted.
19484         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19485         (struct parser_ctxt): Field initialized_final
19486         removed. non_static_initialized, static_initialized: New fields.
19487         * parse.y (static tree kw_super, static tree kw_this): New global
19488         static.
19489         (%union): tree wfl field of operator member replaced by int
19490         location. WFLs are non longer created for operators.
19491         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19492         (qualified_name:): Now calls make_qualified_name to build the
19493         identifier.
19494         (type_declaration:): Consider generating <clinit> when class
19495         parsing completed.
19496         (variable_declarator:): Directly build an assignment node when the
19497         variable is initialized when declared.
19498         (this_or_super:): Build a WFL and set current location when THIS
19499         or SUPER are parsed.
19500         (expression_statement:): Wrap statement around a WFL.
19501         (primary_no_new_array:): Fixed typo. Changed value returned by
19502         THIS_TK because of its new type (temporary).
19503         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19504         (field_access:): Build qualified name with SUPER.
19505         (method_invocation:): Fixed returned value because of SUPER's new
19506         type.
19507         (array_access:): Use OSB_TK location information.
19508         (post_increment_expression:, post_decrement_expression:,
19509         unary_expression:, pre_increment_expression:,
19510         pre_decrement_expression:, unary_expression_not_plus_minus:,
19511         cast_expression:, multiplicative_expression:,
19512         additive_expression:, shift_expression:, relational_expression:,
19513         equality_expression:, and_expression:, exclusive_or_expression:,
19514         inclusive_or_expression:, conditional_and_expression:,
19515         conditional_or_expression:, assignment:): Use new location/token
19516         information available on operators.
19517         (create_class): Set super_decl_type to NULL_TREE when processing
19518         java.lang.Object.
19519         (register_fields): Field initialization is now a MODIFY_EXPR
19520         node. Chain initialization code to the matching lists (according
19521         to the field declaration modifiers).
19522         (maybe_generate_clinit): New function.
19523         (method_header): Don't set method's DECL_NAME to a WFL when adding
19524         methods to java.lang.Object.
19525         (resolve_and_layout): Now can return NULL_TREE if the type
19526         resolution fails. Otherwise, return the class DECL instead of its
19527         TYPE.
19528         (check_method_redefinition): Don't patch method DECL_NAME if it
19529         belongs to java.lang.Object.
19530         (process_imports): Simply assign error_found to the value returned
19531         by check_pkg_class_access.
19532         (declare_local_variables): Don't use their init statements (if
19533         any) when parsing error were previously found. Reuse MODIFY_EXPR
19534         build during parsing as an init statement.
19535         (java_method_add_stmt): Now return the current method body.
19536         (java_layout_parsed_class, java_register_parsed_class): Functions
19537         removed.
19538         (java_complete_expand_methods): Initialize the constant pool on a
19539         per class basis. Layout the classes before expanding their method
19540         bodies. Don't try expand artificial constructor code if error were
19541         found. Make the classes data and register them if no error were
19542         found.
19543         (java_complete_expand_method): Retrieve an artificial constructor
19544         argument list before entering its body. Assign the top block to
19545         the artificial constructor function body and set types of declared
19546         blocks and compound statements to void. Walk method body if not an
19547         artificial constructor.
19548         (make_qualified_name, cut_identifier_in_qualified): New functions.
19549         (resolve_expression_name): Fixed comments. Save/restore the
19550         current class CLASS_LOADED_P flag value. Build non qualified
19551         static field access and handle qualified expression names.
19552         (resolve_field_access, resolve_qualified_expression_name): New
19553         functions.
19554         (patch_method_invocation_stmt): Use the new expression resolution
19555         scheme, calling resolve_field_access when the function call is
19556         resolved as an expression.
19557         (qualify_ambiguous_name): Function rewritten to work on qualified
19558         expression produced by make_qualified_name.
19559         (java_complete_tree): Promote type when function's argument are
19560         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19561         the assignment to discover further errors if RHS is a expression
19562         name that fails to evaluate. Declare LHS initialized even though
19563         the assignment failed. Don't use the location variable and removed
19564         extra argument in patch function calls. Now handle the ARRAY_REF
19565         case and build internal string representation when STRING_CSTs are
19566         walked.
19567         (build_method_invocation): Don't wrap function call around a WFL.
19568         (build_assignment): Likewise. Use the operator location
19569         information.
19570         (patch_assignment): Handle array access LHSs. Handle error
19571         provenance, resulting in a better error report.
19572         (build_binop): Use op_location from operator as binop location
19573         information.
19574         (build_unaryop, build_incdec, build_cast): Likewise.
19575         (patch_binop): Extract location information from the node. Fixed
19576         typo in error message.
19577         (patch_unary_op): Extract location information from the node.
19578         (build_array_ref, patch_array_ref): New functions.
19579
19580 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19581
19582         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19583         match _Jv_IsInstanceOf.
19584         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19585         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19586
19587 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19588
19589         * decl.c (init_decl_processing): Functions are now named
19590         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19591
19592 1998-06-29  Per Bothner  <bothner@cygnus.com>
19593
19594         * java-tree.h (load_class):  Add prototype.
19595         * class.c (is_compiled_class):  Add missing arg to load_class.
19596         * expr.c (expand_java_NEW):  Call load_class.
19597         * parse.y (process_import):  Removed bogus use of void return value.
19598
19599 1998-06-25  Per Bothner  <bothner@cygnus.com>
19600
19601         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19602         Function name is "_Jv_Throw" instead of "soft_athrow".
19603         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19604         Function name is "_Jv_AllocObject" instead of "soft_new".
19605         Takes an extra parameter (object size).
19606         * expr.c:  Update calls.
19607
19608 1998-06-24  Per Bothner  <bothner@cygnus.com>
19609
19610         * lex.c (java_get_line_col):  Handle end-of-file.
19611         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19612
19613 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19614
19615         * lang.c (lang_init): Make -fexceptions the default.
19616         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19617         exception handling is not turned on.
19618
19619 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19620
19621         * lang.c (flag_new_exceptions): Make this this default.
19622         * decl.c (end_java_method): Call emit_handlers.
19623         * except.c (method_init_exceptions): Set language code and version.
19624         (expand_start_java_handler): Enable exception, and call
19625         expand_eh_region_start.
19626         (expand_end_java_handler): Enable exception, and set up catch blocks.
19627         (emit_handlers): New routine to generate the saved handlers.
19628         * java-except.h (emit_handlers): Add prototype.
19629
19630 1998-06-12  Per Bothner  <bothner@cygnus.com>
19631
19632         We used to have three different representations of the constant pool:
19633         the CPool structure, the tree_constant_pool, and the constructures
19634         used to build the Class object (which may need class and string
19635         constants) in compiled code.  None were appropriate for compiling
19636         to .class files, so I did a major overhaul.
19637
19638         First, the tree_constant_pool array was removed.  Things were
19639         modified to the CPool structure in the JCF could be used.
19640         Second, a "capacity" field was added to the CPool, and functions
19641         written to search for a matching constant, adding one if not found.
19642         The code that generated the Class object was changed to use a CPool.
19643         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19644         the static Class object are now only in build_constants_constructor.
19645         Finally, I wrote code which can generate a .class file (including its
19646         constant pool) from the RECORD_TYPE of a class.  This is a big step
19647         on the way to compiling Java source into .class files.
19648
19649         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19650         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19651
19652         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19653         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19654         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19655         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19656         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19657         (lang_type):  Removed constant_pool field.
19658         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19659         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19660         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19661         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19662
19663         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19664         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19665         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19666         (set_constant_entry, find_constant1, find_constant2,
19667         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19668         find_utf8_constant, find_class_or_string_constant):  New functions.
19669
19670         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19671         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19672         (give_name_to_class, get_class_constant):  Likewise.
19673         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19674         (get_name_and_type_constant, get_ref_constant):  Removed.
19675         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19676         * parse.y:  Don't save/restore tree_constant_pool.
19677         * verify.c (verify_jvm_instructions):  Update for new approach.
19678         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19679
19680         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19681         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19682         (lang_f_options):  Added "emit-class-file(s)".
19683
19684         * expr.c (build_java_arrayaccess):  Generate more efficient array
19685         bounds checking, by using unsigned compare.
19686
19687         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19688
19689 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19690
19691         * parse.h: New comment on the handling of unresolved type
19692         identifiers. JDEPs are now part of the jdep_code enum.
19693         (typedef struct jdep): Now use enum jdep_code or int, depending on
19694         availability. Both are narrowed down to an 8 bits bitfield.
19695         (CALL_EXPR_PRIMARY): Fixed comment.
19696
19697 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19698
19699         * Make-lang.in (java): Added gjavac and jvgenmain.
19700         (java.start.encap): Depend on gjavac.
19701         (java.rest.encap): Depend on jvgenmain.
19702
19703         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19704         (JAVA_CROSS_NAME): Likewise.
19705         (java.all.build): Depend on jvgenmain and gjavac.
19706         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19707         (jvgenmain$(exeext)): New target.
19708         (java.install-common): Wrote.
19709         * config-lang.in (compilers, stagestuff): Added gjavac and
19710         jvgenmain.
19711
19712 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19713
19714         * lang.c (lang_decode_option): New argc/argv interface.
19715
19716 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19717
19718         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19719         * decl.c (build_decl_no_layout): New function.
19720         * expr.c (java_lang_expand_expr): Layout declarations found in
19721         blocks before they're pushed.
19722         * jcf-parse.c (load_class): Save current line when parsing class
19723         file.
19724         (parse_source_file): Register class before expanding their
19725         methods.
19726         * lang.c (put_decl_node): Produce `null' when `void *' is
19727         processed.
19728         * lex.c (static tree wfl_op): New static global, for error report
19729         on casts.
19730         (java_init_lex): wfl_operator and wfl_op initialized
19731         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19732         parsed.
19733         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19734         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19735         build_unresolved_array_type): New static function definitions.
19736         (build_decl_no_layout): New extern function declared.
19737         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19738         faulty modifier exists.
19739         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19740         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19741         (UNARY_PLUS_EXPR): New fake operator.
19742         (struct parser_ctxt): New field osb_number.
19743         * parse.y (static tree wfl_operator): New static WFL for operator
19744         bound error messages.
19745         (DECR_TK, INCR_TK): Moved.
19746         (OP_TK): Tagged <operator>.
19747         (array_type:): Now call build_unresolved_array_type.
19748         (dim_expr:): Count the number of '[' seen.
19749         (post_increment_expression, post_decrement_expression,
19750         pre_increment_expression, pre_decrement_expression,
19751         unary_expression_not_plus_minus, unary_expression:): Actions are
19752         now building the corresponding unary expressions.
19753         (cast_expression:): Actions are now building cast expressions.
19754         (build_unresolved_array_type): New function.
19755         (create_interface): Reset the number of declared interfaces.
19756         (create_class): Likewise.
19757         (method_header): Methods declared within the scope of an interface
19758         are now implicitly set public and abstract.
19759         (java_complete_class): Variable's and parameter's type are patched
19760         with a promoted type.
19761         (declare_local_variables): Resolved non builtin types are promoted
19762         before being used to build a variable decl. Removed type patch
19763         posted on variable initialization statement.
19764         (source_start_java_method): Use build_decl_no_layout to build the
19765         decl of a parameter of incomplete type.
19766         (java_register_parsed_class): Process interfaces too. Call
19767         rest_of_decl_compilation on each processed class declarations.
19768         (java_complete_expand_methods): Don't attempt to expand things in
19769         interfaces.
19770         (java_complete_tree): Process CONVERT_EXPR, even though it always
19771         has a type. Propagate error_mark_node to node's type too. Promote
19772         method's call argument type and return error_mark_node if
19773         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19774         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19775         handle unary operator nodes.
19776         (build_assignment): Added comment.
19777         (print_int_node): New function.
19778         (patch_assignment): New second argument. New error handling. Use
19779         print_int_node. Handle references. Use can_cast_to_p to issue
19780         different error message according to the context and check upon
19781         the initialization of the RHS.
19782         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19783         (operator_string): Handle more operators.
19784         (patch_binop): No longer use a function static
19785         wfl_operator. Improved error message on shift distance.
19786         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19787         patch_cast): New functions.
19788
19789 1998-06-05  Per Bothner  <bothner@cygnus.com>
19790
19791         * jvspec.c:  New file.
19792         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19793
19794         * java-tree.h (identifier_subst):  Add declaration.
19795
19796 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19797
19798         * jvgenmain.c (main): Generate call to JvRunMain.
19799
19800         * class.c (make_class_data): Push value for "sync_info" field.
19801         * decl.c (init_decl_processing): Push "sync_info" field.
19802
19803 1998-06-03  Per Bothner  <bothner@cygnus.com>
19804
19805         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19806         Java (source) name, not signature.
19807         Set TYPE_ALIGN to (at least) that of element_type.
19808
19809 1998-06-02  Per Bothner  <bothner@cygnus.com>
19810
19811         * class.c:  Moved classname-mangling-rekated code to ...
19812         * mangle.c:  ... this new file.
19813         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19814         * Makefile.in:  Update for above changes.
19815
19816 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19817
19818         * expr.c (truthvalue_conversion): Convert integer and floating
19819         point value to their truth value.
19820         * lex.c (java_lex): Handle the `null' literal.
19821         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19822         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19823         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19824         New macros.
19825
19826         * parse.y: Reorganization/documentation on token declaration.
19827         (binop_lookup[]): New added new tree codes.
19828         (relational_expression): Build corresponding binary operators.
19829         (equality_expression, conditional_and_expression,
19830         conditional_or_expression): Likewise.
19831         (java_complete_class): Fix crash in debug message.
19832         (java_complete_tree): Check initialization of method call
19833         arguments. Further bogus node evaluation to detect more error
19834         during assignments. Handles more binary operators.
19835         (patch_assignment): Use DECL_P.
19836         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19837         code.
19838         (operator_string): Handle more case. Compacted source.
19839         (patch_binop): Changed function comment. Checking for
19840         uninitialized first operand takes the compound assignment into
19841         account and uses DECL_P. Checking for uninitialized second operand
19842         delayed to routine's end. Use macros to issue type bound error
19843         messages and issue messages on both operands if their types are
19844         different. Force fixed type into node. Handle all binary
19845         operators.
19846
19847 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19848
19849         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19850         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19851         build operator node and return tokens.
19852         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19853         * parse.h (java_complete_tree): Changed returned type in prototype.
19854         (build_method_invocation, build_assignment, patch_assignment,
19855         patch_binop): New static function declarations.
19856         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19857         BUILD_EXPR_WFL): New macros.
19858         * parse.y (enum tree_code binop_lookup[]): New static for token to
19859         TREE_CODE lookup.
19860         (%union): Parser union has new sub-structure `operator'.
19861         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19862         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19863         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19864         ASSIGN_ANY_TK): Tokens tagged `operator'.
19865         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19866         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19867         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19868         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19869         (assignment_operator:): Rule tagged `operator'.
19870         (expression_statement:): Re-installed default rule.
19871         (method_invocation:): Sub rules call build_method_invocation.
19872         (postfix_expression:): Don't attempt to resolve name here. Just
19873         return an ID.
19874         (multiplicative_expression:): Sub-rules build corresponding binop
19875         expression node.
19876         (additive_expression:, shift_expression:, and_expression:,
19877         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19878         (assignment:): Sub rule invoke build_assignment.
19879         (assignment_operator:): Default rules on sub rules.
19880         (force_error): Added documentation on this variable.
19881         (declare_local_variables): Build initialization calling
19882         build_assignment.
19883         (expand_start_java_method): Removed unused rtx declaration. Mark
19884         arguments as already initialized.
19885         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19886         (java_complete_expand_methods): Don't process next method if
19887         completion of the previous one triggered errors.
19888         (java_complete_expand_method): Call source_end_java_method if no
19889         error were found during completion.
19890         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19891         locals declaratilon. Handle names found within a class. Return
19892         error_mark_node when things aren't found.
19893         (patch_method_invocation_stmt): Return error_mark_node on failures.
19894         (patch_invoke): Removed unused local. Return the correct node.
19895         (java_complete_tree): Now returns a value. The BLOCK section binds
19896         local identifiers and the type of a BLOCK is now void. Assign the
19897         result of operand completion on COMPOUND_EXPR. Assign the
19898         encapsulated node of a WFL to the result of its completion, except
19899         when the node is an identifier. Now handle MODIFY_EXPR and several
19900         binary operators. Return error_mark_node on errors.
19901         (build_method_invocation, build_assignment, patch_assignment,
19902         build_binop, operator_string, patch_binop): New functions.
19903         * typeck.c (binary_numeric_promotion): New function.
19904
19905 1998-05-21  Per Bothner  <bothner@cygnus.com>
19906
19907         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19908         Replace most uses of ident_subst by identifier_subst.
19909
19910         * class.c (push_class_static_dummy_field):  Removed function.
19911         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19912         instead of looking got "class" static field.  Create that decl here.
19913         (class_identifier_node):  Removed;  no longer needed.
19914         (init_class_processing):  Don't init class_identifier_node.
19915         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19916         Do nreverse 0 times (instead of twice) for Object and Class.
19917         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19918
19919 1998-05-20  Per Bothner  <bothner@cygnus.com>
19920
19921         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19922         while initializing linenumber_count and linenumber_table.
19923         Do it before init_function_start (which calls emit_line_note).
19924         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19925
19926 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19927
19928         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19929         then mangle number as _N_.
19930
19931         * class.c (mangle_class_field): New function.
19932         (build_class_ref): Set assembler name of class reference using
19933         mangle_class_field.
19934         (push_class_static_dummy_field): Likewise.
19935
19936 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19937
19938         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19939         of assigning to TREE_CODE.  The latter method exploits a feature
19940         of GCC that is not ANSI compliant.
19941
19942 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19943
19944         * decl.c (pushdecl_force_head): New function.
19945         (pushlevel): Removed conditional printf.
19946         (complete_start_java_method): Don't enter local variable scope if
19947         function is compiled from source code.
19948         * expr.c: parse.h now included
19949         (java_lang_expand_expr): New function.
19950         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19951         printf. Terminate buffer when doing directories.
19952         * jcf-parse.c (parse_source_file): Call lang_init_source before
19953         parsing and before code generation.
19954         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19955         use printf if the macro is defined.
19956         * lang.c (lang_init): Install lang_expand_expr hook on
19957         java_lang_expand_expr.
19958         (java_dummy_print): New function.
19959         (lang_init_source): New function.
19960         * lex.c (java_lex): Remember location of an opening brace at the
19961         second nesting level.
19962         (java_is_eol): Unget character seen after a CR if it is EOF.
19963         * parse.h: Now includes lex.h
19964         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19965         printf if the macro is defined.
19966         (expand_start_java_method, build_expr_block, enter_block,
19967         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19968         New static function declarations.
19969         (pushdecl_force_head): New extern function declaration.
19970         (INCOMPLETE_TYPE_P): New macro.
19971         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19972         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19973         BLOCK_EXPR_ORIGIN): New macros.
19974         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19975         DECL_SOURCE_LINE_LAST): New macros.
19976         (struct parser_ctxt): Removed field current_method_decl, redundant
19977         with the field current_function_decl. Added fields
19978         first_ccb_indent1 and pending_block.
19979         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19980         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19981         tagged <node>
19982         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19983         (compilation_unit:): Cosmetic on sub rule.
19984         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19985         (variable_initializer:): Installed default rule on expression:.
19986         (method_declaration:): method_header: starts a new
19987         method. method_body: installs the function body, absorbs blocks
19988         emitted for temporary variable scopings, pops function's body block
19989         and merges function's last statement lineno in DECL_SOURCE_LINE.
19990         (method_body:): Installed default rules.
19991         (block:): Call enter_block when an opening brace is seen.  Absorb
19992         scoping blocks and call exit_block when a closing brace is seen.
19993         (block_statement:): Cosmetic changes.
19994         (method_invocation:): Create WFL around CALL_EXPR node.
19995         (patch_stage): Added comment around definition.
19996         (method_header): Try to use first_ccb_indent1 as the first line of
19997         the method, so BP debug info are emitted at the first opening
19998         brace of the function. If the function has no body, use the
19999         location of the function's name. Override currently defined method
20000         name with the matching WFL so we can point redefinition errors
20001         using the location where the function's name was declared.
20002         (check_abstract_method_header): Interprets DECL_NAME as an
20003         identifier or as a WFL, accordingly.
20004         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20005         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20006         location and name information out of it and reinstall DECL_NAME to
20007         its original identifier node value.
20008         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20009         function's source code).
20010         (read_import_dir): Test the value returned by find_class and issue
20011         a fatal accordingly.
20012         (declare_local_variables): Push a new block for the scope of the
20013         new variable(s) if code has been already generated at that nesting
20014         level. Pinpoint redefinition errors using the variable id
20015         WFLs. Generate initialization code if necessary. If the variable
20016         type is incomplete, register a patch on its decl.
20017         (source_start_java_method): Rewritten. Define a new block for the
20018         function's parameters. Build parameter decl out of function's
20019         arguments and register them for a patch if their types are
20020         incomplete.
20021         (expand_start_java_method): Includes the part of
20022         source_start_java_method that was pushing the parameter decls and
20023         completing the method start code.
20024         (source_end_java_method): Removed call the expand_end_bindings and
20025         poplevel (already taken care of). Reinstall function's arguments
20026         and get function's last line of code before calling
20027         expand_function_end.
20028         (java_method_add_stmt): New comment before the function's
20029         code. Complement the second operand of the current COMPOUND_EXPR
20030         if necessary.
20031         (java_complete_expand_methods): Don't generate debug info on line
20032         zero when expanding a generated constructor.
20033         (java_complete_expand_method): Set start and end line numbers for
20034         a artificially generated constructor to one and manually call
20035         enter_block and exit_block when defining it. For all methods:
20036         expand function's start calling the new expand_start_java_method
20037         and invoke java_complete_tree on the effective method's body, if
20038         any.
20039         (resolve_expression_name): Now use lookup_name_in_blocks to search
20040         local variable decls and print out an error when variables are
20041         undefined.
20042         (patch_method_invocation_stmt): Inserted comment before the
20043         function's code.
20044         (lookup_method_invoke): Chain method's arguments using chainon
20045         with the current arg list as a second argument. Inserted missing
20046         IDENTIFIER_POINTER when reporting an error on methods not found.
20047         (refine_accessible_methods_list): Don't retain constructors.
20048         (patch_arguments): Function removed.
20049         (java_complete_tree): Inserted comment before the function's
20050         code. New case for BLOCKs. Moved the WFL case a bit
20051         further. Complete function's arguments.
20052         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20053         maybe_absorb_scoping_blocks): New functions.
20054
20055 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20056
20057         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20058         previously set.
20059         * jcf-parse.c (parse_source_file, java_error_count): New forward
20060         and extern declarations.
20061         (java_parse_abort_on_error): Macro moved.
20062         (jcf_parse_source): fatal called if fopen fails. Now calls
20063         parse_source_file.
20064         (parse_source_file): New parse_only parameter. Reflects the
20065         elimination of the second pass.
20066         (yyparse): parse_source_file called with argument set to 0.
20067         * jcf.h (JCF_ZERO): Sets java_source to zero.
20068         * lex.c (java_init_lex): pass argument is gone. Function modified
20069         to be called once during the analysis of a file.
20070         (java_unget_unicode): Fixed typo in fatal message.
20071         (java_get_line_col): Likewise.
20072         (java_lval): Likewise. String literals no longer built during
20073         second pass.
20074         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20075         account.
20076         * parse.h (MODIFIER_WFL): New macro.
20077         (parse_check_super, parser_check_super_interface): Now return int.
20078         (parser_chain_incomplete_item, not_builtin_p,
20079         complete_method_decl): Declarations removed.
20080         (build_method_invocation_stmt, build_invoke): Renamed using the
20081         `patch' instead of `build'
20082         (register-incomplete_type, obtain_incomplete_type,
20083         java_complete_tree, java_complete_expand_method,
20084         unresolved_type_p, create_jdep_list): New function declarations.
20085         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20086         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20087         (jdep): New typedef on new struct _jdep.
20088         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20089         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20090         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20091         JDEP_RESOLVED_P): New macros.
20092         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20093         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20094         JDEP_VARIABLE): New enum values and jdep kinds.
20095         (jdeplist): New typedef on struct _jdeplist.
20096         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20097         macros.
20098         (CALL_EXPR_PRIMARY): New macro.
20099         (struct parser_ctxt): Fields java_pass, current_method_decl,
20100         method_decl_list deleted. New field jdeplist.
20101         (INCOMPLETE_P): Macro deleted.
20102         * parse.y (single_type_import_declaration:): Removed pass switch.
20103         (type_import_on_demand_declaration): Likewise.
20104         (field_declaration:): Removed pass switch on all sub rules.
20105         (class_declaration:): Call the complete_class_decl removed on
20106         class_body rules.
20107         (method_declaration:): Removed second pass switch. No longer chain
20108         methods decl when method_header reduced.
20109         (method_header:): Sub rules no longer depend on pass switch.
20110         (method_declarator:): Likewise.
20111         (method_body:): Likewise.
20112         (abstract_method_declaration:): Likewise.
20113         (block_statement:): Likewise.
20114         (local_variable_declaration:): Likewise.
20115         (argument_list:): Likewise.
20116         (method_invocation:): Likewise. Call to build_method_invocation_stmt
20117         removed. Partial CLASS_EXPR tree node built instead.
20118         (postfix_expression:): Removed pass switch on all sub rules.
20119         (java_pop_parser_context): Free classd_list content.
20120         (yyerror): Call obstrack_grow0 to finalize error message.
20121         (check_class_interface_creation): Comment modified to reflect new
20122         returned value meaning. Removed second pass switch. Return 1 if an
20123         error was found, 0 otherwise. Adjust pointer on filename if a
20124         leading path separator was found.
20125         (maybe_create_class_interface_decl): Removed first pass switch
20126         when linking the class decl to the class_list. Install a new
20127         jdep_list for the class.
20128         (add_superinterfaces): List of unresolved interfaces is
20129         gone. Unresolved interfaces are directly added to the current
20130         dependencies list.
20131         (create_interface): Second pass shortcut removed.
20132         ctpx->modifier_ctx access through MODIFIER_WFL.
20133         (create_class): Second pass shortcut removed. Call to
20134         register_incomplete_type replaces the call to
20135         parser_chain_incomplete_item.
20136         (complete_class_decl): Function removed.
20137         (duplicate_declaration_error): New way of retrieving redeclared
20138         item type.
20139         (register_fields): Call to lookup_modifier_cl replaced by
20140         MODIFIER_WFL. New way of handling unresolved type, using
20141         unresolved_type_p and obtain_incomplete_type.
20142         register_incomplete_type replaces call to parser_chain_incomplete_item.
20143         (patch_stage): New static global variable.
20144         (method_header): New way of handling unresolved type, using
20145         unresolved_type_p and obtain_incomplete_type. patch_stage used to
20146         indicates that the method decl needs to be patched.
20147         (check_abstract_method_header): Call to lookup_modifier_cl
20148         replaced by MODIFIER_WFL.
20149         (method_declarator): Incomplete argument type are registered
20150         calling register_incomplete_type. Patch on the declared method is
20151         issued in that case.
20152         (unresolved_type_p): New function.
20153         (parser_check_super_interface): New comment to reflect function's
20154         modified returned type (int). Function and has a new argument
20155         this_wfl. Call to parse_error_context uses this_wfl instead of
20156         relying on lookup_cl.
20157         (parser_check_super): Comment reflects function's new returned
20158         type (int). Function returns nonzero value on error.
20159         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20160         register_incomplete_type, jdep_resolve_class): New functions to
20161         handle incomplete types in declarations.
20162         (java_complete_class): Rewritten to work with the new incomplete
20163         type handling scheme.
20164         (complete_class_report_errors): Likewise.
20165         (complete_method_decl): Removed: it jobs is now handled by
20166         java_complete_class.
20167         (do_resolve_class): Class loaded in not already loaded and not
20168         found in Java source code.
20169         (java_check_regular_methods, java_check_abstract_methods): Don't
20170         call complete_method_decl anymore.
20171         (lookup_modifier_cl, not_builtin_p): Functions deleted.
20172         (read_import_dir): Got rid of the pass number dependency.
20173         (declare_local_variables): New handling of unresolved types (patch
20174         issued).
20175         (source_start_java_method): New parameter level. Function called
20176         with level set to 1 when argument types are potentially
20177         unresolved.  Called to complete the job with level set to 2 once
20178         types are complete.
20179         (source_end_java_method): Call to permanent_allocation
20180         removed. Waiting to be replaced by a more suitable obstack
20181         management.
20182         (java_complete_expand_methods, java_complete_expand_method,
20183         java_expand_finals): New functions.
20184         (build_method_invocation_stmt): Renamed
20185         patch_method_invocation_stmt. Extracts function call expression
20186         (wfl) and arguments (args) from CALL_EXPR tree operands.
20187         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20188         call. Patch the function and argument operand of the CALL_EXPR
20189         tree argument.
20190         (patch_argument, java_complete_tree): New functions.
20191
20192 1998-04-20  Per Bothner  <bothner@cygnus.com>
20193
20194         Recover from missing fields and methods (i.e. error instead of fatal).
20195         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
20196         * expr.c (expand_invoke):  Recover from missing method.
20197         (expand_java_field_op):  Recover from missing field.
20198         Inline references to java.lang.{Integer,Char,...}.TYPE.
20199         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20200         * class.c (add_method):  Use get_type_from_signature.
20201         (build_class_ref):  Handle a class that was not found.
20202         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20203         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20204         instead of lookup_field to handle missing fields.
20205
20206         * jcf-parse.c (process_zip_dir):  Set java_source.
20207
20208 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20209
20210         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20211
20212 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20213
20214         * jcf-parse.c (load_class): Don't change input_filename before
20215         calling jcf_parse_source (but still do it before calling
20216         jcf_parse).
20217         (jcf_parse_source): Assign input_filename after having saved the
20218         parser context.
20219         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20220         list. ctxp->modifier_ctx zeroed according to its new
20221         definition. ctxp->filename initialized. Removed
20222         JAVA_MODIFIER_CTX_UNMARK.
20223         (java_unget_unicode): Update the character based column position.
20224         (java_allocate_new_line): ref_count not used anymore. Always free
20225         ctxp->p_line. Initialize c_line->char_col to 0.
20226         (java_get_unicode): Update the character based column position.
20227         (java_lex): Use ctxp->elc to store current position in source
20228         file, at the beginning of the parsed token. Set modifier_ctx entry
20229         corresponding to the parse modifier to a WFL node. Return a WFL
20230         node when an identifier is parsed.
20231         (java_lex_error): Now uses ctxp->elc to store current position in
20232         source.
20233         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20234         * lex.h (build_wfl_node): New function definitions.
20235         (struct java_line): ref_count and next fields are gone. New field
20236         char_col.
20237         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20238         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20239         (JAVA_COLUMN_DELTA): New macro.
20240         (java_lc): New typedef on new struct _java_lc.
20241         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20242         (parse_error_context, parse_warning_context): Changed prototypes.
20243         (java_get_line_col): Added as an available global function.
20244         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20245         (IC_DECL): Replaced by macro IC_TYPE
20246         (DEPEND_WFL): New macro.
20247         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20248         wrong modifier.
20249         (exit_java_complete_class): Removed a commented out statement.
20250         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20251         now an array of tree nodes. Deleted fields line_list and
20252         e_line. New field elc, to replace e_line.
20253         * parse.y (array_type:): Build WFL node.
20254         (qualified_name:): Build a single WFL node out of two. Retain
20255         the location information of the first node in the resulting node.
20256         (package_declaration:): Use package name as a WFL node
20257         (single_type_import_declaration:): Use imported name as a WFL node.
20258         (type_import_on_demand_declaration:): Use root of the imported
20259         packages as a WFL node.
20260         (field_declaration:): Removed unused local variable cl.
20261         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20262         (yyerror): New static elc. Removed static error_line, error_pos.
20263         New local code_from_source. Save ctxp->elc into elc at the first
20264         pass. Call java_get_line_col to get a string of the line where
20265         the error occurred.
20266         (debug_line): Removed static function.
20267         (parse_error_context, parse_warning_context): Parameter cl is now
20268         a WFL node. Use its value to initialize ctxp->elc.
20269         (redefinition_error): Parameter cl is now a WFL node.
20270         (parse_add_interface): New parameter wfl. No longer call
20271         lookup_cl, use wfl instead.
20272         (check_class_interface_creation): Parameter cl is now a WFL node.
20273         (maybe_create_class_interface_decl): Likewise.
20274         (add_superinterfaces): New function.
20275         (create_interface): Removed local cl, node, super_decl,
20276         super_decl_type.  Function now uses id as a WFL node. Better
20277         warning/error report on obsolete or forbidden mix of
20278         modifiers. Now calls add_superinterfaces to register interfaces.
20279         (create_class): Removed local cl, node. Local variable id is used
20280         as a WFL node. Better error report on forbidden modifier
20281         mix. Uses add_superinterfaces to register interfaces.
20282         (find_field): Argument cl is now a WFL node. Now store the WFL
20283         node of a fields that needs to be checked for their
20284         initialization.
20285         (method_header): Local variable node non longer used. Local
20286         variable id replaces cl.
20287         (check_modifiers_consistency): Local variable cl is now a WFL
20288         node.
20289         (method_declarator): Local variable cl replaced by parameter id.
20290         (parser_qualified_name): Now uses parameter name as a WFL node.
20291         (parser_check_super_interface): New parameter wfl, for achieve
20292         greater accuracy during error reports.
20293         (parser_chain_incomplete_item): New parameter named location. Used,
20294         along the decl, to construct the incomplete item node.
20295         (java_complete_class): resolve_class now uses WFL node extracted
20296         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20297         where appropriate.
20298         (complete_method_decl): Unresolved function's argument types are WFL.
20299         (resolve_class): Parameter cl is now a WFL node.
20300         (resolve_and_layout): Likewise.
20301         (do_resolve_class): Likewise. Try first to use cl and then do the
20302         lookup on the decl when calling check_pkg_class_access.
20303         (complete_class_report_errors): Use IC_TYPE in place of
20304         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20305         instead of doing a lookup over the decl.
20306         (java_check_final): Use WFL info from field tree list.
20307         (lookup_cl): Rewritten and returns a statically defined WFL node.
20308         (lookup_modifier_cl): Now uses information from WFL nodes.
20309         (process_imports): Likewise.
20310         (read_import_dir): name and cl arguments replaced by a single WFL
20311         node. Function modified accordingly.
20312         (find_in_imports_on_demand): Now uses WFL node.
20313         (check_pkg_class_access): cl argument is now a WFL node.
20314         (declare_local_variables): Fixed to use WFL nodes.
20315         (resolve_expression_name): Likewise.
20316         (build_method_invocation_stmt): name_combo argument renamed
20317         wfl. Function modified to use WFL nodes.
20318         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20319         (lookup_method_invoke): cl is now a WFL node. Added missing
20320         IDENTIFIER_POINTER to class type decl name.
20321
20322 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20323
20324         * lang.c (init_parse): Now returns char* containing the filename.
20325
20326 1998-04-10  Per Bothner  <bothner@cygnus.com>
20327
20328         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20329
20330         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20331         * class.c (make_class_data):  If flag_assume_compiled, initial class
20332         state is CSTATE_PREPARED; make superclass and interfaces direct
20333         references, rather than constant pool indexes.
20334
20335 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20336
20337         * parser.y: Include flags.h. Removed debug variable pl.
20338         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20339         (block:): Likewise.
20340         (labeled_statement_nsi:): Generate debug info when reducing
20341         expression_statement:.
20342         (check_pkg_class_access): get_access_flags_from_decl invocation
20343         fixed for new CLASS_* flags location.
20344         (source_end_java_method): Save/restore parser context when
20345         entering/leaving this routine. Restore lineno to its right value
20346         before calling expand_end_bindings.
20347         (build_method_invocation_stmt): build_invoke called with the
20348         current line information.
20349         (build_invoke): New argument cl. Wrap the function call around a
20350         wfl node.
20351         (refine_accessible_methods_list): Changed comment, removed
20352         unnecessary code.
20353         * parse.h: Fixed typo in comments.
20354         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20355         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20356         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20357         parser_ccb_indent.
20358         * lex.c (java_lex): Record the last closing curly bracket of a
20359         function.
20360         * jcf-parse.c (jcf_parse_source): Now calls
20361         java_check_methods. Clarified comment, fixed typo.
20362
20363 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20364
20365         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20366         (finish_parse): Expose for non USE_CPPLIB builds.
20367
20368 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20369
20370         * lang.c (lang_print_xnode): New function.
20371
20372 1998-04-03  Per Bothner  <bothner@cygnus.com>
20373
20374         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20375         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20376         used to build a class's dispatch table.
20377         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20378         Set dtable of class object to address of class_dtable_decl.
20379
20380         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20381         be volatile and have side effects - generates better code.
20382
20383         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20384         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20385
20386         * expr.c (expand_invoke):  If class is final, method is
20387         effectively final, so can call it directly.
20388
20389         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20390
20391         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20392
20393 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20394
20395         * parse.y (build_method_invocation_stmt): Removed extra argument
20396         to build_invoke.
20397
20398 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20399
20400         * expr.c (dtable_indent): Now static global.
20401         (expand_invoke): Now call invoke_build_dtable and
20402         build_invokevirtual.
20403         (invoke_build_dtable, build_invokevirtual): New functions.
20404         * jcf-io.c (find_class): Defer issuing a warning by setting
20405         jcf->outofsynch to 1.
20406         * jcf-parse.c (jcf_out_of_synch): New function.
20407         (load_class): Test this_jcf.outofsynch flag and call
20408         jcf_out_of_synch accordingly.
20409         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20410         comment indentation.
20411         * lex.c (java_get_unicode): Fixed code indentation.
20412         (java_lex): Create string literal. Fixed typo. Removed several
20413         premature obstack_free.
20414         * parse.h: New enums for name resolution and invocation mode.
20415         (struct qualification): New data structure.
20416         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20417         (do_resolve_class, build_method_invocation_stmt,
20418         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20419         debug_line, identical_subpath_p, invocation_mode,
20420         refine_accessible_methods_list, build_invoke,
20421         lookup_method_invoke): New functions declared.
20422         (build_invokevirtual, invoke_build_dtable, match_java_method,
20423         build_field_ref, jcf_out_of_synch): New references to external
20424         functions.
20425         (struct parse_ctxt): Removed artificial_constructor field.
20426         * parse.y: (array_type:): Type defined for this rule.
20427         (class_type:): Installed default rule for interface_type:.
20428         (array_type:): Now build Java array type.
20429         (qualified_name:): Now use obstack_grow0.
20430         (method_declaration:): Skip the artificial constructor added to
20431         the list, if any.
20432         (abstract_method_declaration:): Execute the code only during pass 1.
20433         (block:): Installed default rule in block_statements:.
20434         (block_statement:): Add the statement to the method during pass 2.
20435         (statement_expression): Installed default rule for
20436         method_invocation:.
20437         (argument_list:): Added code to build the argument list.
20438         (method_invocation:): Added call to create the method invocation
20439         node.
20440         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20441         (debug_line): New function for debug.
20442         (complete_class_decl): No longer do something during pass 1.
20443         (method_header): Use BUILD_PTR_FROM_NAME.
20444         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20445         obstack_free.
20446         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20447         function's main comment.
20448         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20449         classes.
20450         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20451         (resolve_class): Now works with arrays.
20452         (do_resolve_class, resolve_and_layout): New functions.
20453         (java_check_regular_methods): Reverse method list before and after
20454         having processed it. No longer set ctxp->artificial_constructor.
20455         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20456         accordingly. Fixed typo in issued error message. Now use
20457         obstack_grow0.
20458         (find_in_imports_on_demand): Now use obstack_grow0.
20459         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20460         (source_end_java_method): Call expand_expr_stmt instead of
20461         expand_expr. Calls it before calling expand_function_end.
20462         (java_method_add_stmt): Do nothing if errors were found during
20463         parsing.
20464         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20465         (build_method_invocation_stmt, build_invoke, invocation_mode,
20466         lookup_method_invoke, refine_accessible_methods_list,
20467         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20468         New functions.
20469         * typeck.c (build_java_signature): Properly end method signature
20470         if return type skipped.
20471         (match_java_method): New function.
20472
20473 1998-03-16  Per Bothner  <bothner@cygnus.com>
20474
20475         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20476
20477 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20478
20479         * expr.c (build_invoke_non_interface): New function.
20480         (methods_ident, ncode_ident): Now static globals.
20481         (expand_invoke): Use build_invoke_non_interface.
20482         * java-tree.h (struct lang_decl): New field function_decl_body.
20483         (DECL_FUNCTION_BODY): New macro.
20484         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20485         CLASS_FROM_SOURCE_P.
20486         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20487         before starting pass 2. Call to java_generate_parsed_class replaced
20488         by java_register_parsed_class.
20489         * lex.c: Fixed typo in header. Some line width related formating.
20490         * lex.h: Some line width related formating.
20491         * parse.h (source_end_java_method, resolve_expression_name,
20492         complete_class_decl, maybe_create_class_interface_decl,
20493         check_class_interface_creation): New static function declarations.
20494         (java_layout_parsed_class, java_method_add_stmt): New function
20495         declarations.
20496         (struct parser_ctxt): Field mark_class_generate removed. New
20497         fields class_list and artificial_constructor.
20498         * parse.y: Fixed typo in header.
20499         (class_declaration:): Call complete_class_decl when class body
20500         parsed.
20501         (method_declaration:): Call source_end_java_method in pass 2 when
20502         the method body is defined.
20503         (postfix_expression:): Do expression name resolution on sub-rule
20504         name during pass 2.
20505         (create_class, create_interface): Merged common pieces.
20506         (check_class_interface_creation, maybe_create_class_interface_decl):
20507         New functions.
20508         (complete_class_decl): New function.
20509         (register_fields): Fixed line width related typo.
20510         (method_header): Correctly skip first argument when fixing
20511         argument line. Changed the loop.
20512         (java_check_circular_reference): Now use ctxp->class_list.
20513         (java_complete_class): Removed start/stop marking.
20514         (java_check_regular_methods): Now takes a class decl as an
20515         argument.  Add default constructor if none were encountered.
20516         (java_check_methods): Now use ctxp->class_list. Changed call to
20517         java_check_regular_methods.
20518         (source_start_java_method): Set DECL_ARG_TYPE for each function
20519         arguments.
20520         (source_end_java_method, java_method_add_stmt): New functions.
20521         (java_generate_parsed_class): No longer exists.
20522         (java_layout_parsed_class, java_register_parsed_class): New functions.
20523         (resolve_expression_name): New function.
20524
20525 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20526
20527         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20528         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20529         until pass initializations are done. Call read_import_dir with
20530         pass set to 0.
20531         * parse.h: (lookup_modifier_cl): New function declared.
20532         (INTERFACE_FIELD_MODIFIERS): New macro.
20533         (OBSOLETE_MODIFIER_WARNING): New macro.
20534         * parse.y: (register_fields): Class type and current field name in
20535         local variables. Check modifier(s) if adding field(s) to an interface.
20536         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20537         and report errors using the faulty modifier line context.
20538         (lookup_modifier_cl): New function.
20539         (read_import_dir): Detect and report default import processing
20540         failure.
20541
20542 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20543
20544         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20545         * class.c (is_compiled_class): Return 1 after making sure it
20546         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20547         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20548         * java-tree.h (flag_assume_compiled): Add decl.
20549         * lang.c (lang_f_options): Add the flag.
20550         (flag_assume_compiled): Add decl, default to 0.
20551
20552 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20553
20554         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20555         (is_compiled_class): Likewise.
20556         (layout_class): Likewise.
20557         (layout_class): Detect and lay out classes defined in source code.
20558         (interface_of_p, add_interface_do, may_add_interface): New
20559         function.
20560         (add_interface): Now use add_interface_do.
20561         (add_method_1): New function.
20562         (add_method): Now use add_method_1.
20563         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20564         (complete_start_java_method): New function.
20565         (start_java_mehod): Now call complete_start_java_method.
20566         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20567         (expand_invoke): Likewise and fixed typo.
20568         *gjava.c: (print_super_field): Use new argument to find_class
20569         DO_CLASS_FILE.
20570         (main): Likewise.
20571         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20572         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20573         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20574         IDENTIFIER_NODE.
20575         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20576         (add_method_1, push_class): New prototypes.
20577         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20578         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20579         directory where the class was found.
20580         (find_class): New argument DO_CLASS_FILE. Function find_class
20581         modified accordingly.
20582         *jcf-parse.c: (fix_class_path): New function.
20583         (load_class): Use new VERBOSE argument. load_class now finds and
20584         loads/parses .class/.java files. Save read_state of current_jcf
20585         if necessary.
20586         (java_parser_abort_on_error): New macro.
20587         (jcf_parse_source, parse_source_file): New function.
20588         (jcf_parse): Fixed typo.
20589         (yyparse): Call parse_source_file () only.
20590         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20591         writing the real class name back in the zip directory entry.
20592         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20593         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20594         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20595         (find_class): Prototype fixed.
20596         *lex.c: Added 1998 time stamp.
20597         Removed all static global variables, moved into the parser
20598         context data structure.. Now include unistd.h if SEEK_SET not
20599         defined.
20600         (java_init_lex): Rewritten.
20601         (java_sneak_unicode): Modified current unicode access in current line.
20602         (java_unget_unicode): Likewise.
20603         (java_allocate_new_line): New allocation management.
20604         (java_read_char): Modified access and storage of unget_utf8_value.
20605         New way of processing current unicode.
20606         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20607         (java_get_unicode): Now use the parser context.
20608         (java_lineterminator): Likewise.
20609         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20610         of the reentrant parser implementation. Function now use the
20611         parser context data structure and java_lval. Fixed production of
20612         the float and double constant "out of range" error message. Fixed
20613         obstack use. Return integer value when hitting a modifier. Now
20614         return type for TRUE, FALSE and other predefined types. Return
20615         identifier as a TREE_LIST list containing the current line context
20616         as the TREE_VALUE sub-node.
20617         (java_unicode_2_utf8): Fixed typo in declaration.
20618         (java_lex_error): Now use the parser context data structure.
20619         *lex.h: Added 1998 time stamp.
20620         (struct java_line): New fields ref_count and next.
20621         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20622         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20623         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20624         *parse.h: Added 1998 time stamp.
20625         (java_parse_source_file): Renamed from parse_source_file.
20626         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20627         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20628         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20629         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20630         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20631         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20632         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20633         (struct parser_ctxt): New data structure to keep the parser context.
20634         *parse.y: Added 1998 time stamp, got rid of static global variables.
20635         (java_error_count, ctxp): New global variables.
20636         (%union): New value field.
20637         (numeric_type, integral_type): Rules removed.
20638         (primitive_type): Rule defined to handle integral, float, double and
20639         boolean types.
20640         (qualified_name, package_declaration,
20641         single_type_import_declaration, type_import_on_demand_declaration,
20642         modifiers, class_declaration, super, interfaces,
20643         interface_type_list, class_body, field_declaration,
20644         field_declaration, variable_declarators, variable_declarator,
20645         variable_declarator_id, method_declaration, method_header,
20646         formal_parameter_list, formal_parameter, method_body, block,
20647         static, interface_declaration, extends_interfaces,
20648         abstract_method_declaration, local_variable_declarators): Rules now
20649         define actions.
20650         (force_error, do_warning): New global statics.
20651         (push_parser_context, parser_context_save_global,
20652         parser_context_restore_global, pop_parser_context): New functions.
20653         (yyerror): Now uses the global parser context. Fixed use of obstack.
20654         (parse_error, parse_error_context, parse_warning_context,
20655         java_accstring_lookup, redefinition_error, check_modifiers,
20656         parser_add_interface, create_interface, create_class, find_field,
20657         duplicate_declaration_error, register_fields, method_header,
20658         check_modifiers_consistency, check_abstract_method_header,
20659         method_declarator, parser_qualified_classname,
20660         parser_check_super_interface, parser_check_super,
20661         parser_chain_incomplete_item, java_check_circular_reference,
20662         layout_class_from_source, java_complete_class,
20663         complete_method_decl, resolve_class, complete_class_report_errors,
20664         java_check_final, check_method_redefinition,
20665         java_check_regular_methods, java_check_abstract_methods,
20666         java_check_methods, lookup_java_interface_method2,
20667         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20668         process_imports, find_in_imports, read_import_entry,
20669         read_import_dir, find_in_imports_on_demand,
20670         check_pkg_class_access, not_builtin_p, declare_local_variables,
20671         source_start_java_method, java_generate_parsed_class): New
20672         functions.
20673         *typeck.c: (signature_include_return): New global variable.
20674         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20675         to add the function returned type in the signature.
20676
20677 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20678
20679         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20680
20681 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20682
20683         * Make-lang.in (java.info): Added.
20684         (java.install-info): Added
20685
20686 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20687
20688         * Makefile.in (clean): Also remove java/parse.c.
20689
20690 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20691
20692         Add a pair of -fbounds-check/-fno-bounds-check options.
20693         * lang.c (lang_decode_option): Add code to grok arguments.
20694         (flag_bounds_check): Add decl.
20695         (lang_f_options): New array w/ the option in it.
20696         * java-tree.h (flag_bounds_check): Add decl.
20697         * lang-options.h: New file.
20698         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20699         of a static macro value.
20700         (JAVA_ARRAY_EXCEPTION): Delete macro.
20701
20702 1998-01-23  Per Bothner  <bothner@cygnus.com>
20703
20704         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20705         * expr.c (build_anewarray):  Add missing promote_type.
20706
20707 1998-01-22  Per Bothner  <bothner@cygnus.com>
20708
20709         Add array types with known length to optimize bounds checking.
20710         * typeck.c (build_java_array_type):  Take length parameter.
20711         (java_array_type_length, build_prim_array_type):  New functions.
20712         * java-tree.h:  Update for new functions.
20713         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20714         * class.c:  Use build_prim_array_type.
20715         * expr.c (can_widen_reference_to):  Handle known-length array types.
20716         (verify_jvm_instructions):  Keep track of integer push instructions
20717         followed by newarray/anewarray, so we can build known-length arrays.
20718         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20719         (java_array_data_offset):  New function.
20720         (build_java_array_length_access):  New function.  Optimize if constant.
20721         (build_java_arrayaccess):  Constant fold bounds check.
20722         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20723         (build_newarray, build_anewarray):  New functions.
20724         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20725         * verify.c (merge_types):  Handle known-lengh array types.
20726
20727 1998-01-19  Per Bothner  <bothner@cygnus.com>
20728
20729         * expr.c (expand_byte_code):  Fix performace bug, which caused
20730         searching linenumber_table to be linear rather than constant.
20731
20732 1997-12-12  Per Bothner  <bothner@cygnus.com>
20733
20734         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20735
20736         * decl.c, java-tree.h (soft_fmod_node):  New global.
20737         * decl.c (init_decl_processing):  Define __builtin_fmod.
20738         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20739         using __builtin_fmod.
20740
20741 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20742
20743         * keyword.h: New file, output of keyword.gperf as processed by
20744         gperf.
20745         * lex.c (java_lex_init): Initialize java_error_flag.
20746         * parse.c (YYERROR_NOW): Uses java_error_flag.
20747         * parse.y: New static java_error_flag. Useless definition of
20748         buffer_error gone.
20749         * parse.y (java_error): Portable error recovery using
20750         java_error_flag (not yet completely tuned).
20751
20752 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20753
20754         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20755
20756 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20757
20758         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20759         (parse.c, lex.c, keyword.h): New rules for Java source code
20760         front-end.
20761         * parse.c: Renamed into jcf-parse.c.
20762         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20763         * keyword.gperf: New file, Java keywords.
20764         * parse.y: New file, Java language grammar.
20765         * parse.h: New file, Java language grammar definitions.
20766         * lex.c: New file, Java language lexer.
20767         * lex.h: New file, Java language lexer definitions.
20768
20769 1997-12-03  Per Bothner  <bothner@cygnus.com>
20770
20771         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20772         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20773         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20774         * expr.c (expand_java_field_op):  Check for invalid assignment
20775         to final field.
20776
20777         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20778
20779 1997-10-27  Per Bothner  <bothner@cygnus.com>
20780
20781         * verify.c (verify_jvm_instructions):  When processing a handler,
20782         attempt to set the current_subr to the right value.
20783         (More complicated code combines Sep 17 and Oct 22 versions.)
20784
20785 1997-10-24  Per Bothner  <bothner@cygnus.com>
20786
20787         * class.c (push_class):  Figure out (guess) name of source file.
20788         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20789         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20790         (parse_class_file):  Change return type from int to void.
20791         Call debug_start_source_file/debug_end_source_file.
20792
20793         * expr.c (build_java_binop):  Fix masking 2nd operand.
20794         * decl.c (init_decl_processing):  Set sizetype first.
20795
20796 1997-10-22  Per Bothner  <bothner@cygnus.com>
20797
20798         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20799         (Revert Sep 17 change.)
20800
20801 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20802
20803         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20804         .class extension in their name and fix thing so we don't process
20805         them parse_zip_file_entries().
20806         (parse_zip_file_entries): Cleaned unused local variables.
20807
20808 1997-10-20  Per Bothner  <bothner@cygnus.com>
20809
20810         * expr.c (can_widen_reference_to):  Allows equal array element types.
20811         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20812         * jcf-dump.c (RET):  Get (and print) index.
20813
20814         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20815         Promote element type to POINTER_TYPE.
20816
20817 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20818
20819         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20820         find_in_current_zip, jcf_figure_file_type): Moved from
20821         jcf-reader.c to parse.c.
20822         * zextract.c: (read_zip_archive): takes file_comment_length possible
20823         field into account.
20824
20825 1997-10-20  Per Bothner  <bothner@cygnus.com>
20826
20827         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20828
20829         * verify.c (merge_types):  Handle array types even better ...
20830
20831 1997-10-17  Per Bothner  <bothner@cygnus.com>
20832
20833         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20834
20835         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20836         * class.c (make_class_data):  Don't build fields_decl if no fields.
20837         When building fields_decl, skip if DECL_ARTIFICIAL.
20838
20839         * expr.c (java_stack_swap):  Update stack_type_map.
20840         * verify.c (merge_types):  Handle array types better.
20841
20842 1997-10-15  Per Bothner  <bothner@cygnus.com>
20843
20844         * class.c (add_field):  Don't promote short integral fields to
20845         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20846         * expr.c (push_value):  Promote and convert short integral values.
20847
20848         * decl.c, java-tree.h (integer_two_node):  New constant node.
20849         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20850
20851 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20852
20853         * class.c (append_gpp_mangled_type): Use function argument
20854         unpromoted type to generate mangled name.
20855
20856 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20857
20858         * constants.c (build_constant_data_ref): Now uses current_class
20859         instead of main_class.
20860         (build_constants_constructor): Now uses current_class instead of
20861         main_class.
20862         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20863         of the global variable SeepZipFiles done here.
20864         * zextract.c (read_zip_archive): extra_field optional field taken
20865         into account while computing the position of the class file in the
20866         archive.
20867         * verify.c (verify_jvm_instructions): Use current_jcf to search
20868         the constant pool.
20869         * parse.c (load_class): First search for the class to load in the
20870         current zip file. Saves current_jcf (restored before returning
20871         from that function). Don't call JCF_FINISH in the class was found
20872         in the current ZIP file.
20873         (jcf_parse): If the class was found in the current ZIP file, save
20874         its tree_constant_pool (for later reuse).
20875         (parse_class_file): New function. Process each method defined in
20876         the current class and record the class as to be later registered.
20877         (yyparse): Rewritten. Figure the type of the current file and switch
20878         accordingly.
20879         * lang.c: New global variable current_jcf.
20880         (lang_init): Removed compiling_from_source test (done later, in
20881         yyparse). Removed call the jcf_parse ().
20882         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20883         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20884         in the current ZIP file) and zip_offset (offset to the class data in
20885         the current zip file).
20886         * jcf-reader.c: zipfile.h included.
20887         localToFile: New ZipFileCache static global variable
20888         (parse_zip_file_entries): New function. Browse the current ZIP
20889         file directory and process each class found.
20890         (process_zip_dir): New function. Register each class found in the
20891         ZIP file directory. The class aren't parsed but a valid JCF is
20892         link to each of them.
20893         (find_in_current_zip): New function. Search for a class in the
20894         current ZIP file directory. If found, prepare the class so that it
20895         can be loaded.
20896         (jcf_figure_file_type): New function. Examine the file structure
20897         to figure a class file, a ZIP file. If none of these categories are
20898         matched, a source file is assumed.
20899         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20900         SeenZipFile: New global variable.
20901         (open_in_zip): Use zipmember's length to accelerate the search for
20902         a member. If zipmember was NULL and zip file successfully read,
20903         return 0.
20904         * java-tree.h: New global variable current_jcf declared.  Added
20905         declaration for current_constant_pool_tags, current_constant_pool_data,
20906         current_constant_pool_length, current_constant_pool_data_ref.
20907         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20908         store the JCF of classes seen in a zip file) and tree *constant_pool
20909         (to save a loaded class constant pool). current_class declared here.
20910         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20911         retrieve method_ref_constant.
20912         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20913         (OBJECT): get_class_constant now uses current_jcf.
20914         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20915         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20916         (expand_invoke): Now uses current_class instead of main_class
20917         (build_class_init): Now uses current_class instead of main_class
20918         * class.c: New static global variable registered_class.
20919         (register_class): New function.
20920         (emit_register_class): Modified to use registered_class instead of
20921         main_class
20922         (is_compiled_class): Now take into account class seen in the archive.
20923
20924 1997-10-06  Per Bothner  <bothner@cygnus.com>
20925
20926         * except.h:  Renamed to: java-except.h.
20927         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20928         * except.c:  Add semi-working (commented out) implementation.
20929
20930         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20931         * parse.c (set_source_filename):  New function.
20932         (give_name_to_class):  Set input_filename from package.classname.java.
20933
20934         * jcf-io.c (find_class):  Don't look first in ".".
20935
20936 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20937
20938         * zextract.c (read_zip_archive): Now takes into account the
20939         extra_field field.
20940         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20941
20942 1997-09-20  Per Bothner  <bothner@cygnus.com>
20943
20944         * constants.c, java-tree.h (build_internal_class_name):  New function.
20945         (alloc_class_constant):  Re-implement using build_internal_class_name.
20946         * class.c (make_class_data):  Likewise.
20947         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20948
20949 1997-09-17  Per Bothner  <bothner@cygnus.com>
20950
20951         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20952         to NULL before pushing an exception handler target.
20953
20954         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20955         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20956         clobbering registers.
20957         (build_class_init):  New function.
20958
20959 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20960
20961         * typeck.c (build_java_array_type): Temporary use
20962         permanent_obstack to create the array 'length' field.
20963         * expr.c (lookup_label): Temporay use permanent_obstack to create
20964         label if not found.
20965         * class.c (push_super_field): Tempory use permanent_obstack.
20966
20967 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20968
20969         * typeck.c (type_for_mode): Now handles double_type_node and
20970         float_type_node.
20971         * verify.c (verify_jvm_instructions): The instruction following
20972         the wide bytecode is checked. OPCODE_ret added to the list of
20973         wide.
20974
20975 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20976
20977         * class.c (make_class): Temporary use permanent_obstack. Set the
20978         class CLASS_P field to 1.
20979         (push_class): Temporary use permanent_obstack.
20980         (set_super_info): Temporary use permanent_obstack.
20981         (add_method): Temporary use permanent_obstack, set
20982         METHOD_TRANSIENT().
20983         (add_field): Temporary use permanent_obstack. Sets
20984         FIELD_VOLATILE() and FIELD_TRANSIENT().
20985         (build_class_ref): Temporary use permanent_obstack if the class
20986         isn't compiled.
20987         (build_static_field_ref): Temporary use permanent_obstack when
20988         creating field's rtl.
20989         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20990         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20991         and fields. Function finalized, as far as flag handling.
20992         (push_class_static_dummy_field): Temporary use permanent_obstack.
20993         (emit_register_class): Force generation of class registration at
20994         -O3 or deeper.
20995         * decl.c (end_java_method): Call permanent_allocation() before
20996         returning.
20997         * expr.c (can_widen_reference_to): Added comment to interface
20998         handling, fixed typo.
20999         (lookup_field): Now uses CLASS_P() to correct FIXME
21000         (expand_invoke): Verification on public && !static &&
21001         !abstract moved into soft_lookupinterfacemethod (kaffe).
21002         Use Object class dtable if objectref is an array when expanding
21003         invokeinterface.
21004         (java_push_constant_from_pool): Temporary use permanent_obstack
21005         for CONSTANT_string
21006         * parse.c (get_ref_constant): Temporary use permanent_obstack to
21007         create constant references.
21008         (get_constant): Temporary use permanent_obstack to create constant.
21009         (load_class): Temporary use permanent_obstack to load class.
21010         (jcf_parse): Temporary use permanent_obstack to perform class
21011         layout.
21012         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21013         (build_java_signature): Temporary use permanent_obstack.
21014         * verify.c: (verify_jvm_instruction): removed unnecessary verification
21015         on ACC_SUPER flag.
21016         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21017         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21018         (CLASS_P): Defined
21019
21020 1997-09-11  Per Bothner  <bothner@cygnus.com>
21021
21022         * class.c (append_gpp_mangled_type):  Fix typo.
21023         (emit_register_class):  Use main_class to get class object, rather
21024         than looking for no-longer-existing static decl starting with _CL.
21025         * typeck.c (parse_signature_type):  Promote array element type
21026         if it is a RECORD_TYPE.
21027
21028 1997-09-10  Per Bothner  <bothner@cygnus.com>
21029
21030         * class.c (push_class_static_dummy_field):  New function.
21031         (mangle_static_field):  New. Do G++-style mangling of static fields.
21032         (layout_class):  Mandle static fields here, not in add_field.
21033         (build_class_ref):  The class object is now a dummy static field.
21034         * decl.c (find_local_variable):  Look for best, instead of first match.
21035         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
21036         (build_java_athrow):  Don't check here if exception is Throwable.
21037         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
21038         (TYPE_USED):  Removed.  No longer used ...
21039         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
21040         * verify.c (push_pending_label):  New function.
21041         (push_pending_block):  Renamed to check_pending_block.
21042         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
21043         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
21044         re-checking possible handlers) after a store (less wasted work).
21045         Check for null handler (finally) before calling add_handler.
21046         Various changes to (finally?) correctly handle try/finally.
21047
21048 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
21049
21050         * class.c: Include stdio.h.
21051
21052 1997-09-04  Per Bothner  <bothner@cygnus.com>
21053
21054         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21055         to make sure class is initialized before static/special invoke.
21056
21057         * verify.c (verify_jvm_instructions):  On a store instruction,
21058         call find_local_variable to force pre-allocation of decl and rtx.
21059         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
21060
21061 1997-09-03  Per Bothner  <bothner@cygnus.com>
21062
21063         * class.c (build_class_ref):   Strip off "promoted_" if need be.
21064         (make_field_value): Call build_java_signature when needed.
21065         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
21066         * expr.c (build_java_athrow):  Don't push_value of exception.
21067         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21068         match specification of [fd]cmp[lg] for NaNs.
21069         (expand_byte_code):  Add support for exception handler ranges.
21070         * except.c:  Add skeleton for EH code-generation.
21071         * verify.c (merge_types):  Treat all promoted integral types as equal.
21072         * constants.c (build_constants_constructor):  To force creation of
21073         current_constant_pool_data_ref, call build_constant_data_ref.
21074
21075         * javaop.def (lload):  Fix typo.
21076         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
21077
21078 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
21079
21080         * parse.c: Don't include function.h.
21081
21082 1997-08-27  Per Bothner  <bothner@cygnus.com>
21083
21084         * except.[ch]:  New files.
21085         * Makefile.in (JAVA_OBJS):  Add except.o
21086         * expr.c:  Temporary warning about unimplemented exceptions.
21087         * verify.c:  Verify exception handlers.
21088
21089         * jcf-dump.c (disassemble_method):  Print exception table.
21090
21091 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21092
21093         * expr.c (verify_jvm_instructions): Started a thorough
21094         verification of invoke* bytecodes.
21095         (expand_byte_code): flush quick stack if PC is the target of a
21096         branch.  and undef RET (conflicting with config/i386/i386.h).
21097         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21098         used.
21099         (expand_invoke): Now handles invokeinterface and do more
21100         verification according to the bytecode.
21101         (lookup_field): Don't try to load the class if processing
21102         dtable_type.
21103         (can_widen_reference_to): Now handles interfaces.
21104         * decl.c (init_decl_processing): New global variable
21105         soft_lookupinterfacemethod_node, declared in java-tree.h.
21106         Call set_super_info on string_type_node.
21107         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21108         defined.
21109         * class.c (set_super_info): Fills the CLASS_* flags according to
21110         access_flags.
21111         (get_access_flags_from_decl): Handles all class flags.
21112
21113 1997-08-26  Per Bothner  <bothner@cygnus.com>
21114
21115         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
21116         * parse.c (yyparse):  Check for abstract method, and missing code.
21117         * expr.c (expand_byte_code):  Change interface.
21118         * lang.c (put_decl_node):  Print promoted types prettier.
21119         * verify.c (verify_jvm_instruction):  Change interface.
21120         Partial support for scanning exception table.
21121         For load instructions, handle promoted integral types.
21122
21123 1997-08-21  Per Bothner  <bothner@cygnus.com>
21124
21125         * verify.c:  New file, with contents moved from expr.c.
21126         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
21127         * typeck.c (is_array_type_p):  Moved here from expr.c.
21128         * java-tree.h:  Add some now-needed function declarations.
21129         * Makefile.in (JAVA_OBJS): Added verify.o.
21130
21131 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21132
21133         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21134         METHOD_ABSTRACT flag.
21135
21136         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21137         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21138         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21139
21140         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21141         variables.
21142         (start_java_method): Hook for SYNCHRONIZED methods.
21143
21144         * expr.c (build_java_jsr, build_java_ret): New functions
21145         (JSR,PRE): New macros
21146         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21147         (verify_jvm_instructions): tableswitch, lookupswitch,
21148         monitorenter, monitorexit, goto_w: verified.
21149         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21150         (build_java_monitor): New function.
21151         (MONITOR_OPERATION): Modified to call build_java_monitor()
21152         (verify_jvm_instructions): Started a thorough verification of
21153         invoke* bytecodes.
21154
21155 1997-08-19  Per Bothner  <bothner@cygnus.com>
21156
21157         Support verification of jsr/ret subroutines (used for try/finally).
21158         * decl.c (return_address_type_node):  New type node.
21159         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21160         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21161         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
21162         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21163         TYPE_USED):  New macros for special types in type_map.
21164
21165         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
21166         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
21167         BCODE_JUMP_TARGET.
21168         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
21169
21170         * expr.c (can_widen_reference_to):  New function.
21171         (pop_type):  Use it.
21172         (merge_type_state):  Support handling start of subroutine.
21173         (push_pending_block):  Return char* error message, instead of calling
21174         fatal on an error.  Also handle subroutines.
21175         (verify_jvm_instructions):  Handle errors from push_poending_block.
21176         Support jsr and ret instructions.
21177
21178 1997-08-19  Per Bothner  <bothner@cygnus.com>
21179
21180         * jcf-io.c (find_classfile):  Fix thinko.
21181         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
21182
21183 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
21184
21185         * Makefile.in (BISON): Remove.
21186
21187 1997-08-07  Per Bothner  <bothner@cygnus.com>
21188
21189         * Makefile.in:  Convert to autoconf.
21190         * config-lang.in (outputs):  Added java/Makefile.
21191
21192         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21193         Rename cc1java to jc1.
21194
21195         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
21196         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
21197
21198         * class.c (class_depth):  Do load_class if needed.
21199
21200         Mostly better verification.
21201         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21202         (init_decl_processing):  Change return type of soft_checkcast.
21203         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21204         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21205         lang_print_error):  New functions.
21206         (lang_init):  Set global hook print_error_function to lang_print_error.
21207         * expr.c:  In the type_map ptr_type_node is only used for null now.
21208         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21209         (merge_types):  Dererence pointer to record types before comparing.
21210         (decode_newarray_type, merge_types):  On error just return NULL.
21211         (build_java_binop):  Add preliminary implementation (with warning)
21212         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21213         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21214         (expand_compare, expand_java_goto, expand_java_call):  Don't
21215         push_pending_block, since that only makes sense when verifying.
21216         (merge_type_state):  Different return codes.
21217         (push_pending_block):  A block may need to be verified more than once.
21218         (expand_byte_code):  Warn about unused code at code generation time.
21219         (verify_jvm_instruction):  Changed logic, since code may need to be
21220         re-verified if type-state has changed.  Also, better error handling.
21221         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21222         Improve newarray, anewarray, ?aload, athrow,
21223         * java-tree.h (LABEL_CHANGED):  New macro.
21224
21225 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21226
21227         * decl.c (soft_athrow_node): New global variable initialized.
21228         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21229         * typeck.c (convert): Added support for REAL_TYPE.
21230         (convert_to_char): New function.
21231         (convert): Handle CHAR_TYPE.
21232         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21233         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21234         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21235         promoted type.
21236         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21237         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21238         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21239         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21240         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21241         to Use The Right Things.
21242         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21243         compatible with INT. BOOLEAN is made equivalent to BYTE.
21244         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21245         OPCODE_ifnonnull): Now supported.
21246         (build_java_athrow): New function.
21247
21248 1997-08-04  Per Bothner  <bothner@cygnus.com>
21249
21250         Rename method name <init> to match G++ (and fix mangling).
21251         * class.c (layout_class):  Replace method name of <init> by class name.
21252         (make_method_value):  Do inverse renaming of constructor from <init>.
21253         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21254         * typeck.c (lookup_java_constructor):  New function.
21255         * expr.c (expand_invoke):  If method_name is <init>, call
21256         lookup_java_constructor to find constructor.
21257
21258         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21259
21260 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21261
21262         * parse.c (get_class_constant): Modified to handle array "classes"
21263         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21264         wide type.
21265         (convert): Modified to handle real type.
21266         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21267         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21268         variables declared.
21269         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21270         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21271         global variables initialized.
21272         (find_local_variable): Handles the case of a pointer
21273         (end_java_method): Restore the use of one more scope
21274         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21275         build_java_array_length_access, expand_java_arrayload,
21276         expand_java_arraystore, expand_java_array_length,
21277         expand_java_multianewarray, expand_java_anewarray,
21278         build_java_check_indexed_type, is_array_type_p,
21279         build_java_throw_out_of_bound_exception): New functions.
21280         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21281         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21282         OPCODE_<t>aload): Implemented code for verification.
21283         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21284         ARRAY_NEW_MULTI): Macro defined.
21285         (CONVERT): Modified to invoke convert().
21286         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21287
21288 1997-07-31  Per Bothner  <bothner@cygnus.com>
21289
21290         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21291         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21292         (make_class_data):  Field name needs '/' as package prefix.
21293         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21294
21295 1997-07-25  Per Bothner  <bothner@cygnus.com>
21296
21297         Implement debug information for local variables.
21298         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21299         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21300         DECL_LOCAL_SLOT_CHAIN):  New macros.
21301         (struct lang_decl_var):  New type.
21302         * parse.c (give_name_to_locals):  Move to decl.c.
21303         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21304         (start_java_method):  Re-write parameter handling.
21305         (pending_local_decls):  New global variable.
21306         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21307         (find_local_variable):  Accept pc so we can skips decls not in range.
21308         (struct binding_level):  Add end_pc field.
21309         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21310         (various):  Change so current pc gets passed to find_local_variable.
21311
21312         * decl.c (init_decl_processing):  Re-arrange fields in
21313         class_type_node and and method_type_node to match kaffe 0.9.1.
21314         * class.c (make_method_value, make_class_data):  Update
21315         initializations to match.
21316
21317 1997-07-16  Per Bothner  <bothner@cygnus.com>
21318
21319         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21320         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21321         (push_super_field):  New function.
21322         (make_class_data):  Handle inheritance of class static initializer.
21323         (layout_class):  New name mangling.
21324         * constants.c (build_constant_data_ref):  Init type of data array
21325         to a one-element array.
21326         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21327         * decl.c:  Rename class_type, object_type etc to class_type_node,
21328         object_type_node etc.  Make former inherit from latter.
21329         * expr.c (expand_invoke):  Add cast of function address.
21330         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21331         * parse.c (yyparse):  Don't call layout_class here.
21332         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21333
21334 1997-06-14  Per Bothner  <bothner@cygnus.com>
21335
21336         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21337         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21338         (alloc_class_constant):  New.
21339         * expr.c (expand_invoke):  Make sure method's class is initialized.
21340         * class.c (interits_from_p, emit_register_class):  New functions.
21341         * parse.c (yyparse):  Call emit_register_class.
21342
21343 1997-06-09  Per Bothner  <bothner@cygnus.com>
21344
21345         * constants.c:  New file, to handle constant pool.
21346         * Makefile.in (JAVA_OBJS):  Add constants.o.
21347         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21348         (pushdecl_top_level):  New.
21349         * parse.c (layout_class):  Moved to class.c.
21350         * expr.c (java_push_constant_from_pool):  New function.
21351         * class.c (build_class_ref):  Make work fully
21352         (make_class_data):  Emit super-class, constant pool, interface vector.
21353
21354 1997-06-03  Per Bothner  <bothner@cygnus.com>
21355
21356         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21357         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21358         * class.c (class_depth):  New function.
21359         (lookup_named_class):  Replaced by new function lookup_class.
21360         * decl.c (object_type_node, string_type_node):  New.
21361         Remove various types that we no longer need.
21362         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21363         (push_type, pop_type):  New functions for verifier.
21364         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21365         (expand_byte_code):  Simplify, since we assume already verified.
21366         (expand_invoke):  Now mostly works.
21367         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21368         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21369         * parse.c:  Wait to allocate class object until we know its name.
21370         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21371         * typeck.c (get_array_type):  Rename to ...
21372         (build_java_array_type):  ... and provide working implementation.
21373         (build_java_signature):  New function - build Java signature of type.
21374         (set_java_signature):  New function - cache signature with type.
21375         (lookup_java_method):  New function.
21376
21377 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21378
21379         * class.c (ident_subst):  Take extra SUFFIX parameter.
21380         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21381         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21382         (build_class_ref):  Actually implement.
21383         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21384         * decl.c (builtin_function):  New.
21385         (init_decl_processing):  Update for current Kaffe.  Declare some
21386         builtin Kaffe functions.
21387         * expr.c (build_address_of):  New.
21388         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21389         Renamed (from expand_java_new etc), and added working implementations.
21390         (build_field_ref):  Now also handle static fields.
21391         (expand_invoke):  Implement invokestatic, and start implement rest.
21392         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21393         * javaop.def:  Rename invokevirt -> invokevirtual.
21394         * lang.c (use_handles):  Removed.
21395         * parse.c:  Add support for ConstantValue attribute.
21396         Handle nested loading of a class.  (JPOOL_UTF):  New.
21397
21398 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21399
21400         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21401
21402 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21403
21404         * Make-lang.in (java.install-man):  New empty rule.
21405         * typeck.c (set_local_type):  New function.
21406         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21407         not find_stack_slot.  Call set_local_type.
21408
21409 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21410
21411         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21412         and building RECORD_TYPE CONSTRUCTORs.
21413         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21414
21415         * lang.c (use_handles):  Change the default to 0.
21416         * decl.c:  Define and build class_type, field_type, utf8const_type.
21417         * class.c (make_class_data, make_field_value,
21418         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21419         hashUtf8String, strLengthUtf8, mangled_classname:
21420         Functions to build reflective data structures.
21421         * parse.c (yyparse):  Call make_class_data.
21422
21423         * jcf-io.c (open_class, find_classfile):  New functions.
21424         * jcf-dump.c:  Support reading classfile from explicitly-named
21425         class file (without CLASSPATH searching).
21426
21427 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21428
21429         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21430         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21431         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21432         (get_constant):  Now trivial for CONSTANT_Utf8.
21433
21434         * jcf.h:  Make NEW_CPOOL the default.
21435         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21436
21437 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21438
21439         New directory.