OSDN Git Service

* config/rs6000/rs6000.c (build_opaque_vector_type): Set
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2008-05-23  Andrew Haley  <aph@redhat.com>
2
3         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
4         pathname of source file.
5
6 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
7
8         * jcf-dump.c (print_constant): Use
9         HOST_LONG_LONG_FORMAT.
10
11 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
12
13         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
14         DECL_PURE_P.
15
16 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
17
18         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
19         (build_classdollar_field): Don't set TREE_INVARIANT.
20         (get_dispatch_table): Don't set TREE_INVARIANT.
21         (make_class_data): Don't set TREE_INVARIANT.
22         (build_symbol_entry): Don't set TREE_INVARIANT.
23         (emit_symbol_table): Don't set TREE_INVARIANT.
24         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
25         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
26         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
27         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
28
29 2008-04-03  Tom Tromey  <tromey@redhat.com>
30
31         * Make-lang.in (java_OBJS): New variable.
32
33 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
34
35         * java-tree.h (insert_block): Kill.
36         * decl.c (insert_block): Kill.
37                 
38 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
39
40         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
41         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
42         gpl.texi.
43
44 2008-03-27  Tom Tromey  <tromey@redhat.com>
45
46         * Make-lang.in: Revert automatic dependency patch.
47
48 2008-03-25  Tom Tromey  <tromey@redhat.com>
49
50         * Make-lang.in: Removed most explicit .o targets.
51         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
52         ($(GCJ)$(exeext)): Update.
53         (JAVA_OBJS): New variable.
54         (JCFDUMP_OBJS): Reformat.
55         (java_OBJS): New variable.
56         (java/jvspec.o-warn): Update.
57         (java/parse.o-warn): Remove.
58         (JAVA_TREE_H): Remove.
59         (java/jcf-io.o): Reduce to variable setting.
60         (ALL_CPPFLAGS): Likewise.
61
62 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
63
64         * mangle.c (java_mangle_decl): Remove dead check.
65
66 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
67
68         * jcf-parse.c (java_parse_file): Assert binding levels are
69         left in order.
70         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
71         Delete.
72
73 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
74
75         * jcf-dump.c (version): Update copyright notice dates.
76
77 2008-02-29  Tom Tromey  <tromey@redhat.com>
78
79         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
80         method.
81         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
82
83 2008-02-26  Tom Tromey  <tromey@redhat.com>
84
85         * lang.c (java_post_options): Remove conditional.
86         * expr.c (expand_byte_code): Remove old location code.
87         * jcf-parse.c (set_source_filename): Remove old location code.
88         (give_name_to_class): Likewise.
89         (jcf_parse): Likewise.
90         (duplicate_class_warning): Likewise.
91         (parse_class_file): Likewise.
92         (java_parse_file): Likewise.
93         * decl.c (finish_method): Remove old location code.
94         * class.c (push_class): Remove old location code.
95
96 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
97
98         PR other/35107
99         * Make-lang.in (jc1): Add $(GMPLIBS).
100
101 2008-01-23  David Daney  <ddaney@avtrex.com>
102
103         * class.c (hide)  Rename to...
104         (java_hide_decl) ... this throughout, and make public.
105         * resource.c (Jr_count): Remove.
106         (compile_resource_data): Call java_mangle_resource_name to generate
107         decl name.  Make resource decl public and hidden.
108         * mangle.c (java_mangle_resource_name): New function.
109         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
110         functions.
111
112 2008-01-04  Andrew Haley  <aph@redhat.com>
113
114         PR java/17779
115         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
116         C90.
117
118 2008-01-03  Andrew Haley  <aph@redhat.com>
119
120         PR java/17779
121         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
122         we're about to re-layout the type.
123
124 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
125
126         * lang.c (java_classify_record): Don't return
127         RECORD_IS_INTERFACE for now.
128
129 2007-12-18  Andrew Haley  <aph@redhat.com>
130
131         PR java/27643
132         * jcf-parse.c (java_parse_file): Remove call to
133         java_mark_class_local.
134         (parse_class_file): Reinstate call to java_mark_class_local here.
135         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
136         already set, call java_mangle_decl() and make_decl_rtl() to
137         rewrite its name as a hidden alias.
138
139 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
140
141         PR debug/7081
142         * lang.c (java_classify_record): New.
143         (LANG_HOOKS_CLASSIFY_RECORD): Override.
144
145 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
146
147         PR 34081/C++
148         * decl.c (finish_method): Pass 'false' for the new
149         allocate_struct_function parameter.
150
151 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
152
153         * expr.c (build_jni_stub): Use the computed jni func type for
154         variable meth.
155
156 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
157
158         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
159
160 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
161
162         * expr.c (type_assertion_hash): Hash type uids rather than
163         tree pointers.
164
165 2007-11-17  David Daney  <ddaney@avtrex.com>
166             Andrew Haley  <aph@redhat.com>
167
168         * constants.c (build_constants_constructor):  Use POINTER_SIZE
169         insead of BITS_PER_WORD in big-endian work around.
170
171 2007-11-07  Tom Tromey  <tromey@redhat.com>
172
173         PR java/34019:
174         * gcj.texi (Input Options): Add missing noun.
175
176 2007-11-02  Tom Tromey  <tromey@redhat.com>
177
178         PR java/33765:
179         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
180         * zipfile.h (ZIPEMPTYMAGIC): New define.
181
182 2007-11-01  Tom Tromey  <tromey@redhat.com>
183
184         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
185         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
186         (java/jcf-io.o): Depend on zipfile.h.
187
188 2007-10-17  Richard Guenther  <rguenther@suse.de>
189
190         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
191         dependencies.
192
193 2007-10-03  Andrew Haley  <aph@redhat.com>
194
195         PR java/33639
196         * class.c (mangled_classname): Detect and replace illegal
197         characters in assembly language symbols.
198         (gen_indirect_dispatch_tables): Call mangled_classname() on
199         the type.
200
201 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
202
203         * lang.c (java_print_error_function): Add third argument.
204
205 2007-09-15  Tom Tromey  <tromey@redhat.com>
206
207         * java-tree.h (struct lang_decl_func) <function_decl_body>:
208         Remove.
209         <init_final>: Likewise.
210         * lang.c (java_dump_tree): Update.
211         * java-tree.h (DECL_FUNCTION_BODY): Remove.
212
213 2007-09-11  Jan Hubicka <jh@suse.cz>
214
215         * decl.c (java_expand_body): Kill.
216         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
217
218 2007-09-06  Tom Tromey  <tromey@redhat.com>
219
220         * jcf-parse.c (parse_class_file): Re-enter the current file.
221
222 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
223
224         * boehm.c (mark_reference_fields): Move misaligned pointer check
225         after JREFERENCE_TYPE_P test
226
227 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
228
229         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
230         if pointer is misaligned.
231
232 2007-09-06  Tom Tromey  <tromey@redhat.com>
233
234         * lang.c (java_post_options): Update.
235         * jcf-parse.c (set_source_filename): Update.
236         (give_name_to_class): Update.
237         (jcf_parse): Update.
238         (duplicate_class_warning): Update.
239         (parse_class_file): Update.
240         (java_parse_file): Update.
241         * expr.c (expand_byte_code): Update.
242
243 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
244
245         * decl.c (finish_method): Use set_cfun.
246
247 2007-09-04  Andrew Haley  <aph@redhat.com>
248
249         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
250         when using the ARM EABI.
251
252 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
253
254         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
255
256 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
257
258         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
259         CONST_CAST.
260         * jcf.h (JCF_FINISH): Likewise.
261
262 2007-08-28  Tom Tromey  <tromey@redhat.com>
263
264         * Make-lang.in (java.tags): Don't tag '*.y' files.
265
266 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
267
268         * lang.c (java_decl_ok_for_sibcall): Likewise.
269
270 2007-08-21  Paul Brook  <paul@codesourcery.com>
271             Nathan Sidwell  <nathan@codesourcery.com>
272             Mark Mitchell  <mark@codesourcery.com>
273             Joseph Myers  <joseph@codesourcery.com>
274
275         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
276         date.
277
278 2007-08-20  Richard Guenther  <rguenther@suse.de>
279
280         * lang.c (java_tree_inlining_walk_subtrees): Remove.
281         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
282
283 2007-08-17  Tom Tromey  <tromey@redhat.com>
284
285         * typeck.c (find_method_in_interfaces): Update.
286         * jcf-parse.c (load_class): Update.
287         * java-gimplify.c (java_gimplify_component_ref): Removed.
288         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
289         arguments.
290         (java_gimplify_expr): Update.
291         * decl.c (java_init_decl_processing): Update.
292         * class.c (set_constant_value): Update.
293         (make_class_data): Update.
294         (finish_class): Update.
295         (build_static_field_ref): Update.
296         (is_compiled_class): Update.
297         (maybe_layout_super_class): Update.
298         (layout_class): Update.
299         (layout_class_method): Update.
300         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
301         (lang_decl_var) <am, final_iud, cif>: Removed fields.
302         (lang_decl_func) <init_calls_this>: Removed field.
303         (lang_type) <dot_class, verify_method>: Removed fields.
304         (FIELD_NESTED_ACCESS): Removed.
305         (FIELD_NESTED_ACCESS_P): Removed.
306         (DECL_FIELD_FINAL_IUD): Removed.
307         (DECL_LOCAL_FINAL_IUD): Removed
308         (LOCAL_FINAL_P): Removed.
309         (FINAL_VARIABLE_P): Removed.
310         (CLASS_FINAL_VARIABLE_P): Removed.
311         (DECL_BIT_INDEX): Removed.
312         (DECL_INIT_CALLS_THIS): Removed.
313         (FIELD_LOCAL_ALIAS): Removed.
314         (FIELD_LOCAL_ALIAS_USED): Removed.
315         (FIELD_THISN): Removed.
316         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
317         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
318         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
319         (TYPE_DOT_CLASS): Removed.
320         (TYPE_VERIFY_METHOD): Removed.
321         (ID_CLASSDOLLAR_P): Removed.
322         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
323         Removed.
324         (classdollar_identifier_node): Removed.
325         (TYPE_UNKNOWN): Removed.
326         (CLASS_FROM_SOURCE_P): Removed.
327         * expr.c (build_jni_stub): Update.
328         (force_evaluation_order): Update.
329         (build_java_empty_stmt): Update.
330         (build_class_init): Update.
331         (java_stack_swap): Update.
332         (build_jni_stub): Update.
333
334 2007-08-17  Tom Tromey  <tromey@redhat.com>
335
336         * java-tree.h (LABEL_TYPE_STATE): Removed.
337         (load_type_state): Removed.
338         (LABEL_PC): Removed.
339         (LABEL_VERIFIED): Removed.
340         (type_states): Declare.
341         * expr.c (type_states): New global.
342         (load_type_state): Now static.  Use type_states.  Changed
343         argument.
344         (lookup_label): Don't set LABEL_PC.
345         (expand_byte_code): Don't use LABEL_VERIFIED.
346         (note_instructions): Initialize type_states.
347         * verify-glue.c (vfy_note_stack_depth): Rewrote.
348         (vfy_note_stack_type): Use type_states.
349         (vfy_note_local_type): Likewise.
350
351 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
352
353         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
354         * jcf.h (JCF_FINISH): Likewise.
355
356 2007-07-31  Nick Clifton  <nickc@redhat.com>
357
358         * java-gimplify.c: Change copyright header to refer to version 3
359         of the GNU General Public License and to point readers at the
360         COPYING3 file and the FSF's license web page.
361         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
362         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
363         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
364         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
365         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
366         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
367         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
368
369 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
370
371         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
372
373 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
374
375         * lang.c (java_get_callee_fndecl): Constify.
376
377 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
378
379         * mangle.c (set_type_package_list): Constify.
380         * verify-glue.c (vfy_make_string): Delete.
381         * verify.h (vfy_make_string): Likewise.
382
383 2007-07-26  Tom Tromey  <tromey@redhat.com>
384
385         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
386         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
387         EXIT_BLOCK_LABELED_BLOCK): Likewise.
388         * lang.c (java_tree_inlining_walk_subtrees): Update.
389         (java_dump_tree): Likewise.
390         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
391         Remove.
392         * decl.c (push_labeled_block, pop_labeled_block): Remove.
393         * java-gimplify.c (java_gimplify_labeled_block_expr,
394         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
395         (java_gimplify_expr): Update.
396
397 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
398
399         * class.c (java_treetreehash_hash, java_treetreehash_compare):
400         Constify. 
401         * expr.c (type_assertion_eq): Likewise.
402         * jcf-io.c (compare_path): Likewise.
403         * jcf-parse.c (cmpstringp): Likewise.
404         * verify-impl.c (get_one_type, compute_argument_types,
405         compute_return_type): Likewise. 
406
407 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
408
409         PR target/32462
410         PR libgcj/32465
411         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
412
413 2007-07-12  Richard Guenther  <rguenther@suse.de>
414
415         * expr.c (expand_java_return): RETURN_EXPR has void type.
416         (build_jni_stub): Likewise.  Use a comparison against zero
417         for null-pointer test in COND_EXPR.
418         (build_field_ref): Build POINTER_PLUS_EXPR with correct
419         type.  Convert result instead.
420         (build_invokevirtual): Likewise.
421
422 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
423
424         PR 32617
425         * lang.c (java_init): Remove setting of force_align_functions_log.
426         * class.c (add_method_1): Set DECL_ALIGN of non-static method
427         to cope with ptrmemfunc_vbit_in_pfn.
428
429 2007-07-03  David Daney  <ddaney@avtrex.com>
430
431         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
432         include path.
433         (doc/gcj.dvi): Same.
434         (doc/gcj.pdf): Same.
435         (java/index.html): Same.
436
437 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
438
439         * class.c (make_class_data): Build the index in sizetype.
440         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
441         adding to a pointer type.
442         (build_symbol_entry): Likewise.
443         * expr.c (build_java_arrayaccess): Likewise.
444         (build_field_ref): Likewise.
445         (build_known_method_ref): Likewise.
446         (build_invokevirtual): Likewise.
447         * except.c (build_exception_object_ref): Do a
448         NEGATIVE and then a POINTER_PLUS_EXPR instead
449         of a MINUS_EXPR.
450
451 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
452
453         * typeck.c (java_signed_type): Remove.
454         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
455         * java-tree.h (java_signed_type): Remove.
456
457 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
458
459         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
460         (print_constant): Likewise.
461
462 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
463
464         * expr.c (build_java_binop): Use unsigned_type_for instead of
465         java_unsigned_type.
466         * java-tree.h (java_unsigned_type): Remove.
467         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
468         * typeck.c (java_unsigned_type): Remove.
469
470 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
471
472         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
473         instead of checking GIMPLE_STMT_P in chain_next.
474
475 2007-04-06  Colin Walters  <walters@redhat.com>
476
477         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
478         * jcf-io.c (open_class): Copy 'filename'.
479
480 2007-04-03  Andrew Haley  <aph@redhat.com>
481
482         * jvgenmain.c (main): Change main to use class$, not class$$.
483         (do_mangle_classname): Likewise.
484         * class.c (hide): New function.
485         (add_field): Hide everything that shouldn't be visible outside a
486         DSO.
487         (build_static_class_ref): Likewise.
488         (build_classdollar_field): Likewise.
489         (make_class_data): Likewise.
490         (layout_class_method): Likewise.
491         * expr.c (special_method_p): New function.
492
493         * class.c (push_class): Don't bogusly guess the source filename.
494         * jcf-parse.c (give_name_to_class): Don't set input_location from
495         DECL_ARTIFICIAL decls.
496
497 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
498
499         * typeck.c (java_signed_or_unsigned_type): Removed.
500         (java_signed_type): use get_signed_or_unsigned_type instead of
501         java_signed_or_unsigned_type.
502         (java_unsigned_type): Ditto.
503         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
504         * java-tree.h (java_signed_or_unsigned_type): Removed.
505
506 2007-03-26  Tom Tromey  <tromey@redhat.com>
507
508         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
509         (java.maintainer-clean): Likewise.
510         (java.install-man): Likewise.
511         (.INTERMEDIATE): Removed grmiregistry.pod.
512         (grmiregistry.pod): Removed.
513         * gcj.texi (Invoking gcjh): Removed.
514         (Invoking gjnih): Likewise.
515         (Invoking grmiregistry): Likewise.
516         (direntry): Updated.
517         (Top): Likewise.
518         (which-gcj): Removed.
519
520 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
521
522         * Make-lang.in: Add install-pdf target as copied from
523         automake v1.10 rules.
524
525 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
526
527         * gcj.texi: Standardize title page.
528
529 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
530
531         * class.c: Fix a comment typo.
532
533 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
534             Brooks Moses  <brooks.moses@codesourcery.com>
535             Lee Millward  <lee.millward@codesourcery.com>
536
537         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
538         of build3.
539         (BUILD_MONITOR_EXIT): Likewise.
540
541         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
542         (java_gimplify_modify_expr): Likewise.
543
544         * class.c (cache_this_class_ref): Use build_call_expr.
545         (build_static_field_ref): Likewise.
546         (emit_indirect_register_classes): Likewise.
547         (emit_register_classes): Likewise.
548
549         * resource.c (write_resource_constructor): Use build_call_expr.
550
551         * builtins.c (builtin_creator_function): Change interpretation of
552         the second parameter to be the whole CALL_EXPR instead of the arglist.
553         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
554         (min_builtin): Likewise.
555         (abs_builtin): Likewise.
556         (java_build_function_call_expr): Likewise.
557         (convert_real): Likewise.
558         (UNMARSHAL3): Likewise.
559         (UNMARSHAL4): Likewise.
560         (UNMARSHAL5): Likewise.
561         (build_arglist_for_builtin): Delete.  Fix callers to use
562         build_call_expr instead.
563         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
564         accessors.
565         (compareAndSwapInt_builtin): Likewise.
566         (compareAndSwapLong_builtin): Likewise.
567         (compareAndSwapObject_builtin): Likewise.
568         (putVolatile_builtin): Likewise.
569         (getVolatile_builtin): Likewise.
570         (VMSupportsCS8_builtin): Likewise.
571         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
572         instead of arglist.
573
574         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
575         (build_java_throw_out_of_bounds_exception): Likewise.
576         (java_check_reference): Likewise.
577         (build_java_arraystore_check): Likewise.
578         (build_newarray): Likewise.
579         (build_anewarray): Likewise.
580         (expand_java_multinewarray): Use build_call_list instead of build3.
581         (build_java_monitor): Use build_call_nary instead of build3.
582         (java_create_object): Likewise.
583         (expand_java_NEW): Likewise.
584         (build_instanceof): Likewise.
585         (expand_java_CHECKCAST): Likewise.
586         (build_java_soft_divmod): Likewise.
587         (build_java_binop): Likewise.
588         (build_field_ref): Likewise.
589         (build_class_init): Likewise.
590         (rewrite_arglist_getcaller): Use build_call_expr.
591         (build_invokeinterface):  Use build_call_nary instead of build3.
592         (expand_invoke): Use build_call_list instead of build3.
593         (build_jni_stub): Use build_call_nary, build_call_list, or
594         build_call_expr instead of build3.
595         (expand_java_field_op): Use build_call_expr instead of build3.
596         (force_evaluation_order): Use new CALL_EXPR accessors.
597
598         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
599
600 2007-02-15  David Daney  <ddaney@avtrex.com>
601
602         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
603         (java.maintainer-clean):Add gc-analyze.1.
604         (.INTERMEDIATE): Add gc-analyze.pod.
605         (gc-analyze.pod): New rule.
606         (java.install-man): Install gc-analyze.1
607         * gcj.texi: Add new section for the gc-analyze program.
608
609 2007-02-07  Andrew Haley  <aph@redhat.com>
610
611         * class.c (uncache_this_class_ref): New.
612         * expr.c (build_jni_stub): Initialize the class.
613         (expand_byte_code): Call uncache_this_class_ref after generating
614         code.
615
616 2007-02-06  Tom Tromey  <tromey@redhat.com>
617
618         PR java/30714:
619         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
620
621 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
622
623         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
624
625 2007-02-02  Andrew Haley  <aph@redhat.com>
626
627         * expr.c (expand_byte_code): Call cache_this_class_ref() and
628         cache_cpool_data_ref().
629         Set TYPE_CPOOL_DATA_REF.
630         (cache_cpool_data_ref): New function.
631         * constants.c (build_ref_from_constant_pool): Remove special-case
632         code for flag_indirect_classes.
633         (build_constant_data_ref): Move special-case code for
634         flag_indirect_classes here from build_ref_from_constant_pool.
635         * decl.c (finish_method): Move class initialization from here to
636         cache_this_class_ref.
637         * class.c (cache_this_class_ref): New function.
638         (build_class_ref): Use this_classdollar for the ouput class.
639
640 2007-02-02  David Daney  <ddaney@avtrex.com>
641
642         * class.c (is_compiled_class): Move check to avoid reloading
643         current class.
644         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
645         already set.
646
647 2007-02-01  Andrew Haley  <aph@redhat.com>
648
649         PR java/30641
650         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
651
652 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
653
654         * class.c, jcf-parse.c: Fix comment typos.
655
656 2007-01-30  Tom Tromey  <tromey@redhat.com>
657
658         * gcj.texi (Strings): Fix documentation for JvNewString.
659
660 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
661
662         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
663         typos.
664
665 2007-01-30  Ben Elliston  <bje@au.ibm.com>
666
667         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
668
669 2007-01-29  Tom Tromey  <tromey@redhat.com>
670
671         PR java/30607:
672         * jvspec.c (lang_specific_driver): Handle separate -I argument.
673         * lang.opt (-I): Add 'Separate'.
674
675 2007-01-29  Andrew Haley  <aph@redhat.com>
676
677         * class.c (add_method_1): Mark fndecl as external unless we are
678         compiling it into this object file.
679
680 2007-01-24  Andrew Haley  <aph@redhat.com>
681
682         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
683         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
684
685 2007-01-22  Andrew Haley  <aph@redhat.com>
686
687         * builtins.c (VMSupportsCS8_builtin): New function.
688
689 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
690
691         PR java/30454
692         * jcf-io.c (opendir_in_zip): Close the file
693         and free zipf before returning after an error.
694
695 2007-01-16  Tom Tromey  <tromey@redhat.com>
696
697         * java-tree.def: Added copyright header.
698
699 2007-01-15  Tom Tromey  <tromey@redhat.com>
700
701         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
702         case.
703         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
704         Removed case.
705         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
706         (EXPR_WFL_NODE): Likewise.
707         (EXPR_WFL_LINECOL): Likewise.
708         (EXPR_WFL_FILENAME): Likewise.
709         (EXPR_WFL_LINENO): Likewise.
710         (build_expr_wfl, expr_add_location): Don't declare.
711         (build_unknown_wfl): Removed.
712         (EXPR_WFL_FILENAME_NODE): Removed.
713         (EXPR_WFL_COLNO): Removed.
714         (EXPR_WFL_SET_LINECOL): Removed.
715         (DECL_FUNCTION_WFL): Removed.
716         (DECL_FIELD_FINAL_WFL): Removed.
717         (struct lang_decl_func) <wfl>: Removed field.
718         <called_constructor>: Likewise.
719         <inner_access>: Likewise.
720         (struct lang_decl_var) <wfl>: Removed field.
721         (DECL_CONSTRUCTOR_CALLS): Removed.
722         (DECL_FUNCTION_ACCESS_DECL): Likewise.
723         (DECL_FUNCTION_INNER_ACCESS): Likewise.
724         (DECL_SPECIFIC_COUNT): Likewise.
725         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
726         * expr.c (build_expr_wfl): Removed.
727         (expr_add_location): Likewise.
728
729 2007-01-12  Tom Tromey  <tromey@redhat.com>
730
731         * jcf-dump.c (main): Updated call to find_class.
732         * lang.c (java_init): Removed dead code.
733         * jcf-parse.c (read_class): Don't use java_source field.  Removed
734         dead code.
735         (parse_zip_file_entries): Don't use java_source field.
736         (process_zip_dir): Likewise.
737         (jcf_parse): Removed dead code.
738         (java_parse_file): Likewise.
739         (read_class): Updated call to find_class.
740         * jcf-io.c (find_class): Don't use java_source field.  Removed
741         'source_ok' argument, .java logic.
742         * jcf.h (JCF) <java_source>: Removed field.
743         (JCF_ZERO): Updated.    (find_class): Updated.
744         * decl.c: Removed dead code.
745         * class.c: Removed dead code.
746
747 2007-01-11  Tom Tromey  <tromey@redhat.com>
748
749         * typeck.c (convert): Don't use flag_emit_class_files.
750         * lang.c (java_post_options): Don't use flag_emit_class_files.
751         (java_handle_option): Don't use flag_extraneous_semicolon or
752         flag_redundant.
753         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
754         flag_emit_class_files.
755         (load_class): Likewise.
756         * java-tree.h (flag_emit_class_files): Don't declare.
757         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
758         (flag_extraneous_semicolon): Don't declare.
759         (flag_not_overriding): Likewise.
760         (flag_static_local_jdk1_1): Likewise.
761         (flag_redundant): Likewise.
762         * expr.c (build_newarray): Don't use flag_emit_class_files.
763         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
764         flag_emit_class_files.
765         (build_class_ref): Likewise.
766         * builtins.c (check_for_builtin): Don't use
767         flag_emit_class_files.
768
769 2007-01-10  Tom Tromey  <tromey@redhat.com>
770
771         * lang.c (java_can_use_bit_fields_p): Removed.
772         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
773
774 2007-01-09  Andrew Haley  <aph@redhat.com>
775
776         * expr.c (build_java_arrayaccess): Rewrite to generate array
777         access in canonical form.
778         (expand_java_arraystore): Use build_fold_addr_expr() on address of
779         array access.
780
781 2007-01-03  Andrew Haley  <aph@redhat.com>
782
783         PR java/28754
784         * expr.c (expand_java_field_op): If we're initializing a field's
785         declaring interface we should not also initialize the class
786         context in which it was referenced.
787
788 2007-01-02  Tom Tromey  <tromey@redhat.com>
789
790         * java-tree.h (compiling_from_source, current_encoding,
791         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
792         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
793         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
794         JTI_WFL_OPERATOR): Removed
795         (finit_identifier_node, instinit_identifier_node,
796         length_identifier_node, super_identifier_node,
797         continue_identifier_node, access0_identifier_node, wfl_operator):
798         Removed.
799         (cyclic_inheritance_report,
800         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
801         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
802         DECL_FIXED_CONSTRUCTOR_P): Removed.
803         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
804         Removed.
805         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
806         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
807         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
808         import_list, import_demand_list>: Removed.
809         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
810         cxx_keyword_p): Removed.
811         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
812         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
813         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
814         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
815         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
816         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
817         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
818         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
819         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
820         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
821         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
822         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
823         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
824         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
825         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
826         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
827         java_parse_abort_on_error, extract_field_decl): Removed.
828         (finput): Declare.
829         * lang.c: (compiling_from_source, current_encoding): Removed.
830         (java_handle_option): Ignore -fencoding.
831         * parse.h: Don't include lex.h.
832         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
833         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
834         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
835         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
836         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
837         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
838         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
839         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
840         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
841         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
842         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
843         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
844         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
845         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
846         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
847         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
848         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
849         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
850         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
851         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
852         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
853         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
854         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
855         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
856         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
857         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
858         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
859         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
860         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
861         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
862         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
863         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
864         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
865         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
866         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
867         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
868         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
869         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
870         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
871         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
872         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
873         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
874         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
875         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
876         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
877         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
878         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
879         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
880         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
881         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
882         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
883         SET_CPC_STATIC_INITIALIZER_STMT,
884         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
885         java_complete_class, java_check_circular_reference,
886         java_fix_constructors, java_layout_classes, java_reorder_fields,
887         java_method_add_stmt, java_get_line_col, reset_report,
888         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
889         java_finish_classes, ctxp, ctxp_for_generation,
890         ctxp_for_generation_last): Removed.
891         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
892         * mangle.c (utf8_cmp): New function.
893         (cxx_keywords): New global.
894         (cxx_keyword_p): New function.
895         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
896         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
897         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
898         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
899         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
900         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
901         * Make-lang.in (java.srcextra): Do nothing.
902         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
903         (JAVA_OBJS): Don't mention deleted files.
904         (java.mostlyclean): Likewise.
905         (java.clean): Likewise.
906         (JAVA_LEX_C): Removed.
907         (buffer.o, check-init.o, parse.o): Remove unused targets.
908         (typeck.o): Updated.
909         * jcf-parse.c (read_class): Comment out unused code.
910         (java_layout_seen_class_methods): New function.
911         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
912         Removed.
913         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
914         (init_jcf_parse): Removed.
915         * config-lang.in (gtfiles): Remove deleted files.
916         * decl.c (java_init_decl_processing): Don't initialize
917         finit_identifier_node, instinit_identifier_node,
918         length_identifier_node, super_identifier_node,
919         continue_identifier_node, access0_identifier_node.  Don't call
920         init_jcf_parse.
921         * class.c (cyclic_inheritance_report): New global.
922         (add_method_1): Don't use
923         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
924         (maybe_layout_super_class): Comment out code.
925         (safe_layout_class): New function.
926         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
927         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
928         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
929         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
930         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
931         (java_gimplify_case_expr): Removed.
932         (java_gimplify_default_expr): Likewise.
933         (java_gimplify_new_array_init): Likewise.
934         * parse.y: Removed.
935         * keyword.gperf, keyword.h: Removed.
936         * chartables.h: Removed.
937         * check-init.c: Removed.
938         * buffer.c, buffer.h: Removed.
939         * convert.h: Removed.
940         * gen-table.pl: Removed.
941         * lex.c, lex.h: Removed.
942
943 2007-01-02  Andrew Haley  <aph@redhat.com>
944
945         * expr.c (expand_java_arraystore): Make sure we perform a bounds
946         check at runtime before we perform a type check.
947
948 2006-12-19  Andrew Haley  <aph@redhat.com>
949
950         * decl.c: Bump minor BC ABI version.
951
952 2006-12-13  Gary Benson  <gbenson@redhat.com>
953
954         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
955
956 2006-12-12  Tom Tromey  <tromey@redhat.com>
957
958         * lang-specs.h: Pass -M options to jc1.
959         * jcf-depend.c (jcf_dependency_add_file): Don't emit
960         dependencies.
961
962 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
963
964         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
965
966 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
967
968         * lang-specs.h: Pass '%U'-based options as separate arguments.
969
970 2006-12-05  Tom Tromey  <tromey@redhat.com>
971
972         PR java/29495:
973         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
974         classes as well.
975         * class.c (add_field): Handle ACC_SYNTHETIC.
976         (add_method_1): Likewise.  Handle bridge and varargs.
977         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
978         annotation.
979         (set_class_decl_access_flags): Handle synthetic and annotation.
980         * java-tree.h (METHOD_BRIDGE): New macro.
981         (METHOD_VARARGS): Likewise.
982         (TYPE_SYNTHETIC): Likewise.
983         (TYPE_ANNOTATION): Likewise.
984         (lang_type): New fields 'synthetic' and 'annotation'.
985         (lang_decl_func): New fields 'varargs' and 'bridge'.
986
987 2006-12-04  Andrew Haley  <aph@redhat.com>
988
989         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
990         there's no map.
991
992 2006-11-29  Gary Benson  <gbenson@redhat.com>
993
994         * expr.c (rewrite_arglist_getcaller): Reorder.
995
996 2006-11-29  Andrew Haley  <aph@redhat.com>
997
998         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
999         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1000
1001 2006-11-23  Andrew Haley  <aph@redhat.com>
1002
1003         * expr.c (rewrite_arglist_getcaller): New.
1004         (rewrite_arglist_getclass): Fix indentation.
1005         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
1006         gnu.classpath.VMStackWalker.getCallingClassLoader().
1007         * builtins.c (initialize_builtins): Remove duplicate def'n of
1008         __sync_synchronize.
1009         Add __builtin_return_address.
1010
1011 2006-11-22  Andrew Haley  <aph@redhat.com>
1012
1013         * jcf-reader.c (get_attribute): Mark attr_type unused.
1014
1015         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1016
1017 2007-01-08  Richard Guenther  <rguenther@suse.de>
1018
1019         * lex.c (do_java_lex): Use build_int_cst_wide_type.
1020         * jcf-parse.c (get_constant): Likewise.
1021
1022 2006-11-12  Jan Hubicka  <jh@suse.cz>
1023
1024         * resource.c (compile_resource_data): Update for new varpool names.
1025         * java/class.c (build_utf8_ref): Likewise.
1026
1027 2006-11-12  David Daney  <ddaney@avtrex.com>
1028
1029         PR java/29805
1030         * typeck.c (build_java_array_type): Increase buffer sizes.
1031
1032 2006-11-11  Richard Guenther  <rguenther@suse.de>
1033
1034         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1035         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1036
1037 2006-11-06  Andrew Haley  <aph@redhat.com>
1038
1039         * java-tree.h (CONSTANT_LazyFlag): New.
1040         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1041         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1042         reflection_data.
1043         (handle_constant): Return 0 for dummy cpool entries.
1044         Handle constants of kind Class.
1045         Handle constants of kind NameAndType.
1046         (handle_enclosingmethod_attribute): New.
1047         (handle_signature_attribute): New.
1048         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1049         (HANDLE_SIGNATURE_ATTRIBUTE): New.
1050         (handle_constant): Use unmangle_classname()rather than calling
1051         identifier_subst() directly.
1052
1053 2006-11-02  Andrew Haley  <aph@redhat.com>
1054
1055         * java-tree.h (FIELD_ENUM): New.
1056         (lang_decl_var.field_enum): New.
1057         (lang_type.enum_class): New.
1058         (CLASS_ENUM): New.
1059         * class.c (set_class_decl_access_flags): Handle enum types.
1060         (add_field): Handle enum fields.
1061         (get_access_flags_from_decl): Likewise.
1062
1063         * class.c (make_class_data): Put reflection_data into rodata.
1064
1065 2006-11-01  Andrew Haley  <aph@redhat.com>
1066
1067         * jcf-parse.c (field_offsets, bit_obstack): New variables.
1068         (jcf_parse): Write end marker to annotation_data.
1069         (java_parse_file): Create field_offsets bitmap.  Destroy it.
1070         (annotation_grow, annotation_rewrite_byte) 
1071         (annotation_rewrite_short, annotation_rewrite_int) 
1072         (annotation_read_short, annotation_write_byte) 
1073         (annotation_write_short, annotation_write_int) 
1074         (handle_long_constant, handle_constant, handle_element_value) 
1075         (handle_annotation, handle_annotations) 
1076         (handle_annotation_attribute, rewrite_reflection_indexes) 
1077         (handle_member_annotations, handle_parameter_annotations) 
1078         (handle_default_annotation): New functions.
1079         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
1080         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
1081         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1082         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1083         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1084         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
1085         (TYPE_REFLECTION_DATA): New.
1086         (TYPE_REFLECTION_DATASIZE): New.
1087         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1088         an enum.
1089         * jcf-reader.c (get_attribute): Pass field/method index and
1090         attribute type to get_attribute().
1091         * constants.c (find_class_or_string_constant): Make nonstatic.
1092         (cpool_for_class): Likewise.
1093         (build_constants_constructor): Separate string and scalar types.
1094         * class.c (make_class_data): Generate field_indexes permutation.
1095         Pass it to rewrite_reflection_indexes().
1096         (make_class_data): Generate constructor for reflection_data field.
1097
1098 2006-10-20  Tom Tromey  <tromey@redhat.com>
1099
1100         * gcj.texi (Top): Don't mention jv-scan.
1101         (Invoking gcj): Likewise.
1102         (Invoking gcjh): Likewise.
1103         (Invoking gjnih): Likewise.
1104         (Invoking gij): Likewise.
1105         (Invoking gcj-dbtool): Likewise.
1106         (Invoking jv-scan): Removed.
1107         * parse-scan.y: Removed.
1108         * jv-scan.c: Removed.
1109         * config-lang.in (stagestuff): Don't mention jv-scan.
1110         * Make-lang.in (java): Removed jv-scan.
1111         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1112         (JVSCAN_OBJS): Removed.
1113         (jv-scan$(exeext)): Likewise.
1114         (JAVA_MANFILES): Removed jv-scan.1.
1115         (java.uninstall): Don't mention jv-scan.
1116         (java.mostlyclean): Likewise.
1117         (java.maintainer-clean): Likewise.
1118         (.INTERMEDIATE): Likewise.
1119         (java/jv-scan.o): Removed.
1120         (jv-scan.pod): Likewise.
1121         (java.srcextra): Don't mention parse-scan.c.
1122         (java.mostlyclean): Likewise.
1123         (java/parse-scan.c): Removed.
1124         (java/parse-scan.o-warn): Removed.
1125         (java/parse-scan.o): Removed.
1126
1127 2006-10-20  Tom Tromey  <tromey@redhat.com>
1128
1129         * lang.c (java_handle_option): Don't use
1130         jcf_write_base_directory.
1131         * jcf.h (jcf_write_base_directory): Removed.
1132         * parse.y (java_expand_classes): Don't call write_classfile.
1133         * config-lang.in (gtfiles): Removed jcf-write.c.
1134         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1135         (java/jcf-write.o): Removed.
1136         * jcf-parse.c (parse_class_file): Don't call write_classfile.
1137         * java-tree.h (write_classfile): Removed declaration.
1138         * jcf-write.c: Removed.
1139
1140 2006-10-20  Tom Tromey  <tromey@redhat.com>
1141
1142         * Make-lang.in (java): Removed gjnih, gcjh.
1143         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1144         (GCJH_OBJS): Removed.
1145         (GJNIH_OBJS): Likewise.
1146         (gjnih$(exeext)): Likewise.
1147         (gcjh$(exeext)): Likewise.
1148         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1149         (java.install-common): Don't special case gcjh.
1150         (java.uninstall): Don't mention gcjh, gjnih.
1151         (java.mostlyclean): Likewise.
1152         (java.maintainer-clean): Likewise.
1153         (.INTERMEDIATE): Likewise.
1154         (gcjh.pod): Removed.
1155         (gjnih.pod): Likewise.
1156         (GCJH_TARGET_INSTALL_NAME): Removed.
1157         (java/gjavah-jni.o): Removed.
1158         (java/gjavah.o): Likewise.
1159         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1160         * gjavah.c: Removed.
1161
1162 2006-10-17  Tom Tromey  <tromey@redhat.com>
1163
1164         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1165         "string" case.
1166
1167 2006-10-17  Tom Tromey  <tromey@redhat.com>
1168
1169         * jvgenmain.c (main): Handle -findirect-dispatch.
1170         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1171         jvgenmain.
1172
1173 2006-10-06  Andrew Haley  <aph@redhat.com>
1174
1175         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1176         have a compare_and_swap builtin.
1177         (compareAndSwapLong_builtin): Likewise.
1178         (compareAndSwapObject_builtin): Likewise.
1179
1180 2006-10-04  Andrew Haley  <aph@redhat.com>
1181
1182         * builtins.c (java_builtins): Add compareAndSwapInt,
1183         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1184         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1185         putObjectVolatile, getObjectVolatile, getIntVolatile,
1186         getLongVolatile, getLong.
1187         (UNMARSHAL3): New macro.
1188         (UNMARSHAL4): Likewise.
1189         (UNMARSHAL5): Likewise.
1190         (build_arglist_for_builtin): New function.
1191         (build_addr_sum, build_check_this): New functions.
1192         (putObject_builtin. compareAndSwapInt_builtin,
1193         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1194         putVolatile_builtin, getVolatile_builtin): New builtins.
1195
1196 2006-06-08  Andrew Haley  <aph@redhat.com>
1197  
1198         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1199         get_symbol_table_index().
1200         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1201         private method.
1202         (build_known_method_ref): New arg: special.  Pass it to
1203         get_symbol_table_index.
1204         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1205         the method list.
1206         (build_invokevirtual): New arg: special.  Pass it to
1207         get_symbol_table_index.
1208         (expand_invoke): New variable: special.
1209         Pass it to maybe_rewrite_invocation().
1210         Pass it to build_known_method_ref().
1211         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1212         build the symbol table conbstructor.
1213         (emit_symbol_table): Extract SPECIAL from the method list and pass
1214         it to build_symbol_entry().
1215         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1216         special accordingly.
1217  
1218 2006-09-08  Andrew Haley  <aph@redhat.com>
1219
1220         * class.c (layout_class_method): Use build_java_signature, not
1221         build_java_argument_signature.  Use lookup_java_method, not
1222         lookup_argument_method.
1223
1224 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1225             Bryce McKinlay  <bryce@mckinlay.net.nz>
1226
1227         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1228
1229 2006-07-18  Tom Tromey  <tromey@redhat.com>
1230
1231         * lang.opt: Added missing -W options.
1232
1233 2006-07-12  Tom Tromey  <tromey@redhat.com>
1234
1235         PR java/28329:
1236         * lang-specs.h: Pass '%U'-based options as separate arguments.
1237         Use -faux-classpath.
1238         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1239         * lang.opt (faux-classpath): New option.
1240
1241 2006-07-07  Tom Tromey  <tromey@redhat.com>
1242
1243         * class.c (make_class_data): Set value for reflection_data field.
1244         * decl.c (java_init_decl_processing): Add reflection_data field.
1245
1246 2006-07-07  Tom Tromey  <tromey@redhat.com>
1247
1248         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1249         earlier.
1250         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1251
1252 2006-07-07  Andrew Haley  <aph@redhat.com>
1253
1254         * jcf-parse.c (set_source_filename): Don't check for
1255         CLASS_FROM_CURRENTLY_COMPILED_P.
1256         Remove // comments.
1257
1258 2006-07-07  Andrew Haley  <aph@redhat.com>
1259
1260         * java-tree.h (java_read_sourcefilenames): Declare.
1261         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1262         * lang.opt (fsource-filename): New opt.
1263         * lang-specs.h: Add -fsource-filename.
1264         * jcf-parse.c (num_files, filenames): New variables.
1265         (reverse, cmpstringp, java_read_sourcefilenames,
1266         find_sourcefile): New.
1267         (set_source_filename): Call find_sourcefile to find the real name
1268         of a source file.
1269
1270 2006-06-27  Tom Tromey  <tromey@redhat.com>
1271
1272         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1273         Signature, LocalVariableTypeTable, annotation attributes.
1274         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1275         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1276         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1277         (HANDLE_METHOD): Likewise.
1278         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1279         (print_annotation): New function.
1280         (print_element_value): Likewise.
1281         (indent): Likewise.
1282         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1283         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1284         (print_parameter_annotations): New function.
1285         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1286         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1287         Likewise.
1288         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1289         (print_annotations): New function.
1290
1291 2006-06-23  Tom Tromey  <tromey@redhat.com>
1292
1293         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1294         emitting class files, always use 1.5.
1295         * gcj.texi (Input Options): Document -fsource.
1296         (Code Generation): Document -ftarget.
1297
1298 2006-06-21  Tom Tromey  <tromey@redhat.com>
1299
1300         PR java/28089:
1301         * expr.c (expand_java_field_op): Initialize field's declaring
1302         class.
1303
1304 2006-06-20  Tom Tromey  <tromey@redhat.com>
1305
1306         * expr.c (push_value): Always flush quick stack.
1307
1308 2006-06-19  Tom Tromey  <tromey@redhat.com>
1309
1310         * expr.c (push_value): Also flush quick stack if value is a
1311         component_ref.
1312
1313 2006-06-19  Tom Tromey  <tromey@redhat.com>
1314
1315         * expr.c (push_value): Flush quick stack if value has side
1316         effects.
1317
1318 2006-06-13  Tom Tromey  <tromey@redhat.com>
1319
1320         * class.c (is_compiled_class): Explicitly check for current
1321         class.
1322
1323 2006-06-09  Tom Tromey  <tromey@redhat.com>
1324
1325         * gjavah.c (decompile_method): Don't decompile a static field
1326         accessor method.
1327
1328 2006-06-06  Tom Tromey  <tromey@redhat.com>
1329
1330         * lang-specs.h <jc1>: Add .jar file to command line if
1331         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1332
1333 2006-06-05  Tom Tromey  <tromey@redhat.com>
1334
1335         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1336         synthetic, enum, annotation.
1337         * jcf.h (ACC_BRIDGE): New macro.
1338         (ACC_VARARGS): Likewise.
1339         (ACC_SYNTHETIC): Likewise.
1340         (ACC_ENUM): Likewise.
1341         (ACC_ANNOTATION): Likewise.
1342
1343 2006-06-04  Tom Tromey  <tromey@redhat.com>
1344
1345         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1346         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1347         and -ftarget.
1348         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1349         when needed.  Handle classpath-setting.
1350         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1351         * lang-specs.h: Rewrote.
1352
1353 2006-06-04  Tom Tromey  <tromey@redhat.com>
1354
1355         * jcf-io.c (find_class): Set source_ok to 0.
1356         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1357         (parse_class_file): Don't call java_mark_class_local.
1358         (java_parse_file): Skip .java files.  Call java_mark_class_local
1359         before lowering any code.
1360         (parse_zip_file_entries): Don't call duplicate_class_warning
1361         here.
1362         (process_zip_dir): ... call it here.
1363         * class.c (add_field): Don't mark field external if it is being
1364         compiled into this object.
1365         (make_class_data): Handle situation where class_dtable_decl is
1366         created before Class is compiled.
1367         (is_compiled_class): Don't assume files in zip are compiled into
1368         this object.
1369         (layout_class_method): Don't mark method external if it is being
1370         compiled into this object.
1371
1372 2006-06-04  Tom Tromey  <tromey@redhat.com>
1373
1374         * jcf-path.c (jcf_path_compute): New function.
1375         * jcf.h (jcf_path_compute): Declare.
1376
1377 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
1378
1379         * decl.c: Include langhooks.h.
1380         (builtin_function): Remove.
1381         (java_init_decl_processing): Replace calls to builtin_function
1382         with add_builtin_function.
1383         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1384         (java/decl.o): Depend on langhooks.h.
1385         * java-tree.h (builtin_function): Remove.
1386
1387 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1388
1389         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1390
1391 2006-09-12  Tom Tromey  <tromey@redhat.com>
1392
1393         * expr.c (push_value): Always flush quick stack.
1394
1395 2006-09-12  Tom Tromey  <tromey@redhat.com>
1396
1397         PR java/29013:
1398         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1399         the push of the called method's return result.
1400
1401 2006-09-12  Tom Tromey  <tromey@redhat.com>
1402
1403         * jvspec.c (lang_specific_driver): Read spec file even if
1404         -fsyntax-only.
1405
1406 2006-09-12  Tom Tromey  <tromey@redhat.com>
1407
1408         PR java/28754:
1409         * expr.c (expand_java_field_op): Initialize field's declaring
1410         interface if necessary.
1411
1412 2006-09-12  Tom Tromey  <tromey@redhat.com>
1413
1414         PR java/28892:
1415         * expr.c (expand_java_field_op): No error for assignments not in
1416         class initializer or constructor.
1417
1418 2006-08-22  Andrew Haley  <aph@redhat.com>
1419
1420         * decl.c (java_add_stmt): Give the statement list a type.
1421
1422 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1423             Bryce McKinlay  <bryce@mckinlay.net.nz>
1424
1425         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1426
1427 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1428
1429         PR java/8923
1430         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1431         or '--' is used with a constant operand.
1432         (java_complete_lhs): When processing a '++' or '--' expression,
1433         don't call java_complete_tree but java_complete_lhs, so that a
1434         static final variable operand is never replaced by its value. This
1435         avoids an ICE later on.
1436         (patch_unaryop): Fixed typo in comment.
1437
1438 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1439
1440         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1441
1442 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1443
1444         * builtins.c (check_for_builtin): If a builtin could result in a
1445         direct call being generated, don't use it if flag_indirect_dispatch
1446         is set.
1447
1448 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1449
1450         * gcj.texi (Invocation): Corrections for Invocation API example.
1451
1452 2006-07-04  Andrew Haley  <aph@redhat.com>
1453
1454         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1455         entry.
1456
1457 2006-06-21  Andrew Haley  <aph@redhat.com>
1458
1459         * java-tree.h (update_aliases): Remove
1460         * expr.c (expand_iinc): Remove call to update_aliases().
1461         (STORE_INTERNAL): Likewise.
1462         * decl.c (update_aliases, initialize_local_variable) 
1463         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1464
1465 2006-06-19  Andrew Haley  <aph@redhat.com>
1466
1467         PR java/1305
1468         PR java/27908
1469         * expr.c (java_modify_addr_for_volatile): New function.
1470         (expand_java_field_op): Handle volatile fields.
1471         * java-gimplify.c (java_gimplify_component_ref): Call
1472         java_modify_addr_for_volatile to give the field_ref the correct
1473         volatile type.
1474         (java_gimplify_modify_expr): Likewise.
1475         * java-tree.h (java_modify_addr_for_volatile): New decl.
1476
1477 2006-06-17  Karl Berry  <karl@gnu.org>
1478
1479         * gcj.texi (@dircategory): Use "Software development" instead
1480         of "Programming", following the Free Software Directory.
1481
1482 2006-06-16  Andrew Haley  <aph@redhat.com>
1483
1484         * class.c (make_class_data): When using flag_indirect_classes,
1485         don't initialize the vtable of Class instances.
1486
1487 2006-06-09  Andrew Haley  <aph@redhat.com>
1488
1489         PR java/1305
1490         PR java/27908
1491         * builtins.c (initialize_builtins): Add __sync_synchronize().
1492         * class.c (add_field): Mark volatile fields.
1493         * java-gimplify.c (java_gimplify_expr): Call new functions to
1494         handle self-modifying exprs and COMPONENT_REFs.
1495         (java_gimplify_component_ref): New.
1496         (java_gimplify_modify_expr): Add handling for volatiles.
1497
1498 2006-06-08  Tom Tromey  <tromey@redhat.com>
1499
1500         * gcj.texi (libgcj Runtime Properties): Document
1501         gnu.gcj.user.realname.
1502
1503 2006-06-08  Andrew Haley  <aph@redhat.com>
1504
1505         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1506         get_symbol_table_index().
1507         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1508         private method.
1509         (build_known_method_ref): New arg: special.  Pass it to
1510         get_symbol_table_index.
1511         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1512         the method list.
1513         (build_invokevirtual): New arg: special.  Pass it to
1514         get_symbol_table_index.
1515         (expand_invoke): New variable: special.
1516         Pass it to maybe_rewrite_invocation().
1517         Pass it to build_known_method_ref().
1518         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1519         build the symbol table conbstructor.
1520         (emit_symbol_table): Extract SPECIAL from the method list and pass
1521         it to build_symbol_entry().
1522         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1523         special accordingly.
1524
1525 2006-06-06  David Daney  <ddaney@avtrex.com>
1526
1527         * gcj.texi (libgcj Runtime Properties): Document
1528         gnu.gcj.runtime.NameFinder.show_raw and
1529         gnu.gcj.runtime.NameFinder.remove_unknown.
1530
1531 2006-06-06  Tom Tromey  <tromey@redhat.com>
1532
1533         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1534         synthetic, enum, annotation.
1535         * jcf.h (ACC_BRIDGE): New macro.
1536         (ACC_VARARGS): Likewise.
1537         (ACC_SYNTHETIC): Likewise.
1538         (ACC_ENUM): Likewise.
1539         (ACC_ANNOTATION): Likewise.
1540
1541 2006-06-06  Mike Stump  <mrs@apple.com>
1542
1543         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1544         installing during build.
1545
1546 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1547
1548         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1549         classname-to-library resolution mechanism.
1550         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1551         mechanism deprecated.
1552         (libgcj Runtime Properties): Document
1553         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1554
1555 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1556
1557         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1558         bit wide type.
1559         (jword): Define to uint64 on 64-bit arches.
1560         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1561
1562 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1563
1564         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1565         typos.
1566
1567 2006-05-26  Tom Tromey  <tromey@redhat.com>
1568
1569         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1570         * verify-glue.c (vfy_class_type): New function.
1571         * verify-impl.c (check_constant): Allow 'ldc class'.
1572         * verify.h (vfy_class_type): Declare.
1573
1574 2006-05-25  Andrew Haley  <aph@redhat.com>
1575
1576         PR java/27756
1577         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1578         update all lifetimes, not just the first one.
1579
1580 2006-05-24  Tom Tromey  <tromey@redhat.com>
1581
1582         * java-tree.h: Fixed flag documentation.
1583
1584 2006-05-24  Tom Tromey  <tromey@redhat.com>
1585
1586         PR libgcj/27729:
1587         * jcf.h (ACC_INVISIBLE): Changed value.
1588
1589 2006-05-24  Andrew Haley  <aph@redhat.com>
1590
1591         PR java/27754
1592         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1593         COMPOUND_EXPR.
1594
1595 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1596
1597         * lang.opt (femit-class-file): Remove VarExists.
1598
1599 2006-05-16  Tom Tromey  <tromey@redhat.com>
1600
1601         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1602         for Object.<init>.
1603
1604 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1605
1606         PR driver/26885
1607         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1608         $(GCC_OBJS).
1609
1610 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1611
1612         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1613         (java/expr.o): Replace target.h with $(TARGET_H).
1614         (java/parse.o): Likewise.
1615
1616 2006-05-10  Andrew Haley  <aph@redhat.com>
1617
1618         * class.c (emit_indirect_register_classes): Fix comment.
1619
1620 2006-05-04  Tom Tromey  <tromey@redhat.com>
1621
1622         * java-tree.h (uses_jv_markobj_p): Declare.
1623         * class.c (uses_jv_markobj_p): Removed.
1624         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1625         (get_boehm_type_descriptor): Use it.
1626         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1627
1628 2006-05-04  Tom Tromey  <tromey@redhat.com>
1629
1630         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1631
1632 2006-05-04  Andrew Haley  <aph@redhat.com>
1633
1634         * class.c (make_field_value): Always build_address_of fdecl if
1635         there is an initializer.
1636
1637 2006-05-03  Andrew Haley  <aph@redhat.com>
1638
1639         PR libgcj/27352
1640         * expr.c (maybe_rewrite_invocation): New function.
1641         (rewrite_arglist_getclass): Likewise.
1642         (rules): New.
1643         (expand_invoke): Call maybe_rewrite_invocation.
1644         * parse.y (patch_invoke): Likewise.
1645         * java-tree.h: (maybe_rewrite_invocation): New function.
1646
1647 2006-04-21  Andrew Haley  <aph@redhat.com>
1648
1649         * lang.c (java_init): Handle flag_indirect_classes.
1650         * jvgenmain.c: Use "class$$" instead of "class$".
1651         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1652         DECLs.
1653         (mangle_class_field): Special case "class$$" as well as "class$".
1654         * constants.c (build_ref_from_constant_pool): If
1655         flag_indirect_classes, generate a ref into the heap.
1656         * decl.c (constants_field_decl_node,
1657         constants_data_field_decl_node): New.
1658         * class.c (build_static_class_ref): New.
1659         (build_classdollar_field): Factor out from build_class_ref().
1660         (make_field_value): Handle static fields in heap.
1661         (make_class_data): Make sure we get a static ref to class.
1662         Make class initializer const if flag_indirect_classes.
1663         (register_class): Build a class_ref for initialization if
1664         flag_indirect_classes.
1665         (emit_indirect_register_classes): New.
1666
1667 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1668
1669         * expr.c, gjavah.c: Fix comment typos.
1670
1671 2006-04-03  Andrew Haley  <aph@redhat.com>
1672
1673         PR java/26858
1674         * expr.c (build_field_ref): Don't check the field offset if
1675         flag_syntax_only.
1676
1677 2006-03-30  Andrew Haley  <aph@redhat.com>
1678
1679         PR java/26858
1680         * lang.c (java_attribute_table): New.
1681         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1682         * expr.c (build_field_ref): Add a null pointer check for all
1683         fields of offset > 4k.  Don't do so for accesses via the this
1684         pointer, which we know can never be null.
1685         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1686         methods nonnull.
1687
1688 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1689
1690         * Make-lang.in: Rename docdir to gcc_docdir.
1691
1692 2006-03-30  Tom Tromey  <tromey@redhat.com>
1693
1694         PR java/26042:
1695         * parse.y (java_reorder_fields): Reset superclass field's size as
1696         well.
1697
1698 2006-03-28  Tom Tromey  <tromey@redhat.com>
1699
1700         PR java/26390:
1701         * parse.y (find_most_specific_methods_list): Added 'class'
1702         argument.
1703         (lookup_method_invoke): Updated.
1704
1705 2006-03-15  Tom Tromey  <tromey@redhat.com>
1706
1707         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1708         non-static method calls.
1709
1710 2006-03-15  David Daney  <ddaney@avtrex.com>
1711
1712         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1713         declaration.
1714
1715 2006-03-15  David Daney  <ddaney@avtrex.com>
1716
1717         * lang.opt (-freduced-reflection): New option.
1718         * lang.c (java_post_options): Generate an error if
1719         -freduced-reflection used with -fjni or -findirect-dispatch.
1720         * java-tree.h (flag_reduced_reflection): Declare new variable.
1721         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1722         if bitmap overflows and flag_reduced_reflection set.
1723         * class.c (uses_jv_markobj_p): New function.
1724         (make_class_data): Moved generation of vtable to before
1725         reflection data, generate less reflection data if
1726         flag_reduced_reflection set.
1727         * gcj.texi: Document -freduced-reflection.
1728
1729 2006-03-15  Tom Tromey  <tromey@redhat.com>
1730
1731         PR java/26638:
1732         * class.c (get_interface_method_index): Don't put <clinit> into
1733         interface table.
1734
1735 2006-03-15  Tom Tromey  <tromey@redhat.com>
1736
1737         * parse.y (analyze_clinit_body): Ignore empty statements.
1738
1739 2006-03-08  David Daney  <ddaney@avtrex.com>
1740
1741         * gcj.texi: Document -static-libgcj option.
1742
1743 2006-02-20  Andrew Haley  <aph@redhat.com>
1744
1745         * jcf-parse.c (parse_class_file): Set input_location from
1746         current_class.
1747
1748 2006-02-15  Andrew Haley  <aph@redhat.com>
1749
1750         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1751         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1752         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1753
1754 2006-02-09  Andrew Haley  <aph@redhat.com>
1755
1756         PR java/26192
1757         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1758         in their superclass.
1759
1760         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1761         array types.
1762         
1763 2006-02-08  Tom Tromey  <tromey@redhat.com>
1764
1765         PR java/22578:
1766         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1767         * builtins.c (convert_real): New function.
1768         (java_builtins): Handle Float.intBitsToFloat,
1769         Float.floatToRawIntBits, Double.longBitsToDouble,
1770         Double.doubleToRawLongBits.
1771
1772 2006-02-07  Andrew Haley  <aph@redhat.com>
1773
1774         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1775         class other than the one in which we expected to find it, ignore
1776         the result.
1777
1778         PR java/25535
1779         * constants.c (build_constants_constructor): move initializer into
1780         first halfword on a 64-bit big-endian machine.
1781
1782 2006-02-04  Tom Tromey  <tromey@redhat.com>
1783
1784         PR java/25676:
1785         * builtins.c (max_builtin): Skip floating point 'max'.
1786         (min_builtin): Skip floating point 'min'.
1787         (check_for_builtin): Never return NULL_TREE.
1788
1789 2006-02-04  Tom Tromey  <tromey@redhat.com>
1790
1791         PR java/26097:
1792         * expr.c (push_type): Avoid side effect in gcc_assert.
1793
1794 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1795
1796         * decl.c (java_init_decl_processing): Create char_type_node as a
1797         regular INTEGER_TYPE node.
1798         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1799         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1800         test for char_type_node and promoted_char_type_node as special
1801         instances of INTEGER_TYPE tree codes.
1802         (promote_type,build_java_signature): Likewise.
1803         * jcf-write.c (adjust_typed_op): Likewise.
1804         * mangle.c (mangle_type): Likewise.
1805         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1806         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1807
1808 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1809
1810         * expr.c (java_stack_swap): Revert gcc_assert patch.
1811
1812 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1813
1814         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1815         * typeck.c: Likewise.
1816         * verify-impl.c: Likewise.
1817         * class.c: Likewise.
1818         * decl.c: Likewise.
1819         * jcf-parse.c: Likewise.
1820         * constants.c: Likewise.
1821         * check-init.c: Likewise.
1822         * jcf-write.c: Likewise.
1823         * verify-glue.c: Likewise.
1824         * mangle.c: Likewise.
1825         * expr.c: Likewise.
1826         * lang.c: Likewise.
1827         * boehm.c: Likewise.
1828
1829 2006-02-01  Jan Hubicka  <jh@suse.cz>
1830
1831         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1832         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1833
1834 2006-01-30  Andrew Haley  <aph@redhat.com>
1835
1836         PR java/21428
1837         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1838
1839 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1840
1841         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1842         Update copyright notice dates.
1843
1844 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1845
1846         * jvspec.c (lang_specific_spec_functions): Remove.
1847
1848 2006-01-06  Tom Tromey  <tromey@redhat.com>
1849
1850         * gcj.texi (Arrays): Added more documentation for
1851         JvNewObjectArray.
1852         (Primitive types): Correct information about primitive classes.
1853         (Reference types): New node.
1854         (Index): New node.
1855
1856 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1857
1858         * jcf-parse.c (set_source_filename): Set the decl source location
1859         even when returning early.
1860
1861 2005-12-15  Tom Tromey  <tromey@redhat.com>
1862             Andrew Haley  <aph@redhat.com>
1863
1864         PR java/25429
1865         * parse.y (resolve_expression_name): Don't generate accessor
1866         methods for constant fields.
1867
1868 2005-12-13  Andrew Haley  <aph@redhat.com>
1869
1870         PR java/25366
1871         PR java/25368
1872         * class.c (maybe_layout_super_class): Update current_class before
1873         calling do_resolve_class.
1874
1875 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1876
1877         PR java/25330
1878         * jcf-write.c (write_classfile): Use PID in temporary class
1879         file. Save/restore errno when reporting error.
1880
1881 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1882
1883         PR java/9861
1884         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1885         to bare_function_type and including the return type
1886         * builtins.c (initialize_builtins) : Change builtin mangled name
1887         constants to conform to new mangling scheme
1888
1889 2005-12-08  Andrew Haley  <aph@redhat.com>
1890
1891         PR libgcj/25265
1892         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1893         (soft_abstractmethod_node): New.
1894         * expr.c (build_field_ref): Add in-line check for missing field.
1895         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1896
1897 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1898
1899         * Make-lang.in (java.all.build, java.install-normal): Remove.
1900
1901 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1902
1903         * Make-lang.in: Remove all dependencies on s-gtype, except for
1904         gt-java-parse.h.
1905
1906 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1907
1908         * class.c (build_utf8_ref, emit_register_classes): Use
1909         switch_to_section and get_section.
1910
1911 2005-12-06  Tom Tromey  <tromey@redhat.com>
1912
1913         PR java/25283:
1914         * parse.y (patch_new_array_init): Revert previous patch.
1915         (lookup_method_invoke): Use size-less array type when creating an
1916         anonymous constructor.
1917
1918 2005-12-05  Tom Tromey  <tromey@redhat.com>
1919
1920         * parse.y (patch_new_array_init): Don't set length on array.
1921
1922 2005-12-02  Richard Guenther  <rguenther@suse.de>
1923
1924         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1925         buildN instead of build.
1926         * class.c (finish_class): Likewise.
1927         * expr.c (java_create_object): Likewise.
1928
1929 2005-11-28  Tom Tromey  <tromey@redhat.com>
1930
1931         PR java/18278:
1932         * expr.c (build_jni_stub): Unwrap the return value.
1933         * java-tree.h (soft_unwrapjni_node): New define.
1934         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1935         * decl.c (java_init_decl_processing): Initialize
1936         soft_unwrapjni_node.
1937
1938 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1939
1940         * gcj.texi (gij options): Add -Xss documentation.
1941
1942 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1943
1944         PR java/23617
1945         * zextract.c (read_zip_archive): Fix out of memory error when
1946         reading jar files with zip-style comments.
1947
1948 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1949
1950         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1951         formats.
1952         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1953
1954 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1955             Wil Mahan <wmahan@gmail.com>
1956
1957         PR java/23620
1958         * class.c (make_class): Create empty binfo here.
1959         (set_super_info): Only create binfo if we have superclasses.
1960
1961 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1962
1963         PR java/24127
1964         * parse.y (method_header): Make the result of the rule a NULL_TREE
1965         when a parsing error occurs.
1966
1967 2005-09-29  Tom Tromey  <tromey@redhat.com>
1968
1969         PR java/24120:
1970         * jcf-io.c (memoized_dirlist_hash): New function.
1971         (caching_stat): Use it.
1972
1973 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1974
1975         PR java/21418
1976         * class.c (inherits_from_p): Try to lay out super class
1977         if it is not already laid out.
1978         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1979         is a NULL_TREE.
1980
1981 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1982
1983         * builtins.c (max_builtin, min_builtin, abs_builtin,
1984         java_build_function_call_expr): Use fold_buildN.
1985         * class.c (layout_class_method): Likewise.
1986         * expr.c (java_truthvalue_conversion, build_java_jsr,
1987         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1988         build_java_binop, build_field_ref, expand_compare,
1989         build_known_method_ref, build_invokevirtual,
1990         process_jvm_instruction): Likewise.
1991         * parse.y (patch_binop, patch_exit_expr): Likewise.
1992         * typeck.c (convert_ieee_real_to_integer): Likewise.
1993         (convert): Don't call fold after convert_ieee_real_to_integer.
1994
1995 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1996
1997         PR java/23891
1998         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1999         the newly created type. Set import lists here, not in create_class.
2000         (jdep_resolve_class): Set current_class.
2001         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
2002         the current package context, not ctxp->package.
2003         (cicp_cache): Removed.
2004         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2005         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2006         * java-tree.h (TYPE_PACKAGE): New macro.
2007         (struct lang_type): New member 'package'.
2008
2009 2005-09-09  Andrew Haley  <aph@redhat.com>
2010
2011         PR libgcj/23182 
2012         * expr.c (pop_type_0): If the expected type is object or ptr
2013         (i.e. void*), return the type of the object we just popped from
2014         the stack.
2015
2016 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
2017
2018         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2019         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2020
2021 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2022
2023         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2024         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2025         typos.  Follow spelling conventions.
2026
2027 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
2028
2029         PR java/23431
2030         * typeck.c (lookup_do): Look up interfaces for the original class,
2031         not the base class.
2032         * parse.y (java_check_regular_methods): Fix diagnostic message for
2033         more restrictive overriding of a method from an interface.
2034
2035 2005-08-16  Tom Tromey  <tromey@redhat.com>
2036
2037         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2038         class' initial state.
2039
2040 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2041
2042         PR java/22113
2043         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2044         `literal_token' for large numeric input tokens.
2045
2046 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2047
2048         PR java/19870
2049         * parse.y (nested_field_access_p): Rename to nested_member_access_p
2050         and expand to handle method accesses across nested classes.
2051         (build_outer_method_access_method): Rename to
2052         build_nested_method_access_method.  Minor adjustments to comments.
2053         (resolve_expression_name): Use the newly-renamed
2054         nested_member_access_p method.
2055         (resolve_qualified_expression_name): Likewise.
2056         (patch_method_invocation): Also consider static methods for access
2057         method generation.  Minor adjustments to comments.
2058         (maybe_use_access_method): Use the more general
2059         nested_memeber_access_p to determine access across nested class
2060         boundaries.  Allow THIS_ARG to be NULL (for static methods).
2061
2062 2005-08-15  Tom Tromey  <tromey@redhat.com>
2063
2064         PR java/23300.
2065         * expr.c (build_field_ref): Don't generate otable reference when
2066         DECL_FIELD_OFFSET is 0.
2067         * class.c (maybe_layout_super_class): Pass outer class to
2068         do_resolve_class.
2069
2070 2005-08-15  Tom Tromey  <tromey@redhat.com>
2071
2072         * java-tree.h (LABEL_IN_SUBR): Removed.
2073         (LABEL_IN_SUBR): Likewise.
2074         (LABEL_IS_SUBR_START): Likewise.
2075         (LABEL_SUBR_START): Likewise.
2076         (LABEL_SUBR_CONTEXT): Likewise.
2077         (LABEL_CHANGED): Likewise.
2078         (LABEL_RETURN_LABEL): Likewise.
2079         (LABEL_RETURN_TYPE_STATE): Likewise.
2080         (LABEL_RETURN_LABELS): Likewise.
2081         (RETURN_MAP_ADJUSTED): Likewise.
2082         (LABEL_PENDING_CHAIN): Likewise.
2083
2084 2005-08-15  Tom Tromey  <tromey@redhat.com>
2085
2086         * Make-lang.in (JAVA_OBJS): Removed verify.o
2087         (java/verify.o): Removed.
2088         * verify.c: Removed.
2089         * lang.c (flag_new_verifier): Removed.
2090         (java_post_options): Updated.
2091         * java-tree.h (flag_new_verifier): Removed.
2092         (verify_jvm_instructions): Removed.
2093         * expr.c (pop_type_0): Assume flag_new_verifier is true.
2094         (build_java_check_indexed_type): Likewise.
2095         (expand_java_arraystore): Likewise.
2096         (expand_java_arrayload): Likewise.
2097         (pop_arguments): Likewise.
2098         (expand_byte_code): Likewise.
2099         (process_jvm_instruction): Likewise.
2100
2101 2005-08-10  Andrew Haley  <aph@redhat.com>
2102
2103         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2104         type mismatches to make legal GIMPLE.
2105
2106 2005-08-10  Robin Green <greenrd@greenrd.org>
2107
2108         PR java/23230:
2109         * parse.y (maybe_use_access_method): Generalize check from
2110         java.lang.Object to any superclass of current_class
2111
2112 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2113
2114         * class.c (build_class_ref): Wrap the primary class type in a
2115         NOP_EXPR.
2116         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2117         primary class type from the NOP_EXPR in which it was placed.
2118
2119 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
2120
2121         * expr.c (expand_load_internal): Fix missing parens in
2122         predicate.
2123
2124 2005-07-28  Andrew Haley  <aph@redhat.com>
2125
2126         * expr.c (expand_load_internal): Convert to destination type.
2127
2128 2005-07-22  Manfred Hollstein  <mh@suse.com>
2129
2130         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2131         (check_constant): Likewise.
2132         (check_wide_constant): Likewise.
2133
2134 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2135
2136         Make CONSTRUCTOR use VEC to store initializers.
2137         * check-init.c (check_init): Update to cope with VEC in
2138         CONSTRUCTOR_ELTS.
2139         * class.c (make_field_value, make_method_value, get_dispatch_table,
2140         make_class_data, emit_symbol_table, emit_catch_table,
2141         emit_assertion_table): Use build_constructor_from_list instead of
2142         build_constructor.
2143         * constants.c (build_constants_constructor): Likewise.
2144         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2145         VEC in CONSTRUCTOR_ELTS.
2146         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2147         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2148         of a TREE_LIST.
2149         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2150         CONSTRUCTOR_ELTS.
2151         * parse.y (build_new_array_init): Use build_constructor_from_list
2152         instead of build_constructor.
2153         (patch_new_array_init): Update to cope with VEC in
2154         CONSTRUCTOR_ELTS.
2155         (array_constructor_check_entry): Likewise.
2156
2157 2005-07-12  Tom Tromey  <tromey@redhat.com>
2158
2159         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2160         command line.
2161
2162 2005-07-12  Tom Tromey  <tromey@redhat.com>
2163
2164         PR java/19674:
2165         * parse-scan.y (interface_member_declaration): Added
2166         empty_statement.
2167
2168 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2169         
2170         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2171         (LABEL_PENDING_CHAIN): Ditto.
2172         (LABEL_PC): Ditto.
2173         (DECL_BIT_INDEX): Ditto.        
2174
2175 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2176
2177         PR java/18119
2178         * parse.y (inner_class_accessible): New function. Logic moved from
2179         check_inner_class_access.
2180         (check_inner_class_access): Use inner_class_accessible.
2181         (resolve_inner_class): Simplify arguments. Create circularity hash
2182         here. Keep looking for classes if we found one that was inaccessible. 
2183         Return the inaccessible class only if there is no other match.
2184         (do_resolve_class): Update for new resolve_inner_class arguments.
2185         Don't create circularity_hash here.
2186
2187 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2188
2189         PR java/21045
2190         * parse.y (add_exception_to_throws): New function.
2191         (purge_unchecked_exceptions): Removed.
2192         (get_constructor_super): Renamed from verify_constructor_super. Now
2193         returns the super constructor after verification.
2194         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2195         or save/restore the exception list.
2196         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2197         class initializers and constructors to the throws clause of the method. 
2198
2199 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2200
2201         PR java/19674
2202         * parse.y (interface_member_declaration): Allow empty statements in
2203         interface declarations.
2204
2205 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2206
2207         * Makefile.in (parse.o): Adjust dependencies.
2208         * parse.y: Include tree-dump.h.
2209
2210 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2211
2212         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2213         flag for quoting.
2214
2215 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2216
2217         * parse.y (issue_warning_error_from_context): Call
2218         pp_output_formatted_text to be able to get the buffer.
2219
2220 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2221
2222         * parse.y (issue_warning_error_from_context): Update for the
2223         renaming of pp_format_text to pp_format.
2224
2225 2005-06-28  Paul Brook  <paul@codesourcery.com>
2226
2227         * decl.c (java_init_decl_processing): Call
2228         default_init_unwind_resume_libfunc.
2229
2230 2005-06-27  Tom Tromey  <tromey@redhat.com>
2231
2232         PR java/21540, PR java/13788:
2233         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2234         fold_constant_for_init.
2235         (patch_binop): Added 'folding' argument.  Updated all callers.
2236         (patch_unaryop) <NOP_EXPR>: New case.
2237         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2238         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2239
2240 2005-06-25  Jan Hubicka  <jh@suse.cz>
2241
2242         * builtins.c (define_builtin): Accept new flags parameter.
2243         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2244
2245 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2246
2247         * all files: Update FSF address in copyright headers.
2248
2249 2005-06-24  Tom Tromey  <tromey@redhat.com>
2250
2251         * verify-impl.c (verify_instructions_0): Correctly handle
2252         situation where PC falls off end.
2253
2254 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2255
2256         PR java/20697
2257         * parse.y (find_most_specific_methods_list): Remove special case for
2258         inner classes.
2259
2260 2005-06-15  Tom Tromey  <tromey@redhat.com>
2261
2262         PR libgcj/21906:
2263         * class.c (make_method_value): Use soft_abstractmethod_node for
2264         abstract method.
2265         * java-tree.h (soft_abstractmethod_node): New define.
2266         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2267         * decl.c (java_init_decl_processing): Initialize
2268         soft_abstractmethod_node.
2269
2270 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2271
2272         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2273
2274 2005-06-13  Per Bothner  <per@bothner.com>
2275
2276         * expr.c (int highest_label_pc_this_method,
2277         start_label_pc_this_method): New globals.
2278         (lookup_label): Add start_label_pc_this_method to pc for label, and
2279         update highest_label_pc_this_method.  This prevents conflicts between
2280         labels from different methods.
2281         * java-tree.h: Declare new globals.
2282         * jcf-parse.c (parse_class_file): If needed bump
2283         start_label_pc_this_method and reset highest_label_pc_this_method.
2284
2285 2005-06-13  Tom Tromey  <tromey@redhat.com>
2286
2287         PR java/21844:
2288         * parse.y (nested_field_access_p): Handle case where outer field
2289         is inherited by enclosing class.
2290
2291 2005-06-12  Per Bothner  <per@bothner.com>
2292
2293         * class.c (inherits_from_p): Do load_class if needed.
2294
2295 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2296
2297         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2298         * java-tree.h (parse_error_context): Move...
2299         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2300         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2301         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2302
2303 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2304
2305         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2306
2307 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2308
2309         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2310         msgid for argument name.
2311         * gjavah.c (error): Likewise.
2312         * java-tree.h (parse_error_context): Likewise.
2313         * parse.y (parse_error_context, parse_warning_context,
2314         issue_warning_error_from_context): Likewise.
2315
2316 2005-06-01  Tom Tromey  <tromey@redhat.com>
2317
2318         PR java/21722:
2319         * class.c (build_static_field_ref): Don't fold constant fields if
2320         current class is from a .class file and we're using indirect
2321         dispatch.
2322
2323 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2324
2325         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2326         * java/Make-lang.in: Updates dependencies.
2327
2328 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2329
2330         PR java/19870.
2331         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2332         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2333         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2334         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2335         * jcf-write.c (generate_classfile): Use
2336         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2337         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2338         * parse.y (build_outer_field_access): Rename to
2339         build_nested_field_access. Support static fields and outer-to-inner
2340         class accesses.
2341         (outer_field_access_p): Rename to nested_field_access_p. Support
2342         static fields and generalise to outer-to-inner class and sibling
2343         inner class accesses.
2344         (outer_field_expanded_access_p): Rename to
2345         nested_field_expanded_access_p and support static fields.
2346         (outer_field_access_fix): Rename to nested_field_access_fix and
2347         support static fields.
2348         (build_outer_field_access_expr): Rename to
2349         build_nested_field_access_expr and support static fields.
2350         (build_outer_field_access_methods): Rename to
2351         build_nested_field_access_methods and support static fields. For
2352         static fields, generate accessors without class instance parameters.
2353         (build_outer_field_access_method): Rename to
2354         build_nested_field_access_method and support static fields.
2355         (build_outer_method_access_method): Use
2356         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2357         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2358         (resolve_expression_name): Consider static field accesses across
2359         nested classes.
2360         (resolve_qualified_expression_name): Likewise.
2361         (java_complete_lhs): Use nested_field_access_fix instead of
2362         outer_field_access_fix.
2363         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2364         Use nested_field_expanded_access_p instead of
2365         outer_field_expanded_access_p. Use nested_field_access_fix instead
2366         of outer_field_access_fix.
2367         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2368         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2369
2370 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2371
2372         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2373         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2374         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2375         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2376         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2377         (parse_version): Calculate version ID using new method. Use bit-flags
2378         for flag_indirect_dispatch and flag_bootstrap_classes.
2379
2380 2005-05-25  Richard Henderson  <rth@redhat.com>
2381
2382         PR libgcj/21692
2383         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2384         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2385         DECL_CONTEXT; avoid pushdecl_top_level.
2386         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2387         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2388         (layout_class_method): Likewise.
2389         * decl.c (java_mark_cni_decl_local): New.
2390         (java_mark_class_local): Use it.
2391         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2392         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2393         (struct lang_decl_func): Add local_cni;
2394         (struct lang_decl_var): Add class_field, vtable.
2395         (java_mangle_decl): Declare.
2396         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2397         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2398         (mangle_obstack_1): New.
2399         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2400         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2401         lhd_set_decl_assembler_name for things that don't need mangling.
2402         (mangle_class_field): Rename from java_mangle_class_field, make
2403         static, don't call init_mangling or finish_mangling.
2404         (mangle_vtable): Similarly.
2405         (mangle_local_cni_method_decl): New.
2406         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2407         gcc_assert, and MANGLE_RAW_STRING.
2408         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2409
2410 2005-05-25  DJ Delorie  <dj@redhat.com>
2411
2412         * class.c (set_constant_value): Move warning control from if() to
2413         warning(OPT_*).
2414
2415 2005-05-24  Richard Henderson  <rth@redhat.com>
2416
2417         * builtins.c (define_builtin): Don't call make_decl_rtl.
2418         * constants.c (build_constant_data_ref): Likewise.
2419         * class.c (build_utf8_ref): Likewise.
2420         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2421         (get_dispatch_table, layout_class_method): Likewise.
2422         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2423         by hand.
2424         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2425         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2426         to determine if we need a non-zero address.
2427         * decl.c (builtin_function): Don't call make_decl_rtl.
2428         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2429         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2430         * resource.c (compile_resource_data): Likewise.
2431         * parse.y (resolve_field_access): Re-word comment to avoid
2432         building DECL_RTL.
2433
2434 2005-05-24  Richard Henderson  <rth@redhat.com>
2435
2436         * class.c (registered_class): Take it out of class_roots; turn into
2437         a vec of trees.
2438         (register_class): Make static.  Don't duplicate decl node.  Use
2439         VEC_safe_push.
2440         (emit_register_classes): Use VEC_iterate.  Use output_constant
2441         instead of assemble_integer.  Don't call mark_decl_referenced
2442         directly.
2443         * java-tree.h (register_class): Remove decl.
2444
2445 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2446
2447         PR java/17845
2448
2449         * parse.y (register_package, package_list): Remove.
2450         (package_declaration): Do not call register_package.
2451         (do_resolve_class): Do not use package_list.
2452
2453 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2454
2455         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2456         unused variable.
2457
2458 2005-05-15  Tom Tromey  <tromey@redhat.com>
2459
2460         PR java/21519:
2461         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2462         NOTE_PUSH.
2463
2464 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2465
2466         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2467
2468 2005-05-11  Tom Tromey  <tromey@redhat.com>
2469
2470         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2471         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2472         (parse_version): Use it.
2473         * lang.opt (-fbootstrap-classes): New option.
2474
2475 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2476
2477         PR java/21436
2478         * class.c (maybe_layout_super_class): Look for imports in this_class.
2479         * parse.h (ctxp_for_generation_last): New.
2480         (do_resolve_class): Add a parameter.
2481         * parse.y (ctxp_for_generation_last): New.
2482         (java_pop_parser_context): Add at end of list.
2483         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2484         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2485         the given type are NULL.
2486         (do_resolve_class): Look into the imports of the new second parameter.
2487         Adjust recursive calls.
2488         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2489         calls to do_resolve_class.
2490         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2491         (java_complete_class): Do not do that here.
2492
2493 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2494
2495         PR java/20309
2496         * Make-lang.in (java): Add gjnih.
2497         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2498         (GJNIH_OBJS): New variable.
2499         (gjnih$(exeext)): New target.
2500         (JAVA_MANFILES): Add gjnih.1.
2501         (java.uninstall): Add gjnih.1.
2502         (java.mostlyclean): Add gjnih.
2503         (java.maintainer-clean): Add gjnih.1.
2504         (java/gjavah-jni.o): New target.
2505         (.INTERMEDIATE): Add gjnih.pod.
2506         (gjnih.pod): New target.
2507         * config-lang.in (stagestuff): Add gjnih.
2508         * gcj.texi (Top): Add gjnih node.
2509         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2510         -bootclasspath options.
2511         (Invoking gjnih): New node.
2512         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2513         (TOOLNAME): New macro.
2514         (error): Replace hard-coded gcjh with TOOLNAME.
2515         (process_file): Likewise.
2516         (usage): Likewise.
2517         (version): Likewise.
2518         (help): Likewise.  Add help output for -force, -old, -trace and -J
2519         options.
2520         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2521         (options): Add force, old, trace and J fields.
2522         (main): Handle -force, -old, -trace and -J options.
2523
2524 2005-05-03  Tom Tromey  <tromey@redhat.com>
2525
2526         PR java/21245:
2527         * gjavah.c (main): Unlink output file on error.
2528
2529 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2530
2531         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2532         copyright.
2533
2534 2005-04-29  Tom Tromey  <tromey@redhat.com>
2535
2536         * expr.c (build_jni_stub): Updated for change to build_block.
2537
2538 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2539
2540         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2541
2542 2005-04-28  Andrew Haley  <aph@redhat.com>
2543
2544         PR java/19285
2545         * java-tree.h (soft_resolvepoolentry_node): New.
2546         (alloc_constant_fieldref): Declare.
2547         * expr.c (expand_java_field_op): Don't call class_init for
2548         accesses to static fields with indirect dispatch.
2549         * builtins.c (initialize_builtins): Add "__builtin_expect".
2550         * decl.c (soft_resolvepoolentry_node): New variable.
2551         (java_init_decl_processing): Create a decl for
2552         "_Jv_ResolvePoolEntry".
2553         * class.c (build_fieldref_cache_entry): New function.
2554         (build_static_field_ref): Rewrite for indirect dispatch.
2555         * constants.c (find_name_and_type_constant_tree): New function.
2556         (alloc_constant_fieldref): Likewise.
2557         (build_constants_constructor): Handle CONSTANT_Fieldref and
2558         CONSTANT_NameAndType.
2559
2560         PR java/21115
2561         * expr.c (force_evaluation_order): Convert outgoing args smaller
2562         than integer.
2563
2564 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2565
2566         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2567         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2568         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2569
2570 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2571
2572         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2573         to `unlock_stream' with `unlock_std_streams'.
2574
2575 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2576
2577         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2578         instead of just expr.h.
2579
2580 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2581
2582         * gjavah.c (main): Unlock the stdio streams.
2583         * jcf-dump.c (main): Likewise.
2584         * jv-scan.c (main): Likewise.
2585         * jvgenmain.c (main): Likewise.
2586
2587 2005-04-23  DJ Delorie  <dj@redhat.com>
2588
2589         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2590         parse.y: Adjust warning() callers.
2591
2592 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2593
2594         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2595         contructor.
2596
2597 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2598
2599         * gcj.texi: Fix typos and bogus example.
2600
2601 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2602
2603         * except.c: Fix a comment typo.
2604
2605 2005-04-19  Julian Brown  <julian@codesourcery.com>
2606
2607         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2608         indirect dispatch with PIC.
2609
2610 2005-04-18  Andrew Haley  <aph@redhat.com>
2611
2612         * java-except.h (struct eh_range.handler): Remove unused field.
2613         (handle_nested_ranges): Remove function declaration.
2614         (sanity_check_exception_range): Add function declaration.       
2615         * verify.c (verify_jvm_instructions): Remove call to
2616         handle_nested_ranges.
2617         * verify-glue.c (verify_jvm_instructions_new): Call
2618         sanity_check_exception_range.
2619         * except.c (link_handler, eh_range_freelist, link_handler,
2620         handle_nested_ranges): Remove.
2621         (add_handler): Rewrite.
2622         (sanity_check_exception_range): New function.
2623         (print_ranges): New function.
2624
2625 2005-04-13  Julian Brown  <julian@codesourcery.com>
2626
2627         * decl.c (finish_method): Give methods once-only linkage.
2628
2629 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2630
2631         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2632
2633 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2634
2635         * java-tree.h: Don't use PARAMS().
2636
2637 2005-04-07  Per Bothner  <per@bothner.com>
2638
2639         * class.c (push_class): By default, suppress debug output.
2640         (finish_class): Enable debug output for classes we're emitting.
2641
2642 2005-04-07  Andrew Haley  <aph@redhat.com>
2643
2644         * gcj.texi: Correct gcj-dbtool instructions.
2645
2646 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2647
2648         * gcj.texi: Fix a typo.
2649         * lang.c: Fix a comment typo.
2650
2651 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2652
2653         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2654         Mention recognized-and-ignored compatibility options.
2655         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2656         JvFree.
2657         (About CNI): Add Memory allocation section.
2658
2659 2005-04-01  Tom Tromey  <tromey@redhat.com>
2660
2661         * decl.c (java_init_decl_processing): Fix types of
2662         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2663         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2664         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2665
2666 2005-03-31  Jan Hubicka  <jh@suse.cz>
2667
2668         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2669         * class.c: Include cgraph.h
2670         (make_local_functoin_alias): Mark aslias as needed.
2671         * resource.c: Include cgraph.h
2672         (compile_resource_data): Go via cgraph interface.
2673
2674 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2675
2676         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2677
2678 2005-03-30  Tom Tromey  <tromey@redhat.com>
2679
2680         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2681         inner_class_info_index==0 or outer_class_info_index==0.
2682
2683 2005-03-29  Tom Tromey  <tromey@redhat.com>
2684
2685         * gcj.texi (libgcj Runtime Properties): Document
2686         gnu.gcj.runtime.endorsed.dirs.
2687
2688 2005-03-24  Anthony Green  <green@redhat.com>
2689
2690         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2691         'gcj-dbtool -p'.
2692
2693 2005-03-23  Tom Tromey  <tromey@redhat.com>
2694
2695         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2696         (parse_version): Use it.
2697
2698 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2699
2700         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2701
2702 2005-03-18  Andrew Haley  <aph@redhat.com>
2703
2704         PR java/20522
2705         * decl.c (update_aliases): Don't update variables that are about
2706         to die.
2707         (maybe_poplevels): Add comment.
2708
2709 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2710
2711         PR java/20502
2712         * jcf-parse.c (duplicate_class_warning): New function.
2713         (java_parse_file): Call duplicate_class_warning if 
2714         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2715         (parse_zip_file_entries): Likewise. Also set
2716         CLASS_FROM_CURRENTLY_COMPILED_P.
2717
2718 2005-03-16  Andrew Haley  <aph@redhat.com>
2719
2720         * expr.c (expand_java_arrayload): Don't generate a
2721         NullPointerException based on the type of the node.
2722         (build_java_array_length_access): Likewise.
2723
2724 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2725
2726         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2727
2728 2005-03-11  Tom Tromey  <tromey@redhat.com>
2729
2730         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2731         (libgcj Runtime Properties): Document the default .db.
2732
2733 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2734
2735         PR java/20312
2736         * parse.y (checks_throws_clauses): Check exceptions list even when
2737         the base class does not come from a source file being compiled.
2738         (java_complete_lhs): Remove unused variable 'wfl'.
2739
2740 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2741
2742         PR java/20338
2743         * decl.c (finish_method): Emit _Jv_InitClass for private static
2744         methods inside inner classes as well.
2745
2746 2005-03-08  Julian Brown  <julian@codesourcery.com>
2747         * Revert patch from 2005-03-08 for causing bootstrap failure on
2748         ppc-darwin.
2749
2750 2005-03-08  Julian Brown  <julian@codesourcery.com>
2751
2752         * decl.c (finish_method): Give methods once-only linkage.
2753
2754 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2755
2756         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2757
2758 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2759
2760         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2761         can_widen_reference_to if the C++ ABI is in use.
2762         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2763         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2764         type_isresolved, init_state, set_pc, state_get_pc,
2765         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2766         (verify_fail): Report the current PC from the verifier context.
2767         (free_state): Remove #if 0 block to enable this function.
2768         (free_verifier_context): Call free_state on state_list iterator
2769         values before freeing them.
2770         * expr.c (pop_type_0): Pop correct type for error message when stack
2771         contains a multi-word type.
2772
2773 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2774
2775         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2776         for known NULL array length access.
2777
2778 2005-03-07  Tom Tromey  <tromey@redhat.com>
2779
2780         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2781
2782 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2783
2784         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2785         typeck.c: Update copyright.
2786
2787 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2788
2789         Remove xref code.
2790         * xref.c, xref.h: Remove file.
2791         * Make-lang.in (java/xref.o): Remove.
2792         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2793         * lang.c (flag_emit_xref): Remove definition.
2794         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2795         * typeck.c (convert): Remove use of do_not_fold.
2796         * parse.y (do_not_fold): Remove definition.
2797         (parser grammar): Remove xref code.
2798         (maybe_create_class_interface_decl, create_class): Likewise.
2799         (register_fields, method_header, finish_method_declaration): Likewise.
2800         (declare_local_variables, source_end_java_method): Likewise.
2801         (java_complete_expand_classes): Do not set do_not_fold.
2802         (java_complete_expand_method): Remove xref code.
2803         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2804         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2805         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2806         (patch_synchronized_statement, patch_throw_statement): Likewise.
2807         (maybe_build_class_init_for_field): Likewise.
2808
2809 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2810
2811         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2812         instead of IS_NON_TYPE_CODE_CLASS.
2813
2814 2005-03-04  Andrew Haley  <aph@redhat.com>
2815
2816         PR java/18362
2817         * class.c (set_method_index): Don't set method_index if it is
2818         NULL_TREE.
2819         (layout_class_method): Don't complain about "non-static method foo
2820         overrides static method" in the case of indirect dispatch.
2821
2822 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2823
2824         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2825         warning.
2826         * Make-lang.in: Don't elide warnings in jcf-io.c.
2827
2828 2005-03-01  Per Bothner  <per@bothner.com>
2829
2830         PR java/8608
2831         * check-init.c (wfl): Remove static.
2832         (final_assign_error, check_init): Replace calls to parse_error_context
2833         by plain error.
2834         (check_init): Save, set, and restore input_location for each exp.
2835
2836 2005-03-01  Per Bothner  <per@bothner.com>
2837
2838         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2839         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2840         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2841
2842 2005-03-01  Per Bothner  <per@bothner.com>
2843
2844         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2845
2846 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2847
2848         PR libgcj/16923
2849         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2850         JvVMOption.
2851
2852 2005-02-22  Tom Tromey  <tromey@redhat.com>
2853
2854         PR java/20056:
2855         * verify-impl.c (EITHER): New define.
2856         (types_compatible): Handle it.
2857         (check_field_constant): Use it.
2858
2859 2005-02-18  Tom Tromey  <tromey@redhat.com>
2860
2861         PR java/20056:
2862         * verify-impl.c (types_equal): Fixed test.
2863
2864         PR java/20056:
2865         * verify-glue.c (vfy_class_has_field): New function.
2866         * verify.h (vfy_class_has_field): Declare.
2867         * verify-impl.c (check_field_constant): Added 'putfield'
2868         argument.
2869         (verify_instructions_0): Updated.
2870         (types_equal): New function.
2871
2872 2005-02-14  Tom Tromey  <tromey@redhat.com>
2873
2874         PR java/19921:
2875         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2876         stack effect of multianewarray.
2877
2878 2005-02-14  Andrew Haley  <aph@redhat.com>
2879
2880         PR java/19907
2881         * expr.c (expand_byte_code): Call promote_arguments().
2882         (promote_arguments): New function.
2883         * decl.c (check_local_unnamed_variable): Remove special case for
2884         new verifier.
2885         (find_local_variable): Promote all boolean types to int
2886         when searching for local variable decls.
2887
2888 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2889
2890         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2891         parse-scan.y: Update copyright.
2892
2893 2005-02-11  Per Bothner  <per@bothner.com>
2894
2895         PR java/15543
2896         * parse-scan.y (input_location): Remove variable.
2897         (main_input_filename): New - replaces input_filename, which isn't
2898         settable if USE_MAPPED_LOCATION.
2899         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2900         so we don't reference input_location or wfl_operator in that case.
2901         * jv-scan.c (expand_location): Remove - no longer used.
2902         (main): Set main_input_filename rather than input_filename.
2903
2904 2005-02-09  Richard Henderson  <rth@redhat.com>
2905
2906         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2907         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2908
2909 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2910
2911         * expr.c (add_type_assertion): Use the proper enumeration type,
2912         since this is what htab_find_slot() is expecting.
2913
2914 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2915
2916         * gcj.texi: Update copyright dates.
2917
2918 2005-02-02  Tom Tromey  <tromey@redhat.com>
2919
2920         * gcj.texi (libgcj Runtime Properties): Default library_control
2921         to 'cache'.
2922
2923 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2924
2925         PR java/15543
2926         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2927         (modifiers) when square brackets are present in a declaration for
2928         a final paramter.
2929         * jv-scan.c (main): Set input_filename and input_line.
2930
2931 2005-02-01  Tom Tromey  <tromey@redhat.com>
2932
2933         PR java/19742:
2934         * gjavah.c (get_field_name): Don't override name for JNI header.
2935
2936 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2937
2938         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2939         of unsigned types using iushr and lushr JVM bytecodes.
2940
2941 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2942
2943         PR java/19738
2944         * gjavah.c (jni_print_float): Do not emit floating-point
2945         initialiser for a static final field.
2946         (jni_print_double): Likewise.
2947
2948 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2949
2950         Revert:
2951         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2952         * gjavah.c (print_field_info): Mark static data members of
2953         floating-point type with "__extension__".
2954
2955 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2956
2957         * gjavah.c (print_field_info): Mark static data members of
2958         floating-point type with "__extension__".
2959
2960 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2961
2962         PR java/9157
2963         * parse.y (build_string_concatenation): Remove redundant if.
2964         (patch_conditional_expr): Attempt to patch_string() the condition
2965         of a ?: as well, in addition to its other operands.
2966
2967 2005-01-25  Tom Tromey  <tromey@redhat.com>
2968
2969         * Make-lang.in (java/java-tree-inline.o): Removed.
2970
2971 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2972
2973         PR java/19070
2974         * parse.y (patch_binop): Allow comparisons against NULL only
2975         if the other operand is of a reference type.
2976
2977 2005-01-24  Tom Tromey  <tromey@redhat.com>
2978
2979         * java-tree.h (gcj_abi_version): Declare.
2980         * class.c (make_class_data): Push gcj_abi_version into "next"
2981         field.  Renamed field.
2982         * decl.c (gcj_abi_version): New global.
2983         (parse_version): New function.
2984         (java_init_decl_processing): Call it.  Renamed 'next' field.
2985         Include version.h.
2986         (GCJ_BINARYCOMPAT_ADDITION): New define.
2987
2988 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2989
2990         PR java/19295
2991         * jcf-write.c (generate_bytecode_insns): Conversions between
2992         integer types of the same precision shouldn't generate widening
2993         or narrowing conversion bytecodes.
2994
2995 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2996
2997         * java-except.h, java-tree.h: Remove unused prototypes.
2998
2999 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
3000
3001         PR java/18091:
3002         * jcf-write.c (perform_relocations): Don't call memcpy if source
3003         and destination are the same.
3004
3005 2005-01-17  Tom Tromey  <tromey@redhat.com>
3006
3007         * verify-impl.c (get_short): Sign extend.
3008         (get_int): Likewise.
3009
3010 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
3011
3012         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3013         with TYPE_SIZE.
3014
3015 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3016
3017         * verify.c: Revert to the version before the BC-ABI merge.
3018
3019 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3020
3021         PR java/19277
3022         * check-init.c (check_init): Take care of references that do not
3023         have an explicit final variable declaration (e.g. array length
3024         access) for pre/post in/de-crement operators.
3025
3026 2005-01-08  Mark Wielaard  <mark@klomp.org>
3027
3028         * parse.y (process_imports): Allocate (and free) original_name only
3029         when not already defined.
3030         * jcf-parse.c (read_class): Free results of find_class() and
3031         lrealpath().
3032         (java_parse_file): Keep pointer to head of file_list and free when
3033         done. Free result of lrealpath().
3034
3035 2005-01-05  Tom Tromey  <tromey@redhat.com>
3036
3037         * gcj.texi (Standard Properties): java.ext.dirs is now used.
3038
3039 2004-12-20  Andrew Haley  <aph@redhat.com>
3040
3041         * typeck.c: Use fold_convert for ints and booleans.
3042
3043 2004-12-17  Andrew Haley  <aph@redhat.com>
3044
3045         PR java/18931
3046         * typeck.c (convert): Use a CONVERT_EXPR when converting to
3047         BOOLEAN_TYPE or CHAR_TYPE.
3048         (convert_to_boolean, convert_to_char) : Remove.
3049         * convert.h (convert_to_boolean, convert_to_char) : Remove.
3050         * expr.c (expand_load_internal): Do type conversion if type is not
3051         as required.
3052
3053 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
3054
3055         PR target/18459
3056         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3057         Update comment.
3058
3059 2004-12-07  Andrew Haley  <aph@redhat.com>
3060
3061         PR java/18811:
3062         * jcf-parse.c (load_class): Remove sanity test for missing inner
3063         class file.
3064
3065 2004-12-06  Tom Tromey  <tromey@redhat.com>
3066
3067         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3068         (java.uninstall): Likewise.
3069         (java.maintainer-clean): Likewise.
3070         (.INTERMEDIATE): Likewise.
3071         (java.install-man): Likewise.
3072         (gcj-dbtool.pod): New target.
3073         * gcj.texi (Code Generation): Document -findirect-dispatch.
3074         (libgcj Runtime Properties): Document
3075         gnu.gcj.precompiled.db.path.
3076         (Top): Link to "Invoking gcj-dbtool".
3077
3078 2004-12-06  Tom Tromey  <tromey@redhat.com>
3079
3080         PR java/14853:
3081         * java-tree.h (extract_field_decl): Declare.
3082         * parse.y (extract_field_decl): Renamed from
3083         strip_out_static_field_access_decl.  No longer static.
3084         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3085
3086 2004-12-03  Tom Tromey  <tromey@redhat.com>
3087
3088         * lang.c (flag_new_verifier): Define.
3089         (java_post_options): Set flag_new_verifier if indirect dispatch
3090         is being used.
3091         * lang.opt (fnew-verifier): Removed.
3092
3093 2004-12-03  Tom Tromey  <tromey@redhat.com>
3094
3095         PR bootstrap/14614:
3096         * Make-lang.in (java.install-common): Only install transformed
3097         gcjh if gcj-cross exists.
3098
3099 2004-12-03  Andrew Haley  <aph@redhat.com>
3100
3101         PR java/18812
3102         * except.c (link_handler): Patch 'outer' field of siblings of the
3103         range we're demoting.
3104
3105 2004-12-03  Andrew Haley  <aph@redhat.com>
3106
3107         PR java/18697
3108         * class.c (layout_class_method): Don't fail to override a method
3109         simply because it has DECL_ARTIFICIAL set.
3110
3111 2004-12-02  Tom Tromey  <tromey@redhat.com>
3112
3113         PR java/16675:
3114         * parse.y (craft_constructor): Special case null_pointer_node.
3115
3116 2004-12-02  Tom Tromey  <tromey@redhat.com>
3117
3118         PR java/18741:
3119         * java-gimplify.c (java_gimplify_expr): Don't call
3120         SET_EXPR_LOCATION unless wrapped tree is an expression.
3121
3122 2004-11-27  Per Bothner  <per@bothner.com>
3123
3124         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
3125         Fix fencepost error in 'i', which got executed one too many times.
3126         Also, fold memcpy into explicit loop, as originally intended.
3127         Also, free temporary 'buf' which otherwise leaks.
3128
3129 2004-11-27  Per Bothner  <per@bothner.com>
3130
3131         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3132         local static variables if not USE_MAPPED_LOCATION.
3133
3134 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
3135
3136         * class.c, decl.c, expr.c: Fix comment typos.
3137
3138 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3139
3140         PR java/18305
3141         * decl.c (end_java_method): Call
3142         attach_init_test_initialization_flags on all the init_decls.
3143         * parse.y (attach_init_test_initialization_flags): Move to ...
3144         * expr.c (attach_init_test_initialization_flags): here and
3145         support BIND_EXPR also.
3146         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3147         * jcf-parse.c (parse_class_file): Don't disable class init
3148         optimization.
3149
3150 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3151
3152         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3153         in diagnostics.
3154
3155 2004-11-24  Richard Henderson  <rth@redhat.com>
3156
3157         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3158         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3159
3160 2004-11-24  Tom Tromey  <tromey@redhat.com>
3161
3162         * verify.c (defer_merging): Don't use C++-style comment.
3163         * verify.h (java_opcode): Added java_opcode_end.
3164         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3165
3166         * verify-impl.c (vfy_push_type): Removed bogus "return".
3167         (initialize_stack): Use vfy_alloc and vfy_free.
3168         (verify_instructions_0): Likewise.
3169
3170         * Merged gcj-abi-2-dev-branch to trunk.
3171
3172 2004-11-24  Andrew Haley  <aph@redhat.com>
3173
3174         * jcf-parse.c (parse_class_file): Set file_start_location.
3175
3176 2004-11-10  Tom Tromey  <tromey@redhat.com>
3177
3178         * class.c (make_field_value): Don't call build_static_field_ref.
3179         (build_static_field_ref): Don't emit direct references when using
3180         indirect dispatch.
3181
3182         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3183         -verbose:class into man page synopsis.
3184
3185 2004-11-09  Tom Tromey  <tromey@redhat.com>
3186
3187         * expr.c (build_java_arraystore_check): Still generate check if
3188         element type is itself an array.
3189
3190 2004-11-08  Tom Tromey  <tromey@redhat.com>
3191
3192         * java-tree.h (soft_check_assignment_node): Removed.
3193         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3194         * decl.c (java_init_decl_processing): Don't initialize
3195         soft_check_assignment_node.
3196
3197 2004-11-05  Tom Tromey  <tromey@redhat.com>
3198
3199         * class.c (layout_class_methods): Don't add Miranda methods when
3200         using indirect dispatch.
3201
3202 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3203
3204         * class.c (make_class_data): Call emit_assertion_table to set the
3205         'assertion_table' field.
3206         (build_signature_for_libgcj): Move here from expr.c.
3207         (add_assertion_table_entry): New function. Callback for assertion
3208         hashtable traversal.
3209         (emit_assertion_table): New. Take class argument, and generate
3210         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3211         * decl.c (init_decl_processing): Define assertion_entry_type record.
3212         Push 'assertion_table' class field instead of 'verify'.
3213         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3214         (type_assertion_hash): Include 'assertion_code' in hash.
3215         (add_type_assertion): Rewritten. Take class and assertion_code
3216         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3217         (can_widen_reference_to): Use new add_type_assertion() arguments.
3218         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3219         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3220         (verify_identifier_node): Removed.
3221         (assertion_entry_type, assertion_table_type): New.
3222         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3223         assertion code definitions.
3224         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3225         'target_type' to 'op1' and 'op2'.
3226         (add_type_assertion): Declare.
3227         (lang_printable_name_wls): Remove unused definition.
3228         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3229         to emit runtime assertion.
3230         (vfy_note_stack_type): Clean up non-C90 declarations.
3231         (vfy_note_local_type): Likewise.
3232         * verify.h (vfy_is_assignable_from): Declare.
3233         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3234         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3235         instead of is_assignable_from_slow().
3236         (types_compatible): Reinstate ref_compatible() call.
3237
3238 2004-11-04  Tom Tromey  <tromey@redhat.com>
3239
3240         * class.c (build_static_field_ref): Reverted previous patch.
3241
3242         * class.c (build_static_field_ref): Don't emit direct references
3243         when using indirect dispatch.
3244
3245 2004-11-03  Tom Tromey  <tromey@redhat.com>
3246
3247         * expr.c (expand_java_arrayload): Set lhs_type_node.
3248         (expand_java_arraystore): Set rhs_type_node.
3249
3250 2004-11-02  Tom Tromey  <tromey@redhat.com>
3251
3252         * jcf-parse.c (compute_class_name): Use filename length from zip
3253         directory, not strlen.
3254
3255         * expr.c (expand_invoke): Mark new interface methods as abstract.
3256
3257 2004-11-01  Tom Tromey  <tromey@redhat.com>
3258
3259         * verify-impl.c (push_jump): Removed check for uninitialized
3260         objects.
3261         (push_exception_jump): Likewise.
3262         (handle_ret_insn): Likewise.
3263         (handle_jsr_insn): Likewise.
3264         (state_check_no_uninitialized_objects): Removed.
3265
3266         * decl.c (check_local_unnamed_variable): Recognize
3267         promoted-to-int parameters when using the new verifier.
3268         * expr.c (expand_java_arraystore): Explicitly request array type
3269         when using new verifier.
3270         (expand_java_arrayload): Likewise.
3271         (invoke_build_dtable): Don't pass object_type_node as
3272         expression argument to build_java_indirect_ref.
3273         (build_java_check_indexed_type): Do nothing.
3274         (build_java_arraystore_check): Handle case where array doesn't
3275         have array type.
3276         (build_java_array_length_access): Likewise.
3277         (expand_invoke): Handle case where interface overrides a method
3278         from Object.
3279         (pop_type_0): Always succeed for reference types.
3280         (process_jvm_instruction): Don't pop a value in a dead
3281         exception handler.
3282         (pop_arguments): Convert arguments to correct types.
3283
3284 2004-10-29  Andrew Haley  <aph@redhat.com>
3285
3286         * jcf-parse.c (give_name_to_class): Remove line that was
3287         incorrectly merged.
3288
3289 2004-10-29  Andrew Haley  <aph@redhat.com>
3290
3291         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3292
3293 2004-10-20  Andrew Haley  <aph@redhat.com>
3294
3295         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3296
3297 2004-10-26  Tom Tromey  <tromey@redhat.com>
3298
3299         * verify.h (vfy_notify_verified): Removed.
3300         * verify-glue.c (vfy_notify_verified): Removed.
3301
3302 2004-10-26  Tom Tromey  <tromey@redhat.com>
3303
3304         * verify-impl.c (debug_print_state): Declare `i' before code.
3305         (merge_types): Modify `t' when it is null_type.
3306
3307 2004-10-26  Tom Tromey  <tromey@redhat.com>
3308
3309         * verify-impl.c (type_print): Renamed from print.  Now static and
3310         takes an argument.
3311         (debug_print_state): Use type_print.
3312
3313 2004-10-25  Tom Tromey  <tromey@redhat.com>
3314
3315         * expr.c (build_invokeinterface): Compute correct offset for
3316         index into interface methods.
3317
3318 2004-10-20  Tom Tromey  <tromey@redhat.com>
3319
3320         * java-tree.h (verify_jvm_instructions_new): Declare.
3321
3322         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3323         command line.
3324
3325         * verify-impl.c (verify_instructions): Correctly handle wide
3326         types on the stack.
3327         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3328         (vfy_get_component_type): Strip pointer types.
3329         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3330         types.
3331         Include java-except.h.
3332
3333 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3334
3335         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3336         vfy_push_type_t, set_variable, add_new_state, merge_into,
3337         handle_jsr_insn, branch_prepass, check_class_constant,
3338         check_wide_constant, get_one_type, compute_static_types,
3339         verify_instructions_0): Clean up C99 declarations after statements.
3340
3341 2004-10-20  Tom Tromey  <tromey@redhat.com>
3342
3343         * verify-impl.c (merge_refs): Compare reference against iterator,
3344         not ref2.
3345
3346         * verify-glue.c (vfy_tag): Mask off resolved flag.
3347
3348 2004-10-19  Tom Tromey  <tromey@redhat.com>
3349
3350         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3351         (init_state_with_stack): Initialize `this_type' in state.
3352         (verify_method): Use debug_print.
3353         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3354         (vfy_note_stack_depth): Reverted last patch.
3355         (vfy_note_stack_type): Note pointer to Object, not Object.
3356         (vfy_note_local_type): Likewise.
3357
3358         * verify.h (vfy_note_instruction_seen): Declare.
3359         * verify-glue.c (verify_jvm_instructions_new): Set
3360         BCODE_EXCEPTION_TARGET on target instruction.
3361         (vfy_note_instruction_seen): New function.
3362         * verify-impl.c (FLAG_INSN_SEEN): New define.
3363         (verify_instructions_0): Set flag on instruction.  Save state for
3364         PC=0 later.
3365         (verify_instructions): Call vfy_note_instruction_seen.
3366
3367         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3368         (verify_jvm_instructions_new): Call method_init_exceptions,
3369         add_handler, and handle_nested_ranges.
3370         * verify-impl.c (verify_method): Return 1 on success.
3371         (verify_instructions_0): Save the state at PC=0.
3372
3373         * verify-impl.c (init_type_from_class): Set is_resolved and
3374         ref_next on new ref_intersection.
3375         (init_type_from_string): Likewise.
3376
3377 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3378
3379         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3380         if flag_new_verifier is set.
3381         * java-tree.h (flag_new_verifier): Declare.
3382         * lang.opt (fnew-verifier): New option.
3383         * verify-impl.c: Work around namespace pollution by undef'ing
3384         'current_class'.
3385         (struct verifier_context): Make 'bytecode' const.
3386         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3387         (types_compatible): For the BC-ABI, always consider reference types
3388         compatible.
3389         (check_class_constant): Use vfr->current_class.
3390         (check_constant): Likewise.
3391         (check_wide_constant): Likewise.
3392         (check_field_constant): Check for 'L' at start of type name.
3393         (get_one_type): Return pointer instead of type. Set type result in
3394         caller via passed type pointer.
3395         (compute_argument_types): Update to use new get_one_type arguments.
3396         (compute_return_type): Likewise.
3397         (make_verifier_context): New. Allocate and initialize 'vfr'.
3398         (free_verifier_context): New. Free 'vfr' and its contents.
3399         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3400         and free_verifier_context.
3401
3402 2004-10-15  Tom Tromey  <tromey@redhat.com>
3403
3404         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3405         * verify.h (vfy_fail): Fixed formatting.
3406
3407         * verify-impl.c (vfr): Fixed comment formatting.
3408         (collapse_type): New function.
3409         (verify_instructions): Notify compiler about type map.
3410         * verify.h (vfy_note_stack_depth): Updated.
3411         (vfy_note_stack_type): Likewise.
3412         (vfy_note_local_type): Likewise.
3413         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3414         Declare.
3415         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3416         state.  Added `method' argument.
3417         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3418         argument.
3419         (vfy_note_local_type): New function.
3420         (vfy_unsuitable_type): Likewise.
3421         (vfy_return_address_type): Likewise.
3422         (vfy_null_type): Likewise.
3423
3424         * verify.h (VFY_IN_GCC): Removed.
3425         (VFY_WANT_TYPEMAP): Removed.
3426         * verify-impl.c (verify_instructions_0): Removed useless "\".
3427         (struct state) <next>: Uncomment.
3428
3429 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3430
3431         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3432         C-style.
3433
3434 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3435
3436         * Make-lang.in (verify.o): Re-enabled this target.
3437         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3438         (vfy_get_interface): Likewise.
3439         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3440         * verify.h (verify_jvm_instructions_new): Declare.
3441         * verify-impl.c (free_state): Temporarily comment out unused
3442         function.
3443
3444 2004-10-06  Tom Tromey  <tromey@redhat.com>
3445
3446         * java-tree.h (JV_STATE_READ): New enum value.
3447
3448 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3449
3450         * verify.h: New file.
3451
3452 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3453
3454         * verify-impl.c, verify-glue.c, verify.h: New files.
3455         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3456
3457 2004-09-24  Andrew Haley  <aph@redhat.com>
3458
3459         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3460         for a slot if it's of pointer type.
3461
3462 2004-09-14  Tom Tromey  <tromey@redhat.com>
3463
3464         * class.c (make_class_data): Correctly initialize "state" field.
3465         Initialize "engine" field.
3466         * decl.c (java_init_decl_processing): Add "engine" field.
3467
3468 2004-09-10  Andrew Haley  <aph@redhat.com>
3469
3470         PR java/12760
3471         * expr.c (build_invokeinterface): Use fast method for interface
3472         dispatch.
3473         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3474         JTI_ITABLE_PTR_TYPE.
3475         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3476         (emit_symbol_table): Add new arg, element_size.
3477         * decl.c (java_init_decl_processing): Initialize Class.itable.
3478         * class.c (GEN_TABLE): New macro.
3479         (gen_indirect_dispatch_tables): Use it.  Add itable.
3480         (make_class_data): Add new arg for emit_symbol_table().
3481         Emit itable.
3482         (add_miranda_methods): Make sure search_class has been parsed.
3483         (emit_symbol_table): Add new arg, element_size.
3484
3485 2004-09-06  Andrew Haley  <aph@redhat.com>
3486
3487         * verify.c (merge_types): Return Object for all merges of
3488         interfaces.
3489         * expr.c (add_type_assertion): Don't generate assertions when
3490         source type is array of Object.
3491
3492 2004-09-03  Andrew Haley  <aph@redhat.com>
3493
3494         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3495
3496         * lang.c (java_post_options): Force flag_verify_invocations if
3497         we're not using indirect dispatch.
3498
3499         * expr.c (pop_type_0): Move test for interfaces before call to
3500         can_widen_reference_to().
3501         (build_signature_for_libgcj): Remove generation of canonical array
3502         type.
3503         (add_type_assertion): Canonicalize both arrays.
3504         Don't assert that type X can be assigned to Object.
3505         Don't assert that type X an be assigned to type X.
3506         Don't assert that Object can be assigned to type X.
3507         (can_widen_reference_to): Warn whenever we generate an assertion.
3508         (process_jvm_instruction): Use throwable_type_node for the type of
3509         an exception class.
3510
3511 2004-09-01  Andrew Haley  <aph@redhat.com>
3512
3513         * decl.c (java_init_decl_processing): Change
3514         verify_identifier_node to "__verify".
3515         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3516         * java-tree.h (verify_identifier_node): Change to "__verify".
3517
3518         * expr.c (build_signature_for_libgcj): New function.
3519         (add_type_assertion): Use it to construct signatures for
3520         source_type and target_type.
3521
3522 2004-08-27  Andrew Haley  <aph@redhat.com>
3523
3524         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3525         (verify_identifier_node): New.
3526         (TYPE_VERIFY_METHOD): New.
3527         (struct type_assertion): New type.
3528         * expr.c (type_assertion_eq): New function.
3529         (type_assertion_hash): New function.
3530         (add_type_assertion): New function.
3531         (can_widen_reference_to): Call add_type_assertion().
3532         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3533         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3534         (finish_class): Output TYPE_VERIFY_METHOD (type).
3535
3536         * decl.c (end_java_method): Nullify unused fields.
3537
3538 2004-08-17  Andrew Haley  <aph@redhat.com>
3539
3540         * verify.c (defer_merging): Quieten.
3541         * jcf-parse.c (load_class): Only try to open a class file if it's
3542         java.lang.Object or if it's part of the current compilation.
3543         Check that the class we just tried to load is the class we just
3544         loaded.  Quieten.
3545         (java_parse_file): Set flag_verify_invocations off if we're
3546         compiling from .class.
3547         (parse_zip_file_entries): Abort if we try to read a dummy class.
3548         * expr.c (can_widen_reference_to): Quieten.
3549         (build_invokevirtual): Abort if we try to invokevirtual an
3550         interface.
3551         (expand_invoke): Don't build a non-interface call to an interface.
3552         (build_instanceof): Don't do premature optimization if
3553         flag_verify_invocations is not set.
3554         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3555         from superclass.
3556         (build_static_field_ref): Add correct type conversion for
3557         field_address.
3558         (add_miranda_methods): Disable generation of Miranda methods for
3559         dummy classes.
3560         (layout_class_method): Don't complain about non-static method
3561         overrides static method with dummy classes.
3562
3563 2004-08-13  Tom Tromey  <tromey@redhat.com>
3564
3565         * class.c (build_static_field_ref): Re-enable atable lookups for
3566         static fields.
3567
3568         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3569
3570 2004-08-11  Tom Tromey  <tromey@redhat.com>
3571
3572         * gcj.texi (libgcj Runtime Properties): Document new properties.
3573
3574 2004-08-06  Andrew Haley  <aph@redhat.com>
3575
3576         * jcf-parse.c (load_class): Check that we really have loaded the
3577         class we're looking for.
3578
3579 2004-07-19  Andrew Haley  <aph@redhat.com>
3580
3581         * verify.c (verify_jvm_instructions): Comment change only.
3582
3583         * typeck.c (build_java_array_type): Add size field to array name.
3584
3585         * java-tree.h (LOCAL_SLOT_P): New.
3586         (update_aliases): Add PC argument.
3587         (pushdecl_function_level): New function.
3588
3589         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3590         MODIFY_EXPR, and SAVE_EXPR.
3591         (java_gimplify_modify_expr): New function.
3592
3593         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3594         (expand_iinc): Pass PC to update_aliases().
3595         (STORE_INTERNAL): Likewise.
3596         (process_jvm_instruction): Likewise.
3597
3598         * decl.c (base_decl_map): New variable.
3599         (uniq): New variable.
3600         (update_aliases): Rewrite with more thorough checking.
3601         (debug_variable_p): New function.
3602         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3603         (check_local_named_variable): Delete whole function.
3604         (initialize_local_variable): New function.
3605         (check_local_unnamed_variable): Add checks and comments.
3606         (find_local_variable): Rewrite.
3607         (java_replace_reference): New function.
3608         (function_binding_level): New variable.
3609         (pushdecl_function_level): New function.
3610         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3611         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3612         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3613         function_binding_level.
3614         (end_java_method): Null unused fields to save memory.
3615
3616 2004-06-29  Andrew Haley  <aph@redhat.com>
3617
3618         * except.c (expand_start_java_handler): Push a new binding level.
3619         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3620         register_exception_range() to register where we'll do it.
3621         (expand_end_java_handler): Remove old bogus code.  Replace with
3622         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3623         the top of the expression we're curently building.
3624         (maybe_end_try): Delete.
3625         * decl.c (binding_level.exception_range): New field.
3626         (clear_binding_level): Add field exception_range.  Reformat.
3627         (poplevel): Call expand_end_java_handler().
3628         (poplevel): Call java_add_stmt only if functionbody is false.
3629         (maybe_poplevels): Don't call maybe_end_try() from here.
3630         (end_java_method): Clear no longer used trees in function decl.
3631         (register_exception_range): New function.
3632         * java-tree.h (register_exception_range, struct eh_range): Declare.
3633
3634 2004-06-22  Andrew Haley  <aph@redhat.com>
3635
3636         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3637         the otable.
3638         * check-init.c (get_variable_decl): Teach check-init about
3639         FIELD_DECLs addressed via the otable.
3640         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3641         CLASS_PARSED_P.
3642
3643 2004-05-28  Andrew Haley  <aph@redhat.com>
3644
3645         * jcf-parse.c (load_class): Don't try to read a class that we've
3646         already read.
3647
3648         * expr.c (build_invokeinterface): Use the old-fashioned way of
3649         doing indirect dispatch: look up interfaces by name.
3650         * java-tree.h (enum java_tree_index): Add
3651         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3652         * decl.c (java_init_decl_processing): Add
3653         soft_lookupinterfacemethodbyname_node.
3654
3655         * gjavah.c (print_method_info): Final methods have vtable entries,
3656         so gjavah needs to output them.
3657         * class.c (layout_class_method): Generate vtable entries for final
3658         methods.
3659         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3660         dispatch, even if a method is final.
3661
3662 2004-05-25  Andrew Haley  <aph@redhat.com>
3663
3664         * class.c (build_symbol_entry): Convert the names of constructors
3665         to init_identifier_node when generating an entry for the indirect
3666         dispatch table.
3667
3668         * expr.c (build_known_method_ref): Generate indirect calls for
3669         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3670
3671 2004-05-24  Andrew Haley  <aph@redhat.com>
3672
3673         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3674         atable element is of the right type.
3675
3676         * class.c (build_static_field_ref): Cast pointer to correct type
3677         for field.
3678
3679 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3680
3681         * Merged with HEAD as of 20040514. Diff against
3682         gcj-abi-2-merge-20040514.
3683
3684 2004-04-16  Andrew Haley  <aph@redhat.com>
3685
3686         * verify.c (check_pending_block): Disable subroutine checks.
3687         (defer_merging): New function.
3688         (merge_types): If types are dummy, use defer_merging to combine them.
3689         (verify_jvm_instructions): If invocation is invokeinterface and
3690         target is dummy, assume target really is an interface.
3691
3692         * parse.y (patch_invoke): Break out call to java_create_object.
3693
3694         * lang.c (flag_verify_invocations): New.
3695
3696         * jcf-parse.c (load_class): If we've already failed to load a
3697         class, don't try again.
3698         (load_class): If we can't find a .class file, don't fail, but emit
3699         a warning.
3700         (parse_class_file): Don't act on dummy methods.
3701
3702         * java-tree.h (flag_verify_invocations): New.
3703         (TYPE_DUMMY): New.
3704         (lang_type.dummy_class): New field.
3705         (java_create_object): New function.
3706         (METHOD_DUMMY): New.
3707
3708         * expr.c (build_field_ref): Widen field offset.
3709         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3710         that each of its elements is compatible with the one we're
3711         popping.
3712         (pop_type_0): Issue a warning to say that we need to generate a
3713         runtime check.
3714         (java_create_object): New function.
3715         (build_field_ref): Only generate hard refs if we're not using
3716         indirect dispatch.
3717         (expand_java_field_op): If we're using !verify_invocations and we
3718         see a missing field, generate a decl for it.
3719
3720         (expand_invoke): If a class doesn't have the method we seek and
3721         we're using !flag_verify_invocations, generate a decl for the
3722         method now.
3723
3724         (build_known_method_ref): Always use indirect dispatch via the
3725         atable for static methods.
3726
3727         (expand_java_NEW): Break out object creation into new function,
3728         java_create_object.
3729
3730         (can_widen_reference_to): Issue a warning to say that we need to
3731         generate a runtime check.
3732
3733         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3734         (make_method_value): Also use index for interfaces.
3735         (make_class_data): Skip dummy field for inherited data.
3736         Don't build method array for dummy methods.
3737         Set size_in_byte to -1 when using inirect dispatch
3738         Don't build a hard class ref if we don't have a hard ref to our
3739         superclass, or if we're using inirect dispatch.
3740         Null out dispatch tables.
3741
3742         (layout_class_method): Don't complain about non-static method
3743         overrides static method is method is artificial.
3744
3745         (build_static_field_ref): Disable atable references to static
3746         fields for the time being.
3747
3748         (layout_class_methods): Check for CLASS_INTERFACE as
3749         well as CLASS_ABSTRACT.
3750
3751 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3752
3753         * class.c (make_class_data): Don't check flag_inline_functions.
3754         * lang.c (flag_really_inline): Remove unused flag.
3755         (java_handle_option): Don't set it here.  Remove special handling
3756         of flag_inline_functions for Java.
3757         (java_init): Don't set flag_inline_trees here.  Already done...
3758         (java_post_options): ...here.  Don't clear flag_inline_functions.
3759
3760 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3761
3762         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3763         (java_gimplify_exit_block_expr): New function.
3764         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3765         LABELED_BLOCK_EXPR.
3766         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3767         (EXIT_BLOCK_EXPR): Likewise.
3768         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3769         (LABELED_BLOCK_BODY): Likewise.
3770         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3771         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3772         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3773         TREE_OPERAND.
3774         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3775         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3776         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3777         second operand of EXIT_BLOCK_EXPR.
3778         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3779         TREE_OPERAND.
3780         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3781
3782 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3783
3784         * xref.h (xref_flag_value): Remove.
3785         (xref_set_data, xref_get_data): Likewise.
3786         (xref_set_current_fp): Likewise.
3787         (XREF_NONE): Likewise.
3788         (XREF_GET_DATA): Likewise.
3789         * xref.c (xref_flag_value): Remove.
3790         (xref_set_data, xref_get_data): Likewise.
3791         (xref_set_current_fp): Likewise.
3792
3793 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3794
3795         * gjavah.c (output_directory): Make static.
3796         (temp_directory): Likewise.
3797
3798 2004-11-15  Tom Tromey  <tromey@redhat.com>
3799
3800         * decl.c (instn_ptr_type_node): Removed.
3801         (lineNumbers_ptr_type_node): Removed.
3802         (jint_type): Removed.
3803         (jint_ptr_type): Removed.
3804
3805 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3806
3807         PR java/15576
3808         * check-init.c (check_init): Ignore DECL_EXPR.
3809         * expr.c (always_initialize_class_p): Reenable.
3810         (build_class_init): Use a variable to store the decl.  Also use
3811         boolean_false_node instead of integer_zero_node.
3812         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3813         to the block.
3814
3815 2004-11-08  Tom Tromey  <tromey@redhat.com>
3816
3817         PR java/16843:
3818         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3819         generating a JNI header.
3820         (print_field_info): Handle JNI headers.
3821         (jni_print_float): Likewise.
3822         (jni_print_double): Likewise.
3823
3824 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3825
3826         * decl.c (end_java_method): Remove duplicated code.
3827
3828 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3829             Gerald Pfeifer  <gerald@pfeifer.com>
3830
3831         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3832         as well.
3833
3834 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3835
3836         PR java/17265
3837         * class.c: Reinstate 2004-08-18 patch.
3838         (make_local_function_alias): Don't create an alias for extern (native)
3839         functions.
3840
3841 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3842
3843         PR java/17265
3844         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3845         (make_method_value): Likewise.
3846
3847 2004-10-21  Andrew Haley  <aph@redhat.com>
3848
3849         PR java/18091:
3850         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3851
3852 2004-10-20  Andrew Haley  <aph@redhat.com>
3853
3854         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3855         Remove duplicated code block.
3856
3857 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3858
3859         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3860         New rules to work around old Bison warnings.
3861
3862 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3863
3864         * class.c (ident_subst): Always alloca buffer.
3865         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3866         opcode after including javaop.def.
3867         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3868         conditional expression that exits, to avoid warnings.
3869         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3870         a user of an extension.
3871         * win32-host.c: Move check down to have non-empty file when
3872         WIN32 is not defined.
3873
3874         * Make-lang.in (java-warn): Add STRICT_WARN.
3875         (java/jcf-io.o-warn): Don't have Werror for this file.
3876         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3877
3878 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3879
3880         * expr.c (expr_add_location): Move declaration to before all
3881         statements.
3882         * parse.y (java_expand_classes): Ditto.
3883         * lex.c (java_peek_unicode): Ditto.
3884
3885 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3886
3887         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3888         if possible, else convert `foo' to 'foo'.
3889         * class.c: Likewise.
3890         * decl.c: Likewise.
3891         * expr.c: Likewise.
3892         * jcf-io.c: Likewise.
3893         * jcf-parse.c: Likewise.
3894         * lang.c: Likewise.
3895         * lex.c: Likewise.
3896         * parse.h: Likewise.
3897
3898 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3899
3900         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3901         rename parameter 'msg' to 'msgid' in function declaration.
3902         (issue_warning_error_from_context): Likewise.
3903         (yyerror): Rename parameter 'msg' to 'msgid'.
3904         (all over): Use new quoting style for diagnostics.
3905
3906 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3907
3908         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3909         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3910         Update copyright.
3911
3912 2004-10-14  Matt Austern  <austern@apple.com>
3913
3914         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3915         pointer_set_t* now.
3916
3917 2004-10-13  Tom Tromey  <tromey@redhat.com>
3918
3919         PR java/15578:
3920         * lang.opt (--extdirs): Document.
3921         * jvspec.c (lang_specific_driver): Recognize -encoding and
3922         -extdirs.
3923
3924 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3925
3926         * parse.y (issue_warning_error_from_context): Use va_list *
3927         instead of va_list parameter.
3928         (parse_error_context): Update call.
3929         (parse_warning_context): Likewise.
3930
3931 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3932
3933         * parse.y, parse-scan.y: Add list of diagnostic messages to
3934         insulate translation template from version of yacc/bison used
3935         to compile the grammar.
3936
3937 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3938
3939         Prepare for %q, %< and %> in diagnostic message strings.
3940         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3941         Name second parameter 'msgid'.
3942         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3943         (issue_warning_error_from_context): Use pretty-printer functions
3944         instead of vsprintf for constructing formatted messages. Rename
3945         parameter 'msg' to 'msgid'.
3946         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3947         (parse_warning_context): Likewise.
3948
3949 2004-10-05  Andrew Haley  <aph@redhat.com>
3950
3951         PR java/17779
3952         * jcf-parse.c (parse_zip_file_entries): If a class has a
3953         superclass and a TYPE_SIZE of zero, lay it out.
3954
3955 2004-09-30  Andrew Haley  <aph@redhat.com>
3956
3957         PR java/17733
3958         * jcf-parse.c (compute_class_name): Rewrite.
3959
3960 2004-10-01  Jan Hubicka  <jh@suse.cz>
3961
3962         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3963
3964 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3965
3966         * lex.c: Fix a comment typo.
3967
3968 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3969
3970         * java-tree.h: Fix a comment typo.
3971
3972 2004-09-30  Per Bothner  <per@bothner.com>
3973
3974         Simplify lexer.  Implement --enable-mapped-location support.
3975         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3976         (parse_source_file_1): Pass filename as extra parameter, so we can call
3977         linemap_add and set input_location here, rather than in both callers.
3978         (read_class): Pass copied filename to parse_source_file_1.
3979         Don't initialize wfl_operator - only needed for source compilation.
3980         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3981         * lex.h:  Remove a bunch of debugging macros.
3982         * lex.h (struct_java_line, struct java_error):  Remove types.
3983         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3984         (struct java_lc_s):  Remove prev_col field.
3985         (struct java_lexer):  New fields next_unicode, next_columns, and
3986         avail_unicode.  New position field, and maybe token_start field.
3987         Don't need hit_eof field - use next_unicode == -1 instead.
3988         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3989         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3990         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3991         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3992         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3993         (struct parser_ctxt):  New file_start_location field.
3994         Remove p_line, c_line fields since we no longer save lines.
3995         Remove elc, lineno, and current_jcf fields - no longer used.
3996         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3997         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3998         source_location and is probably not needed anymore anyway.
3999         Use new expr_add_Location function.
4000         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
4001         (java_pop_parser_context):  Minor cleanup.
4002         (java_parser_context_save_global, java_parser_context_restore_global,
4003         java_pop_parser_context):  Save/restore input_location as a unit.
4004         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
4005         a source_location instead of a wfl context node.
4006         (check_class_interface_creation):  input_filename is not addressable.
4007         (create_artificial_method):  Calling java_parser_context_save_global
4008         and java_parser_context_restore_global is overkill.  Instead,
4009         temporarily set input_location from class decl.
4010         (java_layout_seen_class_methods): Set input_location from method decl.
4011         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4012         (finish_loop_body):  Likewise.
4013         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
4014         (java_sprint_unicode):  Take a character, not index in line.
4015         (java_sneak_uncode):  Replaced by java_peek_unicode.
4016         (java_unget_unicode):  No longer used.
4017         (java_allocate_new_line. java_store_unicode):  Removed, since we
4018         no longer remember "lines".
4019         (java_new_lexer):  Update for new data structures.
4020         (java_read_char):  Move unget_value checking to java_read_unicode.
4021         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4022         efficient functions that are used directly when lexing.
4023         (java_read_unicode_collapsing_terminators):  No longer needed.
4024         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4025         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4026         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
4027         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
4028         combine switch branches, and test for common token kinds earlier.
4029         (java_lex_error):  Rewrite.
4030         * jv-scan.c (expand_location): New function, copied from tree.c.
4031         (main): Set ctxp->filename instead of setting input_filename directly.
4032
4033 2004-09-30  Per Bothner  <per@bothner.com>
4034
4035         More cleanup for --enable-mapped-location.
4036         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
4037         input_location here.  Instead do it in give_name_to_class.
4038         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4039         * expr.c (expand_byte_code): Call linemap_line_start.
4040         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
4041         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
4042         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
4043         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
4044         to USE_MAPPED_LOCATION case.
4045
4046         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
4047         * jcf-parse.c (java_parse_file): Don't set input_filename.
4048         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4049         Create a list of TRANSLATION_UNIT_DECL.
4050         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
4051         reason is so we can set a DECL_SOURCE_LOCATION for each file.
4052         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4053         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4054         (file_start_location):  New static.
4055         (set_source_filename):  Avoid extra access to input_filename macro.
4056         Concatenate new name with class's package prefix.
4057         (set_source_filename, give_name_to_class): Update.
4058         (give_name_to_class):  Set class's "line 0" input_location here.
4059         (parse_class_file):  Set input_location as a unit.
4060
4061         * jcf-parse.c (load_class): Sanity test if missing inner class file.
4062
4063 2004-09-29  Per Bothner  <per@bothner.com>
4064
4065         * java-tree.h:  Redefine some macros and add some declaration
4066         to handle the USE_MAPPED_LOCATION case.
4067         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
4068         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
4069         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4070         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4071
4072         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4073         * decl.c (finish_method, java_add_stmt): Likewise.
4074         * java-gimplify.c (java-gimplify.c):  Likewise.
4075         * jcf-write.c (generate_bytecode_insns):  Likewise.
4076         * lang.c (java_post_options): Likewise - call linemap_add.
4077
4078 2004-09-29  Andrew Haley  <aph@redhat.com>
4079
4080         PR java/17007
4081         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4082         result of TRUNC_MOD_EXPR.
4083         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4084         * decl.c (java_init_decl_processing): Mark
4085         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4086
4087 2004-09-28  Tom Tromey  <tromey@redhat.com>
4088
4089         PR java/15710:
4090         * class.c (add_miranda_methods): Load superinterface if not
4091         already loaded.
4092
4093 2004-09-28  Andrew Haley  <aph@redhat.com>
4094
4095         PR java/17586
4096         * jcf-parse.c (load_class): Don't try to read a class that we've
4097         already read.
4098
4099 2004-09-28  Andrew Haley  <aph@redhat.com>
4100
4101         * jcf-parse.c (load_class): Back out previous broken patch.
4102
4103 2004-09-28  Andrew Haley  <aph@redhat.com>
4104
4105         PR java/17586
4106         * jcf-parse.c (load_class): Don't try to read a class that we've
4107         already read.
4108         Check that we really did read the right class.
4109
4110 2004-09-25  Tom Tromey  <tromey@redhat.com>
4111
4112         PR java/17500:
4113         * parse.y (create_artificial_method): Use add_method_1.
4114
4115 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
4116
4117         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4118         comment typos.
4119         * gcj.texi: Fix typos.
4120
4121 2004-09-24  Tom Tromey  <tromey@redhat.com>
4122
4123         PR java/15656:
4124         * parse.y (class_instance_creation_expression): Set `$$' to NULL
4125         in error parts of rule.
4126         (unary_expression): Don't call error_if_numeric_overflow when $1
4127         is NULL.
4128
4129 2004-09-24  Tom Tromey  <tromey@redhat.com>
4130
4131         PR java/16789:
4132         * parse.y (resolve_qualified_expression_name): Set
4133         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4134         * expr.c (force_evaluation_order): Check for empty argument list
4135         after stripping COMPOUND_EXPR.
4136
4137 2004-09-23  Andrew Haley  <aph@redhat.com>
4138
4139         PR java/16927:
4140         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4141         COND_EXPRs.
4142
4143 2004-09-23  Tom Tromey  <tromey@redhat.com>
4144
4145         PR java/17329:
4146         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4147         where operand is null.
4148
4149 2004-09-23  Tom Tromey  <tromey@redhat.com>
4150
4151         PR java/17380:
4152         * parse.y (not_accessible_p): Allow access to protected members
4153         even when class is not static.
4154
4155 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4156
4157         * Make-lang.in: Revert the gcc-none.o change.
4158
4159 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4160
4161         * parse.y (patch_anonymous_class): VEC_space returns true if there
4162         is space.
4163
4164 2004-09-21  Matt Austern  <austern@apple.com>
4165
4166         Fix bootstrap.
4167         * gjavah.c (free_method_name_list): Fix function definition so
4168         it's a proper C prototype.
4169
4170 2004-09-21  Tom Tromey  <tromey@redhat.com>
4171
4172         PR java/17575:
4173         * gjavah.c (free_method_name_list): New method.
4174         (main): Call it.
4175
4176 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4177             Zack Weinberg  <zack@codesourcery.com>
4178
4179         * java-tree.def: Use tree_code_class enumeration constants
4180         instead of code letters.
4181         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4182         new tree-class enumeration constants.
4183
4184 2004-09-13  Tom Tromey  <tromey@redhat.com>
4185
4186         PR java/17216:
4187         * class.c (layout_class_method): Put synthetic methods into the
4188         vtable.
4189
4190 2004-09-11  Andrew Pinski  <apinski@apple.com>
4191
4192         * Make-lang.in (java/ggc-none.c): Change dependency
4193         for ggc.h into $(GGC_H).
4194
4195 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4196
4197         * Make-lang.in (java/win32-host.o): Add dependency on
4198         coretypes.h.
4199         * win32-host.c: Add includes for coretypes.h, jcf.h
4200
4201 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4202
4203         * Make-lang.in (GCJH_OBJS): Change dependency from
4204         ggc-none.o to java/ggc-none.o
4205         (JCFDUMP_OBJS): Likewise.
4206         (java/ggc-none.o): New target.
4207
4208 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4209
4210         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4211         * class.c (build_utf8_ref, build_static_field_ref,
4212         make_field_value, make_method_value, get_dispatch_table,
4213         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4214         * constants.c (get_tag_node, build_ref_from_constant_pool,
4215         build_constants_constructor): Likewise.
4216         * decl.c (java_init_decl_processing): Likewise.
4217         * expr.c (build_java_array_length_access, build_newarray,
4218         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4219         build_java_binop, build_field_ref, expand_java_add_case,
4220         expand_java_call, build_known_method_ref, build_invokevirtual,
4221         build_invokeinterface, build_jni_stub): Likewise.
4222         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4223         * jcf-parse.c (get_constant): Likewise.
4224         * lex.c (do_java_lex): Likewise.
4225         * parse.y (patch_binop, patch_unaryop, patch_cast,
4226         build_newarray_node, patch_newarray): Likewise.
4227         * resource.c (compile_resource_data): Likewise.
4228         * typeck.c (build_prim_array_type): Likewise.
4229
4230 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4231
4232         * decl.c (java_init_decl_processing): Adjust
4233         initialize_sizetypes call.
4234
4235 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4236
4237         * jv-scan.c (fancy_abort): Add.
4238
4239 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4240
4241         * expr.c (build_java_arrayaccess): Use convert to change
4242         len's type.
4243
4244 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4245
4246         * class.c (make_local_function_alias): Allocate extra space for 'L'
4247         in name buffer. Reported by Thomas Neumann.
4248
4249 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4250
4251         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4252         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4253         * lex.c (do_java_lex): Adjust.
4254         (error_if_numeric_overflow): Likewise.
4255
4256 2004-08-18  Andrew Pinski  <apinski@apple.com>
4257
4258         * class.c (make_local_function_alias): Only make a new decl if we
4259         support alias attribute on all decls.
4260
4261 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4262
4263         * class.c (make_local_function_alias): New function. Create local
4264         alias for public method DECL.
4265         (make_method_value): Use make_local_function_alias.
4266         * parse.y (craft_constructor): Don't special-case anonymous classes.
4267         Always set ctor_name to init_identifier_node.
4268         (lookup_method_invoke): Call layout_class_method when creating
4269         anonymous class constructor.
4270
4271 2004-08-18  Richard Henderson  <rth@redhat.com>
4272
4273         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4274         default case.  Treat '<' similarly.  Update for
4275         is_gimple_formal_tmp_var name change.
4276
4277 2004-08-17  Andrew Haley  <aph@redhat.com>
4278
4279         * lang.c (lang_printable_name): Obey verbose flag.
4280         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4281         lang_printable_name().
4282         (verify_constructor_circularity, get_printable_method_name,
4283         check_abstract_method_definitions, java_check_regular_methods,
4284         java_check_abstract_methods, check_inner_class_access,
4285         fix_constructors, patch_method_invocation, patch_return):
4286         Likewise.
4287         * expr.c (pop_type_0): Likewise.
4288
4289         * java-tree.h (lang_printable_name_wls): Delete.
4290
4291 2004-08-16  Tom Tromey  <tromey@redhat.com>
4292
4293         PR java/8473:
4294         * parse.y (primary): Changed for initialized and uninitialized
4295         array creations.
4296         (array_access): Handle array_creation_initialized.
4297         (array_creation_expression): Split into
4298         array_creation_initialized and array_creation_uninitialized.
4299
4300 2004-08-16  Andrew Haley  <aph@redhat.com>
4301
4302         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4303         generating bytecode.
4304
4305 2004-08-16  Elliot Lee <sopwith@redhat.com>
4306
4307         PR java/9677
4308         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4309         spaces, and quoted filelists.
4310
4311 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4312
4313         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4314         * class.c (build_utf8_ref, build_static_field_ref,
4315         make_field_value, make_method_value, get_dispatch_table,
4316         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4317         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4318         build_constants_constructor): Likewise.
4319         * decl.c (java_init_decl_processing): Likewise.
4320         * expr.c (build_java_array_length_access, build_newarray,
4321         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4322         build_java_binop, build_field_ref, expand_java_add_case,
4323         expand_java_call, build_known_method_ref, build_invokevirtual,
4324         build_invokeinterface, build_jni_stub): Likewise.
4325         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4326         * jcf-parse.c (get_constant): Likewise.
4327         * lex.c (do_java_lex): Likewise.
4328         * parse.y (patch_binop, patch_unaryop, patch_cast,
4329         build_null_of_type, patch_newarray): Likewise.
4330         * resource.c (compile_resource_data): Likewise.
4331         * typeck.c (build_prim_array_type): Likewise.
4332
4333 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4334
4335         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4336         Don't create BLOCK here or call java_gimplify_block.
4337
4338 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4339
4340         * java-tree.h (flag_deprecated): Removed.
4341         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4342         * parse.y (check_deprecation): Check warn_deprecated instead of
4343         flag_deprecated.
4344
4345 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4346
4347         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4348         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4349         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4350         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4351         flag_force_classes_archive_check, flag_optimize_sci,
4352         flag_indirect_dispatch): Remove explicit declarations.
4353         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4354         final comment.
4355
4356 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4357
4358         PR bootstrap/14893
4359         * Make-lang.in (java.install-man): Install from either build
4360         tree or source tree, whichever has the file first.
4361
4362 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4363
4364         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4365         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4366         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4367         (do_java_lex): Likewise. Adjust force_fit_type call.
4368
4369 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4370             Andrew Haley  <aph@redhat.com>
4371
4372         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4373         checking trees as they're being built.
4374         (convert): Call convert_ieee_real_to_integer if we're
4375         converting a constant, even if we're writing a class file.
4376
4377 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4378
4379         PR java/16701
4380         * parse.y (fold_constant_for_init): Call resolve_field_access with
4381         correct current_class context.
4382
4383 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4384
4385         * decl.c (update_aliases, initialize_local_variable): Replace calls
4386         to build with calls to buildN.
4387         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4388         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4389         * parse.h (BUILD_THROW): Likewise.
4390         * parse.y (switch_expression, synchronized_statement,
4391         catch_clause_parameter, array_creation_expression,
4392         conditional_expression, make_qualified_name,
4393         resolve_qualified_expression_name, patch_method_invocation,
4394         patch_invoke, build_method_invocation, build_new_invocation,
4395         build_assignment, patch_assignment, build_binop, patch_binop,
4396         build_string_concatenation, build_incdec, patch_unaryop,
4397         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4398         patch_return, build_if_else_statement, build_labeled_block,
4399         build_new_loop, build_loop_body, build_bc_statement,
4400         build_assertion, encapsulate_with_try_catch, build_try_statement,
4401         build_try_finally_statement, patch_synchronized_statement,
4402         emit_test_initialization): Likewise, replace build with buildN.
4403
4404 2004-07-28  Eric Christopher  <echristo@redhat.com>
4405
4406         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4407         (java_unsafe_for_reeval): Ditto.
4408
4409 2004-07-26    <hp@bitrange.com>
4410
4411         * parse.y (build_super_invocation): Adjust declaration order to
4412         avoid declaration after statement.
4413
4414 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4415
4416         * decl.c: Rename all identifiers named `class' to `cl'.
4417
4418 2004-07-25  Richard Henderson  <rth@redhat.com>
4419
4420         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4421
4422 2004-07-23  Mike Stump  <mrs@apple.com>
4423
4424         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4425         * gjavah.c (throwable_p, decode_signature_piece,
4426         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4427         process_file): Likewise.
4428         * jcf-dump.c (main): Likewise.
4429         * jcf-io.c (read_zip_member): Likewise.
4430         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4431         give_name_to_class, get_class_constant): Likewise.
4432         * jcf-write.c (find_constant_wide, push_long_const,
4433         generate_classfile): Likewise.
4434         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4435         * parse.y (read_import_dir): Likewise.
4436         * typeck.c (parse_signature_type): Likewise.
4437         * verify.c (verify_jvm_instructions): Likewise.
4438         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4439
4440 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4441
4442         * Make-lang.in: Replace rmic and rmiregistry references with
4443         grmic and grmiregistry.
4444         * gcj.texi: Likewise.
4445
4446 2004-07-20  Andrew Haley  <aph@redhat.com>
4447
4448         PR java/16431.
4449         * verify.c (verify_jvm_instructions): Comment change only.
4450
4451         * typeck.c (build_java_array_type): Add size field to array name.
4452
4453         * java-tree.h (LOCAL_SLOT_P): New.
4454         (update_aliases): Add PC argument.
4455         (pushdecl_function_level): New function.
4456
4457         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4458         MODIFY_EXPR, and SAVE_EXPR.
4459         (java_gimplify_modify_expr): New function.
4460
4461         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4462         (expand_iinc): Pass PC to update_aliases().
4463         (STORE_INTERNAL): Likewise.
4464         (process_jvm_instruction): Likewise.
4465
4466         * decl.c (base_decl_map): New variable.
4467         (uniq): New variable.
4468         (update_aliases): Rewrite with more thorough checking.
4469         (debug_variable_p): New function.
4470         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4471         (check_local_named_variable): Delete whole function.
4472         (initialize_local_variable): New function.
4473         (check_local_unnamed_variable): Add checks and comments.
4474         (find_local_variable): Rewrite.
4475         (java_replace_reference): New function.
4476         (function_binding_level): New variable.
4477         (pushdecl_function_level): New function.
4478         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4479         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4480         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4481         function_binding_level.
4482         (end_java_method): Null unused fields to save memory.
4483
4484 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4485
4486         * class.c (add_interface_do): Remove.
4487         (set_super_info, interface_of_p, maybe_add_interface,
4488         add_interface, make_class_data, layout_class,
4489         add_miranda_methods): Adjust BINFO accessors and addition.
4490         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4491         accessors.
4492         * jcf-write.c (generate_classfile): Likewise.
4493         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4494         check_circular_reference, java_complete_class,
4495         check_abstract_method_definitions,
4496         java_check_abstract_method_definitions,
4497         check_interface_throws_clauses, java_check_abstract_methods,
4498         lookup_java_interface_method2,
4499         find_applicable_accessible_methods_list): Adjust BINFO accessors
4500         and addition.
4501         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4502
4503 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4504
4505         * builtins.c (max_builtin, min_builtin,
4506         java_build_function_call_expr): Replace calls to build with buildN.
4507         * class.c (build_class_ref, build_static_field_ref,
4508         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4509         * constants.c (build_ref_from_constant_pool): Likewise.
4510         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4511         add_stmt_to_compound): Likewise.
4512         * except.c (build_exception_object_ref, expand_end_java_handler):
4513         Likewise.
4514         * java-gimplify.c (java_gimplify_case_expr,
4515         java_gimplify_default_expr, java_gimplify_block,
4516         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4517         * jcf-write.c (generate_bytecode_insns): Likewise.
4518         * typeck.c (convert_ieee_real_to_integer): Likewise.
4519
4520 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4521
4522         * java-tree.h (builtin_function): Declare.
4523
4524 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4525
4526         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4527         abuse restore_line_number_status.
4528
4529 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4530
4531         g++/15861
4532         * jcf-parse.c (java_emit_static_constructor): Specify default
4533         priority.
4534
4535 2004-07-13  Per Bothner  <per@bothner.com>
4536
4537         * java-tree.h (all_class_filename):  Remove useless macro.
4538         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4539         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4540         * parse.y (java_parser_context_restore_global):  Replace
4541         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4542         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4543
4544 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4545
4546         PR java/16474
4547         gjavah.c (print_field_info): Emit constant only if field is static.
4548
4549 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4550
4551         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4552         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4553         build_java_ret, build_java_throw_out_of_bounds_exception,
4554         build_java_array_length_access, java_check_reference,
4555         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4556         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4557         expand_java_arrayload, build_java_monitor, expand_java_return,
4558         expand_load_internal, expand_java_NEW, build_get_class,
4559         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4560         build_java_soft_divmod, build_java_binop, build_field_ref,
4561         expand_compare, expand_java_goto, expand_java_switch,
4562         expand_java_add_case, build_class_init, build_known_method_ref,
4563         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4564         expand_invoke, build_jni_stub, expand_java_field_op,
4565         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4566         force_evaluation_order, emit_init_test_initialization): Convert
4567         calls to "build" into calls to the prefered "buildN" functions.
4568
4569 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4570
4571         * java-tree.h (set_block): Remove.
4572         * lang.c (java_clear_binding_stack): New.
4573         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4574         * decl.c (struct binding_level): Remove this_block.
4575         (clear_binding_level): Likewise.
4576         (poplevel): Don't handle this_block.
4577         (set_block): Remove.
4578
4579 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4580
4581         * class.c (common_enclosing_context_p): Remove statement with no
4582         side-effects.
4583
4584 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4585
4586         PR java/8618
4587         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4588         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4589         (craft_constructor): Inherit access flags for implicit constructor
4590         from the enclosing class.
4591         (create_class): Fix comment typo.
4592         (resolve_qualified_expression_name): Pass type of qualifier to
4593         not_accessible_p, not the type in which target field was found.
4594         (not_accessible_p): Handle inner classes. Expand protected
4595         qualifier-subtype check to enclosing instances, but don't apply this
4596         check to static members. Allow protected access to inner classes
4597         of a subtype. Allow private access within common enclosing context.
4598         (build_super_invocation): Get WFL line number info from current
4599         class decl.
4600         (build_incomplete_class_ref): Update for new create_anonymous_class
4601         signature.
4602         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4603         common_enclosing_instance_p.
4604         * class.c (common_enclosing_context_p): New. Determine if types
4605         share a common enclosing context, even across static contexts.
4606         (common_enclosing_instance_p): Renamed from
4607         common_enclosing_context_p. Determines if types share a common
4608         non-static enclosing instance.
4609         * java-tree.h (common_enclosing_instance_p): Declare.
4610         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4611         for inner class constructors.
4612         (generate_classfile): Use get_method_access_flags.
4613
4614 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4615
4616         * class.c (interface_of_p): Check for null TYPE_BINFO.
4617
4618 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4619
4620         * class.c (make_class): Do not create binfo here.
4621         (set_super_info): Create it here.
4622         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4623
4624 2004-07-08  Richard Henderson  <rth@redhat.com>
4625
4626         * expr.c (case_identity, get_primitive_array_vtable,
4627         java_expand_expr, emit_init_test_initialization): Remove.
4628         * java-tree.h (java_expand_expr): Remove.
4629         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4630
4631 2004-07-07  Per Bothner  <per@bothner.com>
4632
4633         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4634         get internal error due to mismatched types.
4635
4636         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4637
4638         * gcj.texi (Linking):   New node.  Document -lgij usage.
4639
4640 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4641
4642         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4643         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4644         * java/class.c (set_super_info, class_depth, interface_of_p,
4645         maybe_add_interface, add_interface, make_class_data,
4646         layout_class, add_miranda_methods): Adjust BINFO macros.
4647         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4648         * jcf-write.c (generate_classfile): Likewise.
4649         * parse.y (patch_anonymous_class,
4650         check_inner_circular_reference, check_circular_reference,
4651         java_complete_class, check_abstract_method_definitions,
4652         java_check_abstract_method_definitions,
4653         check_interface_throws_clauses, java_check_abstract_methods,
4654         lookup_java_interface_method2,
4655         find_applicable_accessible_methods_list): Likewise.
4656         * typeck.c (find_method_in_interface): Likewise.
4657         * verify.c (merge_types): Likewise.
4658
4659 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4660
4661         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4662         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4663
4664 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4665
4666         * class.c (make_class): Use make_tree_binfo.
4667         (set_super_info, add_interface_do): Likewise.
4668         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4669
4670 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4671
4672         * verify.c: Correct array element access formatting thinko.
4673
4674 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4675
4676         * verify.c: Insert a short blurb at the start referring to the JVMS.
4677         (merge_type_state): Remove redundant nested if statement.
4678         (verify_jvm_instructions): Ensure current_subr is initialised to
4679         NULL_TREE.
4680         Minor formatting fixes all over the place.
4681
4682 2004-07-02  Richard Henderson  <rth@redhat.com>
4683
4684         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4685
4686 2004-07-01  Richard Henderson  <rth@redhat.com>
4687
4688         * class.c (registerClass_libfunc): Remove.
4689         (init_class_processing): Don't set it.
4690         (emit_register_classes): Take list_p parameter.  Fill it in
4691         with _Jv_RegisterClass calls.
4692         * decl.c (java_init_decl_processing): Don't call
4693         init_resource_processing.
4694         * jcf-parse.c (java_emit_static_constructor): New.
4695         (java_parse_file): Call it.
4696         * resource.c (registerResource_libfunc): Remove.
4697         (init_resource_processing): Remove.
4698         (write_resource_constructor): Take list_p parameter.  Fill it in
4699         with _Jv_RegisterResource calls.
4700         * java-tree.h: Update prototypes.
4701
4702 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4703
4704         PR java/1262
4705         * class.c (layout_class_method): Do not override package-private
4706         method if its in a different package.
4707         (split_qualified_name): Move here from parse.y. Rename from
4708         breakdown_qualified. Add comment.
4709         (in_same_package): Move here from parse.y. Add comment.
4710         * java-tree.h (break_down_qualified, in_same_package): Declare.
4711         (in_same_package): Likewise.
4712         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4713         Callers updated.
4714
4715 2004-06-29  Andrew Haley  <aph@redhat.com>
4716
4717         * except.c (expand_start_java_handler): Push a new binding level.
4718         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4719         register_exception_range() to register where we'll do it.
4720         (expand_end_java_handler): Remove old bogus code.  Replace with
4721         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4722         the top of the expression we're curently building.
4723         (maybe_end_try): Delete.
4724         * decl.c (binding_level.exception_range): New field.
4725         (clear_binding_level): Add field exception_range.  Reformat.
4726         (poplevel): Call expand_end_java_handler().
4727         (poplevel): Call java_add_stmt only if functionbody is false.
4728         (maybe_poplevels): Don't call maybe_end_try() from here.
4729         (end_java_method): Clear no longer used trees in function decl.
4730         (register_exception_range): New function.
4731         * java-tree.h (register_exception_range, struct eh_range): Declare.
4732
4733 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4734
4735         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4736
4737 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4738
4739         Formatting fixes.
4740         * expr.c (class_has_finalize_method): Fix method name indentation.
4741         (expand_java_call): Remove K&R style parameter declaration.
4742         (expand_invoke): Fix statement indentation.
4743         (expand_java_field_op): Likewise.
4744         * parse-scan.y: Fix typo.
4745         (reset_report): Fix method name indentation.
4746         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4747         line. Fix typos.
4748         * verify.c (verify_jvm_instructions): Document parameters, insert
4749         page break.
4750         * lang.c (lang_init_source): Fix method name indentation.
4751         * class.c (common_enclosing_context_p): Likewise.
4752         (emit_symbol_table): Fix parameter list indentation.
4753         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4754         parameter declaration.
4755         * constants.c: Fix copyright notice indentation.
4756         * typeck.c (find_method_in_superclasses): Fix parameter list
4757         indentation.
4758         (find_method_in_interfaces): Likewise.
4759         * zextract.c (makelong): Fix method name indentation.
4760
4761 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4762
4763         PR java/15715.
4764         * parse.y (create_interface): Set correct access modifiers for
4765         interfaces.
4766         * jcf-write.c (get_classfile_modifiers): New function.
4767         (generate_classfile): Use get_classfile_modifiers, not
4768         get_access_flags.
4769
4770 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4771
4772         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4773         dependency to current parser context, not NULL_TREE, for top-level
4774         classes.
4775         (jdep_resolve_class): Enable member access check for all inner
4776         class dependencies.
4777
4778 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4779
4780         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4781         load_class.
4782
4783 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4784
4785         PR java/15734
4786         * expr.c (expand_java_field_op): Ensure that target class for static
4787         field access has been loaded.
4788
4789 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4790             Ranjit Mathew  <rmathew@hotmail.com>
4791
4792         PR java/1207, java/16178
4793         * jcf-parse.c (load_class): Return immediately if passed a type decl
4794         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4795         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4796         before calling load_class.
4797         (qualify_and_find): Likewise.
4798         (find_in_imports_on_demand): Likewise.
4799         (find_applicable_accessible_methods_list): Likewise.
4800
4801 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4802
4803         * parse.y (java_layout_seen_class_methods): Don't call load_class
4804         on class defined by source parser.
4805
4806 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4807
4808         * parse.y (set_nested_class_simple_name_value): Removed.
4809         (java_complete_expand_class): Remove calls to
4810         set_nested_class_simple_name_value.
4811
4812 2004-06-22  Andrew Haley  <aph@redhat.com>
4813             Ranjit Mathew  <rmathew@hotmail.com>
4814
4815         Fixes PR java/16113.
4816         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4817
4818 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4819
4820         * parse.y (create_class): Correct diagnostic message about
4821         java.lang.Object extending anything else.
4822
4823 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4824
4825         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4826         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4827         * constants.c (build_ref_from_constant_pool): Likewise.
4828         * expr.c (build_java_array_length_access): Likewise.
4829         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4830         (invoke_build_dtable, build_invokevirtual): Likewise.
4831         (build_invokeinterface, java_expand_expr): Likewise.
4832         (emit_init_test_initialization): Likewise.
4833         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4834         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4835
4836 2004-06-21  Andrew Haley  <aph@redhat.com>
4837
4838         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4839         block.
4840
4841 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4842
4843         * jcf.h (struct JCF): Change java_source, right_zip and finished
4844         to unsigned int.
4845         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4846         byte_swap and use_fallback to unsigned int.
4847         * parse.h (struct _jdep): Change flag0 to unsigned int.
4848
4849 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4850
4851         Fixes PR java/13948
4852         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4853         before trying to lay out its methods.
4854         * jcf-parse.c (read_class): Track parsed files using canonical paths
4855         obtained via lrealpath from libiberty.
4856         (java_parse_file): Likewise.
4857         (parse_source_file_1): Rename formal parameter to reflect its
4858         modified purpose. Minor formatting fix.
4859
4860 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4861
4862         * class.c (emit_register_classes): Make the function uninlinable,
4863         do not set current_function_cannot_inline.
4864         * resource.c (write_resource_constructor): Do not reset
4865         flag_inline_functions around rest_of_compilation.
4866
4867 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4868
4869         PR java/15769
4870         * expr.c (java_truthvalue_conversion): Handle
4871         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4872         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4873         i.e. return the expression.
4874
4875 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4876
4877         * gjavah.c: Include version.h
4878
4879 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4880
4881         * jcf-write.c (generate_bytecode_conditional): Correct handling
4882         of unordered conditionals. Add comment.
4883
4884 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4885             Per Bothner  <per@bothner.com>
4886
4887         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4888         local variable was initialised upon declaration.
4889         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4890         variable was final and initialised upon declaration.
4891         * check-init.c (check_final_reassigned): Give error only if a blank
4892         final is not definitely unassigned or if an initialised final is
4893         reassigned.
4894         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4895         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4896         (check_init): Perform initialised-variable-removing-optimisation
4897         only on non-final local variables.
4898
4899 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4900
4901         * jcf-write.c (generate_bytecode_conditional): Handle binops
4902         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4903         and LTGT_EXPR.
4904         (generate_bytecode_insns): Likewise.
4905
4906 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4907
4908         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4909         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4910
4911 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4912
4913         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4914         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4915
4916 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4917
4918         * decl.c (struct binding_level): Add GTY marker. Compile
4919         binding_depth unconditionally.
4920         (current_binding_level, free_binding_level, global_binding_level):
4921         Likewise.
4922         (clear_binding_level): Unconditionally set binding_depth.
4923         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4924
4925 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4926
4927         * lex.c (java_new_lexer): Set 'encoding'.
4928         (java_read_char): Improve error message for unrecognized characters.
4929         * lex.h (struct java_lexer): New field 'encoding'.
4930
4931 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4932
4933         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4934
4935 2004-05-21  Mark Wielaard  <mark@klomp.org>
4936
4937         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4938         extern.
4939
4940 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4941
4942         * typeck.c: Remove non-printable character 160.
4943
4944 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4945
4946         * check-init.c: Correct minor typos.
4947
4948 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4949
4950         * Make-lang.in, expr.c, java-gimplify.c: Rename
4951         tree-simple.[ch] to tree-gimple.[ch].
4952
4953 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4954
4955         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4956
4957 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4958
4959         Merge from tree-ssa-20020619-branch.  See
4960         ChangeLog.tree-ssa for details.
4961
4962         * Make-lang.in, builtins.c, check-init.c, class.c,
4963         constants.c, decl.c, except.c, expr.c, java-except.h,
4964         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4965         lang.c, lang.opt, parse.y, resource.c: Merged.
4966         * java-gimplify.c: New file.
4967
4968 2004-05-10  Andrew Haley  <aph@redhat.com>
4969
4970         * parse.y (create_class): Set TYPE_VFIELD.
4971         * decl.c (java_init_decl_processing): Likewise.
4972
4973         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4974         * class.c (make_method_value): Replace DECL_VINDEX with call to
4975         get_method_index().
4976         (get_dispatch_vector): Likewise.
4977         (layout_class_method): Likewise.
4978         Replace set of DECL_VINDEX with call to set_method_index().
4979         (set_method_index): New function.
4980         (get_method_index): New function.
4981         * java-tree.h (set_method_index): New function decl.
4982         (get_method_index): New function decl.
4983
4984 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4985
4986         * parse.y (check_pkg_class_access): Add new argument
4987         and use it when cl is NULL to call lookup_cl on it.
4988         (parser_check_super_interface): Do not call lookup_cl.
4989         Pass this_decl to check_pkg_class_access and NULL
4990         instead of lookup_cl.
4991         (parser_check_super): Update for change in
4992         check_pkg_class_access.
4993         (do_resolve_class): Likewise.
4994         (process_imports): Likewise.
4995         (find_in_imports_on_demand): Likewise.
4996         (resolve_qualified_expression_name): Likewise.
4997
4998 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4999
5000         Fixes PR java/9685, PR java/15073
5001         * parse.y (accessibility_string): New method.
5002         (not_accessible_field_error): Use accessibility_string()
5003         instead of java_accstring_lookup().
5004         (resolve_qualified_expression_name): Check with
5005         check_pkg_class_access() before allowing access using
5006         qualified names.
5007         Fix comment typo.
5008         Use check_pkg_class_access() instead of not_accessible_p()
5009         for unqualified types.
5010         (not_accessible_p): Use DECL_CONTEXT (member) instead of
5011         REFERENCE for package-private access checking.
5012         (patch_method_invocation): Use accessibility_string() instead
5013         of java_accstring_lookup().
5014
5015 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
5016
5017         Fixes PR java/15133
5018         * gjavah.c (struct method_name): Add member is_native.
5019         (overloaded_jni_method_exists_p): Match candidate method only if
5020         it is native.
5021         (print_method_info): Initialise is_native flag from the method's
5022         access flags.
5023
5024 2004-04-30  Roger Sayle  <roger@eyesopen.com>
5025
5026         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5027         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5028
5029 2004-04-22  Roger Sayle  <roger@eyesopen.com>
5030
5031         * resource.c (write_resource_constructor): Guard call to possibly
5032         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5033
5034 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
5035
5036         * class.c (make_class_data): Add new field aux_info.
5037         * decl.c (java_init_decl_processing): Push type and decl for
5038         `aux_info'.
5039
5040 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5041
5042         * expr.c (expand_java_NEW): Don't use size argument for
5043         _Jv_AllocObject calls.
5044         * parse.y (patch_invoke): Likewise.
5045
5046 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5047
5048         * expr.c (build_invokeinterface): Remove unused variables to
5049         fix warnings.
5050
5051 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5052
5053         * class.c (get_interface_method_index): New function. Return dispatch
5054         index for interface method.
5055         (make_method_value): For interface methods, set index field to
5056         iface dispatch index, not DECL_VINDEX.
5057         * expr.c (build_invokeinterface): Use get_interface_method_index.
5058
5059 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5060
5061         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5062
5063 2004-03-31  Andrew Haley  <aph@redhat.com>
5064
5065         PR java/14104
5066         * jcf-io.c (opendir_in_zip): Tidy up error handling.
5067
5068 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5069
5070         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5071         form of GTY markers.
5072
5073 2004-03-25  Marcus Meissner  <meissner@suse.de>
5074
5075         PR java/14689:
5076         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5077
5078 2004-03-23  Tom Tromey  <tromey@redhat.com>
5079
5080         PR java/14315:
5081         * jcf-write.c (make_class_file_name): Don't report if mkdir
5082         failed with EEXIST.
5083
5084 2004-03-23  Tom Tromey  <tromey@redhat.com>
5085
5086         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5087
5088 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
5089
5090         * class.c, gjavah.c, lang.c: Fix comment typos.
5091         * gcj.texi: Fix typos.
5092
5093 2004-03-19  Per Bothner  <per@bothner.com>
5094
5095         * gcj.texi (Code Generation):  Document new flags and assert defaults.
5096
5097         * class.c (assume_compiled_node_struct):  Rename type to
5098         class_flag_node_struct, as it is now also used for enable_assertions.
5099         Rename assume_compiled_node typedef.  Rename excludep field to value.
5100         (find_assume_compiled_node):  Rename function to find_class_flag_node.
5101         Minor optimization - avoid needless strlen.
5102         (add_assume_compiled):  Some tweaking and optimization.
5103         Rename and generalize to add_class_flag takem an extra parameter.
5104         (add_assume_compled):  New just calls add_class_flag.
5105         (add_enable_assert, enable_assertions):  New functions.
5106         (enable_assert_tree):  New static.
5107         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5108         * lang.opt (fenable-assertions, fenable-assertions=,
5109         fdisable-assertions, fdisable-assertions=):  New options.
5110         * lang.c (java_handle_option):  Handle new options.
5111         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
5112         class in an interface - create helper class nested in outer interface.
5113         (build_assertion):  Short-circuit if enable_assertions is false.
5114
5115 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5116
5117         * java-tree.h: Changes throughout to add checking to macros
5118         and numerous whitespace changes.
5119         (VAR_OR_FIELD_CHECK): New macro.
5120         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5121         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5122
5123 2004-03-16  Per Bothner  <per@bothner.com>
5124
5125         * jcf-jump.c (options):  New --print-constants option.
5126         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
5127
5128         * jcf-dump.c (flag_print_constant_pool):  Default to off.
5129         (print_constant_terse_with_index):  New helper function.
5130         (various places):  Check flag_print_constant_pool where missing.
5131         (main):  If verbose set flag_print_constant_pool.
5132         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
5133
5134 2004-03-15  Andrew Haley  <aph@redhat.com>
5135
5136         PR java/14581
5137         * parse.y (java_complete_lhs): Check that final variable has an
5138         initializer.
5139
5140 2004-03-12  Andrew Haley  <aph@redhat.com>
5141
5142         PR java/14551
5143         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5144         conversion.
5145
5146 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5147
5148         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5149         is NULL.
5150
5151 2004-02-27  Per Bothner  <per@bothner.com>
5152
5153         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5154         suggestion:  Use build_incomplete_class_ref.
5155         This fixes PR java/13508, java/11714.
5156
5157 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5158
5159         * java/parse.h: Update copyright.
5160
5161 2004-02-26  Andrew Haley  <aph@redhat.com>
5162
5163         PR java/14231:
5164         * parse.y (check_interface_throws_clauses): Check for
5165         !METHOD_INVISIBLE (iface_method).
5166         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5167         well as CLASS_ABSTRACT.
5168
5169 2004-02-25  Per Bothner  <per@bothner.com>
5170
5171         * parse.y (build_assertion):  If we're in an inner class, create the
5172         class$ helper routine in the outer class.
5173
5174 2004-02-19  Richard Henderson  <rth@redhat.com>
5175
5176         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5177
5178 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5179
5180         * Make-lang.in (java.install-man): Add extra dependencies.
5181
5182 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5183
5184         * Make-lang.in: Install man pages under the same names
5185         (possibly transformed) as the program they document.
5186
5187 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5188
5189         * gjavah.c: Include "intl.h".
5190         (error): New function.
5191         (main): Call gcc_init_libintl.
5192         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5193         print_stub_or_jni, process_file, main): Use error rather than
5194         fprintf.
5195         (print_method_info, usage, help, version, main): Mark strings for
5196         translation with _.  Avoid splitting up sentences.  Send
5197         information messages to stdout.
5198         * jcf-dump.c: Include "intl.h".
5199         (main): Call gcc_init_libintl.
5200         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5201         Mark error, usage and version messages for translation with _.
5202         Avoid splitting up sentences.
5203         * jv-scan.c: Include "intl.h".
5204         (fatal_error, warning): Change parameter s to msgid.  Translate
5205         messages.
5206         (main): Call gcc_init_libintl.
5207         (usage, help, version): Mark error, usage and version messages for
5208         translation with _.  Avoid splitting up sentences.
5209         * jvgenmain.c: Include "intl.h".
5210         (main): Call gcc_init_libintl.
5211         (usage, main): Mark error messages for translation with _.
5212         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5213         JVGENMAIN_OBJS): Add intl.o.
5214         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5215         java/jvgenmain.o): Update dependencies.
5216
5217 2004-02-08  Per Bothner  <per@bothner.com>
5218
5219         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5220         class don't use not_accessible_field_error, which can get confused.
5221
5222 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5223
5224         Make-lang.in (po-generated):  Delete.
5225
5226 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5227
5228         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5229         Depend on target.h.
5230         * decl.c: Include target.h.
5231         (start_java_method): Replace PROMOTE_PROTOTYPES with
5232         targetm.calls.promote_prototypes.
5233         * expr.c: Include target.h.
5234         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5235         targetm.calls.promote_prototypes.
5236         * parse.y: Include target.h.
5237         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5238         with targetm.calls.promote_prototypes.
5239
5240 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5241
5242         * typeck.c: Update copyright.
5243
5244 2004-02-02  Tom Tromey  <tromey@redhat.com>
5245
5246         * decl.c (java_init_decl_processing): Remove duplicate
5247         gnu/gcj/RawData.
5248
5249 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5250
5251         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5252
5253 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5254
5255         * expr.c (build_field_ref): Move variable
5256         definition up.
5257
5258 2004-01-28  Andrew Haley  <aph@redhat.com>
5259
5260         * expr.c (build_field_ref): Widen field offset.
5261
5262 2004-01-27  Andrew Haley  <aph@redhat.com>
5263
5264         java/13273
5265         * parse.y (check_interface_throws_clauses): Make sure class_decl
5266         has been loaded.
5267
5268 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5269
5270         PR java/13733
5271         * parse.y (patch_assignment): Don't modify lhs_type for
5272         reference assignments.
5273
5274 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5275
5276         * Make-lang.in: Replace $(docdir) with doc.
5277         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5278         (java.install-man): Revamp rule.
5279
5280 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5281
5282         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5283         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5284         instead of deferred backquote.
5285
5286 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5287
5288         * typeck.c (find_method_in_interfaces): Move variable
5289         definition up.
5290
5291 2004-01-16  Andrew Haley  <aph@redhat.com>
5292
5293         PR java/13273:
5294         * typeck.c (shallow_find_method): New.
5295         (find_method_in_superclasses): New.
5296         (find_method_in_interfaces): New.
5297         (lookup_do): Rewrite.
5298         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5299
5300         * jcf-parse.c (read_class): Save and restore output_class.
5301         * decl.c (java_expand_body): Set output_class from fndecl.
5302
5303 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5304
5305         * class.c (gen_indirect_dispatch_tables): Fix string length
5306         calculations.
5307
5308 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5309
5310         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5311         (java.srcextra): Copy above back to source directory if requested.
5312         (po-generated): Delete reference to $(parsedir).
5313         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5314         Use implicit rule.
5315
5316 2004-01-14  Jan Hubicka  <jh@suse.cz>
5317
5318         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5319         estimation.
5320
5321 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5322
5323         * java-tree.h (java_expand_expr): Change prototype.
5324         * expr.c (java_expand_expr): Add alt_rtl parameter.
5325
5326 2004-01-09  Andrew Haley  <aph@redhat.com>
5327
5328         PR java/12755:
5329         * parse.y (java_fix_constructors):  Set output_class.
5330         (java_reorder_fields): Likewise.
5331         (java_layout_classes): Likewise.
5332         (java_expand_classes): Generate indirect dispatch tables.
5333         (java_expand_classes): Set output_class.
5334         (java_finish_classes): Likewise.
5335         * lang.c (java_init): Turn on always_initialize_class_p if we're
5336         using indirect dis[atch.
5337         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5338         (java_get_callee_fndecl): Use class local atable.
5339         * jcf-parse.c
5340         (always_initialize_class_p): Decl moved to java-tree.h.
5341         (HANDLE_CLASS_INFO): Set output_class.
5342         (read_class): Likewise.
5343         (parse_class_file): Call gen_indirect_dispatch_tables.
5344         (parse_zip_file_entries): Set output_class.
5345         (java_parse_file): Set output_class.  Don't emit symbol tables.
5346         * java-tree.h (output_class): New.
5347         Remove global declarations for otable, atable, and ctable.
5348         (always_initialize_class_p): moved here from decl.c.
5349         (DECL_OWNER): New.
5350         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5351         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5352         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5353         (struct lang_type): Add otable_methods, otable_decl,
5354         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5355         ctable_decl, catch_classes, type_to_runtime_map.
5356         * expr.c (build_field_ref): Make otable, atable, and ctable class
5357         local rather than global.
5358         (build_known_method_ref): Likewise.
5359         (build_invokeinterface): Likewise.
5360         (java_expand_expr): Pass runtime type (rather than actual type) to
5361         expand_start_catch.
5362         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5363         this class.  Look up each class in that map to delete duplicates.
5364         (expand_end_java_handler): Pass runtime type (rather than actual
5365         type) to expand_start_catch.
5366         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5367         (do_nothing): New.
5368         (java_init_decl_processing): Rearrange things.  Remove global
5369         declarations of otable, atable, and ctable.
5370         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5371         (java_expand_body): Set output_class.
5372         * constants.c (build_constant_data_ref): Use output_class, not
5373         current_class.
5374         (alloc_name_constant): Likewise.
5375         * class.c (gen_indirect_dispatch_tables): New.
5376         (build_class_ref): Generate hard reference to superclass, even if
5377         using indirect dispatch.
5378         (build_static_field_ref): Use class local atable.
5379         (make_class_data): Generate hard reference to superclass, even if
5380         using indirect dispatch.
5381         Generate symbolic references to interfaces when using indirect
5382         dispatch.
5383         (make_class_data): Emit otable, atable, and ctable.
5384         Make otable, atable, and ctable class local rather than global.
5385         (emit_catch_table): Make otable, atable, and ctable class local
5386         rather than global.
5387
5388 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5389
5390         * parse.y (catch_clause_parameter): Fix typo.
5391
5392         PR java/13404
5393         * parse.y: (catch_clause_parameter): Return early if $3, aka
5394         formal_parameter, is null.
5395
5396 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5397
5398         * class.c: Remove uses of "register" specifier in
5399         declarations of arguments and local variables.
5400         * decl.c: Likewise.
5401         * expr.c: Likewise.
5402         * gjavah.c: Likewise.
5403         * jcf-dump.c: Likewise.
5404         * jcf-io.c: Likewise.
5405         * jcf-parse.c: Likewise.
5406         * jcf-write.c: Likewise.
5407         * keyword.h: Likewise.
5408         * parse.y: Likewise.
5409         * typeck.c: Likewise.
5410         * verify.c: Likewise.
5411
5412 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5413
5414         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5415         (java.install_common, java.install-man): Adjust for above.
5416         (java.uninstall): Likewise.
5417
5418 2003-12-03  Michael Koch  <konqueror@gmx.de>
5419
5420         * class.c (make_class_data):
5421         Push field value to 'hack_signers' instead of 'signers'.
5422         * decl.c (java_init_decl_processing):
5423         Push field 'hack_signers' instead of 'signers'.
5424
5425 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5426
5427         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5428         including iconv.h.
5429
5430 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5431
5432         PR java/12374:
5433         * parse.y (qualify_ambiguous_name): Remove lots of broken
5434         field access processing - there's no need to do that here,
5435         because we have resolve_field_access.  Remove
5436         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5437         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5438         used.
5439
5440 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5441
5442         Fix PR java/13237
5443         * parse.y (java_complete_lhs): Save location prior to patching
5444         CALL_EXPR.
5445
5446 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5447
5448         PR java/12548
5449         * resource.c (write_resource_constructor): Append
5450         "_resource" to constructor identifier name.
5451
5452 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5453
5454         Fix PR java/13183.
5455         * constants.c (cpool_for_class): New function.
5456         (outgoing_cpool): Remove global variable.
5457         (alloc_name_constant): Use cpool_for_class.
5458         (build_constants_constructor): Likewise.
5459         * decl.c (java_expand_body): Set current_class.
5460         * java-tree.h (outgoing_cpool) Remove declaration.
5461         (init_outgoing_cpool): Likewise.
5462         * jcf-parse.c (init_outgoing_cpool): Remove function.
5463         (parse_class_file): Don't call init_outgoing_cpool.
5464         * parse.y (java_complete_expand_methods): Don't call
5465         init_outgoing_cpool.  Don't save outgoing_cpool.
5466         (java_expand_classes): Don't restore outgoing_cpool.
5467         (java_finish_classes): Likewise.
5468
5469 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5470
5471         * Make-lang.in: (java.install-common) Add
5472         symlink for $(target_noncanonical)-gcjh for
5473         native builds.
5474
5475 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5476
5477         * Make-lang.in (java.extraclean): Delete.
5478
5479 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5480
5481         * Make-lang.in (check-java): Add.
5482
5483 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5484
5485         Fix PR java/13024.
5486         * except.c (prepare_eh_table_type): Allocate variable-sized
5487         buffer `buf' with alloca.
5488
5489 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5490
5491         Fix PR java/12857.
5492
5493         decl.c (java_init_decl_processing): Don't initialize
5494         class_not_found_type_node, no_class_def_found_type_node.
5495
5496         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5497         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5498         (class_not_found_type_node, no_class_def_found_type_node):
5499         Don't define.
5500
5501         parse.y (build_dot_class_method_invocation): Add this_class
5502         argument.  Qualify method invocations to a different class.
5503         (create_new_parser_context): Initialize saved_data_ctx to 0.
5504         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5505         (build_dot_class_method): Don't load classes.  Register
5506         incomplete types.
5507         (build_incomplete_class_ref): Special cases for interfaces
5508         and inner classes.  Move build_dot_class_method call to here...
5509         (patch_incomplete_class_ref): ...from here.  Pass current_class
5510         to build_dot_class_method_invocation.
5511         (build_assertion): Pass class_type to
5512         build_dot_class_method_invocation.
5513         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5514
5515 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5516
5517         Fix PR java/12739.
5518         * java-tree.h (BLOCK_EMPTY_P): Define.
5519         * parse.y (java_complete_lhs): Check for empty blocks
5520         in TRY_FINALLY_EXPR case.
5521
5522 2003-11-17  Andrew Haley  <aph@redhat.com>
5523
5524         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5525         (struct lang_decl_var:freed): New variable.
5526         * decl.c (poplevel): Mark local vars that have gone out of scope.
5527         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5528         scope.
5529
5530 2003-11-16  Jason Merrill  <jason@redhat.com>
5531
5532         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5533         and TAGS files that include them for each front end.
5534
5535 2003-11-15  Tom Tromey  <tromey@redhat.com>
5536
5537         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5538
5539 2003-11-12  Jason Merrill  <jason@redhat.com>
5540
5541         PR optimization/12547
5542         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5543         BLOCK_EXPR_BODY directly.
5544
5545 2003-11-12  Andrew Haley  <aph@redhat.com>
5546
5547         PR java/11045
5548         * parse.y (fold_constant_for_init): Check that we really do have a
5549         constant.
5550
5551         PR java/11533
5552         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5553         init_test_decls being inlined.
5554
5555         PR java/12890:
5556         * parse.y (do_resolve_class): Check return value from
5557         breakdown_qualified().
5558
5559 2003-11-11  Tom Tromey  <tromey@redhat.com>
5560
5561         PR java/12915:
5562         * parse.y (merge_string_cste): Handle case where we have a
5563         pointer that happens to be zero, not null_pointer_node.
5564
5565 2003-11-10  Tom Tromey  <tromey@redhat.com>
5566
5567         * jcf-parse.c (classify_zip_file): Correctly compare
5568         filename_length against length of manifest file's name.
5569
5570 2003-11-08  Tom Tromey  <tromey@redhat.com>
5571
5572         PR java/12894:
5573         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5574
5575 2003-11-06  Andrew Haley  <aph@redhat.com>
5576
5577         * expr.c (java_stack_swap): Make sure destination stack slots are
5578         of the correct type.
5579
5580 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5581
5582         * Make-lang.in (dvi): Move targets to $(docobjdir).
5583         (gcj.dvi): Simplify rule and adjust target.
5584         (gcj.info): Simplify rule.
5585         (gcj.pod): New intermediate rule.
5586         (gcjh.pod): Likewise.
5587         (jv-scan.pod): Likewise.
5588         (jcf-dump.pod): Likewise.
5589         (gij.pod): Likewise.
5590         (jv-convert.pod): Likewise.
5591         (rmic.pod): Likewise.
5592         (rmiregistry.pod): Likewise.
5593         (gcj.1): Delete.
5594         (gcjh.1): Delete.
5595         (jv-scan.1): Delete.
5596         (jcf-dump.1): Delete.
5597         (gij.1): Delete.
5598         (jv-convert.1): Delete.
5599         (rmic.1): Delete.
5600         (rmiregistry.1): Delete.
5601
5602 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5603
5604         Fixes PR java/12866.
5605         * parse.y (resolve_qualified_expression_name): Move test
5606         for outer field access methods from here...
5607         (check_thrown_exceptions) ...to here.
5608
5609 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5610
5611         * .cvsignore: Delete.
5612
5613 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5614
5615         * verify.c (verify_jvm_instructions): Don't warn about legal
5616         eh binding regions generated for example by jdk 1.4.1.
5617
5618 2003-10-24  David S. Miller  <davem@redhat.com>
5619
5620         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5621
5622 2003-10-22  Andrew Haley  <aph@redhat.com>
5623
5624         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5625         (java_get_callee_fndecl): New.
5626
5627         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5628
5629         * java-tree.h (ctable_decl): New.
5630         (catch_classes):  New.
5631         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5632
5633         * decl.c (java_init_decl_processing): Add catch_class_type.
5634         Add ctable_decl.
5635         Add catch_classes field.
5636
5637         * class.c (build_indirect_class_ref): Break out from
5638         build_class_ref.
5639         (make_field_value): Check flag_indirect_dispatch.
5640         (make_class_data): Ditto.
5641         Tidy uses of PUSH_FIELD_VALUE.
5642         Add field catch_classes.
5643         (make_catch_class_record): New.
5644
5645         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5646
5647 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5648
5649         * jcf-write.c: Follow spelling conventions.
5650         * parse.y: Likewise.
5651
5652 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5653
5654         * ChangeLog: Fix typos.
5655         * expr.c: Fix comment typos.
5656         * jcf-write.c: Likewise.
5657         * lang.c: Likewise.
5658         * lex.c: Likewise.
5659         * mangle.c: Likewise.
5660         * parse-scan.y: Likewise.
5661         * parse.y: Likewise.
5662
5663 2003-10-22  Tom Tromey  <tromey@redhat.com>
5664
5665         * expr.c (expand_byte_code): Only warn about dead bytecode when
5666         extra_warnings is set.
5667
5668 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5669
5670         Fix for PR java/12586.
5671         * mangle.c (find_compression_record_match): Don't iterate through
5672         package namespace elements unless they all match compression_table
5673         entries.
5674
5675 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5676
5677         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5678         (generate-manpages): Likewise.
5679         (java.maintainer-clean): Likewise.
5680         (gcj.info): Likewise.
5681         (gcj.1): Likewise.
5682         (gcjh.1): Likewise.
5683         (jv-scan.1): Likewise.
5684         (jcf-dump.1): Likewise.
5685         (gij.1): Likewise.
5686         (jv-convert.1): Likewise.
5687         (rmic.1): Likewise.
5688         (rmiregistry.1): Likewise.
5689         (java.install-man): Likewise.
5690         (parse-scan.o): Move and define complete compile line.
5691         (parse.o): Likewise.
5692         (jcf-tree-inline.o): Move.
5693
5694 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5695
5696         * Make-lang.in (info): Update dependencies.
5697         (java.install-info): Remove.
5698         ($(srcdir)/java/gcj.info): Replace with ...
5699         ($(docobjdir)/gcj.info): ... this.
5700
5701 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5702
5703         * Make-lang.in: Replace uses of $(target_alias) with
5704         $(target_noncanonical).
5705
5706 2003-10-09  Tom Tromey  <tromey@redhat.com>
5707
5708         * decl.c (java_init_decl_processing): Declare signers field.
5709         * class.c (make_class_data): Set signers field.
5710
5711 2003-10-09  Jason Merrill  <jason@redhat.com>
5712
5713         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5714         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5715         POINTER_TYPE.
5716
5717 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5718
5719         * Make-lang.in (java.info): Replace with ...
5720         (info): ... this.
5721         (java.dvi): Replace with ...
5722         (dvi): ... this.
5723         (java.generated-manpages): Replace with ...
5724
5725 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5726
5727         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5728
5729 2003-10-01  Andrew Haley  <aph@redhat.com>
5730
5731         * jcf-parse.c (java_parse_file): Write otable and atable.
5732         * java-tree.h (atable_methods): New.
5733         (atable_decl): New.
5734         (atable_syms_decl): New.
5735         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5736         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5737         (symbol_*type): Rename method_symbol* to symbol*type.
5738         (emit_offset_symbol_table): Delete.
5739         (emit_symbol_table): New.
5740         (get_symbol_table_index): New.
5741         (atable_type): New.
5742         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5743         (build_known_method_ref): Likewise.
5744         (get_symbol_table_index): Rename from get_offset_table_index.
5745         Parameterize to allow re-use by differing types of symbol table.
5746         (build_invokevirtual): Pass table to get_offset_table_index.
5747         * decl.c (java_init_decl_processing): Push types and decls for
5748         atable and atable_syyms.
5749         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5750         (make_class_data): Add new fields atable and atable_syms.
5751         (emit_symbol_table): Rename from emit_offset_symbol_table.
5752         Parameterize to allow re-use by different types of symbol table.
5753         (build_symbol_entry): Renamed from build_method_symbols_entry.
5754
5755 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5756
5757         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5758         semantics for SAVE_EXPR, by caching the result in a temporary.
5759
5760 2003-09-28  Richard Henderson  <rth@redhat.com>
5761
5762         * check-init.c (check_init): Save and restore input_location
5763         instead of file and line separately.
5764         * decl.c (java_expand_body): Likewise.
5765         * jcf-write.c (generate_bytecode_insns): Likewise.
5766         * parse.y (safe_layout_class): Likewise.
5767         * jcf-parse.c (read_class, parse_class_file): Likewise.
5768         (java_parse_file): Use %H for warning locator.
5769
5770 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5771
5772         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5773         with void-type branches instead of using a COMPOUND_EXPR.
5774
5775 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5776
5777         * decl.c (java_optimize_inline, dump_function): Remove.
5778         * java-tree.h (java_optimize_inline): Remove declaration.
5779         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5780         * parse.y (source_end_java_method, java_expand_classes):
5781         Likewise.  Remove dead code.
5782
5783 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5784
5785         * lang.c (java_init_options): Set flag_evaluation_order.
5786         * expr.c (force_evaluation_order): Don't attempt to force
5787         evaluation order of binary operations using save_expr.
5788         * parse.y (java_complete_lhs): No longer need to call
5789         force_evaluation_order when constructing binary operators.
5790
5791 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5792             Bryce McKinlay  <bryce@mckinlay.net.nz>
5793
5794         PR java/1333:
5795         * parse.y (not_accessible_field_error): New function.
5796         (resolve_expression_name): Check field access permissions.
5797         (resolve_qualified_expression_name): Use
5798         not_accessible_field_error.
5799         (resolve_qualified_expression_name): Likewise.
5800
5801 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5802
5803         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5804
5805 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5806
5807         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5808         with equal operands without side-effects.
5809
5810 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5811
5812         * decl.c (java_init_decl_processing): Don't emit otable decls
5813         if flag_indirect_dispatch is not set.
5814
5815 2003-09-21  Richard Henderson  <rth@redhat.com>
5816
5817         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5818         resource.c: Revert.
5819
5820 2003-09-21  Richard Henderson  <rth@redhat.com>
5821
5822         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5823         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5824
5825 2003-09-20  Richard Henderson  <rth@redhat.com>
5826
5827         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5828
5829 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5830
5831         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5832         * check-init.c (check_init): Likewise.
5833
5834 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5835
5836         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5837
5838 2003-09-16  Andrew Haley  <aph@redhat.com>
5839
5840         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5841
5842 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5843
5844         Fixes PR java/9577
5845         * mangle.c (find_compression_record_match): Skip
5846         over a "6JArray" (the array template mangled string)
5847         IDENTIFIER_NODE.
5848         (mangle_array_type): Correct minor typo.
5849         (atms): Move definition to the beginning.
5850
5851 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5852
5853         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5854         out. Fix for PR java/12254.
5855
5856 2003-09-11  Richard Henderson  <rth@redhat.com>
5857
5858         * parse.y (source_end_java_method): Update for new
5859         cgraph_finalize_function argument.
5860
5861 2003-09-09  Richard Henderson  <rth@redhat.com>
5862
5863         * parse.y (source_end_java_method): Update call to
5864         cgraph_finalize_function.
5865
5866 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5867
5868         * decl.c (java_expand_body): New function.
5869         * expr.c (build_class_init): Set DECL_IGNORED_P.
5870         * java-tree.h (start_complete_expand_method,
5871         java_expand_body): Declare.
5872         * jcf-parse.c (cgraph.h): Include.
5873         (java_parse_file): Handle flag_unit_at_a_time.
5874         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5875         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5876         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5877         (java_start_inlining): New function.
5878         * parse.h (java_finish_classes): Declare.
5879         * parse.y: Include cgraph.h.
5880         (block): Don't special-case empty block production.
5881         (craft_constructor): Set DECL_INLINE.
5882         (source_end_java_method): Handle flag_unit_at_a_time.
5883         Replace inline code with call to java_expand_body.
5884         (start_complete_expand_method): Remove static modifier.
5885         (java_expand_method_bodies): Patch function tree for
5886         class initialization and/or synchronization as needed.
5887         Don't begin RTL expansion yet.
5888         (java_expand_classes): Check flag_unit_at_a_time before
5889         calling finish_class.
5890         (java_finish_classes): New function.
5891         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5892         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5893         (emit_test_initialization): Set DECL_IGNORED_P.
5894
5895 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5896
5897         * builtins.c (enum builtin_type): Delete unused enumeration.
5898         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5899
5900 2003-08-28  Tom Tromey  <tromey@redhat.com>
5901
5902         * gcj.texi (Extensions): Document gcjlib URLs.
5903
5904 2003-08-20  Tom Tromey  <tromey@redhat.com>
5905
5906         * gcj.texi (Extensions): Added xref.
5907         (libgcj Runtime Properties): Document
5908         gnu.gcj.runtime.VMClassLoader.library_control.
5909
5910 2003-08-20  Andrew Haley  <aph@redhat.com>
5911
5912         * except.c (prepare_eh_table_type): Use new encoding for exception
5913         handlers when using -fno-assume-compiled.
5914
5915 2003-08-13  Tom Tromey  <tromey@redhat.com>
5916
5917         * gcj.texi (Invoking gij): Document -X and -?.
5918
5919 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5920
5921         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5922         GCJH_OBJS, JCFDUMP_OBJS
5923         * win32-host.c: Removed the unnecessary and broken dependency
5924         on jcf.h
5925
5926 2003-08-11  Tom Tromey  <tromey@redhat.com>
5927
5928         * parse.y (java_check_regular_methods): Typo fixes.  Call
5929         check_interface_throws_clauses.  Use
5930         check_concrete_throws_clauses.
5931         (check_interface_throws_clauses): New function.
5932         (check_concrete_throws_clauses): New function.
5933         (hack_is_accessible_p): New function.
5934         (find_most_specific_methods_list): Added FIXME.
5935         * typeck.c (lookup_do): Use `flags' argument to decide what to
5936         do.  Reimplemented.
5937         (lookup_argument_method_generic): New function.
5938         (lookup_argument_method2): Removed.
5939         * jcf.h (ACC_INVISIBLE): New define.
5940         * jcf-write.c (generate_classfile): Skip invisible methods.
5941         * class.c (add_miranda_methods): New function.
5942         (layout_class_methods): Use it.
5943         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5944         * java-tree.h (METHOD_INVISIBLE): New define.
5945         (lang_decl_func) [invisible]: New field.
5946         (lookup_argument_method_generic): Declare.
5947         (SEARCH_INTERFACE): New define.
5948         (SEARCH_SUPER): Likewise.
5949         (SEARCH_ONLY_INTERFACE): Likewise.
5950         (SEARCH_VISIBLE): Likewise.
5951         (lookup_argument_method2): Removed declaration.
5952
5953 2003-08-05  Tom Tromey  <tromey@redhat.com>
5954
5955         Fix for PR java/11600:
5956         * parse.y (java_complete_lhs): See whether we're calling a method
5957         on an array.
5958         (check_thrown_exceptions): Added `is_array_call' argument;
5959         fixed `clone' checking; updated all callers.
5960
5961 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5962
5963         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5964
5965 2003-08-03  Tom Tromey  <tromey@redhat.com>
5966
5967         * java-tree.h (METHOD_TRANSIENT): Removed.
5968         * decl.c (pushdecl): Removed some dead code.
5969         * class.c (get_access_flags_from_decl): Can't have transient
5970         method.
5971         (add_method_1): Can't have a transient method.
5972
5973 2003-07-28  Andreas Jaeger  <aj@suse.de>
5974
5975         * jvspec.c: Convert to ISO C90 prototypes.
5976
5977 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5978
5979         * decl.c (force_poplevels): Fix warning call.
5980
5981 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5982
5983         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5984         (expand_java_field_op): Likewise.
5985         * class.c (layout_class_method): Likewise
5986         (emit_register_classes): Likewise.
5987         * decl.c (pushdecl): Likewise.
5988         (poplevel): Likewise.
5989         (force_poplevels): Likewise.
5990         (give_name_to_locals): Likewise.
5991         * check-init.c (check_for_initialization): Likewise.
5992
5993 2003-07-24  Jason Merrill  <jason@redhat.com>
5994
5995         * java-tree.h: Move boolean_type_node et al to the back end.
5996
5997 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5998
5999         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6000         casts.
6001
6002 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
6003
6004         * lang.opt: Don't show -MD_ and -MDD_.
6005
6006 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
6007
6008         * lang-options.h: Remove.
6009         * lang.opt: Add help text.
6010
6011 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
6012
6013         * expr.c: Remove the last argument to expand_assignment().
6014
6015 2003-07-09  Jan Hubicka  <jh@suse.cz>
6016
6017         * java-tree.h (DECL_NUM_STMTS): Rename to...
6018         (DECL_ESTIMATED_INSNS): ... this.
6019         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6020         New static functions.
6021         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6022         * parser.y (add_stmt_to_compound): Do not account statements.
6023
6024 2003-07-08  Mark Wielaard  <mark@klomp.org>
6025
6026         * gcj.texi: CNI now expands to Compiled Native Interface.
6027
6028 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6029
6030         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6031
6032 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6033
6034         * expr.c (expand_byte_code): Adjist emit_line_note call.
6035
6036 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
6037
6038         * lang.c (java_handle_option): Don't handle filenames.
6039
6040 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
6041
6042         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6043         DIR_SEPARATOR.
6044         Use FILENAME_CMP.
6045         * jcf-write.c: Don't default-define DIR_SEPARATOR.
6046         * jcf.h: Delete COMPARE_FILENAMES definition.
6047
6048 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
6049
6050         * lang.c (java_init_options): Update prototype.
6051
6052 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
6053
6054         * decl.c (poplevel): Adjust define_label call.
6055
6056 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
6057
6058         * gjavah.c (flag_jni): Make non-static.
6059         * parse-scan.y (ctxp): Make non-static.
6060
6061         * class.c (build_method_symbols_entry)
6062         * expr.c (get_offset_table_index)
6063         * jcf-parse.c (jcf_parse):
6064         Mark the definition static, matching the forward declaration.
6065
6066 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
6067
6068         * lang.c (java_handle_option): Don't check for missing arguments.
6069
6070 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6071
6072         * class.c (push_class): Use a location_t to save place.
6073         (emit_register_classes): Set input_location. Adjust
6074         expand_function_end call.
6075         * resource.c (write_resource_constructor): Likewise.
6076         * decl.c (end_java_method): Adjust expand_function_end call.
6077         * parse.y (source_end_java_method): Likewise.
6078
6079 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
6080
6081         * lang.c (java_handle_option): Likewise.
6082
6083 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6084
6085         * lang.c (java_handle_option): Special-casing of optional
6086         joined arguments no longer needed.
6087         * lang.opt: Update switches that take optional argument.
6088
6089 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6090
6091         * lang.opt: Declare Java.
6092         * lang.c (java_init_options): Update.
6093
6094 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6095
6096         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6097
6098 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6099
6100         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6101         * lang.c (java_handle_option): -MD and -MMD have an underscore.
6102         * lang.opt: -MD and -MMD have an underscore.
6103
6104 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6105
6106         * class.c (emit_register_classes): Adjust init_function_start
6107         call.
6108         * decl.c (complete_start_java_method): Likewise.
6109         * resource.c (write_resource_constructor): Likewise.
6110
6111 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6112
6113         * Make-lang.in: Update to use options.c and options.h.
6114         * lang.c: Include options.h not j-options.h.
6115         (java_handle_option): Abort on unrecognized option.
6116         (java_init_options): Request Java switches.
6117
6118 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
6119
6120         * Make-lang.in: Handle mostlyclean.
6121
6122 2003-06-11  Tom Tromey  <tromey@redhat.com>
6123
6124         * lang.c (java_handle_option): Update dependency_tracking for
6125         OPT_MF case.
6126
6127         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6128         empty argument.
6129
6130 2003-06-10  Andrew Haley  <aph@redhat.com>
6131
6132         * resource.c (write_resource_constructor): Use expand_expr to
6133         generate the address of the label attached to a resource.
6134         * Make-lang.in (java/resource.o): Add expr.h
6135
6136 2003-06-10  Andrew Haley  <aph@redhat.com>
6137
6138         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6139         (java_decl_ok_for_sibcall): New.
6140
6141 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6142
6143         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6144         (java/j-options.c, java/j-options.h): New.
6145         * java-tree.h (resource_name, compile_resource_file,
6146         compile_resource_data): Constify.
6147         * jcf-write.c (jcf_write_base_directory): Similarly.
6148         * jcf.h (jcf_write_base_directory): Similarly.
6149         * lang.c: Include j-options.h.
6150         (cl_options_count, cl_options, string_option, java_decode_option,
6151         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6152         process_option_with_no): Remove.
6153         (resource_name): Constify.
6154         (LANG_HOOKS_HANDLE_OPTION): Override.
6155         (java_handle_option): New.
6156         (java_init): Don't call jcf_path_init.
6157         (java_init_options): Call jcf_path_init.
6158         * lang.opt: New.
6159         * resource.c (compile_resource_data, compile_resource_file): Constify.
6160
6161 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6162
6163         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6164         (struct lang_decl_func): Add last_line field.
6165         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6166         DECL_SOURCE_LINE_LAST): Remove.
6167         * parse.y (missing_return_error, finish_method_declaration,
6168         lookup_cl, start_artificial_method_body, source_end_java_method,
6169         start_complete_expand_method): Adjust.
6170
6171 2003-06-08  Tom Tromey  <tromey@redhat.com>
6172
6173         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6174         fno-assume-compiled.
6175
6176 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6177
6178         * builtins.c (define_builtin_type, builtin_types): Delete.
6179         (define_builtin): Rewritten to take just the built-in code,
6180         the function's name, type and fallback library function name.
6181         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6182         (initialize_builtins): Overhaul to define the GCC builtins
6183         used by gcj manually, providing the Java run-time's
6184         implementations as the fallback library function.
6185
6186 2003-06-08  Anthony Green  <green@redhat.com>
6187
6188         * parse.y (patch_cast): Fix conversions from floating-point to
6189         integral types.
6190
6191 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6192
6193         * Make-lang.in: Update.
6194         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6195
6196 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6197
6198         * lang.c (java_init_options): Update.
6199
6200 2003-06-05  Jan Hubicka  <jh@suse.cz>
6201
6202         * Make-lang.in:  Add support for stageprofile and stagefeedback
6203
6204 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6205
6206         * lang.c (java_init_options): Prescribe wrap-around two's
6207         complement arithmetic overflow by setting flag_wrapv.
6208
6209 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6210
6211         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6212         (builtin_record): Add an additional builtin_code field to
6213         record which GCC built-in corresponds to the Java function.
6214         (java_builtins):  Add new entries for atan, atan2, exp, log,
6215         pow and tan.
6216         (max_builtin, min_builtin, abs_builtin): Perform constant
6217         folding on the resulting tree.
6218         (java_build_function_call_expr): Likewise, perform constant
6219         folding on the resulting tree.
6220         (initialize_builtins): The NULL creators are now allowed in
6221         the java_builtins table, which is now terminated by an entry
6222         with builtin_code == END_BUILTINS.
6223         (check_for_builtin): Likewise.  If the matching creator is
6224         NULL, construct the call using java_build_function_call_expr
6225         directly with the decl for the corresponding builtin_code.
6226
6227 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6228
6229         * win32-host.c: Normalize copyright boilerplate.
6230
6231 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6232
6233         * parse.y (print_int_node): Use string concatentation on
6234         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6235         function calls into one.
6236
6237 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6238
6239         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6240         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6241         all the affected error messages.
6242
6243 2003-05-13  Richard Henderson  <rth@redhat.com>
6244
6245         * class.c (layout_class_method): Set DECL_EXTERNAL.
6246         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6247         * java-tree.h (java_mark_class_local): Declare.
6248         * jcf-parse.c (parse_class_file): Use it.
6249         * parse.y (java_expand_classes): Likewise.
6250
6251 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6252
6253         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6254         * lex.h: #include input.h.
6255         * jv-scan.c (input_filename): Remove.
6256
6257 2003-05-02  Tom Tromey  <tromey@redhat.com>
6258
6259         PR java/10491:
6260         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6261         (handle_inner_classes): New function.
6262
6263 2003-05-01  Tom Tromey  <tromey@redhat.com>
6264
6265         PR java/10459:
6266         * parse.y (finish_for_loop): Do nothing if update expression is a
6267         EXPR_WFL_NODE wrapping nothing.
6268         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6269
6270 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6271
6272         * lex.h (input_lineno): Remove declaration.
6273         * parse-scan.y: #include input.h.
6274         (input_filename): Remove declaration.
6275         (input_location): Add definition.
6276         (input_line): Remove definition.
6277
6278 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6279
6280         * lex.h (lineno): Rename to ...
6281         (input_line): ... here
6282         * parse-scan.y (lineno): Rename to ...
6283         (input_line): ... here.
6284         (reset_report): Rename lineno to input_line.
6285         * check-init.c (check_init): Likewise.
6286         * class.c (push_class): Likewise.
6287         * decl.c (complete_start_java_method, end_java_method): Likewise.
6288         * expr.c (expand_byte_code): Likewise.
6289         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6290         * jcf-write.c (generate_bytecode_insns): Likewise.
6291         * lex.c (java_init_lex, java_allocate_new_line,
6292         do_java_lex): Likewise.
6293         * parse.h (YYNOT_TWICE): Likewise.
6294         * parse.y (empty_statement, expression_statement,
6295         java_pop_parser_context, java_parser_context_save_global,
6296         yyerror, register_fields, method_header, safe_layout_class,
6297         find_in_imports_on_demand, create_artificial_method,
6298         source_end_java_method, start_complete_expand_method,
6299         build_thisn_assign, java_complete_lhs,
6300         maybe_absorb_scoping_block): Likewise.
6301
6302 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6303
6304         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6305         '/' when computing java source filename
6306
6307 2003-04-13  Tom Tromey  <tromey@redhat.com>
6308
6309         * gjavah.c (print_c_decl): Indentation fix.
6310
6311 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6312
6313         * class.c (make_field_value, make_method_value, get_dispatch_table)
6314         (make_class_data, emit_offset_symbol_table)
6315         * constants.c (build_constants_constructor)
6316         * java-tree.h (START_RECORD_CONSTRUCTOR)
6317         * parse.y (maybe_build_array_element_wfl):
6318         Use build_constructor.
6319
6320 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6321
6322         PR java/10253:
6323         * parse.y (string_convert_int_cst): Always use at least one digit
6324         in string conversion. Remove ASCII dependence.
6325         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6326
6327 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6328
6329         * Make-lang.in: added win32-host.c
6330         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6331         resolves to open() on non-Win32 platforms and
6332         Win32-specific jcf_open_exact_case() on Win32
6333         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6334         when trying .java and .class files
6335         * win32-host.c: added to repository. Defines
6336         Win32-specific jcf_open_exact_case()
6337
6338 2003-04-10  Andrew Haley  <aph@redhat.com>
6339
6340         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6341         (maybe_free_localvar): Renamed from localvar_free.
6342         Add new arg, really.
6343         (generate_bytecode_insns): Set new variable, jsrs.
6344         Only free local vars if no jsr insns have been emittted.
6345         Call maybe_free_localvar, not localvar_free.
6346
6347 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6348
6349         * gcj.texi: Remove @ at start of file.
6350
6351 2003-03-25  Tom Tromey  <tromey@redhat.com>
6352
6353         * parse.y (create_interface): Call CHECK_DEPRECATED.
6354
6355 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6356
6357         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6358
6359 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6360
6361         * javaop.h (jfloat, jdouble): Make them structures mirroring
6362         the bit fields of IEEE float and double respectively.
6363         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6364         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6365         (union Word, union DWord): Delete.
6366         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6367
6368         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6369         D_NAN_MASK): Delete.
6370         (jni_print_float, jni_print_double): New.  Generate
6371         hexadecimal floating constants.
6372         (print_field_info): Use jni_print_float/double.
6373
6374         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6375         finite floating point numbers for output; special case
6376         non-finite floats.
6377
6378 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6379
6380         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6381         Replace 0 and 1 with true and false in return statements.
6382
6383 2003-03-19  Tom Tromey  <tromey@redhat.com>
6384
6385         * lex.c (do_java_lex): Renamed from java_lex.
6386         (java_lex): New function.
6387         Include timevar.h.
6388
6389 2003-03-13  Tom Tromey  <tromey@redhat.com>
6390
6391         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6392         type.
6393
6394 2003-03-04  Andrew Haley  <aph@redhat.com>
6395
6396         * gjavah.c (is_first_data_member): New global variable.
6397         (print_c_decl): If it's the first data member, align it as the
6398         superclass.
6399         (process_file): Set is_first_data_member.
6400
6401 2003-03-11  Tom Tromey  <tromey@redhat.com>
6402
6403         * parse.y (resolve_field_access): Initialize class if field is
6404         found in another static field.
6405         * expr.c (build_class_init): Don't optimize out initialization of
6406         implemented interface.
6407
6408 2003-03-11  Andrew Haley  <aph@redhat.com>
6409
6410         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6411         warning.
6412
6413 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6414
6415         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6416         and DIR_SEPARATOR_2 for a target.
6417         Correct minor typos.
6418
6419         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6420         and DIR_SEPARATOR_2 for a target into account.
6421
6422 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6423
6424         * lang.c (java_init): Update prototype, move code to java_post_options.
6425         (java_post_options): Similarly.
6426
6427 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6428
6429         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6430         compare file name components depending on the case-sensitivity
6431         or otherwise of the host file system.
6432
6433         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6434         "strcmp" to compare file name components.
6435         Use IS_DIR_SEPARATOR instead of comparing directly against
6436         DIR_SEPARATOR.
6437         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6438         comparing directly against DIR_SEPARATOR.
6439
6440 2003-03-04  Tom Tromey  <tromey@redhat.com>
6441
6442         * Make-lang.in (java.tags): New target.
6443
6444 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6445
6446         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6447         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6448
6449 2003-03-01  Tom Tromey  <tromey@redhat.com>
6450
6451         * parse.y (jdep_resolve_class): Only check deprecation if we found
6452         a decl.
6453
6454 2003-02-28  Tom Tromey  <tromey@redhat.com>
6455
6456         PR java/9695:
6457         * class.c (maybe_layout_super_class): Always pass a WFL to
6458         do_resolve_class.
6459         * parse.y (do_resolve_class): Updated comment to explain
6460         parameters.
6461
6462 2003-02-26  Tom Tromey  <tromey@redhat.com>
6463
6464         * jcf-write.c (generate_classfile): Check whether class is
6465         deprecated before writing attribute count.
6466
6467 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6468
6469         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6470         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6471
6472 2003-02-23  Tom Tromey  <tromey@redhat.com>
6473
6474         * lang-options.h: Added -Wdeprecated.
6475         * gcj.texi (Warnings): Document -Wdeprecated.
6476         * java-tree.h (flag_deprecated): Declare.
6477         * lang.c (lang_W_options): Added deprecated.
6478         (flag_deprecated): New global.
6479         * chartables.h: Rebuilt.
6480         * gen-table.pl (process_one): Look at whitespace.
6481         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6482         * parse.h (CLEAR_DEPRECATED): New macro.
6483         (CHECK_DEPRECATED_NO_RESET): New macro.
6484         * jcf-parse.c (handle_deprecated): New function.
6485         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6486         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6487         * parse.y (resolve_type_during_patch): Check deprecation.
6488         (jdep_resolve_class): Likewise.
6489         (process_imports): Likewise.
6490         (resolve_expression_name): Likewise.
6491         (check_deprecation): Strip arrays from decl.  Check
6492         flag_deprecated.
6493         (patch_method_invocation): Also check the particular constructor
6494         for deprecation.
6495         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6496         * jcf-write.c (append_deprecated_attribute): New function.
6497         (generate_classfile): Generate deprecated attribute when
6498         appropriate.
6499         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6500         (java_lex) [case '*']: Simplify logic.
6501         (java_start_char_p): Use LETTER_MASK.
6502         (java_part_char_p): Likewise.
6503         (java_space_char_p): New function.
6504
6505 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6506
6507         Change base class access representation.
6508         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6509         (add_interface_do): Likewise.
6510
6511 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6512
6513         * decl.c (java_init_decl_processing): Change
6514         soft_lookupjnimethod_node to reflect the change in
6515         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6516         * expr.c (build_jni_stub): Calculate and pass the size
6517         on the stack of the arguments to a JNI function. Use
6518         new target macro MODIFY_JNI_METHOD_CALL to allow a
6519         target to modify the call to a JNI method.
6520
6521 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6522
6523         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6524         instead of basename to avoid compiler warnings on Tru64.
6525
6526 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6527
6528         * gcj.texi: Update to GFDL 1.2.
6529
6530 2003-01-31  Andrew Haley  <aph@redhat.com>
6531
6532         * parse.y (java_expand_classes): Scan the whole class list looking
6533         for access methods that haven't yet been expanded.
6534
6535 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6536
6537         Fix for java/4269:
6538
6539         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6540         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6541         * jcf-parse.c: Likewise.
6542
6543 2003-01-31  Mark Wielaard  <mark@klomp.org>
6544
6545         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6546
6547 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6548
6549         * class.c (make_class): Use BINFO_ELTS.
6550         (set_super_info): Likewse.
6551         (add_interface_do): Likewise.
6552
6553 2003-01-30  Tom Tromey  <tromey@redhat.com>
6554
6555         * jcf-parse.c (read_class): Update identifier's class value if it
6556         changed during parsing.
6557
6558 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6559
6560         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6561         Propagate change to all other rules as required.
6562         (java/parse-scan.o): Add explicit dependency on
6563         $(parsedir)/java/parse-scan.c .
6564
6565 2003-01-29  Tom Tromey  <tromey@redhat.com>
6566
6567         * parse.y (patch_assignment): Only transform the rhs of an
6568         assignment when compiling to native.
6569
6570 2003-01-28  Tom Tromey  <tromey@redhat.com>
6571
6572         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6573
6574 2003-01-28  Tom Tromey  <tromey@redhat.com>
6575
6576         * lex.c (java_lex): Don't include UEOF as part of token.
6577         (java_read_unicode): Error if \u sequence prematurely terminated.
6578
6579 2003-01-27  Tom Tromey  <tromey@redhat.com>
6580
6581         * parse.y (java_check_regular_methods): Check for construct after
6582         checking types in throws clause.
6583
6584 2003-01-24  Tom Tromey  <tromey@redhat.com>
6585
6586         * class.c (build_static_field_ref): Only a String or numeric field
6587         can fold to a constant.
6588
6589 2003-01-23  Tom Tromey  <tromey@redhat.com>
6590
6591         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6592         file name in resource buffer.
6593
6594 2003-01-23  Tom Tromey  <tromey@redhat.com>
6595
6596         * expr.c (build_known_method_ref): Use method's context to find
6597         method table index.
6598
6599 2003-01-23  Tom Tromey  <tromey@redhat.com>
6600
6601         * constants.c (set_constant_entry): Allocated cleared memory.
6602
6603 2003-01-22  Tom Tromey  <tromey@redhat.com>
6604
6605         * java-tree.h: Don't use PARAMS.
6606         * resource.c: Add prototypes for all functions.
6607         (write_resource_constructor): Use `const char *' to avoid
6608         warning.
6609
6610 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6611
6612         * jcf-parse.c (process_zip_dir): Remove unused variable.
6613
6614 2003-01-22  Tom Tromey  <tromey@redhat.com>
6615
6616         * expr.c (build_invokeinterface): Abort if method's context is not
6617         an interface.
6618
6619 2003-01-22  Tom Tromey  <tromey@redhat.com>
6620
6621         * gcj.texi (Input and output files): Mention non-class entries.
6622         * decl.c (java_init_decl_processing): Call
6623         init_resource_processing.
6624         * java-tree.h (compile_resource_data, write_resource_constructor,
6625         compile_resource_file, init_resource_processing): Declare.
6626         * config-lang.in (gtfiles): Added resource.c.
6627         * Make-lang.in (gt-java-resource.h): New target.
6628         (JAVA_OBJS): Added resource.o.
6629         (java/resource.o): New target.
6630         * resource.c: New file.
6631         * class.c (compile_resource_file): Moved to resource.c.
6632         (registerResource_libfunc): Likewise.
6633         (utf8_decl_list): Mark with GTY; now static.
6634         * jcf-parse.c (classify_zip_file): New function.
6635         (parse_zip_file_entries): Use it; compile .properties files.
6636         (process_zip_dir): Use classify_zip_file and compute_class_name.
6637         Don't write class name into zip directory.
6638         (java_parse_file): Call write_resource_constructor.
6639         (compute_class_name): New function.
6640         * jcf-io.c (read_zip_member): Reindented.
6641
6642 2003-01-21  Tom Tromey  <tromey@redhat.com>
6643
6644         * class.c (supers_all_compiled): New function.
6645         (make_class_data): Use it.
6646
6647 2003-01-21  Tom Tromey  <tromey@redhat.com>
6648
6649         * parse.y (method_header): Native method can't be strictfp.
6650         No method can be transient or volatile.
6651
6652 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6653
6654         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6655
6656 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6657
6658         * check-init.c: Fix comment typos.
6659         * class.c: Likewise.
6660         * constants.c: Likewise.
6661         * decl.c: Likewise.
6662         * except.c: Likewise.
6663         * expr.c: Likewise.
6664         * java-except.h: Likewise.
6665         * java-tree.h: Likewise.
6666         * javaop.h: Likewise.
6667         * jcf-dump.c: Likewise.
6668         * jcf-io.c: Likewise.
6669         * jcf-parse.c: Likewise.
6670         * jcf-write.c: Likewise.
6671         * lang.c: Likewise.
6672         * mangle.c: Likewise.
6673         * typeck.c: Likewise.
6674         * verify.c: Likewise.
6675
6676 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6677
6678         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6679         * jcf-write.c: Include "tm_p.h".
6680
6681 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6682
6683         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6684
6685 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6686
6687         * builtins.c (java_build_function_call_expr): Renamed from
6688         build_function_call_expr.  All callers changed.
6689
6690         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6691         * jcf-parse.c: Include tm_p.h.
6692
6693         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6694         warning.
6695
6696 2003-01-14  Tom Tromey  <tromey@redhat.com>
6697
6698         * class.c (make_class_data): Check that super is compiled before
6699         building class reference to it.
6700
6701 2003-01-14  Andrew Haley  <aph@redhat.com>
6702
6703         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6704         varargs function -- correct.
6705
6706 2003-01-14  Andrew Haley  <aph@redhat.com>
6707
6708         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6709
6710 2003-01-14  Andrew Haley  <aph@redhat.com>
6711
6712         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6713         varargs function -- correct.
6714
6715         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6716         temporary if the RHS is a reference.
6717
6718 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6719
6720         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6721         * keyword.h: Regenerated.
6722
6723         * All Files: Convert to ISO C style function definitions.
6724
6725 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6726
6727         * parse.y (check_pkg_class_access): ANSIfy definition.
6728
6729 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6730
6731         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6732         xmalloc et al.
6733
6734         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6735
6736 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6737
6738         Merge from pch-branch:
6739
6740         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6741
6742         * Make-lang.in (java/gjavah.o): Update dependencies.
6743         * gjavah.c: Include ggc.h.
6744
6745         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6746
6747         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6748         (JCFDUMP_OBJS): Add ggc-none.o.
6749         (java/jcf-dump.o): Depend on GGC_H.
6750         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6751         CPool substructures.
6752         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6753         * jcf-dump.c: Include ggc.h.
6754
6755         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6756
6757         * jcf.h (union cpool_entry): New.
6758         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6759         an array of unions.
6760         (struct JCF): Use gengtype to mark.
6761         (CPOOL_UINT): Update for new cpool_entry type.
6762         (CPOOL_USHORT1): Likewise.
6763         (CPOOL_USHORT2): Likewise.
6764         (CPOOL_FINISH): Use GC to free cpool subfields.
6765         * parse.h (struct parser_ctxt): Mark field current_jcf.
6766         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6767         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6768         (main_jcf): Use gengtype to mark.
6769         (ggc_mark_jcf): Delete.
6770         (get_constant): Update for new cpool_entry type.
6771         (give_name_to_class): Likewise.
6772         (get_class_constant): Likewise.
6773         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6774         (java_parse_file): Use GGC to allocate struct JCF.
6775         (init_jcf_parse): Don't call ggc_add_root.
6776         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6777         cpool_entry type.
6778         * java-tree.h (current_jcf): Use gengtype to mark.
6779         (CPOOL_UTF): Update for new cpool_entry type.
6780         (outgoing_cpool): Use gengtype to mark.
6781         (struct lang_type): GC struct JCF and struct CPool.
6782         * config-lang.in (gtfiles): Add jcf.h.
6783         * constants.c (find_tree_constant): New.
6784         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6785         for new cpool_entry type.
6786         (find_constant1): Update for new cpool_entry type.
6787         (find_constant2): Likewise.
6788         (find_utf8_constant): Use find_tree_constant.
6789         (find_class_or_string_constant): Remove unnecessary cast to jword.
6790         Update for new cpool_entry type.
6791         (count_constant_pool_bytes): Update for new cpool_entry type.
6792         (write_constant_pool): Likewise.
6793         (alloc_name_constant): Use find_tree_constant.
6794         (build_constants_constructor): Update for new cpool_entry type.
6795
6796         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6797
6798         * parse.y (mark_parser_ctxt): Delete.
6799         (goal): Don't use ggc_add_root.
6800         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6801         (java_pop_parser_context): Let GC free parser_ctxt.
6802         (java_parser_context_resume): Likewise.
6803         * parse.h (struct parser_ctxt): Use gengtype to mark.
6804         (ctxp): Likewise.
6805         (ctxp_for_generation): Likewise.
6806         * lex.h (struct java_lc_s): Mark for gengtype.
6807         (java_lexer): Rearrange for gengtype.
6808         * config-lang.in (gtfiles): Add lex.h, parse.h.
6809
6810 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6811
6812         * All Files: Remove PARAMS macro.
6813
6814         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6815         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6816         `__STDC__' macros.
6817
6818         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6819         VA_CLOSE.
6820
6821 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6822
6823         * Make-lang.in (java.install-common, java.uninstall,
6824         java.install-info, java.install-man): Prepend $(DESTDIR)
6825         to destination paths in all (un)installation commands.
6826         (java.install-common): Rewrite $(LN) command to support
6827         DESTDIR with "ln" as well as with "ln -s".
6828
6829 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6830
6831         * java-tree.h: Protect against multiple inclusion.
6832
6833 2003-01-07  Tom Tromey  <tromey@redhat.com>
6834
6835         * class.c (add_assume_compiled): Don't adjust parent if we're
6836         already at the root of tree.
6837
6838 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6839
6840         * lang.c (dump_compound_expr): Prototype.
6841
6842 2003-01-03  Tom Tromey  <tromey@redhat.com>
6843
6844         Fix for PR java/8712:
6845         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6846         when simply checking against `null'.
6847
6848 2003-01-03  Tom Tromey  <tromey@redhat.com>
6849
6850         * gcj.texi (Standard Properties): Document http.proxyHost and
6851         http.proxyPort.
6852
6853         * gcj.texi (GNU Classpath Properties): Document new properties.
6854
6855 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6856
6857         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6858         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6859         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6860
6861 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6862
6863         * Make-lang.in, boehm.c, buffer.c,
6864           buffer.h, builtins.c, class.c,
6865           config-lang.in, constants.c,
6866           convert.h, decl.c, except.c,
6867           expr.c, java-except.h,
6868           java-tree.h, javaop.def,
6869           jcf-parse.c, jcf-write.c,
6870           jv-scan.c, jvgenmain.c,
6871           jvspec.c, keyword.gperf,
6872           keyword.h, lang-options.h,
6873           lang-specs.h, lang.c, lex.c,
6874           lex.h, mangle.c, mangle_name.c,
6875           parse-scan.y, parse.h, parse.y,
6876           typeck.c, verify.c, xref.c,
6877           xref.h: Replace "GNU CC" with
6878           "GCC" in the copyright header.
6879
6880         * check-init.c, gjavah.c, javaop.h,
6881           jcf-depend.c, jcf-dump.c, jcf-io.c,
6882           jcf-path.c, jcf-reader.c, jcf.h,
6883           zextract.c, zipfile.h: These files are
6884           "part of GCC". Also say "GCC" not "GNU CC".
6885
6886 2002-12-30  DJ Delorie  <dj@redhat.com>
6887
6888         * Make-lang.in: Protect against texi2pod/pod2man failing.
6889
6890 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6891
6892         * gcj.texi: Use @copying.
6893
6894 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6895
6896         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6897         print_cxx_classname.
6898         (print_cxx_classname): Add add_scope parameter.
6899         (print_class_decls): Do not emit a semicolon after the extern
6900         "Java" block.
6901         (process_file): Adjust calls to print_cxx_classname.
6902
6903 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6904
6905         * gcj.texi: Include Cover Texts in man page.
6906
6907 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6908
6909         * class.c (build_static_field_ref): Check FIELD_FINAL.
6910
6911         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6912         instead of current_constant_pool_data_ref.
6913         * java-tree.h (current_constant_pool_data_ref): Undefine.
6914         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6915         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6916         current_constant_pool_data_ref.
6917
6918         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6919         not build_internal_class_name.
6920
6921         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6922         Use it when class ref isn't certain to be compiled.
6923
6924 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6925
6926         * gcj.texi: Include gcc-common.texi.
6927         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6928         $(srcdir)/doc/include/gcc-common.texi.
6929
6930 2002-12-22  Anthony Green  <green@redhat.com>
6931
6932         * gcj.texi (Limitations): Add note about org.xml.sax and
6933         org.w3c.dom.
6934
6935 2002-12-20  Tom Tromey  <tromey@redhat.com>
6936
6937         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6938         where minimum case value is Integer.MIN_VALUE.
6939         Fixes PR java/8955.
6940
6941 2002-12-18  Andrew Haley  <aph@redhat.com>
6942
6943         * parse.y (patch_invoke): Force evaluation order when `check' is
6944         set.  For PR libgcj/8945.
6945
6946 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6947
6948         * gcj.texi: Change version number to 3.4.
6949
6950 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6951         Andrew Haley <aph@redhat.com>
6952
6953         * parse.y (source_end_java_method): Remove custom encoding of line
6954         numbers for a function decl before passing it to the back end.
6955
6956 2002-12-03  Andrew Haley  <aph@redhat.com>
6957
6958         * class.c (make_class_data): New field, "chain".
6959         * decl.c (java_init_decl_processing): Likewise.
6960
6961 2002-12-02  Tom Tromey  <tromey@redhat.com>
6962
6963         For PR java/8740:
6964         * parse.y (do_resolve_class): Handle qualified name via
6965         recursion.
6966
6967 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6968
6969         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6970         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6971         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6972         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6973         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6974         Include coretypes.h and tm.h.
6975         * Make-lang.in: Update dependencies.
6976
6977 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6978
6979         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6980
6981 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6982
6983         * jcf-reader.c: Don't expand JCF_readu4 inside the
6984         expansion of JCF_SKIP.
6985
6986 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6987
6988         * jcf-reader.c: Don't expand JCF_readu4 inside the
6989         expansion of JCF_SKIP.
6990
6991 2002-11-22  Tom Tromey  <tromey@redhat.com>
6992
6993         * parse.y (patch_binop): Cast right hand side of shift expression
6994         to `int'.  Fixes PR java/8676.
6995
6996 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6997             Andrew Haley <aph@redhat.com>
6998
6999         * gcc/java/jcf-write.c (write_classfile): Remove target
7000         class file, if it exists, before renaming the temporary
7001         class file to it.
7002
7003 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7004
7005         * jvspec.c (lang_specific_spec_functions): New.
7006
7007 2002-11-18  Tom Tromey  <tromey@redhat.com>
7008
7009         Fix for PR java/7912:
7010         * expr.c (can_widen_reference_to): Allow cast of array to
7011         Cloneable or Serializable.
7012         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7013         (java_io_serializable_identifier_node): Likewise.
7014         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7015         (valid_ref_assignconv_cast_p): Use new identifier nodes.
7016         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7017         java_io_serializable.
7018         * decl.c (java_init_decl_processing): Initialize
7019         java_lang_cloneable_identifier_node and
7020         java_io_serializable_identifier_node.
7021         (java_lang_cloneable_identifier_node): New global.
7022         (java_io_serializable_identifier_node): Likewise.
7023
7024 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
7025
7026         * buffer.c: Remove unnecessary casts.
7027         * check-init.c: Likewise.
7028         * class.c: Likewise.
7029         * constants.c: Likewise.
7030         * decl.c: Likewise.
7031         * except.c: Likewise.
7032         * gjavah.c: Likewise.
7033         * jcf-io.c: Likewise.
7034         * jcf-parse.c: Likewise.
7035         * jcf-path.c: Likewise.
7036         * jvspec.c: Likewise.
7037         * lang.c: Likewise.
7038         * lex.c: Likewise.
7039         * verify.c: Likewise.
7040
7041 2002-11-06  Tom Tromey  <tromey@redhat.com>
7042
7043         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7044         a JNI header.
7045
7046 2002-11-05  Tom Tromey  <tromey@redhat.com>
7047
7048         Fix for PR java/6388.
7049         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7050         * java-tree.h (enum java_tree_index): New values
7051         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7052         (decimal_int_max, decimal_long_max): New defines.
7053         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
7054         (error_if_numeric_overflow): Rewrote range checking.
7055         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7056         decimal_long_max.
7057
7058 2002-11-02  Tom Tromey  <tromey@redhat.com>
7059
7060         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7061
7062         * class.c (make_method_value): Put class name, not signature, into
7063         `throws' field.  For PR java/8415.
7064
7065 2002-10-24  Tom Tromey  <tromey@redhat.com>
7066
7067         * gcj.texi (Invoking gij): Document --showversion.
7068         (Standard Properties): java.library.path now set.
7069
7070 2002-10-23  Tom Tromey  <tromey@redhat.com>
7071
7072         * gjavah.c (decode_signature_piece): In JNI mode, print
7073         `jobjectArray' when array depth is nonzero.
7074         Fixes PR java/8296.
7075
7076 2002-10-15  Andrew Haley  <aph@redhat.com>
7077
7078         * parse.y (patch_invoke): Call force_evaluation_order on a static
7079         arg list.
7080         (resolve_qualified_expression_name): Call force_evaluation_order
7081         on a arg list that is part of a Qualified Expression Name.
7082
7083         * lang.c (dump_compound_expr): New.
7084         (java_dump_tree): New.
7085
7086 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
7087
7088         * gcj.texi: Added item describing the GCJ runtime property
7089         "gnu.gcj.progname".
7090
7091 2002-10-15  Richard Henderson  <rth@redhat.com>
7092
7093         * jcf-parse.c (get_constant): Fix type warning.
7094
7095 2002-10-15  Andrew Haley  <aph@redhat.com>
7096
7097         * java-tree.h (java_inlining_merge_static_initializers): Declare.
7098         (java_inlining_map_static_initializers): Declare.
7099
7100 2002-10-14  Andrew Haley  <aph@redhat.com>
7101
7102         * tree-inline.c (remap_block): All local class initialization
7103         flags go in the outermost scope.
7104         (expand_call_inline): Call java_inlining_map_static_initializers.
7105         (expand_call_inline): Call java_inlining_merge_static_initializers.
7106         * java/lang.c (merge_init_test_initialization): New.
7107         (java_inlining_merge_static_initializers): New.
7108         (inline_init_test_initialization): New.
7109         (java_inlining_map_static_initializers): New.
7110
7111 2002-10-11  Mark Wielaard  <mark@klomp.org>
7112
7113         * gcj.texi (Compatibility): Add Limitations and Extensions section.
7114
7115 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7116
7117         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7118
7119 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7120
7121         * parse.y (merge_string_cste): Add parentheses around & within |.
7122
7123 2002-10-08  Tom Tromey  <tromey@redhat.com>
7124
7125         * parse.y (variable_declarator_id): Simplify error path for
7126         array declarator error.  For PR java/8003.
7127
7128 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
7129
7130         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7131         bug_report_url.
7132
7133 2002-10-08  Andrew Haley  <aph@redhat.com>
7134
7135         * parse.y (attach_init_test_initialization_flags): Check for
7136         error_mark_node.
7137
7138 2002-10-07  Anthony Green  <green@redhat.com>
7139
7140         * parse.y (merge_string_cste): Fix bug in string concatenation.
7141
7142 2002-10-03  Michael Koch  <konqueror@gmx.de>
7143
7144         * gcj.texi (Standard properties):
7145         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7146
7147 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7148
7149         PR optimization/6627
7150         * lang.c (java_init): If storing the vbit in function
7151         pointers, ensure that force_align_functions_log is atleast
7152         one to aid compatability with g++ vtables.
7153
7154 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7155
7156         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7157         foul of type-based aliasing.
7158
7159 2002-09-30  Anthony Green  <green@redhat.com>
7160
7161         * gcj.texi (Invoking jv-scan): Fix texinfo.
7162
7163 2002-09-28  Anthony Green  <green@redhat.com>
7164
7165         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7166         (Code Generation): Add -fno-assert documentation.
7167         * jv-scan.c (flag_assert): New global.
7168         (options): Add assert option.
7169         (help): Add --no-assert documentation.
7170         * parse-scan.y (flag_assert): New global.
7171         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7172         (flag_assert): New global.
7173         * java-tree.h (flag_assert): New global.
7174         * lex.c (java_lex): Obey flag_assert.
7175         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7176         calling cc1.
7177
7178 2002-09-26  Andrew Haley  <aph@redhat.com>
7179
7180         * expr.c (build_java_array_length_access): Check for null pointer.
7181         * expr.c (expand_java_arrayload): Likewise.
7182
7183 2002-09-21  Richard Henderson  <rth@redhat.com>
7184
7185         * jcf-parse.c (get_constant): Decode from IEEE no matter
7186         what the target format.
7187
7188 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7189
7190         * ChangeLog: Follow spelling conventions.
7191         * class.c: Likewise.
7192         * decl.c: Likewise.
7193         * expr.c: Likewise.
7194         * gjavah.c: Likewise.
7195         * java-tree.h: Likewise.
7196         * jcf-dump.c: Likewise.
7197         * jcf-parse.c: Likewise.
7198         * jvspec.c: Likewise.
7199         * lang.c: Likewise.
7200         * mangle.c: Likewise.
7201         * parse.y: Likewise.
7202
7203 2002-09-17  Tom Tromey  <tromey@redhat.com>
7204
7205         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7206         where \r appears at EOF.  Fixes PR java/7950.
7207
7208 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7209
7210         * jvspec.c (lang_specific_driver): Remove unused variable.
7211
7212 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7213
7214         * java-tree.h (union lang_tree_node): Add chain_next option.
7215
7216 2002-09-16  Richard Henderson  <rth@redhat.com>
7217
7218         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7219         use new real.h interface.
7220         * jcf-write.c (find_constant_index): Use new real.h interface.
7221         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7222
7223 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7224
7225         * lang.c: Follow spelling conventions.
7226
7227 2002-09-11  Per Bothner  <per@bothner.com>
7228
7229         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7230         constant to the type of the field.
7231         (java_complete_tree):  Remove now-redundant code.
7232
7233         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7234
7235 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7236
7237         For PR java/5794:
7238         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7239         return label if a ret instruction for the jsr has been reached.
7240
7241 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7242
7243         * parse.y (DIR_SEPARATOR): Don't define.
7244         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7245
7246 2002-08-28  Andrew Haley  <aph@redhat.com>
7247
7248         * verify.c (verify_jvm_instructions): Allow exception handler
7249         inside code that is being protected, but generate a warning.
7250         * except.c (link_handler): Initialize `expanded' in new eh_range.
7251         (binding_depth, is_class_level, current_pc): Declare extern.
7252
7253 2002-09-01  Mark Wielaard <mark@klomp.org>
7254
7255         * gcj.texi: Add chapter about system properties.
7256         Fixed some typos.
7257
7258 2002-08-26  Tom Tromey  <tromey@redhat.com>
7259
7260         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7261         conversion if RHS_TYPE is byte, short, or char.
7262
7263 2002-08-22  Tom Tromey  <tromey@redhat.com>
7264
7265         * gcj.texi (Invoking gij): Document -cp and -classpath.
7266
7267 2002-08-21  Tom Tromey  <tromey@redhat.com>
7268
7269         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7270         $(prefix)/share.  For PR libgcj/7633.
7271
7272         For PR java/6005 and PR java/7611:
7273         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7274         (java_can_use_bit_fields_p): New function.
7275
7276 2002-08-16  Tom Tromey  <tromey@redhat.com>
7277
7278         * gcj.texi (Class Initialization): Mention class initialization of
7279         arrays.
7280
7281 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7282
7283         * Make-lang.in (java-tree-inline.o): New.
7284         (JAVA_OBJS): Add java-tree-inline.o.
7285         * parse.y (source_end_java_method): Call java_optimize_inline.
7286         (java_expand_method_bodies): Save method's tree in
7287         DECL_SAVED_TREE.
7288         (add_stmt_to_compound): Keep track of the number of statments.
7289         * lang.c (java_init): Enable flag_inline_trees.
7290         (java_post_options): If flag_inline_functions is on, enable
7291         flag_inline_trees instread.
7292         (decl_constant_value): New.
7293         (java_tree_inlining_walk_subtrees): New.
7294         * java-tree.h (DECL_NUM_STMTS): New macro.
7295         (java_optimize_inline): Declare.
7296         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7297         Handle a LABEL_EXPR.
7298         * decl.c (build_result_decl): If we already have a DECL_RESULT
7299         don't make another.
7300         (dump_function): New.
7301         (java_optimize_inline): New.
7302         (dump_function): New.
7303
7304 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7305
7306         For PR java/7483:
7307         * parse.y (build_assertion): Invert return from
7308         desiredAssertionStatus.
7309
7310 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7311
7312         * jcf-write.c (get_access_flags): Return correct access flags for
7313         private and protected inner classes.
7314
7315 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7316
7317         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7318
7319 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7320
7321         * mangle_name.c: Don't include obstack.h twice.
7322         * xref.c: Don't include obstack.h.
7323
7324 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7325
7326         * class.c: (permanent_obstack): Delete declaration.
7327         * constants.c: (permanent_obstack): Delete declaration.
7328         * except.c: (permanent_obstack): Delete declaration.
7329         * expr.c: (permanent_obstack): Delete declaration.
7330         * jcf-parse.c: (permanent_obstack): Delete declaration.
7331         (saveable_obstack): Delete declaration.
7332         * parse.h: (permanent_obstack): Delete declaration.
7333         * typeck.c: (permanent_obstack): Delete declaration.
7334
7335 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7336
7337         * gcj.texi (version-gcc): Increase to 3.3.
7338
7339 2002-07-22  Tom Tromey  <tromey@redhat.com>
7340
7341         * lex.c (java_lex): Check for `e' or `E' after 0.
7342
7343 2002-07-21  Richard Henderson  <rth@redhat.com>
7344
7345         * lang.c (java_unsafe_for_reeval): New.
7346         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7347
7348 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7349
7350         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7351         (jcf_path_init): Use GET_ENVIRONMENT.
7352
7353 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7354             Zack Weinberg <zack@codesourcery.com>
7355
7356         * builtins.c (initialize_builtins): Remove defines that
7357         handled C/C++ specific junk hereby removed from builtins.def.
7358
7359 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7360
7361         * lang.c (java_post_options): Update prototype.
7362
7363 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7364
7365         * builtins.c (initialize_builtins): Ignore the additional
7366         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7367         the builtins.def file.
7368
7369 2002-07-01  Tom Tromey  <tromey@redhat.com>
7370
7371         For PR libgcj/7073:
7372         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7373         specially.
7374
7375 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7376
7377         * java/decl.c (builtin_function): Accept additional parameter.
7378         (java_init_decl_processing): Pass an additional NULL_TREE
7379         argument to builtin_function.
7380
7381 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7382
7383         * gcj.texi: Fixed gcj invocation example so that it compiles.
7384
7385 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7386
7387         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7388         * parse.y (mark_parser_ctxt): Likewise.
7389         (check_modifiers, declare_local_variables): Avoid incorrect
7390         hardcoded constant 10.
7391
7392         * lex.c (java_read_char): Avoid "comparison is always true"
7393         warning.
7394
7395 2002-06-25  Andreas Schwab  <schwab@suse.de>
7396
7397         * expr.c (JSR): Avoid undefined operation on PC.
7398
7399 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7400
7401         * decl.c (clear_binding_level): Const-ify.
7402
7403 2002-06-13  Akim Demaille  <akim@epita.fr>
7404
7405         * parse.y (class_declaration, interface_declaration): Make sure
7406         all their rules have an action, in order to avoid meaningless `$$
7407         = $1' and their type clashes.
7408
7409 2002-06-11  Tom Tromey  <tromey@redhat.com>
7410
7411         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7412         * parse-scan.y (statement_without_trailing_substatement): Added
7413         assert_statement.
7414         (assert_statement): New rule.
7415         * java-tree.h (struct lang_type) [assertions]: New field.
7416         (TYPE_USES_ASSERTIONS): New macro.
7417         (CLASS_USES_ASSERTIONS): Likewise.
7418         (FIELD_SYNTHETIC): New define.
7419         * lex.c (java_lval;): Added ASSERT_TK.
7420         * parse.y (ASSERT_TK): Added.
7421         (statement_without_trailing_substatement): Added assert_statement.
7422         (assert_statement): New rule.
7423         (build_assertion): New function.
7424         (maybe_generate_pre_expand_clinit): Create and initialize
7425         $assertionsDisabled.
7426         (lookup_package_type): Removed decl.
7427         * keyword.h: Rebuilt.
7428         * keyword.gperf (assert): New token.
7429
7430 2002-06-10  Akim Demaille  <akim@epita.fr>
7431
7432         * parse.y (interface_type_list, class_member_declaration)
7433         (unary_expression_not_plus_minus): Remove duplicate %type.
7434         Whitespace changes.
7435
7436 2002-06-09  Tom Tromey  <tromey@redhat.com>
7437
7438         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7439
7440         * parse.y (method_header): Give error message in all cases.
7441         Fixes PR java/6865.
7442
7443 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7444
7445         Don't use RTL inlining. Fix for PR java/6820.
7446         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7447         (flag_really_inline): New.
7448         (java_decode_option): Set flag_really_inline if -finline-functions
7449         is seen.
7450         (java_post_options): New function. Turn off inlining unless
7451         flag_really_inline is set.
7452
7453 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7454
7455         * gjavah.c (throwable_p): Accept argument as either a classname or
7456         signature fragment. Create null-terminated classname string for super
7457         when calling itself recursively.
7458         (decode_signature_piece): Skip first character from class name
7459         signature when calling throwable_p.
7460
7461 2002-06-08  H.J. Lu  (hjl@gnu.org)
7462
7463         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7464
7465 2002-06-04  Tom Tromey  <tromey@redhat.com>
7466
7467         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7468
7469 2002-06-04  Michael Koch  <konqueror@gmx.de>
7470
7471         * gcj.texi (Input Options): Fixed typo.
7472
7473 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7474
7475         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7476         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7477         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7478         and all now-pointless local variables.  Rename other local
7479         variables to reflect their not being handles.
7480
7481         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7482         #if JCF_USE_STDIO blocks.
7483
7484         * parse.y: Add missing semicolon at end of rule.
7485
7486 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7487
7488         * check-init.c (attach_initialized_static_class): Delete, unused.
7489         * parse.y: Use htab_t instead of struct hashtable, update
7490         all uses.
7491         * java-tree.h: Include hashtab.h instead of hash.h.
7492         (struct lang_decl_func): Use htab_t, set up for gengtype.
7493         (struct init_test_hash_entry): Delete.
7494         (struct treetreehash_entry): New.
7495         (java_treetreehash_find): New
7496         (java_treetreehash_new): New prototype.
7497         (java_treetreehash_create): New prototype.
7498         (java_mark_tree): Delete prototype.
7499         (java_hash_hash_tree_node): Delete prototype.
7500         (java_hash_compare_tree_node): Delete prototype.
7501         (attach_initialized_static_class): Delete prototype.
7502         * expr.c (build_class_init): Update to use java_treetreehash
7503         functions.
7504         (java_expand_expr): Update to use htab_t.
7505         (emit_init_test_initialization): Likewise.
7506         * decl.c (java_mark_tree): Delete.
7507         * class.c (init_test_hash_newfunc): Delete.
7508         (java_hash_hash_tree_node): Delete.
7509         (java_hash_compare_tree_node): Delete.
7510         (add_method_1): Update to use java_treetreehash functions.
7511         (JAVA_TREEHASHHASH_H): New macro.
7512         (java_treetreehash_hash): New function.
7513         (java_treetreehash_compare): New function.
7514         (java_treetreehash_find): New function.
7515         (java_treetreehash_new): New function.
7516         (java_treetreehash_create): New function.
7517         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7518
7519         * Make-lang.in (java/parse.o): Depend on debug.h.
7520         * java-tree.h (struct lang_identifier): Use gengtype.
7521         (union lang_tree_node): New.
7522         (struct lang_decl_func): Use gengtype.
7523         (struct lang_decl_var): Likewise.
7524         (struct lang_decl): Likewise.
7525         * parse.y: Include debug.h.
7526         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7527
7528         * lang.c (struct language_function): New dummy structure.
7529
7530         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7531         descriminator for DECL_LANG_SPECIFIC.
7532         (struct lang_decl_func): Rename from struct lang_decl.
7533         (enum lang_decl_desc): New.
7534         (struct lang_decl): Make it a union.  Update all the accessor macros.
7535         (struct lang_type): Use gengtype.
7536         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7537         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7538         are now the same size.
7539         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7540         use discriminator to mark DECL_LANG_SPECIFIC.
7541
7542         * Make-lang.in (gt-java-builtins.h): New rule.
7543         (java/builtins.o): Add dependency on gt-<filename>.h.
7544         * builtins.c: Use gengtype for roots.
7545         (union string_or_tree): Use gengtype.
7546         (struct builtin_record): Use gengtype.
7547         * config-lang.in (gtfiles): Add builtins.c.
7548
7549         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7550         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7551         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7552         gt-java-parse.h, gtype-java.h): Add rules to generate.
7553         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7554         (class.o): Add dependency on gt-*.h.
7555         (constants.o): Likewise.
7556         (decl.o): Likewise.
7557         (expr.o): Likewise.
7558         (jcf-parse.o): Likewise.
7559         (jcf-write.o): Likewise.
7560         (lang.o): Likewise.
7561         * config-lang.in (gtfiles): New.
7562         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7563         * constants.c: Replace uses of ggc_add_* with GTY markers.
7564         Include gt-*.h.
7565         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7566         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7567         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7568         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7569         Include gt-*.h.
7570         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7571         Include gt-*.h.
7572         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7573         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7574         gt-*.h.
7575         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7576         Include gtype-java.h.
7577
7578 2002-06-02  Tom Tromey  <tromey@redhat.com>
7579
7580         Fix for PR java/5913:
7581         * parse.y (patch_binop): Call patch_string on op1.
7582
7583 2002-06-02  Tom Tromey  <tromey@redhat.com>
7584
7585         Fix for PR java/1343, PR java/6336:
7586         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7587         formatting.  Changed return type.
7588         (anonymous_class_counter): Moved to top of file.
7589         (maybe_make_nested_class_name): Append number to class name for
7590         function-local classes.
7591
7592 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7593
7594         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7595         * Make-lang.in: Update dependency lists.
7596
7597 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7598
7599         * gjavah.c (throwable_p): Do not free the name of the class after
7600         passing it to find_class.
7601         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7602         * jcf-io.c (dirent.h): Include it.
7603         (fnmatch.h): Likewise.
7604         (compare_path): New function.
7605         (java_or_class_file): Likewise.
7606         (memoized_dirlist_entry): New type.
7607         (memoized_dirlist_lookup_eq): New function.
7608         (memoized_dirlists): New variable.
7609         (caching_stat): New function.
7610         (memoized_class_lookup_eq): New function.
7611         (memoized_class_lookups): Likewise.
7612         (find_class): Use memoized_class_lookups and caching_stat.
7613         * jcf.h (JCF_USE_SCANDIR): Define.
7614         * parse.y (java_expand_classes): Write the class files in reverse
7615         order.
7616
7617 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7618
7619         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7620
7621 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7622
7623         * jcf-write.c (write_classfile): Unlink the temporary file if it
7624         cannot be renamed.  Use concat to build up the name of the
7625         temporary file.
7626
7627 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7628
7629         * jcf-write.c (write_classfile): Write the file to a
7630         temporary file and then rename it.
7631
7632 2002-05-07  Tom Tromey  <tromey@redhat.com>
7633
7634         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7635
7636         Fix for PR java/1200:
7637         * gjavah.c (throwable_p): New function.
7638         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7639         same as a `jweak'.
7640         Include hashtab.h.
7641         (gcjh_streq): New function.
7642
7643 2002-05-07  Andreas Jaeger  <aj@suse.de>
7644
7645         * parse.y (finish_for_loop): Fix if statement.
7646
7647 2002-05-06  Tom Tromey  <tromey@redhat.com>
7648
7649         Fix for PR java/5941:
7650         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7651         loop update expression.
7652         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7653         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7654
7655 2002-05-04  Mark Wielaard  <mark@klomp.org>
7656
7657         For PR java/6519:
7658         * parse.y (build_string_concatenation): Return just op1 only when op2
7659         is null and op1 is a STRING_CST, otherwise always construct a
7660         StringBuffer.
7661
7662 2002-04-27  Tom Tromey  <tromey@redhat.com>
7663
7664         For PR java/6382:
7665         * parse.y (string_convert_int_cst): New function.
7666         (merge_string_cste): Use it.
7667
7668 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7669
7670         * java-tree.h (java_parse_file): Update.
7671         (java_set_yydebug): Remove.
7672         * jcf-parse.c (yydebug): Remove.
7673         (java_set_yydebug): Die.
7674         (java_parse_file): Update.
7675         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7676
7677 2002-04-24  Tom Tromey  <tromey@redhat.com>
7678
7679         For PR java/6425:
7680         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7681         EXPR_WFL_QUALIFICATION of qual_wfl.
7682
7683 2002-04-23  Per Bothner  <per@bothner.com>
7684
7685         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7686         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7687         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7688
7689 2002-04-23  Tom Tromey  <tromey@redhat.com>
7690
7691         For PR java/6314:
7692         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7693         recognize `-fcompile-resource='.
7694         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7695         a bit.
7696
7697 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7698
7699         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7700         paths. Fixes PR java/2791.
7701
7702 2002-04-19  Andrew Haley  <aph@redhat.com>
7703
7704         * jcf-write.c (push_long_const): lo, hi: New variables.
7705         Use rshift_double to extract the high part of a 64-bit long.
7706         Use WORD_TO_INT to extract the low part.
7707
7708         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7709         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7710         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7711
7712 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7713
7714         * typeck.c (incomplete_type_error): Remove.
7715
7716 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7717
7718         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7719         for hash synchronization.
7720         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7721         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7722         class_type_node.
7723
7724 2002-04-16  Mark Wielaard  <mark@klomp.org>
7725
7726         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7727         negative zero.
7728
7729 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7730
7731         Fix for PR java/6294:
7732         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7733         interfaces.
7734
7735 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7736
7737         Fix for PR java/6085:
7738         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7739         to get enclosing "this" argument for inner-class constructor
7740         invocation. Pass correct arguments to build_access_to_thisn.
7741
7742 2002-04-10  Andreas Jaeger  <aj@suse.de>
7743
7744         * gcj.texi (Input Options): Fix extdirs patch.
7745
7746 2002-04-10  Anthony Green  <green@redhat.com>
7747
7748         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7749
7750 2002-04-09  Anthony Green  <green@redhat.com>
7751
7752         * gcj.texi (Input Options): Add --extdirs documentation.
7753         * jcf-dump.c (OPT_extdirs): New macro.
7754         (options): Add extdirs option.
7755         (help): Describe --extdirs.
7756         (main): Handle OPT_extdirs.
7757         * gjavah.c (OPT_extdirs): New macro.
7758         (options): Add extdirs option.
7759         (help): Describe --extdirs.
7760         (main): Handle OPT_extdirs.
7761         * jcf-path.c (jcf_path_init): Add extdirs support.
7762         (jcf_path_extdirs_arg): New function.
7763         (extensions): New variable to hold extensions path entries.
7764         * jvspec.c: Remove -fextdirs= when compiling main().
7765         * lang.c (java_decode_option): Handle -fextdirs=.
7766         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7767         * Make-lang.in: Compile jcf-path with version info for use in
7768         identifying the appropriate libgcj.jar.
7769
7770 2002-04-08  Tom Tromey  <tromey@redhat.com>
7771
7772         For PR libgcj/5303:
7773         * .cvsignore: Added rmic.1 and rmiregistry.1.
7774         * gcj.texi (Top): Link to new nodes.
7775         (Invoking rmic): New node.
7776         (Invoking rmiregistry): Likewise.
7777         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7778         rmiregistry.1.
7779         (java.maintainer-clean): Likewise.
7780         ($(srcdir)/java/rmic.1): New target.
7781         ($(srcdir)/java/rmiregistry.1): Likewise.
7782         (java.install-man): Handle rmic.1 and rmiregistry.1.
7783
7784 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7785
7786         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7787         Add note about handling uncaught exceptions. Add an exception handler
7788         to example.
7789
7790 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7791
7792         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7793         after using it to patch CALL_EXPR.
7794
7795 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7796
7797         * gcj.texi (Invocation): Document CNI invocation API.
7798
7799 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7800
7801         * expr.c (truthvalue_conversion): Rename.  Update.
7802         (expand_compare): Update.
7803         * java-tree.h (java_truthvalue_conversion): New.
7804         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7805
7806 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7807
7808         * java-tree.h (java_mark_addressable): New.
7809         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7810         * typeck.c (mark_addressable): Rename, update.
7811
7812 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7813
7814         * expr.c (build_java_binop): Update.
7815         * java-tree.h (java_signed_type, java_unsigned_type,
7816         java_signed_or_unsigned_type): Update.
7817         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7818         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7819         * parse.y (patch_binop): Update.
7820         * typeck.c (signed_or_unsigned_type, unsigned_type,
7821         signed_type): Update.
7822
7823 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7824
7825         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7826         (java_dummy_print): Remove.
7827         (lang_print_error): Rename.  Exit early if inhibiting output.
7828         (inhibit_error_printing_function): New.
7829         (java_init): Don't set hook.
7830         (lang_init_source): Use new boolean.
7831
7832 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7833
7834         * parse.y (do_resolve_class): Fix infinite recursion.
7835
7836 2002-03-29  Tom Tromey  <tromey@redhat.com>
7837
7838         * parse.y (check_inner_circular_reference): Ignore incomplete
7839         types.
7840
7841 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7842
7843         * Make-lang.in (builtins.o): Update.
7844         * boehm.c (get_boehm_type_descriptor): Update.
7845         * builtins.c: Include langhooks.h.
7846         * decl.c (java_init_decl_processing): Update.
7847         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7848         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7849         Redefine.
7850         * typeck.c (type_for_mode, type_for_size): Update.
7851
7852 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7853
7854         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7855
7856 2002-03-28  Tom Tromey  <tromey@redhat.com>
7857
7858         * except.c (expand_end_java_handler): If the handler type is NULL,
7859         use java.lang.Throwable.  Fixes PR java/5986.
7860
7861 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7862
7863         Fix for PR java/4715:
7864         * jcf-parse.c (parse_source_file_3): New function.
7865         (read_class): Call it.
7866         (java_parse_file): Likewise.
7867
7868 2002-03-28  Jan Hubicka  <jh@suse.cz>
7869
7870         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7871
7872 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7873
7874         * parse.y (resolve_package): Initialize "decl".
7875         (lookup_package_type): Remove unused function.
7876
7877 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7878
7879         Fix for PR java/5993:
7880         * parse.y (resolve_package): Return the decl if resolution was
7881         successful. Don't special case "java.lang" and "java.lang.reflect"
7882         packages. Set type_name to the merged identifier.
7883         (resolved_qualified_expression_name): Print error using "name" if
7884         resolve_package returns NULL_TREE.
7885
7886 2002-03-27  Tom Tromey  <tromey@redhat.com>
7887
7888         * expr.c (expand_invoke): Don't generate null pointer check if
7889         we're calling <init>.
7890
7891 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7892
7893         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7894         fix prototype.
7895         * java-tree.h (java_lang_expand_expr): Similarly.
7896         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7897         (java_init): Don't set hook.
7898
7899 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7900
7901         Fix for PR java/5850:
7902         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7903         context if field was not found in the current scope.
7904         * expr.c (lookup_field): Don't look in enclosing contexts.
7905
7906 2002-03-26  Tom Tromey  <tromey@redhat.com>
7907
7908         Fix for PR java/5942:
7909         * parse.y (init_src_parse): Added sanity check.
7910         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7911         elements, not 11.
7912
7913 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7914
7915         * decl.c (lang_mark_tree): Rename java_mark_tree.
7916         * java-tree.h (java_mark_tree): New.
7917         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7918
7919 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7920
7921         * lex.c: Change java_perform_atof to take normal parameters
7922         instead of a pointer to a parameter block.  Call it directly
7923         from java_lex.
7924
7925 2002-03-22  Mark Wielaard  <mark@klomp.org>
7926
7927         Fix for PR java/5368:
7928         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7929         when printing error message.
7930
7931 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7932
7933         * decl.c (maybe_build_cleanup): Remove.
7934
7935 2002-03-22  Tom Tromey  <tromey@redhat.com>
7936
7937         Andrew Haley  <aph@cambridge.redhat.com>
7938
7939         * expr.c (build_field_ref): Don't build a check if the field is a
7940         member of `this'.
7941
7942 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7943
7944         Fix for PR java/6026:
7945         * lex.c (java_lex): Fix parsing of consecutive floats.
7946
7947 2002-03-21  Tom Tromey  <tromey@redhat.com>
7948
7949         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7950         class.
7951
7952 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7953
7954         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7955         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7956
7957 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7958
7959         * gcj.texi: @code{gcj} becomes @command{gcj}.
7960         @code{gcc} becomes @command{gcc}.
7961         GcjRaw changed to gnu.gcc.RawData.
7962
7963 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7964
7965         * decl.c (start_java_method): Use new hook.
7966         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7967         (java_init): Remove old hook.
7968
7969 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7970
7971         * builtins.c (define_builtin): Do nothing if `type' is null.
7972         Fixes PR java/5876.
7973
7974 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7975
7976         * parse.y (parser_check_super_interface): Fix error message
7977         grammar/order.
7978
7979 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7980
7981         * jcf-parse.c (get_constant): Delete unused variables.
7982
7983 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7984
7985         * java-tree.h (java_parse_file): New.
7986         * jcf-parse.c (yyparse): Rename java_parse_file.
7987         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7988
7989 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7990
7991         * parse.y (craft_constructor): Return the constructor decl.
7992         (java_expand_classes): Update comments.
7993         (lookup_method_invoke): Call fix_constructors immediately for
7994         anonymous class. Fixes PR java/5935.
7995
7996 2002-03-15  Anthony Green  <green@redhat.com>
7997
7998         * jcf-parse.c (yyparse): Don't emit class registration
7999         constructor when compiling resource files.
8000
8001 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8002
8003         * lang.c (java_tree_code_type, java_tree_code_length,
8004         tree_code_name): Delete.
8005         (tree_code_type, tree_code_length, tree_code_name): Define.
8006         (java_init): Don't try to copy into the various tree_code
8007         arrays.
8008
8009 2002-03-12  Tom Tromey  <tromey@redhat.com>
8010
8011         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8012         UTF-8, not UCS-2.  Fixes PR java/5923.
8013
8014         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8015         a call_expr wrapped in a convert.  Fixes PR java/5848.
8016
8017 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8018
8019         * jcf-write.c (write_classfile): Improve error strings.
8020
8021 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8022
8023         * lex.c: Adjust comments to GNU standards.
8024
8025 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8026
8027         Fix for PR java/5902:
8028         * lex.c (java_lex): Fix parsing of literals.
8029
8030 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8031
8032         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8033         to prevent it getting evaluated twice in the store checking case.
8034         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8035         examining OBJECT.
8036
8037 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8038
8039         * decl.c (java_init_decl_processing): Make sure class_type_node
8040         alignment is not less than 64 bits if hash synchronization is enabled.
8041
8042 2002-03-08  Per Bothner  <per@bothner.com>
8043
8044         * parse.y (java_complete_lhs):  Check if patch_assignment
8045         returned an error-mark.
8046
8047         * parse.y (try_builtin_assignconv):  Don't special-case zero.
8048
8049 2002-03-08  Per Bothner  <per@bothner.com>
8050
8051         Fix for PR java/5812.
8052         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
8053         here instead of in JSR macro.  Likewise with load_type_state call.
8054         Do the latter on if the return_pc has been verified (the jsr returns).
8055         (JSR):  Now just call build_java_jsr.
8056
8057 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
8058
8059         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8060         (java.install-common): Link native driver to
8061         JAVA_TARGET_INSTALL_NAME.
8062
8063 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
8064
8065         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8066         * builtins.c(sin_builtin): Likewise
8067         * builtins.c(sqrt_builtin): Likewise
8068
8069 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
8070
8071         * java/expr.c, java/jcf-parse.c, java/lex.c:
8072         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8073         REAL_ARITHMETIC blocks unconditional.  Delete some further
8074         #ifdef blocks predicated on REAL_ARITHMETIC.
8075
8076 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8077
8078         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8079         explicit sizeof/sizeof.
8080         * decl.c (java_init_decl_processing): Likewise.
8081         * jcf-parse.c (init_jcf_parse): Likewise.
8082         * parse.y (init_src_parse): Likewise.
8083
8084 2002-03-02  Per Bothner  <per@bothner.com>
8085
8086         Make --CLASSPATH by a synonym for --classpath and -classpath.
8087         Implement --bootclasspath.
8088         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
8089         (classpath_l):  Remove.
8090         (jcf_path_CLASSPATH_arg):  Remove.
8091         (jcf_path_bootclasspath_arg):  New function.
8092         (jcf_path_seal):  Simplify accordingly.
8093
8094         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
8095         (jcf_path_CLASSPATH):  Remove declaration.
8096         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
8097         (lang_specific_driver):  Translate -bootclasspath.
8098         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
8099         * lang.c (decode_lang_options):  Do jcf_path_init first.
8100         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
8101         * gjavah.c:  Also handle --bootclasspath.
8102         Handle --CLASSPATH as a synonum for --classpath.
8103         * jcf-dump.c: Likewise.
8104
8105         "." is not part of system path, but is the default for --classpath.
8106         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
8107         (jcf_path_seal):  Add "." if no CLASSPATH specified.
8108
8109         * gcj.texi:  Document changes.
8110
8111 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8112
8113         * expr.c (build_java_arraystore_check): Fix formatting.
8114
8115 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8116
8117         Fix for PR java/5758, java/5632:
8118         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8119         inner-class separator too.
8120         * parse.y (do_resolve_class): New local `decl_result.'
8121         Progressively build a name for what can have been loaded.
8122
8123 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8124
8125         * expr.c (java_array_data_offset): Removed function.
8126         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8127         (build_java_array_length_access): Obtain "length" value using a
8128         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8129         (build_java_arrayaccess): Correct comment. Access "data" using a
8130         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8131         (build_java_arraystore_check): New function.
8132         (expand_java_arraystore): Use build_java_arraystore_check.
8133         * parse.y (patch_assignment): Simplify code to insert a store check
8134         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8135         * check-init.c (check_init): Update to reflect that an array length
8136         access is now a COMPONENT_REF.
8137         * gcj.texi (Code Generation): Improve documentation of
8138         -fno-bounds-check. Add documentation for -fno-store-check.
8139         * java-tree.h (flag_store_check): Declare.
8140         (build_java_arraystore_check): Declare.
8141         * lang.c (flag_store_check): Initialize to 1.
8142         (lang_f_options): Add store-check option.
8143         * jvspec.c: Don't pass store-check option to jvgenmain.
8144         * lang-options.h: Add help string for -fno-store-check.
8145
8146 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8147
8148         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8149         * java-tree.h (java_dup_lang_specific_decl): New.
8150         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8151
8152 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8153
8154         * builtins.c, decl.c: Delete traditional-mode-related code
8155         copied from the C front end but not used, or used only to
8156         permit the compiler to link.
8157
8158 2002-02-22  Tom Tromey  <tromey@redhat.com>
8159
8160         Fix for PR java/2369:
8161         * jvspec.c (verify_class_name): New function.
8162         (lang_specific_driver): Call it.
8163         (JAVA_START_CHAR_P): New macro.
8164         (JAVA_PART_CHAR_P): Likewise.
8165
8166 2002-02-22  Per Bothner  <per@bothner.com>
8167
8168         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8169         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8170         type_info pointer (currently unimplemented hence NULL) to vtable.
8171         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8172         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8173         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8174         (build_dtable_decl):  Add declarations for new fields.
8175
8176 2002-02-20  Per Bothner  <per@bothner.com>
8177
8178         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8179         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8180         don't need to set it on the COMPOUND_EXPR - the caller does that.
8181
8182 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8183
8184         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8185         `--CLASSPATH' becomes `--classpath.'
8186         * gjavah.c: Likewise.
8187         * jcf-dump.c: Likewise.
8188         * lang-options.h: Likewise.
8189         * lang.c: Likewise.
8190         * jcf-path.c: Updated comment.
8191         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8192         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8193         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8194         (jcf_path_CLASSPATH_arg): Ditto.
8195         (classpath_u): Updated leading comment.
8196
8197 2002-02-20  Per Bothner  <per@bothner.com>
8198
8199         * builtins.c (check_for_builtin):  New function.
8200         (build_call_or_builtin):  Remove.
8201         * java-tree.h:  Update accordingly.
8202         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8203         of build_call_or_builtin.
8204         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8205         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8206         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8207
8208 2002-02-17  Tom Tromey  <tromey@redhat.com>
8209
8210         * java-tree.h (TYPE_STRICTFP): New macro.
8211         (struct lang_type) [strictfp]: New field.
8212         (CLASS_STRICTFP): New macro.
8213         (METHOD_STRICTFP): New macro.
8214         (struct lang_decl) [strictfp]: New field.
8215         * parse.y (method_header): Disallow strictfp constructor or
8216         abstract method.
8217         (STRICT_TK): Move before MODIFIER_TK.
8218         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8219         (METHOD_MODIFIERS): Likewise.
8220         (INTERFACE_MODIFIERS): Likewise.
8221         * jcf-write.c (get_access_flags): Likewise.
8222         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8223         (add_method_1): Likewise.
8224         (get_access_flags_from_decl): Likewise.
8225         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8226         recognize strictfp flag.
8227         * jcf.h (ACC_STRICT): New define.
8228
8229 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8230
8231         * class.c(build_utf8_ref): Move declaration of decl_size
8232
8233 2002-02-07  Tom Tromey  <tromey@redhat.com>
8234
8235         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8236         path.
8237
8238 2002-02-04  Anthony Green  <green@redhat.com>
8239
8240         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8241         sections if available.
8242
8243 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8244
8245         * parse.y (java_expand_classes): Fix typo in static field loop.
8246
8247 2002-02-02  Richard Henderson  <rth@redhat.com>
8248
8249         * class.c (add_field): Mark static fields external.
8250         (build_class_ref): Remove redundant set.
8251         * parse.y (java_expand_classes): Mark static fields of classes
8252         to be compiled as local.
8253         * jcf-parse.c (parse_class_file): Likewise.
8254
8255 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8256
8257         * gcj.texi (About CNI): New node.
8258
8259 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8260
8261         PR java/5080
8262         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8263         setlocale() with LC_CTYPE as a parameter.
8264         * jv-scan.c: Same.
8265
8266 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8267
8268         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8269         Follow GNU Coding Standards for --version.
8270
8271 2002-01-28  Tom Tromey  <tromey@redhat.com>
8272
8273         * expr.c (build_jni_stub): Ensure storage for `meth' is
8274         generated.
8275         * parse.y (java_complete_expand_methods): Set
8276         current_function_decl before building JNI stub.
8277
8278 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8279
8280         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8281         BUILT_IN_SQRTF.
8282
8283 2002-01-22  Tom Tromey  <tromey@redhat.com>
8284
8285         * decl.c (java_init_decl_processing): Use add_predefined_file.
8286         Predefine RawData.java.
8287         (predef_filenames): Removed.
8288         (java_init_decl_processing): Don't register predef_filenames.
8289         * jcf-parse.c (add_predefined_file): New function.
8290         (predefined_filename_p): Rewrote.
8291         (predefined_filename_p): No longer static.
8292         * decl.c (java_init_decl_processing): Call initialize_builtins.
8293         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8294         (java/builtins.o): New target.
8295         * builtins.c: New file.
8296         * parse.y (patch_invoke): Use build_call_or_builtin.
8297         * java-tree.h (build_call_or_builtin): Declare.
8298         (initialize_builtins): Declare.
8299         (java_set_exception_lang_code): Removed unused declaration.
8300         (PREDEF_FILENAMES_SIZE): Removed.
8301         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8302         (predef_filenames): New define.
8303         (add_predefined_file): Declare.
8304         (predefined_filename_p): Declare.
8305         * expr.c (expand_invoke): Use build_call_or_builtin.
8306
8307 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8308
8309         * parse.y (patch_switch_statement): Fix format specifier.
8310
8311 2002-01-16  Tom Tromey  <tromey@redhat.com>
8312
8313         More for PR java/5365:
8314         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8315         default.
8316         (process_file): Generate include for
8317         java.lang.UnsupportedOperationExceptions.
8318
8319 2002-01-15  Andreas Jaeger  <aj@suse.de>
8320
8321         * .cvsignore: Add man pages.
8322
8323 2002-01-15  Tom Tromey  <tromey@redhat.com>
8324
8325         Fix for PR java/5365:
8326         * gjavah.c (process_file): Turn class name into a file name.
8327
8328 2002-01-14  Matthias Klose  <doko@debian.org>
8329
8330         * gcj.texi: Fix whitespace and formatting errors in the
8331         synopsis of the man pages. Update copyright.
8332
8333 2002-01-14  Tom Tromey  <tromey@redhat.com>
8334
8335         For PR libgcj/5303:
8336         * Make-lang.in (java.install-man): Handle jv-convert man page.
8337         (java.generated-manpages): Added jv-convert.1.
8338         (java.uninstall): Remove jv-convert.1.
8339         (java.maintainer-clean): Likewise.
8340         ($(srcdir)/java/jv-convert.1): New target.
8341         * gcj.texi (Top): Link to jv-convert node.
8342         (Individual utilities): Likewise.
8343         (Invoking jv-convert): New node.
8344
8345 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8346             Martin Kahlert  <martin.kahlert@infineon.com>
8347
8348         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8349         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8350
8351 2002-01-03  Graham Stott  <grahams@redhat.com>
8352
8353         * class.c (compile_resource_file): Update copyright date.
8354         Constify filename parameter.
8355         (java-tree.h): Update copyright date.
8356         (compile_resource_file): Constify filename parameter.
8357
8358 2002-01-03  Graham Stott  <grahams@redhat.com>
8359
8360         * gcc/jcf-parse.c: Update copyright date.
8361         (yyparse): Constify resource_filename.
8362
8363 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8364
8365         * parse.y (src_parse_roots): Don't needlessly zero init.
8366
8367 2001-12-31  Tom Tromey  <tromey@redhat.com>
8368
8369         * parse.y (dump_java_tree): New function.
8370         (source_end_java_method): Call it.
8371         (end_class_declaration): Likewise.
8372         * lang.c (java_decode_option): Call dump_switch_p.
8373
8374 2001-12-28  Tom Tromey  <tromey@redhat.com>
8375
8376         * gen-table.pl: Don't process characters after \uffff.  Added
8377         comment pointing to input file.
8378
8379 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8380
8381         * gen-table.pl: Const-ify output.  Document the location of a
8382         suitable unicode input file.
8383
8384         * chartables.h: Regenerate.
8385
8386 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8387
8388         * chartables.h: Const-ify.
8389         * gjavah.c (options): Likewise.
8390         * jcf-dump.c (options): Likewise.
8391         * jv-scan.c (options): Likewise.
8392         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8393         * parse.y (binop_lookup): Likewise.
8394
8395 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8396
8397         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8398         the static arrays that are output.
8399         * jvspec.c (jvgenmain_spec): Make static.
8400         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8401         * keyword.h: Regenerate.
8402         * lang.c (string_option, process_option_with_no, lang_f_options,
8403         lang_W_options): Const-ify.
8404         * lex.c (java_lex): Likewise.
8405
8406 2001-12-21  Richard Henderson  <rth@redhat.com>
8407
8408         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8409         (get_boehm_type_descriptor): ... here.  Arrange for the
8410         TREE_TYPE to get set properly.
8411
8412 2001-12-21  Richard Henderson  <rth@redhat.com>
8413
8414         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8415         only if the target requires collect2.
8416
8417         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8418
8419 2001-12-20  Tom Tromey  <tromey@redhat.com>
8420
8421         For PR java/4509:
8422         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8423         CAN_COMPLETE_NORMALLY for the node.
8424         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8425         generate code for second branch if first branch can't complete
8426         normally.
8427         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8428         the loop head if the loop body can't complete normally.
8429
8430 2001-12-20  Tom Tromey  <tromey@redhat.com>
8431
8432         For PR java/4766:
8433         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8434         case where `finally' clause can't complete normally.
8435
8436 2001-12-20  Tom Tromey  <tromey@redhat.com>
8437
8438         Fixes PR java/5057:
8439         * parse.y (analyze_clinit_body): Added this_class parameter.
8440         Check for more cases where we must keep <clinit>.
8441         (maybe_yank_clinit): Cleaned up flow control.
8442
8443 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8444
8445         * decl.c (java_init_decl_processing): Don't initialize
8446         finit_leg_identifier_node.
8447         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8448         (finit_leg_identifier_node): Remove.
8449         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8450
8451 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8452
8453         * mangle.c (mangle_member_name): Don't special-case for
8454         NO_DOLLAR_IN_LABEL.
8455         * mangle_name.c (unicode_mangling_length): Likewise.
8456         (append_unicode_mangled_name): Likewise.
8457         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8458         code.
8459
8460 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8461
8462         * expr.c (build_java_array_length_access): Don't force null pointer
8463         check unless flag_check_references is set.
8464
8465 2001-12-20  Tom Tromey  <tromey@redhat.com>
8466
8467         Fix for PR java/3417:
8468         * parse.y (patch_assignment): Added special processing for
8469         `return'.
8470         (patch_return): Don't convert booleans to integers, and don't
8471         special-case `null'.
8472
8473 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8474
8475         * config-lang.in (diff_excludes): Remove.
8476
8477 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8478
8479         * gcj.texi: Update link to GCC manual.
8480
8481 2001-12-17  Tom Tromey  <tromey@redhat.com>
8482
8483         * parse.y (link_nested_class_to_enclosing): Removed useless
8484         statement.
8485
8486 2001-12-16  Tom Tromey  <tromey@redhat.com>
8487
8488         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8489         Fixes PR java/5088.
8490
8491 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8492
8493         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8494         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8495         spelling errors.
8496
8497 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8498
8499         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8500
8501 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8502
8503         * decl.c (java_init_decl_processing): Build otable_type correctly.
8504         otable_decl is an otable_type.
8505
8506 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8507
8508         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8509         otable_type, otable_ptr_type, method_symbol_type,
8510         method_symbols_array_type, method_symbols_array_ptr_type): New
8511         field/global tree definitions.
8512         (flag_indirect_dispatch): New flag.
8513         * decl.c (java_init_decl_processing): Initialize new otable and
8514         otable_syms type nodes and decls. Add new field "index" to
8515         method_type_node.
8516         * class.c (build_method_symbols_entry): New function.
8517         (make_method_value): Set "index" to to method's vtable index for
8518         virtual methods when indirect-dispatch is not used.
8519         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8520         and set vtable_method_count to -1. Set otable and otable_syms field
8521         if indirect-dispatch is used and there was something to put in them.
8522         (build_method_symbols_entry): New function.
8523         (emit_offset_symbol_table): New function.
8524         * expr.c (get_offset_table_index): New function.
8525         (build_invokevirtual): Build array reference to otable at the index
8526         returned by get_offset_table_index, and use the result as the vtable
8527         offset.
8528         (build_invokeinterface): Similar.
8529         * jcf-parse.c (yyparse): If indirect-dispatch, call
8530         emit_offset_symbol_table at the end of compilation, after all classes
8531         have been generated.
8532         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8533         * lang.c (flag_indirect_dispatch): Define.
8534         (lang_f_options): Add indirect-dispatch flag.
8535
8536 2001-12-14  Matthias Klose  <doko@debian.org>
8537
8538         * gcj.texi: Markup for man page generation. Document missing
8539         options printed by <tool> --help.
8540         Terminate description of gij's -ms option with a dot.
8541         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8542         (java.generated-manpages java.install-man, java.uninstall,
8543         java-maintainer-clean) Updated.
8544
8545 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8546
8547         * class.c (get_dispatch_table): Fix java vtable layout
8548         for TARGET_VTABLE_USES_DESCRIPTORS.
8549         * decl.c (java_init_decl_processing): Initialize
8550         alloc_no_finalizer_node, finalize_identifier_node.
8551         * expr.c (class_has_finalize_method): New function.
8552         (expand_java_NEW): Generate calls for finalizer-free allocation.
8553         (build_invokevirtual): Fix java vtable layout for
8554         TARGET_VTABLE_USES_DESCRIPTORS.
8555         * java-tree.h (enum java_tree_index): New entries:
8556         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8557         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8558         (class_has_finalize_method): declare.
8559         (HAS_FINALIZER_P): New macro.
8560         * parse.y (patch_invoke): Generate calls for finalizer-free
8561         allocation.
8562
8563 2001-12-12  Matthias Klose  <doko@debian.org>
8564
8565         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8566         whitespace at end of line.
8567
8568 2001-12-11  Tom Tromey  <tromey@redhat.com>
8569
8570         * lex.c (java_init_lex): Define wfl_to_string as
8571         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8572
8573 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8574
8575         * class.c (make_method_value): Use null_pointer_node to
8576         represent empty exception table.
8577
8578 2001-12-10  Tom Tromey  <tromey@redhat.com>
8579
8580         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8581
8582 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8583
8584         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8585
8586 2001-12-09  Per Bothner  <per@bothner.com>
8587
8588         * check-init.c (current_switch_has_default):  New static field.
8589         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8590         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8591         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8592
8593 2001-12-09  Tom Tromey  <tromey@redhat.com>
8594
8595         * check-init.c (check_init): Don't allow pre- or post- increment
8596         or decrement of final variable.
8597         (final_assign_error): Minor error message rewording.
8598
8599 2001-12-08  Tom Tromey  <tromey@redhat.com>
8600
8601         * java-tree.h: Fixed typo.
8602
8603         * gjavah.c (decompile_method): Don't decompile to `return this'
8604         for static methods.
8605
8606         * gjavah.c (cxx_keywords): Re-sorted.
8607         * lex.c (cxx_keywords): Re-sorted.
8608
8609         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8610         else.
8611
8612         * gjavah.c (print_namelet): Clear subnamelets.
8613         (HANDLE_METHOD): Set `method_printed' earlier.
8614
8615 2001-12-07  Tom Tromey  <tromey@redhat.com>
8616
8617         * lang.c (lang_f_options): Added
8618         optimize-static-class-initialization.
8619         (java_decode_option): Removed special case.
8620
8621 2001-12-07  Per Bothner  <per@bothner.com>
8622
8623         * check-init.c (check_init):  Fix typo freeing memory twice.
8624
8625 2001-12-05  Per Bothner  <per@bothner.com>
8626
8627         Restore support for static class initialization optimization.
8628         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8629         * check-init.c (check_int):  At end of BLOCK handle initialization
8630         blocks, which used to be done in java_complete_expand_method but did
8631         not handle the case where check_for_initialization might allocate
8632         more than a word of bits.
8633         * decl.c (lang_make_tree):  The smic field is now a tree.
8634         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8635         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8636
8637         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8638
8639         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8640         Change from a hash table to a list.
8641         (struct_lang_decl):  Change field 'smic' to match.
8642         * class.c (add_method_1):  Initialize
8643         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8644         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8645         (java_expand_method_bodies): -here, since 'smic' is now a list.
8646         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8647
8648         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8649
8650         * class.c (java_hash_compare_tree_node):  Fix casts.
8651
8652 2001-12-04  Per Bothner  <per@bothner.com>
8653
8654         * check-init.c:   Handle definite unassignment to finals in addition
8655         to definite assignment.
8656         (loop_current_locals):  New field.
8657         (num_current_locals, int start_current_locals, num_current_words):
8658         Make static.
8659         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8660         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8661         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8662         (get_variable_decl, check_final_reassigned):  New functions.
8663         (check_init, check_bool_init):  Modify as needed for checking finals.
8664         (check_for_initialization):  Take extra parameter and return void.
8665         Do extra start-up logic to check final fields for assignment.
8666         * parse.y (check_static_final_variable_assignment_flag,
8667         reset_static_final_variable_assignment_flag, check_final_assignment,
8668         check_final_variable_local_assignment_flag,
8669         reset_final_variable_indirect_assignment_flag,
8670         reset_final_variable_global_assignment_flag):  Remove functions.
8671         (java_complete_expand_methods, outer_field_access_fix,
8672         patch_assignment): Remove no-longer used logic.
8673         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8674         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8675
8676         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8677         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8678         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8679
8680         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8681
8682         * java-tree.h (DECL FINAL):  New bit-field.
8683         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8684         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8685         (DECL_INIT_CALLS_THIS):  New macro.
8686         (struct lang_decl):  New bit-field init_calls_this.
8687         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8688         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8689         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8690         use it for both local variables and final fields.
8691         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8692         and local_final.
8693         (struct lang_type):  Remove hfv bit-field.
8694         (check_for_initialization):  Change to return void.
8695
8696         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8697         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8698         * check-init.c (final_assign_error):  New helper function.
8699         (check_final_reassigned, check_init):  Use it.
8700         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8701
8702         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8703         bit-fields to unsigned.
8704
8705 2001-12-03  Per Bothner  <per@bothner.com>
8706
8707         * parse.y (patch_binop):  Minor constant folding.
8708
8709         * parse.y (build_current_thisn):  Shorter 'buffer'.
8710
8711 2001-12-03  Per Bothner  <per@bothner.com>
8712
8713         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8714         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8715         * jcf-write.c (generate_bytecode_insns):  Remove support for
8716         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8717         * check-init.c (check_init):  Likewise.
8718
8719 2001-12-03  Per Bothner  <per@bothner.com>
8720
8721         * verify.c (subroutine_nesting):  New function.
8722         (verify_jvm_instructions):  Use it to fix logic for checking that
8723         we're done with the current subroutine.
8724
8725         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8726         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8727
8728 2001-12-03  Per Bothner  <per@bothner.com>
8729
8730         * jcf.h:  Fix obvious typo in comment.
8731         * typeck.c (build_null_signature):  Add comment.
8732
8733 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8734
8735         * expr.c: Remove leading capital from diagnostic messages, as
8736         per GNU coding standards.
8737         * jcf-io.c: Similarly.
8738         * jcf-parse.c: Similarly.
8739         * jv-scan.c: Similarly.
8740         * jvspec.c: Similarly.
8741         * mangle.c: Similarly.
8742
8743 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8744             Alexandre Petit-Bianco  <apbianco@redhat.com>
8745
8746         * expr.c (build_java_arrayaccess): Call save_expr on array for
8747         correct evaluation order, modified comment, fixed indentation.
8748         * parse.y: (patch_assignment): Correctly extract the array base
8749         from the tree generate by build_java_arrayaccess, added comments.
8750         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8751         Fixes PR java/3096, PR java/3803, PR java/3965.
8752
8753 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8754
8755         * expr.c (expand_byte_code): Remove trailing periods from messages.
8756         * jcf-parse.c (load_class, jcf_parse): Similarly.
8757         * jcf-write.c (generate_classfile): Similarly.
8758         * lex.c (java_lex): Similarly.
8759
8760 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8761
8762         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8763
8764 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8765
8766         * Make-lang.in (java.generated-manpages): New dummy target.
8767
8768 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8769
8770         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8771         ASM_FINAL_SPEC.
8772         (lang_specific_pre_link): Use set_input to set input_filename.
8773         Append `main' here.
8774         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8775         (main): Fix definition.
8776         Strip `main' from classname.
8777         Fixes PR java/227.
8778
8779 2001-11-18  Roger Sayle <roger@eyesopen.com>
8780
8781         * parse.h (java_expand_switch): Remove old prototype.
8782
8783 2001-11-18  Tom Tromey  <tromey@redhat.com>
8784
8785         Fix for PR java/1401:
8786         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8787         arg0 is null.
8788         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8789         correctly.
8790
8791 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8792
8793         * lang.c (finish_parse): Rename to java_finish.
8794         (LANG_HOOKS_FINISH, java_finish): New.
8795
8796 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8797
8798         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8799         * java-tree.h: New prototype.
8800         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8801
8802 2001-11-13  Tom Tromey  <tromey@redhat.com>
8803
8804         * gjavah.c (method_signature): New global.
8805         (HANDLE_METHOD): Set it.
8806         (decompile_return_statement): New function.
8807         (decompile_method): Use it.
8808         (print_method_info): Removed `synth' argument.
8809
8810 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8811
8812         * java-tree.h (java_set_yydebug): New.
8813         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8814         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8815         (print_lang_decl, print_lang_type, print_lang_identifier,
8816         print_lang_statistics, lang_print_xnode): Remove.
8817
8818 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8819
8820         * jcf-parse.c (init_lex): Remove.
8821         * lang.c (language_string, lang_identify): Remove.
8822         (struct lang_hooks): Constify.
8823         (LANG_HOOKS_NAME): Override.
8824         (init_parse): Update.
8825
8826 2001-11-08  Andreas Franck  <afranck@gmx.de>
8827
8828         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8829         program_transform_name the way suggested by autoconf.
8830         (java.install-common): Also transform auxiliary program names with
8831         program_transform_name.
8832
8833 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8834
8835         * parse.y (trap_overflow_corner_case): New rule.
8836         (unary_expression): Use it.
8837         * lex.c (java_init_lex): Don't set minus_seen.
8838         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8839         it to handle.
8840         (error_if_numeric_overflow): New function.
8841         * parse.h (minus_seen): Removed field.
8842         (JAVA_RADIX10_FLAG): New define.
8843
8844 2001-11-07  Tom Tromey  <tromey@redhat.com>
8845
8846         Patch for PR java/1414:
8847         * parse.y (case_label_list): New global.
8848         (goal): Register case_label_list with GC.
8849         (java_complete_lhs): Save new case on case_label_list.
8850         (patch_switch_statement): Check for duplicate case labels.
8851
8852 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8853
8854         * parse.y (patch_assignment): Removed unused third argument.
8855         (java_complete_lhs): Removed unused third argument to patch_assignment.
8856
8857 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8858
8859         * lang.c: Include langhooks-def.h.
8860         * Make-lang.in: Update.
8861
8862 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8863
8864         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8865
8866 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8867
8868         * mangle.c (find_compression_record_match): Don't match compression
8869         records for package name elements unless they occur at the start of
8870         the name. Fix for PR java/4717.
8871
8872 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8873
8874         * expr.c (expand_java_field_op): Don't special-case references to
8875         java.lang.PRIMTYPE.TYPE.
8876         (build_primtype_type_ref): Removed.
8877         * java-tree.h (build_primtype_type_ref): Remove prototype.
8878         * parse.y (maybe_build_primttype_type_ref): Removed.
8879         (complete_function_arguments): Don't special-case references to
8880         java.lang.PRIMTYPE.TYPE.
8881         (patch_assignment): Likewise.
8882         (array_constructor_check_entry): Likewise.
8883
8884 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8885
8886         * mangle.c (static tree compression_table): Fixed leading comment.
8887         * parse.h (struct parser_ctxt): Fixed field comment.
8888         * parse.y (check_pkg_class_access): New prototype, fixed leading
8889         comment, new parameter used to emit error only if passed as true.
8890         (parse_check_super): Pass extra argument to check_pkg_class_access.
8891         (do_resolve_class): Likewise.
8892         (process_imports): Likewise.
8893         (read_import_dir): Fixed indentation.
8894         (find_in_imports_on_demand): New local class_type_name. Local
8895         node_to_use deleted. while loop changed into for loop. Report
8896         multiple definition only for accessible classes. Improved error
8897         message.
8898         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8899         assigned to parameter list, fixed indentation. while loop changed
8900         into for loop, restore TREE_CHAIN on local `tem' before the next
8901         iteration.
8902
8903 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8904
8905         * lang.c (lang_get_alias_set): Deleted.
8906
8907 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8908
8909         * gjavah.c (jni_print_char): Fix thinko in last change.
8910
8911         * gjavah.c (jni_print_char, decode_signature_piece): Use
8912         safe-ctype macros and/or fold extra calls into fewer ones.
8913         * lex.c (java_read_unicode, java_lex): Likewise.
8914         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8915         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8916         * mangle_name.c (append_unicode_mangled_name,
8917         unicode_mangling_length): Likewise.
8918
8919 2001-10-17  Richard Henderson  <rth@redhat.com>
8920
8921         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8922
8923 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8924
8925         * lang.c (langhooks.h): Included.
8926         (LANG_HOOKS_INIT): Redefined.
8927         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8928         (LANG_HOOKS_DECODE_OPTION): Likewise.
8929         (struct lang_hooks lang_hooks): New initialization.
8930
8931 2001-10-11  Per Bothner  <per@bothner.com>
8932
8933         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8934         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8935         The former is simpler, and jcf-write.c handles it better.
8936         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8937         or WITH_CLEANUP_EXPR.
8938         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8939         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8940
8941         * parse.y (patch_if_else_statement):  If the condition is constant,
8942         optimize away the test.
8943
8944 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8945
8946         * parse.y (patch_cast): Call patch_string on the first operand of
8947         the incoming node, update it if necessary. Fixes PR java/4510.
8948
8949 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8950
8951         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8952         when name qualifier matches a package name.
8953
8954 2001-10-08  Tom Tromey  <tromey@redhat.com>
8955
8956         Fix for PR java/4489:
8957         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8958         force a new label when computing `body_block'.
8959
8960 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8961
8962         * jcf-io.c (format_uint): Const-ify.
8963         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8964         * lex.c (java_get_line_col): Likewise.
8965         * parse.y (build_incdec): Likewise.
8966
8967 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8968
8969         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8970         a NULL enclosing context if appropriate. Fixes PR java/4466.
8971
8972 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8973
8974         * parse.y (patch_assignment): Use lvalue's original TYPE when
8975         building the final COMPOUND_EXPR.
8976         (try_reference_assignconv): Fixed leading comment.
8977
8978 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8979
8980         * parse.y (check_final_variable_indirect_assignment): For
8981         COMPOUND_EXPR, return only if finals were found initialized
8982         properly, if not, keep on checking.
8983         (check_final_variable_global_assignment_flag): New local
8984         error_found, set when appropriate and used to decide whether to
8985         report uninitialized finals. Fixed typo in comment.
8986
8987 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8988
8989         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8990         last three initializations. Fixes PR java/4360.
8991
8992 2001-09-21  Richard Henderson  <rth@redhat.com>
8993
8994         * class.c (get_dispatch_table): Handle function descriptors.
8995         (build_dtable_decl): Likewise.
8996         * expr.c (build_invokevirtual): Likewise.
8997
8998 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8999
9000         * parse.y (patch_method_invocation): Build class initialization
9001         when static finals are used to qualify method invocation.
9002         Fixes PR java/4366.
9003
9004 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
9005
9006         * parse.h: (WFL_STRIP_BRACKET): Re-written using
9007         build_type_name_from_array_name.
9008         (STRING_STRIP_BRACKETS): New macro.
9009         * parse.y (build_type_name_from_array_name): New function.
9010         (array_creation_expression:): Accumulate []s instead of [s.
9011         (cast_expression:): Accumulate []s instead of [s after cast type
9012         name.
9013         (build_array_from_name): Local string deleted, use
9014         build_type_name_from_array_name.
9015         (build_unresolved_array_type): Accumulate []s instead of [s after
9016         type name.
9017         (register_fields): Fixed comment.
9018         (resolve_class): Local name, base deleted, new locals tname and
9019         array_dims. Use build_type_name_from_array_name. Use array_dims to
9020         build array type.
9021         (purify_type_name): Use STRING_STRIP_BRACKETS.
9022
9023 2001-09-18  Andreas Jaeger  <aj@suse.de>
9024
9025         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9026         * jv-scan.c: Likewise.
9027
9028 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9029
9030         * parse.y (patch_method_invocation): Inner class creation context
9031         check not enforced within constructors. Fixes PR java/1873.
9032
9033 2001-09-16  Tom Tromey  <tromey@redhat.com>
9034
9035         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9036         NOTE_PUSH for single-case push.  Fixes PR java/4189.
9037
9038 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9039
9040         * java-tree.h (TYPE_IMPORT_LIST): New macro.
9041         (TYPE_IMPORT_DEMAND_LIST): Likewise.
9042         (struct lang_type): New fields import_list and import_demand_list.
9043         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9044         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9045         (do_resolve_class): New local saved_enclosing_type, initialized,
9046         passed as parameter to find_in_imports and find_in_imports_on_demand.
9047         (find_in_imports): Added paramater enclosing_type, use its
9048         TYPE_IMPORT_LIST when applicable.
9049         (find_in_imports_on_demand): Added parameter enclosing_type, use
9050         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9051         declaration and initialization.
9052         (fold_constant_for_init): Switch/restore current_class to the
9053         appropriate context.
9054
9055 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
9056
9057         * verify.c (verify_jvm_instructions): Fix typo.
9058
9059 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9060
9061         * expr.c (expand_invoke): Const-ification.
9062         * parse.y (patch_method_invocation): Likewise.
9063
9064 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9065
9066         * gjavah.c (cxx_keywords): Const-ification.
9067         * keyword.gperf (java_keyword): Likewise.
9068         * lang.c (java_tree_code_name): Likewise.
9069         * lex.c (cxx_keywords): Likewise.
9070         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9071
9072 2001-09-11  Richard Henderson  <rth@redhat.com>
9073
9074         * parse.h (ctxp_for_generation): Mark extern.
9075
9076 2001-09-10  Richard Henderson  <rth@redhat.com>
9077
9078         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9079
9080 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9081
9082         * typeck.c (java_array_type_length, build_prim_array_type):
9083         Represent empty arrays by NULL index.
9084
9085 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
9086
9087         * java-tree.h (compile_resource_file): Grouped with other prototypes.
9088         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9089
9090 2001-09-06  Anthony Green  <green@redhat.com>
9091
9092         * class.c (O_BINARY): Define if necessary.
9093         (registerResource_libfunc): Declare.
9094         (init_class_processing): Initilize registerResource_libfunc.
9095         (compile_resource_file): New function.
9096         * java-tree.h (resource_name): Declare.
9097         (compile_resource_file): Declare.
9098         * jcf-parse.c (yyparse): Handle compiling java resource files.
9099         * lang.c (java_decode_option): Handle -fcompile-resource option.
9100         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9101         resource files.
9102         * gcj.texi (Code Generation): Add documentation for -R flag.
9103
9104 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
9105
9106         * jcf-write.c (generate_classfile): Issue an error in case of
9107         field/initial value mismatch.
9108         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9109         being initialized and we're generating bytecode.
9110         (java_complete_lhs): In MODIFY_EXPR section: added comments,
9111         set DECL_INITIAL properly when appropriate.
9112         Fixes PR java/4230
9113         Fixes PR java/4204
9114
9115 2001-09-01  Per Bothner  <per@bothner.com>
9116
9117         * parse.y (maybe_yank_clinit):  A field without an initializer is not
9118         relevant.  All initializers except static final and constant require
9119         <clinit>, regardless of flag_emit_class_files.
9120
9121 2001-08-31  Per Bothner  <per@bothner.com>
9122
9123         * class.c (set_constant_value):  When not emitting class files, then a
9124         String ConstantValue is a utf8const_ptr_type.
9125
9126 2001-08-30  Per Bothner  <per@bothner.com>
9127
9128         * jcf-write.c (generate_classfile):  Check that field is primitive
9129         or string before emitting ConstantValue attribute.
9130
9131 2001-08-30  Per Bothner  <per@bothner.com>
9132
9133         * parse.y (resolve_qualified_expression_name):  If creating a
9134         COMPOUND_EXPR, set it's type correctly.
9135
9136 2001-08-30  Per Bothner  <per@bothner.com>
9137
9138         * jcf-io.c (open_class):  Set filename field.
9139
9140         * jcf-parse,c (parse_class_file):  Set current_function_decl
9141         for better error message when Code attribute is missing.
9142
9143         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9144         better diagnostics, especially for constructors.
9145
9146 2001-08-30  Per Bothner  <per@bothner.com>
9147
9148         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9149         attribute if field is not final, for compatibility with jdk.
9150
9151         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9152         to correct type.  Work-around for front-end bug.
9153         * class.c (set_constant_value):  Error if constant has wrong type.
9154
9155 2001-08-30  Per Bothner  <per@bothner.com>
9156
9157         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9158         "Double" are printed at verbosity 1.
9159
9160         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9161
9162         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9163
9164 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9165
9166         * parse.y (patch_assignment): Don't verify final re-assignment here.
9167         (java_complete_lhs): Verify assignments to finals calling
9168         patch_assignment. Verify re-assignments to finals before calling
9169         patch_assignment.
9170
9171 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9172
9173         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9174         Fixes PR java/1413
9175
9176 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9177
9178         * lex.c (java_lex): new local found_hex_digits. Set and then used
9179         in test to reject invalid hexadecimal numbers.
9180         * parse.y (java_complete_tree): Prevent unwanted cast with
9181         initialized floating point finals.
9182         (patch_binop): Emit a warning when detecting a division by zero,
9183         mark result not constant, don't simplify non integer division.
9184
9185 2001-08-28  Per Bothner  <per@bothner.com>
9186
9187         * jcf-write.c  (generate_bytecode_insns):  For increments and
9188         decrements just recurse to push constant.  Improvement on Mark's patch.
9189
9190 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9191
9192         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9193         real conversion for increments and decrements of reals.
9194
9195 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9196
9197         * parse.y (resolve_qualified_expression_name): Handle unresolved
9198         qualified expressions, prevent numerical qualifiers, fixed typo.
9199         Fixes PR java/4141
9200
9201 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9202
9203         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9204         don't report anything but deprecated class when marked so. Handle
9205         VAR_DECL.
9206         (patch_method_invocation): Check deprecation on methods and types.
9207         (patch_binop): code becomes an enum tree_code, added default: to
9208         switch to handle that. Detect division by zero, try to fold and
9209         return before using a subroutine.
9210
9211 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9212
9213         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9214         file smaller than 4 bytes.
9215         * parse.y (check_inner_circular_reference): New function.
9216         (check_circular_reference): Likewise.
9217         (array_initializer:): Accept {,}.
9218         (java_check_circular_reference): Rewritten using
9219         check_circular_reference and check_inner_circular_reference.
9220         (java_complete_expand_method): Unconditionally save and restore
9221         the unpurged exception list.
9222         (build_dot_class_method_invocation): Unmangle signature parameter.
9223
9224 2001-08-21  Tom Tromey  <tromey@redhat.com>
9225
9226         * decl.c (init_decl_processing): Add `throws' field to method
9227         descriptor.
9228         * class.c (make_method_value): Compute `throws' field for method.
9229
9230 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9231
9232         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9233         circularity is detected.
9234         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9235
9236 2001-08-17  Richard Henderson  <rth@redhat.com>
9237
9238         * class.c (emit_register_classes): Add align parameter to
9239         call to assemble_integer.
9240
9241 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9242
9243         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9244         loading a class_or_name fails, try considering an innerclass name
9245         and load the enclosing context.
9246         * parse.y (resolve_inner_class): New function.
9247         (find_as_inner_class): Added leading comment.
9248         (register_incomplete_type): Keep the current context as enclosing
9249         context for JDEP_FIELD dependencies.
9250         (do_resolve_class): Locals new_class_decl and super initialized to
9251         NULL. Call resolve_inner_class, explore the enclosing context
9252         superclass if necessary.
9253         Fixes PR java/4007
9254
9255 2001-08-16  Tom Tromey  <tromey@redhat.com>
9256
9257         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9258         * gjavah.c (main): Updated for change to jcf_path_seal.
9259         * lang.c (version_flag): New global.
9260         (java_decode_option): Recognize `-version'.
9261         (java_init): Update for change to jcf_path_seal.
9262         * jcf.h (jcf_path_seal): Added `print' argument.
9263         * jcf-path.c (jcf_path_seal): Added `print' argument.
9264
9265 2001-08-13  Zack Weinberg  <zackw@panix.com>
9266
9267         * Make-lang.in (java/decl.o): Update dependencies.
9268         * decl.c: Include libfuncs.h, don't include toplev.h.
9269
9270 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9271
9272         * decl.c (init_decl_processing): exception_type_node,
9273         class_not_found_type_node, and no_class_def_found_type_node
9274         initialized. predef_filenames augmented accordingly.
9275         instinit_identifier_node initialized.
9276         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9277         * java-tree.h (enum java_tree_index): New entries
9278         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9279         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9280         (exception_type_node): New macro.
9281         (class_not_found_type_node): Likewise.
9282         (no_class_def_found_type_node): Likewise.
9283         (instinit_identifier_node): Likewise.
9284         (PREDEF_FILENAMES_SIZE): Adjusted.
9285         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9286         (struct lang_type): Fixed typo in bitfield name.
9287         (DECL_INSTINIT_P): New macro.
9288         (ID_INSTINIT_P): Likewise.
9289         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9290         attribute.
9291         * parse.y (encapsulate_with_try_catch): New function.
9292         (generate_instinit): Likewise.
9293         (build_instinit_invocation): Likewise.
9294         (ctors_unchecked_throws_clause_p): Likewise.
9295         (add_instance_initializer): Deleted.
9296         (build_instance_initializer): Likewise.
9297         (in_instance_initializer): Likewise.
9298         (check_method_redefinition): instinit$ not to be verified.
9299         (java_complete_expand_methods): Generate instinit$, simplified code.
9300         (build_dot_class_method): Eliminated unnecessary locals. Use
9301         encapsulate_with_try_catch, removed unnecessary code.
9302         (fix_constructors): New local iii. Use build_instinit_invocation.
9303         (patch_method_invocation): Added comment.
9304         (maybe_use_access_method): Don't consider instinit$.
9305         (find_applicable_accessible_methods_list): Shorten the search for
9306         instinit$ too.
9307         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9308         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9309         (patch_throw_statement): Likewise. Fixed typo.
9310
9311 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9312
9313         Revert:
9314         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9315         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9316         ASM_FINAL_SPEC.
9317         (lang_specific_pre_link): Use set_input to set input_filename.
9318         Append `main' here.
9319         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9320         (main): Fix definition.
9321         Strip `main' from classname.
9322         Fixes PR java/227.
9323
9324 2001-08-11  Zack Weinberg  <zackw@panix.com>
9325
9326         * lex.h: Don't include setjmp.h.  Don't define
9327         SET_FLOAT_HANDLER or prototype set_float_handler.
9328
9329 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9330
9331         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9332         `poplevel' in the right order.
9333
9334 2001-08-09  Richard Henderson  <rth@redhat.com>
9335
9336         * Make-lang.in (class.o): Depend on TARGET_H.
9337         * class.c (emit_register_classes): Use target hooks instead of
9338         assemble_constructor and assemble_destructor.
9339
9340 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9341
9342         * check-init.c (flags.h): Include
9343         (check_init): Don't report uninitialized static class
9344         initialization flags, don't free bit index when doing static class
9345         initialization optimization.
9346         (check_for_initialization): Return type changed to `unsigned int.'
9347         (attach_initialized_static_class): New function.
9348         * class.c (add_method_1): Create the initialized static class
9349         table if necessary.
9350         (finish_class): Always emit deferred inline methods.
9351         * decl.c (emit_init_test_initialization): Moved to expr.c
9352         (complete_start_java_method): Don't traverse
9353         DECL_FUNCTION_INIT_TEST_TABLE.
9354         (lang_mark_tree): Mark hash tables in function decls.
9355         * expr.c (emit_init_test_initialization): Moved from decl.c.
9356         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9357         initialization flag, set DECL_CONTEXT and
9358         LOCAL_CLASS_INITIALIZATION_FLAG.
9359         (java_lang_expand_expr): Emit initialization code for static class
9360         initialized flags when entering block, if necessary.
9361         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9362         * java-tree.h (flag_optimize_sci): New global variable declaration.
9363         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9364         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9365         (LOCAL_FINAL_P): Fixed typo in comment.
9366         (FINAL_VARIABLE_P): Likewise.
9367         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9368         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9369         (struct lang_decl): New fields `ict', `smic' and `cif.'
9370         (check_for_initialization): New returned value for global.
9371         (attach_initialized_static_class): New global function.
9372         (STATIC_CLASS_INIT_OPT_P): New macro.
9373         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9374         * lang.c (java_decode_option): Handle
9375         `-fno-optimize-static-class-initialization'
9376         * parse.y (start_complete_expand_method): New function.
9377         (java_expand_method_bodies): Likewise.
9378         (attach_init_test_initialization_flags): Likewise.
9379         (adjust_init_test_initialization): Likewise.
9380         (emit_test_initialization): Likewise.
9381         (java_complete_expand_methods): Nullify abstract and native method
9382         bodies.
9383         (java_complete_expand_method): New locals `fbody', `block_body'
9384         and `exception_copy.' Reorganized: directly return on empty method
9385         bodies, call `start_complete_expand_method', remember definitely
9386         initialized static class in function, don't expand method bodies.
9387         (java_expand_classes): Call `java_expand_method_bodies' before
9388         `finish_class' when compiling to native.
9389         (resolve_expression_name): Use `orig' after building outer class
9390         field access.
9391         (patch_invoke): Remember static method invocations.
9392
9393 2001-08-06  Richard Henderson  <rth@redhat.com>
9394
9395         * class.c (emit_register_classes): Pass a symbol_ref and priority
9396         to assemble_constructor.
9397
9398 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9399
9400         * java-tree.h (all_class_filename): New macro.
9401         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9402         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9403         newly created IDENTIFIER_NODE to `all_class_filename.'
9404
9405 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9406
9407         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9408         Use ggc_add_tree_root to register roots.
9409
9410 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9411
9412         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9413         second operand calling check_init.
9414         * decl.c (complete_start_java_method): Swaped second and third
9415         arguments while creating WITH_CLEANUP_EXPR node.
9416         * jcf-write.c (generate_bytecode_insns): Use second operand
9417         instead of third when handling WITH_CLEANUP_EXPR.
9418         * parse.y (java_complete_lhs): Expand second operand of
9419         WITH_CLEANUP_EXPR nodes.
9420         (patch_synchronized_statement): Swaped second and third arguments
9421         while creating WITH_CLEANUP_EXPR node.
9422
9423 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9424
9425         * parse.y (create_interface): Avoid cyclic inheritance report when
9426         syntax error encountered during class definition.
9427         Fixes PR java/2956
9428
9429 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9430
9431         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9432         ASM_FINAL_SPEC.
9433         (lang_specific_pre_link): Use set_input to set input_filename.
9434         Append `main' here.
9435         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9436         (main): Fix definition.
9437         Strip `main' from classname.
9438         Fixes PR java/227.
9439
9440 2001-07-18  Tom Tromey  <tromey@redhat.com>
9441
9442         For PR java/2812:
9443         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9444         * lex.c (java_new_lexer): Use ICONV_CONST.
9445         (java_read_char): Likewise.
9446         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9447         (jv-scan$(exeext)): Likewise.
9448
9449 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9450
9451         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9452         * parse.y (check_class_interface_creation): Allow `private' if the
9453         enclosing is not an interface.
9454         (create_interface): Interface tagged public if the enclosing
9455         context is an interface.
9456         (create_class): Class tagged public if the enclosing context
9457         is an interface.
9458         Fixes PR java/2959
9459
9460 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9461
9462         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9463         Fixes PR java/2665
9464
9465 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9466
9467         * check-init.c (check_init): Remove references to EXPON_EXPR.
9468
9469 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9470
9471         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9472         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9473         Fixes PR java/3602
9474
9475 2001-07-13  Tom Tromey  <tromey@redhat.com>
9476
9477         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9478         invocation.
9479
9480 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9481
9482         * parse.y (patch_method_invocation): Don't override primary if one
9483         is already provided, but let this$<n> be built. Fixed comment.
9484
9485 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9486
9487         * parse.y (empty_statement:): Report empty statement error only
9488         when found at class declaration level.
9489         Fixes PR java/3635
9490
9491 2001-07-12  Tom Tromey  <tromey@redhat.com>
9492
9493         * expr.c (expand_load_internal): New function.
9494         (LOAD_INTERNAL): Use it.
9495
9496 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9497
9498         * parse.y (verify_constructor_super): Compare anonymous class ctor
9499         args with `valid_method_invocation_conversion_p.'
9500         Fixes PR java/3285
9501
9502 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9503
9504         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9505         `-fsyntax-only.' Fixes PR java/3248
9506
9507 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9508
9509         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9510
9511 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9512
9513         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9514         current function is static. Fixes PR java/1970
9515
9516 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9517
9518         * parse.y (patch_method_invocation): Add enclosing context to ctor
9519         calls if necessary. Fixes PR java/2953
9520
9521 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9522
9523         * parse.y (resolve_package): Abort if qualified expression member
9524         isn't right.
9525         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9526         Fixes PR java/1391
9527
9528 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9529
9530         * verify.c: Don't use // comments.
9531
9532 2001-07-05  Tom Tromey  <tromey@redhat.com>
9533
9534         * lang.c (flag_assume_compiled): Removed.
9535         * java-tree.h (flag_assume_compiled): Removed.
9536         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9537         -fhash-synchronization, -fuse-divide-subroutine,
9538         -fcheck-references, -femit-class-file, -femit-class-files,
9539         -fassume-compiled.  Updated --encoding information.  Changed
9540         -foutput-class-dir to `-d'.
9541
9542 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9543
9544         * jcf-parse.c (parse_class_file): Add lineno parameter to
9545         debug_start_source_file call.
9546
9547 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9548
9549         * gcj.texi: Use gpl.texi.
9550         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9551         dependencies and use doc/include in search path.
9552
9553 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9554
9555         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9556         `this'.  If so, don't build instance initializers.
9557
9558 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9559
9560         * parse.y (resolve_expression_name): Improved error message for
9561         inner class cases. Fixes PR java/1958
9562
9563 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9564
9565         * lang.c: #include diagnostic.h
9566         (lang_print_error): Add a `diagnostic_context *' parameter.
9567         (java_dummy_print): Likewise.
9568         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9569
9570 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9571
9572         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9573         * jcf.h (typedef struct JCF): New bitfield `finished.'
9574         (JCF_FINISH): Set `finished.'
9575         (JCF_ZERO): Reset `finished.'
9576         Fixes PR java/2633
9577
9578 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9579
9580         * parse.y (class_body_declaration:): Don't install empty instance
9581         initializers.
9582         Fixes PR java/1314
9583
9584 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9585
9586         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9587         (set_class_decl_access_flags): New function.
9588         * java-tree.h (set_class_decl_access_flags): New prototype.
9589         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9590         (parse_class_file): New local `decl_max_locals.' Take wide types
9591         into account to compute DECL_MAX_LOCALS.
9592         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9593         imports on demand.
9594
9595 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9596
9597         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9598
9599 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9600
9601         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9602         * parse.y (do_resolve_class): Moved comments out to leading comment
9603         section. Removed local `start', New local `_ht' and
9604         `circularity_hash.'  Record `enclosing' in hash table and search
9605         it to detect circularity.  Use `enclosing' as an argument to
9606         `lookup_cl.' Free the hash table when done.
9607
9608 2001-06-19  Tom Tromey  <tromey@redhat.com>
9609
9610         * lex.c (java_read_char): Disallow invalid and overlong
9611         sequences.  Fixes PR java/2319.
9612
9613 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9614
9615         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9616
9617 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9618
9619         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9620         arguments accordingly.
9621
9622 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9623
9624         * gcj.texi: Move contents to just after title page.
9625
9626 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9627
9628         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9629         builtin type.
9630         (patch_incomplete_class_ref): Build the class ref, build the class
9631         init if necessary, complete the tree.
9632         Fixes PR java/2605
9633
9634 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9635
9636         * parse.y (lookup_field_wrapper): Test `name' code.
9637         (resolve_qualified_expression_name): Test `qual_wfl' code.
9638         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9639         handle `qual_wfl' by code.
9640         (maybe_build_primttype_type_ref): Test `wfl' code.
9641
9642 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9643
9644         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9645         fdl.texi.
9646         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9647         the dvi file in the java directory.
9648
9649 2001-05-25  Sam TH  <sam@uchicago.edu>
9650
9651         * gen-table.pl javaop.h jcf.h lex.h,
9652         parse.h: Fix header include guards.
9653
9654 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9655
9656         * jv-scan.c (version): Update copyright year.
9657
9658 2001-05-21  Per Bothner  <per@bothner.com>
9659
9660         * jcf-parse.c (read_class):  If class is from .class or .zip file
9661         and it's already been read, don't push/pop parser context.
9662
9663 2001-05-18  Per Bothner  <per@bothner.com>
9664
9665         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9666         command line so the jvgenmain-generated main program comes first.
9667
9668 2001-05-15  Tom Tromey  <tromey@redhat.com>
9669
9670         * class.c (build_utf8_ref): Don't generate identifier based on
9671         utf8const contents.
9672
9673 2001-05-12  Richard Henderson  <rth@redhat.com>
9674
9675         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9676         * expr.c (java_lang_expand_expr): Expand it.
9677         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9678         calling build_exception_object_ref.
9679         * parse.y (catch_clause_parameter): Likewise.
9680         (build_dot_class_method): Likewise.
9681         (try_reference_assignconv): Likewise.
9682         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9683         * jcf-write.c (generate_bytecode_insns): Likewise.
9684
9685 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9686
9687         * parse.y (build_unresolved_array_type): Set
9688         EXPR_WFL_QUALIFICATION on the newly created wfl.
9689         Fixes PR java/2538. Fixes PR java/2535.
9690
9691 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9692
9693         * parse.y (fix_constructors): Removed unnecessary assignment to
9694         local. Moved assignment to `this$<n>', fixed comments and
9695         indentation.
9696         (build_wfl_wrap): Fixed indentation.
9697         Fixes PR java/2598, java/2579 and java/2658.
9698
9699 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9700
9701         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9702         check for byte swap.
9703
9704 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9705
9706         * expr.c (build_class_init): Move MODIFY_EXPR
9707         outside of COND_EXPR.  Remove variable `call'.
9708
9709 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9710
9711         * decl.c: NULL_PTR -> NULL.
9712         * jcf-write.c: Likewise.
9713
9714 2001-05-01  Tom Tromey  <tromey@redhat.com>
9715
9716         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9717         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9718         * gcj.texi: Updated copyright text.  Include fdl.texi.
9719         (Top): Link to new node.
9720
9721 2001-05-01  Per Bothner  <per@bothner.com>
9722
9723         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9724
9725 2001-05-01  Per Bothner  <per@bothner.com>
9726
9727         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9728         import_list contains the name, not the TREE_PURPOSE.
9729
9730 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9731
9732         * jcf-io.c (read_zip_member): Cast to long in comparison with
9733         signed value.
9734
9735         * jvspec.c (lang_specific_driver): Initialize variables.
9736
9737         * mangle.c (find_compression_record_match): Likewise.
9738
9739         * typeck.c (build_null_signature): Provide static prototype.  Mark
9740         parameter with ATTRIBUTE_UNUSED.
9741
9742         * verify.c (verify_jvm_instructions): Initialize variable.
9743
9744 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9745
9746         * parse.y (do_resolve_class): Check for cyclic inheritance during
9747         inner class resolution.
9748
9749 2001-04-27  Per Bothner  <per@bothner.com>
9750
9751         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9752         while iterating, since that could cause gc to lose stuff.
9753
9754 2001-04-26  Per Bothner  <per@bothner.com>
9755
9756         Fix method search wrt scope of inner classes to match JLS2.
9757         * typeck.c (build_null_signature):  New static function.
9758         (has_method):  New function.  Uses build_null_signature and lookup_do.
9759         * java-tree.h (has_method):  New declaration.
9760         * parse.y (find_applicable_accessible_methods_list):  Do not search
9761         context of inner classes here.
9762         (patch_method_invocation):  Search scope, ie. current and outer clases,
9763         for method matching simple name, to find class.
9764
9765 2001-04-26  Per Bothner  <per@bothner.com>
9766
9767         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9768         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9769
9770         * constants.c (find_methodref_with_class_index):  New function.
9771         (find_methodref_index):  Use find_methodref_with_class_index.
9772         * java-tree.h (find_methodref_with_class_index):  New declaration.
9773         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9774         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9775         If context changed from interface to class, don't use invokeinterface.
9776
9777 2001-04-25  Per Bothner  <per@bothner.com>
9778
9779         * verify.c (verify_jvm_instructions):  For field instructions,
9780         check that field index is valid.  For invoke instructions, check that
9781         method index is valid.
9782
9783 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9784
9785         * config-lang.in (target_libs): Copy from $libgcj_saved.
9786
9787 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9788
9789         * decl.c (init_decl_processing): Add new class "protectionDomain"
9790         field.
9791         * class.c (make_class_data): Set initial value for "protectionDomain".
9792
9793 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9794
9795         * jvspec.c (lang_specific_driver): Fix memory allocation
9796         deficit, by using concat in lieu of xmalloc/sprintf.
9797
9798 2001-04-20  Per Bothner  <per@bothner.com>
9799
9800         Fixes to compile multiple .class files at once.
9801         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9802         * java-tree.h (CLASS_PARSED_P):  New macro.
9803         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9804         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9805         (read_class):  Avoid some code duplication.
9806         Don't call JCF_FINISH for a .class file - might be needed later.
9807         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9808         rather than CLASS_LOADED_P, since latter implies class laid out.
9809         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9810         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9811
9812 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9813
9814         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9815
9816         * boehm.c: Include toplev.h.
9817
9818 2001-04-06  Tom Tromey  <tromey@redhat.com>
9819             Alexandre Petit-Bianco  <apbianco@redhat.com>
9820
9821         Fix for PR gcj/1404 and PR gcj/2332:
9822         * parse.y (build_array_from_name): If we use the type_wfl then
9823         accumulate dimensions from the original type as well.
9824         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9825
9826 2001-04-06  Tom Tromey  <tromey@redhat.com>
9827
9828         * parse.y (analyze_clinit_body): Return true if the second operand
9829         of a METHOD_EXPR is nonzero.
9830
9831 2001-04-06  Tom Tromey  <tromey@redhat.com>
9832
9833         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9834         directory.
9835         ($(srcdir)/java/parse.c): Likewise.
9836
9837 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9838
9839         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9840         (version-gcc): Initialized.
9841         (which-gcj): Likewise.
9842
9843 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9844
9845         * java-tree.h (struct lang_decl): New macro
9846         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9847         * parse.y (build_instance_initializer): New function.
9848         (add_instance_initializer): Use it.
9849         (java_fix_constructors): Set `current_class' before fix pass.
9850         (fix_constructors): Just return if already fixed. Move `super()'
9851         invocation ahead. Use `build_instance_initializer.'
9852         Fixes PR java/1315.
9853
9854 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9855
9856         * parse.y (resolve_qualified_expression_name): Pass field's
9857         DECL_CONTEXT to `not_accessible_p.'
9858         (not_accessible_p): Changed parameters order in `inherits_from_p'
9859         invocation.
9860
9861 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9862
9863         * lang-options.h: Add flag_check_references.
9864
9865 2001-04-04  Per Bothner  <per@bothner.com>
9866
9867         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9868         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9869         * parse.y (maybe_build_class_init_for_field):  New static function.
9870         (resolve_expression_name, resolve_field_access):  Use
9871         maybe_build_class_init_for_field instead of build_class_init
9872         This does not do the init if the field is compile-time-constant.
9873         (resolve_field_access):  Simplify.
9874
9875         * parse.y (fold_constant_for_init):  Merge test into switch.
9876
9877 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9878
9879         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9880         on gansidecl.h.
9881         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9882
9883 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9884
9885         * expr.c (pop_type_0): Save the result of the first
9886         lang_printable_name call in a scratch buffer, so it
9887         won't be clobbered by the second call.
9888
9889 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9890
9891         * parse-scan.y (array_type:): Rewritten.
9892         (type_declaration:): `empty_statement' replaces `SC_TK.'
9893         (class_member_declaration:): `empty statement' added.
9894         (method_body:): Simplified.
9895         (static_initializer:): Likewise.
9896         (primary_no_new_array:): Use `type_literals.'
9897         (type_literals:): New rule.
9898         (dims:): Set and update `bracket_count.'
9899         Fixes PR java/1074. Fixes PR java/2412.
9900
9901 2001-03-28  Hans Boehm  <boehm@acm.org>
9902
9903         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9904         (get_boehm_type_descriptor): Set type on returned value to be a
9905         pointer length integer.
9906
9907 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9908
9909         * expr.c (pop_type_0): Call `concat' rather than building the
9910         string manually.
9911         (pop_type): Add format specifier in call to `error'.
9912
9913         * parse.y (patch_method_invocation): Avoid casting away
9914         const-ness.
9915
9916 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9917
9918         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9919
9920 2001-03-28  Richard Henderson  <rth@redhat.com>
9921
9922         IA-64 ABI Exception Handling:
9923         * Make-lang.in (except.o): Don't depend on eh-common.h.
9924         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9925         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9926         [soft_exceptioninfo_call_node]: Remove.
9927         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9928         (end_java_method): No emit_handlers.
9929         * except.c (java_set_exception_lang_code): Remove.
9930         (method_init_exceptions): Don't call it.
9931         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9932         (build_exception_object_ref): New.
9933         (expand_end_java_handler): Update for except.h name changes.
9934         (emit_handlers, expand_resume_after_catch): Remove.
9935         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9936         (process_jvm_instruction): Use build_exception_object_ref.
9937         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9938         (soft_exceptioninfo_call_node): Remove.
9939         (build_exception_object_ref): Declare.
9940         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9941         soft_exceptioninfo_call_node.  Move processing ...
9942         [EXC_PTR_EXPR]: ... here.
9943         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9944         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9945         (source_end_java_method): No java_set_exception_lang_code or
9946         emit_handlers.
9947         (build_dot_class_method): Use build_exception_object_ref.
9948         (try_reference_assignconv): Check EXC_PTR_EXPR not
9949         soft_exceptioninfo_call_node.
9950
9951 2001-03-28  Richard Henderson  <rth@redhat.com>
9952
9953         * java-tree.h (throw_node): Define as a single member of
9954         java_global_trees instead of a separate array.
9955         (JTI_THROW_NODE): New.
9956         * decl.c (throw_node): Don't declare.
9957         (init_decl_processing): Init a scalar throw_node.
9958         Don't register it for gc.
9959         * check-init.c (check_init): Reference scalar throw_node.
9960         * expr.c (build_java_athrow): Likewise.
9961         * jcf-write.c (generate_bytecode_insns): Likewise.
9962         * parse.h (BUILD_THROW): Likewise.
9963
9964 2001-03-28  Richard Henderson  <rth@redhat.com>
9965
9966         * decl.c (end_java_method): Do not save and restore
9967         flag_non_call_exceptions.
9968         * parse.y (source_end_java_method): Likewise.
9969         * lang.c (flag_exceptions): Don't declare.
9970         (java_init_options): Set flag_non_call_exceptions.  Set
9971         flag_exceptions here ...
9972         (java_init): ... not here.
9973
9974 2001-03-27  Richard Henderson  <rth@redhat.com>
9975
9976         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9977         exceptions_via_longjmp.
9978
9979         * lang.c (flag_new_exceptions): Don't declare it.
9980         (java_init_options): Or set it.
9981
9982 2001-03-27  Richard Henderson  <rth@redhat.com>
9983
9984         * decl.c (end_java_method): Rename asynchronous_exceptions to
9985         flag_non_call_exceptions.
9986         * parse.y (source_end_java_method): Likewise.
9987
9988 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9989
9990         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9991
9992 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9993
9994         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9995
9996 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9997
9998         * parse.y (find_as_inner_class): Follow current package
9999         indications not to mistakingly load an unrelated class.
10000
10001 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10002
10003         * constants.c (PUTN): Use memcpy, not bcopy.
10004
10005         * lex.c (java_read_char): Use memmove, not bcopy.
10006
10007         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10008
10009 2001-03-23  Per Bothner  <per@bothner.com>
10010
10011         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
10012         macro for better error pin-pointing.
10013         * java-tree.h:  Fix typo in comment.
10014
10015         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
10016         Don't include jsr/goto in exception range.
10017         Check if start and end of exception range are the same (also TRY_EXPR).
10018         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10019         However, do emit the following goto even if try_block is empty.
10020         Defer freeing exception_decl until after the finalizer, to make
10021         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
10022
10023         * parse.y (java_complete_lhs):  If the try-clause is empty, just
10024         return the finally-clause and vice versa.
10025
10026 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10027
10028         * gcj.texi (Input Options): documented the check for attribute
10029         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10030         * java-tree.h (flag_force_classes_archive_check): Declared extern.
10031         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10032         (jcf_parse): Check for the right classes archive if necessary.
10033         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10034         (jcf_parse_fields): Fixed indentation.
10035         * jcf-write.c (append_gcj_attribute): New function.
10036         (generate_classfile): Compute the attribute count, invoke
10037         `append_gcj_attribute'.
10038         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10039         turned into bit-fields. New bit-field `right_zip.'
10040         (JCF_ZERO): Set `right_zip' to zero.
10041         * lang-options.h (-fforce-classes-archive-check): Added flag.
10042         * lang.c (flag_force_classes_archive_check): New flag.
10043         (lang_f_options): New entry `force-classes-archive-check.'
10044         Fixes PR java/1213.
10045
10046 2001-02-07  Andrew Haley  <aph@redhat.com>
10047
10048         * gcj.texi (Configure-time Options): Add -fcheck-references.
10049         * expr.c (build_java_indirect_ref): New function.
10050         (java_check_reference): New function.
10051         (build_java_array_length_access): Use build_java_indirect_ref to
10052         check for null references.
10053         (build_java_arrayaccess): Likewise.
10054         (build_get_class): Likewise.
10055         (build_field_ref): Likewise.
10056         (invoke_build_dtable): Likewise.
10057         (build_invokeinterface): Likewise.
10058         * lang.c (lang_f_options): Add flag_check_references.
10059         * jvspec.c (jvgenmain_spec): Add flag_check_references.
10060         * java-tree.h (flag_check_references): New variable.
10061         * lang.c (flag_check_references): Likewise.
10062         * parse.y (patch_invoke): Use java_check_reference.
10063         (patch_assignment): Allow for extra nesting in
10064         _Jv_CheckArrayStore.
10065
10066 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
10067
10068         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10069         * lex.c (cxx_keywords): Likewise.
10070
10071 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10072
10073         * parse.y (qualify_ambiguous_name): Broaden `length'
10074         recognition. Help MODIFY_EXPR be resolved as expression names.
10075         Fixes PR java/2066. Fixes PR java/2400.
10076
10077 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
10078
10079         * gjavah.c (process_file): Mark interface definitions with
10080         "__attribute__ ((java_interface))".
10081
10082 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10083
10084         * class.c (layout_class): Fixed push_super_field's second
10085         argument. Fixes PR java/2333.
10086         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10087         too early to lay innerclasses out.
10088
10089 2001-03-20  Tom Tromey  <tromey@redhat.com>
10090             Alexandre Petit-Bianco <apbianco@redhat.com>
10091
10092         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10093         inside an array reference. Insertion of the array store check
10094         rewritten. Fixes PR java/2299.
10095
10096 2001-03-20  Tom Tromey  <tromey@redhat.com>
10097
10098         * lex.c (java_read_unicode): Only accept leading `u's.
10099
10100 2001-03-20  Tom Tromey  <tromey@redhat.com>
10101
10102         * jcf-parse.c (read_class): Initialize `class'.
10103
10104 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10105
10106         * jcf_parse.c (jcf_parse): Eliminate unused variable.
10107
10108 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10109
10110         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10111         (layout_class): Likewise.
10112         (layout_class_method): Likewise.
10113         (emit_register_classes): Likewise.
10114         * decl.c (builtin_function): Likewise.
10115         (give_name_to_locals): Likewise.
10116
10117 2001-03-19  Per Bothner  <per@bothner.com>
10118
10119         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
10120         before trying to load an inner class.
10121
10122         Fixes to process to command-line .class files in two passes.
10123         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
10124         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
10125         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
10126         * class.c (is_compiled_class):  Fix for renamed flag.
10127         * parse.y (maybe_create_class_interface_decl):  Likewise.
10128         * jcf-parse.c (yyparse):  Also set if compiling .class files.
10129         * jcf-parse.c (read_class);  Read current_class.
10130         (jcf_parse):  Make static.
10131         (load_inner_classes):  New function, with code moved from jcf_parse,
10132         because we need to inner classes after the command-line files are read.
10133         (yyparse):  Set finput to NULL when it doesn't need to be closed.
10134         Reduce use of main_jcf (basically only for archive) and
10135         use finput instead of main_jcf->read_state.
10136         Inline jcf_figure_file_type into yyparse.
10137         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10138         Defer load_inner_classes and parse_class_file to a second pass,
10139         after we've correctly mapped command-line .clas fiels to classes.
10140         (jcf_figure_file_type):  Removed.
10141         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10142         (JCF_ZERO):  Also clear zipd field.
10143         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10144
10145 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10146
10147         * jcf-parse.c (yyparse): Change ch from char * to char.
10148
10149 2001-03-19  Per Bothner  <per@bothner.com>
10150
10151         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10152         Add constructed filelist-file at end, following -xjava.  Thus any .o
10153         and library files are not affected by the -xjava.  Also wrap
10154         explicit @FILE with -xjava and -xnone.
10155
10156 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10157
10158         * class.c (build_static_field_ref): Call make_decl_rtl() after
10159         setting the DECL_EXTERNAL flag.
10160
10161 2001-03-17  Per Bothner  <per@bothner.com>
10162
10163         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10164
10165         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10166         when result is is needed (target is STACK_TARGET).
10167
10168         * parse.h (JDEP_SOLV):  Removed.
10169         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10170
10171         * parse.y (incomplete_class_list): Removed.
10172         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10173         It doesn't work if resolve_class changes the name of an array type
10174         that is on the list and then someone else looks for the modified name.
10175         Also, seems liable to break when compiling multiple source files at
10176         once.  So the simplest is to just remove incomplete_class_list -
10177         it is only a minor space win and it is not even clear it saves time.
10178
10179         * parse.y (resolve_class):  Remove unneeded promote_type.
10180
10181 2001-03-15  Per Bothner  <per@bothner.com>
10182
10183         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10184         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10185         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10186         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10187
10188         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10189         * parse.y (java_expand_classes):  Likewise.
10190
10191         * parse.y (expand_start_java_method):  Was only called once and had a
10192         misleading name, so inline in caller java_complete_expand_method.
10193         (enter_a_block):  Likewise inline in enter_block and remove.
10194
10195         Remove junk from when gcc/java was created (by copying from C/C++).
10196         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10197         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10198         more_cleanups_ok, have_cleanups (which have never been used).
10199         (pushlevel, poplevel):  Remove related useless code.
10200
10201         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10202         vtable for Class) should be external, except when compiling Class.
10203
10204         * jvspec.c (lang_specific_driver):  Fix -C handling.
10205         Check -save-temps to see if temp @FILE should be deleted.
10206         Follow-up to/fix for February 16 patch.
10207
10208         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10209         (type_stack_dup):  Remove no-longer neded error check.
10210
10211 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10212
10213         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10214         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10215         don't surround the element with 'N..E' if the type name is
10216         unqualified.
10217
10218 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10219
10220         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10221         DECL_RTL_SET_P, etc.
10222         (make_method_value): Likewise.
10223         (get_dispatch_table): Likewise.
10224
10225         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10226
10227 2001-03-07  Tom Tromey  <tromey@redhat.com>
10228
10229         * config-lang.in (lang_requires): Define.
10230
10231 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10232
10233         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10234         not flag_fast_math.
10235
10236 2001-03-05  Per Bothner  <per@bothner.com>
10237
10238         Fix a problem where rest_of_decl_compilation applied to
10239         class_dtable_decl causes problems because it was done too early,
10240         before output file was opened.
10241         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10242         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10243         (make_class_data):  Define class_dtable_decl.
10244         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10245
10246 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10247
10248         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10249         uses of 'boolean' with 'bool'.
10250
10251 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10252
10253         * lang-specs.h: Add zero initializer for cpp_spec field to all
10254         array elements.
10255
10256 2001-02-16  Per Bothner  <per@bothner.com>
10257
10258         Handle compiling multiple input files at once, and @FILE syntax.
10259         * gcj.texi:  Updated documentation to match.
10260         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10261         * jcf-parse.c (parse_source_file):  Split into ...
10262         (parse_source_file_1):  New function - and:
10263         (parse_source_file_2):  New function.
10264         (yyparse):  On -ffilelist-file, open and scan named file.
10265         On first pass over files, only do parse_source_file_1.
10266         A new second pass calls parse_source_file_2 for each file to compile.
10267         (init_jcf_parse):  Call init_src_parse.
10268         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10269         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10270         as multiple input file combined in one compilation.
10271         * lang-options.h:  Add -ffilelist-file
10272         * lang.c (flag_filelist_file):  New flag variable.
10273         (lang_f_options):  Handle -ffilelist-file.
10274         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10275         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10276         gclass_list - use global fields of src_parse_roots instead.
10277         * parse.y (src_parse_roots):  New array.
10278         (incomplete_class_list, gclass_list):  New macros.
10279         (push_parser_context, java_pop_parser_context,
10280         java_parser_context_resume):  Don't fiddle with deleted fields.
10281         (various):  Use incomplete_class gclass_list and global macros
10282         instead of parse_ctxt fields - the lists are global.
10283         (init_src_parse):  New function.
10284
10285 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10286
10287         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10288
10289 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10290
10291         * parse.y (check_inner_class_access): Moved declaration of local
10292         `enclosing_decl_type' to the right location.
10293
10294 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10295
10296         * parse.y (parser_check_super_interface): Don't call
10297         check_pkg_class_access for an inner interface.
10298         (parser_check_super): Don't call check_pkg_class_access for inner
10299         class.
10300         (do_resolve_class): Simplify enclosing type loop. Don't call
10301         check_pkg_class_access if CL and DECL are not set.
10302         (find_in_imports_on_demand): Set DECL if class_type needed to be
10303         loaded. Don't call check_pkg_class_access for an inner class.
10304         (check_inner_class_access): Rewritten to implement member access
10305         rules as per spec 6.6.1.
10306         (check_pkg_class_access): Handle the empty package correctly.
10307         (in_same_package): New function. Determine if two classes are in the
10308         same package.
10309
10310 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10311
10312         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10313         method into array types.
10314         * parse.y (patch_method_invocation): Bypass access check on clone call
10315         to array instance.
10316
10317 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10318
10319         * expr.c (build_instanceof): Check for arrays when trying fold to
10320         false.
10321
10322 2001-02-15  Jim Meyering  <meyering@lucent.com>
10323
10324         * Make-lang.in (java.install-common): Depend on `installdirs'.
10325         (java.install-info): Likewise.
10326
10327 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10328
10329         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10330
10331 2001-02-14  Tom Tromey  <tromey@redhat.com>
10332             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10333
10334         Fix for PR java/1261.
10335         * typeck.c (build_java_array_type): Add public `clone' method to
10336         arrays.
10337         * parse.y (resolve_qualified_expression_name): Use current_class
10338         when checking for inaccessibility.
10339         (patch_method_invocation): Fixed error message when accessibility
10340         denied.  Added `from_super' argument.
10341
10342 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10343
10344         * parse.y (resolve_class): Don't build a fake decl. Use the one
10345         already built.
10346         * typeck.c (build_java_array_type): Build and assign decl to array
10347         type.
10348
10349 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10350
10351         * parse.y (not_accessible_p): Changed leading comment. Added extra
10352         `where' argument. Use it to enforce protected access rules.
10353         (resolve_qualified_expression_name): Added extra argument to
10354         not_accessible_p.
10355         (patch_method_invocation): Use argument `primary' to provide
10356         not_accessible_p with an extra argument.
10357         (lookup_method_invoke): Added extra argument to not_accessible_p.
10358         (search_applicable_method_list): Likewise.
10359
10360 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10361
10362         * parse.y (resolve_qualified_expression_name): Try to resolve as
10363         an inner class access only if `decl' is a TYPE_DECL.
10364
10365 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10366
10367         * decl.c (classdollar_identifier_node): Initialize.
10368         * java-tree.h (enum java_tree_index): New entry
10369         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10370         (classdollar_identifier_node): New macro.
10371         (ID_CLASSDOLLAR_P): Likewise.
10372         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10373         (build_dot_class_method_invocation): Likewise.
10374         (find_applicable_accessible_methods_list): `class$' can't be
10375         inherited.
10376
10377 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10378
10379         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10380
10381 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10382
10383         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10384         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10385         gone.
10386
10387 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10388
10389         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10390         outside of the `__U' sequence too.
10391         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10392         sequence too.
10393
10394 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10395
10396         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10397
10398 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10399
10400         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10401         (JVGENMAIN_OBJS): Likewise.
10402         * java-tree.h (append_gpp_mangled_name): New prototype.
10403         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10404         Removed cast calling `gcc_add_root.'
10405         * jvgenmain.c (mangle_obstack): New global, initialized.
10406         (main): Use it.
10407         (do_mangle_class): Constify local `ptr.'
10408         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10409         append_gpp_mangle_name and update `count' if necessary.
10410         Use `mangle_obstack.'
10411         * mangle.c (append_unicode_mangled_name): Removed.
10412         (append_gpp_mangled_name): Likewise.
10413         (unicode_mangling_length): Likewise.
10414         (mangle_member_name): Return type set to `void.'
10415         (mangle_field_decl): Don't append `U' in escaped names.
10416         (mangle_method_decl): Likewise.
10417         (mangle_member_name): Just use `append_gpp_mangled_name.'
10418         * mangle_name.c: New file.
10419
10420 2001-02-07  Per Bothner  <per@bothner.com>
10421
10422         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10423
10424         * check-init.c (check_init):  Don't call done_alternative after
10425         processing loop code, as a LOOP_EXPR never terminates normally.
10426
10427 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10428
10429         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10430
10431 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10432
10433         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10434         DECLs.
10435
10436 2001-02-06  Tom Tromey  <tromey@redhat.com>
10437
10438         * lex.c (java_new_lexer): Longer error message.
10439
10440 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10441             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10442
10443         * typeck.c (build_prim_array_type): Added leading comment.
10444         (build_java_array_type): Moved locals out of
10445         block. Always create the `data' field, fixed alignment to match
10446         C++.
10447
10448 2001-02-04  Tom Tromey  <tromey@redhat.com>
10449
10450         * expr.c (java_lang_expand_expr): Don't bother recomputing
10451         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10452         Fixes PR java/1866.
10453
10454 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10455
10456         * parse.y (process_imports): Save the original name of the import
10457         for better error report.
10458
10459 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10460
10461         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10462         of macros used when compiling jvspec.c.
10463         * jvspec.c (lang_specific_driver): Link with the shared
10464         libgcc by default.
10465
10466 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10467
10468         * check-init.c (check_init): Call internal_error instead of fatal.
10469         * expr.c (java_lang_expand_expr): Likewise.
10470         * jcf-parse.c (get_constant): Likewise.
10471         * mangle.c (java_mangle_decl): Likewise.
10472         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10473         (operator_string): Likewise.
10474         * check-init.c (check_init): Call abort instead of fatal.
10475         * class.c (build_class_ref): Likewise.
10476         * constants.c (write_constant_pool): Likewise.
10477         * decl.c (start_java_method): Likewise.
10478         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10479         (java_stack_dup, encode_newarray_type): Likewise.
10480         (build_java_array_length_access): Likewise.
10481         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10482         (build_java_soft_divmod, build_invokeinterface): Likewise.
10483         * java-tree.h (INNER_CLASS_P): Likewise.
10484         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10485         (give_name_to_class, get_class_constant): Likewise.
10486         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10487         (find_constant_index, generate_bytecode_conditional): Likewise.
10488         (generate_bytecode_insns, perform_relocations): Likewise.
10489         * lex.c (java_unget_unicode, java_lex): Likewise.
10490         * mangle.c (mangle_type, mangle_record_type): Likewise.
10491         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10492         (finish_mangling): Likewise.
10493         * parse.h (MARK_FINAL_PARMS): Likewise.
10494         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10495         (obtain_incomplete_type, java_complete_class): Likewise.
10496         (java_check_regular_methods, java_complete_expand_method): Likewise.
10497         (cut_identifier_in_qualified, check_deprecation): Likewise.
10498         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10499         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10500         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10501         * typeck.c (set_local_type, parse_signature_type): Likewise.
10502         (parse_signature_string, build_java_signature): Likewise;
10503         (set_java_signature): Likewise.
10504         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10505         * class.c (add_method): Call fatal_error instead of fatal.
10506         (build_static_field_ref): Likewise.
10507         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10508         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10509         * lex.c (java_new_new_lexer): Likewise.
10510         * jv-scan.c (main): Likewise.
10511         (fatal_error): Renamed from fatal.
10512         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10513         pfatal_with_name.
10514         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10515         (yyparse): Likewise.
10516         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10517         * lex.c (java_get_line_col): Likewise.
10518         * jcf-parse.c (load_class): Make errors non-fatal.
10519         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10520
10521 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10522
10523         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10524         (error): Remove unused function.
10525         (main): Don't use "__attribute__ alias" on generated class symbol.
10526
10527 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10528
10529         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10530         argument.
10531         * parse.y (finish_method_declaration): Code accounting for WFLed
10532         method DECL_NAMEs deleted.
10533         (check_abstract_method_definitions): Likewise.
10534         (resolve_type_during_patch): Layout resolved type.
10535         * typeck.c (lookup_do): Removed unused local.
10536
10537 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10538
10539         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10540         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10541         integer_negative_one_node.
10542         * expr.c (build_java_binop): Likewise.
10543
10544 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10545
10546         * zextract.c (read_zip_archive): Read file_offset before writing
10547         zipd and consequently clobbering the header contents.
10548
10549 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10550
10551         * Make-lang.in: Remove all dependencies on defaults.h.
10552         * decl.c: Don't include defaults.h.
10553         * expr.c: Likewise.
10554         * parse.y: Likewise.
10555
10556 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10557
10558         * ChangeLog (2001-01-21): Fixed typo.
10559         * class.c (layout_class_method): Code accounting for WFLed
10560         method DECL_NAMEs deleted.
10561         * constant.c (find_methodref_index): Likewise.
10562         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10563         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10564         (struct lang_decl): New field `wfl'.
10565         (java_get_real_method_name): Prototype deleted.
10566         * mangle.c (mangle_method_decl): Code accounting for WFLed
10567         method DECL_NAMEs deleted.
10568         * parse.h (GET_METHOD_NAME): Macro deleted.
10569         * parse.y (reset_method_name): Deleted.
10570         (method_header): Set DECL_FUNCTION_WFL.
10571         (check_abstract_method_header): Code accounting for WFLed method
10572         DECL_NAMEs deleted.
10573         (java_get_real_method_name): Deleted.
10574         (check_method_redefinition): Code accounting for WFLed method
10575         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10576         (java_check_regular_methods): Likewise.
10577         (java_check_abstract_methods): Likewise.
10578         (java_expand_classes): Don't call `reset_method_name.'
10579         (search_applicable_method_list): Use DECL_NAMEs instead of
10580         GET_METHOD_NAME.
10581         * typeck.c (lookup_do): Code accounting for WFLed method
10582         DECL_NAMEs deleted.
10583
10584 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10585
10586         * lex.c (java_read_char): Check for EOF from getc first.
10587
10588 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10589
10590         * class.c (layout_class): Don't lay the superclass out if it's
10591         already being laid out.
10592         * jcf-parse.c (handle_innerclass_attribute): New function.
10593         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10594         handle_innerclasses_attribute.
10595         (jcf_parse): Don't load an innerclasses if it's already being
10596         laid out.
10597         * jcf-write.c (append_innerclass_attribute_entry): Static
10598         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10599         to be zero for anonymous classes.
10600
10601 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10602
10603         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10604         necessary.
10605         * jcf-parse.c (set_source_filename): Use
10606         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10607
10608 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10609
10610         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10611         gets a unique asm name.
10612
10613 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10614
10615         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10616         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10617         if necessary.
10618         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10619         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10620         * parse.y (lookup_package_type_and_set_next): Deleted.
10621         (resolve_package): Removed unnecessary code.
10622         (find_applicable_accessible_methods_list): `finit$' can't be
10623         inherited.
10624         * verify.c (pop_argument_types): Added missing prototype.
10625
10626 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10627
10628         * config-lang.in: Disable java by default.
10629
10630 2001-01-23  Tom Tromey  <tromey@redhat.com>
10631
10632         * gcj.texi (Copying): New node.
10633         Added copyright information.
10634
10635 2001-01-21  Per Bothner  <per@bothner.com>
10636
10637         Various fixes to allow compiling a compressed .jar/.zip archive.
10638         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10639         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10640         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10641         * jcf.h (struct ZipDirectory):  Add forward declaration.
10642         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10643         Remove seen_in_zip and zip_offset fields.
10644         (JCF_SEEN_IN_ZIP):  New macro.
10645         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10646         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10647         (read_zip_member):  New function.
10648         (open_in_zip):  Call read_zip_member.
10649         * jcf-parse.c (find_in_current_zip):  Remove function.
10650         (read_class):  Merge in find_in_current_zip functionality.
10651         Call read_zip_member if needed.
10652         (parse_zip_file_entries):  Use read_zip_member.
10653         (process_zip_dir):  Update for removed and added JCF fields.
10654         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10655
10656 2001-01-21  Per Bothner  <per@bothner.com>
10657
10658         Minor optimization of static ggc roots.
10659         * jcf-parse.c (parse_roots):  New static field.
10660         (current_field, current_method, current_file_list):  Replace by macros
10661         naming fields of parse_roots.
10662         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10663         * class.c (class_roots):  New static field.
10664         (registered_class, fields_ident, info_ident, class_list):
10665         New macros naming fields of parse_roots.
10666         (build_static_field_ref):  Don't register roots here.
10667         (layout_class):  Static field list replaced by macro class_list.
10668         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10669         Initialize fields_ident and info_ident here.
10670
10671 2001-01-21  Per Bothner  <per@bothner.com>
10672
10673         * jcf-parse.c (ggc_mark_jcf):  New function.
10674         (init_jcf_parse):  Register current_jcf as ggc root.
10675
10676 2001-01-21  Per Bothner  <per@bothner.com>
10677
10678         * lang.c (put_decl_node):  Print method's name.
10679
10680 2001-01-21  Per Bothner  <per@bothner.com>
10681
10682         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10683         (verify_jvm_instructions):  Use it, for better error messages on loads.
10684
10685 2001-01-21  Per Bothner  <per@bothner.com>
10686
10687         * verify.c (merge_type_state):  Still may have to merge even if
10688         LABEL_VERIFIED (label).
10689
10690 2001-01-21  Per Bothner  <per@bothner.com>
10691
10692         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10693         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10694
10695 2001-01-19  Per Bothner  <per@bothner.com>
10696
10697         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10698         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10699
10700 2001-01-18  Per Bothner  <per@bothner.com>
10701
10702         * gcj.texi (Input Options): Mention .java files.
10703
10704 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10705
10706         * lang-options.h (-Wunsupported-jdk11): Removed.
10707         * lang.c (flag_not_overriding): Deleted.
10708         (flag_static_local_jdk1_1): Likewise.
10709         (lang_W_options): Removed "unsupported-jdk11" entry.
10710         * parse.y (java_check_methods): Removed dead code.
10711
10712 2001-01-17  Tom Tromey  <tromey@redhat.com>
10713
10714         Changes suggested by Per Bothner:
10715         * gcj.texi (Input Options): Don't mention input files.
10716         (Code Generation): Updated --main information.
10717         (Invoking jcf-dump): Mention that --javap is incomplete.
10718         From Alexandre Petit-Bianco:
10719         (Warnings): Don't mention -Wunsupported-jdk11.
10720         My stuff:
10721         (Compatibility): Mention JDK 1.2-ness of libraries.
10722         (Resources): Mention resources used when writing gcj.
10723
10724 2001-01-17  Tom Tromey  <tromey@redhat.com>
10725
10726         * gcj.texi: New file.
10727         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10728         (java.info): Depend on gcj.info.
10729         (java/gcj.dvi): New target.
10730         (java.dvi): Depend on gcj.dvi.
10731         (java.install-info): Wrote.
10732
10733 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10734
10735         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10736         having called make_decl_rtl.
10737
10738 2001-01-14  Per Bothner  <per@bothner.com>
10739
10740         Various patches to emit better messages on verification errors.
10741         * expr.c (push_type_0):  Return error indication on stack overflow,
10742         instead of callinfg fatal.
10743         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10744         (pop_type_0):  Return detailed error message (in a char** argument).
10745         (pop_type):  If pop_type_0 fails, print error message.
10746         (pop_argument_types):  Moved to verify.c.
10747         * verify.c (pop_argument_types):  Moved from expr.c.
10748         Return a (possible) error message, rather than void.
10749         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10750         (verify_jvm_instruction):  Use new macros, improving error messages.
10751         For case OPCODE_astore use object_ptr_type_node.
10752         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10753         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10754
10755         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10756         constant, return body without wrapper.  (Improves constant folding.)
10757         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10758
10759 2001-01-13  Per Bothner  <per@bothner.com>
10760
10761         * expr.c (expand_java_field_op):  Assigning to a final field outside
10762         an initializer does not violate JVM spec, so should be warning, not
10763         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10764
10765 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10766
10767         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10768         to 2001.
10769
10770 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10771
10772         * parse.y (resolve_expression_name): Permit instance variables from
10773         enclosing context in super constructor call.
10774         (resolve_qualified_expression_name): Permit enclosing class's qualified
10775         "this" in super constructor call.
10776
10777 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10778
10779         * class.c (build_utf8_ref): Remove last argument in call to
10780         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10781         (build_class_ref): Likewise.
10782         (build_static_field_ref): Likewise.
10783         (get_dispatch_table): Likewise.
10784         (layout_class_method): Likewise.
10785         (emit_register_classes): Likewise.
10786         * constants.c (build_constant_data_ref): Likewise.
10787         * decl.c (builtin_function): Likewise.
10788         (create_primitive_vtable): Likewise.
10789         * expr.c (build_known_method_def): Likewise.
10790         (build_jni_stub): Likewise.
10791         (java_lang_expand_expr): Likewise.
10792
10793 2001-01-10  Tom Tromey  <tromey@redhat.com>
10794
10795         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10796
10797 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10798
10799         * java-tree.h (lang_printable_name_wls): New prototype.
10800         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10801         rather than `current_class' to print type name. Don't prepend type
10802         names when printing constructor names.
10803         (lang_printable_name_wls): New function.
10804         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10805         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10806         * parse.y (patch_method_invocation): Message tuned for constructors.
10807         (not_accessible_p): Grant `private' access from within
10808         enclosing contexts.
10809
10810 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10811
10812         All files with updated copyright when applicable.
10813         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10814         * class.c (mangle_class_field): Function removed.
10815         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10816         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10817         (build_class_ref): Call `java_mangle_class_field' instead of
10818         `mangle_class_field.'
10819         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10820         (layout_class): Call `java_mangle_decl' instead of
10821         `mangle_static_field.'
10822         (cxx_keywords): Initialized static array moved to `lex.c.'
10823         (layout_class_method): Changed leading comment. Simplified to
10824         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10825         * decl.c (lang_mark_tree): Mark field `package_list.'
10826         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10827         (struct lang_type): New field `package_list.'
10828         (unicode_mangling_length): Prototype removed.
10829         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10830         emit_unicode_mangled_name): Likewise.
10831         (cxx_keyword_p): New prototype.
10832         (java_mangle_decl, java_mangle_class_field,
10833         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10834         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10835         `build_expr_wfl.'
10836         * jvgenmain.c (main_method_prefix): Global variable removed.
10837         (main_method_suffix): Likewise.
10838         (do_mangle_classname): New function.
10839         (main): Call it. Format changed to accommodate new mangling scheme.
10840         * lex.c: (utf8_cmp): Conditionally prototyped.
10841         (cxx_keywords): Moved from class.c, conditionally defined.
10842         (utf8_cmp, cxx_keyword_p): Likewise.
10843         * mangle.c (obstack.h, ggc.h): Included.
10844         (mangle_field_decl): New function.
10845         (mangle_method_decl, mangle_type, mangle_pointer_type,
10846         mangle_array_type, mangle_record_type,
10847         find_compression_pointer_match, find_compression_array_match,
10848         find_compression_record_match,
10849         find_compression_array_template_match, set_type_package_list,
10850         entry_match_pointer_p, emit_compression_string, init_mangling,
10851         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10852         (mangle_obstack): New global.
10853         (MANGLE_RAW_STRING): New macro.
10854         (unicode_mangling_length): Turned static.
10855         (append_unicode_mangled_name): Renamed from
10856         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10857         replaces `obstack', removed from the parameter list.
10858         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10859         replaces parameter `obstack', removed from the parameter list. Call
10860         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10861         (append_gpp_mangled_classtype): Removed.
10862         (compression_table, compression_next): New static variables.
10863         * parse.y (temporary_obstack): Extern declaration removed.
10864
10865 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10866
10867         * parse.y (patch_binop): Compute missing type in error situations.
10868
10869 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10870
10871         * class.c (make_class_data): Push initial value for "arrayclass".
10872         * decl.c (init_decl_processing): Add new class field "arrayclass".
10873
10874 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10875
10876         From patha@softlab.ericsson.se:
10877         * parse.y (switch_label): Use build, not build1, to construct
10878         DEFAULT_EXPR.
10879
10880 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10881
10882         * lang.c (lang_decode_option): Change -MA to -MP.
10883         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10884         Update to new prototype; do quote targets.
10885         (jcf_dependency_write): Update.
10886
10887 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10888
10889         Shorten primitive array allocation path:
10890         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10891         to create new primitive arrays.
10892         * expr.c (build_newarray): If generating native code, call
10893         soft_newarray_node with a reference to the primitive TYPE identifier
10894         instead of type_value.
10895
10896 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10897
10898         Fix for PRs gcj/312 and gcj/253:
10899         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10900         dest if they arn't already.
10901         * class.c (layout_class): Call maybe_layout_super_class on
10902         superinterfaces also, but only if compiling from bytecode.
10903
10904         Fix for PR gcj/373:
10905         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10906         interface.
10907
10908 2000-12-15  Tom Tromey  <tromey@redhat.com>
10909
10910         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10911         set.
10912
10913 2000-12-14  Andrew Haley  <aph@redhat.com>
10914
10915         * boehm.c (mark_reference_fields): Change test to correctly detect
10916         bitmap overflow.
10917
10918 2000-12-15  Andreas Jaeger  <aj@suse.de>
10919
10920         * config-lang.in (lang_dirs): Added.
10921
10922 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10923
10924         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10925         Credits go to rth for finding it.
10926
10927 2000-12-13  Mike Stump  <mrs@wrs.com>
10928
10929         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10930
10931 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10932
10933         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10934         * lex.c (java_ignorable_control_p): Removed.
10935         (java_letter_or_digit_p): Removed.
10936         (java_start_char_p): New function.
10937         (java_read_char): Return `int', not `unicode_t'.  Changed
10938         callers.
10939         (java_read_unicode): Likewise.
10940         (java_read_unicode_collapsing_terminators): Likewise.
10941         (java_get_unicode): Likewise.
10942         (java_new_lexer): Initialize hit_eof.
10943         (java_parse_end_comment): Take `int' argument.
10944         (java_parse_doc_section): Likewise.
10945         (java_parse_escape_sequence): Don't allow backlash-newline.
10946         Return `int'.
10947         * lex.h (JAVA_DIGIT_P): Removed.
10948         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10949         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10950         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10951         (JAVA_PART_CHAR_P): New macro.
10952         (UEOF): Now -1.
10953         (JAVA_CHAR_ERROR): Now -2.
10954         (java_lexer): New field `hit_eof'.
10955         * chartables.h: New file.
10956         * gen-table.pl: new file.
10957
10958 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10959             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10960
10961         * parse.y (java_complete_lhs): Only allow compound assignment of
10962         reference type if type is String.
10963
10964 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10965
10966         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10967         jcf-path.c: Likewise.
10968
10969 2000-12-09  Anthony Green  <green@redhat.com>
10970
10971         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10972         filestart and filename_length as int values.
10973
10974 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10975
10976         * jcf-io.c (find_class): Correct the logic that tests to see if a
10977         .java file is newer than its .class file. The compiler was
10978         incorrectly printing a warning when file mod times were equal.
10979
10980 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10981
10982         * jvgenmain.c: Use ISPRINT not isascii.
10983
10984 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10985
10986         * parse.y (end_artificial_method_body): Fixed typo.
10987
10988 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10989
10990         * parse.y (patch_method_invocation): Pick the correct enclosing
10991         context when creating inner class instances.
10992         Fixes gcj/332.
10993
10994 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10995
10996         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10997         Update copyright year to 2000.
10998
10999 2000-11-23  Anthony Green  <green@redhat.com>
11000
11001         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11002         Move current_file_list out of yyparse and make it static.
11003
11004         * expr.c: Declare quick_stack and tree_list_free_list as static
11005         (init_expr_processing): Register quick_stack and
11006         tree_list_free_list roots.
11007
11008 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11009
11010         * parse.y (build_outer_field_access): New local `decl_ctx', use
11011         it. Check for field's context and current class immediate outer
11012         context inheritance.
11013         (outer_field_access_p): Consider fields inherited from the last
11014         enclosing context.
11015         (build_access_to_thisn): Stop at the last enclosing context if
11016         necessary.
11017         Fixes gcj/367.
11018
11019 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11020
11021         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11022
11023 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
11024
11025         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11026         scratch buffer.
11027
11028 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11029
11030         * jv-scan.c (help): Document --complexity.
11031         (options): Added --complexity.
11032         (flag_complexity): New global.
11033         (main): Call `report'.
11034         * parse-scan.y (complexity): New global.
11035         (if_then_statement, if_then_else_statement,
11036         if_then_else_statement_nsi, switch_block_statement_group,
11037         while_expression, do_statement, for_begin, continue_statement,
11038         throw_statement, catch_clause, finally, method_invocation,
11039         conditional_and_expression, conditional_or_expression,
11040         conditional_expression): Update complexity.
11041         (reset_report): Reset complexity.
11042         (report): New function.
11043
11044 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11045
11046         * lex.c (yylex): Added STRICT_TK case.
11047         * parse.y (STRICT_TK): Added.
11048         * parse-scan.y (STRICT_TK): Added.
11049         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11050         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
11051         file.
11052         * keyword.h: Rebuilt.
11053         * keyword.gperf (strictfp): Added.
11054
11055 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11056
11057         * lex.c (yylex): Recognize floating point constants with leading
11058         0.
11059
11060 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11061
11062         * java-tree.h (cyclic_inheritance_report): Constify.
11063         * parse.y (cyclic_inheritance_report): Likewise.
11064
11065 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11066
11067         * parse.y (goal): Remove call to ggc_add_string_root.
11068
11069 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11070
11071         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11072         Create string in scratch buffer, then pass to build_string.
11073
11074 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11075
11076         * parse.y (issue_warning_error_from_context): Add
11077         ATTRIBUTE_PRINTF.
11078
11079 2000-11-11  Anthony Green  <green@redhat.com>
11080
11081         * jcf-parse.c (process_zip_dir): Add finput parameter.
11082         (jcf_figure_file_type): Call process_zip_dir with appropriate
11083         argument.
11084
11085 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11086
11087         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11088         * jcf-parse.c (jcf_figure_file_type): Likewise.
11089
11090 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11091
11092         * parse.y (create_new_parser_context): Use memset () instead of
11093         bzero ().
11094
11095 2000-11-08  Tom Tromey  <tromey@cygnus.com>
11096
11097         * gjavah.c (process_file): Only include gcj/cni.h when generating
11098         CNI stubs.
11099
11100 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11101
11102         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11103         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11104         instead of bzero ().
11105
11106 2000-11-05  Tom Tromey  <tromey@cygnus.com>
11107
11108         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11109         * lex.c (IS_ZERO): New define.
11110         (java_perform_atof): Error on floating point underflow.
11111
11112 2000-11-04  Tom Tromey  <tromey@cygnus.com>
11113
11114         * lex.c (java_parse_escape_sequence): Only read two octal
11115         characters if the first one is greater than 3.  Don't allow
11116         "octal" numbers to include the digits 8 or 9.
11117
11118 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11119
11120         * Make-lang.in (java.distdir): Remove.
11121
11122 2000-11-03  Tom Tromey  <tromey@cygnus.com>
11123
11124         * Make-lang.in (java.dvi): New target.
11125         Partial fix for PR other/567.
11126
11127         * lang-options.h: Mention -Wout-of-date.
11128         * jcf-dump.c (flag_newer): New global.
11129         * gjavah.c (flag_newer): New global.
11130         * jcf-io.c (find_class): Only warn when flag_newer set.
11131         * lang.c (flag_newer): New global.
11132         (struct string_option): New declaration.
11133         (lang_W_options): New global.
11134         (process_option_with_no): New function.
11135         (lang_decode_option): Use it.
11136
11137         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11138         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11139         `$'.
11140
11141         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11142         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11143         * lex.c (java_read_unicode): Removed `term_context' argument.
11144         Recognize any number of `u' in `\u'.
11145         (java_read_unicode_collapsing_terminators): New function.
11146         (java_get_unicode): Use it.
11147         (java_lineterminator): Removed.
11148         (yylex): Produce error if character literal is newline or single
11149         quote.  Return if eof found in middle of `//' comment.  EOF in
11150         `//' comment is only an error if pedantic.
11151         (java_ignorable_control_p): New function.
11152         (java_parse_end_comment): Return if eof found in middle of
11153         comment.
11154         Include flags.h.
11155         * jv-scan.c (pedantic): New global.
11156
11157 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11158
11159         * parse.y (outer_field_access_p): Inherited fields aren't
11160         consider outer fields.
11161         (maybe_build_thisn_access_method): Use
11162         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11163         (resolve_expression_name): Trigger an error if a static field
11164         is being accessed as an outer field.
11165
11166 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11167
11168         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11169         Fixes gcj/365.
11170
11171 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11172
11173         * Make-lang.in: Move all build rules here from Makefile.in,
11174         adapt to new context.  Wrap all rules that change the current
11175         directory in parentheses.  Expunge all references to $(P).
11176         When one command depends on another and they're run all at
11177         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11178         all object-file generation rules.  Delete obsolete variables.
11179
11180         * Makefile.in: Delete.
11181         * config-lang.in: Delete outputs= line.
11182
11183 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11184
11185         * parse.y (patch_method_invocation): NULLify this_arg when already
11186         inserted.
11187         (maybe_use_access_method): Handle call to methods unrelated to the
11188         current class. Fixed comment.
11189         Fixes gcj/361.
11190
11191 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11192
11193         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11194         scope.
11195
11196 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11197
11198         * lex.c (java_new_lexer): Initialize new fields.  Work around
11199         broken iconv() implementations.
11200         (java_read_char): Swap bytes if required.  Use fallback decoder if
11201         required.
11202         (byteswap_init, need_byteswap): New globals.
11203         (java_destroy_lexer): Only close iconv handle if it is in use.
11204         * lex.h (java_lexer): New fields read_anything, byte_swap,
11205         use_fallback.
11206         Made out_buffer unsigned.
11207
11208 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11209
11210         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11211         where an enclosing context can be set on the jdep.
11212         (do_resolve_class): Fixed identation.
11213
11214 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11215
11216         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11217
11218         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11219         when requested.
11220
11221         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11222
11223         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11224
11225 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11226
11227         * jcf-write.c (OP1): Update `last_bc'.
11228         (struct jcf_block): Fixed indentation and typo in comments.  New
11229         field `last_bc'.
11230         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11231         follows `monitorenter'.
11232         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11233         `patch_string'.
11234         Fixes gcj/232.
11235
11236 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11237
11238         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11239         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11240         * lang-options.h: Added -MA, -MT, -MF..
11241         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11242         (DEPEND_TARGET_SET): New macro.
11243         (DEPEND_FILE_ALREADY_SET): Likewise.
11244         (init_parse): Handle new flags.
11245         * jcf.h (jcf_dependency_print_dummies): Declare.
11246         * Make-lang.in (s-java): Added mkdeps.o.
11247         * Makefile.in (BACKEND): Added mkdeps.o.
11248         (../gcjh$(exeext)): Added mkdeps.o.
11249         (../jcf-dump$(exeext)): Added mkdeps.o.
11250         * jcf-depend.c: Include mkdeps.h.
11251         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11252         add_entry): Removed.
11253         (jcf_dependency_reset): Rewrote.
11254         (dependencies): New global.
11255         (jcf_dependency_set_target): Rewrote.
11256         (jcf_dependency_add_target): Likewise.
11257         (jcf_dependency_add_file): Likewise.
11258         (munge): Removed.
11259         (print_ents): Removed.
11260         (jcf_dependency_write): Rewrote.
11261         (print_dummies): New global.
11262         (jcf_dependency_print_dummies): New function
11263         (jcf_dependency_write): Call deps_dummy_targets if required.
11264
11265 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11266
11267         * gjavah.c (add_class_decl): Removed unused variables `tname',
11268         `tlen' and `name_index'.
11269         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11270         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11271         in `wfl_operator' with value.
11272         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11273         (jcf_figure_file_type): Fixed identation.
11274         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11275         * parse.y (analyze_clinit_body): New function.
11276         (static_initializer:): Reset `current_static_block'.
11277         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11278         `wfl_operator' with new value.
11279         (lookup_cl): Use EXPR_WFL_FILENAME.
11280         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11281         analyze_clinit_body.
11282         (build_outer_field_access): Access to this$<n> built from
11283         current_class, not its outer context.
11284         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11285         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11286         (patch_method_invocation): Use `is_static_flag' when already
11287         initialized.
11288         (patch_newarray): Removed assignment in ternary operator.
11289
11290 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11291
11292         * except.c (free_eh_ranges): Don't free `whole_range'.
11293
11294 2000-10-15  Anthony Green  <green@redhat.com>
11295
11296         * decl.c (init_decl_processing): Call init_class_processing before
11297         anything else.
11298
11299 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11300
11301         * check-init.c (check_init): Fixed leading comment. Use
11302         LOCAL_FINAL_P.
11303         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11304         (give_name_to_locals): Likewise.
11305         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11306         fields in lang_decl_var.
11307         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11308         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11309         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11310         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11311         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11312         (LOCAL_FINAL): Rewritten.
11313         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11314         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11315         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11316         `init_final' fields.
11317         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11318         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11319         (TYPE_HAS_FINAL_VARIABLE): New macro.
11320         (struct lang_type): Added `afv' field.
11321         * parse.y (check_static_final_variable_assignment_flag): New function.
11322         (reset_static_final_variable_assignment_flag): Likewise.
11323         (check_final_variable_local_assignment_flag): Likewise.
11324         (reset_final_variable_local_assignment_flag): Likewise.
11325         (check_final_variable_indirect_assignment): Likewise.
11326         (check_final_variable_global_assignment_flag): Likewise.
11327         (add_inner_class_fields): Use LOCAL_FINAL_P.
11328         (register_fields): Handle local finals and final variables.
11329         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11330         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11331         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11332         on local finals.
11333         (java_complete_expand_methods): Loop to set
11334         TYPE_HAS_FINAL_VARIABLE. Call
11335         `reset_final_variable_local_assignment_flag' and
11336         `check_final_variable_local_assignment_flag' accordingly before
11337         and after constructor expansion. Call
11338         `reset_static_final_variable_assignment_flag'
11339         before expanding <clinit> and after call
11340         `check_static_final_variable_assignment_flag' if the
11341         current_class isn't an interface. After all methods have been
11342         expanded, call `check_final_variable_global_assignment_flag' and
11343         `check_static_final_variable_assignment_flag' if the current class
11344         is an interface.
11345         (maybe_yank_clinit): Fixed typo in comment.
11346         (build_outer_field_access_methods): Removed old sanity check. Use
11347         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11348         Don't create access methods for finals.
11349         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11350         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11351         existing DECL_INIT has been processed.
11352         (java_complete_lhs): Likewise.
11353         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11354         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11355         logic.
11356         (patch_assignment): Use LOCAL_FINAL_P.
11357         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11358         DECL_INITIAL is nullified.
11359         Fixes gcj/163.
11360
11361 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11362
11363         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11364
11365         * Makefile.in (parse.c, parse-scan.c): Likewise.
11366
11367 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11368
11369         * class.c (temporary_obstack): Remove.
11370         (make_class): Don't mess with obstascks.
11371         (push_class): Likewise.
11372         (set_super_info): Likewise.
11373         (add_method_1): Likewise.
11374         (add_method): Likewise.
11375         (add_field): Likewise.
11376         (build_utf8_ref): Likewise.
11377         (build_class_ref): Likewise.
11378         (build_static_field_ref): Likewise.
11379         (finish_class): Likewise.
11380         (push_super_field): Likewise.
11381         (layout_class): Likewise.
11382         (layout_class_methods): Likewise.
11383         (init_class_processing): Likewise.
11384         * constants.c (get_tag_node): Likewise.
11385         (build_constant_data_ref): Likewise.
11386         * decl.c (ggc_p): Remove.
11387         (copy_lang_decl): Use ggc_alloc.
11388         (complete_start_java_method): Don't mess with obstacks.
11389         (start_java_method): Likewise.
11390         (end_java_method): Likewise.
11391         * except.c (link_handler): Use xmalloc.
11392         (free_eh_ranges): New function.
11393         (method_init_exceptions): Use it.
11394         (add_handler): Use xmalloc.
11395         (expand_start_java_handler): Don't mess with obstacks.
11396         (prepare_eh_table_type): Likewise.
11397         (expand_end_java_handler): Likewise.
11398         * expr.c (push_value): Likewise.
11399         (create_label_decl): Likewise.
11400         (build_jni_stub): Likewise.
11401         (java_lang_expand_expr): Likewise.
11402         (note_instructions): Use xrealloc.
11403         (java_push_constant_from_pool): Don't mess with obstacks.
11404         (process_jvm_instruction): Likewise.
11405         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11406         declaration.
11407         * jcf-parse.c (get_constant): Don't mess with obstacks.
11408         (read_class): Likewise.
11409         (jcf_parse): Likewise.
11410         * lex.c (expression_obstack): Remove.
11411         (java_lex): Don't use obstack_free.
11412         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11413         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11414         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11415         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11416         * parse.y (gaol): Add more GC roots.
11417         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11418         (lookup_field_wrapper): Likewise.
11419         (obtain_incomplete_type): Don't mess with obstacks.
11420         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11421         macros.
11422         (craft_constructor): Don't mess with obstacks.
11423         (safe_layout_class): Likewise.
11424         (java_complete_class): Likewise.
11425         (source_end_java_method): Likewise.
11426         (build_outer_field_access_methods): Likewise.
11427         (build_outer_method_access_method): Likewise.
11428         (maybe_build_thisn_access_method): Likewise.
11429         (build_dot_class_method_invocation): Likewise.
11430         (java_complete_tree): Likewise.
11431         (java_complete_lhs): Likewise.
11432         (do_merge_string_cste): Likewise.
11433         (patch_string_cst): Likewise.
11434         (array_constructor_check_entry): Likewise.
11435         * typeck.c (build_java_array_type): Likewise.
11436         (parse_signature_string): Likewise.
11437         (build_java_signature): Likewise.
11438
11439 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11440
11441         Fix for PR gcj/356:
11442         * gjavah.c (add_class_decl): Don't special-case inner classes.
11443         (add_namelet): Likewise.
11444
11445 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11446
11447         * java-tree.h: Constify current_encoding.
11448         * lang.c: Constify current_encoding.
11449
11450 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11451
11452         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11453         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11454
11455 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11456
11457         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11458         patch. Fixes gcj/340.
11459
11460 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11461
11462         * lex.c (java_new_lexer): Initialize out_first and out_last
11463         fields.
11464         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11465
11466 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11467
11468         * parse.y (pop_current_osb): New function.
11469         (array_type:): Use `dims:', changed actions
11470         accordingly. Suggested by Anthony Green.
11471         (array_creation_expression:): Used pop_current_osb.
11472         (cast_expression:): Likewise.
11473         (search_applicable_method_list): Fixed indentation.
11474
11475 2000-10-08  Anthony Green  <green@redhat.com>
11476
11477         * parse.y (array_type_literal): Remove production.
11478         (type_literals): Refer to array_type, not array_type_literal.
11479
11480 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11481
11482         Patch contributed by Corey Minyard.
11483         * decl.c (check_local_named_variable): New function.
11484         (tree check_local_unnamed_variable): Likewise.
11485         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11486
11487 2000-10-07  Anthony Green  <green@redhat.com>
11488
11489         * class.c (layout_class): Handle case where superclass can't be
11490         layed out yet.
11491
11492 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11493
11494         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11495         gperf.
11496
11497 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11498
11499         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11500         * jvgenmain.c (class_mangling_prefix): Removed.
11501         (class_mangling_suffix): New global.
11502         (main): Use it.
11503         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11504         `$'.
11505         (print_method_info): Handle overrides for static and final
11506         methods.
11507         (process_file): Generate declaration for class object field.
11508         * class.c (cxx_keywords): New array.
11509         (utf8_cmp): New function.
11510         (cxx_keyword_p): New function.
11511         (layout_class_method): Mangle C++ keywords by appending `$'.
11512         (mangle_field): New function.
11513         (mangle_class_field): Use mangle_field.  Mangle class name as
11514         `class$'.
11515         (mangle_static_field): Use mangle_field.
11516
11517 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11518
11519         * decl.c (find_local_variable): Removed uncessary type check and
11520         fixed range check typo. From Corey Minyard.
11521
11522 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11523
11524         * decl.c (give_name_to_locals): New local `code_offset'. Call
11525         `maybe_adjust_start_pc'.
11526         * expr.c (note_instructions): New function.
11527         (expand_byte_code): Don't collect insn starts here.
11528         (peek_opcode_at_pc): New function.
11529         (maybe_adjust_start_pc): Likewise.
11530         * java-tree.h (maybe_adjust_start_pc): Declare.
11531         (note_instructions): Likewise.
11532         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11533
11534 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11535
11536         * parse.y (field_access:): Fixed indentation.
11537         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11538
11539 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11540
11541         Fix for PR gcj/307:
11542         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11543         JPRIMITIVE_TYPE_P, for arithmetic operators.
11544         (patch_method_invocation): Indentation fix.
11545         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11546         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11547         (do_unary_numeric_promotion): Cleaned up code.
11548         (valid_cast_to_p): Handle boolean correctly.
11549
11550 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11551
11552         * lex.c (java_read_unicode): Reset bs_count when finished with
11553         `\u' sequence.
11554
11555 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11556
11557         Convert to GC.
11558         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11559         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11560         (typeck.o): Depend on ggc.h.
11561         * class.c (add_method_1): Use GC functions for allocation.
11562         (init_class_processing): Register roots.
11563         * decl.c (ggc_p): Set to 1.
11564         (pending_local_decls): Make it static.
11565         (push_jvm_slot): Use GC functions for allocation.
11566         (init_decl_processing): Register roots.
11567         (give_name_to_locals): Use GC functions for allocation.
11568         (lang_mark_tree): New function.
11569         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11570         functions for allocation.
11571         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11572         * lex.c (java_lex): Use build_string, rather than replicating it
11573         inline.
11574         * parse.y (goal): Add more roots.
11575         (mark_parser_ctxt): New function.
11576         * typeck.c: Include ggc.h.
11577
11578 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11579
11580         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11581         contains something else than MODIFY_EXPR.
11582
11583 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11584
11585         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11586         * Makefile.in (parse.o): Depend on ggc.h.
11587         (class.o): Likewise.
11588         (constants.o): Likewise.
11589         (decl.o): Likewise.
11590         (expr.o): Likewise.
11591         (jcf-parse.o): Likewise.
11592         (jcf-write.o): Likewise.
11593         (mangle.o): Likewise.
11594         * class.c: Include ggc.h.
11595         (build_static_field_ref): Register GC roots.
11596         (layout_class): Likewise.
11597         (init_class_processing): Likewise.
11598         * constants.c: Include ggc.h.
11599         (current_constant_pool_data_ref): Remove.
11600         (tag_nodes): Move it to ...
11601         (get_tag_node): ... here.  Register GC roots.
11602         * decl.c: Include ggc.h.  Remove many global tree definitions.
11603         (throw_node): Define.
11604         (java_global_trees): Likewise.
11605         (predef_filenames): Make the size a constant.
11606         (init_decl_processing): Adjust accordingly.
11607         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11608         * expr.c: Include ggc.h.
11609         (init_expr_processing): Register GC roots.
11610         (build_invokeinterface): Likewise.
11611         * java-tree.h: Replace extern tree declarations with macros.
11612         (java_global_trees): New variable.
11613         (java_tree_index): New enumeration.
11614         (init_jcf_parse): Declare.
11615         * jcf-parse.c: Include ggc.h.
11616         (current_class): Remove declaration.
11617         (main_class): Likewise.
11618         (all_class_list): Likewise.
11619         (predefined_filename_p): Adjust for constant size of
11620         predef_filenames.
11621         (init_jcf_parse): New function.
11622         * jcf-write.c: Include ggc.h.
11623         (generate_classfile): Register GC roots.
11624         (append_synthetic_attribute): Likewise.
11625         (append_innerclass_attribute_entry): Likewise.
11626         * lang.c: Include ggc.h.
11627         (lang_print_error): Register GC roots.
11628         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11629         with macros.
11630         * parse.y: Include ggc.h.
11631         (wfl_operator): Remove.
11632         (goal): Register GC roots.
11633         (java_pop_parser_context): Adjust for new field names.
11634         (java_parser_context_save_global): Likewse.
11635         (java_parser_context_restore_global): Likewise.
11636         (java_parser_context_suspend): Likewise.
11637         (java_parser_context_resume): Likewise.
11638         (verify_constructor_circularity): Register GC roots.
11639         (lookup_cl): Likewise.
11640         (java_reorder_fields): Likewise.
11641         (build_current_this): Likewise.
11642         (class_in_current_package): Likewise.
11643         (argument_types_convertible): Likewise.
11644         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11645
11646 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11647
11648         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11649
11650 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11651
11652         * jcf-parse.c: Include <locale.h>.
11653         * jv-scan.c: Include <locale.h>.
11654
11655 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11656
11657         * expr.c (pop_type_0): Return `Object' if trying to merge two
11658         interface types.
11659         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11660         interface types; `Object' is always a valid supertype.
11661
11662 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11663
11664         Fix for PR gcj/33:
11665         * jv-scan.c (help): Document --encoding.
11666         (options): Added `encoding' entry.
11667         (OPT_ENCODING): New define.
11668         (main): Handle --encoding.
11669         Include <langinfo.h> if nl_langinfo exists.
11670         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11671         --encoding.
11672         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11673         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11674         argument.  Use nl_langinfo to determine default encoding.
11675         * java-tree.h (current_encoding): Declare.
11676         * parse.y (java_parser_context_restore_global): Don't restore
11677         `finput'.
11678         (java_parser_context_save_global): Don't set `finput' field.
11679         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11680         if required.
11681         * lang.c (current_encoding): New global.
11682         (lang_decode_option): Recognize `-fencoding='.
11683         (finish_parse): Don't close finput.
11684         * parse.h (struct parser_ctxt): Removed `finput' and
11685         `unget_utf8_value' fields.  Added `lexer' field.
11686         (java_init_lex): Fixed declaration.
11687         * lex.c (java_new_lexer): New function.
11688         (java_destroy_lexer): Likewise.
11689         (java_read_char): Added `lex' argument.  Handle iconv case.
11690         (java_read_unicode): Added `lex' argument.  Count backslashes in
11691         lexer structure.
11692         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11693         `lexer' field in ctxp.
11694         (BAD_UTF8_VALUE): Removed.
11695         (java_lex): Handle seeing UEOF in the middle of a string literal.
11696         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11697         (java_lexer): New structure.
11698         (UNGETC): Removed.
11699         (GETC): Removed.
11700         (DEFAULT_ENCODING): New define.
11701         (java_destroy_lexer): Declare.
11702
11703 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11704
11705         Fix for PR gcj/343:
11706         * lex.c (java_init_lex): Initialize java_io_serializable.
11707         * parse.y (java_io_serializable): New global.
11708         (valid_ref_assignconv_cast_p): An array can be cast to
11709         serializable.
11710
11711 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11712
11713         * decl.c, expr.c: Include defaults.h if not already included.
11714         Don't define the *_TYPE_SIZE macros.
11715
11716 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11717
11718         * typeck.c (build_java_array_type): Correct first parameter
11719         in ADJUST_FIELD_ALIGN invocation.
11720
11721 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11722
11723         * lang-specs.h: Also recognize `-femit-class-files'.
11724
11725 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11726
11727         * verify.c (merge_types): Load the types to merge if necessary.
11728
11729 2000-09-02  Anthony Green  <green@redhat.com>
11730
11731         * jcf-io.c: Include zlib.h.
11732         (open_in_zip): Read compressed class file archives.
11733         * zipfile.h (ZipDirectory): Add uncompressed_size and
11734         compression_method fields.
11735         * zextract.c (read_zip_archive): Collect file compression info.
11736
11737 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11738
11739         * parse.y (do_resolve_class): Also explore superclasses of
11740         intermediate enclosing contexts when searching for inner classes.
11741
11742 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11743
11744         * parse.y (variable_declarator_id:): Better error message.
11745         (expression_statement:): Use YYNOT_TWICE.
11746         (cast_expression:): Likewise.
11747         (assignment:): Likewise.
11748
11749 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11750
11751         * parse.y (do_merge_string_cste): New locals. Create new
11752         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11753
11754 2000-08-07  Hans Boehm  <boehm@acm.org>
11755
11756         * boehm.c (mark_reference_fields): Set marking bits for all words in
11757         a multiple-word record.
11758         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11759         java.lang.Class.
11760
11761 2000-08-31  Mike Stump  <mrs@wrs.com>
11762
11763         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11764         jcf-dump$(exeext)): Make parallel safe.
11765
11766 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11767
11768         * jcf-parse.c (set_source_filename): Constify a char *.
11769         * jcf-write.c (append_innerclasses_attribute,
11770         make_class_file_name): Constify a char *.  Don't recycle a
11771         variable for an unrelated purpose.
11772         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11773         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11774
11775 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11776
11777         * expr.c (can_widen_reference_to): Fixed indentation.
11778         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11779         * parse.y: `finit$' replaces `$finit$' in comments.
11780         (try_builtin_assignconv): Fixed leading comment.
11781
11782 2000-08-25  Greg McGary  <greg@mcgary.org>
11783
11784         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11785
11786 2000-08-24  Greg McGary  <greg@mcgary.org>
11787
11788         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11789         * parse.y (BINOP_LOOKUP): Likewise.
11790
11791 2000-08-22  Andrew Haley  <aph@cygnus.com>
11792
11793         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11794         sign extending. Fixes gcj/321.
11795         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11796         combining to make a jlong. Fixes gcj/321.
11797
11798 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11799
11800         * lang-specs.h: Do not process -o or run the assembler if
11801         -fsyntax-only.
11802
11803 2000-08-16  Andrew Haley  <aph@cygnus.com>
11804
11805         * typeck.c (build_java_array_type): Rewrite code to do array
11806         alignment.  Take into account back-end macros when aligning array
11807         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11808         user to set alignment. Fixes gcj/252 and 160.
11809
11810 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11811
11812         * parse.y (check_abstract_method_definitions): Now return `int'.
11813         Check implemented interfaces.  Fixes PR gcj/305.
11814
11815         * parse.y (patch_switch_statement): Disallow `long' in switch
11816         expressions.  Fixes PR gcj/310.
11817
11818 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11819
11820         * decl.c (finit_leg_identifier_node): New global.
11821         (init_decl_processing): Use `finit$' to initialize
11822         finit_identifier_node. Use `$finit$' to initialize
11823         finit_leg_identifier_node.
11824         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11825         * java-tree.h (finit_identifier_node): Changed attached comment.
11826         (finit_leg_identifier_node): New declaration.
11827         (ID_FINIT_P): Take finit_identifier_node and
11828         finit_leg_identifier_node into account. This is a backward
11829         compatibility hack.
11830
11831 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11832
11833         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11834         Jan 6 2000 patch.
11835         (generate_bytecode_insns): Check `nargs' before emitting it.
11836         * verify.c (merge_type_state): Fixed typo.
11837         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11838         generate_bytecode_{conditional,insns}.
11839
11840 2000-08-13  Anthony Green  <green@redhat.com>
11841
11842         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11843         for -pg builds).
11844
11845 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11846
11847         * class.c (maybe_layout_super_class): Fixed indentation.
11848         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11849         (java_check_methods): New function declaration.
11850         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11851         instead of `str_ptr'.
11852         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11853         of a `invokeinterface' at the right time.
11854         * parse.h (WFL_STRIP_BRACKET): New macro.
11855         (SET_TYPE_FOR_RESOLUTION): Use it.
11856         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11857         (check_class_interface_creation): Don't check for cross package
11858         innerclass name clashes.
11859         (method_header): Behave properly if MDECL is `error_mark_node'.
11860         (method_declarator): Return `error_mark_node' if bogus current
11861         class.
11862         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11863         (resolve_and_layout): New local `decl_type', set and used. Call
11864         java_check_methods.
11865         (java_check_methods): New method.
11866         (java_layout_classes): Use it.
11867         (resolve_qualified_expression_name): No EH check necessary in
11868         access$<n>.
11869         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11870         `case' statement.
11871         (patch_assignment): Set DECL_INITIAL on integral final local.
11872
11873 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11874
11875         * java-tree.h (flag_extraneous_semicolon): New extern.
11876         * lang-options.h: (-Wextraneous-semicolon): New option.
11877         * lang.c (flag_redundant): Fixed typo in leading comment.
11878         (flag_extraneous_semicolon): New global.
11879         (lang_decode_option): Set `flag_extraneous_semicolon' when
11880         -Wall. Decode `-Wextraneous-semicolon'.
11881         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11882         `empty_statement' rule.
11883         (class_body_declaration): Likewise.
11884         (method_body:): Accept `;' as a method body.
11885         (static_initializer:): Removed `SC_TK' hack.
11886         (constructor_block_end:): Likewise.
11887         (empty_statement:): Report deprecated empty declaration. Fixes
11888         gcj/295
11889
11890 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11891
11892         * parse.y (build_dot_class_method_invocation): Changed parameter
11893         name to `type'. Build signature from `type' and convert it to a
11894         STRING_CST if it's an array.
11895         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11896         to use `ref_type' directly.
11897
11898 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11899
11900         * lang-options.h: Added a comma after the last element to avoid
11901         syntax errors when other languages define additional options.
11902
11903 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11904
11905         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11906         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11907         (jc1): Link with $(BACKEND).
11908         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11909
11910 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11911
11912         * jvspec.c: Adjust type of second argument to
11913         lang_specific_driver, and update code as necessary.
11914
11915         * class.c (build_dtable_decl): Initialize dummy.
11916
11917 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11918
11919         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11920         method bodies not to rule out discarding `<clinit>'; don't use
11921         <clinit> to initialize static fields with constant initializers.
11922
11923 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11924
11925         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11926         synthetic methods.
11927         (method_synthetic): New global.
11928         (HANDLE_METHOD): Recognize synthetic method and tell
11929         `print_method_info' about it.
11930         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11931         processing a synthetic method.
11932         * jcf-reader.c (skip_attribute): New function.
11933         ( skip_attribute): Likewise.
11934
11935 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11936
11937         * parse.y (build_outer_field_access): Fixed comments.
11938         (fix_constructors): Emit the initialization of this$<n> before
11939         calling $finit$.
11940         (resolve_qualified_expression_name): Build an access to `decl' if
11941         necessary.
11942
11943 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11944
11945         * parse-scan.y (curent_class): Non longer const.
11946         (inner_qualifier, inner_qualifier_length): Deleted.
11947         (current_class_length): New global.
11948         (bracket_count): Fixed typo in leading comment.
11949         (anonymous_count): New global.
11950         (class_instance_creation_expression:): Handle anonymous classes.
11951         (anonymous_class_creation:): New rule.
11952         (push_class_context): Rewritten.
11953         (pop_class_context): Likewise.
11954         (INNER_QUALIFIER): Macro deleted.
11955         (report_class_declaration): call `push_class_context' when
11956         entering the function. `fprintf' format modified not to use
11957         INNER_QUALIFIER.
11958         (report_class_declaration): Assign `package_name' and
11959         `current_class' to NULL separately.
11960
11961 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11962
11963         * expr.c (build_invokeinterface): Call layout_class_methods on
11964         target interface.
11965
11966 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11967             Anthony Green  <green@cygnus.com>
11968             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11969
11970         * class.c (make_class_data): Create vtable for abstract classes.
11971         (get_dispatch_table): Changed to cope with abstract classes.
11972
11973 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11974
11975         * parse.y (patch_method_invocation): Don't reverse the argument
11976         list when dealing with anonymous class constructors. Fixed typo in
11977         comment.
11978
11979 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11980
11981         * parse.y (build_alias_initializer_parameter_list): Reverse
11982         crafted list when building aliases for anonymous class
11983         constructors.
11984
11985 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11986
11987         * parse.y (jdep_resolve_class): Don't bother checking potential
11988         innerclass access if `decl' is NULL.
11989         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11990         WFL.
11991
11992 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11993
11994         * parse.c: Remove (again.)
11995
11996 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11997
11998         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11999         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12000         outside the `if' statement, alias to innerclass removed, `decl'
12001         used to mark the class complete.
12002
12003 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12004
12005         * parse.y (simple_name:): Fixed typo in error message.
12006
12007 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12008
12009         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12010         or its first operand can be error marks.
12011
12012 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12013
12014         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12015         * parse.y (method_header): Likewise.
12016
12017 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12018
12019         * parse.y (process_imports): Consider that one might be trying to
12020         import an innerclass. Fixes gcj/254
12021
12022 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12023
12024         * parse.y (find_as_inner_class): Handle the case where the
12025         enclosing context of an innerclass has been loaded as bytecode.
12026
12027 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12028
12029         * parse.y (simple_name:): Reject `$' in type names.
12030         (resolve_type_during_patch): Use `type' as a second
12031         argument to resolve_no_layout. Fixes gcj/257.
12032
12033 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
12034
12035         * parse.y (find_most_specific_methods_list): Select the only
12036         non-abstract method even if max has been set.
12037         Fixes gcj/285, gcj/298.
12038
12039 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
12040
12041         * lang-specs.h: Added %(jc1) to java compiler options.
12042
12043 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12044
12045         * .cvsignore: New file.
12046
12047 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12048
12049         * parse.y (not_accessible_p): Access granted to innerclasses
12050         (indirectly) extending the reference type. Fixes gcj/249.
12051
12052 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12053
12054         * parse.y (patch_method_invocation): Fixed comment.
12055         (maybe_use_access_method): Build this$<n>s to the context of the
12056         target method, or a type that extends it. Fixes gcj/242.
12057
12058 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12059
12060         * parse.c: Remove.
12061
12062 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12063
12064         * parse.y (fold_constant_for_init): Avoid bullish conversion.
12065
12066 2000-07-13  Tom Tromey  <tromey@cygnus.com>
12067
12068         * lang-specs.h: Added %{I*}.
12069
12070 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12071
12072         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12073
12074 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12075
12076         * parse-scan.c: Remove.
12077
12078 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12079
12080         * class.c (set_super_info): Handled protected inner classes.
12081         (common_enclosing_context_p): Bail early if arguments aren't both
12082         inner classes.
12083         (get_access_flags_from_decl): Handle private and protected inner
12084         classes.
12085         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12086         (CLASS_PROTECTED): Likewise.
12087         (struct lang_type): New bitfield `poic'.
12088         * parse.y (jdep_resolve_class): Call check_inner_class_access on
12089         inner classes only.
12090         (check_inner_class_access): Renamed arguments, added
12091         comments. Handles protected inner classes (fixes gcj/225)
12092         (not_accessible_p): Fixed comments. Avoid handling inner classes.
12093
12094 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12095
12096         * parse.y (resolve_qualified_expression_name): Verify qualified
12097         access to `this'. Fixes gcj/239.
12098
12099 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12100
12101         * jcf-write.c (generate_classfile): Don't install ConstantValue
12102         for null pointers.
12103
12104 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12105
12106         * parse.y (resolve_qualified_expression_name): Handle inner class
12107         access. Fixes gcj/256.
12108
12109 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12110
12111         * jcf-write.c (generate_classfile): Properly install the
12112         ConstantValue attribute and the initial value constant pool index
12113         on string constants.
12114         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12115         class files.
12116
12117 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12118
12119         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12120         construct.
12121         * parse.y (find_as_inner_class): Fixed typo.
12122         (do_resolve_class): Explore enclosing contexts when searching for
12123         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12124         (check_inner_class_access): Check `decl' which can be null in case
12125         of previous errors.
12126
12127 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12128
12129         * java-tree.h (java_debug_context): Declared `extern'.
12130         (safe_layout_class): Likewise.
12131         * parse.y (resolve_field_access): Field must be `static' in order
12132         to be replaced by its initial value. Added comments.
12133         (find_applicable_accessible_methods_list): Fixed typo.
12134         (find_most_specific_methods_list): Methods found in innerclasses
12135         take over methods founds in the enclosing contexts.
12136         (java_complete_tree): Loosen restrictions on the type of DECLs
12137         that can be replaced by their initialization values.
12138         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12139
12140 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12141
12142         * Make-lang.in (PARSE_DIR): New macro.
12143         (PARSE_RELDIR): Likewise.
12144         (PARSE_C): Likewise.
12145         (PARSE_SCAN_C): Likewise.
12146         ($(PARSE_C)): New target.
12147         ($(PARSE_SCAN_C)): Likewise.
12148         (SET_BISON): New macro.
12149         (BISONFLAGS): Likewise.
12150         (JAVABISONFLAGS): Likewise.
12151
12152 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12153
12154         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12155         argument on the first pass for CNI as well as JNI.
12156         (print_method_info): Set up method name on the first pass only.
12157
12158 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12159
12160         * parse.y (parser_qualified_classname): Removed parameter
12161         `is_static'.
12162         (create_interface): Removed first passed parameter to
12163         parser_qualified_classname.
12164         (create_class): Likewise. Don't install alias on static
12165         innerclasses. Fixes gcj/275.
12166
12167 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12168
12169         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12170         debugable statement with empty_stmt_node. Fixes gcj/272
12171
12172 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12173
12174         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12175         gcj/271.
12176
12177 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12178
12179         * jcf-write.c (push_long_const): Appropriately cast short negative
12180         constant to jword.
12181
12182 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12183
12184         * parse.y (verify_constructor_super): Use loop variable
12185         `m_arg_type' initialized with `mdecl_arg_type'.
12186
12187 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12188
12189         * parse.y (resolve_field_access): Handle case where `type_found'
12190         is NULL.
12191
12192 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12193
12194         * expr.c (lookup_field): The same field can be found through two
12195         different interface. Don't declare it ambiguous in that case.
12196
12197 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12198
12199         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12200         follows \r, then unget it at a lower level.
12201
12202 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12203
12204         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12205         java_complete_tree.
12206
12207 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12208
12209         * parse.y (for_statement): Wrap expression in a WFL if it is a
12210         constant.  For PR gcj/268.
12211
12212 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12213
12214         * parse.y (do_resolve_class): Minor optimiztion in the package
12215         list search. Removed unnecessary test and return statement.
12216         (valid_ref_assignconv_cast_p): Order of arguments to
12217         enclosing_context_p fixed.
12218
12219 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12220
12221         * expr.c (lookup_field): Print error and return error_mark_node if
12222         field reference is ambiguous.
12223
12224         * parse.y (check_abstract_method_definitions): Also check if
12225         `other_method' is abstract.
12226
12227 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12228
12229         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12230         classes.
12231         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12232         (struct lang_type): New field `pic'.
12233         (CLASS_PRIVATE): New macro.
12234         * parse.y (check_inner_class_access): New function.
12235         (jdep_resolve_class): Call it.
12236
12237 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12238
12239         * parse.y (patch_incomplete_class_ref): Initialize the returned
12240         class.  For PR gcj/260.
12241
12242 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12243
12244         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12245
12246 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12247
12248         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12249         Java specific checks.
12250         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12251         screened by DECL_P.
12252         * java-tree.def (CASE_EXPR): Marked 'e'.
12253         (DEFAULT_EXPR): Likewise.
12254         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12255         screened by DECL_P.
12256         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12257         Java specific checks.
12258         (generate_bytecode_insns): Test try_block for BLOCK before using
12259         BLOCK_EXPR_BODY.
12260         * parse.y (build_wfl_wrap): Added `location' argument. Set
12261         EXPR_WFL_LINECOL accordingly.
12262         (dim_expr:): Wrap constants with WFLs.
12263         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12264         (resolve_package): Check for `stmt' not being a BLOCK before
12265         building a debuggable statement with it.
12266         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12267         invocation.
12268         (resolve_field_access): Make sure `decl' is a DECL before treating
12269         it as such.
12270         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12271         IDENTIFIER_NODE before treating it as such.
12272         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12273         treating it as such.
12274         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12275         to be applied only on non array types.
12276
12277 2000-06-16  Per Bothner  <per@bothner.com>
12278
12279         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12280         define in terms of DECL_RESULT, as that fails when --enable-checking.
12281
12282 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12283
12284         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12285         types the same in comparison.
12286         (CHECK_OP): Add static prototype.
12287
12288 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12289
12290         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12291         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12292         * parse.c: Rebuilt.
12293
12294 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12295
12296         * decl.c (create_primitive_vtable): Prototype.
12297
12298         * jcf-write.c (generate_bytecode_insns): Initialize variable
12299         `saved_context'.
12300
12301         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12302
12303 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12304
12305         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12306         to track searched classes, and do not search the same class more than
12307         once. Call find_applicable_accessible_methods_list on immediate
12308         superclass, instead of search_applicable_method_list on all ancestors.
12309         Fix for PR gcj/238.
12310
12311 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12312
12313         * parse.y (register_fields): Permit static fields in inner classes
12314         if they are final. Fix for PR gcj/255.
12315
12316 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12317
12318         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12319         * parse.y (find_in_imports): Returned type changed to void,
12320         leading comment fixed.
12321         (register_package): New function.
12322         (qualify_and_find): Likewise.
12323         (package_declaration:): Use `register_package'.
12324         (single_type_import_declaration:): Removed local variable
12325         `node'. Added missing `;' for consistency.
12326         (type_import_on_demand_declaration:): Use `chainon' to link new
12327         entries.
12328         (lookup_field_wrapper): Lookup local variables defined in outer
12329         contexts first.
12330         (java_complete_class): Don't reverse the list of imported on demand.
12331         (do_resolve_class): Reorganized. Removed local variable
12332         `original_name'. Call `qualify_and_find' with the current package
12333         name, invoke `find_in_imports_on_demand' right after. Call
12334         `qualify_and_find' with the packages we've seen so far. Fixed
12335         operations numbering in comments.
12336         (java_expand_class): Don't reverse `package_list'.
12337         (find_most_specific_methods_list): New local variables `abstract'
12338         and `candidates'. Use them to pick the right method.
12339
12340 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12341
12342         * parse.y (check_modifiers_consistency): Don't subtract out
12343         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12344
12345 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12346
12347         * Makefile.in (INTLLIBS): New.
12348         (LIBS): Add above.
12349         (DEPLIBS): Ditto.
12350
12351 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12352
12353         * class.c (get_dispatch_table): Build the vtable dummy entry list
12354         element with a null purpose. Fixed leading comment.
12355         (build_dtable_decl): Build an accurate dtable type when appropriate
12356         and use it.
12357
12358 2000-06-02  Richard Henderson  <rth@cygnus.com>
12359
12360         * lang.c (lang_get_alias_set): New.
12361
12362 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12363
12364         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12365         before using it as the accessed field.
12366
12367 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12368
12369         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12370         char_array_vtable, short_array_vtable, int_array_vtable,
12371         long_array_vtable, float_array_vtable, double_array_vtable):
12372         Declare.
12373         * expr.c (get_primitive_array_vtable): New function.
12374         (create_primitive_vtable): New function.
12375         (java_lang_expand_expr): Enable code to statically generate
12376         arrays.
12377         * decl.c (init_decl_processing): Create primitive vtables.
12378         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12379         short_array_vtable, int_array_vtable, long_array_vtable,
12380         float_array_vtable, double_array_vtable): Define.
12381
12382 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12383
12384         * java/parse.y (find_applicable_accessible_methods_list):
12385         Don't add an uninitialized value to the list.
12386
12387 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12388
12389         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12390         when trying to see if field's class should be initialized.  Always
12391         initialize field's declaring class, not qualified class.
12392         For PR gcj/162.
12393
12394         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12395         `wfl_operator', to maybe_build_primttype_type_ref.
12396         Fixes PR gcj/235.
12397
12398 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12399
12400         * parse.y (patch_method_invocation): Don't try to lookup methods
12401         in primitive types.
12402
12403 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12404
12405         * parse.y (resolve_field_access): Call the appropriate <clinit>
12406         before accessing the length of a static array. Craft a decl for
12407         the field while its time. Fixes PR gcj/129.
12408
12409 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12410
12411         * parse.y (resolve_package): Correctly set `*next' (was off by
12412         one.)
12413         (resolve_qualified_expression_name): Fixed comment.
12414
12415 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12416
12417         * jcf-parse.c (jcf_parse_source): Reset current_class and
12418         current_function_decl to NULL before parsing a new file.
12419
12420 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12421
12422         * parse.y (block_end:): If the collected block doesn't feature a
12423         statement, insert an empty statement.
12424
12425 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12426
12427         * parse.y (maybe_yank_clinit): New function.
12428         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12429         end of the list of methods belonging to a class.
12430         (java_complete_expand_method): Check whether <clinit> is really
12431         necessary and expand it accordingly.
12432
12433 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12434
12435         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12436         processed by the method's switch statement.
12437
12438 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12439
12440         * java-tree.h: Added init state enum.
12441         * decl.c (emit_init_test_initialization): Initialize class
12442         initialization check variable by looking at class' state.
12443
12444 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12445
12446         * java-tree.h (build_instanceof): Declare.
12447         (build_get_class): Declare.
12448         * parse.y (patch_binop): Use build_instanceof.
12449         * expr.c (build_instanceof): New function.  If class is final,
12450         don't make a function call.
12451         (expand_java_INSTANCEOF): Use it.
12452         (build_get_class): New function.
12453
12454 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12455
12456         * jcf-write.c (generate_classfile): Scan the source_file for
12457         slashes with the right pointer variable.
12458
12459 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12460
12461         * lang.c (lang_decode_option): Update -Wunused flags by calling
12462         set_Wunused.
12463         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12464
12465 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12466
12467         * check_init.c (check_init): Constify local char *.
12468         * class.c (push_class): Constify local char *.
12469         * java_tree.h: Update prototypes.
12470         * jcf-io.c (open_class): Constify filename parameter and
12471         return value.
12472         (find_class): Remove redundant string copy.  Cast return from
12473         open_class.
12474         * jcf-parse.c (read_class, parse_class_file, yyparse):
12475         Constify local char *.
12476         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12477         Constify local char *.
12478         * jcf.h (JCF): Constify filename and classname.
12479         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12480         * lang.c (init_parse): Constify parameter and return value.
12481         * lex.c (java_get_line_col): Constify filename parameter.
12482         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12483         * parse.y (java_parser_context_suspend,
12484         issue_warning_error_from_context, safe_layout_class): Constify
12485         local char *.
12486         * parse.c: Regenerate.
12487
12488 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12489
12490         * expr.c (build_jni_stub): Cache the result of
12491         _Jv_LookupJNIMethod.
12492
12493 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12494
12495         * decl.c (predef_filenames_size): Now 7.
12496         (predef_filenames): New seventh entry.
12497
12498 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12499
12500         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12501         Keep track of when we've seen a reference field after a
12502         non-reference field.
12503         (get_boehm_type_descriptor): Handle case where we see
12504         non-reference fields but no trailing reference field.
12505         * decl.c (rawdata_ptr_type_node): Define.
12506         (init_decl_processing): Initialize rawdata_ptr_type_node.
12507         * java-tree.h (rawdata_ptr_type_node): Declare.
12508
12509 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12510
12511         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12512         specifiers in calls to fprintf.
12513
12514 2000-05-03  Andrew Haley  <aph@cygnus.com>
12515
12516         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12517
12518         * javaop.h (WORD_TO_INT): New function.
12519         (IMMEDIATE_s4): Use WORD_TO_INT.
12520         * jcf.h (JPOOL_INT): Ditto.
12521
12522         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12523         separator.
12524
12525 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12526
12527         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12528         on native function.
12529         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12530         JNI methods.
12531         * expr.c (build_jni_stub): New function.
12532         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12533         * parse.c: Rebuilt.
12534         * parse.y (java_complete_expand_methods): Expand a native method
12535         and call build_jni_stub if -fjni given.
12536         * lang-options.h: Document -fjni.
12537         * lang.c (flag_jni): New global.
12538         (lang_f_options): Added `jni' entry.
12539         * java-tree.h (soft_lookupjnimethod_node,
12540         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12541         Declare.
12542         (flag_jni): Declare.
12543         (build_jni_stub): Declare.
12544         (struct lang_decl): Added `native' flag.
12545         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12546         structure.
12547         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12548         soft_jnipopsystemframe_node): New globals.
12549         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12550         argument.
12551
12552         * java-tree.def: Put into `C' mode.
12553
12554 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12555
12556         Fix for PR gcj/2:
12557         * expr.c (expand_invoke): Generate check to see if object pointer
12558         is null in nonvirtual invocation case.
12559         * java-tree.h (soft_nullpointer_node): Declare.
12560         * decl.c (soft_nullpointer_node): New global.
12561         (init_decl_processing): Initialize soft_nullpointer_node.
12562         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12563         or `private' methods.
12564         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12565
12566 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12567
12568         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12569         from <clinit>
12570
12571 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12572
12573         * zextract.c (find_zip_file_start): New function.
12574         (read_zip_archive): Use it.
12575
12576 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12577
12578         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12579
12580 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12581
12582         * class.c (common_enclosing_context_p): New function.
12583         * java-tree.h (common_enclosing_context_p): Added prototype.
12584         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12585         classes sharing an outer context with the current instance.
12586         * parse.y (build_access_to_thisn): Fixed leading comment.
12587         (verify_constructor_super): New local `supper_inner'. Skip
12588         enclosing context argument in the case of inner class constructors.
12589         (patch_method_invocation): Insert proper context as second
12590         parameter to pure inner class constructor super invocations.
12591
12592 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12593
12594         * parse.y (end_class_declaration): Reset the interface number
12595         counter.
12596
12597 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12598
12599         * parse.y (source_start_java_method): Deleted unnecessary code.
12600         (patch_method_invocation): Fixed comment.
12601
12602 2000-04-24  Robert Lipe <robertlipe@usa.net>
12603
12604         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12605
12606 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12607
12608         * boehm.c (mark_reference_fields): Use int_byte_position.
12609
12610 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12611
12612         * boehm.c (mark_reference_fields): Only call byte_position on
12613         non-static fields.
12614
12615 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12616
12617         * boehm.c (mark_reference_fields): Added `last_view_index'
12618         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12619
12620 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12621
12622         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12623         * parse.y (check_class_interface_creation): Fixed comments. Select
12624         permitted modifiers for (inner) interfaces. Changed error message
12625         to report rejected modifiers used with local classes.
12626
12627 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12628
12629         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12630         of directly inherited type considered in scope.
12631         * parse.y (do_resolve_class): Search inherited classes for inner
12632         classes.
12633
12634 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12635
12636         * parse.y (not_accessible_p): Use member's class, not current
12637         class, when doing inheritance check for protected reference.
12638         Fixes PR gcj/124.
12639
12640 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12641
12642         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12643
12644 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12645
12646         * parse.y (lookup_field_wrapper): Search for final local aliases.
12647         (resolve_expression_name): Let lookup_field_wrapper search for
12648         final local aliases. Force the value of `name' if one is found.
12649         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12650         an expression name. Fixed comments.
12651
12652 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12653
12654         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12655
12656 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12657
12658         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12659
12660 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12661
12662         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12663
12664 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12665
12666         PR gcj/211:
12667         * gjavah.c (utf8_cmp): Changed return value.
12668         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12669         result.
12670         (cxx_keywords): New global.
12671         (get_field_name): Handle new result of cxx_keyword_subst.
12672         (print_method_info): Likewise.
12673
12674 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12675
12676         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12677         with a newline, for CNI.
12678         (print_stub_or_jni): Print a space or newline before method name for
12679         CNI as well as JNI.
12680         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12681         (process_file): Include gcj/cni.h if generating CNI stubs.
12682
12683 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12684
12685         * gjavah.c (decompile_method): Use print_field_name.
12686         Fixes PR gcj/205.
12687
12688 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12689
12690         * parse.y (java_expand_classes): Reverse the package list once.
12691         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12692         reduction.
12693         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12694         the `==' and `!=' operators.
12695
12696 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12697
12698         * jcf-write.c (generate_bytecode_insns): At invocation time,
12699         always relate an interface method to the type of its selector.
12700
12701 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12702
12703         Fix for PR gcj/2:
12704         * expr.c (expand_invoke): Generate check to see if object pointer
12705         is null in nonvirtual invocation case.
12706         * java-tree.h (soft_nullpointer_node): Declare.
12707         * decl.c (soft_nullpointer_node): New global.
12708         (init_decl_processing): Initialize soft_nullpointer_node.
12709         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12710         or `private' methods.
12711         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12712
12713 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12714
12715         Fix for PR gcj/140:
12716         * parse.y (check_final_assignment): Recognize assignments to the
12717         `length' field of an array when generating class files.
12718
12719 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12720
12721         * class.c (decl_hash): Prototype removed.
12722         (decl_compare): Likewise.
12723
12724 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12725
12726         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12727         * parse.y (check_modifiers_consistency): Check for final/volatile
12728         clash.  Fixes PR gcj/164.
12729
12730 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12731
12732         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12733         made global.
12734         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12735         global.
12736         (add_method_1): Use `java_hash_hash_tree_node' and
12737         `java_hash_compare_tree_node'.
12738         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12739         (java_hash_compare_tree_node): Likewise.
12740         * parse.y (find_applicable_accessible_methods_list): Create,
12741         delete and use a hash table to remember already searched interfaces.
12742
12743 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12744
12745         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12746         with latest entry.
12747
12748 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12749
12750         * boehm.c (mark_reference_fields, set_bit): Prototype.
12751         (set_bit): Un-ANSI-fy definition.
12752
12753         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12754         Prototype.
12755
12756         * decl.c (emit_init_test_initialization): Likewise.
12757
12758         * gjavah.c (jni_print_char): Likewise.
12759
12760         * parse.y (create_new_parser_context): Likewise.
12761
12762 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12763
12764         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12765         patch missing hunk. Fixed indentation.
12766
12767 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12768
12769         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12770         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12771
12772 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12773
12774         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12775         when negative *before* using it as an array index.
12776         * ChangeLog: Fixed typo.
12777
12778 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12779
12780         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12781         to 0 when it reaches -1.
12782
12783 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12784
12785         * jcf-parse.c (get_constant): Properly cast `num' during the
12786         invocation of `add_double'.
12787         * jcf-write.c (push_long_const): Properly cast `lo' before
12788         comparing it to short bounds.
12789         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12790         `interface_body:' is reduced after the current interface is
12791         pushed.
12792
12793 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12794
12795         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12796         Java-specific `-f' option.
12797
12798 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12799
12800         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12801         Adjust order of making types.
12802         Make bitsize_*_node values.
12803
12804 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12805
12806         * class.c (make_field_value): Use byte_position.
12807         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12808         (java_array_data_offset): Likewise.
12809         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12810         bzero call.
12811
12812 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12813
12814         * parse.y (check_abstract_method_definitions): New local
12815         `end_type_reached'. Make sure we also consider `end_type'.
12816         (java_check_abstract_method_definitions): Make sure we eventually
12817         consider `java.lang.Object'.
12818         (maybe_use_access_method): Don't use access method if not in the
12819         context of a pure inner class or if the method's context is right.
12820         (find_applicable_accessible_methods_list): New static flag
12821         `object_done'. Don't search abstract classes as interfaces. Fixed
12822         indentation. Fixed the `java.lang.Object' only search. Search
12823         class interface(s) first, then fully search enclosing contexts.
12824         (find_most_specific_methods_list): Pick the closest candidate when
12825         they're all abstract.
12826
12827 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12828
12829         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12830         properly initialize `finished_label'. Don't emit gotos for empty
12831         try statements.
12832
12833 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12834
12835         * except.c (emit_handlers): Clear catch_clauses_last.
12836
12837 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12838
12839         * parse.y (check_method_types_complete): New function.
12840         (create_class): Reset anonymous class counter only when seeing an
12841         non inner classe.
12842         (java_complete_class): JDEP_METHOD: Don't recompute signature
12843         if incomplete.
12844
12845 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12846
12847         * class.c (build_static_ref): Fixed indentation in comment.
12848         * java-tree.def (TRY_EXPR): Fixed typo in name.
12849         (CLASS_LITERAL): Likewise.
12850         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12851         (struct lang_type): New field `dot_class'.
12852         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12853         (generate_classfile): Method `class$' is synthetic.
12854         * parse.y (build_do_class_method): New function.
12855         (build_dot_class_method_invocation): Likewise.
12856         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12857         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12858         (qualify_ambiguous_name): Likewise.
12859         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12860         (build_try_statement): Fixed leading comment.
12861
12862 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12863
12864         * class.c (make_field_value): Properly handle sizes.
12865         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12866         (layout_class_method): Count using trees.
12867         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12868         * expr.c (java_array_data_offset): Use int_bit_position.
12869         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12870         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12871
12872 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12873
12874         * lang.c (flag_hash_synchronization): New global.
12875         (lang_f_options): Added `hash-synchronization'.
12876         * lang-options.h: Mention -fhash-synchronization.
12877         * java-tree.h (flag_hash_synchronization): Declare.
12878         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12879         hash table synchronization is disabled.
12880         * decl.c (init_decl_processing): Only push `sync_info' value when
12881         hash table synchronization is disabled.
12882         * class.c (make_class_data): Only push `sync_info' field when hash
12883         table synchronization is disabled.  Removed dead code.
12884
12885 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12886
12887         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12888
12889 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12890
12891         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12892         classes.
12893         * parse.y (patch_method_invocation): Handle anonymous classes
12894         creation in static context.
12895
12896 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12897
12898         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12899         * parse.y (resolve_qualified_expression_name): Use it.
12900         (patch_method_invocation): Likewise.
12901
12902 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12903
12904         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12905         depending on the type of dependency which dictates what the
12906         current class is.
12907         (unresolved_type_p): Resolved types limited to the current class.
12908
12909 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12910
12911         * decl.c (init_decl_processing): Set type of `sync_info' to be
12912         pointer to Object.
12913
12914         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12915         Correctly compute bit number for current slot.  Zero `high' and
12916         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12917         mark_reference_fields.
12918         (mark_reference_fields): New function.
12919
12920 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12921
12922         * parse.y (register_incomplete_type): Fixed initialization of
12923         JDEP_ENCLOSING.
12924
12925 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12926
12927         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12928         static globals.
12929         (push_class_context, pop_class_context): New function.
12930         (class_body:): Call pop_class_context.
12931         (interface_body:): Likewise.
12932         (INNER_QUALIFIER): New macro.
12933         (report_class_declaration): Changed output format and use
12934         INNER_QUALIFIER. Call push_class_context.
12935
12936 2000-02-14  Andrew Haley  <aph@cygnus.com>
12937
12938         * check-init.c (check_init): Add new cases for unary and binary
12939         tree nodes.
12940
12941 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12942
12943         * parse.y (resolve_package): Set `next' once a type name has been
12944         progressively discovered.
12945         (resolve_qualified_expression_name): Propagate resolution only if
12946         there are remaining qualifiers. Take into account `q' might have
12947         been cleared after re-qualification.
12948         * parse.y (patch_method_invocation): New local `resolved'.
12949         Section dealing with qualified expression rewritten to use
12950         resolve_field_access.
12951
12952 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12953
12954         * parse.h (PUSH_CPC): Fixed indentation.
12955         (DEBUG_CPC): New macro.
12956         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12957         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12958         * parse.y (class_body_declaration:): Use
12959         SET_CPC_INSTANCE_INITIALIZER_STMT.
12960         (method_declaration:): Check for null current_function_decl.
12961         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12962         (java_parser_context_pop_initialized_field): Better handling of
12963         empty lists.
12964         (maybe_make_nested_class_name): Mark nested class name as
12965         qualified when necessary.
12966         (end_class_declaration): Don't call java_parse_context_resume when
12967         one or more error occurred.
12968         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12969         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12970         SET_CPC_INITIALIZER_STMT.
12971         (method_header): Check for inner classes declaring static methods.
12972         (resolve_qualified_expression_name): Handle situation where `this'
12973         is implied.
12974
12975 2000-03-13  Hans Boehm <boehm@acm.org>
12976
12977         * typeck.c (build_prim_array_type): Correctly set the high word too.
12978
12979 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12980
12981         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12982         ordinary methods.
12983         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12984         list of methods for interfaces.
12985
12986 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12987
12988         * parse.y (qualify_ambiguous_name): Properly handle expressions
12989         using `null'.
12990
12991 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12992
12993         * parse.y (check_final_assignment): Extended to process
12994         COMPOUND_EXPR.
12995         (patch_assignment): Have check_final_assignment called only once.
12996
12997 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12998
12999         * java-tree.h (IS_INIT_CHECKED): New flag.
13000         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13001         * parse.y (patch_string): Call force_evaluation_order on the
13002         completed string concatenation tree.
13003         * expr.c (force_evaluation_order): Call force_evaluation_order on
13004         function's arguments too.
13005
13006 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13007
13008         * decl.c (emit_init_test_initialization): Mark KEY as unused.
13009         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13010         (build_anewarray): Likewise.
13011         * parse.y (patch_newarray): Likewise.
13012         * parse.c: Regenerated.
13013
13014 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
13015
13016         * decl.c (init_decl_processing): Added new class fields `depth',
13017         `ancestors', and `idt' to class_type_node. Use
13018         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13019         * class.c (make_class_data): Push initial values for new fields.
13020         * java-tree.h: Updated prototype for `build_invokeinterface'.
13021         * expr.c (build_invokeinterface): Changed parameters to accept
13022         `method' tree. Calculate index of `method' in its declaring
13023         interface. Build call to _Jv_LookupInterfaceMethodIdx.
13024         (expand_invoke): Call `build_invokeinterface' with new parameters.
13025         * parse.y (patch_invoke): Call `build_invokeinterface' with new
13026         parameters.
13027
13028 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
13029
13030         * typeck.c (lookup_do): Search superinterfaces first
13031         when looking up an interface method. From Godmar Back
13032         <gback@cs.utah.edu>
13033
13034 2000-03-06  Tom Tromey  <tromey@cygnus.com>
13035
13036         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13037
13038 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13039
13040         * java-tree.h (lookup_argument_method2): Declared.
13041         (safe_layout_class): Prototype moved from parse.h.
13042         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13043         * parse.y (java_check_regular_methods): Local `super_class' gone.
13044         Call lookup_argument_method2 instead of lookup_argument_method.
13045         Perform modifier match for methods found declared in implemented
13046         interfaces. Fixed indentation problem. Overriding/hiding error
13047         report to take place only for methods found in classes.
13048         * typeck.c (lookup_argument_method): Changed leading
13049         comment. Re-written by calling lookup_do.
13050         (lookup_argument_method2): New function.
13051         (lookup_java_method): Re-written by calling lookup_do.
13052         (lookup_do): New function.
13053
13054 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13055
13056         * check-init.c (check_init): Removed dead code. Handle (blank)
13057         final variables.
13058         * parse.y (declare_local_variables): New local `final_p', set it
13059         and use it to initialize LOCAL_FINAL.
13060         (check_final_assignment): Only check FIELD_DECLs.
13061
13062 2000-02-17  Tom Tromey  <tromey@cygnus.com>
13063
13064         * Makefile.in (JAVA_OBJS): Added boehm.o.
13065         (boehm.o): New target.
13066         * Make-lang.in (JAVA_SRCS): Added boehm.c.
13067         * java-tree.h (flag_use_boehm_gc): Declare.
13068         (get_boehm_type_descriptor): Declare.
13069         * lang.c (lang_f_options): Added `use-boehm-gc'.
13070         (flag_use_boehm_gc): New global.
13071         * lang-options.h: Added -fuse-boehm-gc.
13072         * boehm.c: New file.
13073         * class.c (get_dispatch_table): If class uses a Boehm type
13074         descriptor, put it in the vtable.
13075         (make_class_data): Removed dead code.
13076
13077 2000-03-03  Per Bothner  <per@bothner.com>
13078
13079         * decl.c (init_decl_processing):  Initialize sizetype properly.
13080
13081 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13082
13083         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13084         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13085         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13086         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13087         (jcf_parse): New local `current'. Load innerclasses seen in outer
13088         context being processed.
13089         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13090         * jcf-write.c (append_innerclasses_attribute): New function.
13091         (append_innerclasses_attribute_entry): Likewise.
13092         (get_access_flags): Handle static classes. Set anonymous and local
13093         classes to be private.
13094         (generate_classfile): Attribute count adjusted. Call
13095         append_innerclasses_attribute.
13096         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13097         PURE_INNER_CLASS_TYPE_P.
13098         * parse.y (parser_qualified_classname): New parameter `is_static',
13099         produce non qualified name accordingly.
13100         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13101         (create_interface): Added argument to parser_qualified_classname.
13102         (create_class): Added argument to parser_qualified_classname. Setup
13103         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13104         (add_inner_class_fields): Fixed indentation.
13105         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13106         (method_declarator): Fixed typo in comment.
13107         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13108         (build_current_thisn): Likewise.
13109         (patch_method_invocation): Likewise.
13110
13111 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13112
13113         * decl.c (current_function_decl): Move to toplev.c.
13114
13115 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13116
13117         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13118         (DECL_BIT_INDEX): Use underlying representation.
13119         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13120
13121 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13122
13123         * expr.c (build_java_ret): Pass proper type to size_binop.
13124
13125 2000-02-25  Anthony Green  <green@cygnus.com>
13126
13127         * expr.c (build_class_init): Mark the decl to be ignored by
13128         check_init.
13129         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13130         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13131         * class.c (init_test_hash_newfunc): New function.
13132         (decl_hash): New function.
13133         (decl_compare): New function.
13134         * decl.c (emit_init_test_initialization): New function.
13135         (complete_start_java_method): Traverse the init test hashtable,
13136         calling emit_init_test_initialization.
13137         (always_initialize_class_p): Define.
13138         * expr.c (build_class_init): Use initialization tests when
13139         emitting class initialization code.
13140         (always_initialize_class_p): Declare.
13141         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13142         1.
13143         * java-tree.h: Include hash.h.
13144         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13145         (struct lang_decl): Add init_test_table field.
13146         (init_test_hash_entry): Define.
13147
13148 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13149
13150         * gjavah.c (main): Avoid using `argi' to report unimplemented
13151         options.
13152
13153 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13154
13155         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13156         initialize locals to avoid warnings. Local `exception_type' moved
13157         into if statement.
13158
13159 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13160
13161         * parse.y (resolve_expression_name): Use `orig' as a second
13162         argument to resolve_field_access.
13163         (resolve_field_access): Removed unnecessary code when dealing with
13164         static fields.
13165
13166 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13167
13168         * class.c (push_super_field): Don't push the field twice.
13169         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13170         * parse.h (java_reorder_fields): Prototyped.
13171         * parse.y (java_reorder_fields): New function.
13172         (java_layout_class): Simplified not to worry about re-ordering.
13173
13174 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13175
13176         * gjavah.c (print_name): In JNI case, correctly quote string.
13177         (print_method_info): Don't handle overrides in JNI mode.
13178
13179 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13180
13181         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13182         value type set to `boolean_type_node'.
13183
13184 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13185
13186         * jcf-dump.c (main): Test for correct condition after
13187         output file creation.
13188
13189 2000-02-19  Anthony Green  <green@cygnus.com>
13190
13191         * jcf-depend.c (add_entry): Fix test for first list entry.
13192
13193 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13194
13195         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13196         * constants.c (build_constants_constructor): Likewise.
13197
13198 2000-02-19  Anthony Green  <green@cygnus.com>
13199
13200         * jcf-depend.c (add_entry): Add entries to the end of the list.
13201
13202 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13203
13204         * decl.c (INT_TYPE_SIZE): Define if necessary.
13205         (expand_java_return): Handle the case of a native integer smaller
13206         than a JVM integer.
13207
13208 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13209
13210         * gjavah.c (help): Use GCCBUGURL.
13211         * jv-scan.c (help): Likewise.
13212         * jcf-dump.c (help): Likewise.
13213
13214 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13215
13216         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13217         `finally' clauses.
13218
13219 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13220
13221         * jcf-parse.c (load_class): Call `fatal' if no file containing
13222         the target class are found.
13223
13224 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13225
13226         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13227         lex.c, lex.h, and PARSE_H to...
13228         (parse.o, parse-scan.o): ...here, respectively.
13229
13230         * lex.c: Split out code that may trigger SIGFPE from yylex()
13231         to its own function.
13232         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13233
13234 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13235
13236         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13237
13238 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13239
13240         * parse.y (outer_field_access_p): Stop in time when outer contexts
13241         are exhausted.
13242         (resolve_qualified_expression_name): Properly qualify *everything*
13243         after a package.type to be resoled as expression names.
13244         (find_applicable_accessible_methods_list): Save/restore `class' to
13245         isolate it from a possible outer context search.
13246
13247 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13248
13249         * gjavah.c (jni_print_char): New function.
13250         (print_full_cxx_name): Use it.
13251         (decode_signature_piece): Likewise.
13252         (print_cxx_classname): Likewise.
13253
13254 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13255
13256         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13257         version.o.
13258         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13259
13260         * gjavah.c: Include version.h.
13261
13262         * jcf-dump.c: Likewise.
13263
13264         * jv-scan.c: Likewise.
13265
13266 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13267
13268         * parse.y (outer_field_access_fix): First parameter now a tree
13269         node. Check for assignment to final. First argument to
13270         build_outer_field_access_fix modified to accommodate prototype.
13271         (build_outer_field_access): Don't check for assignment to final
13272         here.
13273         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13274         possibly returned by outer_field_access_fix. Changed
13275         outer_field_access_fix's first argument.
13276         (check_final_assignment): $finit$'s context is OK.
13277         (patch_unaryop): Use node instead of its line/column value when
13278         calling outer_field_access_fix.
13279
13280 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13281
13282         * parse.y (interface_declaration:): No longer tagged
13283         <node>. Re-installed default action.
13284         (class_member_declaration:): Handle inner interfaces.
13285         (interface_member_declaration): Handle inner interfaces and
13286         classes.
13287         (create_interface): Push error if one seen. Suspend parsing
13288         context when processing an inner interface.
13289         (register_fields): Inner class static field limitations not to
13290         apply to inner interfaces.
13291
13292 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13293
13294         * jcf-parse.c (load_class): Update `java_error_count' when a
13295         class' file can't be found.
13296         (parse.y): Avoid (byte)code generation when errors seen.
13297
13298 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13299
13300         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13301         decodes a valid node.
13302         (patch_binop): Handle TRUNC_DIV_EXPR.
13303
13304 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13305
13306         * parse.y (resolve_package): New local `acc'. Try to progressively
13307         build and guess a package and type name.
13308
13309 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13310
13311         * parse.y (find_applicable_accessible_methods_list): Load and
13312         layout the search class if necessary.
13313         (java_complete_tree): Keep to original type of the folded initial
13314         value.
13315
13316 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13317
13318         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13319         Generate error message if circularity is detected. New static
13320         local `list'.
13321         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13322         * jcf-write.c (generate_bytecode_insns): Very simply handle
13323         SAVE_EXPR.
13324         * parse.y (java_check_circular_reference): Use
13325         `cyclic_inheritance_report' during report, if necessary.
13326         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13327         walking NEW_ARRAY_INIT twice.
13328
13329 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13330
13331         * parse.y (check_class_interface_creation): Allow inner classes to
13332         be `private' or `protected', check modifiers' consistency. Prevent
13333         block local classes from bearing any modifiers.
13334
13335 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13336
13337         * except.c (check_start_handlers): Re-add prototype lost in last
13338         patch.
13339         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13340
13341 2000-02-09  Andrew Haley  <aph@cygnus.com>
13342
13343         * decl.c (clear_binding_level): Remove excess initializer.
13344         (maybe_poplevels): Remove unused variable.
13345         (force_poplevels): Ditto.
13346         (struct binding_level): Add comment.
13347
13348 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13349
13350         * jcf-write.c (generate_classfile): Don't consider
13351         pre-initialization with reference value (use <clinit> instead.)
13352         * parse.y (java_fix_constructors): No generated constructor for
13353         interfaces.
13354         (build_outer_field_access): Removed debug message.
13355         (outer_field_expanded_access_p): Adapted to bytecode generation.
13356         (build_outer_field_access_method): Use fix_method_argument_names.
13357         (build_outer_method_access_method): Fixed indentation. Added
13358         comment. Handle access method generation for static and also void
13359         methods.
13360         (build_access_to_thisn): Inserted debug message.
13361         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13362         (resolve_qualified_expression_name): Fixed comment.
13363         (not_accessible_p): Adapted to bytecode generation. Added comment.
13364         (patch_method_invocation): Added comment.
13365         (maybe_use_access_method): Fixed leading comment. Handle static
13366         methods.
13367         (java_complete_lhs): Don't shortcut handling of initialized upon
13368         declaration String type static fields when generating bytecode.
13369         (patch_unaryop): Handle outer field access when generating
13370         bytecode.
13371
13372 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13373
13374         * java-tree.h (FIELD_THISN): New macro.
13375         * jcf-write.c (append_synthetic_attribute): New function.
13376         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13377         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13378         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13379         this$<n> fields.
13380         (build_outer_field_access): Turned on access functions usage and
13381         generation when compiling to bytecode.
13382         (maybe_use_access_method): Likewise.
13383
13384 2000-01-25  Andrew Haley  <aph@cygnus.com>
13385
13386         * java-except.h (struct eh_range): Add `expanded' field.
13387         (maybe_start_try): Add end_pc arg.
13388         (maybe_end_try): Ditto.
13389         * java-tree.h (force_poplevels): new function.
13390         * expr.c (expand_byte_code): Don't call maybe_start_try or
13391         maybe_end_try.
13392         * except.c (add_handler): Reset expanded.
13393         (expand_start_java_handler): Set expanded.
13394         (check_start_handlers): Don't expand a start handler that's
13395         already been expanded.
13396         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13397         ends after end_pc.
13398         (expand_end_java_handler): call force_poplevels.
13399         (force_poplevels): new function.
13400         * decl.c (binding_level): Add start_pc of binding level.
13401         (maybe_pushlevels): Call maybe_start_try when pushing binding
13402         levels.
13403         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13404         (LARGEST_PC): Define.
13405         (clear_binding_level): Use LARGEST_PC.
13406
13407         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13408         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13409         (binding_depth, is_class_level, current_pc): new variables.
13410         (struct binding_level): ditto.
13411         (indent): new function.
13412         (push_jvm_slot): add debugging info.
13413         (maybe_pushlevels): ditto.
13414         (maybe_poplevels): ditto.
13415         (pushlevel): ditto.
13416         (poplevel): ditto.
13417         (start_java_method): ditto.
13418         (give_name_to_locals): comment only.
13419         * except.c (binding_depth, is_class_level, current_pc):
13420         new variables.
13421         (expand_start_java_handler): add debugging info.
13422         (expand_end_java_handler): ditto.
13423
13424 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13425
13426         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13427         (print_name_for_stub_or_jni, process_file): Constify a char*.
13428
13429 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13430
13431         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13432
13433 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13434
13435         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13436         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13437         defined to be 1.
13438
13439 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13440
13441         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13442         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13443         (struct lang_type): New field `ii_block'.
13444         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13445         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13446         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13447         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13448         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13449         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13450         macros.
13451         * parse.y (add_instance_initializer): New function.
13452         (in_instance_initializer): New static global.
13453         (class_body_declaration:): Link instance initializer block.
13454         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13455         (array_creation_expression:): Remove unused local.
13456         (java_parser_context_push_initialized_field): Fixed leading
13457         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13458         CPC_INSTANCE_INITIALIZER_LIST.
13459         (java_parser_context_pop_initialized_field): Likewise.
13460         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13461         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13462         CPC_INITIALIZER_STMT.
13463         (fix_constructors): New local `class_type'. Use it. Call
13464         add_instance_initializer.
13465         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13466         (patch_return): Forbid return in instance initializers.
13467         (patch_throw_statement): Enforce exception handling in the context
13468         of instance initializers.
13469
13470 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13471
13472         * Make-lang.in (java.mostlyclean): Remove executables in
13473         `mostlyclean'.
13474
13475 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13476
13477         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13478         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13479         (java_float_finite): Convert to use union Word from javaop.h.
13480         (java_double_finite): Convert to use union DWord from javaop.h.
13481
13482 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13483
13484         * gjavah.c (options): Added `jni' entry.
13485         (help): Document -jni.
13486         (flag_jni): New global.
13487         (process_file): Handle JNI output.  Don't print text from
13488         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13489         suffix if it actually exists.
13490         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13491         correct output file name with `--jni'.
13492         (print_include): Mangle header name differently in JNI case.
13493         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13494         method list.
13495         (print_method_info): Handle JNI case.  Put signature info into
13496         method name.  Handle case when STREAM is NULL.
13497         (print_name_for_stub_or_jni): New function.
13498         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13499         (print_cxx_classname): Handle JNI.
13500         (print_full_cxx_name): Likewise.
13501         (decode_signature_piece): Likewise.
13502         (overloaded_jni_method_exists_p): New function.
13503         (struct method_name): Added `signature' and `sig_length' fields.
13504         (HANDLE_END_FIELD): Do nothing in JNI mode.
13505
13506 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13507
13508         * jv-scan.c: Include version.c, <getopt.h>.
13509         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13510         (options): New array.
13511         (usage): New function.
13512         (version): New function.
13513         (main): Use getopt_long to parse command line.
13514         * jcf-dump.c: Include version.c, <getopt.h>.
13515         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13516         OPT_JAVAP): New macros.
13517         (options): New array.
13518         (usage): Return `void'.  Changed message.
13519         (help): New function.
13520         (version): New function.
13521         (main): Use getopt_long_only to parse command line.
13522         * gjavah.c: Include <getopt.h>.
13523         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13524         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13525         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13526         (options): New array.
13527         (java_no_argument): Removed.
13528         (help): Updated with missing options.
13529         (main): Use getopt_long_only to parse command line.
13530         (usage): Changed message.
13531
13532 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13533
13534         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13535         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13536         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13537         * parse.y (array_creation_expression:): Handle anonymous arrays.
13538         (build_array_from_name): Don't set `ret_name' if null.
13539         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13540         (qualify_ambiguous_name): Likewise.
13541         (java_complete_expand_class): Likewise.
13542
13543 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13544
13545         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13546         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13547         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13548         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13549         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13550         AIPL_FUNCTION_COMPLETED_INVOCATION.
13551         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13552         AIPL_FUNCTION_INVOCATION_READY.
13553         (AIPL_FUNCTION_DECLARATION): New enum entry.
13554         * parse.y (reorder_static_initialized): New function.
13555         (java_parser_context_pop_initialized_field): Use it.
13556         (add_inner_class_fields): Use
13557         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13558         augmented. Install marker after last alias initializer, if any.
13559         (generate_finit): Fixed typo. Don't try to retain only the used
13560         fields.
13561         (method_header): Compute and set DECL_FUNCTION_NAP.
13562         (method_declarator): Fixed comment. Insert alias initializer in
13563         parameter list.
13564         (build_alias_initializer_parameter_list): Fixed leading
13565         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13566         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13567         (java_complete_expand_class): Code to retain only used aliases
13568         removed.
13569         (java_complete_expand_methods): New local `first_decl'. Generate
13570         $finit$ first, then expand the constructors, regular methods and
13571         <clinit>.
13572         (java_complete_expand_method): Don't report error on missing
13573         return statement if previously detected bogus.
13574         (fix_constructors): Don't patch constructor parameters list.
13575         (patch_method_invocation): Use new AIPL enum values. Reverse
13576         alias initializer list for anonymous classes.
13577
13578 2000-01-30  Anthony Green  <green@redhat.com>
13579
13580         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13581         determine how many stack slots to pop.
13582
13583 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13584
13585         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13586         error handling/recovery.
13587         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13588
13589 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13590
13591         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13592         FIELD_LOCAL_ALIAS_USED): New macros.
13593         (DECL_FUNCTION_NAP): New macro.
13594         (struct lang_decl): New field `nap'.
13595         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13596         (struct lang_type): New fields `finit_stmt_list' and
13597         `clinit_stmt_list'.
13598         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13599         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13600         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13601         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13602         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13603         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13604         (BUILD_THROW): Macro line separator re-indented.
13605         * parse.y (end_class_declaration): New function.
13606         (maybe_generate_pre_expand_clinit): New name for
13607         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13608         pre-expand static fields.
13609         (maybe_generate_clinit): Function deleted.
13610         (check_for_static_method_reference): Prototype's parameter list
13611         indented.
13612         (generate_finit): New name for maybe_generate_finit. Changed
13613         leading comment. Function rewritten to use
13614         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13615         (build_alias_initializer_parameter_list): New function.
13616         (java_parser_context_pop_initialized_field): Likewise.
13617         (add_inner_class_fields): Likewise.
13618         (type_declaration:): Call end_class_declaration.
13619         (class_member_declaration:): Likewise.
13620         (formal_parameter_list:): Fixed typos.
13621         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13622         element. Improved error handling.
13623         (block_statement:): Call end_class_declaration.
13624         (anonymous_class_creation:): Likewise.
13625         (create_anonymous_class): Fixed comments.
13626         (create_class): Call add_inner_class_fields.
13627         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13628         (method_header): Use MARK_FINAL_PARMS.
13629         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13630         (method_declarator): Propagate final argument flag.
13631         (craft_constructor): New local `artificial'. Call
13632         build_alias_initializer_parameter_list. Use
13633         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13634         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13635         necessary.
13636         (complete_expand_class): Get rid of unused outer context local
13637         alias fields.
13638         (java_complete_expand_methods): Fixed leading
13639         comment. Generate/pre-expand <clinit> first. Changed method
13640         expansion order to regular, $finit$, constructors, <clinit>.
13641         (java_complete_expand_method): Set current_function_decl.
13642         (fix_constructors): Fix constructor parameter list to account for
13643         outer context local alias initializers.
13644         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13645         (resolve_expression_name): Lookup outer context local aliases. New
13646         local `access', use it.
13647         (patch_method_invocation): Patch inner class ctor invocation with
13648         outer context local aliases initialization values. $finit$
13649         invocation patching now includes things generated with
13650         build_alias_initializer_parameter_list.
13651         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13652         (build_super_invocation): Likewise.
13653         (patch_assignment): Changed comment.
13654
13655 2000-01-27  Andrew Haley  <aph@cygnus.com>
13656
13657         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13658         (emit_if): Ditto.
13659         (emit_jsr): Ditto.
13660
13661 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13662
13663         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13664         concatenation.
13665         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13666
13667         * parse.y (register_fields): Don't pass a format specifier to
13668         OBSOLETE_MODIFIER_WARNING.
13669         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13670         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13671         specifier.
13672         (check_modifiers): Change function into a macro.
13673         (check_class_interface_creation): Pass a literal format string.
13674
13675 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13676
13677         * buffer.h: PROTO -> PARAMS.
13678         * check-init.c: Likewise.
13679         * class.c: Likewise.
13680         * constants.c: Likewise.
13681         * convert.h: Likewise.
13682         * decl.c: Likewise.
13683         * except.c: Likewise.
13684         * expr.c: Likewise.
13685         * gjavah.c: Likewise.
13686         * java-except.h: Likewise.
13687         * java-tree.h: Likewise.
13688         * jcf-depend.c: Likewise.
13689         * jcf-dump.c: Likewise.
13690         * jcf-parse.c: Likewise.
13691         * jcf-path.c: Likewise.
13692         * jcf-reader.c: Likewise.
13693         * jcf-write.c: Likewise.
13694         * jcf.h: Likewise.
13695         * jv-scan.c: Likewise.
13696         * jvgenmain.c: Likewise.
13697         * jvspec.c: Likewise.
13698         * lang.c: Likewise.
13699         * lex.c: Likewise.
13700         * lex.h: Likewise.
13701         * parse-scan.y: Likewise.
13702         * parse.h: Likewise.
13703         * parse.y: Likewise.
13704         * typeck.c: Likewise.
13705         * verify.c: Likewise.
13706         * xref.c: Likewise.
13707         * xref.h: Likewise.
13708         * zextract.c: Likewise.
13709         * zipfile.h: Likewise.
13710
13711 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13712
13713         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13714         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13715         * constants.c (build_constant_data_ref): Check for cached
13716         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13717         in TYPE_CPOOL_DATE_REF.
13718         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13719         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13720         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13721         (LOCAL_FINAL): New macro.
13722         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13723         constant pool -- don't try to reuse.
13724         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13725         TYPE_LANG_SPECIFIC.
13726         (find_in_current_zip): Use TYPE_JCF.
13727         * parse.h (java_check_final): Prototype removed.
13728         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13729         (maybe_create_class_interface_decl,
13730         check_class_interface_creation): Likewise.
13731         (java_expand_finals): Function removed.
13732         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13733         (block_statement:): Fixed comment.
13734         (anonymous_class_creation:): Likewise.
13735         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13736         argument patch.
13737         (check_class_interface_creation): Loosened error report on (inner)
13738         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13739         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13740         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13741         argument patch.
13742         (create_interface): Likewise.
13743         (anonymous_class_counter): New static global.
13744         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13745         patch. Fixed comments.
13746         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13747         anonymous_class_counter when declaring a toplevel class.
13748         (craft_constructor): Fixed constructor name when handling
13749         anonymous classes. Anonymous class constructors to feature hidden
13750         this$<n> parameter.
13751         (java_fix_constructors): Added comment.
13752         (java_check_final): Function removed.
13753         (java_complete_expand_methods): Fixed comment. Don't generate
13754         class data, save its outgoing constant pool instead.
13755         (verify_constructor_super): Skip anonymous class constructor
13756         hidden this$<n> parameter.
13757         (java_expand_classes): New local `saved_ctxp'. Removed call to
13758         java_expand_finals and java_check_final. Expand anonymous class
13759         constructors. Generate class data.
13760         (build_super_invocation): Skip anonymous class hidden this$<n>
13761         parameter.
13762         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13763         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13764         (set_java_signature): Likewise.
13765
13766 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13767
13768         * gjavah.c: Delete ACC_VISIBILITY define.
13769         * jcf.h: Add ACC_VISIBILITY define.
13770         * parse.y: final: rule tagged <value>.
13771         (java_check_regular_methods): Use ACC_VISIBILITY define for
13772         default package access check.
13773         (local_variable_declaration_statement): Use final: rule.
13774
13775 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13776
13777         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13778         (final:): New rule.
13779
13780 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13781
13782         * gjavah.c (print_field_info): Allow non-static final fields.
13783
13784 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13785
13786         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13787         * parse.y (patch_anonymous_class): New function.
13788         (create_anonymous_class): Register incomplete type when the
13789         class/interface to extends/implement isn't known yet.
13790         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13791         (verify_constructor_super): Tuned error message.
13792
13793 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13794
13795         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13796         (ANONYMOUS_CLASS_P): New macro.
13797         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13798         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13799         * parse.y (create_class): Added leading argument.
13800         (maybe_create_class_interface_decl,
13801         check_class_interface_creation): Likewise.
13802         (craft_constructor): New function.
13803         (verify_constructor_super): Added argument in prototype.
13804         (class_declaration:): Inserted leading argument.
13805         (for_begin:): Use FOR_LOOP_P.
13806         (anonymous_class_creation): Create WFL of the anonymous class to
13807         instantiate. Call build_new_invocation. Added comments.
13808         (check_class_interface_creation): Handle parameter `anonymous' in
13809         verbose mode class creation announce.
13810         (link_nested_class_to_enclosing): Exclude anonymous classes.
13811         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13812         anonymous class, even though they appear to have an enclosing
13813         context.
13814         (create_interface): Pass extra argument to
13815         check_class_interface_creation.
13816         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13817         (create_class): Call check_class_interface_creation and
13818         maybe_create_class_interface_decl with extra new argument. Don't
13819         add private this$<n> to anonymous classes.
13820         (method_declarator): Insert hidden this$<n> to anonymous class
13821         constructors.
13822         (java_fix_constructors): Deleted code creating default
13823         constructor. Call craft_constructor instead.
13824         (java_check_regular_methods): Set `saw_constructor' to 1 for
13825         anonymous classes.
13826         (fix_constructors): Pass extra argument to verify_constructor_super.
13827         (verify_constructor_super): New local `sdecl', use it. Search for
13828         matching constructor (possibly featuring arguments) in super
13829         class.
13830         (lookup_method_invoke): Craft constructor according to arguments
13831         list when dealing with anonymous class constructors.
13832         (build_super_invocation): Pass arguments to anonymous class super
13833         constructors.
13834         (search_loop): Use FOR_LOOP_P.
13835         (labeled_block_contains_loop_p): Likewise.
13836
13837 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13838
13839         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13840         (enclosing_context_p): New function.
13841         (get_access_flags_from_decl): Handle CLASS_STATIC.
13842         (maybe_layout_super_class): Extra first argument passed to
13843         do_resolve_class.
13844         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13845         ID_INIT_P.
13846         * decl.c (access0_identifier_node): New global.
13847         (init_decl_processing): access0_identifier_node initialized.
13848         (pushdecl): Set DECL_CONTEXT only on non type decls.
13849         * expr.c (lookup_field): Lookup inner class fields in enclosing
13850         contexts.
13851         (expand_invoke): Use ID_INIT_P.
13852         (expand_java_field_op): Use DECL_CLINIT_P.
13853         * java-tree.def (CLASS_LITERAL): New tree code.
13854         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13855         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13856         (struct lang_decl): New field `inner_access'.
13857         (enclosing_context_p): Prototyped.
13858         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13859         ID_CLINIT_P): New macros.
13860         (CLASS_STATIC): New macro.
13861         (CLASS_ACCESS0_GENERATED_P): New macro.
13862         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13863         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13864         INNER_CLASS_P): New macros.
13865         (DECL_INNER_CLASS_LIST): New macro.
13866         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13867         concatenation.
13868         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13869         the shift value to int. Fixed typo in comment.
13870         * lex.c (inst_id, wpv_id): Initialize.
13871         * mangle.c (unicode_mangling_length): Take `$' into account.
13872         * parse.h (DRECOVER, RECOVER): Terminate properly.
13873         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13874         (typedef struct _jdep): New field `enclosing'.
13875         (JDEP_ENCLOSING): New macro.
13876         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13877         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13878         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13879         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13880         GET_ENCLOSING_CPC_CONTEXT): New macros.
13881         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13882         (do_resolve_class): Added extra argument in prototype.
13883         * parse.y (resolve_class): Added extra argument in prototype.
13884         (maybe_create_class_interface_decl): Likewise.
13885         (maybe_use_access_method, build_wfl_wrap): New functions.
13886         (java_complete_expand_classes, java_complete_expand_class):
13887         Likewise.
13888         (java_parser_context_push_initialized_field,
13889         java_parser_context_suspend, java_parser_context_resume):
13890         Likewise.
13891         (maybe_make_nested_class_name, make_nested_class_name,
13892         set_nested_class_simple_name_value,
13893         link_nested_class_to_enclosing, find_as_inner_class,
13894         find_as_inner_class_do, check_inner_class_redefinition,
13895         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13896         maybe_build_thisn_access_method, build_outer_field_access,
13897         build_outer_field_access_methods, build_outer_field_access_expr,
13898         build_outer_method_access_method, build_new_access_id,
13899         build_outer_field_access_method, outer_field_access_p,
13900         outer_field_expanded_access_p, outer_field_access_fix,
13901         build_incomplete_class_ref, patch_incomplete_class_ref,
13902         create_anonymous_class): Likewise.
13903         (inst_id, wpv_id): New static global variables.
13904         (synchronized:): New rule, tagged <node>.
13905         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13906         rules.
13907         (anonymous_class_creation:): New rule, tagged <node>.
13908         (NEW_TK): Tagged <node>.
13909         (type_literals, array_type_literal): New rules, tagged <node>.
13910         (class_declaration:): Removed action when reducing by class_body:
13911         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13912         using GET_CPC in sub-rules.
13913         (class_member_declaration): Handle inner classes.
13914         (method_declaration): When reducing method_header:, reset
13915         current_function_decl when appropriate.
13916         (method_declarator:): Set the number of formal parameter to 0 for
13917         method declared without arguments.
13918         (constructor_declarator:): Likewise.
13919         (static_initializer:): List of elements kept in a list.
13920         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13921         use of the keyword `static' for type declarations.
13922         (block_statement:): Handle inner class declarations.
13923         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13924         type qualified `this'.
13925         (class_instance_creation_expression): Use anonymous_class_creation:
13926         to handle inner class instances creation. Handle qualified `new'.
13927         (something_dot_new): Added appropriate actions.
13928         (create_new_parser_context): New function.
13929         (java_push_parser_context, java_parser_context_save_global,
13930         java_parser_context_suspend): Use create_new_parser_context.
13931         (check_modifiers): Changed leading comment.
13932         (check_class_interface_creation): Handle interclasses.
13933         (add_superinterfaces): Fixed comment.
13934         (create_interface): Build qualified name from the raw_name instead
13935         of its matching WFL. Push the initialized fields list. raw_name added
13936         as an extra argument to maybe_create_class_interface_decl.
13937         (create_class): Build qualified name from the raw_name instead of
13938         its matching WFL. Removed assignment to current_parsed_class_un.
13939         Call PUSH_ERROR before returning an error. Suspend the current
13940         parser context when processing an inner class. Push the
13941         initialized fields list. raw_name added as an extra argument to
13942         maybe_create_class_interface_decl. Add the private this$<n>
13943         field.
13944         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13945         (register_fields): Get the class type from GET_CPC and handle
13946         previous errors.  Added code to handle the creation of static
13947         fields in inner classes. Initialized fields initialization
13948         statements kept in a list of lists.
13949         (maybe_generate_finit): Initialized fields initialization
13950         statements kept in a list of lists. Use GET_CPC.
13951         (maybe_generate_clinit): Likewise.
13952         (method_header): Use GET_CPC and GET_CPC_UN.
13953         (parser_qualified_classname): Handle inner classes.
13954         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13955         (java_fix_constructors): Hide pointer to enclosing context
13956         instance in constructor list when dealing with inner classes.
13957         (jdep_resolve_class): Call resolve_class with extra first argument
13958         JDEP_ENCLOSING.
13959         (resolve_class): Add enclosing context as a first extra argument
13960         to do_resolve_class.
13961         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13962         properly.
13963         (resolve_no_layout): Extra argument added to resolve_class
13964         invocation.
13965         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13966         (java_get_real_method_name): Use GET_CPC_UN.
13967         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13968         (java_check_abstract_methods): Handle static method declared in
13969         inner classes by an error.
13970         (java_check_regular_methods): Use DECL_CLINIT_P.
13971         (source_start_java_method): Also set DECL_MAX_LOCALS.
13972         (create_artificial_method): Call java_parser_context_save_global
13973         and java_parser_context_restore_global instead of saving/restoring
13974         the context by hand.
13975         (expand_start_java_method): Improved verbose mode message.
13976         (java_complete_expand_methods): Fixed leading comment. Use
13977         DECL_CLINIT_P.
13978         (fix_constructors): Added assignment to this$<n> if necessary.
13979         (java_expand_classes): Call java_complete_expand_classes instead
13980         of java_complete_expand_methods.
13981         (make_qualified_primary): Simplified.
13982         (merge_qualified_name): Optimized for missing left or right parts.
13983         (resolve_expression_name): Handle access to outer class fields from
13984         interclasses.
13985         (resolve_qualified_expression_name): New macro
13986         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13987         classes. Report error on non appropriate qualification of
13988         `new'. Handle qualified `this'.
13989         (not_accessible_p): Allow access to outer class private fields from
13990         inner classes.
13991         (patch_method_invocation): Handle method invocations through
13992         access methods and inner class constructor invocations.
13993         (find_applicable_accessible_methods_list): Search enclosing
13994         contexts of an inner class.
13995         (search_applicable_methods_list): Fixed typo.
13996         (argument_types_convertible): Handle inner class constructors'
13997         hidden outer context reference argument.
13998         (qualify_ambiguous_name): Handle qualified `this'.
13999         (java_complete_lhs): Handle use of field accessed through
14000         artificial access methods in various cases of assignments. Handle
14001         CLASS_LITERAL node.
14002         (check_final_assignment): Use DECL_CLINIT_P.
14003         (valid_ref_assignconv_cast_p): Handle the destination being an
14004         enclosing context of the source.
14005         (patch_unaryop): Handle use of field accessed through artificial
14006         access methods.
14007         (patch_return): Use DECL_CLINIT_P.
14008         (patch_throw_statement): Use DECL_CLINIT_P.
14009         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14010         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14011         ID_INIT_P.
14012
14013 2000-01-16  Anthony Green  <green@cygnus.com>
14014
14015         * parse.y (build_string_concatenation): Only use
14016         StringBuffer(String) shortcut if String arg is constant.
14017
14018 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14019
14020         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14021         the shift value to int. Fixed typo in comment.
14022
14023 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14024
14025         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14026         * jcf-write.c: Likewise.
14027         * parse.y: Likewise.
14028         * parse.c: Regenerate.
14029
14030 2000-01-09  Anthony Green  <green@cygnus.com>
14031
14032         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14033         bytecodes in the correct order.
14034
14035 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14036
14037         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14038
14039 2000-01-06  Anthony Green  <green@cygnus.com>
14040
14041         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14042         before building constant array decl.
14043
14044 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14045
14046         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14047         method invocation and typo in conditional expression.
14048         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14049         the appropriate NOTE_POP.
14050         * parse.y (patch_binop): Shift value mask to feature the right
14051         type.
14052
14053 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14054
14055         * class.c (assume_compiled, assume_compiled_node): Add static
14056         prototype.
14057         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14058
14059         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14060
14061         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14062
14063         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14064         to `__modifier' to avoid stringifying it.
14065
14066         * parse.y (verify_constructor_circularity): Don't call a variadic
14067         function with a non-literal format string.
14068         (java_check_abstract_methods): Move unreachable code inside
14069         `continue' statement.
14070         (lookup_method_invoke): Call xstrdup, not strdup.
14071
14072         * expr.c (expand_java_field_op): Avoid the use of ANSI string
14073         concatenation.
14074
14075         * jcf-parse.c (yyparse): Likewise.
14076
14077         * jv-scan.c (main): Likewise.
14078
14079 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14080
14081         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14082         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14083         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14084         concatenation.
14085
14086         * parse.y (synchronized, variable_redefinition_error,
14087         check_class_interface_creation, create_interface, create_class,
14088         method_header, finish_method_declaration,
14089         check_modifiers_consistency, method_declarator,
14090         complete_class_report_errors, check_abstract_method_definitions,
14091         java_check_regular_methods, check_throws_clauses,
14092         java_check_abstract_methods, read_import_dir,
14093         check_pkg_class_access, declare_local_variables, fix_constructors,
14094         cut_identifier_in_qualified, resolve_expression_name,
14095         resolve_qualified_expression_name, patch_method_invocation,
14096         java_complete_lhs, patch_assignment, try_builtin_assignconv,
14097         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14098         patch_exit_expr, patch_exit_expr, patch_switch_statement,
14099         patch_try_statement, patch_synchronized_statement,
14100         patch_throw_statement, check_thrown_exceptions,
14101         patch_conditional_expr): Likewise.
14102
14103 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14104
14105         * Makefile.in (LIBDEPS): Added gcc's errors.o
14106         (../jcf-dump$(exeext):): Link with gcc's errors.o
14107         (../gcjh$(exeext):): Likewise.
14108         * expr.c (expand_java_NEW): Layout the entire target type instead of
14109         laying out its methods only.
14110         (lookup_field): Layout the class after having loaded it.
14111         * java-tree.h (java_debug_context): Declared.
14112         * jcf-io.c (toplev.h): Included.
14113         (find_class): Removed assignment to jcf's outofsynch
14114         field. Force source file to be read if newer than its matching
14115         class file. Tweaked debug messages.
14116         * jcf-parse.c (jcf_out_of_synch): Deleted.
14117         (read_class): Call to jcf_out_of_synch removed.
14118         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14119         (jcf_out_of_synch): Prototype deleted.
14120         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14121         `deprecated' and `class_err': integer turned into bit-fields.
14122         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14123         * parse.y (package_list): New global.
14124         (package_declaration:): Record newly parsed package name.
14125         (extra_ctxp_pushed_p): Static global deleted.
14126         (java_parser_context_save_global): Create buffer context for the
14127         purpose of saving globals, if necessary.
14128         (java_parser_context_restore_global): Pop context pushed for the
14129         purpose of saving globals, if necessary.
14130         (java_debug_context_do): New prototype and function.
14131         (java_debug_context): Likewise.
14132         (do_resolve_class): Use already parsed package names to qualify
14133         and lookup class candidate.
14134         (java_pre_expand_clinit): Removed unnecessary local variable.
14135
14136 1999-12-17  Tom Tromey  <tromey@cygnus.com>
14137
14138         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14139         fixes PR gcj/119.
14140         (process_file): Use `\n\' at end of each line in string.
14141
14142 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14143
14144         * expr.c (expand_invoke): Layout the loaded class before
14145         attempting to use it.
14146         (expand_java_field_op): Allow final field assignments to take
14147         place in $finit$.
14148         * typeck.c (convert): Return error_mark_node if expr is null.
14149
14150 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14151
14152         * class.c (class_depth): Return -1 if the class doesn't load
14153         properly.
14154         * expr.c (can_widen_reference_to): Check for errors during depth
14155         computation and return 0 accordingly.
14156         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14157         create default constructors and add an other error check.
14158         * parse.h (java_fix_constructors): Prototyped.
14159         * parse.y (java_pre_expand_clinit): Likewise.
14160         (build_super_invocation): Re-prototyped to feature one argument.
14161         (java_check_circular_reference): Directly use `current'.
14162         (java_fix_constructors): New function.
14163         (java_check_regular_methods): Don't create default constructors
14164         here, but abort if none were found.
14165         (java_complete_expand_methods): Pre-process <clinit> calling
14166         java_pre_expand_clinit.
14167         (java_pre_expand_clinit): New function.
14168         (fix_constructors): build_super_invocation invoked with the
14169         current method declaration as an argument.
14170         (build_super_invocation): Use the context of the processed method
14171         decl argument instead of current_class.
14172         * typeck.c (lookup_java_method): Take WFLs in method names into
14173         account.
14174
14175 1999-12-14  Per Bothner  <per@bothner.com>
14176
14177         * class.c (make_class_data): flag_keep_inline_functions to keep
14178         private methods in the method array.
14179
14180 1999-12-15  Anthony Green  <green@cygnus.com>
14181
14182         * check-init.c (check_init): Take into account both types of
14183         `throw's when checking for uninitialized variables.
14184
14185 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14186
14187         * parse.y (java_complete_lhs): Force conversion of array
14188         dimensions to int_type_node, that's what runtime's ABI expects.
14189
14190 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14191
14192         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14193         operand of a WFL, until the Java front-end gets fixed with regard
14194         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14195
14196 1999-12-10  Andrew Haley  <aph@cygnus.com>
14197
14198         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14199         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14200         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14201         java-tree.h: Ditto.
14202         jcf-write.c: Ditto.
14203
14204 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14205
14206         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14207         before calling expand_eh_region_start and expand_start_all_catch.
14208         * except.c (expand_start_java_handler): Switch to permanent
14209         obstack before calling expand_eh_region_start.
14210         (expand_end_java_handler): Switch to permanent obstack before
14211         calling expand_start_all_catch.
14212
14213 1999-12-5  Anthony Green  <green@cygnus.com>
14214
14215         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14216         function with side effects.
14217         (init_decl_processing): Mark all memory allocating DECLs with
14218         DECL_IS_MALLOC.
14219
14220 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14221
14222         * except.c (expand_end_java_handler): Call
14223         expand_resume_after_catch and end_catch_handler.
14224
14225 1999-11-30  Anthony Green  <green@cygnus.com>
14226
14227         * verify.c (verify_jvm_instructions): Create new return label
14228         chain if non existent (don't rely on the verified state of the jsr
14229         target.)
14230
14231 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14232
14233         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14234         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14235
14236         * parse.y (patch_assignment): Removed bogus final class test on
14237         lhs when checking on whether to emit an ArrayStoreException runtime
14238         check.
14239         * expr.c (expand_java_arraystore): Likewise.
14240
14241 1999-11-28 Anthony Green <green@cygnus.com>
14242
14243         * decl.c (find_local_variable): Reuse single slot decls when
14244           appropriate.
14245
14246 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14247
14248         * jcf-parse.c (saw_java_source): Global variable removed.
14249         (read_class): Don't use `saw_java_source'. Added extra braces.
14250         (yyparse): Code setting `saw_java_source' removed.
14251
14252 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14253
14254         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14255
14256 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14257
14258         * verify.c (merge_type_state): Non verified subroutines being
14259         considered more than once to trigger passive type merge.
14260
14261 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14262
14263         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14264         in case of error. Error message tuned.
14265
14266 1999-11-21  Anthony Green  <green@cygnus.com>
14267
14268         * constants.c (find_methodref_index): Unwrap method names before
14269         inserting them in the constant pool.
14270
14271         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14272
14273         * class.c (assume_compiled_node): New typedef.
14274         (assume_compiled_tree): New static data.
14275         (find_assume_compiled_node): New function.
14276         (add_assume_compiled): New function.
14277         (assume_compiled): New function.
14278         * class.c (make_class_data): Use assume_compiled.
14279         (is_compiled_class): Use assume_compiled.
14280
14281         * java-tree.h (add_assume_compiled): Declare.
14282
14283         * lang.c (lang_decode_option): Parse new options.
14284
14285 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14286
14287         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14288         int_type_node: that's what `_Jv_AllocObject' expects.
14289
14290 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14291
14292         * parse.y (lookup_method_invoke): Use lang_printable_name to
14293         reliably build the type name during error report. Fixes PR gcj/97.
14294
14295 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14296
14297         * jcf-path.c: Include <sys/stat.h>.
14298         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14299         (DIR_UP): New macro.
14300
14301 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14302
14303         * parse.y (source_end_java_method): Resume permanent allocation,
14304         reversing Apr 27 1998 patch.
14305         (patch_string_cst): Pop obstacks after having pushed the permanent
14306         ones.
14307
14308 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14309
14310         * class.c (finish_class): Emit inlined methods if any native
14311         methods exist in the class.  Fixes PR gcj/85.
14312
14313 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14314
14315         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14316         (qualify_ambiguous_name): Likewise.
14317
14318 1999-11-03  Godmar Back <gback@cs.utah.edu>
14319
14320         * typeck.c: (lookup_java_method):  search all inherited
14321         interfaces when looking up interface method.
14322
14323 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14324
14325         * parse.y (method_header:): Issue error message for rule `type
14326         error'.
14327         (synchronized:): Error report when not using synchronized.
14328
14329 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14330
14331         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14332         being used before the superclass constructor has been called.
14333         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14334         instead of `CALL_THIS_CONSTRUCTOR_P'.
14335
14336 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14337
14338         * check-init.c: Fix typo in comment.
14339
14340 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14341
14342         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14343         and final method.
14344
14345 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14346
14347         * parse.y (expression_statement:): Call function to report
14348         improper invocation of a constructor.
14349         (parse_ctor_invocation_error): New function.
14350
14351 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14352
14353         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14354         remember_end_note.
14355
14356 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14357
14358         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14359         in generated `main'.
14360
14361 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14362
14363         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14364         (qualify_ambiguous_name): Likewise.
14365
14366 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14367
14368         * parse.y (java_complete_tree): fold_constant_for_init to work on
14369         permanent_obstack.
14370         (java_complete_lhs): Likewise.
14371         (array_constructor_check_entry): Complete an initializer element
14372         on permanent_obstack.
14373
14374 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14375
14376         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14377         From Mike Moreton <mike@pillim.demon.co.uk>.
14378
14379 1999-10-15  Greg McGary  <gkm@gnu.org>
14380
14381         * java-tree.h (flag_bounds_check): Remove extern decl.
14382         * lang.c (flag_bounds_check): Remove global variable.
14383         (lang_f_options): Remove "bounds-check" entry.
14384         (lang_init_options): Default flag_bounds_check to "on".
14385
14386 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14387
14388         * jvgenmain.c (usage): New function.
14389         (main): Use it.  Also, handle `-D' options.
14390         * jvspec.c (lang_specific_driver): Recognize -D.
14391         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14392
14393         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14394
14395 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14396
14397         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14398         variadic function with a non-literal format string.
14399
14400         * parse-scan.y (report_main_declaration): Likewise.
14401
14402         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14403
14404         * parse.y (read_import_dir, patch_assignment, patch_binop,
14405         patch_array_ref): Likewise.
14406
14407         * typeck.c (build_java_array_type): Likewise.
14408
14409         * verify.c (verify_jvm_instructions): Likewise.
14410
14411 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14412
14413         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14414
14415 1999-10-07  Anthony Green  <green@cygnus.com>
14416
14417         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14418         where CHECK_PUT may fail for valid reasons.
14419
14420         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14421         UNSAFE_PUTN): New macros.
14422
14423 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14424
14425         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14426         well.  Fixes Java PR gcj/59.
14427         * parse-scan.y (yyerror): Report errors.
14428
14429 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14430
14431         * decl.c (insert_block): Remove unconditional `abort'.
14432
14433 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14434
14435         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14436         FUNCTION_CODE now of type int.  All callers changed.
14437         Set the builtin's DECL_BUILT_IN_CLASS.
14438
14439 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14440
14441         * jvspec.c (lang_specific_driver): Don't read spec file if
14442         -fsyntax-only given.
14443
14444 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14445
14446         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14447
14448         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14449         (WORDS_TO_LONG): Likewise.
14450         (WORDS_TO_DOUBLE): Likewise.
14451
14452 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14453
14454         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14455         (RELOCATION_VALUE_1): Likewise.
14456         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14457         push_in_const, push_long_const): Prototyped.
14458         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14459         (push_constant2): Likewise.
14460         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14461         (find_constant_wide): Cast find_constant2's integer arguments to
14462         `jword'.
14463         (find_constant_index): Cast find_constant2's and find_constant2's
14464         integer arguments to `jword'.
14465         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14466         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14467         (emit_if): Use RELOCATION_VALUE_1.
14468         (emit_goto): Likewise.
14469         (emit_jsr): Likewise.
14470         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14471         argument to push_long_const to HOST_WIDE_INT.
14472
14473 1999-09-15  Andreas Schwab  <schwab@suse.de>
14474
14475         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14476
14477 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14478
14479         * lang.c (lang_decode_option): Extend comment.
14480
14481 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14482
14483         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14484         instead of fndecl.
14485
14486 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14487
14488         * gjavah.c (get_field_name, print_method_info, print_include,
14489         add_namelet): Use xmalloc, not malloc.
14490
14491         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14492         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14493         NULL pointer.
14494
14495         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14496
14497         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14498
14499         * jcf-path.c (add_entry): Likewise.
14500
14501         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14502
14503         * jv-scan.c (xmalloc): Remove definition.
14504
14505         * jvgenmain.c (xmalloc): Likewise.
14506
14507         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14508
14509         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14510
14511         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14512         concat, not xmalloc/sprintf.
14513         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14514         (xstrdup): Remove definition.
14515
14516         * parse.y (duplicate_declaration_error_p,
14517         constructor_circularity_msg, verify_constructor_circularity,
14518         check_abstract_method_definitions, java_check_regular_methods,
14519         java_check_abstract_methods, patch_method_invocation,
14520         check_for_static_method_reference, patch_assignment, patch_binop,
14521         patch_cast, array_constructor_check_entry, patch_return,
14522         patch_conditional_expr): Use xstrdup, not strdup.
14523
14524         * zextract.c (ALLOC): Use xmalloc, not malloc.
14525
14526 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14527
14528         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14529
14530         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14531         (do_spec, lang_specific_pre_link, lang_specific_driver,
14532         input_filename, input_filename_length): Don't declare.
14533         (main_class_name, jvgenmain_spec, lang_specific_driver):
14534         Constify a char*.
14535         (lang_specific_driver): All calls to the function pointer
14536         parameter now explicitly call `fatal'.
14537
14538 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14539
14540         * parse.y (find_applicable_accessible_methods_list): Search
14541         abstract classes as interfaces.
14542
14543 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14544
14545         * class.c (finish_class): We're now outside a valid method
14546         declaration. Tell the rest of gcc so.
14547
14548 1999-09-08  Bruce Korb  autogen@linuxbox.com
14549
14550         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14551
14552 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14553
14554         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14555         java-array.h.
14556         (decode_signature_piece): Don't emit "::" in JArray<>.
14557         (print_namelet): Only print trailing `;' when printing a class.
14558
14559 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14560
14561         * java-tree.h: Delete declarations for all tree nodes now moved to
14562         global_trees.
14563         * decl.c: Delete their definitions.
14564
14565 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14566
14567         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14568         * Makefile.in (OBJS): Add ggc-callbacks.o.
14569         (OBJDEPS): Likewise.
14570
14571 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14572
14573         * parse.y (strip_out_static_field_access_decl): Return operand if
14574         it satisfies JDECL_P.
14575
14576 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14577
14578         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14579         Handle nested arrays, like `[[I'.
14580
14581 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14582
14583         * class.c (finish_class): Remove unused parameter, all callers
14584         changed.
14585
14586         * expr.c (build_java_athrow): Change return type to void.
14587         (java_lang_expand_expr): Make sure each case in switch returns a
14588         value.
14589
14590         * java-tree.h (finish_class): Fix prototype to take void args.
14591
14592         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14593         (main): Issue return from main, not exit.
14594
14595         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14596
14597         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14598
14599         * jv-scan.c (main): Issue return from main, not exit.
14600
14601         * parse.y (check_abstract_method_definitions,
14602         java_check_abstract_method_definitions): Add static prototypes.
14603         (java_complete_expand_methods): Fix call to `finish_class'.
14604
14605         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14606         and `prevpc'.
14607
14608 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14609
14610         * lang.c (language_string): Constify.
14611
14612 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14613
14614         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14615         Remove hacks for stuff which comes from libiberty.
14616
14617         * Make-lang.in: Likewise.
14618
14619 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14620
14621         * Makefile.in (xref.o): Depend on xref.c explicitly.
14622
14623 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14624
14625         * java-tree.h (lang_printable_name): Constify a char*.
14626
14627         * lang.c (lang_printable_name): Likewise.
14628
14629 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14630
14631         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14632         comments in C code.
14633
14634 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14635
14636         * gjavah.c (print_cxx_classname): Print "::" before qualified
14637         name.
14638
14639 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14640
14641         * parse.y (lookup_cl): Changed leading comment. Now does its best
14642         to set the column number.
14643         (qualify_ambiguous_name): Take WFL wrappers into account.
14644
14645 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14646
14647         * verify.c (verify_jvm_instructions): Don't check instruction
14648         validity beyond end of method.
14649
14650 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14651
14652         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14653
14654 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14655
14656         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14657         cxx_keyword_subst, generate_access, name_is_method_p,
14658         get_field_name, print_field_name, super_class_name, print_include,
14659         decode_signature_piece, print_class_decls, usage, help,
14660         java_no_argument, version, add_namelet, print_namelet): Add static
14661         prototype.
14662         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14663         name_is_method_p): Constify a char*.
14664         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14665         Provide a final else clause in an if-else-if.
14666         (print_field_info): Add missing final arg in function call to
14667         `print_field_name'.
14668         (print_method_info, decompile_method, decode_signature_piece,
14669         print_c_decl, print_full_cxx_name, print_stub,
14670         print_mangled_classname, super_class_name, print_include,
14671         add_namelet, add_class_decl, print_class_decls, process_file,
14672         help): Constify a char*.
14673
14674         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14675         push_int_const, find_constant_wide, find_constant_index,
14676         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14677         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14678         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14679         emit_if, emit_goto, emit_jsr, call_cleanups,
14680         make_class_file_name): Add static prototypes.
14681         (generate_bytecode_return, generate_bytecode_insns): Pass a
14682         NULL_PTR, not a NULL_TREE.
14683
14684         * jv-scan.c: Include "jcf.h".
14685         (main): Declare using DEFUN macro.
14686
14687         * jvspec.c (find_spec_file, lang_specific_pre_link,
14688         lang_specific_driver): Add prototypes.
14689         (find_spec_file): Constify a char*.
14690
14691         * keyword.gperf (hash, java_keyword): Add prototypes.
14692
14693         * lang.c (lang_print_error): Add static prototype.
14694         (lang_init): Prefer memcpy over bcopy to avoid casts.
14695
14696         * lex.c (yylex): Add static prototype.
14697
14698         * parse-scan.y: Include "lex.c" earlier.
14699
14700         * parse.h: Remove redundant declaration for `yylex'.
14701
14702         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14703         labeled_block_contains_loop_p): Add static prototypes.
14704         (not_accessible_p): Make static to match prototype.
14705
14706         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14707
14708 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14709
14710         * parse.y (check_method_redefinition): Changed leading comment.
14711         (check_abstract_method_definitions): New function.
14712         (java_check_abstract_method_definitions): New function.
14713         (java_check_regular_methods): Call it.
14714         (verify_constructor_super): Fixed indentation.
14715         (lookup_method_invoke): Likewise.
14716
14717 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14718
14719         * parse.y (method_header): Return a null pointer if the current
14720         class node is null.
14721         (finish_method_declaration): Return if the current function decl
14722         is null.
14723         (source_start_java_method): Likewise.
14724         (java_method_add_stmt): Likewise.
14725
14726 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14727
14728         * class.c (emit_register_class): Removed unnecessary call to
14729         start_sequence.
14730         * parse.y (labeled_block_contains_loop_p): Removed unused local
14731         variable.
14732
14733 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14734
14735         * parse.y (java_refold): Added prototype.
14736
14737 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14738
14739         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14740         (java_stabilize_reference): Removed unnecessary `else'.
14741         (java_complete_lhs): Set flag to remember boolean. Call
14742         java_refold. Added comments.
14743         (java_decl_equiv): New function.
14744         (binop_compound_p): Likewise.
14745         (java_refold): Likewise.
14746         (patch_unaryop): Striped static field access assigned to decl and
14747         op. Changed promotion scheme for ++/-- operators.
14748         (search_loop): New function.
14749         (labeled_block_contains_loop_p): Likewise.
14750         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14751         comment.
14752         (patch_bc_statement): Call search_loop. Fixed comment.
14753
14754 1999-08-14  Anthony Green  <green@cygnus.com>
14755
14756         * expr.c (java_lang_expand_expr): Mark static array data as
14757         referenced.
14758
14759 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14760
14761         * jvgenmain.c (main): NUL-terminate name_obstack.
14762
14763 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14764
14765         * check-init.c (check_bool2_init, done_alternative): Add static
14766         prototypes.
14767
14768         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14769         (add_method, build_utf8_ref, build_class_ref,
14770         append_gpp_mangled_type, layout_class_method): Constify a char*.
14771
14772         * decl.c (push_promoted_type, make_binding_level): Add static
14773         prototypes.
14774         (push_promoted_type, pushdecl): Constify a char*.
14775
14776         * except.c (find_handler_in_range, link_handler,
14777         check_start_handlers): Add static prototypes.
14778
14779         * expr.c (process_jvm_instruction): Constify a char*.
14780
14781         * gjavah.c (main): Constify a char*.
14782
14783         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14784         Constify a char*.
14785
14786         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14787         static prototypes.
14788         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14789         munge, print_ents): Constify a char*.
14790
14791         * jcf-dump.c (disassemble_method): Constify a char*.
14792         (print_constant_pool, print_exception_table): Add static prototypes.
14793         (print_constant, print_exception_table, main, disassemble_method):
14794         Constify a char*.
14795
14796         * jcf-io.c (find_classfile, find_class): Likewise.
14797
14798         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14799         (set_source_filename, predefined_filename_p): Add static prototypes.
14800         (set_source_filename, get_constant, get_class_constant,
14801         find_in_current_zip): Constify a char*.
14802
14803         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14804         static prototypes.
14805         (add_entry, add_path, jcf_path_classpath_arg,
14806         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14807
14808         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14809         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14810         jcf_parse_one_method, jcf_parse_methods,
14811         jcf_parse_final_attributes): Add static prototypes.
14812         (get_attribute): Constify a char*.
14813
14814         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14815         jcf_dependency_add_target, jcf_path_classpath_arg,
14816         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14817
14818         * jv-scan.c (main): Constify a char*.
14819         (gcc_obstack_init): Add prototype arguments.
14820
14821         * jvgenmain.c (gcc_obstack_init): Likewise.
14822         (main): Constify a char*.
14823
14824         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14825         static prototypes.
14826         (put_decl_string, lang_print_error): Constify a char*.
14827         (lang_init): Remove redundant extern prototype.
14828
14829         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14830
14831         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14832         Add static prototypes.
14833         (get_type_from_signature): Constify a char*.
14834
14835         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14836         Add static prototypes.
14837         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14838         (verify_jvm_instructions): Constify a char*.
14839
14840         * xref.c (xref_flag_value): Likewise.
14841
14842         * xref.h (xref_flag_value): Likewise.
14843
14844         * zextract.c (makeword, makelong): Add static prototypes.
14845         (makeword, makelong): Constify a uch*.
14846
14847 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14848
14849         * lang.c (java_dummy_print): Constify a char*.
14850         (lang_print_error): Likewise.
14851         (lang_init): Remove redundant prototype for `print_error_function'.
14852         (lang_init_source): Likewise.
14853         (lang_identify): Constify a char*.
14854
14855 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14856
14857         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14858         (WORDS_TO_LONG): Likewise.
14859         (WORDS_TO_DOUBLE): Likewise.
14860
14861 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14862
14863         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14864
14865         * expr.c (java_stack_pop, java_array_data_offset,
14866         build_java_throw_out_of_bounds_exception, case_identity,
14867         build_java_check_indexed_type): Add static prototypes.
14868         (linenumber_table, expand_invoke, expand_java_field_op,
14869         build_primtype_type_ref, expand_byte_code): Constify a char*.
14870
14871         * java-tree.h (build_primtype_type_ref, linenumber_table):
14872         Constify a char*.
14873         (java_lang_expand_expr): Add prototype.
14874
14875         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14876         `java_lang_expand_expr'.
14877
14878         * lex.c (java_lex_error): Constify a char*.
14879         (java_get_unicode, java_read_char, java_allocate_new_line,
14880         java_unget_unicode, java_sneak_unicode): Prototype.
14881
14882         * parse-scan.y (current_class, package_name, method_declarator,
14883         report_class_declaration, yyerror): Constify a char*.
14884
14885         * parse.h (java_report_errors): Prototype.
14886         (yyerror): Constify a char*.
14887
14888         * parse.y (classitf_redefinition_error, check_modifiers,
14889         parse_jdk1_1_error, lookup_package_type,
14890         lookup_package_type_and_set_next, get_printable_method_name,
14891         purify_type_name): Constify a char*.
14892         (build_super_invocation, maybe_generate_finit,
14893         verify_constructor_super, parser_add_interface,
14894         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14895         java_complete_expand_methods, java_expand_finals,
14896         cut_identifier_in_qualified, java_stabilize_reference,
14897         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14898         merge_string_cste): Prototype.
14899         (single_type_import_declaration, yyerror,
14900         variable_redefinition_error, build_array_from_name,
14901         build_unresolved_array_type, check_class_interface_creation,
14902         resolve_class, complete_class_report_errors,
14903         note_possible_classname, read_import_dir,
14904         find_in_imports_on_demand, resolve_package, fix_constructors,
14905         check_deprecation, lookup_method_invoke,
14906         maybe_build_primttype_type_ref, array_constructor_check_entry):
14907         Constify a char*.
14908         (java_complete_expand_methods, java_expand_finals): Make static.
14909         (convert_narrow): Remove static prototype.
14910
14911 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14912
14913         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14914
14915 1999-08-02  Richard Henderson  <rth@cygnus.com>
14916
14917         * decl.c: Include defaults.h instead of expr.h.
14918         * parse.y: Likewise.
14919
14920 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14921
14922         * java/decl.c (start_java_method): Change all uses of
14923         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14924         Ensure expr.h is included.
14925         * java/expr.c (pop_arguments): Ditto.
14926         * java/parse.y (expand_start_java_method): Ditto.
14927
14928 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14929
14930         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14931
14932 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14933
14934         * decl.c: Include "function.h".
14935         * except.c: Likewise.
14936         * parse.y: Likewise.
14937         * Makefile.in: Update dependencies.
14938
14939 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14940
14941         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14942         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14943         `modifier' with ATTRIBUTE_UNUSED.
14944
14945         * gjavah.c (process_file): Add braces around ambiguous `else'.
14946
14947         * jcf-dump.c (print_access_flags, localvar_free): Change return
14948         type to void.
14949
14950         * parse.y (java_complete_expand_method): Initialize variable
14951         `exception_copy'.
14952         (resolve_qualified_expression_name): Likewise for `field_decl'.
14953         (patch_method_invocation): Likewise for `class_to_search'.
14954         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14955         (patch_assignment): Likewise for `lhs_type'.
14956
14957         * verify.c (verify_jvm_instructions): Remove unused variable
14958         `caller'.
14959
14960 1999-07-25  Richard Henderson  <rth@cygnus.com>
14961
14962         * decl.c (va_list_type_node): New.
14963
14964 1999-07-25  Anthony Green  <green@cygnus.com>
14965
14966         * gjavah.c (print_stub): New function.
14967         (METHOD_IS_NATIVE): New macro.
14968         (print_mangled_classname): Make static.
14969         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14970         (process_file): Perform stub generation.
14971         (HANDLE_METHOD): Don't emit class decls during stub
14972         generation.
14973         (HANDLE_END_METHOD): Take into account stub generation.
14974         (print_method_info): Handle stub generation.
14975         (print_stub): New function.
14976         (print_cxx_classname): Make signature consistant with others.
14977         (help): Describe -stubs option.
14978         (main): Create stub file.
14979         (version): Use version.c.
14980         (print_full_cxx_name): New function.
14981         (print_c_decl): Use print_full_cxx_name.
14982
14983 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14984
14985         * check-init.c (check_init): Handle MAX_EXPR.
14986
14987 1999-07-15  Andrew Haley  <aph@cygnus.com>
14988
14989         * lang.c (flag_use_divide_subroutine): New variable.
14990         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14991         fp-to-integer conversion.
14992         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14993         is not set.
14994
14995         * expr.c (build_java_soft_divmod): New function.
14996         (build_java_binop): Call build_java_soft_divmod if
14997         flag_use_divide_subroutine is set.
14998         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14999         soft_lrem_node: new builtin functions.
15000         (init_decl_processing) Initialize the new builtins.
15001         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15002         soft_lrem_node: new builtin functions.
15003         (build_java_soft_divmod): New function.
15004         * parse.y: Call build_java_soft_divmod if
15005         flag_use_divide_subroutine is set.
15006         * parse.c: Rebuilt.
15007
15008         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15009         a --specs= arg) even if not linking.
15010         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15011         -fuse-divide-subroutine
15012
15013 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15014
15015         * parse.y (resolve_and_layout): Check methods only once.
15016         (resolve_qualified_expression_name): Verify thrown exceptions
15017         compatibility.
15018         (check_thrown_exceptions): Reject exceptions thrown in
15019         initializer. Error message tuned.
15020
15021 1999-07-14  Andrew Haley  <aph@cygnus.com>
15022
15023         * expr.c (expand_expr): Do not return the last statement in a
15024         block as the block's value.
15025
15026 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15027
15028         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15029         CALL_EXPR, to avoid order of evaluation changes.
15030
15031 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15032
15033         * parse.y (qualify_ambiguous_name): Do not use
15034         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15035
15036 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15037
15038         * check-init.c (check_init): Handle MAX_EXPR.
15039         * expr.c (force_evaluation_order): Force method call arguments to
15040         be evaluated in left-to-right order.
15041         * parse.y (qualify_ambiguous_name): Loop again to qualify
15042         NEW_ARRAY_EXPR properly.
15043
15044 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15045
15046         * parse.y (patch_invoke): Resolve unresolved invoked method
15047         returned type.
15048         (qualify_ambiguous_name): STRING_CST to qualify expression for
15049         type name resolution.
15050
15051 1999-06-24  Andrew Haley  <aph@cygnus.com>
15052
15053         * class.c (finish_class): Whenever a deferred method is
15054         output, rescan the list of methods to see if a new candidate for
15055         output can be found.
15056
15057 1999-06-28  Tom Tromey  <tromey@cygnus.com>
15058
15059         * jvspec.c (lang_specific_driver): Recognize --help.
15060
15061 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15062
15063         * parse.y (resolve_package): Fixed bogus return statement.
15064         (patch_method_invocation): Resolve method invocation beginning with
15065         a package name qualifier.
15066
15067 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15068
15069         * Make-lang.in (java.stage1): Depend on stage1-start.
15070         (java.stage2): Likewise for stage2-start.
15071         (java.stage3): Likewise for stage3-start.
15072         (java.stage4): Likewise for stage4-start.
15073
15074 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15075
15076         * parse.y (java_complete_lhs): When doing cross referencing, don't
15077         try to keep file location on a WFL expanded as a CALL_EXPR.
15078
15079 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15080
15081         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15082         compiling to class file a void method with an empty method body.
15083         As a side effect, the bytecode backend will generate the
15084         appropriate `return' instruction.
15085
15086 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15087
15088         * parse.y (lookup_package_type_and_set_next): New function prototype.
15089         (resolve_package): Search current and imported packages.
15090         (lookup_package_type_and_set_next): New function.
15091
15092 1999-06-22  Andrew Haley  <aph@cygnus.com>
15093
15094         * verify.c (verify_jvm_instructions): Check for pending blocks
15095         before invalid PC test and opcode switch, not after.
15096
15097 1999-06-21  Andrew Haley  <aph@cygnus.com>
15098
15099         * except.c (find_handler_in_range): The upper limit for exception
15100         ranges is exclusive, not inclusive: (start <= pc < end).
15101         (link_handler): find child pointer which points to outer by
15102         searching sibling list: previous code incorrectly assumed that
15103         outer->outer->first_child must point to outer.
15104         * verify.c (verify_jvm_instructions): FIXME added to code for
15105         `athrow'.
15106         (verify_jvm_instructions): Do not assume that the last block
15107         processed in a subroutine is a block which ends with a `ret'
15108         instruction.  With some control flows it is possible that the last
15109         block ends with an `athrow'.
15110
15111 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15112
15113         * parse.y (qualify_ambiguous_name): Reorganized the post
15114         evaluation of non WFL leading expression nodes.
15115
15116 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15117
15118         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15119         CONVERT_EXPR.
15120
15121 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15122
15123         * parse.y (qualify_ambiguous_name): Handle qualified expression
15124         beginning with a STRING_CST.
15125
15126 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15127
15128         * parse.y (register_fields): Set DECL_INITIAL on both
15129         pre-initialized static and public fields.
15130         (resolve_field_access): Static field access expressions to always
15131         use pointer types.
15132         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15133         qualification. CONVERT_EXPR to be resolved as an expression name.
15134         (java_complete_lhs): Identify and access qualified final
15135         initialized field in switch statement case expression.
15136         (fold_constant_for_init): Pre-initialized field decl constant to
15137         be folded.
15138
15139 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15140
15141         * parse.y (note_possible_classname): Mark returned node with
15142         QUALIFIED_P only if the original class name contained a '/'.
15143
15144 1999-06-05  Anthony Green  <green@cygnus.com>
15145
15146         * Make-lang.in (gcjh): More parallel build fixes.
15147
15148 1999-06-03  Mike Stump  <mrs@wrs.com>
15149
15150         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15151
15152 1999-06-02  Anthony Green  <green@cygnus.com>
15153
15154         * except.c (link_handler): Chain exception handlers in order.
15155
15156 1999-06-02  Anthony Green  <green@cygnus.com>
15157
15158         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15159         with nops and process as usual in order to always set correct EH
15160         ranges.  Emit detailed warnings about unreachable bytecodes.
15161
15162 1999-06-02  Anthony Green  <green@cygnus.com>
15163
15164         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15165         constant.
15166
15167 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15168
15169         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15170           or the searched field decl.
15171
15172 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15173
15174         * parse.y (fold_constant_for_init): Convert numerical constant
15175         values to the type of the assigned field.
15176
15177 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15178
15179         * expr.c (lookup_field): Relaxed the test on class loading error
15180         detection.
15181         * parse.y (fold_constant_for_init): Enabeled old code.
15182
15183 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15184
15185         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15186         decide the validity of the cast of a java.lang.Cloneable reference
15187         to an array.
15188         (patch_conditional_expr): Fixed first argument passed to
15189         binary_numeric_promotion.
15190
15191 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15192
15193         * parse.y (qualify_ambiguous_name): Take into account that a
15194         CONVERT_EXPR might specify a type as a WFL.
15195
15196 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15197
15198         * parse.y (patch_assignment): Save the rhs before using it as an
15199         argument to _Jv_CheckArrayStore.
15200
15201 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15202
15203         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15204
15205 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15206
15207         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15208         floating point literal only when the exponent indicator has been
15209         parsed.
15210
15211 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15212
15213         * parse.y (formal_parameter:): Construct argument tree list
15214         element even if a yet unsupported final parameter was encountered.
15215
15216 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15217
15218         * parse.y (finish_method_declaration): Issue errors for native or
15219         abstract methods declared with a method body, as well as for non
15220         native or non abstract methods with no method body.
15221
15222 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15223
15224         * class.c (build_utf8_ref): Initialize variable `field'.
15225
15226         * decl.c (init_decl_processing): Initialize variable `field'.
15227
15228         * expr.c (build_known_method_ref): Mark parameters `method_type',
15229         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15230         (process_jvm_instruction): Likewise for parameter `length'.
15231
15232         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15233         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15234         ATTRIBUTE_UNUSED.
15235
15236         * parse.y (maybe_generate_clinit): Remove unused variable
15237         `has_non_primitive_fields'.
15238         (find_in_imports_on_demand): Initialize variables `node_to_use'
15239         and `cl'.
15240         (patch_binop): Likewise for variable `prom_type'.
15241         (patch_unaryop): Likewise for variable `prom_type'.
15242
15243         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15244
15245         * xref.c (xref_table): Add missing initializer.
15246
15247 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15248
15249         * java-except.h (struct eh_range): Removed unused `next' member.
15250         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15251         after adding all exception handlers.  Sort exception ranges in
15252         order of start PC.
15253         (struct pc_index): New structure.
15254         (start_pc_cmp): New function.
15255         * except.c (add_handler): Return `void'.  Don't call link_handler;
15256         instead construct an ordinary linked list and do range
15257         coalescing.
15258         (check_nested_ranges): New function.
15259         (link_handler): Changed interface to allow merging of eh_ranges.
15260         Split overlapping ranges.  Return `void'.
15261
15262 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15263
15264         * parse.y (constructor_block_end:): New rule, tagged <node>.
15265         (constructor_body:): Use `constructor_block_end' instead of
15266         `block_end'.
15267
15268 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15269
15270         * parse.y (statement_nsi:): Pop `for' statement block.
15271         (java_complete_lhs): Labeled blocks containing no statement are
15272         marked as completing normally.
15273
15274 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15275
15276         * xref.c (xref_set_current_fp): New function, defined.
15277         * xref.h (xref_set_current_fp): New function, prototyped.
15278
15279 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15280
15281         * check-init.c (check_init): Take into account that
15282         LABELED_BLOCK_STMT can be empty.
15283
15284 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15285
15286         * parse.y (java_check_regular_methods): Warning check on not
15287         overriding methods with default access in other packages does not
15288         apply to `<clinit>'.
15289         (java_complete_lhs): If block body is an empty_stmt_node, replace
15290         it by NULL_TREE. This prevents gcc from generating an irrelevant
15291         warning.
15292
15293 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15294
15295         * check-init.c (check_init): Removed code accepting to see things
15296         falling through default:, when doing xrefs.
15297         * java-tree.h (do_not_fold): New global variable, declared.
15298         * parse.y (do_not_fold): New global variable, defined.
15299         (java_complete_expand_method): Set `do_not_fold' to the value of
15300         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15301         and reinstall them after them have been purged; do not check for
15302         initializations; do not issue missing return errors.
15303         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15304         when doing xrefs.
15305         (patch_binop): Skip the fold part when doing xrefs.
15306         (build_string_concatenation): Skip the concatenation part when
15307         doing xrefs.
15308         (patch_synchronized_statement): Do not generate a try-finally when
15309         doing xrefs.
15310         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15311         and keep the location where the throw was seen.
15312         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15313         any treatment on the converted node an simply return a NOP_EXPR of
15314         the targeted type.
15315         * xref.c (xref_get_data): New function, defined.
15316         * xref.h (xref_get_data): New function, declared.
15317         (XREF_GET_DATA): Use xref_get_data.
15318
15319 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15320
15321         * gjavah.c (print_include): Cast the result of `strlen' to int
15322         when comparing against a signed value.
15323         (add_namelet): Likewise.
15324
15325 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15326
15327         * expr.c (expand_invoke): Mark parameter `nargs' with
15328         ATTRIBUTE_UNUSED.
15329         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15330
15331         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15332         ATTRIBUTE_UNUSED.
15333
15334         * jcf-reader.c (get_attribute): Cast a value to long
15335         when comparing against a signed expression.  Likewise.
15336
15337         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15338         HOST_BITS_PER_CHAR.
15339
15340 1999-05-11  Andrew Haley  <aph@cygnus.com>
15341
15342         * parse.y (source_end_java_method): If the current method contains
15343         any exception handlers, force asynchronous_exceptions: this is
15344         necessary because signal handlers in libjava may throw exceptions.
15345         * decl.c (end_java_method): Ditto.
15346
15347 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15348
15349         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15350         flags.
15351         * jvspec.c (THREAD_NAME): Removed.
15352         (GC_NAME): Likewise.
15353         (MATHLIB): Likewise.
15354         (WITHLIBC): Likewise.
15355         (GCLIB): Likewise.
15356         (THREADLIB): Likewise.
15357         (MATH_LIBRARY): Likewise.
15358         (lang_specific_driver): Don't add `-l' options to command line.
15359         Instead, add a single --specs option.  Recognize `-L' options and
15360         use them to search for spec file.
15361         (find_spec_file): New function.
15362         (SPEC_FILE): New define.
15363
15364 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15365
15366         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15367         cpplib-enabled build.
15368
15369 1999-05-05  Per Bothner  <bothner@cygnus.com>
15370
15371         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15372         temporarily zero it while calling rest_of_decl_compilation.
15373
15374         * java-tree.h (string_ptr_type_node):  Add declaration.
15375         * decl.c:  Define and initialize string_ptr_type_node.
15376         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15377
15378         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15379         * parse.y (for_statement):  Now unconditionally exit_block.
15380         (finish_labeled_statement):  No longer exit_block if for-loop.
15381         (patch_loop_statement):  Check harder if the loop is already labeled.
15382
15383         * parse.y (patch_initialized_static_field):  Removed function.
15384         (maybe_generate_clinit):  Removed special handling for interfaces.
15385         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15386         on <clinit> to determine if it can be removed.
15387         (java_complete_expand_method):  Remove special handling for <clinit>.
15388         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15389         optimize if we get back empty_stmt_node.
15390         For MODIFY_EXPR, re-do checking of static initializers.
15391         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15392         For VAR_DECL, pass correct context.
15393
15394         * verify.c (verify_jvm_instructions):  Better error messages.
15395
15396 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15397
15398         * parse-scan.y (interface_declaration): Call
15399         report_class_declaration for interfaces.
15400
15401 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15402
15403         * Makefile.in: Remove -v from bison command lines.
15404
15405 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15406
15407         * check-init.c (check_init): Exclude a case of error when doing
15408         xrefs.
15409         * class.c (layout_class_method): Don't generate the error message
15410         twice when compiling from source.
15411         * lang-options.h: Added `-Wredundant-modifers' and
15412         `-Wunusupported-jdk11' flags and help text.
15413         * lang.c (lang_decode_option): Added support for
15414         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15415         flag_static_local_jdk11 and flag_redundant set accordingly.
15416         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15417         * parse.h (EXPR_WFL_ADD_COL): New macro.
15418         (DECL_END_SOURCE_LINE): Likewise.
15419         (DECL_INHERITED_SOURCE_LINE): Likewise.
15420         * parse.y (static_ref_err): New function, prototyped.
15421         (CCB_TK): Now tagged <operator>.
15422         (class_body:): Remember the location of the closing '}' of a class
15423         definition when doing xrefs.
15424         (block:): Likewise.
15425         (block_end:): Likewise.
15426         (create_class): Remember the location of the inherited class
15427         identifier when doing xrefs.
15428         (register_fields): Added test on first operand of `init' before
15429         testing it TREE_CODE.
15430         (method_header): Store the location of the class identifier in the
15431         class decl when doing xrefs.
15432         (finish_method_declaration): Don't combine first/last method line
15433         when doing xref.
15434         (java_check_regular_methods): Warning check on not overriding
15435         methods with default access on other packages move before check on
15436         static methods. Initialization of `aflags' also moved up.
15437         (resolve_expression_name): Call static_ref_err to report the error.
15438         (static_ref_err): New function, implemented.
15439         (resolve_field_access): Returned simplified static field access
15440         when doing xrefs.
15441         (resolve_qualified_expression_name): Check for illegal use of
15442         static fields in a non static context. Call static_ref_err to
15443         report error in various places.
15444         (java_complete_tree): Do not fold initialized static fields when
15445         doing xrefs.
15446         (java_complete_lhs): Likewise.
15447
15448 1999-04-29  Anthony Green  <green@cygnus.com>
15449
15450         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15451         create internal labels.
15452         (lookup_label): Ditto.
15453
15454 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15455
15456         * class.c (layout_class_method): Generate <clinit>'s rtl for
15457         interfaces.
15458         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15459         for interfaces' <clinit>.
15460         * expr.c (lookup_field): Search for fields in interfaces.
15461         (expand_invoke): Fixed indentation.
15462         (expand_java_field_op): Likewise. Use IS_CLINIT.
15463         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15464         (IS_CLINIT): New macro.
15465         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15466         interface was parsed.
15467         (maybe_generate_clinit): Don't generate if the current class is an
15468         interface with only fields of primitive types.
15469         (reset_method_name): Use IS_CLINIT.
15470         (java_complete_expand_method): Expand <clinit> when it exists for
15471         interfaces. Use IS_CLINIT.
15472         (resolve_expression_name): Use DECL_CONTEXT instead of
15473         current_class to build static field references.
15474         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15475         ARRAY_REF when doing xreferencing.
15476         (check_final_assignment): Fixed typo in leading comment. Use
15477         IS_CLINIT.
15478         (patch_array_ref): Don't fully expand array references when
15479         xreferencing.
15480         (patch_return): Use IS_CLINIT.
15481         (patch_throw_statement): Likewise.
15482
15483 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15484
15485         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15486
15487 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15488
15489         * decl.c (predef_filenames, predef_filenames_size): New globals
15490         (init_decl_processing): predef_filenames and predef_filenames_size
15491         initialized.
15492         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15493         extern.
15494         * jcf-parse.c (predefined_filename_p): New function.
15495         (yyparse): Check that files on the command line are specified only
15496         once and issue a warning otherwise.
15497         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15498         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15499         avoid a gcc warning with -W -Wall turned on.
15500         (java_expand_classes): Abort if errors were encountered.
15501         (java_complete_lhs): If the cross reference flag is set, wrap
15502         field DECL node around a WFL when resolving expression name.
15503
15504 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15505
15506         * lang.c (lang_decode_option): Fixed returned value when parsing
15507         `-fxref=...' and `-Wall'.
15508         * parse.y (source_end_java_method): Do not generate code when
15509         flag_emit_xref is set.
15510         (resolve_expression_name): Do not build static field access when
15511         flag_emit_xref is set.
15512         (resolve_field_access): No special treatment on `length' when
15513         flag_emit_xref is set. Do not build qualified static field access
15514         when flag_emit_xref is set.
15515         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15516         when flag_emit_xref is set.
15517         (patch_assignment): Do not generate array store runtime check when
15518         flag_emit_xref is set.
15519         * xref.c (xref_flag_value): Fixed function declaration
15520         indentation.
15521         (xset_set_data): New function.
15522         * xref.h (xref_set_data): Added prototype for new function.
15523         (typedef struct xref_flag_table): New field data.
15524         (XREF_GET_DATA): New macro.
15525
15526 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15527
15528         * xref.h (enum): Removed trailing comma.
15529
15530         * parse.y (resolve_qualified_expression_name): Added missing
15531         `break'.
15532
15533 1999-04-15  Anthony Green  <green@cygnus.com>
15534
15535         * gjavah.c: New prototypes for java_float_finite and
15536         java_double_finite.
15537
15538 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15539
15540         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15541         references.
15542
15543 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15544
15545         * Makefile.in (TREE_H): Add tree-check.h.
15546         (RTL_H): Add genrtl.h.
15547
15548 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15549
15550         * parse.y (patch_assignment): Added ArrayStoreException runtime
15551         check.
15552
15553 1999-04-06  Per Bothner  <bothner@cygnus.com>
15554
15555         * expr.c (pop_type_0):  New function.
15556         (pop_type):  Use pop_type_0.
15557         * java-tree.h (pop_type_0):  New declaration.
15558         * verify.c (verify_jvm_instructions):  Check return instructions.
15559
15560         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15561         class files.
15562
15563 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15564
15565         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15566
15567         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15568         (main_jcf): Don't define.
15569         (process_file): Don't set `main_jcf'.
15570
15571         * java-tree.h (main_jcf): Don't declare.
15572
15573         * jcf-parse.c (main_jcf): Add static definition.
15574
15575         * lang.c (main_jcf): Don't define.
15576
15577 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15578
15579         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15580
15581         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15582
15583         * jcf-depend.c: Include "config.h", not <config.h>.
15584
15585         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15586         `bcopy' to PTR.
15587
15588         * jcf-path.c: Include "config.h", not <config.h>.
15589
15590         * lex.c: Don't include various system header files.
15591         (java_init_lex): Cast the argument of `bzero' to PTR
15592
15593         * parse-scan.y (java_push_parser_context): Likewise.
15594
15595         * parse.y (java_push_parser_context): Likewise.
15596         (patch_bc_statement): Match format specifier to variable argument.
15597
15598         * xref.c: Don't include <stdio.h>.
15599
15600 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15601
15602         * parse.y (struct parser_ctxt *ctxp): Now global.
15603         (declare_local_variables): Use WFL compound value for the
15604         declaration source line value, when doing cross-referencing.
15605
15606 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15607
15608         * gjavah.c (print_field_info): Allow constants of other types.
15609         (print_include): Generate include when new name is proper prefix
15610         of already printed name.
15611         (add_namelet): Likewise.
15612         (cxx_keyword_subst): New function.
15613         (print_method_info): Use it.
15614         (print_field_name): New function.
15615         (get_field_name): New function.
15616         (print_field_info): Use get_field_name and print_field_name.
15617
15618 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15619
15620         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15621         'KR-C', so gperf uses the `const' keyword on strings.
15622
15623         * keyword.gperf (java_keyword): Const-ify a char*.
15624
15625 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15626
15627         * parse.y (patch_bc_statement): Fixed identation and a bogus
15628         `printf' format.
15629
15630 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15631
15632         * parse.y (patch_assignment): Allow static variables in other
15633         classes to be assigned.
15634
15635 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15636
15637         * class.c (maybe_add_interface): Remove unused variable
15638         `interface_binfo'.
15639         (make_class_data): Use = for assignment, not ==.  Likewise.
15640         (emit_register_classes): Remove unused variable `decl'.
15641
15642         * lex.c: Fix comment so as not to contain an embedded `/*'.
15643
15644         * verify.c (verify_jvm_instructions): Remove unused variable
15645         `self_type'.
15646
15647 1999-03-27  Per Bothner  <bothner@cygnus.com>
15648
15649         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15650         (complete_labeled_statement):  Rename to finish_labeled_statement.
15651         (complete_for_loop):  Rename to finish_for_loop.
15652         (complete_method_declaration):  Rename to finish_method_declaration.
15653
15654         * java-tree.h (continue_identifier_node):  New global node.
15655         * decl.c:  Define and initialize continue_identifier_node.
15656         * parse.y (generate_labeled_block):  Remove - no longer needed.
15657         (build_loop_body):  Use continue_identifier_node for continue block.
15658         (finish_labeled_statement):  Also do pop_labeled_block actions.
15659         (java_complete_lhs):  POP_LOOP even if error.
15660         (build_labeled_block):  Special handling for continue_identifier_node.
15661         (patch_loop_statement):  Re-organize.
15662         (patch_bc_statement):  Re-write.
15663
15664 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15665
15666         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15667         using a WFL compound value.
15668         * parse.y (xref.h): Include.
15669         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15670         WFL compound value.
15671         (register_fields): Set WFL compound value to lineno if doing
15672         xrefs.
15673         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15674         is set.
15675         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15676         * xref.h (expand_xref): Prototype renamed from xref_generate.
15677
15678 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15679
15680         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15681         (GET_CURRENT_BLOCK): New macro.
15682         * parse.y (current_static_block): New global variable.
15683         (method_body:): Define action.
15684         (complete_method_declaration): Set current_function_decl to NULL
15685         when work on the current method is done.
15686         (declare_local_variables): Use GET_CURRENT_BLOCK.
15687         (java_method_add_stmt): Likewise.
15688         (java_complete_expand_method): Disable the use of `this' when
15689         expanding <clinit>.
15690         (enter_a_block): If no current method exist, use
15691         current_static_block to link static initializer blocks.
15692         (exit_block): Rewritten to use current_static_block when no current
15693         method decl exists.
15694         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15695         (patch_return): Forbid the use of `return' in static initializers.
15696         (patch_throw_statement): Fixed indentation. Issue specific error
15697         for uncaught thrown checked exception in static initializer
15698         blocks. Removed FIXME.
15699
15700 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15701
15702         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15703         Link gcj from gcc.o.
15704
15705 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15706
15707         * parse.y (find_applicable_accessible_methods_list): When dealing
15708         with interface: ensure that a given interface or java.lang.Object
15709         are searched only once.
15710
15711 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15712
15713         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15714
15715         * jcf-dump.c (print_access_flags): Add braces around if-else.
15716
15717         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15718         COMBINE_INPUTS.
15719
15720         * lex.c (build_wfl_node): Add static prototype.
15721
15722         * lex.h (build_wfl_node): Remove static prototype.
15723
15724         * parse.y: Include lex.c early enough to declare everything needed.
15725         Ensure calls to `build_wfl_node' pass the proper arguments.
15726         (create_class): Remove unused variable `super_decl'.
15727         (get_printable_method_name): Initialize variable `name'.
15728
15729 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15730
15731         * Changelog: Fixed 1999-03-22 typos.
15732         * lang.c (lang_decode_option): Fixed typo in error string in the
15733         XARG section.
15734
15735 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15736
15737         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15738         (xref.o): New rule.
15739         * java-tree.h (flag_emit_xref): Declared extern.
15740         * lang.c (xref.h): Included.
15741         (flag_emit_xref): New global variable.
15742         (lang_decode_option): Added support for -fxref.
15743         * xref.c: Created.
15744         * xref.h: Likewise.
15745
15746 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15747
15748         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15749         linked with.
15750
15751 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15752
15753         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15754         $(srcdir)/../system.h and $(JAVA_TREE_H).
15755         (jcf-io.o): Depend on $(JAVA_TREE_H).
15756         (mangle.o): Likewise.
15757
15758         * check-init.c (check_cond_init): Add static prototype.
15759
15760         * class.c (build_java_method_type, hashUtf8String,
15761         make_field_value, get_dispatch_vector, get_dispatch_table,
15762         append_gpp_mangled_type, mangle_static_field): Likewise.
15763         (strLengthUtf8): Hide unused definition.
15764         (hashUtf8String): Const-ify.
15765         (make_field_value): Un-ANSI-fy.
15766
15767         * constants.c: Move inclusion of jcf.h above java-tree.h.
15768         (set_constant_entry, find_class_or_string_constant,
15769         find_name_and_type_constant, get_tag_node,
15770         build_constant_data_ref): Add static prototype.
15771
15772         * decl.c (push_jvm_slot, builtin_function,
15773         lookup_name_current_level): Likewise.
15774         (builtin_function): Const-ify.
15775
15776         * except.c (expand_start_java_handler, expand_end_java_handler):
15777         Add static prototype.
15778
15779         * expr.c (flush_quick_stack, push_value, pop_value,
15780         java_stack_swap, java_stack_dup, build_java_athrow,
15781         build_java_jsr, build_java_ret, expand_java_multianewarray,
15782         expand_java_arraystore, expand_java_arrayload,
15783         expand_java_array_length, build_java_monitor, expand_java_pushc,
15784         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15785         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15786         expand_compare, expand_test, expand_cond, expand_java_goto,
15787         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15788         expand_java_field_op, java_push_constant_from_pool): Likewise.
15789
15790         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15791         (build_java_arraynull_check): Mark parameters `node' and `type'
15792         with ATTRIBUTE_UNUSED.
15793         (note_label): Likewise for parameter `current_pc'.
15794         (expand_java_call, expand_java_ret): Hide unused definition.
15795
15796         * java-tree.h (make_class, build_constants_constructor,
15797         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15798         init_outgoing_cpool, register_class, emit_register_classes,
15799         java_layout_seen_class_methods): Prototype.
15800         (unicode_mangling_length): Const-ify.
15801         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15802         emit_unicode_mangled_name, format_int, format_uint,
15803         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15804         jcf_print_utf8_replace, open_class): Prototype.
15805
15806         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15807         <stdio.h>.  Include tree.h/java-tree.h.
15808         (utf8_equal_string usage, process_class): Add static prototype.
15809         (open_class): Don't prototype this here.
15810         (utf8_equal_string): Match arguments to format specifiers.
15811         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15812         TABLE_SWITCH, disassemble_method): Likewise.
15813
15814         * jcf-io.c: Include tree.h/java-tree.h.
15815         (open_class, find_classfile, jcf_print_utf8,
15816         jcf_print_utf8_replace): Const-ify.
15817
15818         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15819         parse_class_file): Add static prototype.
15820         (find_in_current_zip): Match definition to existing static
15821         prototype.
15822
15823         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15824         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15825         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15826         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15827         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15828         generate_bytecode_return, perform_relocations, init_jcf_state,
15829         init_jcf_method, release_jcf_state, generate_classfile):
15830         Add static prototype.
15831         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15832         (make_class_file_name): Const-ify.
15833
15834         * jcf.h (find_classfile): Const-ify.
15835
15836         * jv-scan.c (reset_report): Remove prototype.
15837
15838         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15839         (error): Rewrite to allow varargs.
15840
15841         * lang.c (lang_f_options): Const-ify.
15842
15843         * lex.c (java_parse_escape_sequence): Add static prototype.
15844         (java_allocate_new_line): Match definition to existing static
15845         prototype.
15846
15847         * mangle.c Include tree.h/java-tree.h.
15848         (unicode_mangling_length, emit_unicode_mangled_name,
15849         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15850
15851         * parse.h (jdep_code): Remove trailing comma in enumeration.
15852         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15853         (reset_report): Add prototype.
15854
15855         * verify.c (push_pending_label, merge_types): Add static
15856         prototypes.
15857
15858         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15859
15860 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15861
15862         * parse.y (find_applicable_accessible_methods_list): Extend the
15863         search to superinterfaces when relevant.
15864         (search_applicable_methods_list): New function.
15865
15866 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15867
15868         * class.c (unmangle_classname): Implemented stricter testing
15869         before setting the QUALIFIED_P flag on an identifier.
15870
15871 1999-03-16  Per Bothner  <bothner@cygnus.com>
15872
15873         * parse.y (java_complete_lhs):  Call force_evaluation_order
15874         after patch_newarray.
15875         (patch_binop):  Don't call fold if there are side effects.
15876
15877 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15878
15879         * parse.y (java_stabilize_reference): Use save_expr instead of
15880         building a SAVE_EXPR node.
15881         (java_complete_lhs): Patch the resulting string of the `+='
15882         operator (if necessary) and complete the RHS after having built
15883         the cast.
15884
15885 1999-03-15  Per Bothner  <bothner@cygnus.com>
15886
15887         * class.c (make_class):  Don't set CLASS_P here (because
15888         this function is also called by build_java_array_type).
15889         (push_class):  Set CLASS_P here instead.
15890         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15891
15892         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15893         context.  If the context is class, perfer "super" over "synchronized".
15894         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15895
15896         * parse.y (create_class):  Don't call parser_check_super here;
15897         it is not robust.  Always wait until later.
15898
15899         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15900         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15901
15902 1999-03-13  Per Bothner  <bothner@cygnus.com>
15903
15904         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15905         * lex.h (UNGETC):  Change misleading macro.
15906
15907 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15908
15909         * parse.y (java_stabilize_reference): Return NODE when patching a
15910         COMPOUND_EXPR.
15911         (java_complete_lhs): Put parenthesis around truth values.
15912
15913 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15914
15915         * class.c (layout_class_method): Don't make rtl for interface
15916         methods.
15917         * parse.h (GET_TYPE_NAME): New macro.
15918         * parse.y (if_then_statement:): Fixed indentation.
15919         (if_then_else_statement:): Likewise.
15920         (for_statement:): Fixed spacing.
15921         (try_statement:): Fixed indentation.
15922         (create_interface): Don't force interfaces to be abstract.
15923         (method_header): Abstract methods are OK in interfaces.
15924         (declare_local_variables): Fixed typo in comment.
15925         (java_complete_expand_method): Fixed indentation.
15926         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15927         non accessible fields.
15928         (java_stabilize_reference): New function.
15929         (java_complete_lhs): Fixed indentation. Use
15930         java_stabilize_reference in compound assignment. Insert the
15931         cast. If not processing `+' fix string constants before processing
15932         binop.
15933
15934 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15935
15936         * constants.c (find_class_or_string_constant): Cast variable `j'
15937         to a `jword' when comparing against one.
15938
15939         * expr.c (java_lang_expand_expr): Remove unused variables
15940         `has_finally_p' and `op0'.
15941
15942         * gjavah.c (print_field_info): Cast a value to jint when comparing
15943         against one.  Likewise for a jlong.
15944         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15945         against a signed quantity.
15946
15947         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15948         (print_signature): Don't needlessly dereference variable `str'
15949
15950         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15951         `max_locals' with ATTRIBUTE_UNUSED.
15952         (jcf_parse_class): Likewise for variable `index'.
15953
15954         * parse.h (reverse_jdep_list): Remove static prototype.
15955
15956         * parse.y (build_jump_to_finally): Remove prototype and definition.
15957         (reverse_jdep_list): Add static prototype.
15958
15959         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15960         `assignment' and `expr_decl'.
15961
15962         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15963
15964 1999-03-12  Andrew Haley  <aph@cygnus.com>
15965
15966         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15967         we'll need a directory separator and a null character.
15968
15969 1999-03-10  Per Bothner  <bothner@cygnus.com>
15970
15971         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15972
15973 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15974
15975         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15976         interfaces.
15977
15978 1999-03-05  Per Bothner  <bothner@cygnus.com>
15979
15980         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15981
15982         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15983
15984         * class.c (layout_class_method):  A static method in a base class
15985         is never overridden, so treat it like it doesn't exist.
15986         However, do complain about private non-static method overriding
15987         public static method.
15988
15989         * parse.y:  Don't set unused INITIALIZED_P flag.
15990         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15991
15992         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15993         (build_array_from_name):  Re-order &index[string] to &string[index].
15994
15995         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15996         error_mark (it might catch more errors, but it is more likely to lose).
15997
15998 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15999
16000         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16001         (parse-scan.o): Depend on toplev.h.
16002
16003         * class.c (make_method_value): Add prototype.  Make it static.
16004         Remove unused second argument, caller changed.
16005
16006         * expr.c (java_lang_expand_expr): Remove unused variable
16007         `return_label'.
16008
16009         * java-tree.h: Don't prototype find_in_current_zip.
16010         Add prototypes for verify_constant_pool, start_java_method,
16011         end_java_method, give_name_to_locals, expand_byte_code,
16012         open_in_zip, set_constant_value, find_constant1, find_constant2,
16013         find_utf8_constant, find_string_constant, find_class_constant,
16014         find_fieldref_index, find_methodref_index, write_constant_pool,
16015         count_constant_pool_bytes and encode_newarray_type.
16016
16017         * jcf-dump.c: Remove unused variable `LONG_temp'.
16018
16019         * jcf-parse.c: Include parse.h.
16020         (jcf_parse_source): Remove unused parameter, all callers changed.
16021         (jcf_figure_file_type): Add static prototype.
16022         (find_in_current_zip): Likewise.  Also remove unused parameter,
16023         all callers changed.
16024         (read_class): Initialize variable `saved_pos'.
16025
16026         * jcf-reader.c (jcf_parse_preamble): Mark variables
16027         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16028
16029         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16030         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16031         (java_parse_doc_section): Initialize variable `seen_star'.
16032         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16033         (java_lex_error): Mark parameters `msg' and `forward' with
16034         ATTRIBUTE_UNUSED.
16035         (java_get_line_col): Mark parameters `filename' and `line' with
16036         ATTRIBUTE_UNUSED.
16037
16038         * parse-scan.y: Include toplev.h.
16039         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16040
16041         * parse.h: use `struct JCF', not plain `JCF'.
16042         (java_parser_context_save_global, java_expand_classes
16043         java_parser_context_restore_global, java_parse): Add prototypes.
16044
16045         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16046         `node'.
16047
16048 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
16049
16050         *  check-init.c (check_init):  COPYN takes word count, not bit count.
16051
16052 1999-02-26  Per Bothner  <bothner@cygnus.com>
16053
16054         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
16055         explicit build_decl.  (Avoids crash in reload when optimizing.)
16056
16057 1999-02-25  Per Bothner  <bothner@cygnus.com>
16058
16059         * decl.c (complete_start_java_method):  Handle synchronized method
16060         even when compiling from bytecode.
16061
16062 1999-02-26  Tom Tromey  <tromey@cygnus.com>
16063
16064         * gjavah.c (add_class_decl): Only generate `#include' if outer
16065         class is not the name of the class we are processing.  Correctly
16066         append `.h' in #include.
16067         (process_file): Clean up newlines around generated `#include's.
16068         (decode_signature_piece): Correctly handle inner classes.
16069         (struct include): New structure.
16070         (all_includes): New global.
16071         (print_include): New function.
16072         (add_class_decl): Use it.
16073         (process_file): Likewise.
16074         (add_class_decl): Generate include for java-array.h if array
16075         seen.
16076         (process_file): Don't generate java-array.h include.
16077
16078         * gjavah.c (add_namelet): Check for standard package names here.
16079         (add_class_decl): Don't check for standard package names here.
16080
16081 1999-02-25  Tom Tromey  <tromey@cygnus.com>
16082
16083         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16084         When reading a zip file, only use strncmp if both strings are
16085         bigger than the buffer length.  Initialize `k' when looping
16086         through zip file.
16087
16088 1999-02-24  Tom Tromey  <tromey@cygnus.com>
16089
16090         * gjavah.c (struct namelet): New structure.
16091         (add_namelet): New function.
16092         (print_namelet): New function.
16093         (print_class_decls): Use add_namelet and print_namelet to generate
16094         namespaces and not classes.
16095         (method_printed): New global.
16096         (HANDLE_END_METHOD): Examine method_printed.
16097         (print_method_info): Set method_printed when required.  Print
16098         error if function to be ignored is marked virtual.  Handle $finit$
16099         method.
16100         (METHOD_IS_FINAL): New macro.
16101         (print_field_info): Use it.
16102         (HANDLE_METHOD): Clear method_printed.
16103         (method_pass): New global.
16104         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16105         (process_file): Do two passes over both fields and methods.
16106         (HANDLE_METHOD): Examine method_pass.
16107         (root): New global.
16108         (add_class_decl): New function.
16109         (print_class_decls): Don't scan over entire constant pool.
16110
16111 1999-02-23  Tom Tromey  <tromey@cygnus.com>
16112
16113         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16114         disable linking in that case.
16115
16116 1999-02-20  Tom Tromey  <tromey@cygnus.com>
16117
16118         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16119         not 0x1f.
16120
16121 1999-02-21  Per Bothner  <bothner@cygnus.com>
16122
16123         * decl.c (build_result_decl), java-tree.h:  New method.
16124         (complete_start_java_method):  Handle synchronized methods.
16125         Don't build DECL_RESULT here.  (Ordering dependency problem.)
16126         (start_java_method):  Call build_result_decl here instead  ...
16127         * parse.y (java_complete_expand_method):  ... and here.
16128         (expand_start_java_method): Don't call complete_start_java_method here.
16129         (java_complete_expand_method):  Call it here instead.
16130         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
16131         * java-tree.h:  ... here.
16132
16133         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
16134         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
16135         for ARRAY_REF - it doesn't work when array bounds are checked.
16136         (patch_array_ref):  Handle it here instead.
16137
16138         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16139
16140 1999-02-19  Per Bothner  <bothner@cygnus.com>
16141
16142         Force left-to-right evaluation of binary operations etc.
16143         * expr.c (force_evaluation_order), java-tree.h:  New function.
16144         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16145         calls, and ARRAY_REFs to force_evaluation_order.
16146         (various):  Set TREE_SIDE_EFFECTS more carefully.
16147
16148         Tolerate random (non-UTF8) encoding in comments without complaining.
16149         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16150         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16151
16152         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16153         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16154
16155         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16156         COMPOUND_EXPR.  Don't complain about empty statement after return.
16157
16158 1999-02-19  Per Bothner  <bothner@cygnus.com>
16159
16160         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16161         in TREE_LIST - just chain the POINTER_TYPEs together.
16162         (resolve_class):  If type already resolved, return decl.
16163         After resolving, update TREE_TYPE(class_type), and name (if array).
16164         * parse.h (do_resolve_class), parse.y:  Make non-static.
16165         * class.c (maybe_layout_super_class):  Take this_class argument.
16166         Do do_resolve_class if necessary.
16167         (layout_class, layout_class_methods): Adjust calls appropriately.
16168         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16169         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16170         * typeck.c (build_java_array_type):  Don't call layout_class.
16171
16172 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16173
16174         * parse.y (check_pkg_class_access): Allow private class access
16175         within the same package.
16176         (strip_out_static_field_access_decl): New function.
16177         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16178         operator argument before testing its nature.
16179
16180 1999-02-03  Per Bothner  <bothner@cygnus.com>
16181
16182         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16183         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16184         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16185         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16186         * expr.c (java_lang_expand_expr):  Likewise.
16187         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16188         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16189         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16190         (build_try_statement):  Remove finally parameter and handling.
16191         (build_try_finally_statement):  New function.
16192         (patch_try_statement):   No longer need to support finally clause.
16193         (try_statement):  Update grammar action rules.
16194         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16195         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16196
16197 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16198
16199         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16200         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16201
16202 1999-02-17  Andrew Haley  <aph@cygnus.com>
16203
16204         * class.c (build_utf8_ref): Back out broken patch which was
16205         intended to to output signatures using '.' as a separator.
16206
16207         * class.c (make_class_data): Output signatures using '.' as a
16208         separator, rather than '/'.
16209         (mangled_classname): Likewise.
16210         (make_field_value): Likewise.
16211         (make_method_value): Likewise.
16212         * constants.c (alloc_class_constant): Likewise.
16213         * expr.c (build_invokeinterface): Likewise.
16214
16215 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16216
16217         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16218         of an ancient workaround.
16219
16220 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16221
16222         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16223         here anymore.
16224
16225 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16226
16227         * lex.c (yylex): Encode \0 as UTF8.
16228
16229 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16230
16231         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16232         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16233         (libgcj_zip): Renamed.
16234         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16235         LIBJAVA_ZIP_FILE.
16236         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16237
16238         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16239         (GC_NAME): Renamed -lgc to -lgcjgc.
16240
16241 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16242
16243         * lex.c (java_lang_cloneable): Initialize.
16244         * parse.y (java_lang_cloneable): New static variable.
16245         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16246         doing one more qualification round.
16247         (valid_ref_assignconv_cast_p): Reject null source or
16248         destination. Allow an array to be cast into java.lang.Cloneable.
16249         (patch_cast): Swapped two first arguments to first call to
16250         valid_ref_assignconv_cast_p.
16251
16252 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16253
16254         * parse.h: DECL_P renamed JDECL_P.
16255         * parse.y: DECL_P replaced by JDECL_P.
16256         (build_array_from_name): Always use pointer's type.
16257         (patch_bc_statement): Extra code to search continue target in a
16258         for loop. Fixed comments. Continue target is current loop when
16259         unlabeled.
16260
16261 1999-02-05  Andrew Haley  <aph@cygnus.com>
16262
16263         * class.c (make_class_data): The superclass of an interface should
16264         be null, not class Object.
16265
16266         * lex.c (java_lex): Sign extend hex literals.
16267
16268 1999-02-04  Andrew Haley  <aph@cygnus.com>
16269
16270         * class.c (build_utf8_ref): Output signatures using '.' as a
16271         separator, rather than '/'.
16272         (make_class_data): Likewise.
16273
16274 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16275
16276         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16277         mkstemp.o.  Get them from libiberty now.
16278
16279 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16280
16281         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16282
16283 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16284
16285         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16286         from libiberty.h
16287
16288 1999-02-02  Per Bothner  <bothner@cygnus.com>
16289
16290         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16291         * jcf-write.c (generate_bytecode_return):  New function.
16292         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16293
16294         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16295         generate special [fd]const_[01] instructions.
16296
16297         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16298
16299         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16300         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16301
16302 1999-02-01  Per Bothner  <bothner@cygnus.com>
16303
16304         * parse.y (patch_method_invocation):  Handle calling static methods,
16305         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16306
16307         * parse.y (java_complete_lhs):  Don't complain about unreachable
16308         exit condition in a do-while statement.
16309
16310 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16311
16312         * lex.c (java_read_char): Fixed utf8 decoding.
16313         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16314         range.
16315         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16316         comments. Local variable `all_primitive' is gone. Broadened
16317         acceptance of `0' to floating point targets. `long' can now be
16318         widened to `double' or `float'.
16319         (valid_method_invocation_conversion_p): Added leading
16320         comment. Fixed tabulation.
16321         (build_string_concatenation): Optimize out left or right empty
16322         string constants.
16323
16324 1999-01-28  Per Bothner  <bothner@cygnus.com>
16325
16326         * jcf-write.c (localvar_alloc):  Only emit entry for
16327         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16328         (generate_bytecode_insns):  Only call put_linenumber if
16329         debug_info_level > DINFO_LEVEL_NONE.
16330         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16331         is specified, add -g1 (for compatibility wih javac).
16332
16333 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16334
16335         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16336         gjavah.o, check-init.o, jv-scan.o
16337
16338 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16339
16340         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16341
16342         * gjavah.c: Include config.h and system.h.
16343
16344         * javaop.h (inline): Don't define, its handled by system.h.
16345         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16346         from `inline' to `static inline'.
16347
16348         * jcf.h (inline): Don't define, its handled by system.h.
16349
16350         * lex.c (inline): Likewise.
16351
16352 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16353
16354         * lang-specs.h: Map -Qn to -fno-ident.
16355
16356 1999-01-29  Richard Henderson  <rth@cygnus.com>
16357
16358         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16359
16360 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16361
16362         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16363         then cast it to Object before calling `append' method.
16364
16365 1999-01-28  Per Bothner  <bothner@cygnus.com>
16366
16367         * check-init.c (check_bool2_init, check_bool_init, check_init):
16368         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16369         * jcf-write.c (generate_bytecode_insns):  Likewise.
16370
16371 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16372
16373         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16374         * parse.y (patch_cast): Allow a boolean to be cast into a
16375         boolean.
16376
16377 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16378
16379         * parse.y: (class_declaration:): Fixed indentation.
16380         (class_member_declaration:): Extra `;' after field declaration now
16381         accepted.
16382         (interface_declaration:): Removed debug messages in error reports.
16383         (patch_binop): Nodes created and returned inherit the orignal
16384         node's COMPOUND_ASSIGN_P flag value.
16385         (patch_cast): Fix cast from char to floating point.
16386
16387 1999-01-25  Andrew Haley  <aph@cygnus.com>
16388
16389         * except.c, java-except.h (expand_resume_after_catch): new
16390         function.
16391         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16392         to branch back to main flow of control after a catch block.
16393
16394 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16395
16396         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16397         $(srcdir)/../system.h.
16398         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16399         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16400         (jcf-write.o): Likewise.
16401         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16402         (mangle.o): Depend on $(srcdir)/../toplev.h.
16403         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16404         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16405
16406         * class.c: Include output.h and parse.h.
16407         (mangled_classname): Add the `const' keyword to a char*.
16408         (find_named_method): Hide unused function definition.
16409         (build_utf8_ref): Change type of variable `c' to unsigned char.
16410         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16411         (build_class_ref): Add the `const' keyword to a char*.
16412         (layout_class_method): Remove unused variable `buf'.
16413
16414         * decl.c (find_local_variable): Remove unused variable `rtl'.
16415         (pushdecl): Likewise for variables `different_binding_level' and
16416         `oldglobal'.
16417         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16418         (maybe_build_cleanup): Likewise for parameter `decl'.
16419
16420         * except.c (expand_start_java_handler): Mark parameter `range'
16421         with ATTRIBUTE_UNUSED.
16422
16423         * expr.c: Include except.h.
16424         (pop_type): Remove unused variable `i'.
16425         (pop_value): Likewise for variables `n_words' and `i'.
16426         (expand_java_arrayload): Likewise for variable `convert'.
16427         (java_lang_expand_expr): Likewise for variables `op0', `type',
16428         `mode', `unsignedp', `node' and `elements'.
16429         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16430         `eh_ranges'.
16431         (process_jvm_instruction): Add a `const' qualifier to a char*.
16432
16433         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16434         (temp_directory): Likewise.
16435         (print_c_decl): Likewise.
16436         (print_method_info): Likewise.
16437         (decode_signature_piece): Likewise.
16438         (print_mangled_classname): Likewise.
16439
16440         * java-except.h: Provide prototypes for maybe_start_try,
16441         maybe_end_try and add_handler.
16442
16443         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16444         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16445         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16446         init_expr_processing, push_super_field, init_class_processing,
16447         can_widen_reference_to, class_depth, verify_jvm_instructions,
16448         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16449         set_local_type, merge_type_state, push_type, load_type_state,
16450         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16451         emit_unicode_mangled_name): Add prototypes.
16452
16453         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16454         (print_signature_type): Use ISDIGIT, not isdigit.
16455         (print_signature): Remove unused variable `j'.
16456
16457         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16458         int when comparing against one.
16459
16460         * jcf-parse.c: Include toplev.h.
16461
16462         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16463         (localvar_free): Remove unused variable `i'.
16464         (generate_bytecode_conditional): Likewise for variable `kind'.
16465
16466         * jv-scan.c: Include config.h and system.h.  Remove redundant
16467         OS header and gansidecl.h includes.
16468         (warning): Add the `const' keyword to a char*.  Also add
16469         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16470         __STDC__, when determining whether to use ANSI-isms.
16471         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16472         (xmalloc): Don't redundantly prototype here.
16473         (main): Remove unused parameter `envp'.  Also fix the arguments
16474         passed to function `fatal' to match the format specifier.
16475
16476         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16477
16478         * mangle.c: Include toplev.h.
16479         (emit_unicode_mangled_name): Declare parameter `len'.
16480
16481         * parse.y (parse_warning_context): Add the `const' keyword to a
16482         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16483         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16484         (issue_warning_error_from_context): Add the `const' keyword to
16485         a char*.
16486         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16487         not `__STDC__' for whether to use ANSI-isms.
16488
16489         * typeck.c (incomplete_type_error): Mark parameters `value' and
16490         `type' with ATTRIBUTE_UNUSED.
16491         (parse_signature_type): Use ISDIGIT, not isdigit.
16492
16493         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16494         (verify_jvm_instructions): Likewise.  Remove unused variables
16495         `field_name' and `default_val'.
16496
16497         * zextract.c: Include config.h and system.h.  Remove redundant
16498         OS header includes.
16499
16500         * zipfile.h: Prototype `read_zip_archive'.
16501
16502 1999-01-21  Andrew Haley  <aph@cygnus.com>
16503
16504         * typeck.c (convert): Allow conversions to void type: some
16505         optimizations in gcc do this.
16506
16507 1999-01-21  Andrew Haley  <aph@cygnus.com>
16508
16509         * typeck.c (convert_ieee_real_to_integer): New function.
16510         (convert): When not using fast-math and using hardware fp, convert
16511         an IEEE NaN to zero.
16512
16513 1999-01-18  Andrew Haley  <aph@cygnus.com>
16514
16515         * parse.y (patch_binop): Do a type conversion from signed to
16516         unsigned and then back to signed when a ">>>" is found.
16517
16518 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16519
16520         * java-tree.h: (check_for_initialization): Added prototype.
16521         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16522         * parse.y (do_resolve_class): Removed unused locals.
16523         (read_import_dir): Likewise.
16524         (resolve_qualified_expression_name): Array creation
16525         expressions are valid primary expressions.
16526         (qualify_ambiguous_name): Likewise.
16527         (patch_synchronized_statement): Removed unused local.
16528
16529 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16530
16531         * Makefile.in (zextract.o): Add dependencies.
16532
16533         * Makefile.in: Do not put ^Ls at the start of a line.
16534
16535 1999-01-15  Per Bothner  <bothner@cygnus.com>
16536
16537         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16538         sub-type the result of the call that gets the exception value.
16539
16540         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16541         don't call finish_class.
16542
16543         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16544         clear found before continuing.
16545
16546         * verify.c (verify_jvm_instructions):  On an array load, allow
16547         and handle top of stack to be TYPE_NULL.
16548
16549         * gjavah.c (generate_access):  Translate Java package private or
16550         protected access to C++ public, but with a comment.
16551
16552 1999-01-13  Andrew Haley  <aph@cygnus.com>
16553
16554         * expr.c (generate_name): Name prefix changed to avoid clashes
16555         with assembler temp labels.
16556
16557         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16558         MODIFY_EXPR.  Without this, code for the assignment may not be
16559         generated at all and the synchronized statement will read an
16560         uninitialized variable.
16561
16562 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16563
16564         * class.c (maybe_layout_super_class): Fixed returned value.
16565         * lex.c: Added 1999 to the copyright.
16566         (java_init_lex): Initialize java_lang_imported.
16567         * lex.h: Added 1999 to the copyright.
16568         * parse.h: Added 1999 to the copyright.
16569         (REGISTER_IMPORT): Fixed typo in trailing macro.
16570         (CURRENT_OSB): New macro.
16571         (struct parser_ctxt): New fields osb_depth, osb_limit.
16572         * parse.y (java_lang_id): New global variable.
16573         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16574         (array_creation_expression:): Use CURRENT_OSB.
16575         (dims:): Uses a stack to keep track of array dimensions.
16576         (cast_expression:): Use CURRENT_OSB.
16577         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16578         conditions.
16579         (register_fields): Fixed typos in comment.
16580         (check_method_redefinition): Fixed comment indentation.
16581         (java_check_regular_methods): Set saved found wfl to NULL after
16582         having reinstalled it in the previously found DECL_NAME.
16583
16584 1999-01-10  Richard Henderson  <rth@cygnus.com>
16585
16586         * gjavah.c (java_float_finite): Use a union to do type punning.
16587         (java_double_finite): Likewise.
16588
16589 1999-01-09  Per Bothner  <bothner@cygnus.com>
16590
16591         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16592         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16593         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16594         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16595         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16596         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16597
16598 1999-01-08  Per Bothner  <bothner@cygnus.com>
16599
16600         * check-init.c (check_init):  If compiling to native, we don't
16601         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16602
16603 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16604
16605         * parse-scan.y (variable_declarator_id): Set or increment
16606         bracket_count.
16607         (bracket_count): New global.
16608         (formal_parameter): Handle case where bracket pairs trail variable
16609         declarator id.
16610
16611 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16612
16613         * jcf-parse.c (yyparse): variable len changed from a char to an
16614         int to prevent overflow.
16615
16616 1999-01-06  Per Bothner  <bothner@cygnus.com>
16617
16618         * java-tree.h:  Declare read_class.
16619         * jcf-parse.c (read_class):  New function.
16620         (load_class):  Now just call read_class.
16621
16622         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16623         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16624         which is needed by java_parse_abort_on_error macro,
16625         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16626
16627         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16628         constructor, if initializing a static field.
16629         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16630         * expr.c (java_lang_expand_expr):  For a static array constructor
16631         of primitive elements, allocate the array itself statically.
16632         Disabled until we can set the vtable field statically.
16633
16634         * check-init.c:  New file.  Checks for definite assignment.
16635         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16636         * parse.y (java_complete_expand_method): Call check_for_initialization.
16637         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16638
16639 1999-01-06  Graham <grahams@rcp.co.uk>
16640
16641         * parse.y : include system.h instead of including
16642         standard headers directly with the exception of <dirent.h>.
16643
16644 1999-01-06  Per Bothner  <bothner@cygnus.com>
16645
16646         * lex.h:  Moved static function declarations to lex.c,
16647         to shut up some -Wall warnings.
16648         * lex.c:  Static function declarations moved here.
16649         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16650
16651 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16652
16653         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16654
16655 1998-12-22  Per Bothner  <bothner@cygnus.com>
16656
16657         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16658         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16659
16660         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16661         (localvar_alloc):  Change return type to void,
16662         (emit_unop):  Remove unused variable size.
16663
16664         * jcf-write.c (struct jcf_block):  Add new union.
16665         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16666         (call_cleanups):  New functions.
16667         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16668         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16669         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16670         * lang.c (lang_init):  Call using_eh_for_cleanups.
16671         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16672         completing operands to patch_synchronized_statement.
16673         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16674         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16675         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16676
16677 1998-12-20  John F. Carr  <jfc@mit.edu>
16678
16679         * Make-lang.in: Comment out control-Ls; they upset some makes.
16680
16681 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16682
16683         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16684         consistently.
16685
16686 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16687
16688         * parse.y (DIR_SEPARATOR): New define.
16689         (check_class_interface_creation): Use it.
16690
16691         * parse-scan.y (report_main_declaration): Recognize
16692         `java.lang.String' in argument to main.
16693
16694 1998-12-16  Per Bothner  <bothner@cygnus.com>
16695
16696         * parse.y (create_interface):  Remove bogus test.
16697
16698 1998-12-16  Per Bothner  <bothner@cygnus.com>
16699
16700         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16701         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16702
16703 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16704
16705         * parse-scan.y (qualified_name): Use correct sprintf format.
16706
16707 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16708
16709         * gjavah.c (print_field_info): Changed how most negative number is
16710         printed.
16711
16712 1998-12-14  Per Bothner  <bothner@cygnus.com>
16713
16714         * parse.y (fold_constant_for_init):  New function.
16715         (resolve_expression_name):  Don't replace static final
16716         constant-initialized fields by its value.
16717         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16718         not replace static final constant-initialized fields by their values.
16719         (register_fields):  If there is an initializer, set DECL_INITIAL and
16720         MODIFY_EXPR_FROM_INITIALIZATION_P.
16721         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16722         Only call patch_initialized_static_field if
16723         MODIFY_EXPR_FROM_INITIALIZATION_P.
16724         (patch_initialized_static_field):  If not valid constant, clear
16725         DECL_INITIAL.
16726
16727         * parse.y (lookup_field_wrapper):  Fix thinko.
16728
16729         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16730         set and restore global lineno.
16731
16732 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16733
16734         * gjavah.c (print_field_info): If value to print is the smallest
16735         value of its size, then print as hex to avoid later warnings from
16736         C++ compiler.
16737
16738 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16739
16740         * gjavah.c (decompile_method): Decompile `return null'.
16741         (process_file): Generate `#pragma interface'.
16742         (method_declared): New global.
16743         (print_method_info): Set it.
16744         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16745         (print_method_info): Handle abstract methods.
16746
16747 1998-12-13  Per Bothner  <bothner@cygnus.com>
16748
16749         * parse.y (patch_method_invocation):  If class_decl is null
16750         (e.g. an array type), use original type.
16751
16752         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16753         errors about uncaught exception from clone (of array, specifically).
16754
16755 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16756
16757         * gjavah.c (decompile_method): Handle all types of `return'
16758         opcode.  Decompile `return this' and `return'.
16759         (method_access): New global.
16760         (print_method_info): Set it.
16761         (decompile_method): Don't decompile a synchronized method.
16762
16763 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16764
16765         * jcf-reader.c (jcf_parse_one_method): Recognize
16766         HANDLE_END_METHOD.
16767         * gjavah.c (HANDLE_END_METHOD): New macro.
16768         (HANDLE_CODE_ATTRIBUTE): New macro.
16769         (decompile_method): New function.
16770         (print_method_info): Don't print `;\n' at end of function decl.
16771         Include java-opcodes.h.
16772         (decompiled): New global.
16773
16774 1998-12-12  Per Bothner  <bothner@cygnus.com>
16775
16776         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16777         flag_emit_class_files.
16778         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16779         if flag_emit_class_files.
16780         * parse.y (java_complete_tree):  Pre-liminary support for
16781         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16782
16783         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16784         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16785
16786         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16787
16788         * zipfile.h (opendir_in_zip):  New declaration.
16789         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16790         (opendir_in_zip):  New function, using code from open_in_zip.
16791         (open_in_zip):  Call opendir_in_zip.
16792         (find_class):  Remove no-longer-used do_class_file parameter,
16793         but add source_ok parameter.  Change logic so if we find a .java file,
16794         we don't look for .class in later classpath emtries.
16795         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16796         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16797         * gjavah.c: Update call to find_class.
16798         * jcf-dump.c:  Likewise.
16799
16800         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16801         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16802         nothing if body is empty_stmt_node.
16803         Various little fixes so SP gets correctly adjusted.
16804         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16805         For CALL_EXPR, test if static first.
16806         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16807         such as the ones we create for Object and Class.
16808         Set and restore current_function_decl.
16809         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16810         (note_possible_classname):  New function.
16811         (read_import_entry):  Removed.  Merged with read_import_dir.
16812         (read_import_dir):  Don't call find_class - that only gives us
16813         the first classpath entry having the needed package.
16814         Use the struct buffer data structure from buffer.h.
16815         (read_import_dir, find_in_imports_on_demand):  The remembered
16816         class names now use '.' (not '/') as package separator.
16817
16818         * parse.y (java_complete_expand_methods):  Call write_classfile
16819         here, and not in java_expand_classes (which only gets first class).
16820
16821 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16822
16823         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16824         (register_fields):  If a static fields has an initializer, just
16825         chain it on ctxp->static_initialized, and handle later.
16826         (java_complete_expand_methods):  Force <clinit> first.
16827         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16828         - it's already been completed.
16829         (patch_initialized_static_field):  New function.
16830         (java_complete_field):  Call it.
16831
16832 1998-12-12  Per Bothner  <bothner@cygnus.com>
16833
16834         * expr.c (encode_newarray_type, build_new_array):  New functions.
16835         * java-tree.h:  Declare build_new_array.
16836         * jcf-write.c (patch_newarray):  Use build_new_array.
16837
16838         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16839         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16840
16841         * parse.y (patch_new_array_init):  Re-organize.
16842         Now is passed the actual array (pointer) type of the value.
16843         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16844         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16845         (java_complete_tree):  Update patch_new_array_init.
16846
16847         * jcf-write.c (find_constant_index):  New function.
16848         (generate_bytecode_insns):  Use find_constant_index.
16849         (generate_classfile):  Use find_constant_index for ConstantValue.
16850
16851 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16852
16853         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16854         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16855         * class.c (make_class_data): Renamed dtable -> vtable, and
16856         dtable_method_count -> vtable_method_count.
16857
16858 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16859
16860         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16861         global variables, initialized.
16862         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16863         Declared new global variables.
16864         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16865         double_zero_node, integer_zero_node upon direct matching.
16866         * parse.y (purify_type_name): Added function prototype.
16867         (duplicate_declaration_error_p): Consider new_type as potentially
16868         being a incomplete type. Use purify_type_name on type string.
16869         (method_header): saved_type: unused variable removed. Don't figure
16870         return type if method name is invalid.
16871         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16872         processed by patch_unaryop.
16873         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16874         increment/decrement node into its original type after binary
16875         numeric promotion on its operands.
16876
16877 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16878
16879         * parse.y (array_initializer:): Array init operand is NULL_TREE
16880         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16881         now an error. Fixed indentation problems.
16882         (patch_string): Handle error_mark_node as an argument.
16883         (patch_new_array_init): Fixed indentation problems.
16884         (array_constructor_check_entry): Removed check on null wfl_value.
16885         Return an error if wfl_value's walk returns an error.
16886
16887 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16888
16889         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16890         * lex.c (java_lex): Remember column position before advancing one
16891         token. Retain location information on OCB_TK.
16892         * lex.h (typedef struct java_lc): Added new field.
16893         * parse.h (GET_SKIP_TYPE): New macro.
16894         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16895         * parse.y (build_new_array_init, patch_new_array_init,
16896         patch_array_constructor, maybe_build_array_element_wfl,
16897         array_constructor_check_entry): New function prototypes.
16898         (switch_block:): Tagged <node>.
16899         (OCB_TK): Tagged <operator>.
16900         (array_initializer:): Installed actions.
16901         (variable_initializer): Build location information on element if
16902         necessary.
16903         (switch_statement:): Fixed indentation typo.
16904         (switch_block:): Redefined default action.
16905         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16906         (patch_assignment): Removed duplicate code.
16907         (maybe_build_array_element_wfl, build_new_array_init,
16908         patch_new_array_init, patch_array_constructor,
16909         array_constructor_check_entry): New functions.
16910
16911 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16912
16913         * parse.y (array_initializer): Tagged <node>.
16914         (variable_initializer:): Use default rule.
16915         (array_initializer:): Defined actions.
16916         (variable_initializers:): Likewise.
16917         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16918         non-static field accesses.
16919         (patch_invoke): Fixed indentation typo.
16920         (java_complete_tree): Likewise.
16921         (build_labeled_block): Changed leading comment. Generate an error
16922         in case of duplicate loop labels.
16923         (patch_conditional_expr): Patch results of string concatenation
16924         operations.
16925
16926 1998-12-06  Per Bothner  <bothner@cygnus.com>
16927
16928         * constants.c (find_methodref_index):  When the class is an interface,
16929         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16930
16931         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16932         "<finit>" (which Sun's verifier rejects).
16933         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16934         (generate_field_initialization_code):  Removed.
16935         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16936         (patch_method_invocation):  Add $finit$ call here.
16937
16938         * java-tree.h (CALL_USING_SUPER):  New macro.
16939         * parse.y (patch_invoke):  Remove im local variable.
16940         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16941         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16942         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16943
16944         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16945
16946         * parse.y (java_complete_tree):  Don't complain about unreachable
16947         statement if it is empty_stmt_node.
16948
16949         * jcf-write.c (find_constant_wide):  New function.
16950         (push_long_const):  Use find_constant_wide.
16951
16952         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16953         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16954         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16955         Emit invokeinterface when calling an interface method.
16956         Emit invokespecial also when calling super or private methods.
16957
16958         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16959
16960 1998-12-06  Per Bothner  <bothner@cygnus.com>
16961
16962         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16963
16964 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16965
16966         * java-tree.h (java_layout_seen_class_methods): New function
16967         prototype.
16968         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16969         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16970         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16971         * parse.y (method_declarator:): Defined action.
16972         (issue_warning_error_from_context): input_filename saved, set to
16973         the appropriate value and restored after java_error is called.
16974         (build_unresolved_array_type): Fixed comment.
16975         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16976         (method_header): Deal with return type the same way type are
16977         handled for fields and method's parameters and local variables
16978         types are handled.
16979         (check_method_redefinition): Removed extra CR.
16980         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16981         (java_layout_seen_class_methods): New function.
16982         (java_layout_classes): Call java_layout_seen_class_methods.
16983
16984 1998-12-03  Per Bothner  <bothner@cygnus.com>
16985
16986         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16987
16988 1998-12-03  Per Bothner  <bothner@cygnus.com>
16989
16990         * jcf-dump.c (main):  Fix error message.
16991         * jcf-path.c (add_entry):  Style fix.
16992
16993 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16994
16995         * class.c (layout_class_method): Call build_java_argument_signature
16996         on constructors too.
16997         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16998         (patch_method_invocation): Define a primary when resolving an
16999         expression name. Augmented comment on code checking illegal `this'
17000         usage. Loosened it test by accepting NEW_CLASS_EXPR.
17001
17002 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17003
17004         * class.c (layout_class_method): Don't report error on non-static
17005         overriding static if the method is private.
17006         * java-tree.h (finish_class): Prototype added.
17007         * lex.c (java_get_line_col): Handle col argument -2 value.
17008         * parse.h: All static method declarations moved to parse.y.
17009         * parse.y: Now contains all static method declarations previously
17010         found in parse.h.
17011         (find_expr_with_wfl, missing_return_error,
17012         unreachable_stmt_error): New functions.
17013         (java_get_real_method_name): Identify constructors bearing class
17014         names in source code compiled classes only.
17015         (java_complete_expand_methods): Call missing_return_error.
17016         (invocation_mode): Private methods invoked as static methods.
17017         (java_complete_tree): Call unreachable_stmt_error.
17018
17019 1998-12-01  Tom Tromey  <tromey@cygnus.com>
17020
17021         * Makefile.in (+target): Removed.
17022         (+xmake_file): Likewise.
17023         (+tmake_file): Likewise.
17024         (.NOEXPORT): Removed duplicate.
17025
17026 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17027
17028         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17029
17030         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
17031
17032         * jvgenmain.c: Remove the xmalloc prototype, we get it from
17033         libiberty.h.  Provide an xmalloc definition.
17034
17035         * jvspec.c: Remove the xmalloc prototype.
17036
17037         * parse-scan.y: Include config.h and system.h.  Don't include
17038         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
17039         Provide an xstrdup definition.
17040
17041 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
17042
17043         * jcf-path.c (add_entry): Recognize ".jar" too.
17044         * lang-specs.h: Likewise.
17045
17046 1998-11-26  Per Bothner  <bothner@cygnus.com>
17047
17048         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
17049         soft_monitorenter_node, soft_monitorexit_node, throw_node.
17050
17051         * jcf-write.c (generate_bytecode_insns):
17052         Handle pre/post-increment/decrement of long.
17053
17054         * jcf-write.c (generate_bytecode_insns):
17055         Handle missing exception handler (finally for synchronized).
17056
17057 1998-11-25  Per Bothner  <bothner@cygnus.com>
17058
17059         * java-tree.h (end_params_node):  Declare global.
17060         * decl.c (end_params_node):  New global.
17061         (init_decl_processing, start_java_method):  Use end_params_node for
17062         end of list of parameter types.  Follows correct gcc conventions.
17063         * expr.c (pop_argument_types, pop_arguments):  Likewise.
17064         * lang.c (put_decl_node):  Likewise.
17065         * typeck.c (various places):  Likewise.
17066         * class.y (various places):  Likewise.
17067         * parse.y (various places):  Likewise.
17068
17069         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
17070         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
17071
17072         * class.c:  Add #include flags.h, remove no-longer needed declaration.
17073
17074         * class.c (layout_class_method):  Remove commented-out code, re-format.
17075         Don't add vtable entry (or index) for private methods.
17076         * expr.c (expand_invoke):  A private method is implicitly final.
17077         * class.c (make_class_data):  If inlining or optimizing,
17078         skip private methods.
17079
17080         * class.c (finish_class):  New function.  Calls existing methods,
17081         but alls emits deferred inline functions.
17082         * jcf-parse.c (parse_class_file):  Call finish_class.
17083         * parse.y (java_complete_expand_methods):  Likewise.
17084
17085         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
17086
17087         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
17088
17089 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
17090
17091         * jcf-write.c (generate_bytecode_conditional): Fix typo.
17092
17093 1998-11-24  Per Bothner  <bothner@cygnus.com>
17094
17095         * (generate_classfile): Always write class access flag with
17096         ACC_SUPER set.
17097
17098 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17099
17100         * class.c (maybe_layout_super_class): New function.
17101         (layout_class): Reorganized. Loop on class methods dispatched into
17102         a new function. Call maybe_layout_super_class.
17103         (layout_class_methods, layout_class_method): New functions.
17104         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17105         class.
17106         (expand_invoke): Likewise.
17107         * java-tree.h (all_class_list): New global variable declared.
17108         (layout_class_methods, layout_class_method): New function
17109         prototypes.
17110         (LAYOUT_SEEN_CLASS_METHODS): New macro.
17111         * jcf-parse.c (all_class_list): New global variable.
17112         (load_class): Extended what class_or_name can be. Use parser
17113         context mechanism to save globals before calling jcf_parse.
17114         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17115         is set on the file name.
17116         (jcf_parse): Layout class methods when Object is loaded, otherwise
17117         record class in all_class_list for delayed method layout.
17118         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17119         * lang.c (put_decl_node): Decode <init> into the decl context
17120         class name.
17121         * lex.c (java_allocate_new_line): Use xmalloc.
17122         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17123         pointers, not TREE_LIST elements.
17124         (struct parser_ctxt): Fixed comment indentations, added comments
17125         and reordered some fields.
17126         (java_check_methods): Function prototype removed.
17127         * parse.y (java_push_parser_context): Use xmalloc.
17128         (java_parser_context_restore_global): Pop extra pushed ctxp only
17129         when there's nothing next.
17130         (maybe_create_class_interface_decl): Fixed comment, add new
17131         created class decl to all_class_list.
17132         (method_header): Use GET_REAL_TYPE on argument's types.
17133         (method_declarator): Use GET_REAL_TYPE, change type to the real
17134         type in TREE_LIST dependency node. Build argument list with the
17135         real type.
17136         (create_jdep_list): Use xmalloc. Removed allocation error message.
17137         (obtain_incomplete_type): Fixed leading comment. Broadened
17138         incoming argument meaning.
17139         (register_incomplete_type): Use xmalloc. Removed allocation error
17140         message.
17141         (safe_layout_class): Fixed leading comment.
17142         (jdep_resolve_class): Reversed if statement condition and switch
17143         if and else bodies.
17144         (resolve_and_layout): Fixed leading comment. Broadened incoming
17145         argument meaning.
17146         (complete_class_report_errors): New local variable name, for
17147         clarity. purify_type_name used for all error cases.
17148         (java_get_real_method_name): Stricter check on constructors.
17149         (java_check_regular_methods): Reverse methods list only if not
17150         already laid out. Layout artificial constructor.
17151         (java_check_methods): Deleted.
17152         (source_start_java_method): Obtain incomplete type for patchable
17153         method arguments.
17154         (java_layout_classes): Fixed leading comment. Use
17155         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17156         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17157         before returning. Fixed comments.
17158         (java_expand_classes): Check for errors up front.
17159         (patch_method_invocation): Class to search is resolved and laid
17160         out.
17161
17162 1998-11-24  Per Bothner  <bothner@cygnus.com>
17163
17164         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17165
17166         * javaop.h (int8):  Removed - not used.
17167         (jbyte):  Redefine portably with correct signedness.
17168
17169         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17170
17171         * jcf-write.c (generate_bytecode_insns):  Fix typo
17172         OPCODE_getstatic to OPCODE_getfield.
17173
17174         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17175         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17176         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17177
17178 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17179
17180         * jcf-parse.c (jcf_parse_source): Function returned type is
17181         void. Added prototype.
17182         (jcf_parse): Function returned type is void.
17183         (yyparse): Remove call to fclose on the last parsed file.
17184
17185         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17186
17187 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17188
17189         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17190         (layout_class): Cope with methods featuring WFL in decl names.
17191         * decl.c (unqualified_object_id_node): New global variable,
17192         initialized.
17193         (build_decl_no_layout): Removed.
17194         * expr.c (build_primtype_type_ref): Handle Double.
17195         (java_lang_expand_expr): Fixed indentations.
17196         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17197         (flag_wall, flag_redundant, flag_not_overriding,
17198         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17199         variable declarations.
17200         (build_decl_no_layout): Removed prototype.
17201         (java_get_real_method_name): Added prototype.
17202         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17203         (java_parse_abort_on_error): Macro now just returns.
17204         * jcf-parse.c (jcf_parse_source): Check fclose returned
17205         value. Call emit_register_classes if java_report_errors returns
17206         zero.
17207         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17208         flag_static_local_jdk1_1): New integer flags.
17209         (lang_decode_option): New flags set here.
17210         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17211         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17212         the flag_redundant variable.
17213         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17214         when parsing java.lang.Object class.
17215         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17216         NULL_TREE to build.
17217         (resolve_qualified_expression_name): Fixed indentation.
17218         (patch_array_ref): Changed prototype.
17219         (not_initialized_as_it_should_p): Prototype removed.
17220         (java_report_errors): Added function prototype.
17221         * parse.y (formal_parameter:): Changed error message for not yet
17222         supported final parameters.
17223         (class_type_list:): Set both PURPOSE and VALUE of created
17224         TREE_LIST to be class_type.
17225         (primary_no_new_array:): Handle class literals on primitive types.
17226         (parse_warning_context): Reinstalled correct force_error and
17227         do_warning flags setups.
17228         (java_report_errors): Changed prototype. Return java_error_count
17229         value.
17230         (variable_redefinition_error): Consider treating variable type as
17231         a fake pointer.
17232         (create_interface): Warn about redundant abstract modifier if
17233         flag_redundant is set. Changed error message.
17234         (lookup_field_wrapper): Save/restore globals before/after looking
17235         up field.
17236         (duplicate_declaration_error_p): Consider treating declaration
17237         type as a fake pointer.
17238         (register_fields): Extract real type from dependency node. Check
17239         for duplicate field declaration after type adjustment. Use
17240         DECL_INITIAL to store static final initialized values.
17241         (method_header): Extract real function type from dependency node.
17242         (check_abstract_method_header): Use GET_METHOD_NAME.
17243         (obtain_incomplete_type): Layout fake pointer type.
17244         (safe_layout_class): Don't try to check for methods before layout.
17245         (java_complete_class): Don't check for correct throws clause
17246         elements inheritance here.
17247         (resolve_and_layout): Broadened name parameter meaning.
17248         (reset_method_name): Use GET_METHOD_NAME.
17249         (java_get_real_method_name): New function.
17250         (java_check_regular_methods): Don't check methods in
17251         java.lang.Object.  Verify lineage of throws clause elements. Use
17252         flag_no_overriding in warning report.
17253         (check_throws_clauses): Don't check if class was from
17254         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17255         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17256         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17257         warning on unsupported final local variables. Use build_decl
17258         instead of build_decl_no_layout. Get real local variable type from
17259         dependency node.
17260         (source_start_java_method): Get real parameter type from
17261         dependency node. Call build_decl instead of build_decl_no_layout.
17262         (java_layout_classes): Reverse tree and layout type and class as
17263         required. Mark class as loaded when done.
17264         (resolve_field_access): Fixed indentation. Restricted condition
17265         leading to static field access code generation. Set field_type
17266         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17267         (resolve_qualified_expression_name): Initialize type_found to
17268         null. Handle static field resolved during qualification. Fixed
17269         layout on non primitive field decl types.
17270         (not_accessible_p): Fixed typo in comment.
17271         (patch_method_invocation): Resolve and layout class to search from
17272         type.
17273         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17274         layout non primitive type, if necessary. Make method node only to
17275         report errors.
17276         (find_applicable_accessible_methods_list): Consider WFL'ed method
17277         decl names. Fixed indentation.
17278         (argument_types_convertible): Resolve and layout target type if
17279         necessary.
17280         (java_complete_tree): Fixed indentation problems. Rewrote
17281         CALL_EXPR thrown exceptions check. Re-installed further processing
17282         of the assignment in certain cases.
17283         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17284         inlining on class literals.
17285         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17286         0 literal.
17287         (valid_method_invocation_conversion_p): Likewise.
17288         (patch_string): Temporary disable forbidden use of `this' in
17289         explicit constructor invocations when doing string concatenation
17290         within their scope.
17291         (patch_unaryop): Added comment. Reinstalled code to disable
17292         further check on assignment operation with cast expression RHS.
17293         (patch_switch_statement): Fixed indentation.
17294         (build_try_statement): Call build_decl instead of
17295         build_decl_no_layout.
17296         (patch_synchronized_statement): Likewise.
17297         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17298         IS_UNCHECKED_EXPRESSION_P.
17299         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17300         layout argument exception type.
17301         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17302         of IS_UNCHECKED_EXPRESSION_P.
17303
17304 1998-11-18  Anthony Green  <green@cygnus.com>
17305
17306         * jcf-parse.c (yyparse): Open class file in binary mode.
17307
17308 1998-11-15  Per Bothner  <bothner@cygnus.com>
17309
17310         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17311
17312         * jcf-write.c (perform_relocations):  Move check out one loop.
17313
17314 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17315
17316         * Make-lang.in: Fix reference to srcdir.
17317         * jv-scan.c: Add missing xmalloc prototype.
17318         * jvgenmain.c: Ditto.
17319
17320 1998-11-15  Per Bothner  <bothner@cygnus.com>
17321
17322         * decl.c (error_mark_node), java-tree.h:  New global.
17323         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17324         (build_if_else_statement):  If missing else, use empty_stmt_node.
17325
17326         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17327         (java_complete_expand_method):  Complain if return is missing.
17328         (java_check_regular_methods):  Comment out incorrect error check.
17329         (not_accessible_p):  Fix incorrect handling of protected methods.
17330         (patch_method_invocation):  Pass correct context to not_accessible_p.
17331         (find_applicable_accessible_methods_list):  Likewise.
17332         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17333         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17334         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17335         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17336
17337         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17338         (push_int_const):  Remove reundant NOTE_PUSH.
17339         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17340         (- case SWITCH_EXPR):  Fix code generation bug.
17341         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17342         (generate_classfile):  More robust for abstract methods.
17343
17344 1998-11-15  Anthony Green  <green@cygnus.com>
17345
17346         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17347         * Make-lang.in: Ditto.
17348
17349         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17350         * jvgenmain: Ditto.
17351
17352 1998-11-15  Per Bothner  <bothner@cygnus.com>
17353
17354         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17355
17356         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17357
17358 1998-11-14  Per Bothner  <bothner@cygnus.com>
17359
17360         Allow uses of interface types to verify.  This is not really
17361         type-safe, but it matches what Sun does, and is OK as long as
17362         there are appropriate run-time checks.
17363         * verify.c (merge_types):  If merging two interface types,
17364         just set the result to java.lang.Object.
17365         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17366
17367 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17368
17369         * gjavah.c (main): Handle --output-class-directory argument.
17370         * jvspec.c (lang_specific_driver): Translate `-d' into
17371         -foutput-class-dir.
17372         * jcf.h (jcf_write_base_directory): Declare.
17373         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17374         * lang-options.h: Mention -foutput-class-dir.
17375         * jcf-write.c (jcf_write_base_directory): New global.
17376         (make_class_file_name): Put generated .class file into `-d'
17377         directory, or into source directory if -d not given.  Function now
17378         static.
17379         (write_classfile): Free class file name.  Handle case where class
17380         file name is NULL.
17381         (DIR_SEPARATOR): New macro.
17382         Include <sys/stat.h>
17383
17384         * Makefile.in (prefix): New macro.
17385
17386 1998-11-12  Per Bothner  <bothner@cygnus.com>
17387
17388         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17389         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17390         here (done in patch_invoke instead).
17391         (case_identity):  Moved here from parse.y.
17392
17393         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17394         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17395         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17396         so they can be efficiently scanned without recursion.
17397         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17398         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17399         in BLOCK iteratively, rather than recursively.
17400
17401         * parse.y (do_unary_numeric_promotion):  New function.
17402         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17403
17404         * parse.y (patch_newarray):  Various fixes.
17405
17406         Re-do handling of switch statements (for proper block scoping).
17407         * parse.y:  Add just a single block for the enture switch block,
17408         but don't create any "case blocks".
17409         (group_of_labels):  Rmeoved unneeded non-terminal.
17410         CASE_EXPR and DEFAULT_EXPR are added to current block.
17411         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17412         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17413         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17414         * parse.y (wfl_operator, print_int_node): Make non-static.
17415         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17416         as part of recursive scan of block.
17417         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17418         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17419
17420         * parse.y:  Make various production be non-typed (void).
17421         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17422         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17423         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17424
17425         * jcf-write.c (struct jcf_handler):  New type.
17426         (struct jcf_switch_state):  New type.
17427         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17428         (alloc_handler, emit_unop, emit_reloc):  New functions.
17429         (adjust_typed_op):  Add extra parameter ("max type" offset).
17430         (emit_switch_reloc, emit_case-reloc):  New function.
17431         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17432         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17433         exception handling, method calls, object/array creation, and more.
17434
17435         * class.c:  Remove some unused variables.
17436         * constants.c (find_string_constant):  New function.
17437         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17438         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17439         if flag_emit_class_files.
17440
17441 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17442
17443         * jcf-io.c (find_class): Added explanatory comment.
17444
17445         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17446         trailing slash to `.zip' entries.
17447
17448         * jvspec.c (lang_specific_driver): Correctly handle case where
17449         GC_NAME not defined.
17450
17451 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17452
17453         * jvspec.c (GC_NAME): New define.
17454         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17455         if required.
17456         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17457
17458 1998-11-11  Per Bothner  <bothner@cygnus.com>
17459
17460         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17461
17462 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17463
17464         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17465
17466 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17467
17468         * class.c (is_compiled_class): Call safe_layout_class for class
17469         compiled from source.
17470         * conver.h (convert_to_integer, convert_to_real,
17471         convert_to_pointer): Added prototypes.
17472         * decl.c (init_decl_processing): Non longer push the decls of
17473         `methodtable', `constants', `Class', `Field', `dispatchTable'
17474         `jexception' and `Method'.
17475         * expr.c (build_invokeinterface): New function.
17476         (expand_invoke): static variable CLASS_IDENT now in
17477         build_invokeinterface. Use build_invokeinterface.
17478         (expand_java_field_op): Moved code to inline
17479         java.lang.PRIMTYPE.TYPE into a function.
17480         (build_primtype_type_ref): New function.
17481         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17482         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17483         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17484         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17485         (DECL_LOCAL_STATIC_VALUE): New macro.
17486         (build_invokeinterface, build_primtype_type_ref): New function
17487         prototypes.
17488         (java_parse_abort_on_error): Macro rewritten.
17489         * jcf-parse.c (current_method): Add comment to declaration.
17490         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17491         Function prototypes fixed.
17492         (jcf_parse_source): push/pop parser context. save/restore global.
17493         (parse_source_file): Fixed leading comment. Now take a
17494         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17495         classes and pop the parser context anymore.
17496         (yyparse): Push parser context, save globals, parse the source
17497         file, restore globals and pop the parser context when processing a
17498         source file.
17499         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17500         * lex.c (java_parse_doc_section): New function.
17501         (java_lex): Call java_parse_doc_section when appropriate. Build an
17502         operator around INSTANCEOF_TK.
17503         * lex.h (java_lineterminator, java_sprint_unicode,
17504         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17505         Prototypes rewritten.
17506         (java_parse_escape_sequence, java_letter_or_digit_p,
17507         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17508         java_read_unicode, java_store_unicode, java_read_char,
17509         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17510         Added function prototypes.
17511         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17512         define.
17513         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17514         New macros
17515         (struct parser_ctxt): New fields: deprecated,
17516         current_parsed_class_un, gclass_list.
17517         (fix_method_argument_names, issue_warning_error_from_context,
17518         resolve_package, lookup_package_type): New function prototypes.
17519         (resolve_expression_name): Fixed function prototype.
17520         (find_applicable_accessible_methods_list): Fixed indentation, added
17521         extra argument in prototype.
17522         (check_final_assignment, build_null_of_type, check_deprecation,
17523         check_method_redefinition, reset_method_name,
17524         java_check_regular_methods, java_check_abstract_methods,
17525         maybe_build_primttype_type_ref): New function prototype.
17526         * parse.y (conver.h): Include.
17527         (INSTANCEOF_TK): Tagged <operator>.
17528         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17529         (relational_expression:): Build binop for instanceof.
17530         (java_push_parser_context): Remember ctxp->gclass_list across
17531         contexts.
17532         (java_pop_parser_context): Simply return if no context
17533         exists. Remember gclass_list across contexts.
17534         (issue_warning_error_from_context): New function.
17535         (parse_error_context): Don't setup ctxp->elc here. Call
17536         issue_warning_error_from_context instead.
17537         (parse_warning_context): Likewise.
17538         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17539         setup. Link new class/interface to ctxp->gclass_list.
17540         (add_superinterfaces): Register interface as incomplete if not
17541         loaded.
17542         (create_class): Remember class unqualified name in
17543         ctxp->current_parsed_class_un. Check class deprecation.
17544         (register_fields): Check field deprecation. Remember static final
17545         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17546         processing INIT.
17547         (method_header): New local variable ORIG_ARG. Use unqualified
17548         current class name for check on constructor errors. Promote return
17549         type if of record type. Argument list fix moved in
17550         fix_method_argument_names, called here. Check method deprecation.
17551         (fix_method_argument_names): New function.
17552         (method_declarator): Promote record typed arguments.
17553         (safe_layout_class): Check class methods before layout.
17554         (java_complete_class): Compute field layout when patched.
17555         (do_resolve_class): Try to load class after having it renamed
17556         after the package name.
17557         (get_printable_method_name): Use DECL_CONTEXT.
17558         (reset_method_name): New function.
17559         (check_method_redefinition): Use reset_method_name.
17560         (java_check_regular_methods): New local variable
17561         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17562         names for error report. Check for compile-time error when method
17563         found has default (package) access.
17564         (java_check_abstract_methods): Now takes an interface DECL node as
17565         an argument. Also reinstall real name on unchecked
17566         overriding/hiding methods for error report.
17567         (java_check_methods): Fixed leading comment. Get classes to verify
17568         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17569         CLASS_METHOD_CHECKED_P on class verification.
17570         (lookup_java_method2): Get real method name if necessary.
17571         (find_in_imports): Don't check package class access here.
17572         (resolve_package, lookup_package_type): New functions.
17573         (java_layout_classes): Fixed leading comment. Take classes to be
17574         laid out from ctxp->gclass_list.
17575         (java_complete_expand_methods): Don't expand native and abstract
17576         methods.
17577         (java_expand_classes): New function.
17578         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17579         values of static final field of primitive types.
17580         (resolve_field_access): Handles static final field of promotive
17581         type.
17582         (resolve_qualified_expression_name): Handle STRING_CST as
17583         primaries and package name resolution. Check deprecation on found
17584         decls. Set where_found and type_found on non static field resolved
17585         during qualification. Layout non primitive field decl types.
17586         (check_deprecation): New function.
17587         (maybe_access_field): Simplified.
17588         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17589         removed. Reverse method's argument when primary is a type. Don't
17590         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17591         instead. Include abstract class in the list of class searchable
17592         for constructors. Use DECL_CONTEXT of found method for access
17593         checks. Check method deprecation.
17594         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17595         converting arguments. Handle INVOKE_INTERFACE.
17596         (lookup_method_invoke): Search constructor using existing
17597         infrastructure (don't rely on lookup_java_constructor anymore).
17598         (find_applicable_accessible_methods_list): Extra argument flag
17599         LC. Now include constructor in the search.
17600         (qualify_ambiguous_name): Conditional expression are primaries.
17601         (not_initialized_as_it_should_p): static final are always
17602         initialized.
17603         (java_complete_tree): Pass extra NULL argument to
17604         resolve_expression_name. Stricter test to carry on patching
17605         assignments. New case for INSTANCEOF_EXPR.
17606         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17607         (check_final_assignment, maybe_build_primttype_type_ref): New
17608         functions.
17609         (patch_assignment): Detect resolved static finals and carry normal
17610         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17611         (try_builtin_assignconv): Access constant 0 on all primitive
17612         types.
17613         (valid_builtin_assignconv_identity_widening_p): Accept identical
17614         types. Accept all promoted type on int type.
17615         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17616         assigned to a reference.
17617         (valid_method_invocation_conversion_p): Accept to check null
17618         pointers.
17619         (build_binop): Merge declaration and initialization of local
17620         variable BINOP.
17621         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17622         numeric types. Improved validity test for qualify operators on
17623         references.
17624         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17625         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17626         primitive type and issue the appropriate error message.
17627         (resolve_type_during_patch): Mark class loaded when resolved.
17628         (patch_cast): Allow null to be cased to reference types.
17629         (build_null_of_type): New function.
17630         (patch_array_ref): Handle array on references correctly.
17631         (patch_return): Removed unused local variable MODIFY. Force
17632         boolean to be returned as integers. Allows null to be returned by
17633         a function returning a reference.
17634         * typeck.c (convert_to_integer, convert_to_real,
17635         convert_to_pointer): Prototypes moved to convert.h
17636         (lookup_argument_method): Use method real name, if necessary.
17637
17638 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17639
17640         * class.c (build_class_ref): Changed name of primitive classes to
17641         start with `_Jv_'.
17642
17643         * class.c (make_class_data): Renamed fields: nmethods to
17644         method_count, method_count to dtable_method_count.  Always set
17645         `state' field to 0.
17646         * decl.c (init_decl_processing): Likewise.
17647
17648 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17649
17650         * class.c (layout_class): Don't mangle <finit>, produce
17651         __finit<class> instead. Don't verify artificial methods.
17652         * decl.c (finit_identifier_node): New declared global.
17653         (init_decl_processing): finit_identifier_node initialized.
17654         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17655         * java-tree.h (finit_identifier_node): Declared as extern.
17656         (struct lang_decl): New field called_constructor.
17657         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17658         (CLASS_HAS_FINIT_P): New macro.
17659         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17660         explicit constructor invocation.
17661         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17662         CALL_SUPER_CONSTRUCTOR_P): New macros.
17663         (write_classfile): Added prototype.
17664         * jcf-parse.c (jcf_parse_source): Parse and remember for
17665         generation if the file was seen on the command line.
17666         (parse_source_file): Don't write the class file here.
17667         (yyparse): Loop on files rewritten. Set current_jcf.
17668         (parse_zip_file_entries): Parse class file only if it was found.
17669         * lang.c (init_parse): Don't open command line provided filename
17670         here.
17671         (lang_parse): Don't set main_jcf anymore.
17672         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17673         (JCONSTRUCTOR_CHECK): New macro.
17674         (JBSC_TYPE_P): New macro.
17675         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17676         (COMPLETE_CHECK_OP_2): New macro.
17677         (struct parse_ctxt): New field explicit_constructor_p.
17678         (check_class_interface_creation): Fixed prototype indentation.
17679         (patch_method_invocation_stmt): Prototype reflects added argument.
17680         (patch_invoke): Likewise.
17681         (complete_method_declaration, build_super_invocation,
17682         verify_constructor_circularity,
17683         build_this_super_qualified_invocation, get_printable_method_name,
17684         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17685         verify_constructor_super, create_artificial_method,
17686         start_artificial_method_body, end_artificial_method_body,
17687         generate_field_initialization_code): New function prototypes.
17688         * parse.y: Fixed leading comment
17689         (constructor_header:, constructor_body:, block_end:): Rules tagged
17690         <node>.
17691         (type_declaration:): Call maybe_generate_finit.
17692         (method_declaration:): Action for method_body: placed in new
17693         function complete_method_declaration, called here.
17694         (constructor_declaration:): Defined actions. Removed leading
17695         FIXME.
17696         (constructor_header:): New rule with action.
17697         (constructor_body:): Rule rewritten using block_begin: and
17698         block_end:. Defined actions.
17699         (constructor_declarator:, explicit_constructor_invocation:):
17700         Defined actions.
17701         (block:): Use new rules block_begin: block_end:.
17702         (block_begin:, block_end:): New rules and actions.
17703         (block_statements:): Fixed error message for explicit
17704         constructors.
17705         (method_invocation:): Call build_this_super_qualified_invocation
17706         if primary is `this' or `super' was seen.
17707         (conditional_expression:): Action defined.
17708         (extra_ctxp_pushed_p): New static global flag.
17709         (java_parser_context_save_global): Create parser context if
17710         necessary. Use extra_ctxp_pushed_p to remember it.
17711         (java_parser_context_restore_global): Pop extra parser context if
17712         one exists.
17713         (build_array_from_name): Array on primitive types are marked
17714         loaded.
17715         (register_fields): Restore new name in field initializer
17716         expression if type was altered. Non static fields initialized upon
17717         declaration marked initialized.
17718         (maybe_generate_finit): New function.
17719         (maybe_generate_clinit): Use create_artificial_method,
17720         start_artificial_method_body, end_artificial_method_body. Generate
17721         debug info for enclosed initialization statements.
17722         (method_header): Fixed leading comment. Check constructor
17723         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17724         accordingly.
17725         (complete_method_declaration, constructor_circularity_msg,
17726         verify_constructor_circularity): New functions.
17727         (get_printable_method_name): New function.
17728         (check_method_redefinition): Don't rename <finit> methods. Fix
17729         declared constructor names. Error message for
17730         constructors modified.
17731         (java_check_regular_methods): Local variable seen_constructor
17732         renamed saw_constructor. Skip verification on constructors. Create
17733         default constructor with create_artificial_method.
17734         (java_check_methods): Removed unnecessary empty line.
17735         (create_artificial_method, start_artificial_method_body,
17736         end_artificial_method_body): New functions.
17737         (java_layout_classes): Changed leading comment. Reverse fields
17738         list if necessary. Always layout java.lang.Object if being
17739         defined.
17740         (java_complete_expand_methods): Verify constructor circularity.
17741         (java_complete_expand_method): Call fix_constructor on
17742         constructors.  Local variable no_ac_found removed. Restore
17743         bindings if method body expansion failed.
17744         (fix_constructors, verify_constructor_super,
17745         generate_field_initialization_code): New function.
17746         (java_expand_classes): Fixed leading comment. Write class file
17747         here.
17748         (resolve_expression_name): Check for illegal instance variable
17749         usage within the argument scope of an explicit constructor
17750         invocation.
17751         (resolve_qualified_expression_name): Pass extra from_super flag
17752         when invoking patch_method_invocation_stmt. New case for
17753         conditional expression when used as a primary. Check for error
17754         when acquiring super.
17755         (patch_method_invocation_stmt): Added extra argument super. New
17756         local variable is_static_flag. Set class_to_search according to
17757         the nature of the constructor invocation. Don't add `this'
17758         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17759         invocation within the argument scope of explicit constructor
17760         invocation. Set is_static according to is_static_flag. Provide
17761         extra `super' argument to patch_invoke invocation.
17762         (patch_invoke): New argument from_super. Loop on arguments
17763         indentation fixed. Pass from_super to invocation_mode. New switch
17764         case INVOKE_SUPER. Fixed error message in switch default case.
17765         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17766         value.
17767         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17768         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17769         message takes constructors into account.
17770         (find_applicable_accessible_methods_list): Fixed indentation.
17771         (qualify_ambiguous_name): Take explicit constructor invocation
17772         into account. Deal with a conditional expression as a primary to
17773         a method call.
17774         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17775         case. Added extra argument to patch_method_invocation_stmt.
17776         Register calls made to explicit constructor `this'. Don't call
17777         save_expr in ARRAY_REF case when emitting class files. Check for
17778         illegal use of this when expanding explicit constructor invocation
17779         arguments.
17780         (complete_function_arguments): Set and reset parser context
17781         explicit_constructor_p field value when appropriate.
17782         (build_super_invocation, build_this_super_qualified_invocation):
17783         New functions.
17784         (patch_assignment): Fixed typo.
17785         (patch_unaryop): Check on final fields occurs only when a decl
17786         exits.
17787         (patch_return): Take constructors into account.
17788         (patch_conditional_expr): New function.
17789         * typeck.c (build_java_signature): Removed unnecessary empty line.
17790
17791 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17792
17793         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17794
17795 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17796
17797         * decl.c (init_decl_processing): Renamed fields.
17798         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17799         interface_len, msize fields.
17800
17801         * class.c (make_class_data): Removed subclass_head and
17802         subclass_next fields.
17803         * decl.c (init_decl_processing): Removed subclass_head and
17804         subclass_next fields.
17805
17806 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17807
17808         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17809         * mangle.c (emit_unicode_mangled_name): Similarly.
17810
17811 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17812
17813         * jcf-parse.c (get_constant): Place braces around code to compute
17814         'd' when REAL_ARITHMETIC is not defined.
17815
17816 1998-10-25  H.J. Lu  (hjl@gnu.org)
17817
17818         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17819         dependency.
17820
17821 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17822
17823         * lang-specs.h: `.zip' files are input to jc1.
17824
17825 1998-10-22  Per Bothner  <bothner@cygnus.com>
17826
17827         * jvspecs.c:  Add (but don't enable) support for combining multiple
17828         .class and .java input filenames to a single jc1 invocation.
17829         Add support for -C flag (copile to .class files).
17830         Translate -classpath and -CLASSPATH arguments.
17831         * lang-specs.h:  Don't set %2 spec.
17832
17833 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17834
17835         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17836         a .zip file.
17837         (add_path): Don't add trailing separator to non-empty path
17838         elements.
17839
17840         * lang.c (lang_decode_option): Check for -fclasspath and
17841         -fCLASSPATH before examining other `-f' options.
17842
17843         * java-tree.h (finalize_identifier_node): Don't declare.
17844         * class.c (make_class_data): Don't push "final" field.
17845         * decl.c (init_decl_processing): Don't push "final" field.
17846         (finalize_identifier_node): Removed.
17847         (init_decl_processing): Don't set finalize_identifier_node.
17848
17849         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17850
17851 1998-10-11  Anthony Green  <green@cygnus.com>
17852
17853         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17854         (JV_SCAN_SOURCES): New macro.
17855         (JCF_DUMP_SOURCES): Likewise.
17856         (jcf-dump$(exeext)): New target.
17857         (jv-scan$(exeext)): New target.
17858
17859 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17860
17861         * Makefile.in (LEX): Removed.
17862         (LEXFLAGS): Likewise.
17863         (SET_BISON): New macro.
17864         (BISON): Removed.
17865         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17866         spurious diffs in parse.c.
17867         ($(PARSE_SCAN_C)): Likewise.
17868         (PARSE_DIR): New macro.
17869         (PARSE_C): Use it.
17870         (PARSE_SCAN_C): Likewise.
17871         (PARSE_RELDIR): New macro.
17872
17873         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17874
17875         * jcf-io.c (find_class): Use saw_java_source to determine when to
17876         look for `.java' file.
17877         * jcf-parse.c (saw_java_source): New global.
17878         (yyparse): Set it if `.java' file seen.
17879
17880         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17881         (GCJH_SOURCES): Likewise.
17882         * Makefile.in (datadir): New macro.
17883         (libjava_zip): Likewise.
17884         (JAVA_OBJS): Added jcf-path.o.
17885         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17886         (../gcjh$(exeext)): Likewise.
17887         (jcf-path.o): New target.
17888         * java-tree.h (fix_classpath): Removed decl.
17889         * jcf-parse.c (fix_classpath): Removed.
17890         (load_class): Don't call fix_classpath.
17891         * parse.y (read_import_dir): Don't call fix_classpath.
17892         * lex.h: Don't mention classpath.
17893         * lex.c (java_init_lex): Don't initialize classpath.
17894         * jcf-io.c (classpath): Removed global.
17895         (find_class): Use jcf_path iteration functions.  Correctly search
17896         class path for .java file.
17897         (open_in_zip): New argument `is_system'.
17898         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17899         classpath-related options.
17900         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17901         and -I.
17902         (lang_init): Call jcf_path_init.
17903         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17904         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17905         Correctly put braces around second string in each entry.
17906         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17907         classpath-related options.
17908         (help): Updated for new options.
17909         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17910         `classpath' global.
17911         * jcf-path.c: New file.
17912
17913         * jcf-depend.c: Include jcf.h.
17914
17915         * jcf-write.c (localvar_alloc): Returns `void'.
17916         (localvar_free): Removed unused variable.
17917
17918         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17919         (init_parse): Use OBJECT_SUFFIX, not ".o".
17920
17921 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17922
17923         * class.c (emit_register_classes): Renamed from
17924         emit_register_class.
17925         * java-tree.h (emit_register_classes): Prototype renamed from
17926         emit_register_class.
17927         * jcf-parse.c (yyparse): Call emit_register_classes once before
17928         returning.
17929         * parse.y (java_expand_classes): No longer register classes.
17930
17931 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17932
17933         * class.c (is_compiled_class): New local variable
17934         seen_in_zip. Identify classes found in currently compiled source
17935         file(s).
17936         * decl.c (complete_start_java_method): Fixed typo.
17937         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17938         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17939         (CLASS_P): Moved around.
17940         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17941         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17942         java-tree.h
17943         (jcf_parse_source): Changed leading comment. Removed unnecessary
17944         fclose and CLASS_FROM_SOURCE_P marking.
17945         (parse_source_file): New local variables remember_for_generation
17946         and filename. Mark parsed file name identifier node. Removed block
17947         executed when parse_only was null. Set remember_for_generation.
17948         Use it as an argument to java_pop_parser_context.
17949         (yyparse): New local variables several_files, list, next node and
17950         current_file_list. Split ampersand separated file names into
17951         current_file_list. Iterate through the list and parse accordingly.
17952         * parse.h (java_pop_parser_context): New function prototype.
17953         * parse.y (ctxp_for_generation): New static global variable.
17954         (java_pop_parser_context): New argument generate. Link popped ctxp
17955         to ctxp_for_generation list accordingly.
17956         (java_complete_expand_methods): Fixed indentation.
17957         (java_expand_classes): New function.
17958
17959 1998-10-17  Per Bothner  <bothner@cygnus.com>
17960
17961         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17962
17963 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17964
17965         * lex.c (setjmp.h): No longer included.
17966         * lex.h (setjmp.h): Included.
17967         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17968         (duplicate_declaration_error_p): Renamed from
17969         duplicate_declaration_error.
17970         (build_array_from_name): New function prototype.
17971         * parse.y (setjmp.h): No longer included.
17972         (variable_declarator_id): Define action.
17973         (build_array_from_name): New function.
17974         (duplicate_declaration_error_p): Renamed from
17975         duplicate_declaration_error.  Fixed leading comment.
17976         (register_fields): Main `for' loop reorganized. Uses
17977         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17978         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17979         build_array_from_name.
17980         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17981         types.
17982         (read_import_dir): Don't try to skip `.' and `..'.
17983         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17984         build_array_from_name. Main `for' loop reorganized.
17985         (resolve_qualified_expression_name): When building access to a
17986         field, use the type where the field was found, not its own type.
17987         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17988         field was found is null.
17989         (qualify_ambiguous_name): Sweep through all successive array
17990         dimensions.
17991
17992 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17993
17994         * java-tree.h (pop_labeled_block, lang_printable_name,
17995         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17996         interface_of_p, inherits_from_p, fix_classpath,
17997         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17998         make_class_data, register_class, alloc_name_constant): New
17999         function prototypes.
18000         * lang.c (lang_decode_option): Set argc argument unused. Fixed
18001         indentation. Added cast to remove warning.
18002         (lang_printable_name): Set v argument unused.
18003         (lang_print_error): Added argument to lang_printable_name call.
18004         (java_dummy_print, print_lang_decl, print_lang_type,
18005         print_lang_identifier, lang_print_xnode): All argument marked
18006         unused.
18007         * lex.c (java_unget_unicode): Removed unnecessary argument.
18008         (java_allocate_new_line): Unused local variable is gone.
18009         (java_read_char): Added parenthesis in expressions to remove
18010         warnings.  Added final return statement.
18011         (java_read_unicode): Added parenthesis in expression to remove
18012         warning.
18013         (java_parse_end_comment): Fixed java_unget_unicode invocation.
18014         (java_parse_escape_sequence): Likewise.
18015         (java_lex): Unused local variables are gone. Fixed
18016         java_unget_unicode invocation.
18017         * lex.h (set_float_handler): Prototype added when JC1_LITE not
18018         defined.
18019         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18020         lang_printable_name invocation in macro.
18021         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18022         Likewise.
18023         (duplicate_declaration_error): Suppressed unused argument in
18024         prototype.
18025         (identical_subpath_p): Function declaration is gone.
18026         (patch_invoke): Suppressed unused argument in prototype.
18027         (patch_cast, build_labeled_block, check_thrown_exceptions):
18028         Likewise.
18029         * parse.y (setjmp.h): Included
18030         (toplev.h): Likewise.
18031         (field_declaration:): Suppressed unused local
18032         (label_decl:): Fixed build_labeled_block invocation.
18033         (java_pop_parser_context): Put extra parenthesis around assignment
18034         in if.
18035         (yyerror): Suppressed unused local variables.
18036         (variable_redefinition_error): Fixed lang_printable_name
18037         invocation.
18038         (create_interface): Suppressed unused local variables.
18039         (create_class): Likewise.
18040         (duplicate_declaration_error): Suppressed unused argument. Fixed
18041         lang_printable_name invocation.
18042         (register_fields): Suppressed unused local variable. Fixed
18043         duplicate_declaration_error invocation.
18044         (method_header): Suppressed unused local variable.
18045         (method_declarator, parser_check_super): Likewise.
18046         (java_complete_class): Suppressed unused local variable. Fixed
18047         fatal error message.
18048         (complete_class_report_errors): Added default: in switch.
18049         (java_check_regular_methods): Fixed lang_printable_name
18050         invocations.
18051         (check_throws_clauses): Likewise.
18052         (java_check_abstract_methods): Suppressed unused local
18053         variable. Fixed lang_printable_name invocation.
18054         (read_import_entry): Added supplemental return statement.
18055         (read_import_dir): Suppressed unused local variables.
18056         (check_pkg_class_access, declare_local_variables): Likewise.
18057         (source_start_java_method): Suppressed unused extern variable
18058         declarations
18059         (expand_start_java_method): Suppressed unused extern and local
18060         variable declarations.
18061         (java_complete_expand_methods): Likewise.
18062         (java_complete_expand_method): Suppressed unused local variables.
18063         (make_qualified_name): Likewise.
18064         (resolve_qualified_expression_name): Added default: in
18065         switch. Fixed lang_printable_name invocation.
18066         (class_instance_creation_expression): Added parenthesis around
18067         expressions.
18068         (patch_method_invocation_stmt): Fixed lang_printable_name and
18069         patch_invoke invocations.
18070         (check_for_static_method_reference): Fixed lang_printable_name
18071         invocation.
18072         (patch_invoke): Suppressed unused arguments and local variables.
18073         (lookup_method_invoke): Suppressed unused local variables.
18074         (qualify_ambiguous_name): Added default: in switch.
18075         (identical_subpath_p): Function removed.
18076         (patch_assignment): Suppressed unused local variables. Suppressed
18077         unnecessary if statement. Fixed lang_printable_name invocations.
18078         (try_builtin_assignconv): Fixed lang_printable_name invocations.
18079         (valid_ref_assignconv_cast_p): Parenthesis around
18080         expression. Suppressed unused local variables.
18081         (build_binop): Suppressed unused local variables. fixed
18082         lang_printable_name invocations.
18083         (string_constant_concatenation): Suppressed unused local
18084         variables.
18085         (patch_unaryop): Fixed lang_printable_name invocation.
18086         (patch_cast): Suppressed unnecessary argument. Fixed
18087         lang_printable_name invocation.
18088         (patch_array_ref): Fixed lang_printable_name invocation.
18089         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18090         (build_labeled_block): Suppressed unused argument.
18091         (generate_labeled_block): Fixed build_labeled_block invocation.
18092         (build_loop_body): Suppressed unused local variables.
18093         (patch_loop_statement): Likewise.
18094         (patch_exit): Fixed lang_printable_name invocation.
18095         (patch_switch_statement): Likewise.
18096         (case_identity): First argument marked unused.
18097         (patch_try_statement): Fixed lang_printable_name invocations.
18098         (patch_synchronized_statement, patch_throw_statement): Likewise.
18099         (check_thrown_exceptions): Fixed check_thrown_exceptions and
18100         lang_printable_name invocations.
18101         (check_thrown_exceptions_do): Suppressed unused argument.
18102
18103 1998-10-14  Tom Tromey  <tromey@cygnus.com>
18104
18105         * jcf-write.c (write_classfile): Add output class file as target.
18106         * lang-options.h: Added -MD, -MMD, -M, and -MM.
18107         * jcf.h: Added declarations for dependency-tracking functions.
18108         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18109         * lang.c (lang_decode_option): Recognize -MD and -MMD.
18110         (finish_parse): Call jcf_dependency_write.
18111         (dependency_tracking): New global.
18112         (DEPEND_SET_FILE): New define.
18113         (DEPEND_ENABLE): New define.
18114         (init_parse): Enable dependency tracking if required.
18115         Include "flags.h".
18116         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18117         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18118         (../gcjh$(exeext)): Likewise.
18119         (jcf-depend.o): New target.
18120         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18121         (GCJH_SOURCES): Likewise.
18122         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
18123         dep_name argument.
18124         (find_classfile): Added dep_name argument.
18125         (find_class): Compute name of dependency.
18126         (open_in_zip): Call jcf_dependency_add_file.
18127         * gjavah.c (output_file): No longer global.
18128         (usage): Don't mention "gjavah".
18129         (help): Likewise.
18130         (java_no_argument): Likewise.
18131         (version): Likewise.
18132         (main): Recognize and handle -M family of options.
18133         (print_mangled_classname): Return is void.
18134         (process_file): Handle case where output is suppressed.
18135         (HANDLE_END_FIELD): Likewise.
18136         (HANDLE_METHOD): Likewise.
18137         * jcf-depend.c: New file.
18138
18139 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18140
18141         * java-tree.def: Add missing newline at EOF.
18142
18143 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18144
18145         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18146         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18147         function.
18148         Include <config.h> and "system.h".
18149         (disassemble_method): Undefine RET to avoid clash with
18150         config/i386/i386.h.
18151
18152 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18153
18154         * decl.c (runtime_exception_type_node, error_exception_type_node):
18155         New global variables.
18156         (init_decl_processing): Initialized.
18157         * expr.c (java_lang_expand_expr): Set caught exception type to
18158         null if catch handler argument doesn't exit.
18159         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18160         tree codes.
18161         * java-tree.h (runtime_exception_type_node,
18162         error_exception_type_node): Global variables declared.
18163         (DECL_FUNCTION_THROWS): New macro.
18164         (DECL_FUNCTION_BODY): Modified comment.
18165         (DECL_SPECIFIC_COUNT): Likewise.
18166         (struct lang_decl): New field throws_list.
18167         (IS_UNCHECKED_EXPRESSION_P): New macro.
18168         * lex.c (java_lex): Generate location information for THROW_TK.
18169         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18170         EXCEPTIONS_P): New macros.
18171         (enum jdep_code): New value JDEP_EXCEPTION.
18172         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18173         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18174         PATCH_METHOD_RETURN_ERROR): New macros.
18175         (patch_method_invocation_stmt): Added new argument to prototype.
18176         (patch_synchronized_statement, patch_throw_statement,
18177         check_thrown_exceptions, check_thrown_exceptions_do,
18178         purge_unchecked_exceptions, check_throws_clauses): New function
18179         prototypes.
18180         * parse.y Fixed typo in keyword section.
18181         (throw:): Rule tagged <node>.
18182         (THROW_TK): Keyword tagged <operator>.
18183         (method_header:): Last argument to call to method_header passed
18184         from throws: rule.
18185         (throws:, class_type_list:, throw_statement:,
18186         synchronized_statement:, synchronized:): Defined actions.
18187         (method_header): New local variable current. Register exceptions
18188         from throws clause.
18189         (java_complete_tree): Complete and verify exceptions from throws
18190         clause.
18191         (complete_class_report_errors): Error message on exceptions not
18192         found
18193         (java_check_regular_methods): Fixed typo. Shortcut on private
18194         overriding methods. Changed error message on method
18195         redefinition. Check for throws clause compatibility.
18196         (check_throws_clauses): New function.
18197         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18198         method. Changed error message on method redefinition.
18199         (currently_caught_type_list): New static variable.
18200         (java_complete_expand_methods): Purge unchecked exceptions from
18201         throws clause list. Call PUSH_EXCEPTIONS before walk and
18202         POP_EXCEPTIONS after.
18203         (resolve_qualified_expression_name): Pass new argument as NULL to
18204         patch_method_invocation_stmt.
18205         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18206         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18207         argument list when appropriate. Use new argument if non null to
18208         store selected method decl.
18209         (patch_invoke): Convert if necessary args of builtin types before
18210         forming CALL_EXPR. Argument list no longer reversed here.
18211         (invocation_mode): Treat final methods as static methods.
18212         (java_complete_tree): New cases for THROW_EXPR: and
18213         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18214         function call.
18215         (complete_function_arguments): No more RECORD_TYPE
18216         conversion. Function parameter nodes no longer saved.
18217         (valid_ref_assignconv_cast_p): Avoid handling null type.
18218         (patch_binop): Fixed null constant reference handling.
18219         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18220         BUILD_THROW macros.
18221         (patch_try_statement): Fixed comments. Record caught types in
18222         list, push the list, expand try block and pop the list.
18223         (patch_synchronized_statement, patch_throw_statement,
18224         check_thrown_exceptions, check_thrown_exceptions_do,
18225         purge_unchecked_exceptions): New functions.
18226         * typeck.c (lookup_argument_method): Allow WFL in place of method
18227         DECL_NAME during method definition check
18228
18229 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18230
18231         * gjavah.c (decode_signature_piece): New function.
18232         (print_c_decl): Use it.  Added `name_override' argument.
18233         (print_method_info): Use name_override argument to print_c_decl.
18234         (seen_fields): Removed.
18235         (print_field_info): Don't update seen_fields.
18236         (struct method_name): New structure.
18237         (method_name_list): New global.
18238         (print_method_info): Add new method to list of methods.
18239         (name_is_method_p): New function.
18240         (print_field_info): If field name has same name as method, then
18241         change field name.
18242         (process_file): Parse methods before fields.
18243         (field_pass): New global.
18244         (HANDLE_END_FIELD): Take field_pass into account.
18245
18246 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18247
18248         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18249         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18250
18251 1998-10-03  Anthony Green  <green@cygnus.com>
18252
18253         * jvspec.c: Fix bug in jvgenmain_spec patch.
18254
18255 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18256
18257         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18258         * decl.c (soft_exceptioninfo_call_node): New global variable.
18259         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18260         takes extra integer argument. soft_exceptioninfo_call_node
18261         initialized.
18262         * except.c (java_set_exception_lang_code): New function
18263         (method_init_exceptions): Called here.
18264         (prepare_eh_table_type): New function.
18265         (expand_end_java_handler): Called here.
18266         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18267         one argument. Modified generation of call to
18268         soft_badarrayindex_node to use new argument.
18269         (build_java_arrayaccess): Pass faulty index value to
18270         build_java_throw_out_of_bounds_exception.
18271         (generate_name): New function.
18272         (java_lang_expand_expr): New local variables node, current,
18273         has_finally_p. Expand TRY_EXPR node.
18274         (process_jvm_instruction): Replace top of the stack with thrown
18275         object reference when entering exception handler.
18276         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18277         specific tree codes.
18278         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18279         global.
18280         (DECL_SPECIFIC_COUNT): New macro.
18281         (prepare_eh_table_type, java_set_exception_lang_code,
18282         generate_name): New function declarations.
18283         (match_java_method): Declaration deleted.
18284         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18285         macros.
18286         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18287         * parse.h (redefinition_error, refine_accessible_methods_list,
18288         can_cast_to_p): Function declaration removed.
18289         (classitf_redefinition_error, variable_redefinition_error,
18290         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18291         find_most_specific_methods_list, argument_types_convertible,
18292         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18293         valid_cast_to_p, valid_method_invocation_conversion_p,
18294         try_reference_assignconv, add_stmt_to_compound,
18295         build_jump_to_finally, build_tree_list, patch_try_statement,
18296         java_get_catch_block): New function declarations.
18297         * parse.y (string_buffer_type): Global variable deleted.
18298         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18299         finally): Rules tagged <node>.
18300         (TRY_TK, CATCH_TK): Token tagged <operator>.
18301         (class_body_declaration:, class_member_declaration:,
18302         formal_parameter:, explicit_constructor_invocation:,
18303         interface_member_declaration:, constant_declaration:,
18304         primary_no_new_array:, class_instance_creation_expression:,
18305         array_creation_expression:): Issue error on unsuported JDK1.1
18306         features.
18307         (try_statement:, catches:, finally:): Define actions.
18308         (catch_clause_parameter): New rule.
18309         (catch_clause:): Use new rule catch_clause_parameter.
18310         (parse_jdk1_1_error): New function.
18311         (redefinition_error): Renamed classitf_redefinition_error.
18312         (variable_redefinition_error): New function.
18313         (check_class_interface_creation): Call
18314         classitf_redefinition_error.
18315         (java_complete_tree): Added error message on JDEP_TYPE: case.
18316         (complete_class_report_errors): Fixed indentation.
18317         (declare_local_variables): Call variable_redefinition_error.
18318         (source_end_java_method): Call java_set_exception_lang_code and
18319         emit_handlers where appropriate.
18320         (java_method_add_stmt): Call add_stmt_to_block.
18321         (add_stmt_to_block): New function.
18322         (lookup_method_invoke): Fixed outside comment. new local variable
18323         candicates.  Call find_applicable_accessible_methods_list and
18324         find_most_specific_methods_list when searching for a
18325         method. Modified error report to list possible candidates when
18326         applicable.
18327         (find_applicable_accessible_methods_list,
18328         find_most_specific_methods_list, argument_types_convertible): New
18329         function.
18330         (refine_accessible_methods_list): Function deleted.
18331         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18332         expr (if applicable) before calling patch_array_ref.
18333         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18334         (enter_block): Fixed comment.
18335         (enter_a_block): New function.
18336         (patch_assignment): Reorganized. Call try_reference_assignconv for
18337         references. Call valid_cast_to_p instead of can_cast_to_p.
18338         (try_reference_assignconv,
18339         valid_builtin_assignconv_identity_widening_p): New functions.
18340         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18341         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18342         functions.
18343         (build_string_concatenation): Don't resolve StringBuffer.
18344         (patch_cast): Fixed inverted arguments.
18345         (patch_array_ref): Code to save array expr deleted. Call
18346         valid_cast_to_p instead of can_cast_to_p.
18347         (generate_labeled_block): Call generate_name.
18348         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18349         patch_try_statement): New functions.
18350         * typeck.c (match_java_method): Function deleted.
18351
18352 1998-10-02  Anthony Green  <green@cygnus.com>
18353
18354         * jvspec.c: jvgenmain_spec uses different temporary file names.
18355
18356 1998-10-02  Anthony Green  <green@cygnus.com>
18357
18358         * jvspec.c (lang_specific_driver): Fail if user specifies
18359         --main= when not linking.
18360
18361 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18362
18363         * class.c (make_class_data): Push value for `thread' field.
18364         * decl.c (init_decl_processing): Added `thread' field to class.
18365
18366         * class.c (add_field): Always make static fields externally
18367         visible.
18368
18369 1998-09-26  Anthony Green  <green@cygnus.com>
18370
18371         * expr.c (build_java_athrow,
18372         build_java_throw_out_of_bounds_exception, expand_invoke,
18373         build_newarray, expand_java_multianewarray, build_java_monitor):
18374         Update comments to reflect _Jv_* function names.
18375
18376 1998-09-25  Per Bothner  <bothner@cygnus.com>
18377
18378         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18379         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18380         * parse.y (expand_start_java_method):  Likewise.
18381
18382 1998-09-24  Per Bothner  <bothner@cygnus.com>
18383
18384         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18385
18386         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18387         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18388         * expr.c:  Remove no-longer-needed calls to promote_type.
18389         * decl.c (give_name_to_locals):  Liekwise.
18390         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18391         * parse.y:  Add/remove promote_type calls as appropriate.
18392         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18393         (parse_signature_string):  Likewise.
18394         (build_java_array_type):  Fix for now signature convenions.
18395
18396         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18397
18398 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18399
18400         * class.c (init_class_processing): libjava function renamed to
18401         _Jv_RegisterClass.
18402
18403 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18404
18405         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18406         * java-tree.def: Fixed DEFTREECODE third argument.
18407         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18408         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18409         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18410         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18411         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18412         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18413         * lang.c (java_tree_code_type, java_tree_code_length,
18414         java_tree_code_name): New arrays.
18415         (lang_init): Append Java tree node definitions to Gcc ones.
18416         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18417         defined.
18418         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18419         wfl_to_string.
18420         (java_lex): Allow declaration of empty string constants. Retain
18421         location information on CASE_TK and DEFAULT_TK.
18422         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18423         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18424         Modified to be more robust.
18425         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18426         (build_new_invocation, try_builtin_assignconv,
18427         patch_switch_statement, string_constant_concatenation,
18428         build_string_concatenation, patch_string_cst, patch_string,
18429         java_expand_switch): New function declarations.
18430         * parse.y: Rules related to switch and EH tagged <node>.
18431         (label_id): Set to NULL_TREE
18432         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18433         tree nodes.
18434         (this_or_super:): Fixed indentation.
18435         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18436         statement_expression:): Removed call to RULE on all sub-rules.
18437         (switch_expression:, switch_labels:): New rules.
18438         (switch_statement:, switch_block:, switch_block_statement_groups:,
18439         switch_block_statement_group:, switch_labels:, switch_label:):
18440         Defined actions.
18441         (throw_statement:, synchronized_statement:, try_statement:):
18442         Defined temporary actions.
18443         (class_instance_creation_expression:): Call
18444         build_new_invocation. Fixed indentation.
18445         (field_access): Fixed indentation.
18446         (method_invocation): Likewise.
18447         (make_qualified_primary): Use THIS_EXPR.
18448         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18449         resolving from SUPER, set *type_found.
18450         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18451         (java_complete_tree): Removed unused local variable `location'. Case
18452         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18453         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18454         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18455         STRING_CST: case. default: checks for patchable strings.
18456         (complete_function_arguments): Transform string constant or
18457         crafted StringBuffer if necessary.
18458         (build_method_invocation): Fixed comments.
18459         (build_new_invocation): New function.
18460         (patch_assignment): Call try_builtin_assignconv to figure a valid
18461         assignment conversion between builtin types.
18462         (try_builtin_assignconv): New function.
18463         (build_binop): Use URSHIFT_EXPR directly to call build.
18464         (operator_string): Use UNARY_PLUS_EXPR.
18465         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18466         operator.
18467         (do_merge_string_cste, merge_string_cste,
18468         string_constant_concatenation, build_string_concatenation,
18469         patch_string, patch_string_cst): New function.
18470         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18471         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18472         (build_newarray_node): Use NEW_ARRAY_EXPR.
18473         (build_this): Use THIS_EXPR.
18474         (build_return): Enable debug information on return statement.
18475         (build_if_else_statement): Likewise.
18476         (complete_labeled_statement): Fixed related comment.
18477         (build_loop_body): Fixed comment.
18478         (build_bc_statement): Enable debug information on break/continue
18479         statements.
18480         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18481         context.
18482         (patch_switch_statement, case_identity, java_expand_switch): New
18483         functions.
18484
18485 1998-09-21  Per Bothner  <bothner@cygnus.com>
18486
18487         * buffer.h (BUFFER_INIT):  New macro.
18488         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18489         Pass (struct jcf_partial *state) to most functions.
18490         (jcf_block, jcf_relocation):  New types.
18491         Support labels, branches, conditionals, loops.
18492
18493 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18494
18495         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18496
18497 1998-09-21  Per Bothner  <bothner@cygnus.com>
18498
18499         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18500         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18501         not integer_type_node (INT_TYPE_SIZ bits).
18502
18503         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18504
18505         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18506         * jcf-dump.c (print_exception_table):  New function.
18507         (disassemble_method):  Better handling of wide instructions.
18508         Make more robust for bad input.
18509
18510 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18511
18512         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18513         FreeBSD.
18514
18515 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18516
18517         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18518
18519 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18520
18521         * Makefile.in ($(PARSE_H)): Removed target.
18522
18523 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18524
18525         * Makefile.in (JAVA_OBJS): Add memmove.o
18526         (memmove.o): New target & rules.
18527
18528 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18529
18530         * expr.c (expand_invoke): Don't generate a call to the class init
18531         code.
18532
18533 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18534
18535         * Makefile.in: Add many missing dependencies.
18536         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18537         as appropriate.
18538         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18539         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18540
18541 1998-09-11  Per Bothner  <bothner@cygnus.com>
18542
18543         * decl.c (complete_start_java_method):  If method is static (and
18544         not private) call _Jv_InitClass.
18545         * expr.c (expand_invoke):  Don't call build_class_init.
18546
18547         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18548
18549 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18550
18551         * Make-lang.in (GCJ): Define before using.
18552
18553 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18554
18555         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18556         losing due to namespace pollution in GNU getopt.h
18557
18558 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18559
18560         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18561         (java.all.cross): Likewise.
18562         (java.rest.encap): Likewise.
18563
18564 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18565
18566         * gjavah.c (print_class_decls): Fix thinko in arglist
18567         * jcv-io.c (find_classfile): Similarly.
18568
18569 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18570
18571         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18572
18573 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18574
18575         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18576         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18577         * Makefile.in (PARSE_C): New macro.
18578         (PARSE_H): Likewise.
18579         (PARSE_SCAN_C): Likewise.
18580         ($(PARSE_C)): Target renamed from parse.c.
18581         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18582         (clean): Remove parse-scan.c as well.
18583         (parse.o): Depend on $(PARSE_C).
18584
18585 1998-09-05  Anthony Green  <green@cygnus.com>
18586
18587         * README, license.terms: Removed.
18588
18589         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18590         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18591         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18592         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18593         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18594         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18595         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18596         and Java trademark attribution.
18597
18598 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18599
18600         * Makefile.in: Use gcjh, not gjavah.
18601         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18602         * Make-lang.in: Changed gjavah to gcjh everywhere.
18603
18604 1998-09-03  Per Bothner  <bothner@cygnus.com>
18605
18606         * gjavah.c:  Support new -prepend -add -append flags.
18607         (print_method_info):  Method is not virtual if class is final.
18608
18609 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18610
18611         * jv-scan.c: Fixed copyright assignment.
18612         * keyword.gperf: Likewise.
18613         * keyword.h: Likewise.
18614         * lex.c: Fixed copyright assignment.
18615         (java_lex): Push unicode back when parsing '<'.
18616         * lex.h: Fixed copyright assignment.
18617         * parse-scan.y: Likewise.
18618         * parse.h: Fixed copyright assignment.
18619         (build_debugable_stmt, complete_for_loop): New function prototypes.
18620         * parse.y: Fixed copyright assignment.
18621         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18622         size_zero_node when completing a loop with no exit condition.
18623         (for_statement_nsi:): Define action.
18624         (for_init:, for_update:): Return size_zero_node when empty.
18625         (declare_local_variables): Call build_debugable_stmt.
18626         (build_debugable_stmt): New function.
18627         (build_loop_body): Build debugable statement around loop
18628         condition part.
18629         (complete_loop_body): Take into account the debugable statement
18630         around the EXIT_EXPR.
18631         (complete_loop_body): New function.
18632         (patch_exit_expr): Fixed condition inversion.
18633
18634 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18635
18636         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18637         name of thread define.
18638         * jvspec.c (THREAD_NAME): New macro.
18639         (GCLIB): Likewise.
18640         (THREADLIB): Likewise.
18641         (lang_specific_driver): Recognize attempt to link with thread
18642         library or gc library.  Recognize -ljava on command line so it
18643         isn't linked against more than once.
18644
18645 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18646
18647         * parse-scan.y (report_main_declaration): Name of the class
18648         containing `main' can be a qualified name.
18649
18650 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18651
18652         * config-lang.in: Changed gjavac to gjc everywhere.
18653         * Make-lang.in: Changed gjavac to gjc everywhere.
18654
18655 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18656
18657         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18658         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18659         and install the files.
18660         * Makefile.in (JAVA_OBJS_LITE): New variable.
18661         (compiler:): Now include jv-scan as a dependency.
18662         (../jv-scan$(exeext), parse-scan.c): New targets.
18663         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18664         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18665         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18666         check for errors even if parse_only.
18667         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18668         defined.
18669         (yylex): New function. Uses java_lex body.
18670         (java_lex): Removed commented out statement. Remove local variable
18671         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18672         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18673         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18674         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18675         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18676         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18677         where appropriate.
18678         (java_lex_error): Empty if JC1_LITE is defined.
18679         (java_get_line_col): Return 0 if JC1_LITE is defined.
18680         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18681         SET_MODIFIER_CTX): Moved into the section containing the macros
18682         conditionally defined by JC1_LITE.
18683         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18684         argument if JC1_LITE is defined.
18685         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18686         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18687         is defined.
18688         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18689         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18690         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18691         to different values according to JC1_LITE.
18692         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18693         declared if JC1_LITE set.
18694         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18695         defined if JC1_LITE not set.
18696         (struct parser_ctx): Reorganized and skip the jc1 front end part
18697         if JC1_LITE set.
18698         (java_layout_classes): New function definition.
18699         (java_push_parser_context, java_init_lex, yyparse, yylex,
18700         yyerror): Prototype always declared. All other static function
18701         prototypes declared only if JC1_LITE is not set.
18702         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18703         declared in parse.h.
18704         (java_layout_classes): New function.
18705         (java_complete_expand_methods): No longer layout the class here.
18706         * parse-scan.y: New file.
18707         * jv-scan.c: New file.
18708
18709 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18710
18711         * gjavah.c (main): Handle -friend option.
18712         (friend_specs): New global.
18713         (generate_access): Handle friend_specs.
18714         (process_file): Likewise.
18715         (MAX_FRIENDS): New macro.
18716         (friend_count): New global.
18717         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18718         Changed all callers.
18719
18720 1998-08-24  Per Bothner  <bothner@cygnus.com>
18721
18722         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18723         (main):  Handle processing all the entries of a named .zip archive.
18724         * jcf-io.c (jcf_trim_old_input):  New function.
18725         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18726
18727 1998-08-24  Per Bothner  <bothner@cygnus.com>
18728
18729         * lang.c (flag_assume_compiled):  Make default be on.
18730
18731 1998-08-21  Per Bothner  <bothner@cygnus.com>
18732
18733         * jcf-dump.c:  Add bunches of flags to control output more.
18734         (process_class):  New function;  support printing more than one class.
18735         (main): Support new --print-main and --javap flags.
18736         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18737         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18738
18739 1998-08-20  Per Bothner  <bothner@cygnus.com>
18740
18741         Change mangling of dispatch table to match C++ vtable (w/thunks).
18742         * class.c (build_dtable_decl), java-tree.h:  New function.
18743         (make_class_data):  Call it.
18744         * decl.c (init_decl_processing):  Likewise.
18745
18746 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18747
18748         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18749         soft_anewarray; adjust args passed.
18750         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18751         match _Jv_NewObjectArray.
18752
18753 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18754
18755         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18756         * expr.c (loopup_label): Call create_label_decl.
18757         (create_label_decl): New function.
18758         (java_lang_expand_expr): Call expand_start_bindings with argument
18759         set to zero.
18760         * java-tree.h Added space after PROTO in function declarations
18761         when necessary.
18762         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18763         (create_label_decl, push_labeled_block): New function
18764         declarations.
18765         * lex.c (label_id): Initialize.
18766         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18767         switch.
18768         * parse.h Added space after PROTO in function declarations when
18769         necessary.
18770         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18771         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18772         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18773         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18774         macros.
18775         (struct parser_ctxt): New fields current_loop,
18776         current_labeled_block.
18777         (build_if_else_statement, patch_if_else_statement,
18778         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18779         generate_labeled_block, complete_labeled_statement,
18780         build_bc_statement, patch_bc_statement, patch_loop_statement,
18781         build_new_loop, build_loop_body, complete_loop_body): New function
18782         declarations.
18783         * parse.y (java_warning_count): New global variable.
18784         (label_id): New static variable.
18785         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18786         (block:): Return size_zero_node when block is empty.
18787         (empty_statement:): Return size_zero_node.
18788         (statement:): Implement supplemental action when for_statement: is
18789         reduced.
18790         (label_decl:): New rule.
18791         (labeled_statement:): Rewritten using label_decl. Actions
18792         implemented.
18793         (labeled_statement_nsi:): Likewise.
18794         (if_then_statement): Actions implemented.
18795         (while_expression): New rule.
18796         (while_statement:): Rewritten using while_expression. Actions
18797         implemented.
18798         (while_statement_nsi:): Likewise.
18799         (do_statement_begin:): New rule.
18800         (do_statement:): Rewritten using do_statement_begin. Actions
18801         implemented.
18802         (for_statement:): Rewritten using for_begin. Actions implemented.
18803         (for_statement_nsi:): Likewise.
18804         (for_header:, for_begin:): New rules.
18805         (for_init:): Actions implemented.
18806         (statement_expression_list:, break_statement:,
18807         continue_statement:): Likewise.
18808         (yyerror): Count number of issued warning(s).
18809         (java_report_errors): Report error(s) and/or warning(s).
18810         (java_complete_class): Use build_java_argument_signature to
18811         recompute completed method signature.
18812         (java_check_regular_methods): New locals method_wfl and aflags.
18813         Use method_wfl instead of lookup_cl during error reports. Fixed
18814         indentation and modified some error messages. Use
18815         lang_printable_name in method instead of the DECL_NAME. New code
18816         to issue warnings on methods not overriding corresponding methods
18817         private to a different package.
18818         (java_method_add_stmt): Call add_stmt_to_compound.
18819         (add_stmt_to_compound): New function.
18820         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18821         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18822         (build_if_else_statement, patch_if_else_statement,
18823         build_labeled_block, generate_labeled_block,
18824         complete_labeled_statement, build_new_loop, build_loop_body,
18825         complete_loop_body, patch_loop_statement, build_bc_statement,
18826         patch_bc_statement, patch_exit_expr): New functions.
18827         * typeck.c (build_java_signature): Build argument signature before
18828         enclosing it in between parenthesis.
18829
18830 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18831
18832         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18833         (JAVA_OBJS): Added reminder comment
18834
18835 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18836
18837         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18838         be interpreted as a long long.
18839
18840 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18841
18842         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18843         soft_initialise_class.  Use _Jv_NewMultiArray, not
18844         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18845         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18846         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18847         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18848
18849 1998-08-12  Per Bothner  <bothner@cygnus.com>
18850
18851         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18852         length_identifier_node):  New global tree node constants.
18853         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18854         Replace uses by super_identifier_node etc.
18855         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18856
18857         * parse.y (resolve_field_access):  Don't special-case ".length" if
18858         flag_emit_class_files.
18859         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18860         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18861         and ARRAY.length.
18862
18863 1998-08-11  Per Bothner  <bothner@cygnus.com>
18864
18865         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18866         * class.c (make_method_value):  Remove init for removed fields.
18867
18868         * class.c (layout_class):  Use build_java_argument_signature.
18869         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18870
18871         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18872         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18873         (build_java_signature):  Don't use push_java_argument_signature.
18874
18875         * typeck.c (lookup_argument_method):  New function.
18876         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18877         instead of lookup_java_method2 followed by lookup_java_method.
18878
18879         * parse.y (check_method_redefinition):  Minor optimization.
18880
18881         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18882         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18883
18884 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18885
18886         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18887         c-pragma.o.
18888
18889         * gjavah.c (java_float_finite): Use K&R-style definition.
18890         (java_double_finite): Likewise.
18891         (generate_access): Now returns void.  Changed all callers.
18892         (last_access_generated): Removed.
18893         (process_file): Only make a single pass over the .class file.
18894
18895 1998-07-29  Per Bothner  <bothner@cygnus.com>
18896
18897         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18898         for compatibility for G++ (with -fvtable-thunks).
18899         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18900
18901         * gjavah.c (process_file):  Use public inheritance for super-class.
18902
18903 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18904
18905         * lex.c (java_init_lex): Initialize ctxp->package.
18906         * parse.h (struct parser_ctxt): package and package_len replaced
18907         by tree package, an identifier node. Field method_decl_list is
18908         gone. Fixed comments.
18909         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18910         class_in_current_package): New function prototypes.
18911         * parse.y (array_type:): Set class loaded flag on primitive type
18912         arrays.
18913         (package_declaration:): Assign ctxp->package to the
18914         identifier node.
18915         (method_invocation:): Handle invocation of method qualified by
18916         `super'.
18917         (single_type_import_declaration:): Removed ambiguity check.
18918         (java_pop_parser_context): New local variable `next'. Reset and
18919         set IMPORT_CLASSFILE_NAME flags on current and previous import
18920         list.
18921         (java_accstring_lookup): Use new local macro COPY_RETURN.
18922         (lookup_field_wrapper): New function.
18923         (parser_qualified_classname): Use merge_qualified_name.
18924         (parser_check_super_interface): Broaden error message.
18925         (do_resolve_class): Check for qualified class name in the current
18926         compilation unit if appropriate.
18927         (process_imports): Check for already defined classes.
18928         (check_pkg_class_access): Got rid of call to
18929         get_access_flags_from_decl.
18930         (java_complete_expand_methods): Call safe_layout_class based on
18931         the current class size.
18932         (make_qualified_primary): Build a WFL qualification on primary if
18933         none exists.
18934         (merge_qualified_name): New function.
18935         (make_qualified_name): Use merge_qualified_name.
18936         (resolve_expression_name): Use safe_lookup_field.
18937         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18938         (resolve_qualified_expression_name): Likewise. Check on resolved
18939         element accessibility.
18940         (not_accessible_p, class_in_current_package): New functions.
18941         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18942         (patch_method_invocation_stmt): Merged common pieces. Check
18943         accessibility of invoked method.
18944         (check_for_static_method_reference): Add returned type in error
18945         message.
18946         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18947         (refine_accessible_methods_list): Merged two conditions in test.
18948         (java_complete_class): Sanity check on stabilize_ref gone.
18949         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18950
18951 1998-07-28  Per Bothner  <bothner@cygnus.com>
18952
18953         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18954
18955 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18956
18957         * gjavah.c (F_NAN): Removed.
18958         (F_NAN_MASK): New macro.
18959         (F_POSITIVE_INFINITY): Removed.
18960         (F_NEGATIVE_INFINITY): Likewise.
18961         (java_float_finite): Rewrote.
18962         (D_NAN_MASK): Renamed.
18963         (java_double_finite): Rewrote.
18964         (D_POSITIVE_INFINITY): Removed.
18965         (D_NEGATIVE_INFINITY): Likewise.
18966
18967         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18968         If verbose, print underlying representation of value in hex.
18969
18970 1998-07-24  Per Bothner  <bothner@cygnus.com>
18971
18972         * buffer.h, buffer.c:  New files.
18973         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18974
18975         Support locals variables and writing their debug entries to .class.
18976         * jcf-write.c:  Simplify some by user new buffer type.
18977         (vode_buffer_grow):  Removed.
18978         (struct localvar_info):  New type.
18979         (localsvars, localvartable):  New buffers.
18980         (localvar_alloc, localvar_free):  New functions.
18981         (generate_bytecode_insns):  Handle local variables.
18982         (generate_classfile):  Write LocalVariableTable attribute.
18983
18984 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18985
18986         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18987         * zipfile.h (ZIPMAGIC): New macro.
18988
18989 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18990
18991         * Makefile.in (gjavah.o): Updated dependencies.
18992         (jcf-dump.o): Likewise.
18993         (all.indirect): Use ../gjavah.
18994         (../gjavah$(exeext)): Likewise.
18995         (clean): Don't remove gjavah.
18996         (clean): Remove parse.c, not java/parse.c.
18997         * Make-lang.in (java): Added gjavah.
18998         (gjavah$(exeext)): New target.
18999         (GJAVAH_SOURCES): New macro.
19000         (java.all.build): Added gjavah.
19001         (java.all.cross): Likewise.
19002         (java.rest.encap): Likewise.
19003         * config-lang.in (compilers, stagestuff): Added gjavah.
19004
19005 1998-07-23  Tom Tromey  <tromey@cygnus.com>
19006
19007         * gjavah.c (java_float_finite): New function.
19008         (java_double_finite): Likewise.
19009         (F_POSITIVE_INFINITY): New macro.
19010         (F_NEGATIVE_INFINITY): Likewise.
19011         (F_NAN): Likewise.
19012         (D_POSITIVE_INFINITY): Likewise.
19013         (D_NEGATIVE_INFINITY): Likewise.
19014         (D_NAN): Likewise.
19015         (print_field_info): Use java_float_finite and java_double_finite.
19016
19017 1998-07-23  Per Bothner  <bothner@cygnus.com>
19018
19019         * parse.y (method_header):  Name "this" implicit argument.
19020
19021 1998-07-22  Per Bothner  <bothner@cygnus.com>
19022
19023         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
19024         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
19025         (put_linenumber):  New function.
19026         (generate_bytecode_insns, generate_classfile):  Write line numbers.
19027
19028 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19029
19030         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19031         (lookup_name, build_known_method_ref, build_class_init,
19032         build_invokevirtual, invoke_build_dtable, match_java_method,
19033         build_field_ref, pushdecl_force_head, build_java_binop,
19034         binary_numeric_promotion, build_decl_no_layout,
19035         build_java_arrayaccess, build_newarray, build_anewarray,
19036         build_java_array_length_access, build_java_arraynull_check): New
19037         extern function prototypes.
19038         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19039         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19040         java-tree.h.
19041         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19042         to NULL
19043         * jcf.h (jcf_out_of_synch): New extern function prototype.
19044         * parse.h: Static/global function implemented in parse.y
19045         prototyped and declarations moved at the end of the file.
19046         (DECL_P): Check that the argument isn't null.
19047         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19048         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19049         (QUAL_DECL_TYPE): New macro.
19050         (PARAMS): Macro definition removed.
19051         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19052         (return_statement:): Call build_return.
19053         (field_access:): Call make_qualified_primary in sub rule.
19054         (method_invocation:): Build method invocation and call
19055         make_qualified_primary when processing primaries.
19056         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19057         get_type_from_signature.
19058         (java_check_regular_method): Extra integer 0 argument when calling
19059         lookup_java_method2.
19060         (lookup_java_interface_method2): Extra method DECL argument when
19061         calling lookup_java_interface_method2.
19062         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19063         COMPOUND_EXPR node.
19064         (java_complete_expand_method): Layout current class iff not
19065         already done. Don't process interface's methods.
19066         (java_complete_expand_method): Use super class only if it
19067         exists. Use current class otherwise.
19068         (make_qualified_primary): New function.
19069         (resolve_expression_name): Process qualified expression or
19070         expression from primary the same way.
19071         (resolve_expression_name): Two last arguments to
19072         resolve_field_access are now NULL_TREEs.
19073         (resolve_field_access): New variable is_static. Local field must
19074         be DECLs. is_static computed on field DECLs only. Append code in
19075         where_found to the field access if necessary. Use QUAL_DECL_TYPE
19076         to initialize field_type.
19077         (resolve_qualified_expression_name): New local variable,
19078         previous_call_static and is_static. Handle primaries with function
19079         calls, casts, array references and `this'. `super' now handled as
19080         `(super_class)this'. Use is_static to clarify boolean expressions.
19081         Added code to handle case where a proper handle is required to
19082         access a field. Use QUAL_DECL_TYPE where applicable.
19083         (maybe_access_field): New function.
19084         (patch_method_invocation_stmt): New arguments primary, where,
19085         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19086         deleted. Use `where' as a type to search from if specified. Check
19087         for static method reference where forbidden. Append primary or
19088         current_this to the argument list if not calling constructor nor
19089         static methods.
19090         (check_for_static_method_reference): New function.
19091         (patch_invoke): Layout the class on which new is done if
19092         necessary.
19093         (lookup_method_invoke): Changed format to report errors on
19094         methods.
19095         (qualify_ambiguous_name): New local variable this_found. Now
19096         handle things from primaries. Method call are considered
19097         expression names.
19098         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19099         changed into NULLs.
19100         (not_initialized_as_it_should_p): Comply with the new DECL_P.
19101         (java_complete_tree): New case fo RETURN_EXPR. Process function
19102         call arguments in separate function.
19103         (complete_function_arguments): New function.
19104         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19105         anymore.
19106         (patch_assignment): Take the return function slot into account as
19107         a RHS. Distinguish assignment from a return.
19108         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19109         when checking methods in interfaces.
19110         (resolve_type_during_patch): NULL argument to unresolve_type_p
19111         instead of NULL_TREE.
19112         (patch_newarray): Fixed typo in comment.
19113         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19114         (build_return, patch_return): New functions.
19115         * typeck.c (lookup_java_constructor): Fixed typo in comment.
19116
19117 1998-07-21  Per Bothner  <bothner@cygnus.com>
19118
19119         * constants.c (find_name_and_type_constant, find_fieldref_index,
19120         find_methodref_index):  New methods.
19121         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
19122         just return given method.  Also, rename to build_known_method_ref.
19123         (expand_invoke):  Rename call to build_invoke_non_interface.
19124         * java-tree.h, parse.h:  Update prototype.
19125         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
19126         (such as expand_expr_stmt) if flag_emit_class_files.
19127         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19128         STACK_TARGET, IGNORE_TARGET):  New macros.
19129         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
19130         (generate_bytecode_insn):  New function to generate method's bytecode.
19131         (generate_classfile):  Node generate Code attribute for a method.
19132         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19133         push_long_const, field_op, adjust_typed_op, maybe_wide):
19134         New functions used by generate_bytecode_insn.
19135
19136         * typeck.c (signature_include_return):  Remove variable.
19137         (push_java_argument_signature, build_java_argument_signature):  New.
19138         (build_java_signature):  Use push_java_argument_signature.
19139         * parse.y:  Use build_java_argument_signature instead of fiddling
19140         with signature_include_return.
19141
19142 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19143
19144         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19145         types.
19146
19147         * Makefile.in (all.indirect): Added gjavah$(exeext).
19148         (gjavah$(exeext)): Added $(exeext).
19149         (clean): Likewise.
19150
19151 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19152
19153         * class.c (layout_class): Call to java_layout_parsed_class replace
19154         by safe_layout_class.
19155         * expr.c (build_java_array_length_access): Removed static storage
19156         class in the function definition.
19157         (build_java_arraynull_check): Likewise.
19158         Also fixed typos in two comments.
19159         * lex.c (java_init_lex): Initialize static global kw_length.
19160         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19161         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19162         java_lex_error.
19163         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19164         * parse.h (resolve_no_layout): New static function declaration.
19165         (get_identifier_in_static): Declaration removed.
19166         (java_layout_parsed_class): Function name declaration changed to
19167         safe_layout_class.
19168         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19169         not_initialized_as_it_should_p, build_this): New static function
19170         declarations.
19171         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19172         binary_numeric_promotion, stabilize_reference,
19173         build_decl_no_layout, build_java_arrayaccess): Extern function
19174         declarations moved into their own section.
19175         (build_newarray, build_anewarray, build_java_array_length_access,
19176         build_java_arraynull_check): New extern function declarations.
19177         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19178         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19179         fake tree codes.
19180         (CALL_CONSTRUCTOR_P): New macro.
19181         * parse.y (kw_length): New static global tree node.
19182         (return_statement): Tagged <node>.
19183         (RETURN_TK): Tagged <operator>.
19184         (variable_declarator_id:): Build variable declaration with an
19185         empty initialization value if a syntax error was found in the
19186         initialization part of the variable declaration.
19187         (statement_without_trailing_substatement:): return_statement: now
19188         uses the default rule.
19189         (return_statement:): Temporarily fixed to return NULL_TREE.
19190         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19191         (class_instance_creation_expression:): Class creation rules now
19192         call build_method_invocation upon reduction.
19193         (array_creation_expression:): Rules call build_newarray_node upon
19194         reduction.
19195         (dim_exprs:): Build a list of dimension expressions.
19196         (dim_expr:): Store location of the OSB_TK in the dimension
19197         expression node.
19198         (method_invocation:): Added a new error rule.
19199         (build_unresolved_array_type): WFL argument may also be an array
19200         on a primitive type. Name of the argument changed to reflect this.
19201         (method_declarator): Insert argument type at the beginning of the
19202         argument type list and later reverse the list.
19203         (unresolved_type_p): Argument 'returned' may be optionally
19204         NULL_TREE.
19205         (java_layout_class_from_source): Function renamed
19206         safe_layout_class.
19207         (resolve_and_layout): Now call resolve_no_layout and
19208         safe_layout_class.
19209         (resolve_no_layout): New function.
19210         (purify_type_name): New function.
19211         (complete_class_report_errors): Call purify_type_name during error
19212         report on a type not found.
19213         (process_imports): error_found local variable doesn't need to be
19214         initialized to zero.
19215         (declare_local_variables): New local type_wfl. Fixed typo in error
19216         message. type_wfl assigned to unresolved type and used to register
19217         incomplete type. Build a WFL around the variable initialization
19218         statement so that debug info can be generated on it.
19219         (source_start_java_method): Reverse argument list after they've
19220         been processed.
19221         (current_this): New static global variable.
19222         (java_complete_expand_methods): Set current_this when appropriate.
19223         (resolve_expression_name): Build correct static and non static
19224         field access bearing a simple name.
19225         (resolve_field_access): Resolve the length field of arrays. Handle
19226         f.m() cases.
19227         (patch_method_invocation_stmt): Set the type of the method
19228         invocation to error_mark_node. This value is later overridden by a
19229         valid type, if any. Don't handle qualified constructor invocation
19230         as qualified method invocation. Call lookup_method_invoke with its
19231         new flag. It's no longer necessary to access the selected method
19232         as the value of a tree list. Handle constructor invocation.
19233         (patch_invoke): Reverse argument list when invoking non interface
19234         methods. Insert call to new as the first argument of the
19235         constructor.
19236         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19237         defined within a final class. Return INVOKE_STATIC if the invoked
19238         method is a constructor.
19239         (lookup_method_invoke): New lc argument is a flag to indicate a
19240         constructor lookup. Now handle constructor lookup. Choose the most
19241         specific method in case several were matching the invocation
19242         requirements. Return a method decl instead of a tree list featuring
19243         one single method decl element.
19244         (refine_accessible_methods_list): New lc flag argument to
19245         indicate that a constructor is being looked up.
19246         (not_initialized_as_it_should_p): New function.
19247         (java_complete_tree): Now process fake tree codes
19248         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19249         save_expr on resolved function call arguments. Case on
19250         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19251         (patch_assignment): LHS can be a field access expression. When
19252         dealing with reference, lhs_type is the promoted type of the
19253         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19254         applicable.
19255         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19256         (patch_binop): Use not_initialized_as_it_should_p where
19257         applicable.
19258         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19259         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19260         where applicable.
19261         (resolve_type_during_patch): New function.
19262         (patch_cast): Call resolve_type_during_patch to resolve type and
19263         report error accordingly.
19264         (patch_array_ref): Use not_initialized_as_it_should_p where
19265         applicable. Array base expression is saved before being
19266         used. Promote the type of an array elements if it contains non
19267         builtin types.
19268         (build_newarray_node, patch_newarray, build_this): New functions.
19269
19270 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19271
19272         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19273         increment it in `for' statement.
19274         (print_field_info): If number is inf or nan, don't print it.
19275         (print_method_info): If method name is `delete', just ignore it.
19276         (print_c_decl): Special-case jstringArray.
19277
19278         * gjavah.c (help): New function.
19279         (no_argument): New function.
19280         (usage): Changed text.
19281         (main): Rewrote argument handling.  Now handles -v, --help,
19282         --version.
19283         (version): New function.
19284         (found_error): New global.
19285         (main): Return found_error.
19286         (generate_access): Set found_error.
19287         (print_c_decl): Likewise.
19288
19289 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19290
19291         * gjavah.c (print_c_decl): Don't print "," when examining field.
19292         Skip type name when looking at "[L" types.
19293         (process_file): Now static.
19294         (generate_access): Now returns int.
19295         (last_access_generated): New global.
19296         (process_file): Clear last_access_generated; make multiple passes
19297         over the class.
19298         (print_field_info): Just return if generate_access returns true.
19299         (print_method_info): Likewise.  Also, allow <init> functions to
19300         pass through.
19301         (print_c_decl): Added is_init argument.  Print constructors
19302         properly.
19303         (print_cxx_classname): Use UTF8_GET to extract characters from
19304         string.
19305         (print_base_classname): New function.
19306         (print_class_decls): New function.
19307         (process_file): Use it.
19308         (utf8_cmp): New function.
19309
19310 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19311
19312         * lang-options.h: Format changed to match changes in gcc/toplev.c
19313         to implement a --help option.
19314
19315 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19316
19317         * decl.c (init_decl_processing): Revert change to dtable_type.
19318
19319 1998-07-09  Per Bothner  <bothner@cygnus.com>
19320
19321         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19322
19323 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19324
19325         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19326
19327         * lang.c (lang_init): Default flag_exceptions to 1, without
19328         checking to see if it's 2 first.
19329
19330 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19331
19332         * constants.c: Include "system.h".
19333         * decl.c: Likewise.
19334         * lang.c (flag_new_exceptions): Get via extern now.
19335         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19336
19337 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19338
19339         * lex.c (java_lex): Return 0 when we see an invalid character in
19340         the input.
19341
19342         * lex.c (java_read_char): Specify extra argument when calling
19343         java_lex_error.
19344         (java_read_unicode, java_parse_end_comment,
19345         java_parse_escape_sequence): Likewise,
19346         (java_lex): Specify extra argument when calling
19347         java_lex_error. Test that IDs are beginning with a legal character
19348         for IDs. Handle invalid characters with an error message and a
19349         call to java_lex_error.
19350         (java_lex_error): Adjust column position by new argument
19351         `forward'. Issue an error even if in the middle of reporting an
19352         other error.
19353
19354 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19355
19356         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19357         we don't explicitly put a null pointer when we're copying it.
19358
19359 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19360
19361         * gjavah.c (print_cxx_classname): New function.
19362         (super_class_name): Likewise.
19363         (print_super_fields): Removed.
19364         (in_super): Removed.
19365         (print_field_info): Never generate #defines.
19366         (print_c_decl): Changed generated types to match JNI.  No longer
19367         print class name before method name.
19368         (print_method_info): Print "static" before static methods.
19369         Print "virtual" before non-final methods.
19370         (usage): Use exit(1), not exit(-1).
19371         (main): Likewise.
19372         (print_field_info): Use %.17g to print a double.
19373         (last_access): New globals.
19374         (process_file): Initialize last_access.
19375         (usage): Now static.
19376         (ACC_VISIBILITY): New define.
19377         (generate_access): New function.
19378         (print_field_info): Call it.
19379         (print_method_info): Likewise.  Also, generate information for all
19380         methods, not just native methods.  Return void.
19381         (print_c_decl): Return void.
19382         (print_field_info): Return void.
19383
19384 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19385
19386         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19387         processing the jc1 grammar file. Prefix bison functions and
19388         variables with java_.
19389         (parse.c): Dependencies on parse.h and lex.h
19390         * expr.c (build_java_arrayaccess): Function now global.
19391         * java-tree.h: Comment reorganized to carry on previous
19392         classification effort.
19393         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19394         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19395         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19396         java_parse (new prefix java_ generated by bison).
19397         (java_layout_parsed_class, java_register_parsed_class): Function
19398         call removed.
19399         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19400         * lex.c (static tree wfl_op): Variable deleted.
19401         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19402         ctxp fields to NULL_TREE.
19403         (java_lex): No longer create WFL for operators. Filename caching
19404         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19405         created as STRING_CST and later expanded. Removed extra argument
19406         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19407         and SUPER.
19408         (build_wfl_node): Removed code in comments.
19409         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19410         store token and location data in the current bison token.
19411         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19412         static/extern function declaration at the beginning of the file.
19413         (struct qualification): Data structure definition deleted.
19414         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19415         (qualify_ambiguous_name): Function declaration modified. Function
19416         now returns nothing.
19417         (build_array_ref, patch_array_ref, make_qualified_name,
19418         resolve_qualified_expression_name, maybe_generate_clinit,
19419         resolve_field_access): New static function declarations.
19420         (build_java_arrayaccess): New extern function declaration.
19421         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19422         (CALL_EXPR_PRIMARY): Macro deleted.
19423         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19424         (struct parser_ctxt): Field initialized_final
19425         removed. non_static_initialized, static_initialized: New fields.
19426         * parse.y (static tree kw_super, static tree kw_this): New global
19427         static.
19428         (%union): tree wfl field of operator member replaced by int
19429         location. WFLs are non longer created for operators.
19430         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19431         (qualified_name:): Now calls make_qualified_name to build the
19432         identifier.
19433         (type_declaration:): Consider generating <clinit> when class
19434         parsing completed.
19435         (variable_declarator:): Directly build an assignment node when the
19436         variable is initialized when declared.
19437         (this_or_super:): Build a WFL and set current location when THIS
19438         or SUPER are parsed.
19439         (expression_statement:): Wrap statement around a WFL.
19440         (primary_no_new_array:): Fixed typo. Changed value returned by
19441         THIS_TK because of its new type (temporary).
19442         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19443         (field_access:): Build qualified name with SUPER.
19444         (method_invocation:): Fixed returned value because of SUPER's new
19445         type.
19446         (array_access:): Use OSB_TK location information.
19447         (post_increment_expression:, post_decrement_expression:,
19448         unary_expression:, pre_increment_expression:,
19449         pre_decrement_expression:, unary_expression_not_plus_minus:,
19450         cast_expression:, multiplicative_expression:,
19451         additive_expression:, shift_expression:, relational_expression:,
19452         equality_expression:, and_expression:, exclusive_or_expression:,
19453         inclusive_or_expression:, conditional_and_expression:,
19454         conditional_or_expression:, assignment:): Use new location/token
19455         information available on operators.
19456         (create_class): Set super_decl_type to NULL_TREE when processing
19457         java.lang.Object.
19458         (register_fields): Field initialization is now a MODIFY_EXPR
19459         node. Chain initialization code to the matching lists (according
19460         to the field declaration modifiers).
19461         (maybe_generate_clinit): New function.
19462         (method_header): Don't set method's DECL_NAME to a WFL when adding
19463         methods to java.lang.Object.
19464         (resolve_and_layout): Now can return NULL_TREE if the type
19465         resolution fails. Otherwise, return the class DECL instead of its
19466         TYPE.
19467         (check_method_redefinition): Don't patch method DECL_NAME if it
19468         belongs to java.lang.Object.
19469         (process_imports): Simply assign error_found to the value returned
19470         by check_pkg_class_access.
19471         (declare_local_variables): Don't use their init statements (if
19472         any) when parsing error were previously found. Reuse MODIFY_EXPR
19473         build during parsing as an init statement.
19474         (java_method_add_stmt): Now return the current method body.
19475         (java_layout_parsed_class, java_register_parsed_class): Functions
19476         removed.
19477         (java_complete_expand_methods): Initialize the constant pool on a
19478         per class basis. Layout the classes before expanding their method
19479         bodies. Don't try expand artificial constructor code if error were
19480         found. Make the classes data and register them if no error were
19481         found.
19482         (java_complete_expand_method): Retrieve an artificial constructor
19483         argument list before entering its body. Assign the top block to
19484         the artificial constructor function body and set types of declared
19485         blocks and compound statements to void. Walk method body if not an
19486         artificial constructor.
19487         (make_qualified_name, cut_identifier_in_qualified): New functions.
19488         (resolve_expression_name): Fixed comments. Save/restore the
19489         current class CLASS_LOADED_P flag value. Build non qualified
19490         static field access and handle qualified expression names.
19491         (resolve_field_access, resolve_qualified_expression_name): New
19492         functions.
19493         (patch_method_invocation_stmt): Use the new expression resolution
19494         scheme, calling resolve_field_access when the function call is
19495         resolved as an expression.
19496         (qualify_ambiguous_name): Function rewritten to work on qualified
19497         expression produced by make_qualified_name.
19498         (java_complete_tree): Promote type when function's argument are
19499         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19500         the assignment to discover further errors if RHS is a expression
19501         name that fails to evaluate. Declare LHS initialized even though
19502         the assignment failed. Don't use the location variable and removed
19503         extra argument in patch function calls. Now handle the ARRAY_REF
19504         case and build internal string representation when STRING_CSTs are
19505         walked.
19506         (build_method_invocation): Don't wrap function call around a WFL.
19507         (build_assignment): Likewise. Use the operator location
19508         information.
19509         (patch_assignment): Handle array access LHSs. Handle error
19510         provenance, resulting in a better error report.
19511         (build_binop): Use op_location from operator as binop location
19512         information.
19513         (build_unaryop, build_incdec, build_cast): Likewise.
19514         (patch_binop): Extract location information from the node. Fixed
19515         typo in error message.
19516         (patch_unary_op): Extract location information from the node.
19517         (build_array_ref, patch_array_ref): New functions.
19518
19519 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19520
19521         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19522         match _Jv_IsInstanceOf.
19523         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19524         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19525
19526 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19527
19528         * decl.c (init_decl_processing): Functions are now named
19529         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19530
19531 1998-06-29  Per Bothner  <bothner@cygnus.com>
19532
19533         * java-tree.h (load_class):  Add prototype.
19534         * class.c (is_compiled_class):  Add missing arg to load_class.
19535         * expr.c (expand_java_NEW):  Call load_class.
19536         * parse.y (process_import):  Removed bogus use of void return value.
19537
19538 1998-06-25  Per Bothner  <bothner@cygnus.com>
19539
19540         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19541         Function name is "_Jv_Throw" instead of "soft_athrow".
19542         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19543         Function name is "_Jv_AllocObject" instead of "soft_new".
19544         Takes an extra parameter (object size).
19545         * expr.c:  Update calls.
19546
19547 1998-06-24  Per Bothner  <bothner@cygnus.com>
19548
19549         * lex.c (java_get_line_col):  Handle end-of-file.
19550         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19551
19552 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19553
19554         * lang.c (lang_init): Make -fexceptions the default.
19555         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19556         exception handling is not turned on.
19557
19558 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19559
19560         * lang.c (flag_new_exceptions): Make this this default.
19561         * decl.c (end_java_method): Call emit_handlers.
19562         * except.c (method_init_exceptions): Set language code and version.
19563         (expand_start_java_handler): Enable exception, and call
19564         expand_eh_region_start.
19565         (expand_end_java_handler): Enable exception, and set up catch blocks.
19566         (emit_handlers): New routine to generate the saved handlers.
19567         * java-except.h (emit_handlers): Add prototype.
19568
19569 1998-06-12  Per Bothner  <bothner@cygnus.com>
19570
19571         We used to have three different representations of the constant pool:
19572         the CPool structure, the tree_constant_pool, and the constructures
19573         used to build the Class object (which may need class and string
19574         constants) in compiled code.  None were appropriate for compiling
19575         to .class files, so I did a major overhaul.
19576
19577         First, the tree_constant_pool array was removed.  Things were
19578         modified to the CPool structure in the JCF could be used.
19579         Second, a "capacity" field was added to the CPool, and functions
19580         written to search for a matching constant, adding one if not found.
19581         The code that generated the Class object was changed to use a CPool.
19582         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19583         the static Class object are now only in build_constants_constructor.
19584         Finally, I wrote code which can generate a .class file (including its
19585         constant pool) from the RECORD_TYPE of a class.  This is a big step
19586         on the way to compiling Java source into .class files.
19587
19588         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19589         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19590
19591         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19592         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19593         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19594         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19595         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19596         (lang_type):  Removed constant_pool field.
19597         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19598         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19599         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19600         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19601
19602         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19603         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19604         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19605         (set_constant_entry, find_constant1, find_constant2,
19606         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19607         find_utf8_constant, find_class_or_string_constant):  New functions.
19608
19609         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19610         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19611         (give_name_to_class, get_class_constant):  Likewise.
19612         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19613         (get_name_and_type_constant, get_ref_constant):  Removed.
19614         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19615         * parse.y:  Don't save/restore tree_constant_pool.
19616         * verify.c (verify_jvm_instructions):  Update for new approach.
19617         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19618
19619         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19620         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19621         (lang_f_options):  Added "emit-class-file(s)".
19622
19623         * expr.c (build_java_arrayaccess):  Generate more efficient array
19624         bounds checking, by using unsigned compare.
19625
19626         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19627
19628 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19629
19630         * parse.h: New comment on the handling of unresolved type
19631         identifiers. JDEPs are now part of the jdep_code enum.
19632         (typedef struct jdep): Now use enum jdep_code or int, depending on
19633         availability. Both are narrowed down to an 8 bits bitfield.
19634         (CALL_EXPR_PRIMARY): Fixed comment.
19635
19636 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19637
19638         * Make-lang.in (java): Added gjavac and jvgenmain.
19639         (java.start.encap): Depend on gjavac.
19640         (java.rest.encap): Depend on jvgenmain.
19641
19642         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19643         (JAVA_CROSS_NAME): Likewise.
19644         (java.all.build): Depend on jvgenmain and gjavac.
19645         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19646         (jvgenmain$(exeext)): New target.
19647         (java.install-common): Wrote.
19648         * config-lang.in (compilers, stagestuff): Added gjavac and
19649         jvgenmain.
19650
19651 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19652
19653         * lang.c (lang_decode_option): New argc/argv interface.
19654
19655 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19656
19657         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19658         * decl.c (build_decl_no_layout): New function.
19659         * expr.c (java_lang_expand_expr): Layout declarations found in
19660         blocks before they're pushed.
19661         * jcf-parse.c (load_class): Save current line when parsing class
19662         file.
19663         (parse_source_file): Register class before expanding their
19664         methods.
19665         * lang.c (put_decl_node): Produce `null' when `void *' is
19666         processed.
19667         * lex.c (static tree wfl_op): New static global, for error report
19668         on casts.
19669         (java_init_lex): wfl_operator and wfl_op initialized
19670         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19671         parsed.
19672         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19673         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19674         build_unresolved_array_type): New static function definitions.
19675         (build_decl_no_layout): New extern function declared.
19676         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19677         faulty modifier exists.
19678         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19679         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19680         (UNARY_PLUS_EXPR): New fake operator.
19681         (struct parser_ctxt): New field osb_number.
19682         * parse.y (static tree wfl_operator): New static WFL for operator
19683         bound error messages.
19684         (DECR_TK, INCR_TK): Moved.
19685         (OP_TK): Tagged <operator>.
19686         (array_type:): Now call build_unresolved_array_type.
19687         (dim_expr:): Count the number of '[' seen.
19688         (post_increment_expression, post_decrement_expression,
19689         pre_increment_expression, pre_decrement_expression,
19690         unary_expression_not_plus_minus, unary_expression:): Actions are
19691         now building the corresponding unary expressions.
19692         (cast_expression:): Actions are now building cast expressions.
19693         (build_unresolved_array_type): New function.
19694         (create_interface): Reset the number of declared interfaces.
19695         (create_class): Likewise.
19696         (method_header): Methods declared within the scope of an interface
19697         are now implicitly set public and abstract.
19698         (java_complete_class): Variable's and parameter's type are patched
19699         with a promoted type.
19700         (declare_local_variables): Resolved non builtin types are promoted
19701         before being used to build a variable decl. Removed type patch
19702         posted on variable initialization statement.
19703         (source_start_java_method): Use build_decl_no_layout to build the
19704         decl of a parameter of incomplete type.
19705         (java_register_parsed_class): Process interfaces too. Call
19706         rest_of_decl_compilation on each processed class declarations.
19707         (java_complete_expand_methods): Don't attempt to expand things in
19708         interfaces.
19709         (java_complete_tree): Process CONVERT_EXPR, even though it always
19710         has a type. Propagate error_mark_node to node's type too. Promote
19711         method's call argument type and return error_mark_node if
19712         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19713         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19714         handle unary operator nodes.
19715         (build_assignment): Added comment.
19716         (print_int_node): New function.
19717         (patch_assignment): New second argument. New error handling. Use
19718         print_int_node. Handle references. Use can_cast_to_p to issue
19719         different error message according to the context and check upon
19720         the initialization of the RHS.
19721         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19722         (operator_string): Handle more operators.
19723         (patch_binop): No longer use a function static
19724         wfl_operator. Improved error message on shift distance.
19725         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19726         patch_cast): New functions.
19727
19728 1998-06-05  Per Bothner  <bothner@cygnus.com>
19729
19730         * jvspec.c:  New file.
19731         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19732
19733         * java-tree.h (identifier_subst):  Add declaration.
19734
19735 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19736
19737         * jvgenmain.c (main): Generate call to JvRunMain.
19738
19739         * class.c (make_class_data): Push value for "sync_info" field.
19740         * decl.c (init_decl_processing): Push "sync_info" field.
19741
19742 1998-06-03  Per Bothner  <bothner@cygnus.com>
19743
19744         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19745         Java (source) name, not signature.
19746         Set TYPE_ALIGN to (at least) that of element_type.
19747
19748 1998-06-02  Per Bothner  <bothner@cygnus.com>
19749
19750         * class.c:  Moved classname-mangling-rekated code to ...
19751         * mangle.c:  ... this new file.
19752         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19753         * Makefile.in:  Update for above changes.
19754
19755 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19756
19757         * expr.c (truthvalue_conversion): Convert integer and floating
19758         point value to their truth value.
19759         * lex.c (java_lex): Handle the `null' literal.
19760         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19761         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19762         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19763         New macros.
19764
19765         * parse.y: Reorganization/documentation on token declaration.
19766         (binop_lookup[]): New added new tree codes.
19767         (relational_expression): Build corresponding binary operators.
19768         (equality_expression, conditional_and_expression,
19769         conditional_or_expression): Likewise.
19770         (java_complete_class): Fix crash in debug message.
19771         (java_complete_tree): Check initialization of method call
19772         arguments. Further bogus node evaluation to detect more error
19773         during assignments. Handles more binary operators.
19774         (patch_assignment): Use DECL_P.
19775         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19776         code.
19777         (operator_string): Handle more case. Compacted source.
19778         (patch_binop): Changed function comment. Checking for
19779         uninitialized first operand takes the compound assignment into
19780         account and uses DECL_P. Checking for uninitialized second operand
19781         delayed to routine's end. Use macros to issue type bound error
19782         messages and issue messages on both operands if their types are
19783         different. Force fixed type into node. Handle all binary
19784         operators.
19785
19786 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19787
19788         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19789         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19790         build operator node and return tokens.
19791         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19792         * parse.h (java_complete_tree): Changed returned type in prototype.
19793         (build_method_invocation, build_assignment, patch_assignment,
19794         patch_binop): New static function declarations.
19795         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19796         BUILD_EXPR_WFL): New macros.
19797         * parse.y (enum tree_code binop_lookup[]): New static for token to
19798         TREE_CODE lookup.
19799         (%union): Parser union has new sub-structure `operator'.
19800         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19801         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19802         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19803         ASSIGN_ANY_TK): Tokens tagged `operator'.
19804         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19805         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19806         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19807         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19808         (assignment_operator:): Rule tagged `operator'.
19809         (expression_statement:): Re-installed default rule.
19810         (method_invocation:): Sub rules call build_method_invocation.
19811         (postfix_expression:): Don't attempt to resolve name here. Just
19812         return an ID.
19813         (multiplicative_expression:): Sub-rules build corresponding binop
19814         expression node.
19815         (additive_expression:, shift_expression:, and_expression:,
19816         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19817         (assignment:): Sub rule invoke build_assignment.
19818         (assignment_operator:): Default rules on sub rules.
19819         (force_error): Added documentation on this variable.
19820         (declare_local_variables): Build initialization calling
19821         build_assignment.
19822         (expand_start_java_method): Removed unused rtx declaration. Mark
19823         arguments as already initialized.
19824         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19825         (java_complete_expand_methods): Don't process next method if
19826         completion of the previous one triggered errors.
19827         (java_complete_expand_method): Call source_end_java_method if no
19828         error were found during completion.
19829         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19830         locals declaratilon. Handle names found within a class. Return
19831         error_mark_node when things aren't found.
19832         (patch_method_invocation_stmt): Return error_mark_node on failures.
19833         (patch_invoke): Removed unused local. Return the correct node.
19834         (java_complete_tree): Now returns a value. The BLOCK section binds
19835         local identifiers and the type of a BLOCK is now void. Assign the
19836         result of operand completion on COMPOUND_EXPR. Assign the
19837         encapsulated node of a WFL to the result of its completion, except
19838         when the node is an identifier. Now handle MODIFY_EXPR and several
19839         binary operators. Return error_mark_node on errors.
19840         (build_method_invocation, build_assignment, patch_assignment,
19841         build_binop, operator_string, patch_binop): New functions.
19842         * typeck.c (binary_numeric_promotion): New function.
19843
19844 1998-05-21  Per Bothner  <bothner@cygnus.com>
19845
19846         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19847         Replace most uses of ident_subst by identifier_subst.
19848
19849         * class.c (push_class_static_dummy_field):  Removed function.
19850         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19851         instead of looking got "class" static field.  Create that decl here.
19852         (class_identifier_node):  Removed;  no longer needed.
19853         (init_class_processing):  Don't init class_identifier_node.
19854         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19855         Do nreverse 0 times (instead of twice) for Object and Class.
19856         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19857
19858 1998-05-20  Per Bothner  <bothner@cygnus.com>
19859
19860         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19861         while initializing linenumber_count and linenumber_table.
19862         Do it before init_function_start (which calls emit_line_note).
19863         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19864
19865 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19866
19867         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19868         then mangle number as _N_.
19869
19870         * class.c (mangle_class_field): New function.
19871         (build_class_ref): Set assembler name of class reference using
19872         mangle_class_field.
19873         (push_class_static_dummy_field): Likewise.
19874
19875 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19876
19877         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19878         of assigning to TREE_CODE.  The latter method exploits a feature
19879         of GCC that is not ANSI compliant.
19880
19881 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19882
19883         * decl.c (pushdecl_force_head): New function.
19884         (pushlevel): Removed conditional printf.
19885         (complete_start_java_method): Don't enter local variable scope if
19886         function is compiled from source code.
19887         * expr.c: parse.h now included
19888         (java_lang_expand_expr): New function.
19889         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19890         printf. Terminate buffer when doing directories.
19891         * jcf-parse.c (parse_source_file): Call lang_init_source before
19892         parsing and before code generation.
19893         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19894         use printf if the macro is defined.
19895         * lang.c (lang_init): Install lang_expand_expr hook on
19896         java_lang_expand_expr.
19897         (java_dummy_print): New function.
19898         (lang_init_source): New function.
19899         * lex.c (java_lex): Remember location of an opening brace at the
19900         second nesting level.
19901         (java_is_eol): Unget character seen after a CR if it is EOF.
19902         * parse.h: Now includes lex.h
19903         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19904         printf if the macro is defined.
19905         (expand_start_java_method, build_expr_block, enter_block,
19906         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19907         New static function declarations.
19908         (pushdecl_force_head): New extern function declaration.
19909         (INCOMPLETE_TYPE_P): New macro.
19910         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19911         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19912         BLOCK_EXPR_ORIGIN): New macros.
19913         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19914         DECL_SOURCE_LINE_LAST): New macros.
19915         (struct parser_ctxt): Removed field current_method_decl, redundant
19916         with the field current_function_decl. Added fields
19917         first_ccb_indent1 and pending_block.
19918         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19919         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19920         tagged <node>
19921         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19922         (compilation_unit:): Cosmetic on sub rule.
19923         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19924         (variable_initializer:): Installed default rule on expression:.
19925         (method_declaration:): method_header: starts a new
19926         method. method_body: installs the function body, absorbs blocks
19927         emitted for temporary variable scopings, pops function's body block
19928         and merges function's last statement lineno in DECL_SOURCE_LINE.
19929         (method_body:): Installed default rules.
19930         (block:): Call enter_block when an opening brace is seen.  Absorb
19931         scoping blocks and call exit_block when a closing brace is seen.
19932         (block_statement:): Cosmetic changes.
19933         (method_invocation:): Create WFL around CALL_EXPR node.
19934         (patch_stage): Added comment around definition.
19935         (method_header): Try to use first_ccb_indent1 as the first line of
19936         the method, so BP debug info are emitted at the first opening
19937         brace of the function. If the function has no body, use the
19938         location of the function's name. Override currently defined method
19939         name with the matching WFL so we can point redefinition errors
19940         using the location where the function's name was declared.
19941         (check_abstract_method_header): Interprets DECL_NAME as an
19942         identifier or as a WFL, accordingly.
19943         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19944         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19945         location and name information out of it and reinstall DECL_NAME to
19946         its original identifier node value.
19947         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19948         function's source code).
19949         (read_import_dir): Test the value returned by find_class and issue
19950         a fatal accordingly.
19951         (declare_local_variables): Push a new block for the scope of the
19952         new variable(s) if code has been already generated at that nesting
19953         level. Pinpoint redefinition errors using the variable id
19954         WFLs. Generate initialization code if necessary. If the variable
19955         type is incomplete, register a patch on its decl.
19956         (source_start_java_method): Rewritten. Define a new block for the
19957         function's parameters. Build parameter decl out of function's
19958         arguments and register them for a patch if their types are
19959         incomplete.
19960         (expand_start_java_method): Includes the part of
19961         source_start_java_method that was pushing the parameter decls and
19962         completing the method start code.
19963         (source_end_java_method): Removed call the expand_end_bindings and
19964         poplevel (already taken care of). Reinstall function's arguments
19965         and get function's last line of code before calling
19966         expand_function_end.
19967         (java_method_add_stmt): New comment before the function's
19968         code. Complement the second operand of the current COMPOUND_EXPR
19969         if necessary.
19970         (java_complete_expand_methods): Don't generate debug info on line
19971         zero when expanding a generated constructor.
19972         (java_complete_expand_method): Set start and end line numbers for
19973         a artificially generated constructor to one and manually call
19974         enter_block and exit_block when defining it. For all methods:
19975         expand function's start calling the new expand_start_java_method
19976         and invoke java_complete_tree on the effective method's body, if
19977         any.
19978         (resolve_expression_name): Now use lookup_name_in_blocks to search
19979         local variable decls and print out an error when variables are
19980         undefined.
19981         (patch_method_invocation_stmt): Inserted comment before the
19982         function's code.
19983         (lookup_method_invoke): Chain method's arguments using chainon
19984         with the current arg list as a second argument. Inserted missing
19985         IDENTIFIER_POINTER when reporting an error on methods not found.
19986         (refine_accessible_methods_list): Don't retain constructors.
19987         (patch_arguments): Function removed.
19988         (java_complete_tree): Inserted comment before the function's
19989         code. New case for BLOCKs. Moved the WFL case a bit
19990         further. Complete function's arguments.
19991         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19992         maybe_absorb_scoping_blocks): New functions.
19993
19994 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19995
19996         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19997         previously set.
19998         * jcf-parse.c (parse_source_file, java_error_count): New forward
19999         and extern declarations.
20000         (java_parse_abort_on_error): Macro moved.
20001         (jcf_parse_source): fatal called if fopen fails. Now calls
20002         parse_source_file.
20003         (parse_source_file): New parse_only parameter. Reflects the
20004         elimination of the second pass.
20005         (yyparse): parse_source_file called with argument set to 0.
20006         * jcf.h (JCF_ZERO): Sets java_source to zero.
20007         * lex.c (java_init_lex): pass argument is gone. Function modified
20008         to be called once during the analysis of a file.
20009         (java_unget_unicode): Fixed typo in fatal message.
20010         (java_get_line_col): Likewise.
20011         (java_lval): Likewise. String literals no longer built during
20012         second pass.
20013         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20014         account.
20015         * parse.h (MODIFIER_WFL): New macro.
20016         (parse_check_super, parser_check_super_interface): Now return int.
20017         (parser_chain_incomplete_item, not_builtin_p,
20018         complete_method_decl): Declarations removed.
20019         (build_method_invocation_stmt, build_invoke): Renamed using the
20020         `patch' instead of `build'
20021         (register-incomplete_type, obtain_incomplete_type,
20022         java_complete_tree, java_complete_expand_method,
20023         unresolved_type_p, create_jdep_list): New function declarations.
20024         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20025         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20026         (jdep): New typedef on new struct _jdep.
20027         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20028         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20029         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20030         JDEP_RESOLVED_P): New macros.
20031         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20032         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20033         JDEP_VARIABLE): New enum values and jdep kinds.
20034         (jdeplist): New typedef on struct _jdeplist.
20035         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20036         macros.
20037         (CALL_EXPR_PRIMARY): New macro.
20038         (struct parser_ctxt): Fields java_pass, current_method_decl,
20039         method_decl_list deleted. New field jdeplist.
20040         (INCOMPLETE_P): Macro deleted.
20041         * parse.y (single_type_import_declaration:): Removed pass switch.
20042         (type_import_on_demand_declaration): Likewise.
20043         (field_declaration:): Removed pass switch on all sub rules.
20044         (class_declaration:): Call the complete_class_decl removed on
20045         class_body rules.
20046         (method_declaration:): Removed second pass switch. No longer chain
20047         methods decl when method_header reduced.
20048         (method_header:): Sub rules no longer depend on pass switch.
20049         (method_declarator:): Likewise.
20050         (method_body:): Likewise.
20051         (abstract_method_declaration:): Likewise.
20052         (block_statement:): Likewise.
20053         (local_variable_declaration:): Likewise.
20054         (argument_list:): Likewise.
20055         (method_invocation:): Likewise. Call to build_method_invocation_stmt
20056         removed. Partial CLASS_EXPR tree node built instead.
20057         (postfix_expression:): Removed pass switch on all sub rules.
20058         (java_pop_parser_context): Free classd_list content.
20059         (yyerror): Call obstrack_grow0 to finalize error message.
20060         (check_class_interface_creation): Comment modified to reflect new
20061         returned value meaning. Removed second pass switch. Return 1 if an
20062         error was found, 0 otherwise. Adjust pointer on filename if a
20063         leading path separator was found.
20064         (maybe_create_class_interface_decl): Removed first pass switch
20065         when linking the class decl to the class_list. Install a new
20066         jdep_list for the class.
20067         (add_superinterfaces): List of unresolved interfaces is
20068         gone. Unresolved interfaces are directly added to the current
20069         dependencies list.
20070         (create_interface): Second pass shortcut removed.
20071         ctpx->modifier_ctx access through MODIFIER_WFL.
20072         (create_class): Second pass shortcut removed. Call to
20073         register_incomplete_type replaces the call to
20074         parser_chain_incomplete_item.
20075         (complete_class_decl): Function removed.
20076         (duplicate_declaration_error): New way of retrieving redeclared
20077         item type.
20078         (register_fields): Call to lookup_modifier_cl replaced by
20079         MODIFIER_WFL. New way of handling unresolved type, using
20080         unresolved_type_p and obtain_incomplete_type.
20081         register_incomplete_type replaces call to parser_chain_incomplete_item.
20082         (patch_stage): New static global variable.
20083         (method_header): New way of handling unresolved type, using
20084         unresolved_type_p and obtain_incomplete_type. patch_stage used to
20085         indicates that the method decl needs to be patched.
20086         (check_abstract_method_header): Call to lookup_modifier_cl
20087         replaced by MODIFIER_WFL.
20088         (method_declarator): Incomplete argument type are registered
20089         calling register_incomplete_type. Patch on the declared method is
20090         issued in that case.
20091         (unresolved_type_p): New function.
20092         (parser_check_super_interface): New comment to reflect function's
20093         modified returned type (int). Function and has a new argument
20094         this_wfl. Call to parse_error_context uses this_wfl instead of
20095         relying on lookup_cl.
20096         (parser_check_super): Comment reflects function's new returned
20097         type (int). Function returns nonzero value on error.
20098         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20099         register_incomplete_type, jdep_resolve_class): New functions to
20100         handle incomplete types in declarations.
20101         (java_complete_class): Rewritten to work with the new incomplete
20102         type handling scheme.
20103         (complete_class_report_errors): Likewise.
20104         (complete_method_decl): Removed: it jobs is now handled by
20105         java_complete_class.
20106         (do_resolve_class): Class loaded in not already loaded and not
20107         found in Java source code.
20108         (java_check_regular_methods, java_check_abstract_methods): Don't
20109         call complete_method_decl anymore.
20110         (lookup_modifier_cl, not_builtin_p): Functions deleted.
20111         (read_import_dir): Got rid of the pass number dependency.
20112         (declare_local_variables): New handling of unresolved types (patch
20113         issued).
20114         (source_start_java_method): New parameter level. Function called
20115         with level set to 1 when argument types are potentially
20116         unresolved.  Called to complete the job with level set to 2 once
20117         types are complete.
20118         (source_end_java_method): Call to permanent_allocation
20119         removed. Waiting to be replaced by a more suitable obstack
20120         management.
20121         (java_complete_expand_methods, java_complete_expand_method,
20122         java_expand_finals): New functions.
20123         (build_method_invocation_stmt): Renamed
20124         patch_method_invocation_stmt. Extracts function call expression
20125         (wfl) and arguments (args) from CALL_EXPR tree operands.
20126         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20127         call. Patch the function and argument operand of the CALL_EXPR
20128         tree argument.
20129         (patch_argument, java_complete_tree): New functions.
20130
20131 1998-04-20  Per Bothner  <bothner@cygnus.com>
20132
20133         Recover from missing fields and methods (i.e. error instead of fatal).
20134         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
20135         * expr.c (expand_invoke):  Recover from missing method.
20136         (expand_java_field_op):  Recover from missing field.
20137         Inline references to java.lang.{Integer,Char,...}.TYPE.
20138         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20139         * class.c (add_method):  Use get_type_from_signature.
20140         (build_class_ref):  Handle a class that was not found.
20141         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20142         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20143         instead of lookup_field to handle missing fields.
20144
20145         * jcf-parse.c (process_zip_dir):  Set java_source.
20146
20147 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20148
20149         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20150
20151 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20152
20153         * jcf-parse.c (load_class): Don't change input_filename before
20154         calling jcf_parse_source (but still do it before calling
20155         jcf_parse).
20156         (jcf_parse_source): Assign input_filename after having saved the
20157         parser context.
20158         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20159         list. ctxp->modifier_ctx zeroed according to its new
20160         definition. ctxp->filename initialized. Removed
20161         JAVA_MODIFIER_CTX_UNMARK.
20162         (java_unget_unicode): Update the character based column position.
20163         (java_allocate_new_line): ref_count not used anymore. Always free
20164         ctxp->p_line. Initialize c_line->char_col to 0.
20165         (java_get_unicode): Update the character based column position.
20166         (java_lex): Use ctxp->elc to store current position in source
20167         file, at the beginning of the parsed token. Set modifier_ctx entry
20168         corresponding to the parse modifier to a WFL node. Return a WFL
20169         node when an identifier is parsed.
20170         (java_lex_error): Now uses ctxp->elc to store current position in
20171         source.
20172         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20173         * lex.h (build_wfl_node): New function definitions.
20174         (struct java_line): ref_count and next fields are gone. New field
20175         char_col.
20176         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20177         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20178         (JAVA_COLUMN_DELTA): New macro.
20179         (java_lc): New typedef on new struct _java_lc.
20180         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20181         (parse_error_context, parse_warning_context): Changed prototypes.
20182         (java_get_line_col): Added as an available global function.
20183         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20184         (IC_DECL): Replaced by macro IC_TYPE
20185         (DEPEND_WFL): New macro.
20186         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20187         wrong modifier.
20188         (exit_java_complete_class): Removed a commented out statement.
20189         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20190         now an array of tree nodes. Deleted fields line_list and
20191         e_line. New field elc, to replace e_line.
20192         * parse.y (array_type:): Build WFL node.
20193         (qualified_name:): Build a single WFL node out of two. Retain
20194         the location information of the first node in the resulting node.
20195         (package_declaration:): Use package name as a WFL node
20196         (single_type_import_declaration:): Use imported name as a WFL node.
20197         (type_import_on_demand_declaration:): Use root of the imported
20198         packages as a WFL node.
20199         (field_declaration:): Removed unused local variable cl.
20200         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20201         (yyerror): New static elc. Removed static error_line, error_pos.
20202         New local code_from_source. Save ctxp->elc into elc at the first
20203         pass. Call java_get_line_col to get a string of the line where
20204         the error occurred.
20205         (debug_line): Removed static function.
20206         (parse_error_context, parse_warning_context): Parameter cl is now
20207         a WFL node. Use its value to initialize ctxp->elc.
20208         (redefinition_error): Parameter cl is now a WFL node.
20209         (parse_add_interface): New parameter wfl. No longer call
20210         lookup_cl, use wfl instead.
20211         (check_class_interface_creation): Parameter cl is now a WFL node.
20212         (maybe_create_class_interface_decl): Likewise.
20213         (add_superinterfaces): New function.
20214         (create_interface): Removed local cl, node, super_decl,
20215         super_decl_type.  Function now uses id as a WFL node. Better
20216         warning/error report on obsolete or forbidden mix of
20217         modifiers. Now calls add_superinterfaces to register interfaces.
20218         (create_class): Removed local cl, node. Local variable id is used
20219         as a WFL node. Better error report on forbidden modifier
20220         mix. Uses add_superinterfaces to register interfaces.
20221         (find_field): Argument cl is now a WFL node. Now store the WFL
20222         node of a fields that needs to be checked for their
20223         initialization.
20224         (method_header): Local variable node non longer used. Local
20225         variable id replaces cl.
20226         (check_modifiers_consistency): Local variable cl is now a WFL
20227         node.
20228         (method_declarator): Local variable cl replaced by parameter id.
20229         (parser_qualified_name): Now uses parameter name as a WFL node.
20230         (parser_check_super_interface): New parameter wfl, for achieve
20231         greater accuracy during error reports.
20232         (parser_chain_incomplete_item): New parameter named location. Used,
20233         along the decl, to construct the incomplete item node.
20234         (java_complete_class): resolve_class now uses WFL node extracted
20235         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20236         where appropriate.
20237         (complete_method_decl): Unresolved function's argument types are WFL.
20238         (resolve_class): Parameter cl is now a WFL node.
20239         (resolve_and_layout): Likewise.
20240         (do_resolve_class): Likewise. Try first to use cl and then do the
20241         lookup on the decl when calling check_pkg_class_access.
20242         (complete_class_report_errors): Use IC_TYPE in place of
20243         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20244         instead of doing a lookup over the decl.
20245         (java_check_final): Use WFL info from field tree list.
20246         (lookup_cl): Rewritten and returns a statically defined WFL node.
20247         (lookup_modifier_cl): Now uses information from WFL nodes.
20248         (process_imports): Likewise.
20249         (read_import_dir): name and cl arguments replaced by a single WFL
20250         node. Function modified accordingly.
20251         (find_in_imports_on_demand): Now uses WFL node.
20252         (check_pkg_class_access): cl argument is now a WFL node.
20253         (declare_local_variables): Fixed to use WFL nodes.
20254         (resolve_expression_name): Likewise.
20255         (build_method_invocation_stmt): name_combo argument renamed
20256         wfl. Function modified to use WFL nodes.
20257         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20258         (lookup_method_invoke): cl is now a WFL node. Added missing
20259         IDENTIFIER_POINTER to class type decl name.
20260
20261 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20262
20263         * lang.c (init_parse): Now returns char* containing the filename.
20264
20265 1998-04-10  Per Bothner  <bothner@cygnus.com>
20266
20267         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20268
20269         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20270         * class.c (make_class_data):  If flag_assume_compiled, initial class
20271         state is CSTATE_PREPARED; make superclass and interfaces direct
20272         references, rather than constant pool indexes.
20273
20274 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20275
20276         * parser.y: Include flags.h. Removed debug variable pl.
20277         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20278         (block:): Likewise.
20279         (labeled_statement_nsi:): Generate debug info when reducing
20280         expression_statement:.
20281         (check_pkg_class_access): get_access_flags_from_decl invocation
20282         fixed for new CLASS_* flags location.
20283         (source_end_java_method): Save/restore parser context when
20284         entering/leaving this routine. Restore lineno to its right value
20285         before calling expand_end_bindings.
20286         (build_method_invocation_stmt): build_invoke called with the
20287         current line information.
20288         (build_invoke): New argument cl. Wrap the function call around a
20289         wfl node.
20290         (refine_accessible_methods_list): Changed comment, removed
20291         unnecessary code.
20292         * parse.h: Fixed typo in comments.
20293         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20294         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20295         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20296         parser_ccb_indent.
20297         * lex.c (java_lex): Record the last closing curly bracket of a
20298         function.
20299         * jcf-parse.c (jcf_parse_source): Now calls
20300         java_check_methods. Clarified comment, fixed typo.
20301
20302 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20303
20304         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20305         (finish_parse): Expose for non USE_CPPLIB builds.
20306
20307 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20308
20309         * lang.c (lang_print_xnode): New function.
20310
20311 1998-04-03  Per Bothner  <bothner@cygnus.com>
20312
20313         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20314         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20315         used to build a class's dispatch table.
20316         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20317         Set dtable of class object to address of class_dtable_decl.
20318
20319         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20320         be volatile and have side effects - generates better code.
20321
20322         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20323         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20324
20325         * expr.c (expand_invoke):  If class is final, method is
20326         effectively final, so can call it directly.
20327
20328         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20329
20330         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20331
20332 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20333
20334         * parse.y (build_method_invocation_stmt): Removed extra argument
20335         to build_invoke.
20336
20337 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20338
20339         * expr.c (dtable_indent): Now static global.
20340         (expand_invoke): Now call invoke_build_dtable and
20341         build_invokevirtual.
20342         (invoke_build_dtable, build_invokevirtual): New functions.
20343         * jcf-io.c (find_class): Defer issuing a warning by setting
20344         jcf->outofsynch to 1.
20345         * jcf-parse.c (jcf_out_of_synch): New function.
20346         (load_class): Test this_jcf.outofsynch flag and call
20347         jcf_out_of_synch accordingly.
20348         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20349         comment indentation.
20350         * lex.c (java_get_unicode): Fixed code indentation.
20351         (java_lex): Create string literal. Fixed typo. Removed several
20352         premature obstack_free.
20353         * parse.h: New enums for name resolution and invocation mode.
20354         (struct qualification): New data structure.
20355         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20356         (do_resolve_class, build_method_invocation_stmt,
20357         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20358         debug_line, identical_subpath_p, invocation_mode,
20359         refine_accessible_methods_list, build_invoke,
20360         lookup_method_invoke): New functions declared.
20361         (build_invokevirtual, invoke_build_dtable, match_java_method,
20362         build_field_ref, jcf_out_of_synch): New references to external
20363         functions.
20364         (struct parse_ctxt): Removed artificial_constructor field.
20365         * parse.y: (array_type:): Type defined for this rule.
20366         (class_type:): Installed default rule for interface_type:.
20367         (array_type:): Now build Java array type.
20368         (qualified_name:): Now use obstack_grow0.
20369         (method_declaration:): Skip the artificial constructor added to
20370         the list, if any.
20371         (abstract_method_declaration:): Execute the code only during pass 1.
20372         (block:): Installed default rule in block_statements:.
20373         (block_statement:): Add the statement to the method during pass 2.
20374         (statement_expression): Installed default rule for
20375         method_invocation:.
20376         (argument_list:): Added code to build the argument list.
20377         (method_invocation:): Added call to create the method invocation
20378         node.
20379         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20380         (debug_line): New function for debug.
20381         (complete_class_decl): No longer do something during pass 1.
20382         (method_header): Use BUILD_PTR_FROM_NAME.
20383         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20384         obstack_free.
20385         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20386         function's main comment.
20387         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20388         classes.
20389         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20390         (resolve_class): Now works with arrays.
20391         (do_resolve_class, resolve_and_layout): New functions.
20392         (java_check_regular_methods): Reverse method list before and after
20393         having processed it. No longer set ctxp->artificial_constructor.
20394         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20395         accordingly. Fixed typo in issued error message. Now use
20396         obstack_grow0.
20397         (find_in_imports_on_demand): Now use obstack_grow0.
20398         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20399         (source_end_java_method): Call expand_expr_stmt instead of
20400         expand_expr. Calls it before calling expand_function_end.
20401         (java_method_add_stmt): Do nothing if errors were found during
20402         parsing.
20403         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20404         (build_method_invocation_stmt, build_invoke, invocation_mode,
20405         lookup_method_invoke, refine_accessible_methods_list,
20406         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20407         New functions.
20408         * typeck.c (build_java_signature): Properly end method signature
20409         if return type skipped.
20410         (match_java_method): New function.
20411
20412 1998-03-16  Per Bothner  <bothner@cygnus.com>
20413
20414         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20415
20416 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20417
20418         * expr.c (build_invoke_non_interface): New function.
20419         (methods_ident, ncode_ident): Now static globals.
20420         (expand_invoke): Use build_invoke_non_interface.
20421         * java-tree.h (struct lang_decl): New field function_decl_body.
20422         (DECL_FUNCTION_BODY): New macro.
20423         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20424         CLASS_FROM_SOURCE_P.
20425         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20426         before starting pass 2. Call to java_generate_parsed_class replaced
20427         by java_register_parsed_class.
20428         * lex.c: Fixed typo in header. Some line width related formating.
20429         * lex.h: Some line width related formating.
20430         * parse.h (source_end_java_method, resolve_expression_name,
20431         complete_class_decl, maybe_create_class_interface_decl,
20432         check_class_interface_creation): New static function declarations.
20433         (java_layout_parsed_class, java_method_add_stmt): New function
20434         declarations.
20435         (struct parser_ctxt): Field mark_class_generate removed. New
20436         fields class_list and artificial_constructor.
20437         * parse.y: Fixed typo in header.
20438         (class_declaration:): Call complete_class_decl when class body
20439         parsed.
20440         (method_declaration:): Call source_end_java_method in pass 2 when
20441         the method body is defined.
20442         (postfix_expression:): Do expression name resolution on sub-rule
20443         name during pass 2.
20444         (create_class, create_interface): Merged common pieces.
20445         (check_class_interface_creation, maybe_create_class_interface_decl):
20446         New functions.
20447         (complete_class_decl): New function.
20448         (register_fields): Fixed line width related typo.
20449         (method_header): Correctly skip first argument when fixing
20450         argument line. Changed the loop.
20451         (java_check_circular_reference): Now use ctxp->class_list.
20452         (java_complete_class): Removed start/stop marking.
20453         (java_check_regular_methods): Now takes a class decl as an
20454         argument.  Add default constructor if none were encountered.
20455         (java_check_methods): Now use ctxp->class_list. Changed call to
20456         java_check_regular_methods.
20457         (source_start_java_method): Set DECL_ARG_TYPE for each function
20458         arguments.
20459         (source_end_java_method, java_method_add_stmt): New functions.
20460         (java_generate_parsed_class): No longer exists.
20461         (java_layout_parsed_class, java_register_parsed_class): New functions.
20462         (resolve_expression_name): New function.
20463
20464 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20465
20466         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20467         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20468         until pass initializations are done. Call read_import_dir with
20469         pass set to 0.
20470         * parse.h: (lookup_modifier_cl): New function declared.
20471         (INTERFACE_FIELD_MODIFIERS): New macro.
20472         (OBSOLETE_MODIFIER_WARNING): New macro.
20473         * parse.y: (register_fields): Class type and current field name in
20474         local variables. Check modifier(s) if adding field(s) to an interface.
20475         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20476         and report errors using the faulty modifier line context.
20477         (lookup_modifier_cl): New function.
20478         (read_import_dir): Detect and report default import processing
20479         failure.
20480
20481 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20482
20483         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20484         * class.c (is_compiled_class): Return 1 after making sure it
20485         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20486         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20487         * java-tree.h (flag_assume_compiled): Add decl.
20488         * lang.c (lang_f_options): Add the flag.
20489         (flag_assume_compiled): Add decl, default to 0.
20490
20491 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20492
20493         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20494         (is_compiled_class): Likewise.
20495         (layout_class): Likewise.
20496         (layout_class): Detect and lay out classes defined in source code.
20497         (interface_of_p, add_interface_do, may_add_interface): New
20498         function.
20499         (add_interface): Now use add_interface_do.
20500         (add_method_1): New function.
20501         (add_method): Now use add_method_1.
20502         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20503         (complete_start_java_method): New function.
20504         (start_java_mehod): Now call complete_start_java_method.
20505         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20506         (expand_invoke): Likewise and fixed typo.
20507         *gjava.c: (print_super_field): Use new argument to find_class
20508         DO_CLASS_FILE.
20509         (main): Likewise.
20510         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20511         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20512         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20513         IDENTIFIER_NODE.
20514         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20515         (add_method_1, push_class): New prototypes.
20516         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20517         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20518         directory where the class was found.
20519         (find_class): New argument DO_CLASS_FILE. Function find_class
20520         modified accordingly.
20521         *jcf-parse.c: (fix_class_path): New function.
20522         (load_class): Use new VERBOSE argument. load_class now finds and
20523         loads/parses .class/.java files. Save read_state of current_jcf
20524         if necessary.
20525         (java_parser_abort_on_error): New macro.
20526         (jcf_parse_source, parse_source_file): New function.
20527         (jcf_parse): Fixed typo.
20528         (yyparse): Call parse_source_file () only.
20529         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20530         writing the real class name back in the zip directory entry.
20531         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20532         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20533         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20534         (find_class): Prototype fixed.
20535         *lex.c: Added 1998 time stamp.
20536         Removed all static global variables, moved into the parser
20537         context data structure.. Now include unistd.h if SEEK_SET not
20538         defined.
20539         (java_init_lex): Rewritten.
20540         (java_sneak_unicode): Modified current unicode access in current line.
20541         (java_unget_unicode): Likewise.
20542         (java_allocate_new_line): New allocation management.
20543         (java_read_char): Modified access and storage of unget_utf8_value.
20544         New way of processing current unicode.
20545         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20546         (java_get_unicode): Now use the parser context.
20547         (java_lineterminator): Likewise.
20548         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20549         of the reentrant parser implementation. Function now use the
20550         parser context data structure and java_lval. Fixed production of
20551         the float and double constant "out of range" error message. Fixed
20552         obstack use. Return integer value when hitting a modifier. Now
20553         return type for TRUE, FALSE and other predefined types. Return
20554         identifier as a TREE_LIST list containing the current line context
20555         as the TREE_VALUE sub-node.
20556         (java_unicode_2_utf8): Fixed typo in declaration.
20557         (java_lex_error): Now use the parser context data structure.
20558         *lex.h: Added 1998 time stamp.
20559         (struct java_line): New fields ref_count and next.
20560         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20561         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20562         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20563         *parse.h: Added 1998 time stamp.
20564         (java_parse_source_file): Renamed from parse_source_file.
20565         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20566         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20567         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20568         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20569         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20570         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20571         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20572         (struct parser_ctxt): New data structure to keep the parser context.
20573         *parse.y: Added 1998 time stamp, got rid of static global variables.
20574         (java_error_count, ctxp): New global variables.
20575         (%union): New value field.
20576         (numeric_type, integral_type): Rules removed.
20577         (primitive_type): Rule defined to handle integral, float, double and
20578         boolean types.
20579         (qualified_name, package_declaration,
20580         single_type_import_declaration, type_import_on_demand_declaration,
20581         modifiers, class_declaration, super, interfaces,
20582         interface_type_list, class_body, field_declaration,
20583         field_declaration, variable_declarators, variable_declarator,
20584         variable_declarator_id, method_declaration, method_header,
20585         formal_parameter_list, formal_parameter, method_body, block,
20586         static, interface_declaration, extends_interfaces,
20587         abstract_method_declaration, local_variable_declarators): Rules now
20588         define actions.
20589         (force_error, do_warning): New global statics.
20590         (push_parser_context, parser_context_save_global,
20591         parser_context_restore_global, pop_parser_context): New functions.
20592         (yyerror): Now uses the global parser context. Fixed use of obstack.
20593         (parse_error, parse_error_context, parse_warning_context,
20594         java_accstring_lookup, redefinition_error, check_modifiers,
20595         parser_add_interface, create_interface, create_class, find_field,
20596         duplicate_declaration_error, register_fields, method_header,
20597         check_modifiers_consistency, check_abstract_method_header,
20598         method_declarator, parser_qualified_classname,
20599         parser_check_super_interface, parser_check_super,
20600         parser_chain_incomplete_item, java_check_circular_reference,
20601         layout_class_from_source, java_complete_class,
20602         complete_method_decl, resolve_class, complete_class_report_errors,
20603         java_check_final, check_method_redefinition,
20604         java_check_regular_methods, java_check_abstract_methods,
20605         java_check_methods, lookup_java_interface_method2,
20606         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20607         process_imports, find_in_imports, read_import_entry,
20608         read_import_dir, find_in_imports_on_demand,
20609         check_pkg_class_access, not_builtin_p, declare_local_variables,
20610         source_start_java_method, java_generate_parsed_class): New
20611         functions.
20612         *typeck.c: (signature_include_return): New global variable.
20613         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20614         to add the function returned type in the signature.
20615
20616 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20617
20618         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20619
20620 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20621
20622         * Make-lang.in (java.info): Added.
20623         (java.install-info): Added
20624
20625 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20626
20627         * Makefile.in (clean): Also remove java/parse.c.
20628
20629 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20630
20631         Add a pair of -fbounds-check/-fno-bounds-check options.
20632         * lang.c (lang_decode_option): Add code to grok arguments.
20633         (flag_bounds_check): Add decl.
20634         (lang_f_options): New array w/ the option in it.
20635         * java-tree.h (flag_bounds_check): Add decl.
20636         * lang-options.h: New file.
20637         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20638         of a static macro value.
20639         (JAVA_ARRAY_EXCEPTION): Delete macro.
20640
20641 1998-01-23  Per Bothner  <bothner@cygnus.com>
20642
20643         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20644         * expr.c (build_anewarray):  Add missing promote_type.
20645
20646 1998-01-22  Per Bothner  <bothner@cygnus.com>
20647
20648         Add array types with known length to optimize bounds checking.
20649         * typeck.c (build_java_array_type):  Take length parameter.
20650         (java_array_type_length, build_prim_array_type):  New functions.
20651         * java-tree.h:  Update for new functions.
20652         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20653         * class.c:  Use build_prim_array_type.
20654         * expr.c (can_widen_reference_to):  Handle known-length array types.
20655         (verify_jvm_instructions):  Keep track of integer push instructions
20656         followed by newarray/anewarray, so we can build known-length arrays.
20657         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20658         (java_array_data_offset):  New function.
20659         (build_java_array_length_access):  New function.  Optimize if constant.
20660         (build_java_arrayaccess):  Constant fold bounds check.
20661         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20662         (build_newarray, build_anewarray):  New functions.
20663         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20664         * verify.c (merge_types):  Handle known-lengh array types.
20665
20666 1998-01-19  Per Bothner  <bothner@cygnus.com>
20667
20668         * expr.c (expand_byte_code):  Fix performace bug, which caused
20669         searching linenumber_table to be linear rather than constant.
20670
20671 1997-12-12  Per Bothner  <bothner@cygnus.com>
20672
20673         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20674
20675         * decl.c, java-tree.h (soft_fmod_node):  New global.
20676         * decl.c (init_decl_processing):  Define __builtin_fmod.
20677         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20678         using __builtin_fmod.
20679
20680 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20681
20682         * keyword.h: New file, output of keyword.gperf as processed by
20683         gperf.
20684         * lex.c (java_lex_init): Initialize java_error_flag.
20685         * parse.c (YYERROR_NOW): Uses java_error_flag.
20686         * parse.y: New static java_error_flag. Useless definition of
20687         buffer_error gone.
20688         * parse.y (java_error): Portable error recovery using
20689         java_error_flag (not yet completely tuned).
20690
20691 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20692
20693         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20694
20695 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20696
20697         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20698         (parse.c, lex.c, keyword.h): New rules for Java source code
20699         front-end.
20700         * parse.c: Renamed into jcf-parse.c.
20701         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20702         * keyword.gperf: New file, Java keywords.
20703         * parse.y: New file, Java language grammar.
20704         * parse.h: New file, Java language grammar definitions.
20705         * lex.c: New file, Java language lexer.
20706         * lex.h: New file, Java language lexer definitions.
20707
20708 1997-12-03  Per Bothner  <bothner@cygnus.com>
20709
20710         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20711         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20712         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20713         * expr.c (expand_java_field_op):  Check for invalid assignment
20714         to final field.
20715
20716         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20717
20718 1997-10-27  Per Bothner  <bothner@cygnus.com>
20719
20720         * verify.c (verify_jvm_instructions):  When processing a handler,
20721         attempt to set the current_subr to the right value.
20722         (More complicated code combines Sep 17 and Oct 22 versions.)
20723
20724 1997-10-24  Per Bothner  <bothner@cygnus.com>
20725
20726         * class.c (push_class):  Figure out (guess) name of source file.
20727         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20728         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20729         (parse_class_file):  Change return type from int to void.
20730         Call debug_start_source_file/debug_end_source_file.
20731
20732         * expr.c (build_java_binop):  Fix masking 2nd operand.
20733         * decl.c (init_decl_processing):  Set sizetype first.
20734
20735 1997-10-22  Per Bothner  <bothner@cygnus.com>
20736
20737         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20738         (Revert Sep 17 change.)
20739
20740 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20741
20742         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20743         .class extension in their name and fix thing so we don't process
20744         them parse_zip_file_entries().
20745         (parse_zip_file_entries): Cleaned unused local variables.
20746
20747 1997-10-20  Per Bothner  <bothner@cygnus.com>
20748
20749         * expr.c (can_widen_reference_to):  Allows equal array element types.
20750         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20751         * jcf-dump.c (RET):  Get (and print) index.
20752
20753         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20754         Promote element type to POINTER_TYPE.
20755
20756 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20757
20758         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20759         find_in_current_zip, jcf_figure_file_type): Moved from
20760         jcf-reader.c to parse.c.
20761         * zextract.c: (read_zip_archive): takes file_comment_length possible
20762         field into account.
20763
20764 1997-10-20  Per Bothner  <bothner@cygnus.com>
20765
20766         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20767
20768         * verify.c (merge_types):  Handle array types even better ...
20769
20770 1997-10-17  Per Bothner  <bothner@cygnus.com>
20771
20772         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20773
20774         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20775         * class.c (make_class_data):  Don't build fields_decl if no fields.
20776         When building fields_decl, skip if DECL_ARTIFICIAL.
20777
20778         * expr.c (java_stack_swap):  Update stack_type_map.
20779         * verify.c (merge_types):  Handle array types better.
20780
20781 1997-10-15  Per Bothner  <bothner@cygnus.com>
20782
20783         * class.c (add_field):  Don't promote short integral fields to
20784         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20785         * expr.c (push_value):  Promote and convert short integral values.
20786
20787         * decl.c, java-tree.h (integer_two_node):  New constant node.
20788         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20789
20790 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20791
20792         * class.c (append_gpp_mangled_type): Use function argument
20793         unpromoted type to generate mangled name.
20794
20795 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20796
20797         * constants.c (build_constant_data_ref): Now uses current_class
20798         instead of main_class.
20799         (build_constants_constructor): Now uses current_class instead of
20800         main_class.
20801         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20802         of the global variable SeepZipFiles done here.
20803         * zextract.c (read_zip_archive): extra_field optional field taken
20804         into account while computing the position of the class file in the
20805         archive.
20806         * verify.c (verify_jvm_instructions): Use current_jcf to search
20807         the constant pool.
20808         * parse.c (load_class): First search for the class to load in the
20809         current zip file. Saves current_jcf (restored before returning
20810         from that function). Don't call JCF_FINISH in the class was found
20811         in the current ZIP file.
20812         (jcf_parse): If the class was found in the current ZIP file, save
20813         its tree_constant_pool (for later reuse).
20814         (parse_class_file): New function. Process each method defined in
20815         the current class and record the class as to be later registered.
20816         (yyparse): Rewritten. Figure the type of the current file and switch
20817         accordingly.
20818         * lang.c: New global variable current_jcf.
20819         (lang_init): Removed compiling_from_source test (done later, in
20820         yyparse). Removed call the jcf_parse ().
20821         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20822         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20823         in the current ZIP file) and zip_offset (offset to the class data in
20824         the current zip file).
20825         * jcf-reader.c: zipfile.h included.
20826         localToFile: New ZipFileCache static global variable
20827         (parse_zip_file_entries): New function. Browse the current ZIP
20828         file directory and process each class found.
20829         (process_zip_dir): New function. Register each class found in the
20830         ZIP file directory. The class aren't parsed but a valid JCF is
20831         link to each of them.
20832         (find_in_current_zip): New function. Search for a class in the
20833         current ZIP file directory. If found, prepare the class so that it
20834         can be loaded.
20835         (jcf_figure_file_type): New function. Examine the file structure
20836         to figure a class file, a ZIP file. If none of these categories are
20837         matched, a source file is assumed.
20838         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20839         SeenZipFile: New global variable.
20840         (open_in_zip): Use zipmember's length to accelerate the search for
20841         a member. If zipmember was NULL and zip file successfully read,
20842         return 0.
20843         * java-tree.h: New global variable current_jcf declared.  Added
20844         declaration for current_constant_pool_tags, current_constant_pool_data,
20845         current_constant_pool_length, current_constant_pool_data_ref.
20846         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20847         store the JCF of classes seen in a zip file) and tree *constant_pool
20848         (to save a loaded class constant pool). current_class declared here.
20849         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20850         retrieve method_ref_constant.
20851         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20852         (OBJECT): get_class_constant now uses current_jcf.
20853         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20854         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20855         (expand_invoke): Now uses current_class instead of main_class
20856         (build_class_init): Now uses current_class instead of main_class
20857         * class.c: New static global variable registered_class.
20858         (register_class): New function.
20859         (emit_register_class): Modified to use registered_class instead of
20860         main_class
20861         (is_compiled_class): Now take into account class seen in the archive.
20862
20863 1997-10-06  Per Bothner  <bothner@cygnus.com>
20864
20865         * except.h:  Renamed to: java-except.h.
20866         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20867         * except.c:  Add semi-working (commented out) implementation.
20868
20869         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20870         * parse.c (set_source_filename):  New function.
20871         (give_name_to_class):  Set input_filename from package.classname.java.
20872
20873         * jcf-io.c (find_class):  Don't look first in ".".
20874
20875 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20876
20877         * zextract.c (read_zip_archive): Now takes into account the
20878         extra_field field.
20879         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20880
20881 1997-09-20  Per Bothner  <bothner@cygnus.com>
20882
20883         * constants.c, java-tree.h (build_internal_class_name):  New function.
20884         (alloc_class_constant):  Re-implement using build_internal_class_name.
20885         * class.c (make_class_data):  Likewise.
20886         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20887
20888 1997-09-17  Per Bothner  <bothner@cygnus.com>
20889
20890         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20891         to NULL before pushing an exception handler target.
20892
20893         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20894         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20895         clobbering registers.
20896         (build_class_init):  New function.
20897
20898 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20899
20900         * typeck.c (build_java_array_type): Temporary use
20901         permanent_obstack to create the array 'length' field.
20902         * expr.c (lookup_label): Temporay use permanent_obstack to create
20903         label if not found.
20904         * class.c (push_super_field): Tempory use permanent_obstack.
20905
20906 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20907
20908         * typeck.c (type_for_mode): Now handles double_type_node and
20909         float_type_node.
20910         * verify.c (verify_jvm_instructions): The instruction following
20911         the wide bytecode is checked. OPCODE_ret added to the list of
20912         wide.
20913
20914 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20915
20916         * class.c (make_class): Temporary use permanent_obstack. Set the
20917         class CLASS_P field to 1.
20918         (push_class): Temporary use permanent_obstack.
20919         (set_super_info): Temporary use permanent_obstack.
20920         (add_method): Temporary use permanent_obstack, set
20921         METHOD_TRANSIENT().
20922         (add_field): Temporary use permanent_obstack. Sets
20923         FIELD_VOLATILE() and FIELD_TRANSIENT().
20924         (build_class_ref): Temporary use permanent_obstack if the class
20925         isn't compiled.
20926         (build_static_field_ref): Temporary use permanent_obstack when
20927         creating field's rtl.
20928         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20929         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20930         and fields. Function finalized, as far as flag handling.
20931         (push_class_static_dummy_field): Temporary use permanent_obstack.
20932         (emit_register_class): Force generation of class registration at
20933         -O3 or deeper.
20934         * decl.c (end_java_method): Call permanent_allocation() before
20935         returning.
20936         * expr.c (can_widen_reference_to): Added comment to interface
20937         handling, fixed typo.
20938         (lookup_field): Now uses CLASS_P() to correct FIXME
20939         (expand_invoke): Verification on public && !static &&
20940         !abstract moved into soft_lookupinterfacemethod (kaffe).
20941         Use Object class dtable if objectref is an array when expanding
20942         invokeinterface.
20943         (java_push_constant_from_pool): Temporary use permanent_obstack
20944         for CONSTANT_string
20945         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20946         create constant references.
20947         (get_constant): Temporary use permanent_obstack to create constant.
20948         (load_class): Temporary use permanent_obstack to load class.
20949         (jcf_parse): Temporary use permanent_obstack to perform class
20950         layout.
20951         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20952         (build_java_signature): Temporary use permanent_obstack.
20953         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20954         on ACC_SUPER flag.
20955         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20956         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20957         (CLASS_P): Defined
20958
20959 1997-09-11  Per Bothner  <bothner@cygnus.com>
20960
20961         * class.c (append_gpp_mangled_type):  Fix typo.
20962         (emit_register_class):  Use main_class to get class object, rather
20963         than looking for no-longer-existing static decl starting with _CL.
20964         * typeck.c (parse_signature_type):  Promote array element type
20965         if it is a RECORD_TYPE.
20966
20967 1997-09-10  Per Bothner  <bothner@cygnus.com>
20968
20969         * class.c (push_class_static_dummy_field):  New function.
20970         (mangle_static_field):  New. Do G++-style mangling of static fields.
20971         (layout_class):  Mandle static fields here, not in add_field.
20972         (build_class_ref):  The class object is now a dummy static field.
20973         * decl.c (find_local_variable):  Look for best, instead of first match.
20974         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20975         (build_java_athrow):  Don't check here if exception is Throwable.
20976         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20977         (TYPE_USED):  Removed.  No longer used ...
20978         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20979         * verify.c (push_pending_label):  New function.
20980         (push_pending_block):  Renamed to check_pending_block.
20981         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20982         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20983         re-checking possible handlers) after a store (less wasted work).
20984         Check for null handler (finally) before calling add_handler.
20985         Various changes to (finally?) correctly handle try/finally.
20986
20987 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20988
20989         * class.c: Include stdio.h.
20990
20991 1997-09-04  Per Bothner  <bothner@cygnus.com>
20992
20993         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20994         to make sure class is initialized before static/special invoke.
20995
20996         * verify.c (verify_jvm_instructions):  On a store instruction,
20997         call find_local_variable to force pre-allocation of decl and rtx.
20998         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20999
21000 1997-09-03  Per Bothner  <bothner@cygnus.com>
21001
21002         * class.c (build_class_ref):   Strip off "promoted_" if need be.
21003         (make_field_value): Call build_java_signature when needed.
21004         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
21005         * expr.c (build_java_athrow):  Don't push_value of exception.
21006         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21007         match specification of [fd]cmp[lg] for NaNs.
21008         (expand_byte_code):  Add support for exception handler ranges.
21009         * except.c:  Add skeleton for EH code-generation.
21010         * verify.c (merge_types):  Treat all promoted integral types as equal.
21011         * constants.c (build_constants_constructor):  To force creation of
21012         current_constant_pool_data_ref, call build_constant_data_ref.
21013
21014         * javaop.def (lload):  Fix typo.
21015         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
21016
21017 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
21018
21019         * parse.c: Don't include function.h.
21020
21021 1997-08-27  Per Bothner  <bothner@cygnus.com>
21022
21023         * except.[ch]:  New files.
21024         * Makefile.in (JAVA_OBJS):  Add except.o
21025         * expr.c:  Temporary warning about unimplemented exceptions.
21026         * verify.c:  Verify exception handlers.
21027
21028         * jcf-dump.c (disassemble_method):  Print exception table.
21029
21030 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21031
21032         * expr.c (verify_jvm_instructions): Started a thorough
21033         verification of invoke* bytecodes.
21034         (expand_byte_code): flush quick stack if PC is the target of a
21035         branch.  and undef RET (conflicting with config/i386/i386.h).
21036         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21037         used.
21038         (expand_invoke): Now handles invokeinterface and do more
21039         verification according to the bytecode.
21040         (lookup_field): Don't try to load the class if processing
21041         dtable_type.
21042         (can_widen_reference_to): Now handles interfaces.
21043         * decl.c (init_decl_processing): New global variable
21044         soft_lookupinterfacemethod_node, declared in java-tree.h.
21045         Call set_super_info on string_type_node.
21046         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21047         defined.
21048         * class.c (set_super_info): Fills the CLASS_* flags according to
21049         access_flags.
21050         (get_access_flags_from_decl): Handles all class flags.
21051
21052 1997-08-26  Per Bothner  <bothner@cygnus.com>
21053
21054         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
21055         * parse.c (yyparse):  Check for abstract method, and missing code.
21056         * expr.c (expand_byte_code):  Change interface.
21057         * lang.c (put_decl_node):  Print promoted types prettier.
21058         * verify.c (verify_jvm_instruction):  Change interface.
21059         Partial support for scanning exception table.
21060         For load instructions, handle promoted integral types.
21061
21062 1997-08-21  Per Bothner  <bothner@cygnus.com>
21063
21064         * verify.c:  New file, with contents moved from expr.c.
21065         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
21066         * typeck.c (is_array_type_p):  Moved here from expr.c.
21067         * java-tree.h:  Add some now-needed function declarations.
21068         * Makefile.in (JAVA_OBJS): Added verify.o.
21069
21070 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21071
21072         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21073         METHOD_ABSTRACT flag.
21074
21075         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21076         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21077         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21078
21079         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21080         variables.
21081         (start_java_method): Hook for SYNCHRONIZED methods.
21082
21083         * expr.c (build_java_jsr, build_java_ret): New functions
21084         (JSR,PRE): New macros
21085         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21086         (verify_jvm_instructions): tableswitch, lookupswitch,
21087         monitorenter, monitorexit, goto_w: verified.
21088         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21089         (build_java_monitor): New function.
21090         (MONITOR_OPERATION): Modified to call build_java_monitor()
21091         (verify_jvm_instructions): Started a thorough verification of
21092         invoke* bytecodes.
21093
21094 1997-08-19  Per Bothner  <bothner@cygnus.com>
21095
21096         Support verification of jsr/ret subroutines (used for try/finally).
21097         * decl.c (return_address_type_node):  New type node.
21098         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21099         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21100         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
21101         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21102         TYPE_USED):  New macros for special types in type_map.
21103
21104         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
21105         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
21106         BCODE_JUMP_TARGET.
21107         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
21108
21109         * expr.c (can_widen_reference_to):  New function.
21110         (pop_type):  Use it.
21111         (merge_type_state):  Support handling start of subroutine.
21112         (push_pending_block):  Return char* error message, instead of calling
21113         fatal on an error.  Also handle subroutines.
21114         (verify_jvm_instructions):  Handle errors from push_poending_block.
21115         Support jsr and ret instructions.
21116
21117 1997-08-19  Per Bothner  <bothner@cygnus.com>
21118
21119         * jcf-io.c (find_classfile):  Fix thinko.
21120         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
21121
21122 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
21123
21124         * Makefile.in (BISON): Remove.
21125
21126 1997-08-07  Per Bothner  <bothner@cygnus.com>
21127
21128         * Makefile.in:  Convert to autoconf.
21129         * config-lang.in (outputs):  Added java/Makefile.
21130
21131         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21132         Rename cc1java to jc1.
21133
21134         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
21135         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
21136
21137         * class.c (class_depth):  Do load_class if needed.
21138
21139         Mostly better verification.
21140         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21141         (init_decl_processing):  Change return type of soft_checkcast.
21142         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21143         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21144         lang_print_error):  New functions.
21145         (lang_init):  Set global hook print_error_function to lang_print_error.
21146         * expr.c:  In the type_map ptr_type_node is only used for null now.
21147         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21148         (merge_types):  Dererence pointer to record types before comparing.
21149         (decode_newarray_type, merge_types):  On error just return NULL.
21150         (build_java_binop):  Add preliminary implementation (with warning)
21151         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21152         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21153         (expand_compare, expand_java_goto, expand_java_call):  Don't
21154         push_pending_block, since that only makes sense when verifying.
21155         (merge_type_state):  Different return codes.
21156         (push_pending_block):  A block may need to be verified more than once.
21157         (expand_byte_code):  Warn about unused code at code generation time.
21158         (verify_jvm_instruction):  Changed logic, since code may need to be
21159         re-verified if type-state has changed.  Also, better error handling.
21160         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21161         Improve newarray, anewarray, ?aload, athrow,
21162         * java-tree.h (LABEL_CHANGED):  New macro.
21163
21164 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21165
21166         * decl.c (soft_athrow_node): New global variable initialized.
21167         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21168         * typeck.c (convert): Added support for REAL_TYPE.
21169         (convert_to_char): New function.
21170         (convert): Handle CHAR_TYPE.
21171         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21172         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21173         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21174         promoted type.
21175         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21176         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21177         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21178         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21179         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21180         to Use The Right Things.
21181         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21182         compatible with INT. BOOLEAN is made equivalent to BYTE.
21183         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21184         OPCODE_ifnonnull): Now supported.
21185         (build_java_athrow): New function.
21186
21187 1997-08-04  Per Bothner  <bothner@cygnus.com>
21188
21189         Rename method name <init> to match G++ (and fix mangling).
21190         * class.c (layout_class):  Replace method name of <init> by class name.
21191         (make_method_value):  Do inverse renaming of constructor from <init>.
21192         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21193         * typeck.c (lookup_java_constructor):  New function.
21194         * expr.c (expand_invoke):  If method_name is <init>, call
21195         lookup_java_constructor to find constructor.
21196
21197         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21198
21199 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21200
21201         * parse.c (get_class_constant): Modified to handle array "classes"
21202         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21203         wide type.
21204         (convert): Modified to handle real type.
21205         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21206         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21207         variables declared.
21208         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21209         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21210         global variables initialized.
21211         (find_local_variable): Handles the case of a pointer
21212         (end_java_method): Restore the use of one more scope
21213         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21214         build_java_array_length_access, expand_java_arrayload,
21215         expand_java_arraystore, expand_java_array_length,
21216         expand_java_multianewarray, expand_java_anewarray,
21217         build_java_check_indexed_type, is_array_type_p,
21218         build_java_throw_out_of_bound_exception): New functions.
21219         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21220         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21221         OPCODE_<t>aload): Implemented code for verification.
21222         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21223         ARRAY_NEW_MULTI): Macro defined.
21224         (CONVERT): Modified to invoke convert().
21225         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21226
21227 1997-07-31  Per Bothner  <bothner@cygnus.com>
21228
21229         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21230         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21231         (make_class_data):  Field name needs '/' as package prefix.
21232         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21233
21234 1997-07-25  Per Bothner  <bothner@cygnus.com>
21235
21236         Implement debug information for local variables.
21237         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21238         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21239         DECL_LOCAL_SLOT_CHAIN):  New macros.
21240         (struct lang_decl_var):  New type.
21241         * parse.c (give_name_to_locals):  Move to decl.c.
21242         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21243         (start_java_method):  Re-write parameter handling.
21244         (pending_local_decls):  New global variable.
21245         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21246         (find_local_variable):  Accept pc so we can skips decls not in range.
21247         (struct binding_level):  Add end_pc field.
21248         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21249         (various):  Change so current pc gets passed to find_local_variable.
21250
21251         * decl.c (init_decl_processing):  Re-arrange fields in
21252         class_type_node and and method_type_node to match kaffe 0.9.1.
21253         * class.c (make_method_value, make_class_data):  Update
21254         initializations to match.
21255
21256 1997-07-16  Per Bothner  <bothner@cygnus.com>
21257
21258         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21259         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21260         (push_super_field):  New function.
21261         (make_class_data):  Handle inheritance of class static initializer.
21262         (layout_class):  New name mangling.
21263         * constants.c (build_constant_data_ref):  Init type of data array
21264         to a one-element array.
21265         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21266         * decl.c:  Rename class_type, object_type etc to class_type_node,
21267         object_type_node etc.  Make former inherit from latter.
21268         * expr.c (expand_invoke):  Add cast of function address.
21269         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21270         * parse.c (yyparse):  Don't call layout_class here.
21271         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21272
21273 1997-06-14  Per Bothner  <bothner@cygnus.com>
21274
21275         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21276         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21277         (alloc_class_constant):  New.
21278         * expr.c (expand_invoke):  Make sure method's class is initialized.
21279         * class.c (interits_from_p, emit_register_class):  New functions.
21280         * parse.c (yyparse):  Call emit_register_class.
21281
21282 1997-06-09  Per Bothner  <bothner@cygnus.com>
21283
21284         * constants.c:  New file, to handle constant pool.
21285         * Makefile.in (JAVA_OBJS):  Add constants.o.
21286         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21287         (pushdecl_top_level):  New.
21288         * parse.c (layout_class):  Moved to class.c.
21289         * expr.c (java_push_constant_from_pool):  New function.
21290         * class.c (build_class_ref):  Make work fully
21291         (make_class_data):  Emit super-class, constant pool, interface vector.
21292
21293 1997-06-03  Per Bothner  <bothner@cygnus.com>
21294
21295         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21296         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21297         * class.c (class_depth):  New function.
21298         (lookup_named_class):  Replaced by new function lookup_class.
21299         * decl.c (object_type_node, string_type_node):  New.
21300         Remove various types that we no longer need.
21301         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21302         (push_type, pop_type):  New functions for verifier.
21303         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21304         (expand_byte_code):  Simplify, since we assume already verified.
21305         (expand_invoke):  Now mostly works.
21306         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21307         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21308         * parse.c:  Wait to allocate class object until we know its name.
21309         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21310         * typeck.c (get_array_type):  Rename to ...
21311         (build_java_array_type):  ... and provide working implementation.
21312         (build_java_signature):  New function - build Java signature of type.
21313         (set_java_signature):  New function - cache signature with type.
21314         (lookup_java_method):  New function.
21315
21316 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21317
21318         * class.c (ident_subst):  Take extra SUFFIX parameter.
21319         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21320         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21321         (build_class_ref):  Actually implement.
21322         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21323         * decl.c (builtin_function):  New.
21324         (init_decl_processing):  Update for current Kaffe.  Declare some
21325         builtin Kaffe functions.
21326         * expr.c (build_address_of):  New.
21327         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21328         Renamed (from expand_java_new etc), and added working implementations.
21329         (build_field_ref):  Now also handle static fields.
21330         (expand_invoke):  Implement invokestatic, and start implement rest.
21331         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21332         * javaop.def:  Rename invokevirt -> invokevirtual.
21333         * lang.c (use_handles):  Removed.
21334         * parse.c:  Add support for ConstantValue attribute.
21335         Handle nested loading of a class.  (JPOOL_UTF):  New.
21336
21337 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21338
21339         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21340
21341 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21342
21343         * Make-lang.in (java.install-man):  New empty rule.
21344         * typeck.c (set_local_type):  New function.
21345         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21346         not find_stack_slot.  Call set_local_type.
21347
21348 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21349
21350         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21351         and building RECORD_TYPE CONSTRUCTORs.
21352         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21353
21354         * lang.c (use_handles):  Change the default to 0.
21355         * decl.c:  Define and build class_type, field_type, utf8const_type.
21356         * class.c (make_class_data, make_field_value,
21357         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21358         hashUtf8String, strLengthUtf8, mangled_classname:
21359         Functions to build reflective data structures.
21360         * parse.c (yyparse):  Call make_class_data.
21361
21362         * jcf-io.c (open_class, find_classfile):  New functions.
21363         * jcf-dump.c:  Support reading classfile from explicitly-named
21364         class file (without CLASSPATH searching).
21365
21366 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21367
21368         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21369         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21370         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21371         (get_constant):  Now trivial for CONSTANT_Utf8.
21372
21373         * jcf.h:  Make NEW_CPOOL the default.
21374         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21375
21376 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21377
21378         New directory.