OSDN Git Service

52e9da18a964d22c1a2ef0e0e5d80005c36c0420
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
2
3         PR debug/7081
4         * lang.c (java_classify_record): New.
5         (LANG_HOOKS_CLASSIFY_RECORD): Override.
6
7 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
8
9         PR 34081/C++
10         * decl.c (finish_method): Pass 'false' for the new
11         allocate_struct_function parameter.
12
13 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
14
15         * expr.c (build_jni_stub): Use the computed jni func type for
16         variable meth.
17
18 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
19
20         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
21
22 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
23
24         * expr.c (type_assertion_hash): Hash type uids rather than
25         tree pointers.
26
27 2007-11-17  David Daney  <ddaney@avtrex.com>
28             Andrew Haley  <aph@redhat.com>
29
30         * constants.c (build_constants_constructor):  Use POINTER_SIZE
31         insead of BITS_PER_WORD in big-endian work around.
32
33 2007-11-07  Tom Tromey  <tromey@redhat.com>
34
35         PR java/34019:
36         * gcj.texi (Input Options): Add missing noun.
37
38 2007-11-02  Tom Tromey  <tromey@redhat.com>
39
40         PR java/33765:
41         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
42         * zipfile.h (ZIPEMPTYMAGIC): New define.
43
44 2007-11-01  Tom Tromey  <tromey@redhat.com>
45
46         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
47         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
48         (java/jcf-io.o): Depend on zipfile.h.
49
50 2007-10-17  Richard Guenther  <rguenther@suse.de>
51
52         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
53         dependencies.
54
55 2007-10-03  Andrew Haley  <aph@redhat.com>
56
57         PR java/33639
58         * class.c (mangled_classname): Detect and replace illegal
59         characters in assembly language symbols.
60         (gen_indirect_dispatch_tables): Call mangled_classname() on
61         the type.
62
63 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
64
65         * lang.c (java_print_error_function): Add third argument.
66
67 2007-09-15  Tom Tromey  <tromey@redhat.com>
68
69         * java-tree.h (struct lang_decl_func) <function_decl_body>:
70         Remove.
71         <init_final>: Likewise.
72         * lang.c (java_dump_tree): Update.
73         * java-tree.h (DECL_FUNCTION_BODY): Remove.
74
75 2007-09-11  Jan Hubicka <jh@suse.cz>
76
77         * decl.c (java_expand_body): Kill.
78         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
79
80 2007-09-06  Tom Tromey  <tromey@redhat.com>
81
82         * jcf-parse.c (parse_class_file): Re-enter the current file.
83
84 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
85
86         * boehm.c (mark_reference_fields): Move misaligned pointer check
87         after JREFERENCE_TYPE_P test
88
89 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
90
91         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
92         if pointer is misaligned.
93
94 2007-09-06  Tom Tromey  <tromey@redhat.com>
95
96         * lang.c (java_post_options): Update.
97         * jcf-parse.c (set_source_filename): Update.
98         (give_name_to_class): Update.
99         (jcf_parse): Update.
100         (duplicate_class_warning): Update.
101         (parse_class_file): Update.
102         (java_parse_file): Update.
103         * expr.c (expand_byte_code): Update.
104
105 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
106
107         * decl.c (finish_method): Use set_cfun.
108
109 2007-09-04  Andrew Haley  <aph@redhat.com>
110
111         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
112         when using the ARM EABI.
113
114 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
115
116         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
117
118 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
119
120         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
121         CONST_CAST.
122         * jcf.h (JCF_FINISH): Likewise.
123
124 2007-08-28  Tom Tromey  <tromey@redhat.com>
125
126         * Make-lang.in (java.tags): Don't tag '*.y' files.
127
128 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
129
130         * lang.c (java_decl_ok_for_sibcall): Likewise.
131
132 2007-08-21  Paul Brook  <paul@codesourcery.com>
133             Nathan Sidwell  <nathan@codesourcery.com>
134             Mark Mitchell  <mark@codesourcery.com>
135             Joseph Myers  <joseph@codesourcery.com>
136
137         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
138         date.
139
140 2007-08-20  Richard Guenther  <rguenther@suse.de>
141
142         * lang.c (java_tree_inlining_walk_subtrees): Remove.
143         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
144
145 2007-08-17  Tom Tromey  <tromey@redhat.com>
146
147         * typeck.c (find_method_in_interfaces): Update.
148         * jcf-parse.c (load_class): Update.
149         * java-gimplify.c (java_gimplify_component_ref): Removed.
150         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
151         arguments.
152         (java_gimplify_expr): Update.
153         * decl.c (java_init_decl_processing): Update.
154         * class.c (set_constant_value): Update.
155         (make_class_data): Update.
156         (finish_class): Update.
157         (build_static_field_ref): Update.
158         (is_compiled_class): Update.
159         (maybe_layout_super_class): Update.
160         (layout_class): Update.
161         (layout_class_method): Update.
162         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
163         (lang_decl_var) <am, final_iud, cif>: Removed fields.
164         (lang_decl_func) <init_calls_this>: Removed field.
165         (lang_type) <dot_class, verify_method>: Removed fields.
166         (FIELD_NESTED_ACCESS): Removed.
167         (FIELD_NESTED_ACCESS_P): Removed.
168         (DECL_FIELD_FINAL_IUD): Removed.
169         (DECL_LOCAL_FINAL_IUD): Removed
170         (LOCAL_FINAL_P): Removed.
171         (FINAL_VARIABLE_P): Removed.
172         (CLASS_FINAL_VARIABLE_P): Removed.
173         (DECL_BIT_INDEX): Removed.
174         (DECL_INIT_CALLS_THIS): Removed.
175         (FIELD_LOCAL_ALIAS): Removed.
176         (FIELD_LOCAL_ALIAS_USED): Removed.
177         (FIELD_THISN): Removed.
178         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
179         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
180         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
181         (TYPE_DOT_CLASS): Removed.
182         (TYPE_VERIFY_METHOD): Removed.
183         (ID_CLASSDOLLAR_P): Removed.
184         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
185         Removed.
186         (classdollar_identifier_node): Removed.
187         (TYPE_UNKNOWN): Removed.
188         (CLASS_FROM_SOURCE_P): Removed.
189         * expr.c (build_jni_stub): Update.
190         (force_evaluation_order): Update.
191         (build_java_empty_stmt): Update.
192         (build_class_init): Update.
193         (java_stack_swap): Update.
194         (build_jni_stub): Update.
195
196 2007-08-17  Tom Tromey  <tromey@redhat.com>
197
198         * java-tree.h (LABEL_TYPE_STATE): Removed.
199         (load_type_state): Removed.
200         (LABEL_PC): Removed.
201         (LABEL_VERIFIED): Removed.
202         (type_states): Declare.
203         * expr.c (type_states): New global.
204         (load_type_state): Now static.  Use type_states.  Changed
205         argument.
206         (lookup_label): Don't set LABEL_PC.
207         (expand_byte_code): Don't use LABEL_VERIFIED.
208         (note_instructions): Initialize type_states.
209         * verify-glue.c (vfy_note_stack_depth): Rewrote.
210         (vfy_note_stack_type): Use type_states.
211         (vfy_note_local_type): Likewise.
212
213 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
214
215         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
216         * jcf.h (JCF_FINISH): Likewise.
217
218 2007-07-31  Nick Clifton  <nickc@redhat.com>
219
220         * java-gimplify.c: Change copyright header to refer to version 3
221         of the GNU General Public License and to point readers at the
222         COPYING3 file and the FSF's license web page.
223         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
224         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
225         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
226         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
227         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
228         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
229         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
230
231 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
232
233         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
234
235 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
236
237         * lang.c (java_get_callee_fndecl): Constify.
238
239 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
240
241         * mangle.c (set_type_package_list): Constify.
242         * verify-glue.c (vfy_make_string): Delete.
243         * verify.h (vfy_make_string): Likewise.
244
245 2007-07-26  Tom Tromey  <tromey@redhat.com>
246
247         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
248         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
249         EXIT_BLOCK_LABELED_BLOCK): Likewise.
250         * lang.c (java_tree_inlining_walk_subtrees): Update.
251         (java_dump_tree): Likewise.
252         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
253         Remove.
254         * decl.c (push_labeled_block, pop_labeled_block): Remove.
255         * java-gimplify.c (java_gimplify_labeled_block_expr,
256         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
257         (java_gimplify_expr): Update.
258
259 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
260
261         * class.c (java_treetreehash_hash, java_treetreehash_compare):
262         Constify. 
263         * expr.c (type_assertion_eq): Likewise.
264         * jcf-io.c (compare_path): Likewise.
265         * jcf-parse.c (cmpstringp): Likewise.
266         * verify-impl.c (get_one_type, compute_argument_types,
267         compute_return_type): Likewise. 
268
269 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
270
271         PR target/32462
272         PR libgcj/32465
273         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
274
275 2007-07-12  Richard Guenther  <rguenther@suse.de>
276
277         * expr.c (expand_java_return): RETURN_EXPR has void type.
278         (build_jni_stub): Likewise.  Use a comparison against zero
279         for null-pointer test in COND_EXPR.
280         (build_field_ref): Build POINTER_PLUS_EXPR with correct
281         type.  Convert result instead.
282         (build_invokevirtual): Likewise.
283
284 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
285
286         PR 32617
287         * lang.c (java_init): Remove setting of force_align_functions_log.
288         * class.c (add_method_1): Set DECL_ALIGN of non-static method
289         to cope with ptrmemfunc_vbit_in_pfn.
290
291 2007-07-03  David Daney  <ddaney@avtrex.com>
292
293         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
294         include path.
295         (doc/gcj.dvi): Same.
296         (doc/gcj.pdf): Same.
297         (java/index.html): Same.
298
299 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
300
301         * class.c (make_class_data): Build the index in sizetype.
302         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
303         adding to a pointer type.
304         (build_symbol_entry): Likewise.
305         * expr.c (build_java_arrayaccess): Likewise.
306         (build_field_ref): Likewise.
307         (build_known_method_ref): Likewise.
308         (build_invokevirtual): Likewise.
309         * except.c (build_exception_object_ref): Do a
310         NEGATIVE and then a POINTER_PLUS_EXPR instead
311         of a MINUS_EXPR.
312
313 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
314
315         * typeck.c (java_signed_type): Remove.
316         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
317         * java-tree.h (java_signed_type): Remove.
318
319 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
320
321         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
322         (print_constant): Likewise.
323
324 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
325
326         * expr.c (build_java_binop): Use unsigned_type_for instead of
327         java_unsigned_type.
328         * java-tree.h (java_unsigned_type): Remove.
329         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
330         * typeck.c (java_unsigned_type): Remove.
331
332 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
333
334         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
335         instead of checking GIMPLE_STMT_P in chain_next.
336
337 2007-04-06  Colin Walters  <walters@redhat.com>
338
339         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
340         * jcf-io.c (open_class): Copy 'filename'.
341
342 2007-04-03  Andrew Haley  <aph@redhat.com>
343
344         * jvgenmain.c (main): Change main to use class$, not class$$.
345         (do_mangle_classname): Likewise.
346         * class.c (hide): New function.
347         (add_field): Hide everything that shouldn't be visible outside a
348         DSO.
349         (build_static_class_ref): Likewise.
350         (build_classdollar_field): Likewise.
351         (make_class_data): Likewise.
352         (layout_class_method): Likewise.
353         * expr.c (special_method_p): New function.
354
355         * class.c (push_class): Don't bogusly guess the source filename.
356         * jcf-parse.c (give_name_to_class): Don't set input_location from
357         DECL_ARTIFICIAL decls.
358
359 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
360
361         * typeck.c (java_signed_or_unsigned_type): Removed.
362         (java_signed_type): use get_signed_or_unsigned_type instead of
363         java_signed_or_unsigned_type.
364         (java_unsigned_type): Ditto.
365         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
366         * java-tree.h (java_signed_or_unsigned_type): Removed.
367
368 2007-03-26  Tom Tromey  <tromey@redhat.com>
369
370         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
371         (java.maintainer-clean): Likewise.
372         (java.install-man): Likewise.
373         (.INTERMEDIATE): Removed grmiregistry.pod.
374         (grmiregistry.pod): Removed.
375         * gcj.texi (Invoking gcjh): Removed.
376         (Invoking gjnih): Likewise.
377         (Invoking grmiregistry): Likewise.
378         (direntry): Updated.
379         (Top): Likewise.
380         (which-gcj): Removed.
381
382 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
383
384         * Make-lang.in: Add install-pdf target as copied from
385         automake v1.10 rules.
386
387 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
388
389         * gcj.texi: Standardize title page.
390
391 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
392
393         * class.c: Fix a comment typo.
394
395 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
396             Brooks Moses  <brooks.moses@codesourcery.com>
397             Lee Millward  <lee.millward@codesourcery.com>
398
399         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
400         of build3.
401         (BUILD_MONITOR_EXIT): Likewise.
402
403         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
404         (java_gimplify_modify_expr): Likewise.
405
406         * class.c (cache_this_class_ref): Use build_call_expr.
407         (build_static_field_ref): Likewise.
408         (emit_indirect_register_classes): Likewise.
409         (emit_register_classes): Likewise.
410
411         * resource.c (write_resource_constructor): Use build_call_expr.
412
413         * builtins.c (builtin_creator_function): Change interpretation of
414         the second parameter to be the whole CALL_EXPR instead of the arglist.
415         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
416         (min_builtin): Likewise.
417         (abs_builtin): Likewise.
418         (java_build_function_call_expr): Likewise.
419         (convert_real): Likewise.
420         (UNMARSHAL3): Likewise.
421         (UNMARSHAL4): Likewise.
422         (UNMARSHAL5): Likewise.
423         (build_arglist_for_builtin): Delete.  Fix callers to use
424         build_call_expr instead.
425         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
426         accessors.
427         (compareAndSwapInt_builtin): Likewise.
428         (compareAndSwapLong_builtin): Likewise.
429         (compareAndSwapObject_builtin): Likewise.
430         (putVolatile_builtin): Likewise.
431         (getVolatile_builtin): Likewise.
432         (VMSupportsCS8_builtin): Likewise.
433         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
434         instead of arglist.
435
436         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
437         (build_java_throw_out_of_bounds_exception): Likewise.
438         (java_check_reference): Likewise.
439         (build_java_arraystore_check): Likewise.
440         (build_newarray): Likewise.
441         (build_anewarray): Likewise.
442         (expand_java_multinewarray): Use build_call_list instead of build3.
443         (build_java_monitor): Use build_call_nary instead of build3.
444         (java_create_object): Likewise.
445         (expand_java_NEW): Likewise.
446         (build_instanceof): Likewise.
447         (expand_java_CHECKCAST): Likewise.
448         (build_java_soft_divmod): Likewise.
449         (build_java_binop): Likewise.
450         (build_field_ref): Likewise.
451         (build_class_init): Likewise.
452         (rewrite_arglist_getcaller): Use build_call_expr.
453         (build_invokeinterface):  Use build_call_nary instead of build3.
454         (expand_invoke): Use build_call_list instead of build3.
455         (build_jni_stub): Use build_call_nary, build_call_list, or
456         build_call_expr instead of build3.
457         (expand_java_field_op): Use build_call_expr instead of build3.
458         (force_evaluation_order): Use new CALL_EXPR accessors.
459
460         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
461
462 2007-02-15  David Daney  <ddaney@avtrex.com>
463
464         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
465         (java.maintainer-clean):Add gc-analyze.1.
466         (.INTERMEDIATE): Add gc-analyze.pod.
467         (gc-analyze.pod): New rule.
468         (java.install-man): Install gc-analyze.1
469         * gcj.texi: Add new section for the gc-analyze program.
470
471 2007-02-07  Andrew Haley  <aph@redhat.com>
472
473         * class.c (uncache_this_class_ref): New.
474         * expr.c (build_jni_stub): Initialize the class.
475         (expand_byte_code): Call uncache_this_class_ref after generating
476         code.
477
478 2007-02-06  Tom Tromey  <tromey@redhat.com>
479
480         PR java/30714:
481         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
482
483 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
484
485         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
486
487 2007-02-02  Andrew Haley  <aph@redhat.com>
488
489         * expr.c (expand_byte_code): Call cache_this_class_ref() and
490         cache_cpool_data_ref().
491         Set TYPE_CPOOL_DATA_REF.
492         (cache_cpool_data_ref): New function.
493         * constants.c (build_ref_from_constant_pool): Remove special-case
494         code for flag_indirect_classes.
495         (build_constant_data_ref): Move special-case code for
496         flag_indirect_classes here from build_ref_from_constant_pool.
497         * decl.c (finish_method): Move class initialization from here to
498         cache_this_class_ref.
499         * class.c (cache_this_class_ref): New function.
500         (build_class_ref): Use this_classdollar for the ouput class.
501
502 2007-02-02  David Daney  <ddaney@avtrex.com>
503
504         * class.c (is_compiled_class): Move check to avoid reloading
505         current class.
506         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
507         already set.
508
509 2007-02-01  Andrew Haley  <aph@redhat.com>
510
511         PR java/30641
512         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
513
514 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
515
516         * class.c, jcf-parse.c: Fix comment typos.
517
518 2007-01-30  Tom Tromey  <tromey@redhat.com>
519
520         * gcj.texi (Strings): Fix documentation for JvNewString.
521
522 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
523
524         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
525         typos.
526
527 2007-01-30  Ben Elliston  <bje@au.ibm.com>
528
529         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
530
531 2007-01-29  Tom Tromey  <tromey@redhat.com>
532
533         PR java/30607:
534         * jvspec.c (lang_specific_driver): Handle separate -I argument.
535         * lang.opt (-I): Add 'Separate'.
536
537 2007-01-29  Andrew Haley  <aph@redhat.com>
538
539         * class.c (add_method_1): Mark fndecl as external unless we are
540         compiling it into this object file.
541
542 2007-01-24  Andrew Haley  <aph@redhat.com>
543
544         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
545         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
546
547 2007-01-22  Andrew Haley  <aph@redhat.com>
548
549         * builtins.c (VMSupportsCS8_builtin): New function.
550
551 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
552
553         PR java/30454
554         * jcf-io.c (opendir_in_zip): Close the file
555         and free zipf before returning after an error.
556
557 2007-01-16  Tom Tromey  <tromey@redhat.com>
558
559         * java-tree.def: Added copyright header.
560
561 2007-01-15  Tom Tromey  <tromey@redhat.com>
562
563         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
564         case.
565         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
566         Removed case.
567         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
568         (EXPR_WFL_NODE): Likewise.
569         (EXPR_WFL_LINECOL): Likewise.
570         (EXPR_WFL_FILENAME): Likewise.
571         (EXPR_WFL_LINENO): Likewise.
572         (build_expr_wfl, expr_add_location): Don't declare.
573         (build_unknown_wfl): Removed.
574         (EXPR_WFL_FILENAME_NODE): Removed.
575         (EXPR_WFL_COLNO): Removed.
576         (EXPR_WFL_SET_LINECOL): Removed.
577         (DECL_FUNCTION_WFL): Removed.
578         (DECL_FIELD_FINAL_WFL): Removed.
579         (struct lang_decl_func) <wfl>: Removed field.
580         <called_constructor>: Likewise.
581         <inner_access>: Likewise.
582         (struct lang_decl_var) <wfl>: Removed field.
583         (DECL_CONSTRUCTOR_CALLS): Removed.
584         (DECL_FUNCTION_ACCESS_DECL): Likewise.
585         (DECL_FUNCTION_INNER_ACCESS): Likewise.
586         (DECL_SPECIFIC_COUNT): Likewise.
587         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
588         * expr.c (build_expr_wfl): Removed.
589         (expr_add_location): Likewise.
590
591 2007-01-12  Tom Tromey  <tromey@redhat.com>
592
593         * jcf-dump.c (main): Updated call to find_class.
594         * lang.c (java_init): Removed dead code.
595         * jcf-parse.c (read_class): Don't use java_source field.  Removed
596         dead code.
597         (parse_zip_file_entries): Don't use java_source field.
598         (process_zip_dir): Likewise.
599         (jcf_parse): Removed dead code.
600         (java_parse_file): Likewise.
601         (read_class): Updated call to find_class.
602         * jcf-io.c (find_class): Don't use java_source field.  Removed
603         'source_ok' argument, .java logic.
604         * jcf.h (JCF) <java_source>: Removed field.
605         (JCF_ZERO): Updated.    (find_class): Updated.
606         * decl.c: Removed dead code.
607         * class.c: Removed dead code.
608
609 2007-01-11  Tom Tromey  <tromey@redhat.com>
610
611         * typeck.c (convert): Don't use flag_emit_class_files.
612         * lang.c (java_post_options): Don't use flag_emit_class_files.
613         (java_handle_option): Don't use flag_extraneous_semicolon or
614         flag_redundant.
615         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
616         flag_emit_class_files.
617         (load_class): Likewise.
618         * java-tree.h (flag_emit_class_files): Don't declare.
619         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
620         (flag_extraneous_semicolon): Don't declare.
621         (flag_not_overriding): Likewise.
622         (flag_static_local_jdk1_1): Likewise.
623         (flag_redundant): Likewise.
624         * expr.c (build_newarray): Don't use flag_emit_class_files.
625         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
626         flag_emit_class_files.
627         (build_class_ref): Likewise.
628         * builtins.c (check_for_builtin): Don't use
629         flag_emit_class_files.
630
631 2007-01-10  Tom Tromey  <tromey@redhat.com>
632
633         * lang.c (java_can_use_bit_fields_p): Removed.
634         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
635
636 2007-01-09  Andrew Haley  <aph@redhat.com>
637
638         * expr.c (build_java_arrayaccess): Rewrite to generate array
639         access in canonical form.
640         (expand_java_arraystore): Use build_fold_addr_expr() on address of
641         array access.
642
643 2007-01-03  Andrew Haley  <aph@redhat.com>
644
645         PR java/28754
646         * expr.c (expand_java_field_op): If we're initializing a field's
647         declaring interface we should not also initialize the class
648         context in which it was referenced.
649
650 2007-01-02  Tom Tromey  <tromey@redhat.com>
651
652         * java-tree.h (compiling_from_source, current_encoding,
653         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
654         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
655         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
656         JTI_WFL_OPERATOR): Removed
657         (finit_identifier_node, instinit_identifier_node,
658         length_identifier_node, super_identifier_node,
659         continue_identifier_node, access0_identifier_node, wfl_operator):
660         Removed.
661         (cyclic_inheritance_report,
662         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
663         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
664         DECL_FIXED_CONSTRUCTOR_P): Removed.
665         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
666         Removed.
667         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
668         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
669         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
670         import_list, import_demand_list>: Removed.
671         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
672         cxx_keyword_p): Removed.
673         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
674         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
675         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
676         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
677         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
678         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
679         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
680         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
681         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
682         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
683         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
684         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
685         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
686         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
687         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
688         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
689         java_parse_abort_on_error, extract_field_decl): Removed.
690         (finput): Declare.
691         * lang.c: (compiling_from_source, current_encoding): Removed.
692         (java_handle_option): Ignore -fencoding.
693         * parse.h: Don't include lex.h.
694         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
695         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
696         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
697         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
698         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
699         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
700         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
701         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
702         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
703         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
704         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
705         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
706         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
707         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
708         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
709         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
710         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
711         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
712         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
713         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
714         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
715         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
716         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
717         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
718         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
719         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
720         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
721         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
722         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
723         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
724         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
725         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
726         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
727         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
728         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
729         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
730         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
731         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
732         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
733         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
734         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
735         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
736         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
737         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
738         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
739         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
740         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
741         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
742         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
743         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
744         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
745         SET_CPC_STATIC_INITIALIZER_STMT,
746         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
747         java_complete_class, java_check_circular_reference,
748         java_fix_constructors, java_layout_classes, java_reorder_fields,
749         java_method_add_stmt, java_get_line_col, reset_report,
750         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
751         java_finish_classes, ctxp, ctxp_for_generation,
752         ctxp_for_generation_last): Removed.
753         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
754         * mangle.c (utf8_cmp): New function.
755         (cxx_keywords): New global.
756         (cxx_keyword_p): New function.
757         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
758         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
759         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
760         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
761         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
762         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
763         * Make-lang.in (java.srcextra): Do nothing.
764         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
765         (JAVA_OBJS): Don't mention deleted files.
766         (java.mostlyclean): Likewise.
767         (java.clean): Likewise.
768         (JAVA_LEX_C): Removed.
769         (buffer.o, check-init.o, parse.o): Remove unused targets.
770         (typeck.o): Updated.
771         * jcf-parse.c (read_class): Comment out unused code.
772         (java_layout_seen_class_methods): New function.
773         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
774         Removed.
775         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
776         (init_jcf_parse): Removed.
777         * config-lang.in (gtfiles): Remove deleted files.
778         * decl.c (java_init_decl_processing): Don't initialize
779         finit_identifier_node, instinit_identifier_node,
780         length_identifier_node, super_identifier_node,
781         continue_identifier_node, access0_identifier_node.  Don't call
782         init_jcf_parse.
783         * class.c (cyclic_inheritance_report): New global.
784         (add_method_1): Don't use
785         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
786         (maybe_layout_super_class): Comment out code.
787         (safe_layout_class): New function.
788         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
789         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
790         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
791         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
792         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
793         (java_gimplify_case_expr): Removed.
794         (java_gimplify_default_expr): Likewise.
795         (java_gimplify_new_array_init): Likewise.
796         * parse.y: Removed.
797         * keyword.gperf, keyword.h: Removed.
798         * chartables.h: Removed.
799         * check-init.c: Removed.
800         * buffer.c, buffer.h: Removed.
801         * convert.h: Removed.
802         * gen-table.pl: Removed.
803         * lex.c, lex.h: Removed.
804
805 2007-01-02  Andrew Haley  <aph@redhat.com>
806
807         * expr.c (expand_java_arraystore): Make sure we perform a bounds
808         check at runtime before we perform a type check.
809
810 2006-12-19  Andrew Haley  <aph@redhat.com>
811
812         * decl.c: Bump minor BC ABI version.
813
814 2006-12-13  Gary Benson  <gbenson@redhat.com>
815
816         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
817
818 2006-12-12  Tom Tromey  <tromey@redhat.com>
819
820         * lang-specs.h: Pass -M options to jc1.
821         * jcf-depend.c (jcf_dependency_add_file): Don't emit
822         dependencies.
823
824 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
825
826         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
827
828 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
829
830         * lang-specs.h: Pass '%U'-based options as separate arguments.
831
832 2006-12-05  Tom Tromey  <tromey@redhat.com>
833
834         PR java/29495:
835         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
836         classes as well.
837         * class.c (add_field): Handle ACC_SYNTHETIC.
838         (add_method_1): Likewise.  Handle bridge and varargs.
839         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
840         annotation.
841         (set_class_decl_access_flags): Handle synthetic and annotation.
842         * java-tree.h (METHOD_BRIDGE): New macro.
843         (METHOD_VARARGS): Likewise.
844         (TYPE_SYNTHETIC): Likewise.
845         (TYPE_ANNOTATION): Likewise.
846         (lang_type): New fields 'synthetic' and 'annotation'.
847         (lang_decl_func): New fields 'varargs' and 'bridge'.
848
849 2006-12-04  Andrew Haley  <aph@redhat.com>
850
851         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
852         there's no map.
853
854 2006-11-29  Gary Benson  <gbenson@redhat.com>
855
856         * expr.c (rewrite_arglist_getcaller): Reorder.
857
858 2006-11-29  Andrew Haley  <aph@redhat.com>
859
860         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
861         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
862
863 2006-11-23  Andrew Haley  <aph@redhat.com>
864
865         * expr.c (rewrite_arglist_getcaller): New.
866         (rewrite_arglist_getclass): Fix indentation.
867         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
868         gnu.classpath.VMStackWalker.getCallingClassLoader().
869         * builtins.c (initialize_builtins): Remove duplicate def'n of
870         __sync_synchronize.
871         Add __builtin_return_address.
872
873 2006-11-22  Andrew Haley  <aph@redhat.com>
874
875         * jcf-reader.c (get_attribute): Mark attr_type unused.
876
877         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
878
879 2007-01-08  Richard Guenther  <rguenther@suse.de>
880
881         * lex.c (do_java_lex): Use build_int_cst_wide_type.
882         * jcf-parse.c (get_constant): Likewise.
883
884 2006-11-12  Jan Hubicka  <jh@suse.cz>
885
886         * resource.c (compile_resource_data): Update for new varpool names.
887         * java/class.c (build_utf8_ref): Likewise.
888
889 2006-11-12  David Daney  <ddaney@avtrex.com>
890
891         PR java/29805
892         * typeck.c (build_java_array_type): Increase buffer sizes.
893
894 2006-11-11  Richard Guenther  <rguenther@suse.de>
895
896         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
897         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
898
899 2006-11-06  Andrew Haley  <aph@redhat.com>
900
901         * java-tree.h (CONSTANT_LazyFlag): New.
902         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
903         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
904         reflection_data.
905         (handle_constant): Return 0 for dummy cpool entries.
906         Handle constants of kind Class.
907         Handle constants of kind NameAndType.
908         (handle_enclosingmethod_attribute): New.
909         (handle_signature_attribute): New.
910         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
911         (HANDLE_SIGNATURE_ATTRIBUTE): New.
912         (handle_constant): Use unmangle_classname()rather than calling
913         identifier_subst() directly.
914
915 2006-11-02  Andrew Haley  <aph@redhat.com>
916
917         * java-tree.h (FIELD_ENUM): New.
918         (lang_decl_var.field_enum): New.
919         (lang_type.enum_class): New.
920         (CLASS_ENUM): New.
921         * class.c (set_class_decl_access_flags): Handle enum types.
922         (add_field): Handle enum fields.
923         (get_access_flags_from_decl): Likewise.
924
925         * class.c (make_class_data): Put reflection_data into rodata.
926
927 2006-11-01  Andrew Haley  <aph@redhat.com>
928
929         * jcf-parse.c (field_offsets, bit_obstack): New variables.
930         (jcf_parse): Write end marker to annotation_data.
931         (java_parse_file): Create field_offsets bitmap.  Destroy it.
932         (annotation_grow, annotation_rewrite_byte) 
933         (annotation_rewrite_short, annotation_rewrite_int) 
934         (annotation_read_short, annotation_write_byte) 
935         (annotation_write_short, annotation_write_int) 
936         (handle_long_constant, handle_constant, handle_element_value) 
937         (handle_annotation, handle_annotations) 
938         (handle_annotation_attribute, rewrite_reflection_indexes) 
939         (handle_member_annotations, handle_parameter_annotations) 
940         (handle_default_annotation): New functions.
941         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
942         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
943         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
944         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
945         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
946         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
947         (TYPE_REFLECTION_DATA): New.
948         (TYPE_REFLECTION_DATASIZE): New.
949         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
950         an enum.
951         * jcf-reader.c (get_attribute): Pass field/method index and
952         attribute type to get_attribute().
953         * constants.c (find_class_or_string_constant): Make nonstatic.
954         (cpool_for_class): Likewise.
955         (build_constants_constructor): Separate string and scalar types.
956         * class.c (make_class_data): Generate field_indexes permutation.
957         Pass it to rewrite_reflection_indexes().
958         (make_class_data): Generate constructor for reflection_data field.
959
960 2006-10-20  Tom Tromey  <tromey@redhat.com>
961
962         * gcj.texi (Top): Don't mention jv-scan.
963         (Invoking gcj): Likewise.
964         (Invoking gcjh): Likewise.
965         (Invoking gjnih): Likewise.
966         (Invoking gij): Likewise.
967         (Invoking gcj-dbtool): Likewise.
968         (Invoking jv-scan): Removed.
969         * parse-scan.y: Removed.
970         * jv-scan.c: Removed.
971         * config-lang.in (stagestuff): Don't mention jv-scan.
972         * Make-lang.in (java): Removed jv-scan.
973         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
974         (JVSCAN_OBJS): Removed.
975         (jv-scan$(exeext)): Likewise.
976         (JAVA_MANFILES): Removed jv-scan.1.
977         (java.uninstall): Don't mention jv-scan.
978         (java.mostlyclean): Likewise.
979         (java.maintainer-clean): Likewise.
980         (.INTERMEDIATE): Likewise.
981         (java/jv-scan.o): Removed.
982         (jv-scan.pod): Likewise.
983         (java.srcextra): Don't mention parse-scan.c.
984         (java.mostlyclean): Likewise.
985         (java/parse-scan.c): Removed.
986         (java/parse-scan.o-warn): Removed.
987         (java/parse-scan.o): Removed.
988
989 2006-10-20  Tom Tromey  <tromey@redhat.com>
990
991         * lang.c (java_handle_option): Don't use
992         jcf_write_base_directory.
993         * jcf.h (jcf_write_base_directory): Removed.
994         * parse.y (java_expand_classes): Don't call write_classfile.
995         * config-lang.in (gtfiles): Removed jcf-write.c.
996         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
997         (java/jcf-write.o): Removed.
998         * jcf-parse.c (parse_class_file): Don't call write_classfile.
999         * java-tree.h (write_classfile): Removed declaration.
1000         * jcf-write.c: Removed.
1001
1002 2006-10-20  Tom Tromey  <tromey@redhat.com>
1003
1004         * Make-lang.in (java): Removed gjnih, gcjh.
1005         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1006         (GCJH_OBJS): Removed.
1007         (GJNIH_OBJS): Likewise.
1008         (gjnih$(exeext)): Likewise.
1009         (gcjh$(exeext)): Likewise.
1010         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1011         (java.install-common): Don't special case gcjh.
1012         (java.uninstall): Don't mention gcjh, gjnih.
1013         (java.mostlyclean): Likewise.
1014         (java.maintainer-clean): Likewise.
1015         (.INTERMEDIATE): Likewise.
1016         (gcjh.pod): Removed.
1017         (gjnih.pod): Likewise.
1018         (GCJH_TARGET_INSTALL_NAME): Removed.
1019         (java/gjavah-jni.o): Removed.
1020         (java/gjavah.o): Likewise.
1021         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1022         * gjavah.c: Removed.
1023
1024 2006-10-17  Tom Tromey  <tromey@redhat.com>
1025
1026         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1027         "string" case.
1028
1029 2006-10-17  Tom Tromey  <tromey@redhat.com>
1030
1031         * jvgenmain.c (main): Handle -findirect-dispatch.
1032         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1033         jvgenmain.
1034
1035 2006-10-06  Andrew Haley  <aph@redhat.com>
1036
1037         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1038         have a compare_and_swap builtin.
1039         (compareAndSwapLong_builtin): Likewise.
1040         (compareAndSwapObject_builtin): Likewise.
1041
1042 2006-10-04  Andrew Haley  <aph@redhat.com>
1043
1044         * builtins.c (java_builtins): Add compareAndSwapInt,
1045         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1046         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1047         putObjectVolatile, getObjectVolatile, getIntVolatile,
1048         getLongVolatile, getLong.
1049         (UNMARSHAL3): New macro.
1050         (UNMARSHAL4): Likewise.
1051         (UNMARSHAL5): Likewise.
1052         (build_arglist_for_builtin): New function.
1053         (build_addr_sum, build_check_this): New functions.
1054         (putObject_builtin. compareAndSwapInt_builtin,
1055         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1056         putVolatile_builtin, getVolatile_builtin): New builtins.
1057
1058 2006-06-08  Andrew Haley  <aph@redhat.com>
1059  
1060         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1061         get_symbol_table_index().
1062         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1063         private method.
1064         (build_known_method_ref): New arg: special.  Pass it to
1065         get_symbol_table_index.
1066         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1067         the method list.
1068         (build_invokevirtual): New arg: special.  Pass it to
1069         get_symbol_table_index.
1070         (expand_invoke): New variable: special.
1071         Pass it to maybe_rewrite_invocation().
1072         Pass it to build_known_method_ref().
1073         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1074         build the symbol table conbstructor.
1075         (emit_symbol_table): Extract SPECIAL from the method list and pass
1076         it to build_symbol_entry().
1077         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1078         special accordingly.
1079  
1080 2006-09-08  Andrew Haley  <aph@redhat.com>
1081
1082         * class.c (layout_class_method): Use build_java_signature, not
1083         build_java_argument_signature.  Use lookup_java_method, not
1084         lookup_argument_method.
1085
1086 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1087             Bryce McKinlay  <bryce@mckinlay.net.nz>
1088
1089         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1090
1091 2006-07-18  Tom Tromey  <tromey@redhat.com>
1092
1093         * lang.opt: Added missing -W options.
1094
1095 2006-07-12  Tom Tromey  <tromey@redhat.com>
1096
1097         PR java/28329:
1098         * lang-specs.h: Pass '%U'-based options as separate arguments.
1099         Use -faux-classpath.
1100         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1101         * lang.opt (faux-classpath): New option.
1102
1103 2006-07-07  Tom Tromey  <tromey@redhat.com>
1104
1105         * class.c (make_class_data): Set value for reflection_data field.
1106         * decl.c (java_init_decl_processing): Add reflection_data field.
1107
1108 2006-07-07  Tom Tromey  <tromey@redhat.com>
1109
1110         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1111         earlier.
1112         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1113
1114 2006-07-07  Andrew Haley  <aph@redhat.com>
1115
1116         * jcf-parse.c (set_source_filename): Don't check for
1117         CLASS_FROM_CURRENTLY_COMPILED_P.
1118         Remove // comments.
1119
1120 2006-07-07  Andrew Haley  <aph@redhat.com>
1121
1122         * java-tree.h (java_read_sourcefilenames): Declare.
1123         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1124         * lang.opt (fsource-filename): New opt.
1125         * lang-specs.h: Add -fsource-filename.
1126         * jcf-parse.c (num_files, filenames): New variables.
1127         (reverse, cmpstringp, java_read_sourcefilenames,
1128         find_sourcefile): New.
1129         (set_source_filename): Call find_sourcefile to find the real name
1130         of a source file.
1131
1132 2006-06-27  Tom Tromey  <tromey@redhat.com>
1133
1134         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1135         Signature, LocalVariableTypeTable, annotation attributes.
1136         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1137         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1138         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1139         (HANDLE_METHOD): Likewise.
1140         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1141         (print_annotation): New function.
1142         (print_element_value): Likewise.
1143         (indent): Likewise.
1144         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1145         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1146         (print_parameter_annotations): New function.
1147         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1148         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1149         Likewise.
1150         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1151         (print_annotations): New function.
1152
1153 2006-06-23  Tom Tromey  <tromey@redhat.com>
1154
1155         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1156         emitting class files, always use 1.5.
1157         * gcj.texi (Input Options): Document -fsource.
1158         (Code Generation): Document -ftarget.
1159
1160 2006-06-21  Tom Tromey  <tromey@redhat.com>
1161
1162         PR java/28089:
1163         * expr.c (expand_java_field_op): Initialize field's declaring
1164         class.
1165
1166 2006-06-20  Tom Tromey  <tromey@redhat.com>
1167
1168         * expr.c (push_value): Always flush quick stack.
1169
1170 2006-06-19  Tom Tromey  <tromey@redhat.com>
1171
1172         * expr.c (push_value): Also flush quick stack if value is a
1173         component_ref.
1174
1175 2006-06-19  Tom Tromey  <tromey@redhat.com>
1176
1177         * expr.c (push_value): Flush quick stack if value has side
1178         effects.
1179
1180 2006-06-13  Tom Tromey  <tromey@redhat.com>
1181
1182         * class.c (is_compiled_class): Explicitly check for current
1183         class.
1184
1185 2006-06-09  Tom Tromey  <tromey@redhat.com>
1186
1187         * gjavah.c (decompile_method): Don't decompile a static field
1188         accessor method.
1189
1190 2006-06-06  Tom Tromey  <tromey@redhat.com>
1191
1192         * lang-specs.h <jc1>: Add .jar file to command line if
1193         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1194
1195 2006-06-05  Tom Tromey  <tromey@redhat.com>
1196
1197         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1198         synthetic, enum, annotation.
1199         * jcf.h (ACC_BRIDGE): New macro.
1200         (ACC_VARARGS): Likewise.
1201         (ACC_SYNTHETIC): Likewise.
1202         (ACC_ENUM): Likewise.
1203         (ACC_ANNOTATION): Likewise.
1204
1205 2006-06-04  Tom Tromey  <tromey@redhat.com>
1206
1207         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1208         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1209         and -ftarget.
1210         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1211         when needed.  Handle classpath-setting.
1212         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1213         * lang-specs.h: Rewrote.
1214
1215 2006-06-04  Tom Tromey  <tromey@redhat.com>
1216
1217         * jcf-io.c (find_class): Set source_ok to 0.
1218         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1219         (parse_class_file): Don't call java_mark_class_local.
1220         (java_parse_file): Skip .java files.  Call java_mark_class_local
1221         before lowering any code.
1222         (parse_zip_file_entries): Don't call duplicate_class_warning
1223         here.
1224         (process_zip_dir): ... call it here.
1225         * class.c (add_field): Don't mark field external if it is being
1226         compiled into this object.
1227         (make_class_data): Handle situation where class_dtable_decl is
1228         created before Class is compiled.
1229         (is_compiled_class): Don't assume files in zip are compiled into
1230         this object.
1231         (layout_class_method): Don't mark method external if it is being
1232         compiled into this object.
1233
1234 2006-06-04  Tom Tromey  <tromey@redhat.com>
1235
1236         * jcf-path.c (jcf_path_compute): New function.
1237         * jcf.h (jcf_path_compute): Declare.
1238
1239 2006-10-23 Rafael Avila de Espindola  <rafael.espindola@gmail.com>
1240
1241         * decl.c: Include langhooks.h.
1242         (builtin_function): Remove.
1243         (java_init_decl_processing): Replace calls to builtin_function
1244         with add_builtin_function.
1245         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1246         (java/decl.o): Depend on langhooks.h.
1247         * java-tree.h (builtin_function): Remove.
1248
1249 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1250
1251         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1252
1253 2006-09-12  Tom Tromey  <tromey@redhat.com>
1254
1255         * expr.c (push_value): Always flush quick stack.
1256
1257 2006-09-12  Tom Tromey  <tromey@redhat.com>
1258
1259         PR java/29013:
1260         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1261         the push of the called method's return result.
1262
1263 2006-09-12  Tom Tromey  <tromey@redhat.com>
1264
1265         * jvspec.c (lang_specific_driver): Read spec file even if
1266         -fsyntax-only.
1267
1268 2006-09-12  Tom Tromey  <tromey@redhat.com>
1269
1270         PR java/28754:
1271         * expr.c (expand_java_field_op): Initialize field's declaring
1272         interface if necessary.
1273
1274 2006-09-12  Tom Tromey  <tromey@redhat.com>
1275
1276         PR java/28892:
1277         * expr.c (expand_java_field_op): No error for assignments not in
1278         class initializer or constructor.
1279
1280 2006-08-22  Andrew Haley  <aph@redhat.com>
1281
1282         * decl.c (java_add_stmt): Give the statement list a type.
1283
1284 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1285             Bryce McKinlay  <bryce@mckinlay.net.nz>
1286
1287         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1288
1289 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1290
1291         PR java/8923
1292         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1293         or '--' is used with a constant operand.
1294         (java_complete_lhs): When processing a '++' or '--' expression,
1295         don't call java_complete_tree but java_complete_lhs, so that a
1296         static final variable operand is never replaced by its value. This
1297         avoids an ICE later on.
1298         (patch_unaryop): Fixed typo in comment.
1299
1300 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1301
1302         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1303
1304 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1305
1306         * builtins.c (check_for_builtin): If a builtin could result in a
1307         direct call being generated, don't use it if flag_indirect_dispatch
1308         is set.
1309
1310 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1311
1312         * gcj.texi (Invocation): Corrections for Invocation API example.
1313
1314 2006-07-04  Andrew Haley  <aph@redhat.com>
1315
1316         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1317         entry.
1318
1319 2006-06-21  Andrew Haley  <aph@redhat.com>
1320
1321         * java-tree.h (update_aliases): Remove
1322         * expr.c (expand_iinc): Remove call to update_aliases().
1323         (STORE_INTERNAL): Likewise.
1324         * decl.c (update_aliases, initialize_local_variable) 
1325         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1326
1327 2006-06-19  Andrew Haley  <aph@redhat.com>
1328
1329         PR java/1305
1330         PR java/27908
1331         * expr.c (java_modify_addr_for_volatile): New function.
1332         (expand_java_field_op): Handle volatile fields.
1333         * java-gimplify.c (java_gimplify_component_ref): Call
1334         java_modify_addr_for_volatile to give the field_ref the correct
1335         volatile type.
1336         (java_gimplify_modify_expr): Likewise.
1337         * java-tree.h (java_modify_addr_for_volatile): New decl.
1338
1339 2006-06-17  Karl Berry  <karl@gnu.org>
1340
1341         * gcj.texi (@dircategory): Use "Software development" instead
1342         of "Programming", following the Free Software Directory.
1343
1344 2006-06-16  Andrew Haley  <aph@redhat.com>
1345
1346         * class.c (make_class_data): When using flag_indirect_classes,
1347         don't initialize the vtable of Class instances.
1348
1349 2006-06-09  Andrew Haley  <aph@redhat.com>
1350
1351         PR java/1305
1352         PR java/27908
1353         * builtins.c (initialize_builtins): Add __sync_synchronize().
1354         * class.c (add_field): Mark volatile fields.
1355         * java-gimplify.c (java_gimplify_expr): Call new functions to
1356         handle self-modifying exprs and COMPONENT_REFs.
1357         (java_gimplify_component_ref): New.
1358         (java_gimplify_modify_expr): Add handling for volatiles.
1359
1360 2006-06-08  Tom Tromey  <tromey@redhat.com>
1361
1362         * gcj.texi (libgcj Runtime Properties): Document
1363         gnu.gcj.user.realname.
1364
1365 2006-06-08  Andrew Haley  <aph@redhat.com>
1366
1367         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1368         get_symbol_table_index().
1369         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1370         private method.
1371         (build_known_method_ref): New arg: special.  Pass it to
1372         get_symbol_table_index.
1373         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1374         the method list.
1375         (build_invokevirtual): New arg: special.  Pass it to
1376         get_symbol_table_index.
1377         (expand_invoke): New variable: special.
1378         Pass it to maybe_rewrite_invocation().
1379         Pass it to build_known_method_ref().
1380         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1381         build the symbol table conbstructor.
1382         (emit_symbol_table): Extract SPECIAL from the method list and pass
1383         it to build_symbol_entry().
1384         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1385         special accordingly.
1386
1387 2006-06-06  David Daney  <ddaney@avtrex.com>
1388
1389         * gcj.texi (libgcj Runtime Properties): Document
1390         gnu.gcj.runtime.NameFinder.show_raw and
1391         gnu.gcj.runtime.NameFinder.remove_unknown.
1392
1393 2006-06-06  Tom Tromey  <tromey@redhat.com>
1394
1395         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1396         synthetic, enum, annotation.
1397         * jcf.h (ACC_BRIDGE): New macro.
1398         (ACC_VARARGS): Likewise.
1399         (ACC_SYNTHETIC): Likewise.
1400         (ACC_ENUM): Likewise.
1401         (ACC_ANNOTATION): Likewise.
1402
1403 2006-06-06  Mike Stump  <mrs@apple.com>
1404
1405         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1406         installing during build.
1407
1408 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1409
1410         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1411         classname-to-library resolution mechanism.
1412         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1413         mechanism deprecated.
1414         (libgcj Runtime Properties): Document
1415         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1416
1417 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1418
1419         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1420         bit wide type.
1421         (jword): Define to uint64 on 64-bit arches.
1422         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1423
1424 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1425
1426         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1427         typos.
1428
1429 2006-05-26  Tom Tromey  <tromey@redhat.com>
1430
1431         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1432         * verify-glue.c (vfy_class_type): New function.
1433         * verify-impl.c (check_constant): Allow 'ldc class'.
1434         * verify.h (vfy_class_type): Declare.
1435
1436 2006-05-25  Andrew Haley  <aph@redhat.com>
1437
1438         PR java/27756
1439         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1440         update all lifetimes, not just the first one.
1441
1442 2006-05-24  Tom Tromey  <tromey@redhat.com>
1443
1444         * java-tree.h: Fixed flag documentation.
1445
1446 2006-05-24  Tom Tromey  <tromey@redhat.com>
1447
1448         PR libgcj/27729:
1449         * jcf.h (ACC_INVISIBLE): Changed value.
1450
1451 2006-05-24  Andrew Haley  <aph@redhat.com>
1452
1453         PR java/27754
1454         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1455         COMPOUND_EXPR.
1456
1457 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1458
1459         * lang.opt (femit-class-file): Remove VarExists.
1460
1461 2006-05-16  Tom Tromey  <tromey@redhat.com>
1462
1463         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1464         for Object.<init>.
1465
1466 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1467
1468         PR driver/26885
1469         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1470         $(GCC_OBJS).
1471
1472 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1473
1474         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1475         (java/expr.o): Replace target.h with $(TARGET_H).
1476         (java/parse.o): Likewise.
1477
1478 2006-05-10  Andrew Haley  <aph@redhat.com>
1479
1480         * class.c (emit_indirect_register_classes): Fix comment.
1481
1482 2006-05-04  Tom Tromey  <tromey@redhat.com>
1483
1484         * java-tree.h (uses_jv_markobj_p): Declare.
1485         * class.c (uses_jv_markobj_p): Removed.
1486         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1487         (get_boehm_type_descriptor): Use it.
1488         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1489
1490 2006-05-04  Tom Tromey  <tromey@redhat.com>
1491
1492         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1493
1494 2006-05-04  Andrew Haley  <aph@redhat.com>
1495
1496         * class.c (make_field_value): Always build_address_of fdecl if
1497         there is an initializer.
1498
1499 2006-05-03  Andrew Haley  <aph@redhat.com>
1500
1501         PR libgcj/27352
1502         * expr.c (maybe_rewrite_invocation): New function.
1503         (rewrite_arglist_getclass): Likewise.
1504         (rules): New.
1505         (expand_invoke): Call maybe_rewrite_invocation.
1506         * parse.y (patch_invoke): Likewise.
1507         * java-tree.h: (maybe_rewrite_invocation): New function.
1508
1509 2006-04-21  Andrew Haley  <aph@redhat.com>
1510
1511         * lang.c (java_init): Handle flag_indirect_classes.
1512         * jvgenmain.c: Use "class$$" instead of "class$".
1513         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1514         DECLs.
1515         (mangle_class_field): Special case "class$$" as well as "class$".
1516         * constants.c (build_ref_from_constant_pool): If
1517         flag_indirect_classes, generate a ref into the heap.
1518         * decl.c (constants_field_decl_node,
1519         constants_data_field_decl_node): New.
1520         * class.c (build_static_class_ref): New.
1521         (build_classdollar_field): Factor out from build_class_ref().
1522         (make_field_value): Handle static fields in heap.
1523         (make_class_data): Make sure we get a static ref to class.
1524         Make class initializer const if flag_indirect_classes.
1525         (register_class): Build a class_ref for initialization if
1526         flag_indirect_classes.
1527         (emit_indirect_register_classes): New.
1528
1529 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1530
1531         * expr.c, gjavah.c: Fix comment typos.
1532
1533 2006-04-03  Andrew Haley  <aph@redhat.com>
1534
1535         PR java/26858
1536         * expr.c (build_field_ref): Don't check the field offset if
1537         flag_syntax_only.
1538
1539 2006-03-30  Andrew Haley  <aph@redhat.com>
1540
1541         PR java/26858
1542         * lang.c (java_attribute_table): New.
1543         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1544         * expr.c (build_field_ref): Add a null pointer check for all
1545         fields of offset > 4k.  Don't do so for accesses via the this
1546         pointer, which we know can never be null.
1547         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1548         methods nonnull.
1549
1550 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1551
1552         * Make-lang.in: Rename docdir to gcc_docdir.
1553
1554 2006-03-30  Tom Tromey  <tromey@redhat.com>
1555
1556         PR java/26042:
1557         * parse.y (java_reorder_fields): Reset superclass field's size as
1558         well.
1559
1560 2006-03-28  Tom Tromey  <tromey@redhat.com>
1561
1562         PR java/26390:
1563         * parse.y (find_most_specific_methods_list): Added 'class'
1564         argument.
1565         (lookup_method_invoke): Updated.
1566
1567 2006-03-15  Tom Tromey  <tromey@redhat.com>
1568
1569         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1570         non-static method calls.
1571
1572 2006-03-15  David Daney  <ddaney@avtrex.com>
1573
1574         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1575         declaration.
1576
1577 2006-03-15  David Daney  <ddaney@avtrex.com>
1578
1579         * lang.opt (-freduced-reflection): New option.
1580         * lang.c (java_post_options): Generate an error if
1581         -freduced-reflection used with -fjni or -findirect-dispatch.
1582         * java-tree.h (flag_reduced_reflection): Declare new variable.
1583         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1584         if bitmap overflows and flag_reduced_reflection set.
1585         * class.c (uses_jv_markobj_p): New function.
1586         (make_class_data): Moved generation of vtable to before
1587         reflection data, generate less reflection data if
1588         flag_reduced_reflection set.
1589         * gcj.texi: Document -freduced-reflection.
1590
1591 2006-03-15  Tom Tromey  <tromey@redhat.com>
1592
1593         PR java/26638:
1594         * class.c (get_interface_method_index): Don't put <clinit> into
1595         interface table.
1596
1597 2006-03-15  Tom Tromey  <tromey@redhat.com>
1598
1599         * parse.y (analyze_clinit_body): Ignore empty statements.
1600
1601 2006-03-08  David Daney  <ddaney@avtrex.com>
1602
1603         * gcj.texi: Document -static-libgcj option.
1604
1605 2006-02-20  Andrew Haley  <aph@redhat.com>
1606
1607         * jcf-parse.c (parse_class_file): Set input_location from
1608         current_class.
1609
1610 2006-02-15  Andrew Haley  <aph@redhat.com>
1611
1612         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1613         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1614         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1615
1616 2006-02-09  Andrew Haley  <aph@redhat.com>
1617
1618         PR java/26192
1619         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1620         in their superclass.
1621
1622         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1623         array types.
1624         
1625 2006-02-08  Tom Tromey  <tromey@redhat.com>
1626
1627         PR java/22578:
1628         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1629         * builtins.c (convert_real): New function.
1630         (java_builtins): Handle Float.intBitsToFloat,
1631         Float.floatToRawIntBits, Double.longBitsToDouble,
1632         Double.doubleToRawLongBits.
1633
1634 2006-02-07  Andrew Haley  <aph@redhat.com>
1635
1636         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1637         class other than the one in which we expected to find it, ignore
1638         the result.
1639
1640         PR java/25535
1641         * constants.c (build_constants_constructor): move initializer into
1642         first halfword on a 64-bit big-endian machine.
1643
1644 2006-02-04  Tom Tromey  <tromey@redhat.com>
1645
1646         PR java/25676:
1647         * builtins.c (max_builtin): Skip floating point 'max'.
1648         (min_builtin): Skip floating point 'min'.
1649         (check_for_builtin): Never return NULL_TREE.
1650
1651 2006-02-04  Tom Tromey  <tromey@redhat.com>
1652
1653         PR java/26097:
1654         * expr.c (push_type): Avoid side effect in gcc_assert.
1655
1656 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1657
1658         * decl.c (java_init_decl_processing): Create char_type_node as a
1659         regular INTEGER_TYPE node.
1660         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1661         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1662         test for char_type_node and promoted_char_type_node as special
1663         instances of INTEGER_TYPE tree codes.
1664         (promote_type,build_java_signature): Likewise.
1665         * jcf-write.c (adjust_typed_op): Likewise.
1666         * mangle.c (mangle_type): Likewise.
1667         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1668         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1669
1670 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1671
1672         * expr.c (java_stack_swap): Revert gcc_assert patch.
1673
1674 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1675
1676         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
1677         * typeck.c: Likewise.
1678         * verify-impl.c: Likewise.
1679         * class.c: Likewise.
1680         * decl.c: Likewise.
1681         * jcf-parse.c: Likewise.
1682         * constants.c: Likewise.
1683         * check-init.c: Likewise.
1684         * jcf-write.c: Likewise.
1685         * verify-glue.c: Likewise.
1686         * mangle.c: Likewise.
1687         * expr.c: Likewise.
1688         * lang.c: Likewise.
1689         * boehm.c: Likewise.
1690
1691 2006-02-01  Jan Hubicka  <jh@suse.cz>
1692
1693         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
1694         * lang.c (java_init_options): Set no_unit_at_a_time_default.
1695
1696 2006-01-30  Andrew Haley  <aph@redhat.com>
1697
1698         PR java/21428
1699         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
1700
1701 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
1702
1703         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
1704         Update copyright notice dates.
1705
1706 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1707
1708         * jvspec.c (lang_specific_spec_functions): Remove.
1709
1710 2006-01-06  Tom Tromey  <tromey@redhat.com>
1711
1712         * gcj.texi (Arrays): Added more documentation for
1713         JvNewObjectArray.
1714         (Primitive types): Correct information about primitive classes.
1715         (Reference types): New node.
1716         (Index): New node.
1717
1718 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
1719
1720         * jcf-parse.c (set_source_filename): Set the decl source location
1721         even when returning early.
1722
1723 2005-12-15  Tom Tromey  <tromey@redhat.com>
1724             Andrew Haley  <aph@redhat.com>
1725
1726         PR java/25429
1727         * parse.y (resolve_expression_name): Don't generate accessor
1728         methods for constant fields.
1729
1730 2005-12-13  Andrew Haley  <aph@redhat.com>
1731
1732         PR java/25366
1733         PR java/25368
1734         * class.c (maybe_layout_super_class): Update current_class before
1735         calling do_resolve_class.
1736
1737 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
1738
1739         PR java/25330
1740         * jcf-write.c (write_classfile): Use PID in temporary class
1741         file. Save/restore errno when reporting error.
1742
1743 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
1744
1745         PR java/9861
1746         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
1747         to bare_function_type and including the return type
1748         * builtins.c (initialize_builtins) : Change builtin mangled name
1749         constants to conform to new mangling scheme
1750
1751 2005-12-08  Andrew Haley  <aph@redhat.com>
1752
1753         PR libgcj/25265
1754         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
1755         (soft_abstractmethod_node): New.
1756         * expr.c (build_field_ref): Add in-line check for missing field.
1757         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
1758
1759 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1760
1761         * Make-lang.in (java.all.build, java.install-normal): Remove.
1762
1763 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1764
1765         * Make-lang.in: Remove all dependencies on s-gtype, except for
1766         gt-java-parse.h.
1767
1768 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
1769
1770         * class.c (build_utf8_ref, emit_register_classes): Use
1771         switch_to_section and get_section.
1772
1773 2005-12-06  Tom Tromey  <tromey@redhat.com>
1774
1775         PR java/25283:
1776         * parse.y (patch_new_array_init): Revert previous patch.
1777         (lookup_method_invoke): Use size-less array type when creating an
1778         anonymous constructor.
1779
1780 2005-12-05  Tom Tromey  <tromey@redhat.com>
1781
1782         * parse.y (patch_new_array_init): Don't set length on array.
1783
1784 2005-12-02  Richard Guenther  <rguenther@suse.de>
1785
1786         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
1787         buildN instead of build.
1788         * class.c (finish_class): Likewise.
1789         * expr.c (java_create_object): Likewise.
1790
1791 2005-11-28  Tom Tromey  <tromey@redhat.com>
1792
1793         PR java/18278:
1794         * expr.c (build_jni_stub): Unwrap the return value.
1795         * java-tree.h (soft_unwrapjni_node): New define.
1796         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
1797         * decl.c (java_init_decl_processing): Initialize
1798         soft_unwrapjni_node.
1799
1800 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
1801
1802         * gcj.texi (gij options): Add -Xss documentation.
1803
1804 2005-11-08  Wil Mahan  <wmahan@gmail.com>
1805
1806         PR java/23617
1807         * zextract.c (read_zip_archive): Fix out of memory error when
1808         reading jar files with zip-style comments.
1809
1810 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
1811
1812         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
1813         formats.
1814         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
1815
1816 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
1817             Wil Mahan <wmahan@gmail.com>
1818
1819         PR java/23620
1820         * class.c (make_class): Create empty binfo here.
1821         (set_super_info): Only create binfo if we have superclasses.
1822
1823 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
1824
1825         PR java/24127
1826         * parse.y (method_header): Make the result of the rule a NULL_TREE
1827         when a parsing error occurs.
1828
1829 2005-09-29  Tom Tromey  <tromey@redhat.com>
1830
1831         PR java/24120:
1832         * jcf-io.c (memoized_dirlist_hash): New function.
1833         (caching_stat): Use it.
1834
1835 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
1836
1837         PR java/21418
1838         * class.c (inherits_from_p): Try to lay out super class
1839         if it is not already laid out.
1840         (maybe_layout_super_class): Handle the case where SUPER_CLASS
1841         is a NULL_TREE.
1842
1843 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
1844
1845         * builtins.c (max_builtin, min_builtin, abs_builtin,
1846         java_build_function_call_expr): Use fold_buildN.
1847         * class.c (layout_class_method): Likewise.
1848         * expr.c (java_truthvalue_conversion, build_java_jsr,
1849         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
1850         build_java_binop, build_field_ref, expand_compare,
1851         build_known_method_ref, build_invokevirtual,
1852         process_jvm_instruction): Likewise.
1853         * parse.y (patch_binop, patch_exit_expr): Likewise.
1854         * typeck.c (convert_ieee_real_to_integer): Likewise.
1855         (convert): Don't call fold after convert_ieee_real_to_integer.
1856
1857 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
1858
1859         PR java/23891
1860         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
1861         the newly created type. Set import lists here, not in create_class.
1862         (jdep_resolve_class): Set current_class.
1863         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
1864         the current package context, not ctxp->package.
1865         (cicp_cache): Removed.
1866         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
1867         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
1868         * java-tree.h (TYPE_PACKAGE): New macro.
1869         (struct lang_type): New member 'package'.
1870
1871 2005-09-09  Andrew Haley  <aph@redhat.com>
1872
1873         PR libgcj/23182 
1874         * expr.c (pop_type_0): If the expected type is object or ptr
1875         (i.e. void*), return the type of the object we just popped from
1876         the stack.
1877
1878 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
1879
1880         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
1881         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
1882
1883 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
1884
1885         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
1886         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
1887         typos.  Follow spelling conventions.
1888
1889 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
1890
1891         PR java/23431
1892         * typeck.c (lookup_do): Look up interfaces for the original class,
1893         not the base class.
1894         * parse.y (java_check_regular_methods): Fix diagnostic message for
1895         more restrictive overriding of a method from an interface.
1896
1897 2005-08-16  Tom Tromey  <tromey@redhat.com>
1898
1899         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
1900         class' initial state.
1901
1902 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1903
1904         PR java/22113
1905         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
1906         `literal_token' for large numeric input tokens.
1907
1908 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
1909
1910         PR java/19870
1911         * parse.y (nested_field_access_p): Rename to nested_member_access_p
1912         and expand to handle method accesses across nested classes.
1913         (build_outer_method_access_method): Rename to
1914         build_nested_method_access_method.  Minor adjustments to comments.
1915         (resolve_expression_name): Use the newly-renamed
1916         nested_member_access_p method.
1917         (resolve_qualified_expression_name): Likewise.
1918         (patch_method_invocation): Also consider static methods for access
1919         method generation.  Minor adjustments to comments.
1920         (maybe_use_access_method): Use the more general
1921         nested_memeber_access_p to determine access across nested class
1922         boundaries.  Allow THIS_ARG to be NULL (for static methods).
1923
1924 2005-08-15  Tom Tromey  <tromey@redhat.com>
1925
1926         PR java/23300.
1927         * expr.c (build_field_ref): Don't generate otable reference when
1928         DECL_FIELD_OFFSET is 0.
1929         * class.c (maybe_layout_super_class): Pass outer class to
1930         do_resolve_class.
1931
1932 2005-08-15  Tom Tromey  <tromey@redhat.com>
1933
1934         * java-tree.h (LABEL_IN_SUBR): Removed.
1935         (LABEL_IN_SUBR): Likewise.
1936         (LABEL_IS_SUBR_START): Likewise.
1937         (LABEL_SUBR_START): Likewise.
1938         (LABEL_SUBR_CONTEXT): Likewise.
1939         (LABEL_CHANGED): Likewise.
1940         (LABEL_RETURN_LABEL): Likewise.
1941         (LABEL_RETURN_TYPE_STATE): Likewise.
1942         (LABEL_RETURN_LABELS): Likewise.
1943         (RETURN_MAP_ADJUSTED): Likewise.
1944         (LABEL_PENDING_CHAIN): Likewise.
1945
1946 2005-08-15  Tom Tromey  <tromey@redhat.com>
1947
1948         * Make-lang.in (JAVA_OBJS): Removed verify.o
1949         (java/verify.o): Removed.
1950         * verify.c: Removed.
1951         * lang.c (flag_new_verifier): Removed.
1952         (java_post_options): Updated.
1953         * java-tree.h (flag_new_verifier): Removed.
1954         (verify_jvm_instructions): Removed.
1955         * expr.c (pop_type_0): Assume flag_new_verifier is true.
1956         (build_java_check_indexed_type): Likewise.
1957         (expand_java_arraystore): Likewise.
1958         (expand_java_arrayload): Likewise.
1959         (pop_arguments): Likewise.
1960         (expand_byte_code): Likewise.
1961         (process_jvm_instruction): Likewise.
1962
1963 2005-08-10  Andrew Haley  <aph@redhat.com>
1964
1965         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
1966         type mismatches to make legal GIMPLE.
1967
1968 2005-08-10  Robin Green <greenrd@greenrd.org>
1969
1970         PR java/23230:
1971         * parse.y (maybe_use_access_method): Generalize check from
1972         java.lang.Object to any superclass of current_class
1973
1974 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
1975
1976         * class.c (build_class_ref): Wrap the primary class type in a
1977         NOP_EXPR.
1978         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
1979         primary class type from the NOP_EXPR in which it was placed.
1980
1981 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
1982
1983         * expr.c (expand_load_internal): Fix missing parens in
1984         predicate.
1985
1986 2005-07-28  Andrew Haley  <aph@redhat.com>
1987
1988         * expr.c (expand_load_internal): Convert to destination type.
1989
1990 2005-07-22  Manfred Hollstein  <mh@suse.com>
1991
1992         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
1993         (check_constant): Likewise.
1994         (check_wide_constant): Likewise.
1995
1996 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
1997
1998         Make CONSTRUCTOR use VEC to store initializers.
1999         * check-init.c (check_init): Update to cope with VEC in
2000         CONSTRUCTOR_ELTS.
2001         * class.c (make_field_value, make_method_value, get_dispatch_table,
2002         make_class_data, emit_symbol_table, emit_catch_table,
2003         emit_assertion_table): Use build_constructor_from_list instead of
2004         build_constructor.
2005         * constants.c (build_constants_constructor): Likewise.
2006         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2007         VEC in CONSTRUCTOR_ELTS.
2008         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2009         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2010         of a TREE_LIST.
2011         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2012         CONSTRUCTOR_ELTS.
2013         * parse.y (build_new_array_init): Use build_constructor_from_list
2014         instead of build_constructor.
2015         (patch_new_array_init): Update to cope with VEC in
2016         CONSTRUCTOR_ELTS.
2017         (array_constructor_check_entry): Likewise.
2018
2019 2005-07-12  Tom Tromey  <tromey@redhat.com>
2020
2021         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2022         command line.
2023
2024 2005-07-12  Tom Tromey  <tromey@redhat.com>
2025
2026         PR java/19674:
2027         * parse-scan.y (interface_member_declaration): Added
2028         empty_statement.
2029
2030 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2031         
2032         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2033         (LABEL_PENDING_CHAIN): Ditto.
2034         (LABEL_PC): Ditto.
2035         (DECL_BIT_INDEX): Ditto.        
2036
2037 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2038
2039         PR java/18119
2040         * parse.y (inner_class_accessible): New function. Logic moved from
2041         check_inner_class_access.
2042         (check_inner_class_access): Use inner_class_accessible.
2043         (resolve_inner_class): Simplify arguments. Create circularity hash
2044         here. Keep looking for classes if we found one that was inaccessible. 
2045         Return the inaccessible class only if there is no other match.
2046         (do_resolve_class): Update for new resolve_inner_class arguments.
2047         Don't create circularity_hash here.
2048
2049 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2050
2051         PR java/21045
2052         * parse.y (add_exception_to_throws): New function.
2053         (purge_unchecked_exceptions): Removed.
2054         (get_constructor_super): Renamed from verify_constructor_super. Now
2055         returns the super constructor after verification.
2056         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2057         or save/restore the exception list.
2058         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2059         class initializers and constructors to the throws clause of the method. 
2060
2061 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2062
2063         PR java/19674
2064         * parse.y (interface_member_declaration): Allow empty statements in
2065         interface declarations.
2066
2067 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2068
2069         * Makefile.in (parse.o): Adjust dependencies.
2070         * parse.y: Include tree-dump.h.
2071
2072 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2073
2074         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2075         flag for quoting.
2076
2077 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2078
2079         * parse.y (issue_warning_error_from_context): Call
2080         pp_output_formatted_text to be able to get the buffer.
2081
2082 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2083
2084         * parse.y (issue_warning_error_from_context): Update for the
2085         renaming of pp_format_text to pp_format.
2086
2087 2005-06-28  Paul Brook  <paul@codesourcery.com>
2088
2089         * decl.c (java_init_decl_processing): Call
2090         default_init_unwind_resume_libfunc.
2091
2092 2005-06-27  Tom Tromey  <tromey@redhat.com>
2093
2094         PR java/21540, PR java/13788:
2095         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2096         fold_constant_for_init.
2097         (patch_binop): Added 'folding' argument.  Updated all callers.
2098         (patch_unaryop) <NOP_EXPR>: New case.
2099         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2100         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2101
2102 2005-06-25  Jan Hubicka  <jh@suse.cz>
2103
2104         * builtins.c (define_builtin): Accept new flags parameter.
2105         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2106
2107 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2108
2109         * all files: Update FSF address in copyright headers.
2110
2111 2005-06-24  Tom Tromey  <tromey@redhat.com>
2112
2113         * verify-impl.c (verify_instructions_0): Correctly handle
2114         situation where PC falls off end.
2115
2116 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2117
2118         PR java/20697
2119         * parse.y (find_most_specific_methods_list): Remove special case for
2120         inner classes.
2121
2122 2005-06-15  Tom Tromey  <tromey@redhat.com>
2123
2124         PR libgcj/21906:
2125         * class.c (make_method_value): Use soft_abstractmethod_node for
2126         abstract method.
2127         * java-tree.h (soft_abstractmethod_node): New define.
2128         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2129         * decl.c (java_init_decl_processing): Initialize
2130         soft_abstractmethod_node.
2131
2132 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2133
2134         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2135
2136 2005-06-13  Per Bothner  <per@bothner.com>
2137
2138         * expr.c (int highest_label_pc_this_method,
2139         start_label_pc_this_method): New globals.
2140         (lookup_label): Add start_label_pc_this_method to pc for label, and
2141         update highest_label_pc_this_method.  This prevents conflicts between
2142         labels from different methods.
2143         * java-tree.h: Declare new globals.
2144         * jcf-parse.c (parse_class_file): If needed bump
2145         start_label_pc_this_method and reset highest_label_pc_this_method.
2146
2147 2005-06-13  Tom Tromey  <tromey@redhat.com>
2148
2149         PR java/21844:
2150         * parse.y (nested_field_access_p): Handle case where outer field
2151         is inherited by enclosing class.
2152
2153 2005-06-12  Per Bothner  <per@bothner.com>
2154
2155         * class.c (inherits_from_p): Do load_class if needed.
2156
2157 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2158
2159         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2160         * java-tree.h (parse_error_context): Move...
2161         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2162         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2163         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2164
2165 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2166
2167         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2168
2169 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2170
2171         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2172         msgid for argument name.
2173         * gjavah.c (error): Likewise.
2174         * java-tree.h (parse_error_context): Likewise.
2175         * parse.y (parse_error_context, parse_warning_context,
2176         issue_warning_error_from_context): Likewise.
2177
2178 2005-06-01  Tom Tromey  <tromey@redhat.com>
2179
2180         PR java/21722:
2181         * class.c (build_static_field_ref): Don't fold constant fields if
2182         current class is from a .class file and we're using indirect
2183         dispatch.
2184
2185 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2186
2187         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2188         * java/Make-lang.in: Updates dependencies.
2189
2190 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2191
2192         PR java/19870.
2193         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2194         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2195         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2196         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2197         * jcf-write.c (generate_classfile): Use
2198         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2199         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2200         * parse.y (build_outer_field_access): Rename to
2201         build_nested_field_access. Support static fields and outer-to-inner
2202         class accesses.
2203         (outer_field_access_p): Rename to nested_field_access_p. Support
2204         static fields and generalise to outer-to-inner class and sibling
2205         inner class accesses.
2206         (outer_field_expanded_access_p): Rename to
2207         nested_field_expanded_access_p and support static fields.
2208         (outer_field_access_fix): Rename to nested_field_access_fix and
2209         support static fields.
2210         (build_outer_field_access_expr): Rename to
2211         build_nested_field_access_expr and support static fields.
2212         (build_outer_field_access_methods): Rename to
2213         build_nested_field_access_methods and support static fields. For
2214         static fields, generate accessors without class instance parameters.
2215         (build_outer_field_access_method): Rename to
2216         build_nested_field_access_method and support static fields.
2217         (build_outer_method_access_method): Use
2218         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2219         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2220         (resolve_expression_name): Consider static field accesses across
2221         nested classes.
2222         (resolve_qualified_expression_name): Likewise.
2223         (java_complete_lhs): Use nested_field_access_fix instead of
2224         outer_field_access_fix.
2225         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2226         Use nested_field_expanded_access_p instead of
2227         outer_field_expanded_access_p. Use nested_field_access_fix instead
2228         of outer_field_access_fix.
2229         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2230         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2231
2232 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2233
2234         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2235         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2236         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2237         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2238         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2239         (parse_version): Calculate version ID using new method. Use bit-flags
2240         for flag_indirect_dispatch and flag_bootstrap_classes.
2241
2242 2005-05-25  Richard Henderson  <rth@redhat.com>
2243
2244         PR libgcj/21692
2245         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2246         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2247         DECL_CONTEXT; avoid pushdecl_top_level.
2248         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2249         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2250         (layout_class_method): Likewise.
2251         * decl.c (java_mark_cni_decl_local): New.
2252         (java_mark_class_local): Use it.
2253         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2254         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2255         (struct lang_decl_func): Add local_cni;
2256         (struct lang_decl_var): Add class_field, vtable.
2257         (java_mangle_decl): Declare.
2258         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2259         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2260         (mangle_obstack_1): New.
2261         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2262         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2263         lhd_set_decl_assembler_name for things that don't need mangling.
2264         (mangle_class_field): Rename from java_mangle_class_field, make
2265         static, don't call init_mangling or finish_mangling.
2266         (mangle_vtable): Similarly.
2267         (mangle_local_cni_method_decl): New.
2268         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2269         gcc_assert, and MANGLE_RAW_STRING.
2270         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2271
2272 2005-05-25  DJ Delorie  <dj@redhat.com>
2273
2274         * class.c (set_constant_value): Move warning control from if() to
2275         warning(OPT_*).
2276
2277 2005-05-24  Richard Henderson  <rth@redhat.com>
2278
2279         * builtins.c (define_builtin): Don't call make_decl_rtl.
2280         * constants.c (build_constant_data_ref): Likewise.
2281         * class.c (build_utf8_ref): Likewise.
2282         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2283         (get_dispatch_table, layout_class_method): Likewise.
2284         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2285         by hand.
2286         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2287         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2288         to determine if we need a non-zero address.
2289         * decl.c (builtin_function): Don't call make_decl_rtl.
2290         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2291         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2292         * resource.c (compile_resource_data): Likewise.
2293         * parse.y (resolve_field_access): Re-word comment to avoid
2294         building DECL_RTL.
2295
2296 2005-05-24  Richard Henderson  <rth@redhat.com>
2297
2298         * class.c (registered_class): Take it out of class_roots; turn into
2299         a vec of trees.
2300         (register_class): Make static.  Don't duplicate decl node.  Use
2301         VEC_safe_push.
2302         (emit_register_classes): Use VEC_iterate.  Use output_constant
2303         instead of assemble_integer.  Don't call mark_decl_referenced
2304         directly.
2305         * java-tree.h (register_class): Remove decl.
2306
2307 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2308
2309         PR java/17845
2310
2311         * parse.y (register_package, package_list): Remove.
2312         (package_declaration): Do not call register_package.
2313         (do_resolve_class): Do not use package_list.
2314
2315 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2316
2317         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2318         unused variable.
2319
2320 2005-05-15  Tom Tromey  <tromey@redhat.com>
2321
2322         PR java/21519:
2323         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2324         NOTE_PUSH.
2325
2326 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2327
2328         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2329
2330 2005-05-11  Tom Tromey  <tromey@redhat.com>
2331
2332         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2333         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2334         (parse_version): Use it.
2335         * lang.opt (-fbootstrap-classes): New option.
2336
2337 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2338
2339         PR java/21436
2340         * class.c (maybe_layout_super_class): Look for imports in this_class.
2341         * parse.h (ctxp_for_generation_last): New.
2342         (do_resolve_class): Add a parameter.
2343         * parse.y (ctxp_for_generation_last): New.
2344         (java_pop_parser_context): Add at end of list.
2345         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2346         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2347         the given type are NULL.
2348         (do_resolve_class): Look into the imports of the new second parameter.
2349         Adjust recursive calls.
2350         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2351         calls to do_resolve_class.
2352         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2353         (java_complete_class): Do not do that here.
2354
2355 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2356
2357         PR java/20309
2358         * Make-lang.in (java): Add gjnih.
2359         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2360         (GJNIH_OBJS): New variable.
2361         (gjnih$(exeext)): New target.
2362         (JAVA_MANFILES): Add gjnih.1.
2363         (java.uninstall): Add gjnih.1.
2364         (java.mostlyclean): Add gjnih.
2365         (java.maintainer-clean): Add gjnih.1.
2366         (java/gjavah-jni.o): New target.
2367         (.INTERMEDIATE): Add gjnih.pod.
2368         (gjnih.pod): New target.
2369         * config-lang.in (stagestuff): Add gjnih.
2370         * gcj.texi (Top): Add gjnih node.
2371         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2372         -bootclasspath options.
2373         (Invoking gjnih): New node.
2374         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2375         (TOOLNAME): New macro.
2376         (error): Replace hard-coded gcjh with TOOLNAME.
2377         (process_file): Likewise.
2378         (usage): Likewise.
2379         (version): Likewise.
2380         (help): Likewise.  Add help output for -force, -old, -trace and -J
2381         options.
2382         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2383         (options): Add force, old, trace and J fields.
2384         (main): Handle -force, -old, -trace and -J options.
2385
2386 2005-05-03  Tom Tromey  <tromey@redhat.com>
2387
2388         PR java/21245:
2389         * gjavah.c (main): Unlink output file on error.
2390
2391 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2392
2393         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2394         copyright.
2395
2396 2005-04-29  Tom Tromey  <tromey@redhat.com>
2397
2398         * expr.c (build_jni_stub): Updated for change to build_block.
2399
2400 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2401
2402         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2403
2404 2005-04-28  Andrew Haley  <aph@redhat.com>
2405
2406         PR java/19285
2407         * java-tree.h (soft_resolvepoolentry_node): New.
2408         (alloc_constant_fieldref): Declare.
2409         * expr.c (expand_java_field_op): Don't call class_init for
2410         accesses to static fields with indirect dispatch.
2411         * builtins.c (initialize_builtins): Add "__builtin_expect".
2412         * decl.c (soft_resolvepoolentry_node): New variable.
2413         (java_init_decl_processing): Create a decl for
2414         "_Jv_ResolvePoolEntry".
2415         * class.c (build_fieldref_cache_entry): New function.
2416         (build_static_field_ref): Rewrite for indirect dispatch.
2417         * constants.c (find_name_and_type_constant_tree): New function.
2418         (alloc_constant_fieldref): Likewise.
2419         (build_constants_constructor): Handle CONSTANT_Fieldref and
2420         CONSTANT_NameAndType.
2421
2422         PR java/21115
2423         * expr.c (force_evaluation_order): Convert outgoing args smaller
2424         than integer.
2425
2426 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2427
2428         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2429         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2430         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2431
2432 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2433
2434         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2435         to `unlock_stream' with `unlock_std_streams'.
2436
2437 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2438
2439         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2440         instead of just expr.h.
2441
2442 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2443
2444         * gjavah.c (main): Unlock the stdio streams.
2445         * jcf-dump.c (main): Likewise.
2446         * jv-scan.c (main): Likewise.
2447         * jvgenmain.c (main): Likewise.
2448
2449 2005-04-23  DJ Delorie  <dj@redhat.com>
2450
2451         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2452         parse.y: Adjust warning() callers.
2453
2454 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2455
2456         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2457         contructor.
2458
2459 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2460
2461         * gcj.texi: Fix typos and bogus example.
2462
2463 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2464
2465         * except.c: Fix a comment typo.
2466
2467 2005-04-19  Julian Brown  <julian@codesourcery.com>
2468
2469         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2470         indirect dispatch with PIC.
2471
2472 2005-04-18  Andrew Haley  <aph@redhat.com>
2473
2474         * java-except.h (struct eh_range.handler): Remove unused field.
2475         (handle_nested_ranges): Remove function declaration.
2476         (sanity_check_exception_range): Add function declaration.       
2477         * verify.c (verify_jvm_instructions): Remove call to
2478         handle_nested_ranges.
2479         * verify-glue.c (verify_jvm_instructions_new): Call
2480         sanity_check_exception_range.
2481         * except.c (link_handler, eh_range_freelist, link_handler,
2482         handle_nested_ranges): Remove.
2483         (add_handler): Rewrite.
2484         (sanity_check_exception_range): New function.
2485         (print_ranges): New function.
2486
2487 2005-04-13  Julian Brown  <julian@codesourcery.com>
2488
2489         * decl.c (finish_method): Give methods once-only linkage.
2490
2491 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2492
2493         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2494
2495 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2496
2497         * java-tree.h: Don't use PARAMS().
2498
2499 2005-04-07  Per Bothner  <per@bothner.com>
2500
2501         * class.c (push_class): By default, suppress debug output.
2502         (finish_class): Enable debug output for classes we're emitting.
2503
2504 2005-04-07  Andrew Haley  <aph@redhat.com>
2505
2506         * gcj.texi: Correct gcj-dbtool instructions.
2507
2508 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2509
2510         * gcj.texi: Fix a typo.
2511         * lang.c: Fix a comment typo.
2512
2513 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2514
2515         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2516         Mention recognized-and-ignored compatibility options.
2517         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2518         JvFree.
2519         (About CNI): Add Memory allocation section.
2520
2521 2005-04-01  Tom Tromey  <tromey@redhat.com>
2522
2523         * decl.c (java_init_decl_processing): Fix types of
2524         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2525         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2526         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2527
2528 2005-03-31  Jan Hubicka  <jh@suse.cz>
2529
2530         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2531         * class.c: Include cgraph.h
2532         (make_local_functoin_alias): Mark aslias as needed.
2533         * resource.c: Include cgraph.h
2534         (compile_resource_data): Go via cgraph interface.
2535
2536 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2537
2538         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2539
2540 2005-03-30  Tom Tromey  <tromey@redhat.com>
2541
2542         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2543         inner_class_info_index==0 or outer_class_info_index==0.
2544
2545 2005-03-29  Tom Tromey  <tromey@redhat.com>
2546
2547         * gcj.texi (libgcj Runtime Properties): Document
2548         gnu.gcj.runtime.endorsed.dirs.
2549
2550 2005-03-24  Anthony Green  <green@redhat.com>
2551
2552         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2553         'gcj-dbtool -p'.
2554
2555 2005-03-23  Tom Tromey  <tromey@redhat.com>
2556
2557         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2558         (parse_version): Use it.
2559
2560 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2561
2562         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2563
2564 2005-03-18  Andrew Haley  <aph@redhat.com>
2565
2566         PR java/20522
2567         * decl.c (update_aliases): Don't update variables that are about
2568         to die.
2569         (maybe_poplevels): Add comment.
2570
2571 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2572
2573         PR java/20502
2574         * jcf-parse.c (duplicate_class_warning): New function.
2575         (java_parse_file): Call duplicate_class_warning if 
2576         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2577         (parse_zip_file_entries): Likewise. Also set
2578         CLASS_FROM_CURRENTLY_COMPILED_P.
2579
2580 2005-03-16  Andrew Haley  <aph@redhat.com>
2581
2582         * expr.c (expand_java_arrayload): Don't generate a
2583         NullPointerException based on the type of the node.
2584         (build_java_array_length_access): Likewise.
2585
2586 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2587
2588         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2589
2590 2005-03-11  Tom Tromey  <tromey@redhat.com>
2591
2592         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2593         (libgcj Runtime Properties): Document the default .db.
2594
2595 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2596
2597         PR java/20312
2598         * parse.y (checks_throws_clauses): Check exceptions list even when
2599         the base class does not come from a source file being compiled.
2600         (java_complete_lhs): Remove unused variable 'wfl'.
2601
2602 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2603
2604         PR java/20338
2605         * decl.c (finish_method): Emit _Jv_InitClass for private static
2606         methods inside inner classes as well.
2607
2608 2005-03-08  Julian Brown  <julian@codesourcery.com>
2609         * Revert patch from 2005-03-08 for causing bootstrap failure on
2610         ppc-darwin.
2611
2612 2005-03-08  Julian Brown  <julian@codesourcery.com>
2613
2614         * decl.c (finish_method): Give methods once-only linkage.
2615
2616 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2617
2618         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2619
2620 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2621
2622         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2623         can_widen_reference_to if the C++ ABI is in use.
2624         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2625         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2626         type_isresolved, init_state, set_pc, state_get_pc,
2627         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2628         (verify_fail): Report the current PC from the verifier context.
2629         (free_state): Remove #if 0 block to enable this function.
2630         (free_verifier_context): Call free_state on state_list iterator
2631         values before freeing them.
2632         * expr.c (pop_type_0): Pop correct type for error message when stack
2633         contains a multi-word type.
2634
2635 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2636
2637         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2638         for known NULL array length access.
2639
2640 2005-03-07  Tom Tromey  <tromey@redhat.com>
2641
2642         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2643
2644 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2645
2646         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2647         typeck.c: Update copyright.
2648
2649 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2650
2651         Remove xref code.
2652         * xref.c, xref.h: Remove file.
2653         * Make-lang.in (java/xref.o): Remove.
2654         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2655         * lang.c (flag_emit_xref): Remove definition.
2656         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2657         * typeck.c (convert): Remove use of do_not_fold.
2658         * parse.y (do_not_fold): Remove definition.
2659         (parser grammar): Remove xref code.
2660         (maybe_create_class_interface_decl, create_class): Likewise.
2661         (register_fields, method_header, finish_method_declaration): Likewise.
2662         (declare_local_variables, source_end_java_method): Likewise.
2663         (java_complete_expand_classes): Do not set do_not_fold.
2664         (java_complete_expand_method): Remove xref code.
2665         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2666         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2667         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2668         (patch_synchronized_statement, patch_throw_statement): Likewise.
2669         (maybe_build_class_init_for_field): Likewise.
2670
2671 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2672
2673         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2674         instead of IS_NON_TYPE_CODE_CLASS.
2675
2676 2005-03-04  Andrew Haley  <aph@redhat.com>
2677
2678         PR java/18362
2679         * class.c (set_method_index): Don't set method_index if it is
2680         NULL_TREE.
2681         (layout_class_method): Don't complain about "non-static method foo
2682         overrides static method" in the case of indirect dispatch.
2683
2684 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2685
2686         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
2687         warning.
2688         * Make-lang.in: Don't elide warnings in jcf-io.c.
2689
2690 2005-03-01  Per Bothner  <per@bothner.com>
2691
2692         PR java/8608
2693         * check-init.c (wfl): Remove static.
2694         (final_assign_error, check_init): Replace calls to parse_error_context
2695         by plain error.
2696         (check_init): Save, set, and restore input_location for each exp.
2697
2698 2005-03-01  Per Bothner  <per@bothner.com>
2699
2700         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
2701         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
2702         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
2703
2704 2005-03-01  Per Bothner  <per@bothner.com>
2705
2706         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
2707
2708 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
2709
2710         PR libgcj/16923
2711         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
2712         JvVMOption.
2713
2714 2005-02-22  Tom Tromey  <tromey@redhat.com>
2715
2716         PR java/20056:
2717         * verify-impl.c (EITHER): New define.
2718         (types_compatible): Handle it.
2719         (check_field_constant): Use it.
2720
2721 2005-02-18  Tom Tromey  <tromey@redhat.com>
2722
2723         PR java/20056:
2724         * verify-impl.c (types_equal): Fixed test.
2725
2726         PR java/20056:
2727         * verify-glue.c (vfy_class_has_field): New function.
2728         * verify.h (vfy_class_has_field): Declare.
2729         * verify-impl.c (check_field_constant): Added 'putfield'
2730         argument.
2731         (verify_instructions_0): Updated.
2732         (types_equal): New function.
2733
2734 2005-02-14  Tom Tromey  <tromey@redhat.com>
2735
2736         PR java/19921:
2737         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
2738         stack effect of multianewarray.
2739
2740 2005-02-14  Andrew Haley  <aph@redhat.com>
2741
2742         PR java/19907
2743         * expr.c (expand_byte_code): Call promote_arguments().
2744         (promote_arguments): New function.
2745         * decl.c (check_local_unnamed_variable): Remove special case for
2746         new verifier.
2747         (find_local_variable): Promote all boolean types to int
2748         when searching for local variable decls.
2749
2750 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
2751
2752         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
2753         parse-scan.y: Update copyright.
2754
2755 2005-02-11  Per Bothner  <per@bothner.com>
2756
2757         PR java/15543
2758         * parse-scan.y (input_location): Remove variable.
2759         (main_input_filename): New - replaces input_filename, which isn't
2760         settable if USE_MAPPED_LOCATION.
2761         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
2762         so we don't reference input_location or wfl_operator in that case.
2763         * jv-scan.c (expand_location): Remove - no longer used.
2764         (main): Set main_input_filename rather than input_filename.
2765
2766 2005-02-09  Richard Henderson  <rth@redhat.com>
2767
2768         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
2769         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
2770
2771 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
2772
2773         * expr.c (add_type_assertion): Use the proper enumeration type,
2774         since this is what htab_find_slot() is expecting.
2775
2776 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
2777
2778         * gcj.texi: Update copyright dates.
2779
2780 2005-02-02  Tom Tromey  <tromey@redhat.com>
2781
2782         * gcj.texi (libgcj Runtime Properties): Default library_control
2783         to 'cache'.
2784
2785 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
2786
2787         PR java/15543
2788         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
2789         (modifiers) when square brackets are present in a declaration for
2790         a final paramter.
2791         * jv-scan.c (main): Set input_filename and input_line.
2792
2793 2005-02-01  Tom Tromey  <tromey@redhat.com>
2794
2795         PR java/19742:
2796         * gjavah.c (get_field_name): Don't override name for JNI header.
2797
2798 2005-02-01  Roger Sayle  <roger@eyesopen.com>
2799
2800         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
2801         of unsigned types using iushr and lushr JVM bytecodes.
2802
2803 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2804
2805         PR java/19738
2806         * gjavah.c (jni_print_float): Do not emit floating-point
2807         initialiser for a static final field.
2808         (jni_print_double): Likewise.
2809
2810 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
2811
2812         Revert:
2813         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2814         * gjavah.c (print_field_info): Mark static data members of
2815         floating-point type with "__extension__".
2816
2817 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
2818
2819         * gjavah.c (print_field_info): Mark static data members of
2820         floating-point type with "__extension__".
2821
2822 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
2823
2824         PR java/9157
2825         * parse.y (build_string_concatenation): Remove redundant if.
2826         (patch_conditional_expr): Attempt to patch_string() the condition
2827         of a ?: as well, in addition to its other operands.
2828
2829 2005-01-25  Tom Tromey  <tromey@redhat.com>
2830
2831         * Make-lang.in (java/java-tree-inline.o): Removed.
2832
2833 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
2834
2835         PR java/19070
2836         * parse.y (patch_binop): Allow comparisons against NULL only
2837         if the other operand is of a reference type.
2838
2839 2005-01-24  Tom Tromey  <tromey@redhat.com>
2840
2841         * java-tree.h (gcj_abi_version): Declare.
2842         * class.c (make_class_data): Push gcj_abi_version into "next"
2843         field.  Renamed field.
2844         * decl.c (gcj_abi_version): New global.
2845         (parse_version): New function.
2846         (java_init_decl_processing): Call it.  Renamed 'next' field.
2847         Include version.h.
2848         (GCJ_BINARYCOMPAT_ADDITION): New define.
2849
2850 2005-01-24  Roger Sayle  <roger@eyesopen.com>
2851
2852         PR java/19295
2853         * jcf-write.c (generate_bytecode_insns): Conversions between
2854         integer types of the same precision shouldn't generate widening
2855         or narrowing conversion bytecodes.
2856
2857 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
2858
2859         * java-except.h, java-tree.h: Remove unused prototypes.
2860
2861 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
2862
2863         PR java/18091:
2864         * jcf-write.c (perform_relocations): Don't call memcpy if source
2865         and destination are the same.
2866
2867 2005-01-17  Tom Tromey  <tromey@redhat.com>
2868
2869         * verify-impl.c (get_short): Sign extend.
2870         (get_int): Likewise.
2871
2872 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
2873
2874         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
2875         with TYPE_SIZE.
2876
2877 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2878
2879         * verify.c: Revert to the version before the BC-ABI merge.
2880
2881 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
2882
2883         PR java/19277
2884         * check-init.c (check_init): Take care of references that do not
2885         have an explicit final variable declaration (e.g. array length
2886         access) for pre/post in/de-crement operators.
2887
2888 2005-01-08  Mark Wielaard  <mark@klomp.org>
2889
2890         * parse.y (process_imports): Allocate (and free) original_name only
2891         when not already defined.
2892         * jcf-parse.c (read_class): Free results of find_class() and
2893         lrealpath().
2894         (java_parse_file): Keep pointer to head of file_list and free when
2895         done. Free result of lrealpath().
2896
2897 2005-01-05  Tom Tromey  <tromey@redhat.com>
2898
2899         * gcj.texi (Standard Properties): java.ext.dirs is now used.
2900
2901 2004-12-20  Andrew Haley  <aph@redhat.com>
2902
2903         * typeck.c: Use fold_convert for ints and booleans.
2904
2905 2004-12-17  Andrew Haley  <aph@redhat.com>
2906
2907         PR java/18931
2908         * typeck.c (convert): Use a CONVERT_EXPR when converting to
2909         BOOLEAN_TYPE or CHAR_TYPE.
2910         (convert_to_boolean, convert_to_char) : Remove.
2911         * convert.h (convert_to_boolean, convert_to_char) : Remove.
2912         * expr.c (expand_load_internal): Do type conversion if type is not
2913         as required.
2914
2915 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
2916
2917         PR target/18459
2918         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
2919         Update comment.
2920
2921 2004-12-07  Andrew Haley  <aph@redhat.com>
2922
2923         PR java/18811:
2924         * jcf-parse.c (load_class): Remove sanity test for missing inner
2925         class file.
2926
2927 2004-12-06  Tom Tromey  <tromey@redhat.com>
2928
2929         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
2930         (java.uninstall): Likewise.
2931         (java.maintainer-clean): Likewise.
2932         (.INTERMEDIATE): Likewise.
2933         (java.install-man): Likewise.
2934         (gcj-dbtool.pod): New target.
2935         * gcj.texi (Code Generation): Document -findirect-dispatch.
2936         (libgcj Runtime Properties): Document
2937         gnu.gcj.precompiled.db.path.
2938         (Top): Link to "Invoking gcj-dbtool".
2939
2940 2004-12-06  Tom Tromey  <tromey@redhat.com>
2941
2942         PR java/14853:
2943         * java-tree.h (extract_field_decl): Declare.
2944         * parse.y (extract_field_decl): Renamed from
2945         strip_out_static_field_access_decl.  No longer static.
2946         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
2947
2948 2004-12-03  Tom Tromey  <tromey@redhat.com>
2949
2950         * lang.c (flag_new_verifier): Define.
2951         (java_post_options): Set flag_new_verifier if indirect dispatch
2952         is being used.
2953         * lang.opt (fnew-verifier): Removed.
2954
2955 2004-12-03  Tom Tromey  <tromey@redhat.com>
2956
2957         PR bootstrap/14614:
2958         * Make-lang.in (java.install-common): Only install transformed
2959         gcjh if gcj-cross exists.
2960
2961 2004-12-03  Andrew Haley  <aph@redhat.com>
2962
2963         PR java/18812
2964         * except.c (link_handler): Patch 'outer' field of siblings of the
2965         range we're demoting.
2966
2967 2004-12-03  Andrew Haley  <aph@redhat.com>
2968
2969         PR java/18697
2970         * class.c (layout_class_method): Don't fail to override a method
2971         simply because it has DECL_ARTIFICIAL set.
2972
2973 2004-12-02  Tom Tromey  <tromey@redhat.com>
2974
2975         PR java/16675:
2976         * parse.y (craft_constructor): Special case null_pointer_node.
2977
2978 2004-12-02  Tom Tromey  <tromey@redhat.com>
2979
2980         PR java/18741:
2981         * java-gimplify.c (java_gimplify_expr): Don't call
2982         SET_EXPR_LOCATION unless wrapped tree is an expression.
2983
2984 2004-11-27  Per Bothner  <per@bothner.com>
2985
2986         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
2987         Fix fencepost error in 'i', which got executed one too many times.
2988         Also, fold memcpy into explicit loop, as originally intended.
2989         Also, free temporary 'buf' which otherwise leaks.
2990
2991 2004-11-27  Per Bothner  <per@bothner.com>
2992
2993         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
2994         local static variables if not USE_MAPPED_LOCATION.
2995
2996 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
2997
2998         * class.c, decl.c, expr.c: Fix comment typos.
2999
3000 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3001
3002         PR java/18305
3003         * decl.c (end_java_method): Call
3004         attach_init_test_initialization_flags on all the init_decls.
3005         * parse.y (attach_init_test_initialization_flags): Move to ...
3006         * expr.c (attach_init_test_initialization_flags): here and
3007         support BIND_EXPR also.
3008         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3009         * jcf-parse.c (parse_class_file): Don't disable class init
3010         optimization.
3011
3012 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3013
3014         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3015         in diagnostics.
3016
3017 2004-11-24  Richard Henderson  <rth@redhat.com>
3018
3019         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3020         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3021
3022 2004-11-24  Tom Tromey  <tromey@redhat.com>
3023
3024         * verify.c (defer_merging): Don't use C++-style comment.
3025         * verify.h (java_opcode): Added java_opcode_end.
3026         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3027
3028         * verify-impl.c (vfy_push_type): Removed bogus "return".
3029         (initialize_stack): Use vfy_alloc and vfy_free.
3030         (verify_instructions_0): Likewise.
3031
3032         * Merged gcj-abi-2-dev-branch to trunk.
3033
3034 2004-11-24  Andrew Haley  <aph@redhat.com>
3035
3036         * jcf-parse.c (parse_class_file): Set file_start_location.
3037
3038 2004-11-10  Tom Tromey  <tromey@redhat.com>
3039
3040         * class.c (make_field_value): Don't call build_static_field_ref.
3041         (build_static_field_ref): Don't emit direct references when using
3042         indirect dispatch.
3043
3044         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3045         -verbose:class into man page synopsis.
3046
3047 2004-11-09  Tom Tromey  <tromey@redhat.com>
3048
3049         * expr.c (build_java_arraystore_check): Still generate check if
3050         element type is itself an array.
3051
3052 2004-11-08  Tom Tromey  <tromey@redhat.com>
3053
3054         * java-tree.h (soft_check_assignment_node): Removed.
3055         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3056         * decl.c (java_init_decl_processing): Don't initialize
3057         soft_check_assignment_node.
3058
3059 2004-11-05  Tom Tromey  <tromey@redhat.com>
3060
3061         * class.c (layout_class_methods): Don't add Miranda methods when
3062         using indirect dispatch.
3063
3064 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3065
3066         * class.c (make_class_data): Call emit_assertion_table to set the
3067         'assertion_table' field.
3068         (build_signature_for_libgcj): Move here from expr.c.
3069         (add_assertion_table_entry): New function. Callback for assertion
3070         hashtable traversal.
3071         (emit_assertion_table): New. Take class argument, and generate
3072         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3073         * decl.c (init_decl_processing): Define assertion_entry_type record.
3074         Push 'assertion_table' class field instead of 'verify'.
3075         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3076         (type_assertion_hash): Include 'assertion_code' in hash.
3077         (add_type_assertion): Rewritten. Take class and assertion_code
3078         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3079         (can_widen_reference_to): Use new add_type_assertion() arguments.
3080         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3081         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3082         (verify_identifier_node): Removed.
3083         (assertion_entry_type, assertion_table_type): New.
3084         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3085         assertion code definitions.
3086         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3087         'target_type' to 'op1' and 'op2'.
3088         (add_type_assertion): Declare.
3089         (lang_printable_name_wls): Remove unused definition.
3090         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3091         to emit runtime assertion.
3092         (vfy_note_stack_type): Clean up non-C90 declarations.
3093         (vfy_note_local_type): Likewise.
3094         * verify.h (vfy_is_assignable_from): Declare.
3095         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3096         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3097         instead of is_assignable_from_slow().
3098         (types_compatible): Reinstate ref_compatible() call.
3099
3100 2004-11-04  Tom Tromey  <tromey@redhat.com>
3101
3102         * class.c (build_static_field_ref): Reverted previous patch.
3103
3104         * class.c (build_static_field_ref): Don't emit direct references
3105         when using indirect dispatch.
3106
3107 2004-11-03  Tom Tromey  <tromey@redhat.com>
3108
3109         * expr.c (expand_java_arrayload): Set lhs_type_node.
3110         (expand_java_arraystore): Set rhs_type_node.
3111
3112 2004-11-02  Tom Tromey  <tromey@redhat.com>
3113
3114         * jcf-parse.c (compute_class_name): Use filename length from zip
3115         directory, not strlen.
3116
3117         * expr.c (expand_invoke): Mark new interface methods as abstract.
3118
3119 2004-11-01  Tom Tromey  <tromey@redhat.com>
3120
3121         * verify-impl.c (push_jump): Removed check for uninitialized
3122         objects.
3123         (push_exception_jump): Likewise.
3124         (handle_ret_insn): Likewise.
3125         (handle_jsr_insn): Likewise.
3126         (state_check_no_uninitialized_objects): Removed.
3127
3128         * decl.c (check_local_unnamed_variable): Recognize
3129         promoted-to-int parameters when using the new verifier.
3130         * expr.c (expand_java_arraystore): Explicitly request array type
3131         when using new verifier.
3132         (expand_java_arrayload): Likewise.
3133         (invoke_build_dtable): Don't pass object_type_node as
3134         expression argument to build_java_indirect_ref.
3135         (build_java_check_indexed_type): Do nothing.
3136         (build_java_arraystore_check): Handle case where array doesn't
3137         have array type.
3138         (build_java_array_length_access): Likewise.
3139         (expand_invoke): Handle case where interface overrides a method
3140         from Object.
3141         (pop_type_0): Always succeed for reference types.
3142         (process_jvm_instruction): Don't pop a value in a dead
3143         exception handler.
3144         (pop_arguments): Convert arguments to correct types.
3145
3146 2004-10-29  Andrew Haley  <aph@redhat.com>
3147
3148         * jcf-parse.c (give_name_to_class): Remove line that was
3149         incorrectly merged.
3150
3151 2004-10-29  Andrew Haley  <aph@redhat.com>
3152
3153         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3154
3155 2004-10-20  Andrew Haley  <aph@redhat.com>
3156
3157         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3158
3159 2004-10-26  Tom Tromey  <tromey@redhat.com>
3160
3161         * verify.h (vfy_notify_verified): Removed.
3162         * verify-glue.c (vfy_notify_verified): Removed.
3163
3164 2004-10-26  Tom Tromey  <tromey@redhat.com>
3165
3166         * verify-impl.c (debug_print_state): Declare `i' before code.
3167         (merge_types): Modify `t' when it is null_type.
3168
3169 2004-10-26  Tom Tromey  <tromey@redhat.com>
3170
3171         * verify-impl.c (type_print): Renamed from print.  Now static and
3172         takes an argument.
3173         (debug_print_state): Use type_print.
3174
3175 2004-10-25  Tom Tromey  <tromey@redhat.com>
3176
3177         * expr.c (build_invokeinterface): Compute correct offset for
3178         index into interface methods.
3179
3180 2004-10-20  Tom Tromey  <tromey@redhat.com>
3181
3182         * java-tree.h (verify_jvm_instructions_new): Declare.
3183
3184         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3185         command line.
3186
3187         * verify-impl.c (verify_instructions): Correctly handle wide
3188         types on the stack.
3189         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3190         (vfy_get_component_type): Strip pointer types.
3191         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3192         types.
3193         Include java-except.h.
3194
3195 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3196
3197         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3198         vfy_push_type_t, set_variable, add_new_state, merge_into,
3199         handle_jsr_insn, branch_prepass, check_class_constant,
3200         check_wide_constant, get_one_type, compute_static_types,
3201         verify_instructions_0): Clean up C99 declarations after statements.
3202
3203 2004-10-20  Tom Tromey  <tromey@redhat.com>
3204
3205         * verify-impl.c (merge_refs): Compare reference against iterator,
3206         not ref2.
3207
3208         * verify-glue.c (vfy_tag): Mask off resolved flag.
3209
3210 2004-10-19  Tom Tromey  <tromey@redhat.com>
3211
3212         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3213         (init_state_with_stack): Initialize `this_type' in state.
3214         (verify_method): Use debug_print.
3215         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3216         (vfy_note_stack_depth): Reverted last patch.
3217         (vfy_note_stack_type): Note pointer to Object, not Object.
3218         (vfy_note_local_type): Likewise.
3219
3220         * verify.h (vfy_note_instruction_seen): Declare.
3221         * verify-glue.c (verify_jvm_instructions_new): Set
3222         BCODE_EXCEPTION_TARGET on target instruction.
3223         (vfy_note_instruction_seen): New function.
3224         * verify-impl.c (FLAG_INSN_SEEN): New define.
3225         (verify_instructions_0): Set flag on instruction.  Save state for
3226         PC=0 later.
3227         (verify_instructions): Call vfy_note_instruction_seen.
3228
3229         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3230         (verify_jvm_instructions_new): Call method_init_exceptions,
3231         add_handler, and handle_nested_ranges.
3232         * verify-impl.c (verify_method): Return 1 on success.
3233         (verify_instructions_0): Save the state at PC=0.
3234
3235         * verify-impl.c (init_type_from_class): Set is_resolved and
3236         ref_next on new ref_intersection.
3237         (init_type_from_string): Likewise.
3238
3239 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3240
3241         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3242         if flag_new_verifier is set.
3243         * java-tree.h (flag_new_verifier): Declare.
3244         * lang.opt (fnew-verifier): New option.
3245         * verify-impl.c: Work around namespace pollution by undef'ing
3246         'current_class'.
3247         (struct verifier_context): Make 'bytecode' const.
3248         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3249         (types_compatible): For the BC-ABI, always consider reference types
3250         compatible.
3251         (check_class_constant): Use vfr->current_class.
3252         (check_constant): Likewise.
3253         (check_wide_constant): Likewise.
3254         (check_field_constant): Check for 'L' at start of type name.
3255         (get_one_type): Return pointer instead of type. Set type result in
3256         caller via passed type pointer.
3257         (compute_argument_types): Update to use new get_one_type arguments.
3258         (compute_return_type): Likewise.
3259         (make_verifier_context): New. Allocate and initialize 'vfr'.
3260         (free_verifier_context): New. Free 'vfr' and its contents.
3261         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3262         and free_verifier_context.
3263
3264 2004-10-15  Tom Tromey  <tromey@redhat.com>
3265
3266         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3267         * verify.h (vfy_fail): Fixed formatting.
3268
3269         * verify-impl.c (vfr): Fixed comment formatting.
3270         (collapse_type): New function.
3271         (verify_instructions): Notify compiler about type map.
3272         * verify.h (vfy_note_stack_depth): Updated.
3273         (vfy_note_stack_type): Likewise.
3274         (vfy_note_local_type): Likewise.
3275         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3276         Declare.
3277         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3278         state.  Added `method' argument.
3279         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3280         argument.
3281         (vfy_note_local_type): New function.
3282         (vfy_unsuitable_type): Likewise.
3283         (vfy_return_address_type): Likewise.
3284         (vfy_null_type): Likewise.
3285
3286         * verify.h (VFY_IN_GCC): Removed.
3287         (VFY_WANT_TYPEMAP): Removed.
3288         * verify-impl.c (verify_instructions_0): Removed useless "\".
3289         (struct state) <next>: Uncomment.
3290
3291 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3292
3293         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3294         C-style.
3295
3296 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3297
3298         * Make-lang.in (verify.o): Re-enabled this target.
3299         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3300         (vfy_get_interface): Likewise.
3301         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3302         * verify.h (verify_jvm_instructions_new): Declare.
3303         * verify-impl.c (free_state): Temporarily comment out unused
3304         function.
3305
3306 2004-10-06  Tom Tromey  <tromey@redhat.com>
3307
3308         * java-tree.h (JV_STATE_READ): New enum value.
3309
3310 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3311
3312         * verify.h: New file.
3313
3314 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3315
3316         * verify-impl.c, verify-glue.c, verify.h: New files.
3317         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3318
3319 2004-09-24  Andrew Haley  <aph@redhat.com>
3320
3321         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3322         for a slot if it's of pointer type.
3323
3324 2004-09-14  Tom Tromey  <tromey@redhat.com>
3325
3326         * class.c (make_class_data): Correctly initialize "state" field.
3327         Initialize "engine" field.
3328         * decl.c (java_init_decl_processing): Add "engine" field.
3329
3330 2004-09-10  Andrew Haley  <aph@redhat.com>
3331
3332         PR java/12760
3333         * expr.c (build_invokeinterface): Use fast method for interface
3334         dispatch.
3335         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3336         JTI_ITABLE_PTR_TYPE.
3337         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3338         (emit_symbol_table): Add new arg, element_size.
3339         * decl.c (java_init_decl_processing): Initialize Class.itable.
3340         * class.c (GEN_TABLE): New macro.
3341         (gen_indirect_dispatch_tables): Use it.  Add itable.
3342         (make_class_data): Add new arg for emit_symbol_table().
3343         Emit itable.
3344         (add_miranda_methods): Make sure search_class has been parsed.
3345         (emit_symbol_table): Add new arg, element_size.
3346
3347 2004-09-06  Andrew Haley  <aph@redhat.com>
3348
3349         * verify.c (merge_types): Return Object for all merges of
3350         interfaces.
3351         * expr.c (add_type_assertion): Don't generate assertions when
3352         source type is array of Object.
3353
3354 2004-09-03  Andrew Haley  <aph@redhat.com>
3355
3356         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3357
3358         * lang.c (java_post_options): Force flag_verify_invocations if
3359         we're not using indirect dispatch.
3360
3361         * expr.c (pop_type_0): Move test for interfaces before call to
3362         can_widen_reference_to().
3363         (build_signature_for_libgcj): Remove generation of canonical array
3364         type.
3365         (add_type_assertion): Canonicalize both arrays.
3366         Don't assert that type X can be assigned to Object.
3367         Don't assert that type X an be assigned to type X.
3368         Don't assert that Object can be assigned to type X.
3369         (can_widen_reference_to): Warn whenever we generate an assertion.
3370         (process_jvm_instruction): Use throwable_type_node for the type of
3371         an exception class.
3372
3373 2004-09-01  Andrew Haley  <aph@redhat.com>
3374
3375         * decl.c (java_init_decl_processing): Change
3376         verify_identifier_node to "__verify".
3377         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3378         * java-tree.h (verify_identifier_node): Change to "__verify".
3379
3380         * expr.c (build_signature_for_libgcj): New function.
3381         (add_type_assertion): Use it to construct signatures for
3382         source_type and target_type.
3383
3384 2004-08-27  Andrew Haley  <aph@redhat.com>
3385
3386         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3387         (verify_identifier_node): New.
3388         (TYPE_VERIFY_METHOD): New.
3389         (struct type_assertion): New type.
3390         * expr.c (type_assertion_eq): New function.
3391         (type_assertion_hash): New function.
3392         (add_type_assertion): New function.
3393         (can_widen_reference_to): Call add_type_assertion().
3394         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3395         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3396         (finish_class): Output TYPE_VERIFY_METHOD (type).
3397
3398         * decl.c (end_java_method): Nullify unused fields.
3399
3400 2004-08-17  Andrew Haley  <aph@redhat.com>
3401
3402         * verify.c (defer_merging): Quieten.
3403         * jcf-parse.c (load_class): Only try to open a class file if it's
3404         java.lang.Object or if it's part of the current compilation.
3405         Check that the class we just tried to load is the class we just
3406         loaded.  Quieten.
3407         (java_parse_file): Set flag_verify_invocations off if we're
3408         compiling from .class.
3409         (parse_zip_file_entries): Abort if we try to read a dummy class.
3410         * expr.c (can_widen_reference_to): Quieten.
3411         (build_invokevirtual): Abort if we try to invokevirtual an
3412         interface.
3413         (expand_invoke): Don't build a non-interface call to an interface.
3414         (build_instanceof): Don't do premature optimization if
3415         flag_verify_invocations is not set.
3416         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3417         from superclass.
3418         (build_static_field_ref): Add correct type conversion for
3419         field_address.
3420         (add_miranda_methods): Disable generation of Miranda methods for
3421         dummy classes.
3422         (layout_class_method): Don't complain about non-static method
3423         overrides static method with dummy classes.
3424
3425 2004-08-13  Tom Tromey  <tromey@redhat.com>
3426
3427         * class.c (build_static_field_ref): Re-enable atable lookups for
3428         static fields.
3429
3430         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3431
3432 2004-08-11  Tom Tromey  <tromey@redhat.com>
3433
3434         * gcj.texi (libgcj Runtime Properties): Document new properties.
3435
3436 2004-08-06  Andrew Haley  <aph@redhat.com>
3437
3438         * jcf-parse.c (load_class): Check that we really have loaded the
3439         class we're looking for.
3440
3441 2004-07-19  Andrew Haley  <aph@redhat.com>
3442
3443         * verify.c (verify_jvm_instructions): Comment change only.
3444
3445         * typeck.c (build_java_array_type): Add size field to array name.
3446
3447         * java-tree.h (LOCAL_SLOT_P): New.
3448         (update_aliases): Add PC argument.
3449         (pushdecl_function_level): New function.
3450
3451         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3452         MODIFY_EXPR, and SAVE_EXPR.
3453         (java_gimplify_modify_expr): New function.
3454
3455         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3456         (expand_iinc): Pass PC to update_aliases().
3457         (STORE_INTERNAL): Likewise.
3458         (process_jvm_instruction): Likewise.
3459
3460         * decl.c (base_decl_map): New variable.
3461         (uniq): New variable.
3462         (update_aliases): Rewrite with more thorough checking.
3463         (debug_variable_p): New function.
3464         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3465         (check_local_named_variable): Delete whole function.
3466         (initialize_local_variable): New function.
3467         (check_local_unnamed_variable): Add checks and comments.
3468         (find_local_variable): Rewrite.
3469         (java_replace_reference): New function.
3470         (function_binding_level): New variable.
3471         (pushdecl_function_level): New function.
3472         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3473         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3474         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3475         function_binding_level.
3476         (end_java_method): Null unused fields to save memory.
3477
3478 2004-06-29  Andrew Haley  <aph@redhat.com>
3479
3480         * except.c (expand_start_java_handler): Push a new binding level.
3481         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3482         register_exception_range() to register where we'll do it.
3483         (expand_end_java_handler): Remove old bogus code.  Replace with
3484         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3485         the top of the expression we're curently building.
3486         (maybe_end_try): Delete.
3487         * decl.c (binding_level.exception_range): New field.
3488         (clear_binding_level): Add field exception_range.  Reformat.
3489         (poplevel): Call expand_end_java_handler().
3490         (poplevel): Call java_add_stmt only if functionbody is false.
3491         (maybe_poplevels): Don't call maybe_end_try() from here.
3492         (end_java_method): Clear no longer used trees in function decl.
3493         (register_exception_range): New function.
3494         * java-tree.h (register_exception_range, struct eh_range): Declare.
3495
3496 2004-06-22  Andrew Haley  <aph@redhat.com>
3497
3498         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3499         the otable.
3500         * check-init.c (get_variable_decl): Teach check-init about
3501         FIELD_DECLs addressed via the otable.
3502         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3503         CLASS_PARSED_P.
3504
3505 2004-05-28  Andrew Haley  <aph@redhat.com>
3506
3507         * jcf-parse.c (load_class): Don't try to read a class that we've
3508         already read.
3509
3510         * expr.c (build_invokeinterface): Use the old-fashioned way of
3511         doing indirect dispatch: look up interfaces by name.
3512         * java-tree.h (enum java_tree_index): Add
3513         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3514         * decl.c (java_init_decl_processing): Add
3515         soft_lookupinterfacemethodbyname_node.
3516
3517         * gjavah.c (print_method_info): Final methods have vtable entries,
3518         so gjavah needs to output them.
3519         * class.c (layout_class_method): Generate vtable entries for final
3520         methods.
3521         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3522         dispatch, even if a method is final.
3523
3524 2004-05-25  Andrew Haley  <aph@redhat.com>
3525
3526         * class.c (build_symbol_entry): Convert the names of constructors
3527         to init_identifier_node when generating an entry for the indirect
3528         dispatch table.
3529
3530         * expr.c (build_known_method_ref): Generate indirect calls for
3531         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3532
3533 2004-05-24  Andrew Haley  <aph@redhat.com>
3534
3535         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3536         atable element is of the right type.
3537
3538         * class.c (build_static_field_ref): Cast pointer to correct type
3539         for field.
3540
3541 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3542
3543         * Merged with HEAD as of 20040514. Diff against
3544         gcj-abi-2-merge-20040514.
3545
3546 2004-04-16  Andrew Haley  <aph@redhat.com>
3547
3548         * verify.c (check_pending_block): Disable subroutine checks.
3549         (defer_merging): New function.
3550         (merge_types): If types are dummy, use defer_merging to combine them.
3551         (verify_jvm_instructions): If invocation is invokeinterface and
3552         target is dummy, assume target really is an interface.
3553
3554         * parse.y (patch_invoke): Break out call to java_create_object.
3555
3556         * lang.c (flag_verify_invocations): New.
3557
3558         * jcf-parse.c (load_class): If we've already failed to load a
3559         class, don't try again.
3560         (load_class): If we can't find a .class file, don't fail, but emit
3561         a warning.
3562         (parse_class_file): Don't act on dummy methods.
3563
3564         * java-tree.h (flag_verify_invocations): New.
3565         (TYPE_DUMMY): New.
3566         (lang_type.dummy_class): New field.
3567         (java_create_object): New function.
3568         (METHOD_DUMMY): New.
3569
3570         * expr.c (build_field_ref): Widen field offset.
3571         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3572         that each of its elements is compatible with the one we're
3573         popping.
3574         (pop_type_0): Issue a warning to say that we need to generate a
3575         runtime check.
3576         (java_create_object): New function.
3577         (build_field_ref): Only generate hard refs if we're not using
3578         indirect dispatch.
3579         (expand_java_field_op): If we're using !verify_invocations and we
3580         see a missing field, generate a decl for it.
3581
3582         (expand_invoke): If a class doesn't have the method we seek and
3583         we're using !flag_verify_invocations, generate a decl for the
3584         method now.
3585
3586         (build_known_method_ref): Always use indirect dispatch via the
3587         atable for static methods.
3588
3589         (expand_java_NEW): Break out object creation into new function,
3590         java_create_object.
3591
3592         (can_widen_reference_to): Issue a warning to say that we need to
3593         generate a runtime check.
3594
3595         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3596         (make_method_value): Also use index for interfaces.
3597         (make_class_data): Skip dummy field for inherited data.
3598         Don't build method array for dummy methods.
3599         Set size_in_byte to -1 when using inirect dispatch
3600         Don't build a hard class ref if we don't have a hard ref to our
3601         superclass, or if we're using inirect dispatch.
3602         Null out dispatch tables.
3603
3604         (layout_class_method): Don't complain about non-static method
3605         overrides static method is method is artificial.
3606
3607         (build_static_field_ref): Disable atable references to static
3608         fields for the time being.
3609
3610         (layout_class_methods): Check for CLASS_INTERFACE as
3611         well as CLASS_ABSTRACT.
3612
3613 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3614
3615         * class.c (make_class_data): Don't check flag_inline_functions.
3616         * lang.c (flag_really_inline): Remove unused flag.
3617         (java_handle_option): Don't set it here.  Remove special handling
3618         of flag_inline_functions for Java.
3619         (java_init): Don't set flag_inline_trees here.  Already done...
3620         (java_post_options): ...here.  Don't clear flag_inline_functions.
3621
3622 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3623
3624         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3625         (java_gimplify_exit_block_expr): New function.
3626         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3627         LABELED_BLOCK_EXPR.
3628         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3629         (EXIT_BLOCK_EXPR): Likewise.
3630         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3631         (LABELED_BLOCK_BODY): Likewise.
3632         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3633         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3634         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3635         TREE_OPERAND.
3636         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3637         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3638         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3639         second operand of EXIT_BLOCK_EXPR.
3640         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3641         TREE_OPERAND.
3642         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3643
3644 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3645
3646         * xref.h (xref_flag_value): Remove.
3647         (xref_set_data, xref_get_data): Likewise.
3648         (xref_set_current_fp): Likewise.
3649         (XREF_NONE): Likewise.
3650         (XREF_GET_DATA): Likewise.
3651         * xref.c (xref_flag_value): Remove.
3652         (xref_set_data, xref_get_data): Likewise.
3653         (xref_set_current_fp): Likewise.
3654
3655 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3656
3657         * gjavah.c (output_directory): Make static.
3658         (temp_directory): Likewise.
3659
3660 2004-11-15  Tom Tromey  <tromey@redhat.com>
3661
3662         * decl.c (instn_ptr_type_node): Removed.
3663         (lineNumbers_ptr_type_node): Removed.
3664         (jint_type): Removed.
3665         (jint_ptr_type): Removed.
3666
3667 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3668
3669         PR java/15576
3670         * check-init.c (check_init): Ignore DECL_EXPR.
3671         * expr.c (always_initialize_class_p): Reenable.
3672         (build_class_init): Use a variable to store the decl.  Also use
3673         boolean_false_node instead of integer_zero_node.
3674         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3675         to the block.
3676
3677 2004-11-08  Tom Tromey  <tromey@redhat.com>
3678
3679         PR java/16843:
3680         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
3681         generating a JNI header.
3682         (print_field_info): Handle JNI headers.
3683         (jni_print_float): Likewise.
3684         (jni_print_double): Likewise.
3685
3686 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
3687
3688         * decl.c (end_java_method): Remove duplicated code.
3689
3690 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
3691             Gerald Pfeifer  <gerald@pfeifer.com>
3692
3693         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
3694         as well.
3695
3696 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
3697
3698         PR java/17265
3699         * class.c: Reinstate 2004-08-18 patch.
3700         (make_local_function_alias): Don't create an alias for extern (native)
3701         functions.
3702
3703 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3704
3705         PR java/17265
3706         * class.c (make_local_function_alias): Revert 2004-08-18 change.
3707         (make_method_value): Likewise.
3708
3709 2004-10-21  Andrew Haley  <aph@redhat.com>
3710
3711         PR java/18091:
3712         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3713
3714 2004-10-20  Andrew Haley  <aph@redhat.com>
3715
3716         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3717         Remove duplicated code block.
3718
3719 2004-10-18  Steven Bosscher  <stevenb@suse.de>
3720
3721         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
3722         New rules to work around old Bison warnings.
3723
3724 2004-10-17  Steven Bosscher  <stevenb@suse.de>
3725
3726         * class.c (ident_subst): Always alloca buffer.
3727         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
3728         opcode after including javaop.def.
3729         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
3730         conditional expression that exits, to avoid warnings.
3731         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
3732         a user of an extension.
3733         * win32-host.c: Move check down to have non-empty file when
3734         WIN32 is not defined.
3735
3736         * Make-lang.in (java-warn): Add STRICT_WARN.
3737         (java/jcf-io.o-warn): Don't have Werror for this file.
3738         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
3739
3740 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
3741
3742         * expr.c (expr_add_location): Move declaration to before all
3743         statements.
3744         * parse.y (java_expand_classes): Ditto.
3745         * lex.c (java_peek_unicode): Ditto.
3746
3747 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3748
3749         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
3750         if possible, else convert `foo' to 'foo'.
3751         * class.c: Likewise.
3752         * decl.c: Likewise.
3753         * expr.c: Likewise.
3754         * jcf-io.c: Likewise.
3755         * jcf-parse.c: Likewise.
3756         * lang.c: Likewise.
3757         * lex.c: Likewise.
3758         * parse.h: Likewise.
3759
3760 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
3761
3762         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
3763         rename parameter 'msg' to 'msgid' in function declaration.
3764         (issue_warning_error_from_context): Likewise.
3765         (yyerror): Rename parameter 'msg' to 'msgid'.
3766         (all over): Use new quoting style for diagnostics.
3767
3768 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
3769
3770         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
3771         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
3772         Update copyright.
3773
3774 2004-10-14  Matt Austern  <austern@apple.com>
3775
3776         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
3777         pointer_set_t* now.
3778
3779 2004-10-13  Tom Tromey  <tromey@redhat.com>
3780
3781         PR java/15578:
3782         * lang.opt (--extdirs): Document.
3783         * jvspec.c (lang_specific_driver): Recognize -encoding and
3784         -extdirs.
3785
3786 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
3787
3788         * parse.y (issue_warning_error_from_context): Use va_list *
3789         instead of va_list parameter.
3790         (parse_error_context): Update call.
3791         (parse_warning_context): Likewise.
3792
3793 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
3794
3795         * parse.y, parse-scan.y: Add list of diagnostic messages to
3796         insulate translation template from version of yacc/bison used
3797         to compile the grammar.
3798
3799 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
3800
3801         Prepare for %q, %< and %> in diagnostic message strings.
3802         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
3803         Name second parameter 'msgid'.
3804         * parse.y: Additionally include pretty-print.h and diagnostic.h.
3805         (issue_warning_error_from_context): Use pretty-printer functions
3806         instead of vsprintf for constructing formatted messages. Rename
3807         parameter 'msg' to 'msgid'.
3808         (parse_error_context): Rename parameter 'msg' to 'msgid'.
3809         (parse_warning_context): Likewise.
3810
3811 2004-10-05  Andrew Haley  <aph@redhat.com>
3812
3813         PR java/17779
3814         * jcf-parse.c (parse_zip_file_entries): If a class has a
3815         superclass and a TYPE_SIZE of zero, lay it out.
3816
3817 2004-09-30  Andrew Haley  <aph@redhat.com>
3818
3819         PR java/17733
3820         * jcf-parse.c (compute_class_name): Rewrite.
3821
3822 2004-10-01  Jan Hubicka  <jh@suse.cz>
3823
3824         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
3825
3826 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3827
3828         * lex.c: Fix a comment typo.
3829
3830 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
3831
3832         * java-tree.h: Fix a comment typo.
3833
3834 2004-09-30  Per Bothner  <per@bothner.com>
3835
3836         Simplify lexer.  Implement --enable-mapped-location support.
3837         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
3838         (parse_source_file_1): Pass filename as extra parameter, so we can call
3839         linemap_add and set input_location here, rather than in both callers.
3840         (read_class): Pass copied filename to parse_source_file_1.
3841         Don't initialize wfl_operator - only needed for source compilation.
3842         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
3843         * lex.h:  Remove a bunch of debugging macros.
3844         * lex.h (struct_java_line, struct java_error):  Remove types.
3845         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
3846         (struct java_lc_s):  Remove prev_col field.
3847         (struct java_lexer):  New fields next_unicode, next_columns, and
3848         avail_unicode.  New position field, and maybe token_start field.
3849         Don't need hit_eof field - use next_unicode == -1 instead.
3850         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
3851         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
3852         * parse.h:  Various changes for USE_MAPPED_LOCATION.
3853         (EXPR_WFL_EMIT_LINE_NOTE): XXX
3854         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
3855         (struct parser_ctxt):  New file_start_location field.
3856         Remove p_line, c_line fields since we no longer save lines.
3857         Remove elc, lineno, and current_jcf fields - no longer used.
3858         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
3859         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
3860         source_location and is probably not needed anymore anyway.
3861         Use new expr_add_Location function.
3862         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
3863         (java_pop_parser_context):  Minor cleanup.
3864         (java_parser_context_save_global, java_parser_context_restore_global,
3865         java_pop_parser_context):  Save/restore input_location as a unit.
3866         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
3867         a source_location instead of a wfl context node.
3868         (check_class_interface_creation):  input_filename is not addressable.
3869         (create_artificial_method):  Calling java_parser_context_save_global
3870         and java_parser_context_restore_global is overkill.  Instead,
3871         temporarily set input_location from class decl.
3872         (java_layout_seen_class_methods): Set input_location from method decl.
3873         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
3874         (finish_loop_body):  Likewise.
3875         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
3876         (java_sprint_unicode):  Take a character, not index in line.
3877         (java_sneak_uncode):  Replaced by java_peek_unicode.
3878         (java_unget_unicode):  No longer used.
3879         (java_allocate_new_line. java_store_unicode):  Removed, since we
3880         no longer remember "lines".
3881         (java_new_lexer):  Update for new data structures.
3882         (java_read_char):  Move unget_value checking to java_read_unicode.
3883         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
3884         efficient functions that are used directly when lexing.
3885         (java_read_unicode_collapsing_terminators):  No longer needed.
3886         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
3887         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
3888         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
3889         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
3890         combine switch branches, and test for common token kinds earlier.
3891         (java_lex_error):  Rewrite.
3892         * jv-scan.c (expand_location): New function, copied from tree.c.
3893         (main): Set ctxp->filename instead of setting input_filename directly.
3894
3895 2004-09-30  Per Bothner  <per@bothner.com>
3896
3897         More cleanup for --enable-mapped-location.
3898         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
3899         input_location here.  Instead do it in give_name_to_class.
3900         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
3901         * expr.c (expand_byte_code): Call linemap_line_start.
3902         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
3903         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
3904         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
3905         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
3906         to USE_MAPPED_LOCATION case.
3907
3908         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
3909         * jcf-parse.c (java_parse_file): Don't set input_filename.
3910         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
3911         Create a list of TRANSLATION_UNIT_DECL.
3912         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
3913         reason is so we can set a DECL_SOURCE_LOCATION for each file.
3914         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
3915         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
3916         (file_start_location):  New static.
3917         (set_source_filename):  Avoid extra access to input_filename macro.
3918         Concatenate new name with class's package prefix.
3919         (set_source_filename, give_name_to_class): Update.
3920         (give_name_to_class):  Set class's "line 0" input_location here.
3921         (parse_class_file):  Set input_location as a unit.
3922
3923         * jcf-parse.c (load_class): Sanity test if missing inner class file.
3924
3925 2004-09-29  Per Bothner  <per@bothner.com>
3926
3927         * java-tree.h:  Redefine some macros and add some declaration
3928         to handle the USE_MAPPED_LOCATION case.
3929         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
3930         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
3931         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
3932         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
3933
3934         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
3935         * decl.c (finish_method, java_add_stmt): Likewise.
3936         * java-gimplify.c (java-gimplify.c):  Likewise.
3937         * jcf-write.c (generate_bytecode_insns):  Likewise.
3938         * lang.c (java_post_options): Likewise - call linemap_add.
3939
3940 2004-09-29  Andrew Haley  <aph@redhat.com>
3941
3942         PR java/17007
3943         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
3944         result of TRUNC_MOD_EXPR.
3945         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
3946         * decl.c (java_init_decl_processing): Mark
3947         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
3948
3949 2004-09-28  Tom Tromey  <tromey@redhat.com>
3950
3951         PR java/15710:
3952         * class.c (add_miranda_methods): Load superinterface if not
3953         already loaded.
3954
3955 2004-09-28  Andrew Haley  <aph@redhat.com>
3956
3957         PR java/17586
3958         * jcf-parse.c (load_class): Don't try to read a class that we've
3959         already read.
3960
3961 2004-09-28  Andrew Haley  <aph@redhat.com>
3962
3963         * jcf-parse.c (load_class): Back out previous broken patch.
3964
3965 2004-09-28  Andrew Haley  <aph@redhat.com>
3966
3967         PR java/17586
3968         * jcf-parse.c (load_class): Don't try to read a class that we've
3969         already read.
3970         Check that we really did read the right class.
3971
3972 2004-09-25  Tom Tromey  <tromey@redhat.com>
3973
3974         PR java/17500:
3975         * parse.y (create_artificial_method): Use add_method_1.
3976
3977 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
3978
3979         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
3980         comment typos.
3981         * gcj.texi: Fix typos.
3982
3983 2004-09-24  Tom Tromey  <tromey@redhat.com>
3984
3985         PR java/15656:
3986         * parse.y (class_instance_creation_expression): Set `$$' to NULL
3987         in error parts of rule.
3988         (unary_expression): Don't call error_if_numeric_overflow when $1
3989         is NULL.
3990
3991 2004-09-24  Tom Tromey  <tromey@redhat.com>
3992
3993         PR java/16789:
3994         * parse.y (resolve_qualified_expression_name): Set
3995         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
3996         * expr.c (force_evaluation_order): Check for empty argument list
3997         after stripping COMPOUND_EXPR.
3998
3999 2004-09-23  Andrew Haley  <aph@redhat.com>
4000
4001         PR java/16927:
4002         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4003         COND_EXPRs.
4004
4005 2004-09-23  Tom Tromey  <tromey@redhat.com>
4006
4007         PR java/17329:
4008         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4009         where operand is null.
4010
4011 2004-09-23  Tom Tromey  <tromey@redhat.com>
4012
4013         PR java/17380:
4014         * parse.y (not_accessible_p): Allow access to protected members
4015         even when class is not static.
4016
4017 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4018
4019         * Make-lang.in: Revert the gcc-none.o change.
4020
4021 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4022
4023         * parse.y (patch_anonymous_class): VEC_space returns true if there
4024         is space.
4025
4026 2004-09-21  Matt Austern  <austern@apple.com>
4027
4028         Fix bootstrap.
4029         * gjavah.c (free_method_name_list): Fix function definition so
4030         it's a proper C prototype.
4031
4032 2004-09-21  Tom Tromey  <tromey@redhat.com>
4033
4034         PR java/17575:
4035         * gjavah.c (free_method_name_list): New method.
4036         (main): Call it.
4037
4038 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4039             Zack Weinberg  <zack@codesourcery.com>
4040
4041         * java-tree.def: Use tree_code_class enumeration constants
4042         instead of code letters.
4043         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4044         new tree-class enumeration constants.
4045
4046 2004-09-13  Tom Tromey  <tromey@redhat.com>
4047
4048         PR java/17216:
4049         * class.c (layout_class_method): Put synthetic methods into the
4050         vtable.
4051
4052 2004-09-11  Andrew Pinski  <apinski@apple.com>
4053
4054         * Make-lang.in (java/ggc-none.c): Change dependency
4055         for ggc.h into $(GGC_H).
4056
4057 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4058
4059         * Make-lang.in (java/win32-host.o): Add dependency on
4060         coretypes.h.
4061         * win32-host.c: Add includes for coretypes.h, jcf.h
4062
4063 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4064
4065         * Make-lang.in (GCJH_OBJS): Change dependency from
4066         ggc-none.o to java/ggc-none.o
4067         (JCFDUMP_OBJS): Likewise.
4068         (java/ggc-none.o): New target.
4069
4070 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4071
4072         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4073         * class.c (build_utf8_ref, build_static_field_ref,
4074         make_field_value, make_method_value, get_dispatch_table,
4075         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4076         * constants.c (get_tag_node, build_ref_from_constant_pool,
4077         build_constants_constructor): Likewise.
4078         * decl.c (java_init_decl_processing): Likewise.
4079         * expr.c (build_java_array_length_access, build_newarray,
4080         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4081         build_java_binop, build_field_ref, expand_java_add_case,
4082         expand_java_call, build_known_method_ref, build_invokevirtual,
4083         build_invokeinterface, build_jni_stub): Likewise.
4084         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4085         * jcf-parse.c (get_constant): Likewise.
4086         * lex.c (do_java_lex): Likewise.
4087         * parse.y (patch_binop, patch_unaryop, patch_cast,
4088         build_newarray_node, patch_newarray): Likewise.
4089         * resource.c (compile_resource_data): Likewise.
4090         * typeck.c (build_prim_array_type): Likewise.
4091
4092 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4093
4094         * decl.c (java_init_decl_processing): Adjust
4095         initialize_sizetypes call.
4096
4097 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4098
4099         * jv-scan.c (fancy_abort): Add.
4100
4101 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4102
4103         * expr.c (build_java_arrayaccess): Use convert to change
4104         len's type.
4105
4106 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4107
4108         * class.c (make_local_function_alias): Allocate extra space for 'L'
4109         in name buffer. Reported by Thomas Neumann.
4110
4111 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4112
4113         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4114         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4115         * lex.c (do_java_lex): Adjust.
4116         (error_if_numeric_overflow): Likewise.
4117
4118 2004-08-18  Andrew Pinski  <apinski@apple.com>
4119
4120         * class.c (make_local_function_alias): Only make a new decl if we
4121         support alias attribute on all decls.
4122
4123 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4124
4125         * class.c (make_local_function_alias): New function. Create local
4126         alias for public method DECL.
4127         (make_method_value): Use make_local_function_alias.
4128         * parse.y (craft_constructor): Don't special-case anonymous classes.
4129         Always set ctor_name to init_identifier_node.
4130         (lookup_method_invoke): Call layout_class_method when creating
4131         anonymous class constructor.
4132
4133 2004-08-18  Richard Henderson  <rth@redhat.com>
4134
4135         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4136         default case.  Treat '<' similarly.  Update for
4137         is_gimple_formal_tmp_var name change.
4138
4139 2004-08-17  Andrew Haley  <aph@redhat.com>
4140
4141         * lang.c (lang_printable_name): Obey verbose flag.
4142         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4143         lang_printable_name().
4144         (verify_constructor_circularity, get_printable_method_name,
4145         check_abstract_method_definitions, java_check_regular_methods,
4146         java_check_abstract_methods, check_inner_class_access,
4147         fix_constructors, patch_method_invocation, patch_return):
4148         Likewise.
4149         * expr.c (pop_type_0): Likewise.
4150
4151         * java-tree.h (lang_printable_name_wls): Delete.
4152
4153 2004-08-16  Tom Tromey  <tromey@redhat.com>
4154
4155         PR java/8473:
4156         * parse.y (primary): Changed for initialized and uninitialized
4157         array creations.
4158         (array_access): Handle array_creation_initialized.
4159         (array_creation_expression): Split into
4160         array_creation_initialized and array_creation_uninitialized.
4161
4162 2004-08-16  Andrew Haley  <aph@redhat.com>
4163
4164         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4165         generating bytecode.
4166
4167 2004-08-16  Elliot Lee <sopwith@redhat.com>
4168
4169         PR java/9677
4170         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4171         spaces, and quoted filelists.
4172
4173 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4174
4175         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4176         * class.c (build_utf8_ref, build_static_field_ref,
4177         make_field_value, make_method_value, get_dispatch_table,
4178         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4179         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4180         build_constants_constructor): Likewise.
4181         * decl.c (java_init_decl_processing): Likewise.
4182         * expr.c (build_java_array_length_access, build_newarray,
4183         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4184         build_java_binop, build_field_ref, expand_java_add_case,
4185         expand_java_call, build_known_method_ref, build_invokevirtual,
4186         build_invokeinterface, build_jni_stub): Likewise.
4187         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4188         * jcf-parse.c (get_constant): Likewise.
4189         * lex.c (do_java_lex): Likewise.
4190         * parse.y (patch_binop, patch_unaryop, patch_cast,
4191         build_null_of_type, patch_newarray): Likewise.
4192         * resource.c (compile_resource_data): Likewise.
4193         * typeck.c (build_prim_array_type): Likewise.
4194
4195 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4196
4197         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4198         Don't create BLOCK here or call java_gimplify_block.
4199
4200 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4201
4202         * java-tree.h (flag_deprecated): Removed.
4203         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4204         * parse.y (check_deprecation): Check warn_deprecated instead of
4205         flag_deprecated.
4206
4207 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4208
4209         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4210         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4211         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4212         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4213         flag_force_classes_archive_check, flag_optimize_sci,
4214         flag_indirect_dispatch): Remove explicit declarations.
4215         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4216         final comment.
4217
4218 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4219
4220         PR bootstrap/14893
4221         * Make-lang.in (java.install-man): Install from either build
4222         tree or source tree, whichever has the file first.
4223
4224 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4225
4226         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4227         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4228         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4229         (do_java_lex): Likewise. Adjust force_fit_type call.
4230
4231 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4232             Andrew Haley  <aph@redhat.com>
4233
4234         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4235         checking trees as they're being built.
4236         (convert): Call convert_ieee_real_to_integer if we're
4237         converting a constant, even if we're writing a class file.
4238
4239 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4240
4241         PR java/16701
4242         * parse.y (fold_constant_for_init): Call resolve_field_access with
4243         correct current_class context.
4244
4245 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4246
4247         * decl.c (update_aliases, initialize_local_variable): Replace calls
4248         to build with calls to buildN.
4249         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4250         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4251         * parse.h (BUILD_THROW): Likewise.
4252         * parse.y (switch_expression, synchronized_statement,
4253         catch_clause_parameter, array_creation_expression,
4254         conditional_expression, make_qualified_name,
4255         resolve_qualified_expression_name, patch_method_invocation,
4256         patch_invoke, build_method_invocation, build_new_invocation,
4257         build_assignment, patch_assignment, build_binop, patch_binop,
4258         build_string_concatenation, build_incdec, patch_unaryop,
4259         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4260         patch_return, build_if_else_statement, build_labeled_block,
4261         build_new_loop, build_loop_body, build_bc_statement,
4262         build_assertion, encapsulate_with_try_catch, build_try_statement,
4263         build_try_finally_statement, patch_synchronized_statement,
4264         emit_test_initialization): Likewise, replace build with buildN.
4265
4266 2004-07-28  Eric Christopher  <echristo@redhat.com>
4267
4268         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4269         (java_unsafe_for_reeval): Ditto.
4270
4271 2004-07-26    <hp@bitrange.com>
4272
4273         * parse.y (build_super_invocation): Adjust declaration order to
4274         avoid declaration after statement.
4275
4276 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4277
4278         * decl.c: Rename all identifiers named `class' to `cl'.
4279
4280 2004-07-25  Richard Henderson  <rth@redhat.com>
4281
4282         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4283
4284 2004-07-23  Mike Stump  <mrs@apple.com>
4285
4286         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4287         * gjavah.c (throwable_p, decode_signature_piece,
4288         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4289         process_file): Likewise.
4290         * jcf-dump.c (main): Likewise.
4291         * jcf-io.c (read_zip_member): Likewise.
4292         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4293         give_name_to_class, get_class_constant): Likewise.
4294         * jcf-write.c (find_constant_wide, push_long_const,
4295         generate_classfile): Likewise.
4296         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4297         * parse.y (read_import_dir): Likewise.
4298         * typeck.c (parse_signature_type): Likewise.
4299         * verify.c (verify_jvm_instructions): Likewise.
4300         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4301
4302 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4303
4304         * Make-lang.in: Replace rmic and rmiregistry references with
4305         grmic and grmiregistry.
4306         * gcj.texi: Likewise.
4307
4308 2004-07-20  Andrew Haley  <aph@redhat.com>
4309
4310         PR java/16431.
4311         * verify.c (verify_jvm_instructions): Comment change only.
4312
4313         * typeck.c (build_java_array_type): Add size field to array name.
4314
4315         * java-tree.h (LOCAL_SLOT_P): New.
4316         (update_aliases): Add PC argument.
4317         (pushdecl_function_level): New function.
4318
4319         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4320         MODIFY_EXPR, and SAVE_EXPR.
4321         (java_gimplify_modify_expr): New function.
4322
4323         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4324         (expand_iinc): Pass PC to update_aliases().
4325         (STORE_INTERNAL): Likewise.
4326         (process_jvm_instruction): Likewise.
4327
4328         * decl.c (base_decl_map): New variable.
4329         (uniq): New variable.
4330         (update_aliases): Rewrite with more thorough checking.
4331         (debug_variable_p): New function.
4332         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4333         (check_local_named_variable): Delete whole function.
4334         (initialize_local_variable): New function.
4335         (check_local_unnamed_variable): Add checks and comments.
4336         (find_local_variable): Rewrite.
4337         (java_replace_reference): New function.
4338         (function_binding_level): New variable.
4339         (pushdecl_function_level): New function.
4340         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4341         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4342         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4343         function_binding_level.
4344         (end_java_method): Null unused fields to save memory.
4345
4346 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4347
4348         * class.c (add_interface_do): Remove.
4349         (set_super_info, interface_of_p, maybe_add_interface,
4350         add_interface, make_class_data, layout_class,
4351         add_miranda_methods): Adjust BINFO accessors and addition.
4352         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4353         accessors.
4354         * jcf-write.c (generate_classfile): Likewise.
4355         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4356         check_circular_reference, java_complete_class,
4357         check_abstract_method_definitions,
4358         java_check_abstract_method_definitions,
4359         check_interface_throws_clauses, java_check_abstract_methods,
4360         lookup_java_interface_method2,
4361         find_applicable_accessible_methods_list): Adjust BINFO accessors
4362         and addition.
4363         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4364
4365 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4366
4367         * builtins.c (max_builtin, min_builtin,
4368         java_build_function_call_expr): Replace calls to build with buildN.
4369         * class.c (build_class_ref, build_static_field_ref,
4370         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4371         * constants.c (build_ref_from_constant_pool): Likewise.
4372         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4373         add_stmt_to_compound): Likewise.
4374         * except.c (build_exception_object_ref, expand_end_java_handler):
4375         Likewise.
4376         * java-gimplify.c (java_gimplify_case_expr,
4377         java_gimplify_default_expr, java_gimplify_block,
4378         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4379         * jcf-write.c (generate_bytecode_insns): Likewise.
4380         * typeck.c (convert_ieee_real_to_integer): Likewise.
4381
4382 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4383
4384         * java-tree.h (builtin_function): Declare.
4385
4386 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4387
4388         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4389         abuse restore_line_number_status.
4390
4391 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4392
4393         g++/15861
4394         * jcf-parse.c (java_emit_static_constructor): Specify default
4395         priority.
4396
4397 2004-07-13  Per Bothner  <per@bothner.com>
4398
4399         * java-tree.h (all_class_filename):  Remove useless macro.
4400         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4401         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4402         * parse.y (java_parser_context_restore_global):  Replace
4403         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4404         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4405
4406 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4407
4408         PR java/16474
4409         gjavah.c (print_field_info): Emit constant only if field is static.
4410
4411 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4412
4413         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4414         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4415         build_java_ret, build_java_throw_out_of_bounds_exception,
4416         build_java_array_length_access, java_check_reference,
4417         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4418         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4419         expand_java_arrayload, build_java_monitor, expand_java_return,
4420         expand_load_internal, expand_java_NEW, build_get_class,
4421         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4422         build_java_soft_divmod, build_java_binop, build_field_ref,
4423         expand_compare, expand_java_goto, expand_java_switch,
4424         expand_java_add_case, build_class_init, build_known_method_ref,
4425         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4426         expand_invoke, build_jni_stub, expand_java_field_op,
4427         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4428         force_evaluation_order, emit_init_test_initialization): Convert
4429         calls to "build" into calls to the prefered "buildN" functions.
4430
4431 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4432
4433         * java-tree.h (set_block): Remove.
4434         * lang.c (java_clear_binding_stack): New.
4435         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4436         * decl.c (struct binding_level): Remove this_block.
4437         (clear_binding_level): Likewise.
4438         (poplevel): Don't handle this_block.
4439         (set_block): Remove.
4440
4441 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4442
4443         * class.c (common_enclosing_context_p): Remove statement with no
4444         side-effects.
4445
4446 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4447
4448         PR java/8618
4449         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4450         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4451         (craft_constructor): Inherit access flags for implicit constructor
4452         from the enclosing class.
4453         (create_class): Fix comment typo.
4454         (resolve_qualified_expression_name): Pass type of qualifier to
4455         not_accessible_p, not the type in which target field was found.
4456         (not_accessible_p): Handle inner classes. Expand protected
4457         qualifier-subtype check to enclosing instances, but don't apply this
4458         check to static members. Allow protected access to inner classes
4459         of a subtype. Allow private access within common enclosing context.
4460         (build_super_invocation): Get WFL line number info from current
4461         class decl.
4462         (build_incomplete_class_ref): Update for new create_anonymous_class
4463         signature.
4464         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4465         common_enclosing_instance_p.
4466         * class.c (common_enclosing_context_p): New. Determine if types
4467         share a common enclosing context, even across static contexts.
4468         (common_enclosing_instance_p): Renamed from
4469         common_enclosing_context_p. Determines if types share a common
4470         non-static enclosing instance.
4471         * java-tree.h (common_enclosing_instance_p): Declare.
4472         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4473         for inner class constructors.
4474         (generate_classfile): Use get_method_access_flags.
4475
4476 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4477
4478         * class.c (interface_of_p): Check for null TYPE_BINFO.
4479
4480 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4481
4482         * class.c (make_class): Do not create binfo here.
4483         (set_super_info): Create it here.
4484         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4485
4486 2004-07-08  Richard Henderson  <rth@redhat.com>
4487
4488         * expr.c (case_identity, get_primitive_array_vtable,
4489         java_expand_expr, emit_init_test_initialization): Remove.
4490         * java-tree.h (java_expand_expr): Remove.
4491         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4492
4493 2004-07-07  Per Bothner  <per@bothner.com>
4494
4495         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4496         get internal error due to mismatched types.
4497
4498         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4499
4500         * gcj.texi (Linking):   New node.  Document -lgij usage.
4501
4502 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4503
4504         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4505         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4506         * java/class.c (set_super_info, class_depth, interface_of_p,
4507         maybe_add_interface, add_interface, make_class_data,
4508         layout_class, add_miranda_methods): Adjust BINFO macros.
4509         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4510         * jcf-write.c (generate_classfile): Likewise.
4511         * parse.y (patch_anonymous_class,
4512         check_inner_circular_reference, check_circular_reference,
4513         java_complete_class, check_abstract_method_definitions,
4514         java_check_abstract_method_definitions,
4515         check_interface_throws_clauses, java_check_abstract_methods,
4516         lookup_java_interface_method2,
4517         find_applicable_accessible_methods_list): Likewise.
4518         * typeck.c (find_method_in_interface): Likewise.
4519         * verify.c (merge_types): Likewise.
4520
4521 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4522
4523         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4524         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4525
4526 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4527
4528         * class.c (make_class): Use make_tree_binfo.
4529         (set_super_info, add_interface_do): Likewise.
4530         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4531
4532 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4533
4534         * verify.c: Correct array element access formatting thinko.
4535
4536 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4537
4538         * verify.c: Insert a short blurb at the start referring to the JVMS.
4539         (merge_type_state): Remove redundant nested if statement.
4540         (verify_jvm_instructions): Ensure current_subr is initialised to
4541         NULL_TREE.
4542         Minor formatting fixes all over the place.
4543
4544 2004-07-02  Richard Henderson  <rth@redhat.com>
4545
4546         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4547
4548 2004-07-01  Richard Henderson  <rth@redhat.com>
4549
4550         * class.c (registerClass_libfunc): Remove.
4551         (init_class_processing): Don't set it.
4552         (emit_register_classes): Take list_p parameter.  Fill it in
4553         with _Jv_RegisterClass calls.
4554         * decl.c (java_init_decl_processing): Don't call
4555         init_resource_processing.
4556         * jcf-parse.c (java_emit_static_constructor): New.
4557         (java_parse_file): Call it.
4558         * resource.c (registerResource_libfunc): Remove.
4559         (init_resource_processing): Remove.
4560         (write_resource_constructor): Take list_p parameter.  Fill it in
4561         with _Jv_RegisterResource calls.
4562         * java-tree.h: Update prototypes.
4563
4564 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4565
4566         PR java/1262
4567         * class.c (layout_class_method): Do not override package-private
4568         method if its in a different package.
4569         (split_qualified_name): Move here from parse.y. Rename from
4570         breakdown_qualified. Add comment.
4571         (in_same_package): Move here from parse.y. Add comment.
4572         * java-tree.h (break_down_qualified, in_same_package): Declare.
4573         (in_same_package): Likewise.
4574         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4575         Callers updated.
4576
4577 2004-06-29  Andrew Haley  <aph@redhat.com>
4578
4579         * except.c (expand_start_java_handler): Push a new binding level.
4580         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4581         register_exception_range() to register where we'll do it.
4582         (expand_end_java_handler): Remove old bogus code.  Replace with
4583         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4584         the top of the expression we're curently building.
4585         (maybe_end_try): Delete.
4586         * decl.c (binding_level.exception_range): New field.
4587         (clear_binding_level): Add field exception_range.  Reformat.
4588         (poplevel): Call expand_end_java_handler().
4589         (poplevel): Call java_add_stmt only if functionbody is false.
4590         (maybe_poplevels): Don't call maybe_end_try() from here.
4591         (end_java_method): Clear no longer used trees in function decl.
4592         (register_exception_range): New function.
4593         * java-tree.h (register_exception_range, struct eh_range): Declare.
4594
4595 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4596
4597         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4598
4599 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4600
4601         Formatting fixes.
4602         * expr.c (class_has_finalize_method): Fix method name indentation.
4603         (expand_java_call): Remove K&R style parameter declaration.
4604         (expand_invoke): Fix statement indentation.
4605         (expand_java_field_op): Likewise.
4606         * parse-scan.y: Fix typo.
4607         (reset_report): Fix method name indentation.
4608         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4609         line. Fix typos.
4610         * verify.c (verify_jvm_instructions): Document parameters, insert
4611         page break.
4612         * lang.c (lang_init_source): Fix method name indentation.
4613         * class.c (common_enclosing_context_p): Likewise.
4614         (emit_symbol_table): Fix parameter list indentation.
4615         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4616         parameter declaration.
4617         * constants.c: Fix copyright notice indentation.
4618         * typeck.c (find_method_in_superclasses): Fix parameter list
4619         indentation.
4620         (find_method_in_interfaces): Likewise.
4621         * zextract.c (makelong): Fix method name indentation.
4622
4623 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4624
4625         PR java/15715.
4626         * parse.y (create_interface): Set correct access modifiers for
4627         interfaces.
4628         * jcf-write.c (get_classfile_modifiers): New function.
4629         (generate_classfile): Use get_classfile_modifiers, not
4630         get_access_flags.
4631
4632 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4633
4634         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4635         dependency to current parser context, not NULL_TREE, for top-level
4636         classes.
4637         (jdep_resolve_class): Enable member access check for all inner
4638         class dependencies.
4639
4640 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4641
4642         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4643         load_class.
4644
4645 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4646
4647         PR java/15734
4648         * expr.c (expand_java_field_op): Ensure that target class for static
4649         field access has been loaded.
4650
4651 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4652             Ranjit Mathew  <rmathew@hotmail.com>
4653
4654         PR java/1207, java/16178
4655         * jcf-parse.c (load_class): Return immediately if passed a type decl
4656         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4657         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4658         before calling load_class.
4659         (qualify_and_find): Likewise.
4660         (find_in_imports_on_demand): Likewise.
4661         (find_applicable_accessible_methods_list): Likewise.
4662
4663 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4664
4665         * parse.y (java_layout_seen_class_methods): Don't call load_class
4666         on class defined by source parser.
4667
4668 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4669
4670         * parse.y (set_nested_class_simple_name_value): Removed.
4671         (java_complete_expand_class): Remove calls to
4672         set_nested_class_simple_name_value.
4673
4674 2004-06-22  Andrew Haley  <aph@redhat.com>
4675             Ranjit Mathew  <rmathew@hotmail.com>
4676
4677         Fixes PR java/16113.
4678         * decl.c (force_poplevels): Remove call to expand_end_bindings.
4679
4680 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
4681
4682         * parse.y (create_class): Correct diagnostic message about
4683         java.lang.Object extending anything else.
4684
4685 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4686
4687         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
4688         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
4689         * constants.c (build_ref_from_constant_pool): Likewise.
4690         * expr.c (build_java_array_length_access): Likewise.
4691         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
4692         (invoke_build_dtable, build_invokevirtual): Likewise.
4693         (build_invokeinterface, java_expand_expr): Likewise.
4694         (emit_init_test_initialization): Likewise.
4695         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4696         * parse.y (make_qualifed_name, build_array_ref): Likewise.
4697
4698 2004-06-21  Andrew Haley  <aph@redhat.com>
4699
4700         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
4701         block.
4702
4703 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
4704
4705         * jcf.h (struct JCF): Change java_source, right_zip and finished
4706         to unsigned int.
4707         * lex.h (struct java_lexer): Change hit_eof, read_anything,
4708         byte_swap and use_fallback to unsigned int.
4709         * parse.h (struct _jdep): Change flag0 to unsigned int.
4710
4711 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
4712
4713         Fixes PR java/13948
4714         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
4715         before trying to lay out its methods.
4716         * jcf-parse.c (read_class): Track parsed files using canonical paths
4717         obtained via lrealpath from libiberty.
4718         (java_parse_file): Likewise.
4719         (parse_source_file_1): Rename formal parameter to reflect its
4720         modified purpose. Minor formatting fix.
4721
4722 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4723
4724         * class.c (emit_register_classes): Make the function uninlinable,
4725         do not set current_function_cannot_inline.
4726         * resource.c (write_resource_constructor): Do not reset
4727         flag_inline_functions around rest_of_compilation.
4728
4729 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
4730
4731         PR java/15769
4732         * expr.c (java_truthvalue_conversion): Handle
4733         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
4734         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
4735         i.e. return the expression.
4736
4737 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
4738
4739         * gjavah.c: Include version.h
4740
4741 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
4742
4743         * jcf-write.c (generate_bytecode_conditional): Correct handling
4744         of unordered conditionals. Add comment.
4745
4746 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
4747             Per Bothner  <per@bothner.com>
4748
4749         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
4750         local variable was initialised upon declaration.
4751         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
4752         variable was final and initialised upon declaration.
4753         * check-init.c (check_final_reassigned): Give error only if a blank
4754         final is not definitely unassigned or if an initialised final is
4755         reassigned.
4756         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
4757         assignment expressions. Remove case MODIFY_EXPR, label do_default.
4758         (check_init): Perform initialised-variable-removing-optimisation
4759         only on non-final local variables.
4760
4761 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4762
4763         * jcf-write.c (generate_bytecode_conditional): Handle binops
4764         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
4765         and LTGT_EXPR.
4766         (generate_bytecode_insns): Likewise.
4767
4768 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4769
4770         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
4771         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
4772
4773 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
4774
4775         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
4776         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
4777
4778 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4779
4780         * decl.c (struct binding_level): Add GTY marker. Compile
4781         binding_depth unconditionally.
4782         (current_binding_level, free_binding_level, global_binding_level):
4783         Likewise.
4784         (clear_binding_level): Unconditionally set binding_depth.
4785         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
4786
4787 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
4788
4789         * lex.c (java_new_lexer): Set 'encoding'.
4790         (java_read_char): Improve error message for unrecognized characters.
4791         * lex.h (struct java_lexer): New field 'encoding'.
4792
4793 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
4794
4795         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
4796
4797 2004-05-21  Mark Wielaard  <mark@klomp.org>
4798
4799         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
4800         extern.
4801
4802 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
4803
4804         * typeck.c: Remove non-printable character 160.
4805
4806 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
4807
4808         * check-init.c: Correct minor typos.
4809
4810 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4811
4812         * Make-lang.in, expr.c, java-gimplify.c: Rename
4813         tree-simple.[ch] to tree-gimple.[ch].
4814
4815 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
4816
4817         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
4818
4819 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
4820
4821         Merge from tree-ssa-20020619-branch.  See
4822         ChangeLog.tree-ssa for details.
4823
4824         * Make-lang.in, builtins.c, check-init.c, class.c,
4825         constants.c, decl.c, except.c, expr.c, java-except.h,
4826         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
4827         lang.c, lang.opt, parse.y, resource.c: Merged.
4828         * java-gimplify.c: New file.
4829
4830 2004-05-10  Andrew Haley  <aph@redhat.com>
4831
4832         * parse.y (create_class): Set TYPE_VFIELD.
4833         * decl.c (java_init_decl_processing): Likewise.
4834
4835         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
4836         * class.c (make_method_value): Replace DECL_VINDEX with call to
4837         get_method_index().
4838         (get_dispatch_vector): Likewise.
4839         (layout_class_method): Likewise.
4840         Replace set of DECL_VINDEX with call to set_method_index().
4841         (set_method_index): New function.
4842         (get_method_index): New function.
4843         * java-tree.h (set_method_index): New function decl.
4844         (get_method_index): New function decl.
4845
4846 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
4847
4848         * parse.y (check_pkg_class_access): Add new argument
4849         and use it when cl is NULL to call lookup_cl on it.
4850         (parser_check_super_interface): Do not call lookup_cl.
4851         Pass this_decl to check_pkg_class_access and NULL
4852         instead of lookup_cl.
4853         (parser_check_super): Update for change in
4854         check_pkg_class_access.
4855         (do_resolve_class): Likewise.
4856         (process_imports): Likewise.
4857         (find_in_imports_on_demand): Likewise.
4858         (resolve_qualified_expression_name): Likewise.
4859
4860 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
4861
4862         Fixes PR java/9685, PR java/15073
4863         * parse.y (accessibility_string): New method.
4864         (not_accessible_field_error): Use accessibility_string()
4865         instead of java_accstring_lookup().
4866         (resolve_qualified_expression_name): Check with
4867         check_pkg_class_access() before allowing access using
4868         qualified names.
4869         Fix comment typo.
4870         Use check_pkg_class_access() instead of not_accessible_p()
4871         for unqualified types.
4872         (not_accessible_p): Use DECL_CONTEXT (member) instead of
4873         REFERENCE for package-private access checking.
4874         (patch_method_invocation): Use accessibility_string() instead
4875         of java_accstring_lookup().
4876
4877 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
4878
4879         Fixes PR java/15133
4880         * gjavah.c (struct method_name): Add member is_native.
4881         (overloaded_jni_method_exists_p): Match candidate method only if
4882         it is native.
4883         (print_method_info): Initialise is_native flag from the method's
4884         access flags.
4885
4886 2004-04-30  Roger Sayle  <roger@eyesopen.com>
4887
4888         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
4889         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
4890
4891 2004-04-22  Roger Sayle  <roger@eyesopen.com>
4892
4893         * resource.c (write_resource_constructor): Guard call to possibly
4894         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
4895
4896 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
4897
4898         * class.c (make_class_data): Add new field aux_info.
4899         * decl.c (java_init_decl_processing): Push type and decl for
4900         `aux_info'.
4901
4902 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
4903
4904         * expr.c (expand_java_NEW): Don't use size argument for
4905         _Jv_AllocObject calls.
4906         * parse.y (patch_invoke): Likewise.
4907
4908 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4909
4910         * expr.c (build_invokeinterface): Remove unused variables to
4911         fix warnings.
4912
4913 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
4914
4915         * class.c (get_interface_method_index): New function. Return dispatch
4916         index for interface method.
4917         (make_method_value): For interface methods, set index field to
4918         iface dispatch index, not DECL_VINDEX.
4919         * expr.c (build_invokeinterface): Use get_interface_method_index.
4920
4921 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4922
4923         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
4924
4925 2004-03-31  Andrew Haley  <aph@redhat.com>
4926
4927         PR java/14104
4928         * jcf-io.c (opendir_in_zip): Tidy up error handling.
4929
4930 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
4931
4932         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
4933         form of GTY markers.
4934
4935 2004-03-25  Marcus Meissner  <meissner@suse.de>
4936
4937         PR java/14689:
4938         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
4939
4940 2004-03-23  Tom Tromey  <tromey@redhat.com>
4941
4942         PR java/14315:
4943         * jcf-write.c (make_class_file_name): Don't report if mkdir
4944         failed with EEXIST.
4945
4946 2004-03-23  Tom Tromey  <tromey@redhat.com>
4947
4948         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
4949
4950 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
4951
4952         * class.c, gjavah.c, lang.c: Fix comment typos.
4953         * gcj.texi: Fix typos.
4954
4955 2004-03-19  Per Bothner  <per@bothner.com>
4956
4957         * gcj.texi (Code Generation):  Document new flags and assert defaults.
4958
4959         * class.c (assume_compiled_node_struct):  Rename type to
4960         class_flag_node_struct, as it is now also used for enable_assertions.
4961         Rename assume_compiled_node typedef.  Rename excludep field to value.
4962         (find_assume_compiled_node):  Rename function to find_class_flag_node.
4963         Minor optimization - avoid needless strlen.
4964         (add_assume_compiled):  Some tweaking and optimization.
4965         Rename and generalize to add_class_flag takem an extra parameter.
4966         (add_assume_compled):  New just calls add_class_flag.
4967         (add_enable_assert, enable_assertions):  New functions.
4968         (enable_assert_tree):  New static.
4969         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
4970         * lang.opt (fenable-assertions, fenable-assertions=,
4971         fdisable-assertions, fdisable-assertions=):  New options.
4972         * lang.c (java_handle_option):  Handle new options.
4973         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
4974         class in an interface - create helper class nested in outer interface.
4975         (build_assertion):  Short-circuit if enable_assertions is false.
4976
4977 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4978
4979         * java-tree.h: Changes throughout to add checking to macros
4980         and numerous whitespace changes.
4981         (VAR_OR_FIELD_CHECK): New macro.
4982         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
4983         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
4984
4985 2004-03-16  Per Bothner  <per@bothner.com>
4986
4987         * jcf-jump.c (options):  New --print-constants option.
4988         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
4989
4990         * jcf-dump.c (flag_print_constant_pool):  Default to off.
4991         (print_constant_terse_with_index):  New helper function.
4992         (various places):  Check flag_print_constant_pool where missing.
4993         (main):  If verbose set flag_print_constant_pool.
4994         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
4995
4996 2004-03-15  Andrew Haley  <aph@redhat.com>
4997
4998         PR java/14581
4999         * parse.y (java_complete_lhs): Check that final variable has an
5000         initializer.
5001
5002 2004-03-12  Andrew Haley  <aph@redhat.com>
5003
5004         PR java/14551
5005         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5006         conversion.
5007
5008 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5009
5010         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5011         is NULL.
5012
5013 2004-02-27  Per Bothner  <per@bothner.com>
5014
5015         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5016         suggestion:  Use build_incomplete_class_ref.
5017         This fixes PR java/13508, java/11714.
5018
5019 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5020
5021         * java/parse.h: Update copyright.
5022
5023 2004-02-26  Andrew Haley  <aph@redhat.com>
5024
5025         PR java/14231:
5026         * parse.y (check_interface_throws_clauses): Check for
5027         !METHOD_INVISIBLE (iface_method).
5028         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5029         well as CLASS_ABSTRACT.
5030
5031 2004-02-25  Per Bothner  <per@bothner.com>
5032
5033         * parse.y (build_assertion):  If we're in an inner class, create the
5034         class$ helper routine in the outer class.
5035
5036 2004-02-19  Richard Henderson  <rth@redhat.com>
5037
5038         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5039
5040 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5041
5042         * Make-lang.in (java.install-man): Add extra dependencies.
5043
5044 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5045
5046         * Make-lang.in: Install man pages under the same names
5047         (possibly transformed) as the program they document.
5048
5049 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5050
5051         * gjavah.c: Include "intl.h".
5052         (error): New function.
5053         (main): Call gcc_init_libintl.
5054         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5055         print_stub_or_jni, process_file, main): Use error rather than
5056         fprintf.
5057         (print_method_info, usage, help, version, main): Mark strings for
5058         translation with _.  Avoid splitting up sentences.  Send
5059         information messages to stdout.
5060         * jcf-dump.c: Include "intl.h".
5061         (main): Call gcc_init_libintl.
5062         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5063         Mark error, usage and version messages for translation with _.
5064         Avoid splitting up sentences.
5065         * jv-scan.c: Include "intl.h".
5066         (fatal_error, warning): Change parameter s to msgid.  Translate
5067         messages.
5068         (main): Call gcc_init_libintl.
5069         (usage, help, version): Mark error, usage and version messages for
5070         translation with _.  Avoid splitting up sentences.
5071         * jvgenmain.c: Include "intl.h".
5072         (main): Call gcc_init_libintl.
5073         (usage, main): Mark error messages for translation with _.
5074         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5075         JVGENMAIN_OBJS): Add intl.o.
5076         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5077         java/jvgenmain.o): Update dependencies.
5078
5079 2004-02-08  Per Bothner  <per@bothner.com>
5080
5081         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5082         class don't use not_accessible_field_error, which can get confused.
5083
5084 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5085
5086         Make-lang.in (po-generated):  Delete.
5087
5088 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5089
5090         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5091         Depend on target.h.
5092         * decl.c: Include target.h.
5093         (start_java_method): Replace PROMOTE_PROTOTYPES with
5094         targetm.calls.promote_prototypes.
5095         * expr.c: Include target.h.
5096         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5097         targetm.calls.promote_prototypes.
5098         * parse.y: Include target.h.
5099         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5100         with targetm.calls.promote_prototypes.
5101
5102 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5103
5104         * typeck.c: Update copyright.
5105
5106 2004-02-02  Tom Tromey  <tromey@redhat.com>
5107
5108         * decl.c (java_init_decl_processing): Remove duplicate
5109         gnu/gcj/RawData.
5110
5111 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5112
5113         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5114
5115 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5116
5117         * expr.c (build_field_ref): Move variable
5118         definition up.
5119
5120 2004-01-28  Andrew Haley  <aph@redhat.com>
5121
5122         * expr.c (build_field_ref): Widen field offset.
5123
5124 2004-01-27  Andrew Haley  <aph@redhat.com>
5125
5126         java/13273
5127         * parse.y (check_interface_throws_clauses): Make sure class_decl
5128         has been loaded.
5129
5130 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5131
5132         PR java/13733
5133         * parse.y (patch_assignment): Don't modify lhs_type for
5134         reference assignments.
5135
5136 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5137
5138         * Make-lang.in: Replace $(docdir) with doc.
5139         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5140         (java.install-man): Revamp rule.
5141
5142 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5143
5144         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5145         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5146         instead of deferred backquote.
5147
5148 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5149
5150         * typeck.c (find_method_in_interfaces): Move variable
5151         definition up.
5152
5153 2004-01-16  Andrew Haley  <aph@redhat.com>
5154
5155         PR java/13273:
5156         * typeck.c (shallow_find_method): New.
5157         (find_method_in_superclasses): New.
5158         (find_method_in_interfaces): New.
5159         (lookup_do): Rewrite.
5160         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5161
5162         * jcf-parse.c (read_class): Save and restore output_class.
5163         * decl.c (java_expand_body): Set output_class from fndecl.
5164
5165 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5166
5167         * class.c (gen_indirect_dispatch_tables): Fix string length
5168         calculations.
5169
5170 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5171
5172         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5173         (java.srcextra): Copy above back to source directory if requested.
5174         (po-generated): Delete reference to $(parsedir).
5175         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5176         Use implicit rule.
5177
5178 2004-01-14  Jan Hubicka  <jh@suse.cz>
5179
5180         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5181         estimation.
5182
5183 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5184
5185         * java-tree.h (java_expand_expr): Change prototype.
5186         * expr.c (java_expand_expr): Add alt_rtl parameter.
5187
5188 2004-01-09  Andrew Haley  <aph@redhat.com>
5189
5190         PR java/12755:
5191         * parse.y (java_fix_constructors):  Set output_class.
5192         (java_reorder_fields): Likewise.
5193         (java_layout_classes): Likewise.
5194         (java_expand_classes): Generate indirect dispatch tables.
5195         (java_expand_classes): Set output_class.
5196         (java_finish_classes): Likewise.
5197         * lang.c (java_init): Turn on always_initialize_class_p if we're
5198         using indirect dis[atch.
5199         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5200         (java_get_callee_fndecl): Use class local atable.
5201         * jcf-parse.c
5202         (always_initialize_class_p): Decl moved to java-tree.h.
5203         (HANDLE_CLASS_INFO): Set output_class.
5204         (read_class): Likewise.
5205         (parse_class_file): Call gen_indirect_dispatch_tables.
5206         (parse_zip_file_entries): Set output_class.
5207         (java_parse_file): Set output_class.  Don't emit symbol tables.
5208         * java-tree.h (output_class): New.
5209         Remove global declarations for otable, atable, and ctable.
5210         (always_initialize_class_p): moved here from decl.c.
5211         (DECL_OWNER): New.
5212         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5213         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5214         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5215         (struct lang_type): Add otable_methods, otable_decl,
5216         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5217         ctable_decl, catch_classes, type_to_runtime_map.
5218         * expr.c (build_field_ref): Make otable, atable, and ctable class
5219         local rather than global.
5220         (build_known_method_ref): Likewise.
5221         (build_invokeinterface): Likewise.
5222         (java_expand_expr): Pass runtime type (rather than actual type) to
5223         expand_start_catch.
5224         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5225         this class.  Look up each class in that map to delete duplicates.
5226         (expand_end_java_handler): Pass runtime type (rather than actual
5227         type) to expand_start_catch.
5228         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5229         (do_nothing): New.
5230         (java_init_decl_processing): Rearrange things.  Remove global
5231         declarations of otable, atable, and ctable.
5232         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5233         (java_expand_body): Set output_class.
5234         * constants.c (build_constant_data_ref): Use output_class, not
5235         current_class.
5236         (alloc_name_constant): Likewise.
5237         * class.c (gen_indirect_dispatch_tables): New.
5238         (build_class_ref): Generate hard reference to superclass, even if
5239         using indirect dispatch.
5240         (build_static_field_ref): Use class local atable.
5241         (make_class_data): Generate hard reference to superclass, even if
5242         using indirect dispatch.
5243         Generate symbolic references to interfaces when using indirect
5244         dispatch.
5245         (make_class_data): Emit otable, atable, and ctable.
5246         Make otable, atable, and ctable class local rather than global.
5247         (emit_catch_table): Make otable, atable, and ctable class local
5248         rather than global.
5249
5250 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5251
5252         * parse.y (catch_clause_parameter): Fix typo.
5253
5254         PR java/13404
5255         * parse.y: (catch_clause_parameter): Return early if $3, aka
5256         formal_parameter, is null.
5257
5258 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5259
5260         * class.c: Remove uses of "register" specifier in
5261         declarations of arguments and local variables.
5262         * decl.c: Likewise.
5263         * expr.c: Likewise.
5264         * gjavah.c: Likewise.
5265         * jcf-dump.c: Likewise.
5266         * jcf-io.c: Likewise.
5267         * jcf-parse.c: Likewise.
5268         * jcf-write.c: Likewise.
5269         * keyword.h: Likewise.
5270         * parse.y: Likewise.
5271         * typeck.c: Likewise.
5272         * verify.c: Likewise.
5273
5274 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5275
5276         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5277         (java.install_common, java.install-man): Adjust for above.
5278         (java.uninstall): Likewise.
5279
5280 2003-12-03  Michael Koch  <konqueror@gmx.de>
5281
5282         * class.c (make_class_data):
5283         Push field value to 'hack_signers' instead of 'signers'.
5284         * decl.c (java_init_decl_processing):
5285         Push field 'hack_signers' instead of 'signers'.
5286
5287 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5288
5289         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5290         including iconv.h.
5291
5292 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5293
5294         PR java/12374:
5295         * parse.y (qualify_ambiguous_name): Remove lots of broken
5296         field access processing - there's no need to do that here,
5297         because we have resolve_field_access.  Remove
5298         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5299         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5300         used.
5301
5302 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5303
5304         Fix PR java/13237
5305         * parse.y (java_complete_lhs): Save location prior to patching
5306         CALL_EXPR.
5307
5308 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5309
5310         PR java/12548
5311         * resource.c (write_resource_constructor): Append
5312         "_resource" to constructor identifier name.
5313
5314 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5315
5316         Fix PR java/13183.
5317         * constants.c (cpool_for_class): New function.
5318         (outgoing_cpool): Remove global variable.
5319         (alloc_name_constant): Use cpool_for_class.
5320         (build_constants_constructor): Likewise.
5321         * decl.c (java_expand_body): Set current_class.
5322         * java-tree.h (outgoing_cpool) Remove declaration.
5323         (init_outgoing_cpool): Likewise.
5324         * jcf-parse.c (init_outgoing_cpool): Remove function.
5325         (parse_class_file): Don't call init_outgoing_cpool.
5326         * parse.y (java_complete_expand_methods): Don't call
5327         init_outgoing_cpool.  Don't save outgoing_cpool.
5328         (java_expand_classes): Don't restore outgoing_cpool.
5329         (java_finish_classes): Likewise.
5330
5331 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5332
5333         * Make-lang.in: (java.install-common) Add
5334         symlink for $(target_noncanonical)-gcjh for
5335         native builds.
5336
5337 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5338
5339         * Make-lang.in (java.extraclean): Delete.
5340
5341 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5342
5343         * Make-lang.in (check-java): Add.
5344
5345 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5346
5347         Fix PR java/13024.
5348         * except.c (prepare_eh_table_type): Allocate variable-sized
5349         buffer `buf' with alloca.
5350
5351 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5352
5353         Fix PR java/12857.
5354
5355         decl.c (java_init_decl_processing): Don't initialize
5356         class_not_found_type_node, no_class_def_found_type_node.
5357
5358         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5359         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5360         (class_not_found_type_node, no_class_def_found_type_node):
5361         Don't define.
5362
5363         parse.y (build_dot_class_method_invocation): Add this_class
5364         argument.  Qualify method invocations to a different class.
5365         (create_new_parser_context): Initialize saved_data_ctx to 0.
5366         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5367         (build_dot_class_method): Don't load classes.  Register
5368         incomplete types.
5369         (build_incomplete_class_ref): Special cases for interfaces
5370         and inner classes.  Move build_dot_class_method call to here...
5371         (patch_incomplete_class_ref): ...from here.  Pass current_class
5372         to build_dot_class_method_invocation.
5373         (build_assertion): Pass class_type to
5374         build_dot_class_method_invocation.
5375         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5376
5377 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5378
5379         Fix PR java/12739.
5380         * java-tree.h (BLOCK_EMPTY_P): Define.
5381         * parse.y (java_complete_lhs): Check for empty blocks
5382         in TRY_FINALLY_EXPR case.
5383
5384 2003-11-17  Andrew Haley  <aph@redhat.com>
5385
5386         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5387         (struct lang_decl_var:freed): New variable.
5388         * decl.c (poplevel): Mark local vars that have gone out of scope.
5389         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5390         scope.
5391
5392 2003-11-16  Jason Merrill  <jason@redhat.com>
5393
5394         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5395         and TAGS files that include them for each front end.
5396
5397 2003-11-15  Tom Tromey  <tromey@redhat.com>
5398
5399         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5400
5401 2003-11-12  Jason Merrill  <jason@redhat.com>
5402
5403         PR optimization/12547
5404         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5405         BLOCK_EXPR_BODY directly.
5406
5407 2003-11-12  Andrew Haley  <aph@redhat.com>
5408
5409         PR java/11045
5410         * parse.y (fold_constant_for_init): Check that we really do have a
5411         constant.
5412
5413         PR java/11533
5414         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5415         init_test_decls being inlined.
5416
5417         PR java/12890:
5418         * parse.y (do_resolve_class): Check return value from
5419         breakdown_qualified().
5420
5421 2003-11-11  Tom Tromey  <tromey@redhat.com>
5422
5423         PR java/12915:
5424         * parse.y (merge_string_cste): Handle case where we have a
5425         pointer that happens to be zero, not null_pointer_node.
5426
5427 2003-11-10  Tom Tromey  <tromey@redhat.com>
5428
5429         * jcf-parse.c (classify_zip_file): Correctly compare
5430         filename_length against length of manifest file's name.
5431
5432 2003-11-08  Tom Tromey  <tromey@redhat.com>
5433
5434         PR java/12894:
5435         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5436
5437 2003-11-06  Andrew Haley  <aph@redhat.com>
5438
5439         * expr.c (java_stack_swap): Make sure destination stack slots are
5440         of the correct type.
5441
5442 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5443
5444         * Make-lang.in (dvi): Move targets to $(docobjdir).
5445         (gcj.dvi): Simplify rule and adjust target.
5446         (gcj.info): Simplify rule.
5447         (gcj.pod): New intermediate rule.
5448         (gcjh.pod): Likewise.
5449         (jv-scan.pod): Likewise.
5450         (jcf-dump.pod): Likewise.
5451         (gij.pod): Likewise.
5452         (jv-convert.pod): Likewise.
5453         (rmic.pod): Likewise.
5454         (rmiregistry.pod): Likewise.
5455         (gcj.1): Delete.
5456         (gcjh.1): Delete.
5457         (jv-scan.1): Delete.
5458         (jcf-dump.1): Delete.
5459         (gij.1): Delete.
5460         (jv-convert.1): Delete.
5461         (rmic.1): Delete.
5462         (rmiregistry.1): Delete.
5463
5464 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5465
5466         Fixes PR java/12866.
5467         * parse.y (resolve_qualified_expression_name): Move test
5468         for outer field access methods from here...
5469         (check_thrown_exceptions) ...to here.
5470
5471 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5472
5473         * .cvsignore: Delete.
5474
5475 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5476
5477         * verify.c (verify_jvm_instructions): Don't warn about legal
5478         eh binding regions generated for example by jdk 1.4.1.
5479
5480 2003-10-24  David S. Miller  <davem@redhat.com>
5481
5482         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5483
5484 2003-10-22  Andrew Haley  <aph@redhat.com>
5485
5486         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5487         (java_get_callee_fndecl): New.
5488
5489         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5490
5491         * java-tree.h (ctable_decl): New.
5492         (catch_classes):  New.
5493         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5494
5495         * decl.c (java_init_decl_processing): Add catch_class_type.
5496         Add ctable_decl.
5497         Add catch_classes field.
5498
5499         * class.c (build_indirect_class_ref): Break out from
5500         build_class_ref.
5501         (make_field_value): Check flag_indirect_dispatch.
5502         (make_class_data): Ditto.
5503         Tidy uses of PUSH_FIELD_VALUE.
5504         Add field catch_classes.
5505         (make_catch_class_record): New.
5506
5507         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5508
5509 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5510
5511         * jcf-write.c: Follow spelling conventions.
5512         * parse.y: Likewise.
5513
5514 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5515
5516         * ChangeLog: Fix typos.
5517         * expr.c: Fix comment typos.
5518         * jcf-write.c: Likewise.
5519         * lang.c: Likewise.
5520         * lex.c: Likewise.
5521         * mangle.c: Likewise.
5522         * parse-scan.y: Likewise.
5523         * parse.y: Likewise.
5524
5525 2003-10-22  Tom Tromey  <tromey@redhat.com>
5526
5527         * expr.c (expand_byte_code): Only warn about dead bytecode when
5528         extra_warnings is set.
5529
5530 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5531
5532         Fix for PR java/12586.
5533         * mangle.c (find_compression_record_match): Don't iterate through
5534         package namespace elements unless they all match compression_table
5535         entries.
5536
5537 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5538
5539         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5540         (generate-manpages): Likewise.
5541         (java.maintainer-clean): Likewise.
5542         (gcj.info): Likewise.
5543         (gcj.1): Likewise.
5544         (gcjh.1): Likewise.
5545         (jv-scan.1): Likewise.
5546         (jcf-dump.1): Likewise.
5547         (gij.1): Likewise.
5548         (jv-convert.1): Likewise.
5549         (rmic.1): Likewise.
5550         (rmiregistry.1): Likewise.
5551         (java.install-man): Likewise.
5552         (parse-scan.o): Move and define complete compile line.
5553         (parse.o): Likewise.
5554         (jcf-tree-inline.o): Move.
5555
5556 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5557
5558         * Make-lang.in (info): Update dependencies.
5559         (java.install-info): Remove.
5560         ($(srcdir)/java/gcj.info): Replace with ...
5561         ($(docobjdir)/gcj.info): ... this.
5562
5563 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5564
5565         * Make-lang.in: Replace uses of $(target_alias) with
5566         $(target_noncanonical).
5567
5568 2003-10-09  Tom Tromey  <tromey@redhat.com>
5569
5570         * decl.c (java_init_decl_processing): Declare signers field.
5571         * class.c (make_class_data): Set signers field.
5572
5573 2003-10-09  Jason Merrill  <jason@redhat.com>
5574
5575         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5576         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5577         POINTER_TYPE.
5578
5579 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5580
5581         * Make-lang.in (java.info): Replace with ...
5582         (info): ... this.
5583         (java.dvi): Replace with ...
5584         (dvi): ... this.
5585         (java.generated-manpages): Replace with ...
5586
5587 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5588
5589         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5590
5591 2003-10-01  Andrew Haley  <aph@redhat.com>
5592
5593         * jcf-parse.c (java_parse_file): Write otable and atable.
5594         * java-tree.h (atable_methods): New.
5595         (atable_decl): New.
5596         (atable_syms_decl): New.
5597         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5598         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5599         (symbol_*type): Rename method_symbol* to symbol*type.
5600         (emit_offset_symbol_table): Delete.
5601         (emit_symbol_table): New.
5602         (get_symbol_table_index): New.
5603         (atable_type): New.
5604         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5605         (build_known_method_ref): Likewise.
5606         (get_symbol_table_index): Rename from get_offset_table_index.
5607         Parameterize to allow re-use by differing types of symbol table.
5608         (build_invokevirtual): Pass table to get_offset_table_index.
5609         * decl.c (java_init_decl_processing): Push types and decls for
5610         atable and atable_syyms.
5611         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5612         (make_class_data): Add new fields atable and atable_syms.
5613         (emit_symbol_table): Rename from emit_offset_symbol_table.
5614         Parameterize to allow re-use by different types of symbol table.
5615         (build_symbol_entry): Renamed from build_method_symbols_entry.
5616
5617 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5618
5619         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5620         semantics for SAVE_EXPR, by caching the result in a temporary.
5621
5622 2003-09-28  Richard Henderson  <rth@redhat.com>
5623
5624         * check-init.c (check_init): Save and restore input_location
5625         instead of file and line separately.
5626         * decl.c (java_expand_body): Likewise.
5627         * jcf-write.c (generate_bytecode_insns): Likewise.
5628         * parse.y (safe_layout_class): Likewise.
5629         * jcf-parse.c (read_class, parse_class_file): Likewise.
5630         (java_parse_file): Use %H for warning locator.
5631
5632 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5633
5634         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5635         with void-type branches instead of using a COMPOUND_EXPR.
5636
5637 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5638
5639         * decl.c (java_optimize_inline, dump_function): Remove.
5640         * java-tree.h (java_optimize_inline): Remove declaration.
5641         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5642         * parse.y (source_end_java_method, java_expand_classes):
5643         Likewise.  Remove dead code.
5644
5645 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5646
5647         * lang.c (java_init_options): Set flag_evaluation_order.
5648         * expr.c (force_evaluation_order): Don't attempt to force
5649         evaluation order of binary operations using save_expr.
5650         * parse.y (java_complete_lhs): No longer need to call
5651         force_evaluation_order when constructing binary operators.
5652
5653 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5654             Bryce McKinlay  <bryce@mckinlay.net.nz>
5655
5656         PR java/1333:
5657         * parse.y (not_accessible_field_error): New function.
5658         (resolve_expression_name): Check field access permissions.
5659         (resolve_qualified_expression_name): Use
5660         not_accessible_field_error.
5661         (resolve_qualified_expression_name): Likewise.
5662
5663 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5664
5665         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5666
5667 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5668
5669         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5670         with equal operands without side-effects.
5671
5672 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5673
5674         * decl.c (java_init_decl_processing): Don't emit otable decls
5675         if flag_indirect_dispatch is not set.
5676
5677 2003-09-21  Richard Henderson  <rth@redhat.com>
5678
5679         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5680         resource.c: Revert.
5681
5682 2003-09-21  Richard Henderson  <rth@redhat.com>
5683
5684         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
5685         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
5686
5687 2003-09-20  Richard Henderson  <rth@redhat.com>
5688
5689         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
5690
5691 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5692
5693         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
5694         * check-init.c (check_init): Likewise.
5695
5696 2003-09-18  Roger Sayle  <roger@eyesopen.com>
5697
5698         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
5699
5700 2003-09-16  Andrew Haley  <aph@redhat.com>
5701
5702         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
5703
5704 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
5705
5706         Fixes PR java/9577
5707         * mangle.c (find_compression_record_match): Skip
5708         over a "6JArray" (the array template mangled string)
5709         IDENTIFIER_NODE.
5710         (mangle_array_type): Correct minor typo.
5711         (atms): Move definition to the beginning.
5712
5713 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
5714
5715         * class.c (add_miranda_methods): Ensure super-interfaces are laid
5716         out. Fix for PR java/12254.
5717
5718 2003-09-11  Richard Henderson  <rth@redhat.com>
5719
5720         * parse.y (source_end_java_method): Update for new
5721         cgraph_finalize_function argument.
5722
5723 2003-09-09  Richard Henderson  <rth@redhat.com>
5724
5725         * parse.y (source_end_java_method): Update call to
5726         cgraph_finalize_function.
5727
5728 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
5729
5730         * decl.c (java_expand_body): New function.
5731         * expr.c (build_class_init): Set DECL_IGNORED_P.
5732         * java-tree.h (start_complete_expand_method,
5733         java_expand_body): Declare.
5734         * jcf-parse.c (cgraph.h): Include.
5735         (java_parse_file): Handle flag_unit_at_a_time.
5736         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
5737         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
5738         (java_estimate_num_insns): Use walk_tree_without_duplicates.
5739         (java_start_inlining): New function.
5740         * parse.h (java_finish_classes): Declare.
5741         * parse.y: Include cgraph.h.
5742         (block): Don't special-case empty block production.
5743         (craft_constructor): Set DECL_INLINE.
5744         (source_end_java_method): Handle flag_unit_at_a_time.
5745         Replace inline code with call to java_expand_body.
5746         (start_complete_expand_method): Remove static modifier.
5747         (java_expand_method_bodies): Patch function tree for
5748         class initialization and/or synchronization as needed.
5749         Don't begin RTL expansion yet.
5750         (java_expand_classes): Check flag_unit_at_a_time before
5751         calling finish_class.
5752         (java_finish_classes): New function.
5753         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
5754         (patch_assignment): Set DECL_CONTEXT on temporary variable.
5755         (emit_test_initialization): Set DECL_IGNORED_P.
5756
5757 2003-09-03  Roger Sayle  <roger@eyesopen.com>
5758
5759         * builtins.c (enum builtin_type): Delete unused enumeration.
5760         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
5761
5762 2003-08-28  Tom Tromey  <tromey@redhat.com>
5763
5764         * gcj.texi (Extensions): Document gcjlib URLs.
5765
5766 2003-08-20  Tom Tromey  <tromey@redhat.com>
5767
5768         * gcj.texi (Extensions): Added xref.
5769         (libgcj Runtime Properties): Document
5770         gnu.gcj.runtime.VMClassLoader.library_control.
5771
5772 2003-08-20  Andrew Haley  <aph@redhat.com>
5773
5774         * except.c (prepare_eh_table_type): Use new encoding for exception
5775         handlers when using -fno-assume-compiled.
5776
5777 2003-08-13  Tom Tromey  <tromey@redhat.com>
5778
5779         * gcj.texi (Invoking gij): Document -X and -?.
5780
5781 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
5782
5783         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
5784         GCJH_OBJS, JCFDUMP_OBJS
5785         * win32-host.c: Removed the unnecessary and broken dependency
5786         on jcf.h
5787
5788 2003-08-11  Tom Tromey  <tromey@redhat.com>
5789
5790         * parse.y (java_check_regular_methods): Typo fixes.  Call
5791         check_interface_throws_clauses.  Use
5792         check_concrete_throws_clauses.
5793         (check_interface_throws_clauses): New function.
5794         (check_concrete_throws_clauses): New function.
5795         (hack_is_accessible_p): New function.
5796         (find_most_specific_methods_list): Added FIXME.
5797         * typeck.c (lookup_do): Use `flags' argument to decide what to
5798         do.  Reimplemented.
5799         (lookup_argument_method_generic): New function.
5800         (lookup_argument_method2): Removed.
5801         * jcf.h (ACC_INVISIBLE): New define.
5802         * jcf-write.c (generate_classfile): Skip invisible methods.
5803         * class.c (add_miranda_methods): New function.
5804         (layout_class_methods): Use it.
5805         (get_access_flags_from_decl): Use ACC_INVISIBLE.
5806         * java-tree.h (METHOD_INVISIBLE): New define.
5807         (lang_decl_func) [invisible]: New field.
5808         (lookup_argument_method_generic): Declare.
5809         (SEARCH_INTERFACE): New define.
5810         (SEARCH_SUPER): Likewise.
5811         (SEARCH_ONLY_INTERFACE): Likewise.
5812         (SEARCH_VISIBLE): Likewise.
5813         (lookup_argument_method2): Removed declaration.
5814
5815 2003-08-05  Tom Tromey  <tromey@redhat.com>
5816
5817         Fix for PR java/11600:
5818         * parse.y (java_complete_lhs): See whether we're calling a method
5819         on an array.
5820         (check_thrown_exceptions): Added `is_array_call' argument;
5821         fixed `clone' checking; updated all callers.
5822
5823 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
5824
5825         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
5826
5827 2003-08-03  Tom Tromey  <tromey@redhat.com>
5828
5829         * java-tree.h (METHOD_TRANSIENT): Removed.
5830         * decl.c (pushdecl): Removed some dead code.
5831         * class.c (get_access_flags_from_decl): Can't have transient
5832         method.
5833         (add_method_1): Can't have a transient method.
5834
5835 2003-07-28  Andreas Jaeger  <aj@suse.de>
5836
5837         * jvspec.c: Convert to ISO C90 prototypes.
5838
5839 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
5840
5841         * decl.c (force_poplevels): Fix warning call.
5842
5843 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5844
5845         * expr.c (expand_java_field_op): Don't use xxx_with_decl
5846         (expand_java_field_op): Likewise.
5847         * class.c (layout_class_method): Likewise
5848         (emit_register_classes): Likewise.
5849         * decl.c (pushdecl): Likewise.
5850         (poplevel): Likewise.
5851         (force_poplevels): Likewise.
5852         (give_name_to_locals): Likewise.
5853         * check-init.c (check_for_initialization): Likewise.
5854
5855 2003-07-24  Jason Merrill  <jason@redhat.com>
5856
5857         * java-tree.h: Move boolean_type_node et al to the back end.
5858
5859 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5860
5861         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
5862         casts.
5863
5864 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
5865
5866         * lang.opt: Don't show -MD_ and -MDD_.
5867
5868 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
5869
5870         * lang-options.h: Remove.
5871         * lang.opt: Add help text.
5872
5873 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
5874
5875         * expr.c: Remove the last argument to expand_assignment().
5876
5877 2003-07-09  Jan Hubicka  <jh@suse.cz>
5878
5879         * java-tree.h (DECL_NUM_STMTS): Rename to...
5880         (DECL_ESTIMATED_INSNS): ... this.
5881         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
5882         New static functions.
5883         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
5884         * parser.y (add_stmt_to_compound): Do not account statements.
5885
5886 2003-07-08  Mark Wielaard  <mark@klomp.org>
5887
5888         * gcj.texi: CNI now expands to Compiled Native Interface.
5889
5890 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5891
5892         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
5893
5894 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5895
5896         * expr.c (expand_byte_code): Adjist emit_line_note call.
5897
5898 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
5899
5900         * lang.c (java_handle_option): Don't handle filenames.
5901
5902 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
5903
5904         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
5905         DIR_SEPARATOR.
5906         Use FILENAME_CMP.
5907         * jcf-write.c: Don't default-define DIR_SEPARATOR.
5908         * jcf.h: Delete COMPARE_FILENAMES definition.
5909
5910 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
5911
5912         * lang.c (java_init_options): Update prototype.
5913
5914 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
5915
5916         * decl.c (poplevel): Adjust define_label call.
5917
5918 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
5919
5920         * gjavah.c (flag_jni): Make non-static.
5921         * parse-scan.y (ctxp): Make non-static.
5922
5923         * class.c (build_method_symbols_entry)
5924         * expr.c (get_offset_table_index)
5925         * jcf-parse.c (jcf_parse):
5926         Mark the definition static, matching the forward declaration.
5927
5928 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
5929
5930         * lang.c (java_handle_option): Don't check for missing arguments.
5931
5932 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
5933
5934         * class.c (push_class): Use a location_t to save place.
5935         (emit_register_classes): Set input_location. Adjust
5936         expand_function_end call.
5937         * resource.c (write_resource_constructor): Likewise.
5938         * decl.c (end_java_method): Adjust expand_function_end call.
5939         * parse.y (source_end_java_method): Likewise.
5940
5941 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
5942
5943         * lang.c (java_handle_option): Likewise.
5944
5945 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
5946
5947         * lang.c (java_handle_option): Special-casing of optional
5948         joined arguments no longer needed.
5949         * lang.opt: Update switches that take optional argument.
5950
5951 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5952
5953         * lang.opt: Declare Java.
5954         * lang.c (java_init_options): Update.
5955
5956 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
5957
5958         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
5959
5960 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5961
5962         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
5963         * lang.c (java_handle_option): -MD and -MMD have an underscore.
5964         * lang.opt: -MD and -MMD have an underscore.
5965
5966 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
5967
5968         * class.c (emit_register_classes): Adjust init_function_start
5969         call.
5970         * decl.c (complete_start_java_method): Likewise.
5971         * resource.c (write_resource_constructor): Likewise.
5972
5973 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
5974
5975         * Make-lang.in: Update to use options.c and options.h.
5976         * lang.c: Include options.h not j-options.h.
5977         (java_handle_option): Abort on unrecognized option.
5978         (java_init_options): Request Java switches.
5979
5980 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
5981
5982         * Make-lang.in: Handle mostlyclean.
5983
5984 2003-06-11  Tom Tromey  <tromey@redhat.com>
5985
5986         * lang.c (java_handle_option): Update dependency_tracking for
5987         OPT_MF case.
5988
5989         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
5990         empty argument.
5991
5992 2003-06-10  Andrew Haley  <aph@redhat.com>
5993
5994         * resource.c (write_resource_constructor): Use expand_expr to
5995         generate the address of the label attached to a resource.
5996         * Make-lang.in (java/resource.o): Add expr.h
5997
5998 2003-06-10  Andrew Haley  <aph@redhat.com>
5999
6000         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6001         (java_decl_ok_for_sibcall): New.
6002
6003 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6004
6005         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6006         (java/j-options.c, java/j-options.h): New.
6007         * java-tree.h (resource_name, compile_resource_file,
6008         compile_resource_data): Constify.
6009         * jcf-write.c (jcf_write_base_directory): Similarly.
6010         * jcf.h (jcf_write_base_directory): Similarly.
6011         * lang.c: Include j-options.h.
6012         (cl_options_count, cl_options, string_option, java_decode_option,
6013         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6014         process_option_with_no): Remove.
6015         (resource_name): Constify.
6016         (LANG_HOOKS_HANDLE_OPTION): Override.
6017         (java_handle_option): New.
6018         (java_init): Don't call jcf_path_init.
6019         (java_init_options): Call jcf_path_init.
6020         * lang.opt: New.
6021         * resource.c (compile_resource_data, compile_resource_file): Constify.
6022
6023 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6024
6025         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6026         (struct lang_decl_func): Add last_line field.
6027         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6028         DECL_SOURCE_LINE_LAST): Remove.
6029         * parse.y (missing_return_error, finish_method_declaration,
6030         lookup_cl, start_artificial_method_body, source_end_java_method,
6031         start_complete_expand_method): Adjust.
6032
6033 2003-06-08  Tom Tromey  <tromey@redhat.com>
6034
6035         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6036         fno-assume-compiled.
6037
6038 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6039
6040         * builtins.c (define_builtin_type, builtin_types): Delete.
6041         (define_builtin): Rewritten to take just the built-in code,
6042         the function's name, type and fallback library function name.
6043         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6044         (initialize_builtins): Overhaul to define the GCC builtins
6045         used by gcj manually, providing the Java run-time's
6046         implementations as the fallback library function.
6047
6048 2003-06-08  Anthony Green  <green@redhat.com>
6049
6050         * parse.y (patch_cast): Fix conversions from floating-point to
6051         integral types.
6052
6053 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6054
6055         * Make-lang.in: Update.
6056         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6057
6058 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6059
6060         * lang.c (java_init_options): Update.
6061
6062 2003-06-05  Jan Hubicka  <jh@suse.cz>
6063
6064         * Make-lang.in:  Add support for stageprofile and stagefeedback
6065
6066 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6067
6068         * lang.c (java_init_options): Prescribe wrap-around two's
6069         complement arithmetic overflow by setting flag_wrapv.
6070
6071 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6072
6073         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6074         (builtin_record): Add an additional builtin_code field to
6075         record which GCC built-in corresponds to the Java function.
6076         (java_builtins):  Add new entries for atan, atan2, exp, log,
6077         pow and tan.
6078         (max_builtin, min_builtin, abs_builtin): Perform constant
6079         folding on the resulting tree.
6080         (java_build_function_call_expr): Likewise, perform constant
6081         folding on the resulting tree.
6082         (initialize_builtins): The NULL creators are now allowed in
6083         the java_builtins table, which is now terminated by an entry
6084         with builtin_code == END_BUILTINS.
6085         (check_for_builtin): Likewise.  If the matching creator is
6086         NULL, construct the call using java_build_function_call_expr
6087         directly with the decl for the corresponding builtin_code.
6088
6089 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6090
6091         * win32-host.c: Normalize copyright boilerplate.
6092
6093 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6094
6095         * parse.y (print_int_node): Use string concatentation on
6096         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6097         function calls into one.
6098
6099 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6100
6101         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6102         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6103         all the affected error messages.
6104
6105 2003-05-13  Richard Henderson  <rth@redhat.com>
6106
6107         * class.c (layout_class_method): Set DECL_EXTERNAL.
6108         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6109         * java-tree.h (java_mark_class_local): Declare.
6110         * jcf-parse.c (parse_class_file): Use it.
6111         * parse.y (java_expand_classes): Likewise.
6112
6113 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6114
6115         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6116         * lex.h: #include input.h.
6117         * jv-scan.c (input_filename): Remove.
6118
6119 2003-05-02  Tom Tromey  <tromey@redhat.com>
6120
6121         PR java/10491:
6122         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6123         (handle_inner_classes): New function.
6124
6125 2003-05-01  Tom Tromey  <tromey@redhat.com>
6126
6127         PR java/10459:
6128         * parse.y (finish_for_loop): Do nothing if update expression is a
6129         EXPR_WFL_NODE wrapping nothing.
6130         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6131
6132 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6133
6134         * lex.h (input_lineno): Remove declaration.
6135         * parse-scan.y: #include input.h.
6136         (input_filename): Remove declaration.
6137         (input_location): Add definition.
6138         (input_line): Remove definition.
6139
6140 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6141
6142         * lex.h (lineno): Rename to ...
6143         (input_line): ... here
6144         * parse-scan.y (lineno): Rename to ...
6145         (input_line): ... here.
6146         (reset_report): Rename lineno to input_line.
6147         * check-init.c (check_init): Likewise.
6148         * class.c (push_class): Likewise.
6149         * decl.c (complete_start_java_method, end_java_method): Likewise.
6150         * expr.c (expand_byte_code): Likewise.
6151         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6152         * jcf-write.c (generate_bytecode_insns): Likewise.
6153         * lex.c (java_init_lex, java_allocate_new_line,
6154         do_java_lex): Likewise.
6155         * parse.h (YYNOT_TWICE): Likewise.
6156         * parse.y (empty_statement, expression_statement,
6157         java_pop_parser_context, java_parser_context_save_global,
6158         yyerror, register_fields, method_header, safe_layout_class,
6159         find_in_imports_on_demand, create_artificial_method,
6160         source_end_java_method, start_complete_expand_method,
6161         build_thisn_assign, java_complete_lhs,
6162         maybe_absorb_scoping_block): Likewise.
6163
6164 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6165
6166         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6167         '/' when computing java source filename
6168
6169 2003-04-13  Tom Tromey  <tromey@redhat.com>
6170
6171         * gjavah.c (print_c_decl): Indentation fix.
6172
6173 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6174
6175         * class.c (make_field_value, make_method_value, get_dispatch_table)
6176         (make_class_data, emit_offset_symbol_table)
6177         * constants.c (build_constants_constructor)
6178         * java-tree.h (START_RECORD_CONSTRUCTOR)
6179         * parse.y (maybe_build_array_element_wfl):
6180         Use build_constructor.
6181
6182 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6183
6184         PR java/10253:
6185         * parse.y (string_convert_int_cst): Always use at least one digit
6186         in string conversion. Remove ASCII dependence.
6187         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6188
6189 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6190
6191         * Make-lang.in: added win32-host.c
6192         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6193         resolves to open() on non-Win32 platforms and
6194         Win32-specific jcf_open_exact_case() on Win32
6195         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6196         when trying .java and .class files
6197         * win32-host.c: added to repository. Defines
6198         Win32-specific jcf_open_exact_case()
6199
6200 2003-04-10  Andrew Haley  <aph@redhat.com>
6201
6202         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6203         (maybe_free_localvar): Renamed from localvar_free.
6204         Add new arg, really.
6205         (generate_bytecode_insns): Set new variable, jsrs.
6206         Only free local vars if no jsr insns have been emittted.
6207         Call maybe_free_localvar, not localvar_free.
6208
6209 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6210
6211         * gcj.texi: Remove @ at start of file.
6212
6213 2003-03-25  Tom Tromey  <tromey@redhat.com>
6214
6215         * parse.y (create_interface): Call CHECK_DEPRECATED.
6216
6217 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6218
6219         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6220
6221 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6222
6223         * javaop.h (jfloat, jdouble): Make them structures mirroring
6224         the bit fields of IEEE float and double respectively.
6225         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6226         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6227         (union Word, union DWord): Delete.
6228         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6229
6230         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6231         D_NAN_MASK): Delete.
6232         (jni_print_float, jni_print_double): New.  Generate
6233         hexadecimal floating constants.
6234         (print_field_info): Use jni_print_float/double.
6235
6236         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6237         finite floating point numbers for output; special case
6238         non-finite floats.
6239
6240 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6241
6242         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6243         Replace 0 and 1 with true and false in return statements.
6244
6245 2003-03-19  Tom Tromey  <tromey@redhat.com>
6246
6247         * lex.c (do_java_lex): Renamed from java_lex.
6248         (java_lex): New function.
6249         Include timevar.h.
6250
6251 2003-03-13  Tom Tromey  <tromey@redhat.com>
6252
6253         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6254         type.
6255
6256 2003-03-04  Andrew Haley  <aph@redhat.com>
6257
6258         * gjavah.c (is_first_data_member): New global variable.
6259         (print_c_decl): If it's the first data member, align it as the
6260         superclass.
6261         (process_file): Set is_first_data_member.
6262
6263 2003-03-11  Tom Tromey  <tromey@redhat.com>
6264
6265         * parse.y (resolve_field_access): Initialize class if field is
6266         found in another static field.
6267         * expr.c (build_class_init): Don't optimize out initialization of
6268         implemented interface.
6269
6270 2003-03-11  Andrew Haley  <aph@redhat.com>
6271
6272         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6273         warning.
6274
6275 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6276
6277         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6278         and DIR_SEPARATOR_2 for a target.
6279         Correct minor typos.
6280
6281         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6282         and DIR_SEPARATOR_2 for a target into account.
6283
6284 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6285
6286         * lang.c (java_init): Update prototype, move code to java_post_options.
6287         (java_post_options): Similarly.
6288
6289 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6290
6291         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6292         compare file name components depending on the case-sensitivity
6293         or otherwise of the host file system.
6294
6295         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6296         "strcmp" to compare file name components.
6297         Use IS_DIR_SEPARATOR instead of comparing directly against
6298         DIR_SEPARATOR.
6299         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6300         comparing directly against DIR_SEPARATOR.
6301
6302 2003-03-04  Tom Tromey  <tromey@redhat.com>
6303
6304         * Make-lang.in (java.tags): New target.
6305
6306 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6307
6308         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6309         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6310
6311 2003-03-01  Tom Tromey  <tromey@redhat.com>
6312
6313         * parse.y (jdep_resolve_class): Only check deprecation if we found
6314         a decl.
6315
6316 2003-02-28  Tom Tromey  <tromey@redhat.com>
6317
6318         PR java/9695:
6319         * class.c (maybe_layout_super_class): Always pass a WFL to
6320         do_resolve_class.
6321         * parse.y (do_resolve_class): Updated comment to explain
6322         parameters.
6323
6324 2003-02-26  Tom Tromey  <tromey@redhat.com>
6325
6326         * jcf-write.c (generate_classfile): Check whether class is
6327         deprecated before writing attribute count.
6328
6329 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6330
6331         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6332         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6333
6334 2003-02-23  Tom Tromey  <tromey@redhat.com>
6335
6336         * lang-options.h: Added -Wdeprecated.
6337         * gcj.texi (Warnings): Document -Wdeprecated.
6338         * java-tree.h (flag_deprecated): Declare.
6339         * lang.c (lang_W_options): Added deprecated.
6340         (flag_deprecated): New global.
6341         * chartables.h: Rebuilt.
6342         * gen-table.pl (process_one): Look at whitespace.
6343         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6344         * parse.h (CLEAR_DEPRECATED): New macro.
6345         (CHECK_DEPRECATED_NO_RESET): New macro.
6346         * jcf-parse.c (handle_deprecated): New function.
6347         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6348         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6349         * parse.y (resolve_type_during_patch): Check deprecation.
6350         (jdep_resolve_class): Likewise.
6351         (process_imports): Likewise.
6352         (resolve_expression_name): Likewise.
6353         (check_deprecation): Strip arrays from decl.  Check
6354         flag_deprecated.
6355         (patch_method_invocation): Also check the particular constructor
6356         for deprecation.
6357         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6358         * jcf-write.c (append_deprecated_attribute): New function.
6359         (generate_classfile): Generate deprecated attribute when
6360         appropriate.
6361         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6362         (java_lex) [case '*']: Simplify logic.
6363         (java_start_char_p): Use LETTER_MASK.
6364         (java_part_char_p): Likewise.
6365         (java_space_char_p): New function.
6366
6367 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6368
6369         Change base class access representation.
6370         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6371         (add_interface_do): Likewise.
6372
6373 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6374
6375         * decl.c (java_init_decl_processing): Change
6376         soft_lookupjnimethod_node to reflect the change in
6377         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6378         * expr.c (build_jni_stub): Calculate and pass the size
6379         on the stack of the arguments to a JNI function. Use
6380         new target macro MODIFY_JNI_METHOD_CALL to allow a
6381         target to modify the call to a JNI method.
6382
6383 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6384
6385         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6386         instead of basename to avoid compiler warnings on Tru64.
6387
6388 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6389
6390         * gcj.texi: Update to GFDL 1.2.
6391
6392 2003-01-31  Andrew Haley  <aph@redhat.com>
6393
6394         * parse.y (java_expand_classes): Scan the whole class list looking
6395         for access methods that haven't yet been expanded.
6396
6397 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6398
6399         Fix for java/4269:
6400
6401         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6402         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6403         * jcf-parse.c: Likewise.
6404
6405 2003-01-31  Mark Wielaard  <mark@klomp.org>
6406
6407         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6408
6409 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6410
6411         * class.c (make_class): Use BINFO_ELTS.
6412         (set_super_info): Likewse.
6413         (add_interface_do): Likewise.
6414
6415 2003-01-30  Tom Tromey  <tromey@redhat.com>
6416
6417         * jcf-parse.c (read_class): Update identifier's class value if it
6418         changed during parsing.
6419
6420 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6421
6422         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6423         Propagate change to all other rules as required.
6424         (java/parse-scan.o): Add explicit dependency on
6425         $(parsedir)/java/parse-scan.c .
6426
6427 2003-01-29  Tom Tromey  <tromey@redhat.com>
6428
6429         * parse.y (patch_assignment): Only transform the rhs of an
6430         assignment when compiling to native.
6431
6432 2003-01-28  Tom Tromey  <tromey@redhat.com>
6433
6434         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6435
6436 2003-01-28  Tom Tromey  <tromey@redhat.com>
6437
6438         * lex.c (java_lex): Don't include UEOF as part of token.
6439         (java_read_unicode): Error if \u sequence prematurely terminated.
6440
6441 2003-01-27  Tom Tromey  <tromey@redhat.com>
6442
6443         * parse.y (java_check_regular_methods): Check for construct after
6444         checking types in throws clause.
6445
6446 2003-01-24  Tom Tromey  <tromey@redhat.com>
6447
6448         * class.c (build_static_field_ref): Only a String or numeric field
6449         can fold to a constant.
6450
6451 2003-01-23  Tom Tromey  <tromey@redhat.com>
6452
6453         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6454         file name in resource buffer.
6455
6456 2003-01-23  Tom Tromey  <tromey@redhat.com>
6457
6458         * expr.c (build_known_method_ref): Use method's context to find
6459         method table index.
6460
6461 2003-01-23  Tom Tromey  <tromey@redhat.com>
6462
6463         * constants.c (set_constant_entry): Allocated cleared memory.
6464
6465 2003-01-22  Tom Tromey  <tromey@redhat.com>
6466
6467         * java-tree.h: Don't use PARAMS.
6468         * resource.c: Add prototypes for all functions.
6469         (write_resource_constructor): Use `const char *' to avoid
6470         warning.
6471
6472 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6473
6474         * jcf-parse.c (process_zip_dir): Remove unused variable.
6475
6476 2003-01-22  Tom Tromey  <tromey@redhat.com>
6477
6478         * expr.c (build_invokeinterface): Abort if method's context is not
6479         an interface.
6480
6481 2003-01-22  Tom Tromey  <tromey@redhat.com>
6482
6483         * gcj.texi (Input and output files): Mention non-class entries.
6484         * decl.c (java_init_decl_processing): Call
6485         init_resource_processing.
6486         * java-tree.h (compile_resource_data, write_resource_constructor,
6487         compile_resource_file, init_resource_processing): Declare.
6488         * config-lang.in (gtfiles): Added resource.c.
6489         * Make-lang.in (gt-java-resource.h): New target.
6490         (JAVA_OBJS): Added resource.o.
6491         (java/resource.o): New target.
6492         * resource.c: New file.
6493         * class.c (compile_resource_file): Moved to resource.c.
6494         (registerResource_libfunc): Likewise.
6495         (utf8_decl_list): Mark with GTY; now static.
6496         * jcf-parse.c (classify_zip_file): New function.
6497         (parse_zip_file_entries): Use it; compile .properties files.
6498         (process_zip_dir): Use classify_zip_file and compute_class_name.
6499         Don't write class name into zip directory.
6500         (java_parse_file): Call write_resource_constructor.
6501         (compute_class_name): New function.
6502         * jcf-io.c (read_zip_member): Reindented.
6503
6504 2003-01-21  Tom Tromey  <tromey@redhat.com>
6505
6506         * class.c (supers_all_compiled): New function.
6507         (make_class_data): Use it.
6508
6509 2003-01-21  Tom Tromey  <tromey@redhat.com>
6510
6511         * parse.y (method_header): Native method can't be strictfp.
6512         No method can be transient or volatile.
6513
6514 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6515
6516         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6517
6518 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6519
6520         * check-init.c: Fix comment typos.
6521         * class.c: Likewise.
6522         * constants.c: Likewise.
6523         * decl.c: Likewise.
6524         * except.c: Likewise.
6525         * expr.c: Likewise.
6526         * java-except.h: Likewise.
6527         * java-tree.h: Likewise.
6528         * javaop.h: Likewise.
6529         * jcf-dump.c: Likewise.
6530         * jcf-io.c: Likewise.
6531         * jcf-parse.c: Likewise.
6532         * jcf-write.c: Likewise.
6533         * lang.c: Likewise.
6534         * mangle.c: Likewise.
6535         * typeck.c: Likewise.
6536         * verify.c: Likewise.
6537
6538 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6539
6540         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6541         * jcf-write.c: Include "tm_p.h".
6542
6543 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6544
6545         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6546
6547 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6548
6549         * builtins.c (java_build_function_call_expr): Renamed from
6550         build_function_call_expr.  All callers changed.
6551
6552         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6553         * jcf-parse.c: Include tm_p.h.
6554
6555         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6556         warning.
6557
6558 2003-01-14  Tom Tromey  <tromey@redhat.com>
6559
6560         * class.c (make_class_data): Check that super is compiled before
6561         building class reference to it.
6562
6563 2003-01-14  Andrew Haley  <aph@redhat.com>
6564
6565         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6566         varargs function -- correct.
6567
6568 2003-01-14  Andrew Haley  <aph@redhat.com>
6569
6570         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6571
6572 2003-01-14  Andrew Haley  <aph@redhat.com>
6573
6574         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6575         varargs function -- correct.
6576
6577         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6578         temporary if the RHS is a reference.
6579
6580 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6581
6582         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6583         * keyword.h: Regenerated.
6584
6585         * All Files: Convert to ISO C style function definitions.
6586
6587 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6588
6589         * parse.y (check_pkg_class_access): ANSIfy definition.
6590
6591 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6592
6593         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6594         xmalloc et al.
6595
6596         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6597
6598 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6599
6600         Merge from pch-branch:
6601
6602         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6603
6604         * Make-lang.in (java/gjavah.o): Update dependencies.
6605         * gjavah.c: Include ggc.h.
6606
6607         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6608
6609         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6610         (JCFDUMP_OBJS): Add ggc-none.o.
6611         (java/jcf-dump.o): Depend on GGC_H.
6612         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6613         CPool substructures.
6614         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6615         * jcf-dump.c: Include ggc.h.
6616
6617         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6618
6619         * jcf.h (union cpool_entry): New.
6620         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6621         an array of unions.
6622         (struct JCF): Use gengtype to mark.
6623         (CPOOL_UINT): Update for new cpool_entry type.
6624         (CPOOL_USHORT1): Likewise.
6625         (CPOOL_USHORT2): Likewise.
6626         (CPOOL_FINISH): Use GC to free cpool subfields.
6627         * parse.h (struct parser_ctxt): Mark field current_jcf.
6628         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6629         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6630         (main_jcf): Use gengtype to mark.
6631         (ggc_mark_jcf): Delete.
6632         (get_constant): Update for new cpool_entry type.
6633         (give_name_to_class): Likewise.
6634         (get_class_constant): Likewise.
6635         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6636         (java_parse_file): Use GGC to allocate struct JCF.
6637         (init_jcf_parse): Don't call ggc_add_root.
6638         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6639         cpool_entry type.
6640         * java-tree.h (current_jcf): Use gengtype to mark.
6641         (CPOOL_UTF): Update for new cpool_entry type.
6642         (outgoing_cpool): Use gengtype to mark.
6643         (struct lang_type): GC struct JCF and struct CPool.
6644         * config-lang.in (gtfiles): Add jcf.h.
6645         * constants.c (find_tree_constant): New.
6646         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6647         for new cpool_entry type.
6648         (find_constant1): Update for new cpool_entry type.
6649         (find_constant2): Likewise.
6650         (find_utf8_constant): Use find_tree_constant.
6651         (find_class_or_string_constant): Remove unnecessary cast to jword.
6652         Update for new cpool_entry type.
6653         (count_constant_pool_bytes): Update for new cpool_entry type.
6654         (write_constant_pool): Likewise.
6655         (alloc_name_constant): Use find_tree_constant.
6656         (build_constants_constructor): Update for new cpool_entry type.
6657
6658         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6659
6660         * parse.y (mark_parser_ctxt): Delete.
6661         (goal): Don't use ggc_add_root.
6662         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6663         (java_pop_parser_context): Let GC free parser_ctxt.
6664         (java_parser_context_resume): Likewise.
6665         * parse.h (struct parser_ctxt): Use gengtype to mark.
6666         (ctxp): Likewise.
6667         (ctxp_for_generation): Likewise.
6668         * lex.h (struct java_lc_s): Mark for gengtype.
6669         (java_lexer): Rearrange for gengtype.
6670         * config-lang.in (gtfiles): Add lex.h, parse.h.
6671
6672 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6673
6674         * All Files: Remove PARAMS macro.
6675
6676         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
6677         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
6678         `__STDC__' macros.
6679
6680         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
6681         VA_CLOSE.
6682
6683 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6684
6685         * Make-lang.in (java.install-common, java.uninstall,
6686         java.install-info, java.install-man): Prepend $(DESTDIR)
6687         to destination paths in all (un)installation commands.
6688         (java.install-common): Rewrite $(LN) command to support
6689         DESTDIR with "ln" as well as with "ln -s".
6690
6691 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6692
6693         * java-tree.h: Protect against multiple inclusion.
6694
6695 2003-01-07  Tom Tromey  <tromey@redhat.com>
6696
6697         * class.c (add_assume_compiled): Don't adjust parent if we're
6698         already at the root of tree.
6699
6700 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6701
6702         * lang.c (dump_compound_expr): Prototype.
6703
6704 2003-01-03  Tom Tromey  <tromey@redhat.com>
6705
6706         Fix for PR java/8712:
6707         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
6708         when simply checking against `null'.
6709
6710 2003-01-03  Tom Tromey  <tromey@redhat.com>
6711
6712         * gcj.texi (Standard Properties): Document http.proxyHost and
6713         http.proxyPort.
6714
6715         * gcj.texi (GNU Classpath Properties): Document new properties.
6716
6717 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6718
6719         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
6720         java/lang-options.h, java/mangle.c, java/mangle_name.c,
6721         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
6722
6723 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6724
6725         * Make-lang.in, boehm.c, buffer.c,
6726           buffer.h, builtins.c, class.c,
6727           config-lang.in, constants.c,
6728           convert.h, decl.c, except.c,
6729           expr.c, java-except.h,
6730           java-tree.h, javaop.def,
6731           jcf-parse.c, jcf-write.c,
6732           jv-scan.c, jvgenmain.c,
6733           jvspec.c, keyword.gperf,
6734           keyword.h, lang-options.h,
6735           lang-specs.h, lang.c, lex.c,
6736           lex.h, mangle.c, mangle_name.c,
6737           parse-scan.y, parse.h, parse.y,
6738           typeck.c, verify.c, xref.c,
6739           xref.h: Replace "GNU CC" with
6740           "GCC" in the copyright header.
6741
6742         * check-init.c, gjavah.c, javaop.h,
6743           jcf-depend.c, jcf-dump.c, jcf-io.c,
6744           jcf-path.c, jcf-reader.c, jcf.h,
6745           zextract.c, zipfile.h: These files are
6746           "part of GCC". Also say "GCC" not "GNU CC".
6747
6748 2002-12-30  DJ Delorie  <dj@redhat.com>
6749
6750         * Make-lang.in: Protect against texi2pod/pod2man failing.
6751
6752 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
6753
6754         * gcj.texi: Use @copying.
6755
6756 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6757
6758         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
6759         print_cxx_classname.
6760         (print_cxx_classname): Add add_scope parameter.
6761         (print_class_decls): Do not emit a semicolon after the extern
6762         "Java" block.
6763         (process_file): Adjust calls to print_cxx_classname.
6764
6765 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6766
6767         * gcj.texi: Include Cover Texts in man page.
6768
6769 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
6770
6771         * class.c (build_static_field_ref): Check FIELD_FINAL.
6772
6773         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
6774         instead of current_constant_pool_data_ref.
6775         * java-tree.h (current_constant_pool_data_ref): Undefine.
6776         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
6777         * jcf-parse.c (init_outgoing_cpool): Don't initialize
6778         current_constant_pool_data_ref.
6779
6780         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
6781         not build_internal_class_name.
6782
6783         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
6784         Use it when class ref isn't certain to be compiled.
6785
6786 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
6787
6788         * gcj.texi: Include gcc-common.texi.
6789         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
6790         $(srcdir)/doc/include/gcc-common.texi.
6791
6792 2002-12-22  Anthony Green  <green@redhat.com>
6793
6794         * gcj.texi (Limitations): Add note about org.xml.sax and
6795         org.w3c.dom.
6796
6797 2002-12-20  Tom Tromey  <tromey@redhat.com>
6798
6799         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
6800         where minimum case value is Integer.MIN_VALUE.
6801         Fixes PR java/8955.
6802
6803 2002-12-18  Andrew Haley  <aph@redhat.com>
6804
6805         * parse.y (patch_invoke): Force evaluation order when `check' is
6806         set.  For PR libgcj/8945.
6807
6808 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
6809
6810         * gcj.texi: Change version number to 3.4.
6811
6812 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
6813         Andrew Haley <aph@redhat.com>
6814
6815         * parse.y (source_end_java_method): Remove custom encoding of line
6816         numbers for a function decl before passing it to the back end.
6817
6818 2002-12-03  Andrew Haley  <aph@redhat.com>
6819
6820         * class.c (make_class_data): New field, "chain".
6821         * decl.c (java_init_decl_processing): Likewise.
6822
6823 2002-12-02  Tom Tromey  <tromey@redhat.com>
6824
6825         For PR java/8740:
6826         * parse.y (do_resolve_class): Handle qualified name via
6827         recursion.
6828
6829 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
6830
6831         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
6832         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
6833         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
6834         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
6835         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
6836         Include coretypes.h and tm.h.
6837         * Make-lang.in: Update dependencies.
6838
6839 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6840
6841         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
6842
6843 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6844
6845         * jcf-reader.c: Don't expand JCF_readu4 inside the
6846         expansion of JCF_SKIP.
6847
6848 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
6849
6850         * jcf-reader.c: Don't expand JCF_readu4 inside the
6851         expansion of JCF_SKIP.
6852
6853 2002-11-22  Tom Tromey  <tromey@redhat.com>
6854
6855         * parse.y (patch_binop): Cast right hand side of shift expression
6856         to `int'.  Fixes PR java/8676.
6857
6858 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
6859             Andrew Haley <aph@redhat.com>
6860
6861         * gcc/java/jcf-write.c (write_classfile): Remove target
6862         class file, if it exists, before renaming the temporary
6863         class file to it.
6864
6865 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6866
6867         * jvspec.c (lang_specific_spec_functions): New.
6868
6869 2002-11-18  Tom Tromey  <tromey@redhat.com>
6870
6871         Fix for PR java/7912:
6872         * expr.c (can_widen_reference_to): Allow cast of array to
6873         Cloneable or Serializable.
6874         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
6875         (java_io_serializable_identifier_node): Likewise.
6876         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
6877         (valid_ref_assignconv_cast_p): Use new identifier nodes.
6878         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
6879         java_io_serializable.
6880         * decl.c (java_init_decl_processing): Initialize
6881         java_lang_cloneable_identifier_node and
6882         java_io_serializable_identifier_node.
6883         (java_lang_cloneable_identifier_node): New global.
6884         (java_io_serializable_identifier_node): Likewise.
6885
6886 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
6887
6888         * buffer.c: Remove unnecessary casts.
6889         * check-init.c: Likewise.
6890         * class.c: Likewise.
6891         * constants.c: Likewise.
6892         * decl.c: Likewise.
6893         * except.c: Likewise.
6894         * gjavah.c: Likewise.
6895         * jcf-io.c: Likewise.
6896         * jcf-parse.c: Likewise.
6897         * jcf-path.c: Likewise.
6898         * jvspec.c: Likewise.
6899         * lang.c: Likewise.
6900         * lex.c: Likewise.
6901         * verify.c: Likewise.
6902
6903 2002-11-06  Tom Tromey  <tromey@redhat.com>
6904
6905         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
6906         a JNI header.
6907
6908 2002-11-05  Tom Tromey  <tromey@redhat.com>
6909
6910         Fix for PR java/6388.
6911         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
6912         * java-tree.h (enum java_tree_index): New values
6913         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
6914         (decimal_int_max, decimal_long_max): New defines.
6915         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
6916         (error_if_numeric_overflow): Rewrote range checking.
6917         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
6918         decimal_long_max.
6919
6920 2002-11-02  Tom Tromey  <tromey@redhat.com>
6921
6922         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
6923
6924         * class.c (make_method_value): Put class name, not signature, into
6925         `throws' field.  For PR java/8415.
6926
6927 2002-10-24  Tom Tromey  <tromey@redhat.com>
6928
6929         * gcj.texi (Invoking gij): Document --showversion.
6930         (Standard Properties): java.library.path now set.
6931
6932 2002-10-23  Tom Tromey  <tromey@redhat.com>
6933
6934         * gjavah.c (decode_signature_piece): In JNI mode, print
6935         `jobjectArray' when array depth is nonzero.
6936         Fixes PR java/8296.
6937
6938 2002-10-15  Andrew Haley  <aph@redhat.com>
6939
6940         * parse.y (patch_invoke): Call force_evaluation_order on a static
6941         arg list.
6942         (resolve_qualified_expression_name): Call force_evaluation_order
6943         on a arg list that is part of a Qualified Expression Name.
6944
6945         * lang.c (dump_compound_expr): New.
6946         (java_dump_tree): New.
6947
6948 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
6949
6950         * gcj.texi: Added item describing the GCJ runtime property
6951         "gnu.gcj.progname".
6952
6953 2002-10-15  Richard Henderson  <rth@redhat.com>
6954
6955         * jcf-parse.c (get_constant): Fix type warning.
6956
6957 2002-10-15  Andrew Haley  <aph@redhat.com>
6958
6959         * java-tree.h (java_inlining_merge_static_initializers): Declare.
6960         (java_inlining_map_static_initializers): Declare.
6961
6962 2002-10-14  Andrew Haley  <aph@redhat.com>
6963
6964         * tree-inline.c (remap_block): All local class initialization
6965         flags go in the outermost scope.
6966         (expand_call_inline): Call java_inlining_map_static_initializers.
6967         (expand_call_inline): Call java_inlining_merge_static_initializers.
6968         * java/lang.c (merge_init_test_initialization): New.
6969         (java_inlining_merge_static_initializers): New.
6970         (inline_init_test_initialization): New.
6971         (java_inlining_map_static_initializers): New.
6972
6973 2002-10-11  Mark Wielaard  <mark@klomp.org>
6974
6975         * gcj.texi (Compatibility): Add Limitations and Extensions section.
6976
6977 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6978
6979         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
6980
6981 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6982
6983         * parse.y (merge_string_cste): Add parentheses around & within |.
6984
6985 2002-10-08  Tom Tromey  <tromey@redhat.com>
6986
6987         * parse.y (variable_declarator_id): Simplify error path for
6988         array declarator error.  For PR java/8003.
6989
6990 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
6991
6992         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
6993         bug_report_url.
6994
6995 2002-10-08  Andrew Haley  <aph@redhat.com>
6996
6997         * parse.y (attach_init_test_initialization_flags): Check for
6998         error_mark_node.
6999
7000 2002-10-07  Anthony Green  <green@redhat.com>
7001
7002         * parse.y (merge_string_cste): Fix bug in string concatenation.
7003
7004 2002-10-03  Michael Koch  <konqueror@gmx.de>
7005
7006         * gcj.texi (Standard properties):
7007         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7008
7009 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7010
7011         PR optimization/6627
7012         * lang.c (java_init): If storing the vbit in function
7013         pointers, ensure that force_align_functions_log is atleast
7014         one to aid compatability with g++ vtables.
7015
7016 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7017
7018         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7019         foul of type-based aliasing.
7020
7021 2002-09-30  Anthony Green  <green@redhat.com>
7022
7023         * gcj.texi (Invoking jv-scan): Fix texinfo.
7024
7025 2002-09-28  Anthony Green  <green@redhat.com>
7026
7027         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7028         (Code Generation): Add -fno-assert documentation.
7029         * jv-scan.c (flag_assert): New global.
7030         (options): Add assert option.
7031         (help): Add --no-assert documentation.
7032         * parse-scan.y (flag_assert): New global.
7033         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7034         (flag_assert): New global.
7035         * java-tree.h (flag_assert): New global.
7036         * lex.c (java_lex): Obey flag_assert.
7037         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7038         calling cc1.
7039
7040 2002-09-26  Andrew Haley  <aph@redhat.com>
7041
7042         * expr.c (build_java_array_length_access): Check for null pointer.
7043         * expr.c (expand_java_arrayload): Likewise.
7044
7045 2002-09-21  Richard Henderson  <rth@redhat.com>
7046
7047         * jcf-parse.c (get_constant): Decode from IEEE no matter
7048         what the target format.
7049
7050 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7051
7052         * ChangeLog: Follow spelling conventions.
7053         * class.c: Likewise.
7054         * decl.c: Likewise.
7055         * expr.c: Likewise.
7056         * gjavah.c: Likewise.
7057         * java-tree.h: Likewise.
7058         * jcf-dump.c: Likewise.
7059         * jcf-parse.c: Likewise.
7060         * jvspec.c: Likewise.
7061         * lang.c: Likewise.
7062         * mangle.c: Likewise.
7063         * parse.y: Likewise.
7064
7065 2002-09-17  Tom Tromey  <tromey@redhat.com>
7066
7067         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7068         where \r appears at EOF.  Fixes PR java/7950.
7069
7070 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7071
7072         * jvspec.c (lang_specific_driver): Remove unused variable.
7073
7074 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7075
7076         * java-tree.h (union lang_tree_node): Add chain_next option.
7077
7078 2002-09-16  Richard Henderson  <rth@redhat.com>
7079
7080         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7081         use new real.h interface.
7082         * jcf-write.c (find_constant_index): Use new real.h interface.
7083         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7084
7085 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7086
7087         * lang.c: Follow spelling conventions.
7088
7089 2002-09-11  Per Bothner  <per@bothner.com>
7090
7091         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7092         constant to the type of the field.
7093         (java_complete_tree):  Remove now-redundant code.
7094
7095         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7096
7097 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7098
7099         For PR java/5794:
7100         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7101         return label if a ret instruction for the jsr has been reached.
7102
7103 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7104
7105         * parse.y (DIR_SEPARATOR): Don't define.
7106         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7107
7108 2002-08-28  Andrew Haley  <aph@redhat.com>
7109
7110         * verify.c (verify_jvm_instructions): Allow exception handler
7111         inside code that is being protected, but generate a warning.
7112         * except.c (link_handler): Initialize `expanded' in new eh_range.
7113         (binding_depth, is_class_level, current_pc): Declare extern.
7114
7115 2002-09-01  Mark Wielaard <mark@klomp.org>
7116
7117         * gcj.texi: Add chapter about system properties.
7118         Fixed some typos.
7119
7120 2002-08-26  Tom Tromey  <tromey@redhat.com>
7121
7122         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7123         conversion if RHS_TYPE is byte, short, or char.
7124
7125 2002-08-22  Tom Tromey  <tromey@redhat.com>
7126
7127         * gcj.texi (Invoking gij): Document -cp and -classpath.
7128
7129 2002-08-21  Tom Tromey  <tromey@redhat.com>
7130
7131         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7132         $(prefix)/share.  For PR libgcj/7633.
7133
7134         For PR java/6005 and PR java/7611:
7135         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7136         (java_can_use_bit_fields_p): New function.
7137
7138 2002-08-16  Tom Tromey  <tromey@redhat.com>
7139
7140         * gcj.texi (Class Initialization): Mention class initialization of
7141         arrays.
7142
7143 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7144
7145         * Make-lang.in (java-tree-inline.o): New.
7146         (JAVA_OBJS): Add java-tree-inline.o.
7147         * parse.y (source_end_java_method): Call java_optimize_inline.
7148         (java_expand_method_bodies): Save method's tree in
7149         DECL_SAVED_TREE.
7150         (add_stmt_to_compound): Keep track of the number of statments.
7151         * lang.c (java_init): Enable flag_inline_trees.
7152         (java_post_options): If flag_inline_functions is on, enable
7153         flag_inline_trees instread.
7154         (decl_constant_value): New.
7155         (java_tree_inlining_walk_subtrees): New.
7156         * java-tree.h (DECL_NUM_STMTS): New macro.
7157         (java_optimize_inline): Declare.
7158         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7159         Handle a LABEL_EXPR.
7160         * decl.c (build_result_decl): If we already have a DECL_RESULT
7161         don't make another.
7162         (dump_function): New.
7163         (java_optimize_inline): New.
7164         (dump_function): New.
7165
7166 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7167
7168         For PR java/7483:
7169         * parse.y (build_assertion): Invert return from
7170         desiredAssertionStatus.
7171
7172 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7173
7174         * jcf-write.c (get_access_flags): Return correct access flags for
7175         private and protected inner classes.
7176
7177 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7178
7179         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7180
7181 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7182
7183         * mangle_name.c: Don't include obstack.h twice.
7184         * xref.c: Don't include obstack.h.
7185
7186 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7187
7188         * class.c: (permanent_obstack): Delete declaration.
7189         * constants.c: (permanent_obstack): Delete declaration.
7190         * except.c: (permanent_obstack): Delete declaration.
7191         * expr.c: (permanent_obstack): Delete declaration.
7192         * jcf-parse.c: (permanent_obstack): Delete declaration.
7193         (saveable_obstack): Delete declaration.
7194         * parse.h: (permanent_obstack): Delete declaration.
7195         * typeck.c: (permanent_obstack): Delete declaration.
7196
7197 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7198
7199         * gcj.texi (version-gcc): Increase to 3.3.
7200
7201 2002-07-22  Tom Tromey  <tromey@redhat.com>
7202
7203         * lex.c (java_lex): Check for `e' or `E' after 0.
7204
7205 2002-07-21  Richard Henderson  <rth@redhat.com>
7206
7207         * lang.c (java_unsafe_for_reeval): New.
7208         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7209
7210 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7211
7212         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7213         (jcf_path_init): Use GET_ENVIRONMENT.
7214
7215 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7216             Zack Weinberg <zack@codesourcery.com>
7217
7218         * builtins.c (initialize_builtins): Remove defines that
7219         handled C/C++ specific junk hereby removed from builtins.def.
7220
7221 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7222
7223         * lang.c (java_post_options): Update prototype.
7224
7225 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7226
7227         * builtins.c (initialize_builtins): Ignore the additional
7228         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7229         the builtins.def file.
7230
7231 2002-07-01  Tom Tromey  <tromey@redhat.com>
7232
7233         For PR libgcj/7073:
7234         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7235         specially.
7236
7237 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7238
7239         * java/decl.c (builtin_function): Accept additional parameter.
7240         (java_init_decl_processing): Pass an additional NULL_TREE
7241         argument to builtin_function.
7242
7243 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7244
7245         * gcj.texi: Fixed gcj invocation example so that it compiles.
7246
7247 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7248
7249         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7250         * parse.y (mark_parser_ctxt): Likewise.
7251         (check_modifiers, declare_local_variables): Avoid incorrect
7252         hardcoded constant 10.
7253
7254         * lex.c (java_read_char): Avoid "comparison is always true"
7255         warning.
7256
7257 2002-06-25  Andreas Schwab  <schwab@suse.de>
7258
7259         * expr.c (JSR): Avoid undefined operation on PC.
7260
7261 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7262
7263         * decl.c (clear_binding_level): Const-ify.
7264
7265 2002-06-13  Akim Demaille  <akim@epita.fr>
7266
7267         * parse.y (class_declaration, interface_declaration): Make sure
7268         all their rules have an action, in order to avoid meaningless `$$
7269         = $1' and their type clashes.
7270
7271 2002-06-11  Tom Tromey  <tromey@redhat.com>
7272
7273         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7274         * parse-scan.y (statement_without_trailing_substatement): Added
7275         assert_statement.
7276         (assert_statement): New rule.
7277         * java-tree.h (struct lang_type) [assertions]: New field.
7278         (TYPE_USES_ASSERTIONS): New macro.
7279         (CLASS_USES_ASSERTIONS): Likewise.
7280         (FIELD_SYNTHETIC): New define.
7281         * lex.c (java_lval;): Added ASSERT_TK.
7282         * parse.y (ASSERT_TK): Added.
7283         (statement_without_trailing_substatement): Added assert_statement.
7284         (assert_statement): New rule.
7285         (build_assertion): New function.
7286         (maybe_generate_pre_expand_clinit): Create and initialize
7287         $assertionsDisabled.
7288         (lookup_package_type): Removed decl.
7289         * keyword.h: Rebuilt.
7290         * keyword.gperf (assert): New token.
7291
7292 2002-06-10  Akim Demaille  <akim@epita.fr>
7293
7294         * parse.y (interface_type_list, class_member_declaration)
7295         (unary_expression_not_plus_minus): Remove duplicate %type.
7296         Whitespace changes.
7297
7298 2002-06-09  Tom Tromey  <tromey@redhat.com>
7299
7300         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7301
7302         * parse.y (method_header): Give error message in all cases.
7303         Fixes PR java/6865.
7304
7305 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7306
7307         Don't use RTL inlining. Fix for PR java/6820.
7308         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7309         (flag_really_inline): New.
7310         (java_decode_option): Set flag_really_inline if -finline-functions
7311         is seen.
7312         (java_post_options): New function. Turn off inlining unless
7313         flag_really_inline is set.
7314
7315 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7316
7317         * gjavah.c (throwable_p): Accept argument as either a classname or
7318         signature fragment. Create null-terminated classname string for super
7319         when calling itself recursively.
7320         (decode_signature_piece): Skip first character from class name
7321         signature when calling throwable_p.
7322
7323 2002-06-08  H.J. Lu  (hjl@gnu.org)
7324
7325         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7326
7327 2002-06-04  Tom Tromey  <tromey@redhat.com>
7328
7329         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7330
7331 2002-06-04  Michael Koch  <konqueror@gmx.de>
7332
7333         * gcj.texi (Input Options): Fixed typo.
7334
7335 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7336
7337         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7338         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7339         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7340         and all now-pointless local variables.  Rename other local
7341         variables to reflect their not being handles.
7342
7343         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7344         #if JCF_USE_STDIO blocks.
7345
7346         * parse.y: Add missing semicolon at end of rule.
7347
7348 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7349
7350         * check-init.c (attach_initialized_static_class): Delete, unused.
7351         * parse.y: Use htab_t instead of struct hashtable, update
7352         all uses.
7353         * java-tree.h: Include hashtab.h instead of hash.h.
7354         (struct lang_decl_func): Use htab_t, set up for gengtype.
7355         (struct init_test_hash_entry): Delete.
7356         (struct treetreehash_entry): New.
7357         (java_treetreehash_find): New
7358         (java_treetreehash_new): New prototype.
7359         (java_treetreehash_create): New prototype.
7360         (java_mark_tree): Delete prototype.
7361         (java_hash_hash_tree_node): Delete prototype.
7362         (java_hash_compare_tree_node): Delete prototype.
7363         (attach_initialized_static_class): Delete prototype.
7364         * expr.c (build_class_init): Update to use java_treetreehash
7365         functions.
7366         (java_expand_expr): Update to use htab_t.
7367         (emit_init_test_initialization): Likewise.
7368         * decl.c (java_mark_tree): Delete.
7369         * class.c (init_test_hash_newfunc): Delete.
7370         (java_hash_hash_tree_node): Delete.
7371         (java_hash_compare_tree_node): Delete.
7372         (add_method_1): Update to use java_treetreehash functions.
7373         (JAVA_TREEHASHHASH_H): New macro.
7374         (java_treetreehash_hash): New function.
7375         (java_treetreehash_compare): New function.
7376         (java_treetreehash_find): New function.
7377         (java_treetreehash_new): New function.
7378         (java_treetreehash_create): New function.
7379         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7380
7381         * Make-lang.in (java/parse.o): Depend on debug.h.
7382         * java-tree.h (struct lang_identifier): Use gengtype.
7383         (union lang_tree_node): New.
7384         (struct lang_decl_func): Use gengtype.
7385         (struct lang_decl_var): Likewise.
7386         (struct lang_decl): Likewise.
7387         * parse.y: Include debug.h.
7388         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7389
7390         * lang.c (struct language_function): New dummy structure.
7391
7392         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7393         descriminator for DECL_LANG_SPECIFIC.
7394         (struct lang_decl_func): Rename from struct lang_decl.
7395         (enum lang_decl_desc): New.
7396         (struct lang_decl): Make it a union.  Update all the accessor macros.
7397         (struct lang_type): Use gengtype.
7398         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7399         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7400         are now the same size.
7401         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7402         use discriminator to mark DECL_LANG_SPECIFIC.
7403
7404         * Make-lang.in (gt-java-builtins.h): New rule.
7405         (java/builtins.o): Add dependency on gt-<filename>.h.
7406         * builtins.c: Use gengtype for roots.
7407         (union string_or_tree): Use gengtype.
7408         (struct builtin_record): Use gengtype.
7409         * config-lang.in (gtfiles): Add builtins.c.
7410
7411         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7412         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7413         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7414         gt-java-parse.h, gtype-java.h): Add rules to generate.
7415         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7416         (class.o): Add dependency on gt-*.h.
7417         (constants.o): Likewise.
7418         (decl.o): Likewise.
7419         (expr.o): Likewise.
7420         (jcf-parse.o): Likewise.
7421         (jcf-write.o): Likewise.
7422         (lang.o): Likewise.
7423         * config-lang.in (gtfiles): New.
7424         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7425         * constants.c: Replace uses of ggc_add_* with GTY markers.
7426         Include gt-*.h.
7427         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7428         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7429         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7430         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7431         Include gt-*.h.
7432         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7433         Include gt-*.h.
7434         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7435         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7436         gt-*.h.
7437         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7438         Include gtype-java.h.
7439
7440 2002-06-02  Tom Tromey  <tromey@redhat.com>
7441
7442         Fix for PR java/5913:
7443         * parse.y (patch_binop): Call patch_string on op1.
7444
7445 2002-06-02  Tom Tromey  <tromey@redhat.com>
7446
7447         Fix for PR java/1343, PR java/6336:
7448         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7449         formatting.  Changed return type.
7450         (anonymous_class_counter): Moved to top of file.
7451         (maybe_make_nested_class_name): Append number to class name for
7452         function-local classes.
7453
7454 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7455
7456         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7457         * Make-lang.in: Update dependency lists.
7458
7459 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7460
7461         * gjavah.c (throwable_p): Do not free the name of the class after
7462         passing it to find_class.
7463         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7464         * jcf-io.c (dirent.h): Include it.
7465         (fnmatch.h): Likewise.
7466         (compare_path): New function.
7467         (java_or_class_file): Likewise.
7468         (memoized_dirlist_entry): New type.
7469         (memoized_dirlist_lookup_eq): New function.
7470         (memoized_dirlists): New variable.
7471         (caching_stat): New function.
7472         (memoized_class_lookup_eq): New function.
7473         (memoized_class_lookups): Likewise.
7474         (find_class): Use memoized_class_lookups and caching_stat.
7475         * jcf.h (JCF_USE_SCANDIR): Define.
7476         * parse.y (java_expand_classes): Write the class files in reverse
7477         order.
7478
7479 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7480
7481         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7482
7483 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7484
7485         * jcf-write.c (write_classfile): Unlink the temporary file if it
7486         cannot be renamed.  Use concat to build up the name of the
7487         temporary file.
7488
7489 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7490
7491         * jcf-write.c (write_classfile): Write the file to a
7492         temporary file and then rename it.
7493
7494 2002-05-07  Tom Tromey  <tromey@redhat.com>
7495
7496         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7497
7498         Fix for PR java/1200:
7499         * gjavah.c (throwable_p): New function.
7500         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7501         same as a `jweak'.
7502         Include hashtab.h.
7503         (gcjh_streq): New function.
7504
7505 2002-05-07  Andreas Jaeger  <aj@suse.de>
7506
7507         * parse.y (finish_for_loop): Fix if statement.
7508
7509 2002-05-06  Tom Tromey  <tromey@redhat.com>
7510
7511         Fix for PR java/5941:
7512         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7513         loop update expression.
7514         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7515         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7516
7517 2002-05-04  Mark Wielaard  <mark@klomp.org>
7518
7519         For PR java/6519:
7520         * parse.y (build_string_concatenation): Return just op1 only when op2
7521         is null and op1 is a STRING_CST, otherwise always construct a
7522         StringBuffer.
7523
7524 2002-04-27  Tom Tromey  <tromey@redhat.com>
7525
7526         For PR java/6382:
7527         * parse.y (string_convert_int_cst): New function.
7528         (merge_string_cste): Use it.
7529
7530 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7531
7532         * java-tree.h (java_parse_file): Update.
7533         (java_set_yydebug): Remove.
7534         * jcf-parse.c (yydebug): Remove.
7535         (java_set_yydebug): Die.
7536         (java_parse_file): Update.
7537         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7538
7539 2002-04-24  Tom Tromey  <tromey@redhat.com>
7540
7541         For PR java/6425:
7542         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7543         EXPR_WFL_QUALIFICATION of qual_wfl.
7544
7545 2002-04-23  Per Bothner  <per@bothner.com>
7546
7547         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7548         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7549         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7550
7551 2002-04-23  Tom Tromey  <tromey@redhat.com>
7552
7553         For PR java/6314:
7554         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7555         recognize `-fcompile-resource='.
7556         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7557         a bit.
7558
7559 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7560
7561         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7562         paths. Fixes PR java/2791.
7563
7564 2002-04-19  Andrew Haley  <aph@redhat.com>
7565
7566         * jcf-write.c (push_long_const): lo, hi: New variables.
7567         Use rshift_double to extract the high part of a 64-bit long.
7568         Use WORD_TO_INT to extract the low part.
7569
7570         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7571         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7572         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7573
7574 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7575
7576         * typeck.c (incomplete_type_error): Remove.
7577
7578 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7579
7580         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7581         for hash synchronization.
7582         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7583         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7584         class_type_node.
7585
7586 2002-04-16  Mark Wielaard  <mark@klomp.org>
7587
7588         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7589         negative zero.
7590
7591 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7592
7593         Fix for PR java/6294:
7594         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7595         interfaces.
7596
7597 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7598
7599         Fix for PR java/6085:
7600         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7601         to get enclosing "this" argument for inner-class constructor
7602         invocation. Pass correct arguments to build_access_to_thisn.
7603
7604 2002-04-10  Andreas Jaeger  <aj@suse.de>
7605
7606         * gcj.texi (Input Options): Fix extdirs patch.
7607
7608 2002-04-10  Anthony Green  <green@redhat.com>
7609
7610         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7611
7612 2002-04-09  Anthony Green  <green@redhat.com>
7613
7614         * gcj.texi (Input Options): Add --extdirs documentation.
7615         * jcf-dump.c (OPT_extdirs): New macro.
7616         (options): Add extdirs option.
7617         (help): Describe --extdirs.
7618         (main): Handle OPT_extdirs.
7619         * gjavah.c (OPT_extdirs): New macro.
7620         (options): Add extdirs option.
7621         (help): Describe --extdirs.
7622         (main): Handle OPT_extdirs.
7623         * jcf-path.c (jcf_path_init): Add extdirs support.
7624         (jcf_path_extdirs_arg): New function.
7625         (extensions): New variable to hold extensions path entries.
7626         * jvspec.c: Remove -fextdirs= when compiling main().
7627         * lang.c (java_decode_option): Handle -fextdirs=.
7628         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7629         * Make-lang.in: Compile jcf-path with version info for use in
7630         identifying the appropriate libgcj.jar.
7631
7632 2002-04-08  Tom Tromey  <tromey@redhat.com>
7633
7634         For PR libgcj/5303:
7635         * .cvsignore: Added rmic.1 and rmiregistry.1.
7636         * gcj.texi (Top): Link to new nodes.
7637         (Invoking rmic): New node.
7638         (Invoking rmiregistry): Likewise.
7639         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7640         rmiregistry.1.
7641         (java.maintainer-clean): Likewise.
7642         ($(srcdir)/java/rmic.1): New target.
7643         ($(srcdir)/java/rmiregistry.1): Likewise.
7644         (java.install-man): Handle rmic.1 and rmiregistry.1.
7645
7646 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7647
7648         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7649         Add note about handling uncaught exceptions. Add an exception handler
7650         to example.
7651
7652 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7653
7654         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7655         after using it to patch CALL_EXPR.
7656
7657 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7658
7659         * gcj.texi (Invocation): Document CNI invocation API.
7660
7661 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7662
7663         * expr.c (truthvalue_conversion): Rename.  Update.
7664         (expand_compare): Update.
7665         * java-tree.h (java_truthvalue_conversion): New.
7666         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7667
7668 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7669
7670         * java-tree.h (java_mark_addressable): New.
7671         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7672         * typeck.c (mark_addressable): Rename, update.
7673
7674 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7675
7676         * expr.c (build_java_binop): Update.
7677         * java-tree.h (java_signed_type, java_unsigned_type,
7678         java_signed_or_unsigned_type): Update.
7679         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7680         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7681         * parse.y (patch_binop): Update.
7682         * typeck.c (signed_or_unsigned_type, unsigned_type,
7683         signed_type): Update.
7684
7685 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7686
7687         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7688         (java_dummy_print): Remove.
7689         (lang_print_error): Rename.  Exit early if inhibiting output.
7690         (inhibit_error_printing_function): New.
7691         (java_init): Don't set hook.
7692         (lang_init_source): Use new boolean.
7693
7694 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7695
7696         * parse.y (do_resolve_class): Fix infinite recursion.
7697
7698 2002-03-29  Tom Tromey  <tromey@redhat.com>
7699
7700         * parse.y (check_inner_circular_reference): Ignore incomplete
7701         types.
7702
7703 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7704
7705         * Make-lang.in (builtins.o): Update.
7706         * boehm.c (get_boehm_type_descriptor): Update.
7707         * builtins.c: Include langhooks.h.
7708         * decl.c (java_init_decl_processing): Update.
7709         * java-tree.h (java_type_for_mode, java_type_for_size): New.
7710         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
7711         Redefine.
7712         * typeck.c (type_for_mode, type_for_size): Update.
7713
7714 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
7715
7716         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
7717
7718 2002-03-28  Tom Tromey  <tromey@redhat.com>
7719
7720         * except.c (expand_end_java_handler): If the handler type is NULL,
7721         use java.lang.Throwable.  Fixes PR java/5986.
7722
7723 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7724
7725         Fix for PR java/4715:
7726         * jcf-parse.c (parse_source_file_3): New function.
7727         (read_class): Call it.
7728         (java_parse_file): Likewise.
7729
7730 2002-03-28  Jan Hubicka  <jh@suse.cz>
7731
7732         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
7733
7734 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7735
7736         * parse.y (resolve_package): Initialize "decl".
7737         (lookup_package_type): Remove unused function.
7738
7739 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7740
7741         Fix for PR java/5993:
7742         * parse.y (resolve_package): Return the decl if resolution was
7743         successful. Don't special case "java.lang" and "java.lang.reflect"
7744         packages. Set type_name to the merged identifier.
7745         (resolved_qualified_expression_name): Print error using "name" if
7746         resolve_package returns NULL_TREE.
7747
7748 2002-03-27  Tom Tromey  <tromey@redhat.com>
7749
7750         * expr.c (expand_invoke): Don't generate null pointer check if
7751         we're calling <init>.
7752
7753 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7754
7755         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
7756         fix prototype.
7757         * java-tree.h (java_lang_expand_expr): Similarly.
7758         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7759         (java_init): Don't set hook.
7760
7761 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7762
7763         Fix for PR java/5850:
7764         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
7765         context if field was not found in the current scope.
7766         * expr.c (lookup_field): Don't look in enclosing contexts.
7767
7768 2002-03-26  Tom Tromey  <tromey@redhat.com>
7769
7770         Fix for PR java/5942:
7771         * parse.y (init_src_parse): Added sanity check.
7772         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
7773         elements, not 11.
7774
7775 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7776
7777         * decl.c (lang_mark_tree): Rename java_mark_tree.
7778         * java-tree.h (java_mark_tree): New.
7779         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7780
7781 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
7782
7783         * lex.c: Change java_perform_atof to take normal parameters
7784         instead of a pointer to a parameter block.  Call it directly
7785         from java_lex.
7786
7787 2002-03-22  Mark Wielaard  <mark@klomp.org>
7788
7789         Fix for PR java/5368:
7790         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
7791         when printing error message.
7792
7793 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7794
7795         * decl.c (maybe_build_cleanup): Remove.
7796
7797 2002-03-22  Tom Tromey  <tromey@redhat.com>
7798
7799         Andrew Haley  <aph@cambridge.redhat.com>
7800
7801         * expr.c (build_field_ref): Don't build a check if the field is a
7802         member of `this'.
7803
7804 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
7805
7806         Fix for PR java/6026:
7807         * lex.c (java_lex): Fix parsing of consecutive floats.
7808
7809 2002-03-21  Tom Tromey  <tromey@redhat.com>
7810
7811         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
7812         class.
7813
7814 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7815
7816         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7817         insert_block, getdecls, kept_level_p, global_bindings_p): New.
7818
7819 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
7820
7821         * gcj.texi: @code{gcj} becomes @command{gcj}.
7822         @code{gcc} becomes @command{gcc}.
7823         GcjRaw changed to gnu.gcc.RawData.
7824
7825 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7826
7827         * decl.c (start_java_method): Use new hook.
7828         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7829         (java_init): Remove old hook.
7830
7831 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
7832
7833         * builtins.c (define_builtin): Do nothing if `type' is null.
7834         Fixes PR java/5876.
7835
7836 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7837
7838         * parse.y (parser_check_super_interface): Fix error message
7839         grammar/order.
7840
7841 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7842
7843         * jcf-parse.c (get_constant): Delete unused variables.
7844
7845 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7846
7847         * java-tree.h (java_parse_file): New.
7848         * jcf-parse.c (yyparse): Rename java_parse_file.
7849         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7850
7851 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7852
7853         * parse.y (craft_constructor): Return the constructor decl.
7854         (java_expand_classes): Update comments.
7855         (lookup_method_invoke): Call fix_constructors immediately for
7856         anonymous class. Fixes PR java/5935.
7857
7858 2002-03-15  Anthony Green  <green@redhat.com>
7859
7860         * jcf-parse.c (yyparse): Don't emit class registration
7861         constructor when compiling resource files.
7862
7863 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7864
7865         * lang.c (java_tree_code_type, java_tree_code_length,
7866         tree_code_name): Delete.
7867         (tree_code_type, tree_code_length, tree_code_name): Define.
7868         (java_init): Don't try to copy into the various tree_code
7869         arrays.
7870
7871 2002-03-12  Tom Tromey  <tromey@redhat.com>
7872
7873         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
7874         UTF-8, not UCS-2.  Fixes PR java/5923.
7875
7876         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
7877         a call_expr wrapped in a convert.  Fixes PR java/5848.
7878
7879 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7880
7881         * jcf-write.c (write_classfile): Improve error strings.
7882
7883 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7884
7885         * lex.c: Adjust comments to GNU standards.
7886
7887 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
7888
7889         Fix for PR java/5902:
7890         * lex.c (java_lex): Fix parsing of literals.
7891
7892 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7893
7894         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
7895         to prevent it getting evaluated twice in the store checking case.
7896         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
7897         examining OBJECT.
7898
7899 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7900
7901         * decl.c (java_init_decl_processing): Make sure class_type_node
7902         alignment is not less than 64 bits if hash synchronization is enabled.
7903
7904 2002-03-08  Per Bothner  <per@bothner.com>
7905
7906         * parse.y (java_complete_lhs):  Check if patch_assignment
7907         returned an error-mark.
7908
7909         * parse.y (try_builtin_assignconv):  Don't special-case zero.
7910
7911 2002-03-08  Per Bothner  <per@bothner.com>
7912
7913         Fix for PR java/5812.
7914         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
7915         here instead of in JSR macro.  Likewise with load_type_state call.
7916         Do the latter on if the return_pc has been verified (the jsr returns).
7917         (JSR):  Now just call build_java_jsr.
7918
7919 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
7920
7921         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
7922         (java.install-common): Link native driver to
7923         JAVA_TARGET_INSTALL_NAME.
7924
7925 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
7926
7927         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
7928         * builtins.c(sin_builtin): Likewise
7929         * builtins.c(sqrt_builtin): Likewise
7930
7931 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
7932
7933         * java/expr.c, java/jcf-parse.c, java/lex.c:
7934         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
7935         REAL_ARITHMETIC blocks unconditional.  Delete some further
7936         #ifdef blocks predicated on REAL_ARITHMETIC.
7937
7938 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7939
7940         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
7941         explicit sizeof/sizeof.
7942         * decl.c (java_init_decl_processing): Likewise.
7943         * jcf-parse.c (init_jcf_parse): Likewise.
7944         * parse.y (init_src_parse): Likewise.
7945
7946 2002-03-02  Per Bothner  <per@bothner.com>
7947
7948         Make --CLASSPATH by a synonym for --classpath and -classpath.
7949         Implement --bootclasspath.
7950         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
7951         (classpath_l):  Remove.
7952         (jcf_path_CLASSPATH_arg):  Remove.
7953         (jcf_path_bootclasspath_arg):  New function.
7954         (jcf_path_seal):  Simplify accordingly.
7955
7956         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
7957         (jcf_path_CLASSPATH):  Remove declaration.
7958         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
7959         (lang_specific_driver):  Translate -bootclasspath.
7960         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
7961         * lang.c (decode_lang_options):  Do jcf_path_init first.
7962         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
7963         * gjavah.c:  Also handle --bootclasspath.
7964         Handle --CLASSPATH as a synonum for --classpath.
7965         * jcf-dump.c: Likewise.
7966
7967         "." is not part of system path, but is the default for --classpath.
7968         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
7969         (jcf_path_seal):  Add "." if no CLASSPATH specified.
7970
7971         * gcj.texi:  Document changes.
7972
7973 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7974
7975         * expr.c (build_java_arraystore_check): Fix formatting.
7976
7977 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
7978
7979         Fix for PR java/5758, java/5632:
7980         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
7981         inner-class separator too.
7982         * parse.y (do_resolve_class): New local `decl_result.'
7983         Progressively build a name for what can have been loaded.
7984
7985 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7986
7987         * expr.c (java_array_data_offset): Removed function.
7988         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
7989         (build_java_array_length_access): Obtain "length" value using a
7990         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
7991         (build_java_arrayaccess): Correct comment. Access "data" using a
7992         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
7993         (build_java_arraystore_check): New function.
7994         (expand_java_arraystore): Use build_java_arraystore_check.
7995         * parse.y (patch_assignment): Simplify code to insert a store check
7996         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
7997         * check-init.c (check_init): Update to reflect that an array length
7998         access is now a COMPONENT_REF.
7999         * gcj.texi (Code Generation): Improve documentation of
8000         -fno-bounds-check. Add documentation for -fno-store-check.
8001         * java-tree.h (flag_store_check): Declare.
8002         (build_java_arraystore_check): Declare.
8003         * lang.c (flag_store_check): Initialize to 1.
8004         (lang_f_options): Add store-check option.
8005         * jvspec.c: Don't pass store-check option to jvgenmain.
8006         * lang-options.h: Add help string for -fno-store-check.
8007
8008 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8009
8010         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8011         * java-tree.h (java_dup_lang_specific_decl): New.
8012         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8013
8014 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8015
8016         * builtins.c, decl.c: Delete traditional-mode-related code
8017         copied from the C front end but not used, or used only to
8018         permit the compiler to link.
8019
8020 2002-02-22  Tom Tromey  <tromey@redhat.com>
8021
8022         Fix for PR java/2369:
8023         * jvspec.c (verify_class_name): New function.
8024         (lang_specific_driver): Call it.
8025         (JAVA_START_CHAR_P): New macro.
8026         (JAVA_PART_CHAR_P): Likewise.
8027
8028 2002-02-22  Per Bothner  <per@bothner.com>
8029
8030         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8031         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8032         type_info pointer (currently unimplemented hence NULL) to vtable.
8033         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8034         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8035         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8036         (build_dtable_decl):  Add declarations for new fields.
8037
8038 2002-02-20  Per Bothner  <per@bothner.com>
8039
8040         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8041         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8042         don't need to set it on the COMPOUND_EXPR - the caller does that.
8043
8044 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8045
8046         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8047         `--CLASSPATH' becomes `--classpath.'
8048         * gjavah.c: Likewise.
8049         * jcf-dump.c: Likewise.
8050         * lang-options.h: Likewise.
8051         * lang.c: Likewise.
8052         * jcf-path.c: Updated comment.
8053         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8054         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8055         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8056         (jcf_path_CLASSPATH_arg): Ditto.
8057         (classpath_u): Updated leading comment.
8058
8059 2002-02-20  Per Bothner  <per@bothner.com>
8060
8061         * builtins.c (check_for_builtin):  New function.
8062         (build_call_or_builtin):  Remove.
8063         * java-tree.h:  Update accordingly.
8064         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8065         of build_call_or_builtin.
8066         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8067         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8068         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8069
8070 2002-02-17  Tom Tromey  <tromey@redhat.com>
8071
8072         * java-tree.h (TYPE_STRICTFP): New macro.
8073         (struct lang_type) [strictfp]: New field.
8074         (CLASS_STRICTFP): New macro.
8075         (METHOD_STRICTFP): New macro.
8076         (struct lang_decl) [strictfp]: New field.
8077         * parse.y (method_header): Disallow strictfp constructor or
8078         abstract method.
8079         (STRICT_TK): Move before MODIFIER_TK.
8080         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8081         (METHOD_MODIFIERS): Likewise.
8082         (INTERFACE_MODIFIERS): Likewise.
8083         * jcf-write.c (get_access_flags): Likewise.
8084         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8085         (add_method_1): Likewise.
8086         (get_access_flags_from_decl): Likewise.
8087         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8088         recognize strictfp flag.
8089         * jcf.h (ACC_STRICT): New define.
8090
8091 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8092
8093         * class.c(build_utf8_ref): Move declaration of decl_size
8094
8095 2002-02-07  Tom Tromey  <tromey@redhat.com>
8096
8097         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8098         path.
8099
8100 2002-02-04  Anthony Green  <green@redhat.com>
8101
8102         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8103         sections if available.
8104
8105 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8106
8107         * parse.y (java_expand_classes): Fix typo in static field loop.
8108
8109 2002-02-02  Richard Henderson  <rth@redhat.com>
8110
8111         * class.c (add_field): Mark static fields external.
8112         (build_class_ref): Remove redundant set.
8113         * parse.y (java_expand_classes): Mark static fields of classes
8114         to be compiled as local.
8115         * jcf-parse.c (parse_class_file): Likewise.
8116
8117 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8118
8119         * gcj.texi (About CNI): New node.
8120
8121 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8122
8123         PR java/5080
8124         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8125         setlocale() with LC_CTYPE as a parameter.
8126         * jv-scan.c: Same.
8127
8128 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8129
8130         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8131         Follow GNU Coding Standards for --version.
8132
8133 2002-01-28  Tom Tromey  <tromey@redhat.com>
8134
8135         * expr.c (build_jni_stub): Ensure storage for `meth' is
8136         generated.
8137         * parse.y (java_complete_expand_methods): Set
8138         current_function_decl before building JNI stub.
8139
8140 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8141
8142         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8143         BUILT_IN_SQRTF.
8144
8145 2002-01-22  Tom Tromey  <tromey@redhat.com>
8146
8147         * decl.c (java_init_decl_processing): Use add_predefined_file.
8148         Predefine RawData.java.
8149         (predef_filenames): Removed.
8150         (java_init_decl_processing): Don't register predef_filenames.
8151         * jcf-parse.c (add_predefined_file): New function.
8152         (predefined_filename_p): Rewrote.
8153         (predefined_filename_p): No longer static.
8154         * decl.c (java_init_decl_processing): Call initialize_builtins.
8155         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8156         (java/builtins.o): New target.
8157         * builtins.c: New file.
8158         * parse.y (patch_invoke): Use build_call_or_builtin.
8159         * java-tree.h (build_call_or_builtin): Declare.
8160         (initialize_builtins): Declare.
8161         (java_set_exception_lang_code): Removed unused declaration.
8162         (PREDEF_FILENAMES_SIZE): Removed.
8163         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8164         (predef_filenames): New define.
8165         (add_predefined_file): Declare.
8166         (predefined_filename_p): Declare.
8167         * expr.c (expand_invoke): Use build_call_or_builtin.
8168
8169 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8170
8171         * parse.y (patch_switch_statement): Fix format specifier.
8172
8173 2002-01-16  Tom Tromey  <tromey@redhat.com>
8174
8175         More for PR java/5365:
8176         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8177         default.
8178         (process_file): Generate include for
8179         java.lang.UnsupportedOperationExceptions.
8180
8181 2002-01-15  Andreas Jaeger  <aj@suse.de>
8182
8183         * .cvsignore: Add man pages.
8184
8185 2002-01-15  Tom Tromey  <tromey@redhat.com>
8186
8187         Fix for PR java/5365:
8188         * gjavah.c (process_file): Turn class name into a file name.
8189
8190 2002-01-14  Matthias Klose  <doko@debian.org>
8191
8192         * gcj.texi: Fix whitespace and formatting errors in the
8193         synopsis of the man pages. Update copyright.
8194
8195 2002-01-14  Tom Tromey  <tromey@redhat.com>
8196
8197         For PR libgcj/5303:
8198         * Make-lang.in (java.install-man): Handle jv-convert man page.
8199         (java.generated-manpages): Added jv-convert.1.
8200         (java.uninstall): Remove jv-convert.1.
8201         (java.maintainer-clean): Likewise.
8202         ($(srcdir)/java/jv-convert.1): New target.
8203         * gcj.texi (Top): Link to jv-convert node.
8204         (Individual utilities): Likewise.
8205         (Invoking jv-convert): New node.
8206
8207 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8208             Martin Kahlert  <martin.kahlert@infineon.com>
8209
8210         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8211         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8212
8213 2002-01-03  Graham Stott  <grahams@redhat.com>
8214
8215         * class.c (compile_resource_file): Update copyright date.
8216         Constify filename parameter.
8217         (java-tree.h): Update copyright date.
8218         (compile_resource_file): Constify filename parameter.
8219
8220 2002-01-03  Graham Stott  <grahams@redhat.com>
8221
8222         * gcc/jcf-parse.c: Update copyright date.
8223         (yyparse): Constify resource_filename.
8224
8225 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8226
8227         * parse.y (src_parse_roots): Don't needlessly zero init.
8228
8229 2001-12-31  Tom Tromey  <tromey@redhat.com>
8230
8231         * parse.y (dump_java_tree): New function.
8232         (source_end_java_method): Call it.
8233         (end_class_declaration): Likewise.
8234         * lang.c (java_decode_option): Call dump_switch_p.
8235
8236 2001-12-28  Tom Tromey  <tromey@redhat.com>
8237
8238         * gen-table.pl: Don't process characters after \uffff.  Added
8239         comment pointing to input file.
8240
8241 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8242
8243         * gen-table.pl: Const-ify output.  Document the location of a
8244         suitable unicode input file.
8245
8246         * chartables.h: Regenerate.
8247
8248 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8249
8250         * chartables.h: Const-ify.
8251         * gjavah.c (options): Likewise.
8252         * jcf-dump.c (options): Likewise.
8253         * jv-scan.c (options): Likewise.
8254         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8255         * parse.y (binop_lookup): Likewise.
8256
8257 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8258
8259         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8260         the static arrays that are output.
8261         * jvspec.c (jvgenmain_spec): Make static.
8262         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8263         * keyword.h: Regenerate.
8264         * lang.c (string_option, process_option_with_no, lang_f_options,
8265         lang_W_options): Const-ify.
8266         * lex.c (java_lex): Likewise.
8267
8268 2001-12-21  Richard Henderson  <rth@redhat.com>
8269
8270         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8271         (get_boehm_type_descriptor): ... here.  Arrange for the
8272         TREE_TYPE to get set properly.
8273
8274 2001-12-21  Richard Henderson  <rth@redhat.com>
8275
8276         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8277         only if the target requires collect2.
8278
8279         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8280
8281 2001-12-20  Tom Tromey  <tromey@redhat.com>
8282
8283         For PR java/4509:
8284         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8285         CAN_COMPLETE_NORMALLY for the node.
8286         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8287         generate code for second branch if first branch can't complete
8288         normally.
8289         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8290         the loop head if the loop body can't complete normally.
8291
8292 2001-12-20  Tom Tromey  <tromey@redhat.com>
8293
8294         For PR java/4766:
8295         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8296         case where `finally' clause can't complete normally.
8297
8298 2001-12-20  Tom Tromey  <tromey@redhat.com>
8299
8300         Fixes PR java/5057:
8301         * parse.y (analyze_clinit_body): Added this_class parameter.
8302         Check for more cases where we must keep <clinit>.
8303         (maybe_yank_clinit): Cleaned up flow control.
8304
8305 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8306
8307         * decl.c (java_init_decl_processing): Don't initialize
8308         finit_leg_identifier_node.
8309         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8310         (finit_leg_identifier_node): Remove.
8311         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8312
8313 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8314
8315         * mangle.c (mangle_member_name): Don't special-case for
8316         NO_DOLLAR_IN_LABEL.
8317         * mangle_name.c (unicode_mangling_length): Likewise.
8318         (append_unicode_mangled_name): Likewise.
8319         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8320         code.
8321
8322 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8323
8324         * expr.c (build_java_array_length_access): Don't force null pointer
8325         check unless flag_check_references is set.
8326
8327 2001-12-20  Tom Tromey  <tromey@redhat.com>
8328
8329         Fix for PR java/3417:
8330         * parse.y (patch_assignment): Added special processing for
8331         `return'.
8332         (patch_return): Don't convert booleans to integers, and don't
8333         special-case `null'.
8334
8335 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8336
8337         * config-lang.in (diff_excludes): Remove.
8338
8339 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8340
8341         * gcj.texi: Update link to GCC manual.
8342
8343 2001-12-17  Tom Tromey  <tromey@redhat.com>
8344
8345         * parse.y (link_nested_class_to_enclosing): Removed useless
8346         statement.
8347
8348 2001-12-16  Tom Tromey  <tromey@redhat.com>
8349
8350         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8351         Fixes PR java/5088.
8352
8353 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8354
8355         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8356         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8357         spelling errors.
8358
8359 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8360
8361         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8362
8363 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8364
8365         * decl.c (java_init_decl_processing): Build otable_type correctly.
8366         otable_decl is an otable_type.
8367
8368 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8369
8370         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8371         otable_type, otable_ptr_type, method_symbol_type,
8372         method_symbols_array_type, method_symbols_array_ptr_type): New
8373         field/global tree definitions.
8374         (flag_indirect_dispatch): New flag.
8375         * decl.c (java_init_decl_processing): Initialize new otable and
8376         otable_syms type nodes and decls. Add new field "index" to
8377         method_type_node.
8378         * class.c (build_method_symbols_entry): New function.
8379         (make_method_value): Set "index" to to method's vtable index for
8380         virtual methods when indirect-dispatch is not used.
8381         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8382         and set vtable_method_count to -1. Set otable and otable_syms field
8383         if indirect-dispatch is used and there was something to put in them.
8384         (build_method_symbols_entry): New function.
8385         (emit_offset_symbol_table): New function.
8386         * expr.c (get_offset_table_index): New function.
8387         (build_invokevirtual): Build array reference to otable at the index
8388         returned by get_offset_table_index, and use the result as the vtable
8389         offset.
8390         (build_invokeinterface): Similar.
8391         * jcf-parse.c (yyparse): If indirect-dispatch, call
8392         emit_offset_symbol_table at the end of compilation, after all classes
8393         have been generated.
8394         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8395         * lang.c (flag_indirect_dispatch): Define.
8396         (lang_f_options): Add indirect-dispatch flag.
8397
8398 2001-12-14  Matthias Klose  <doko@debian.org>
8399
8400         * gcj.texi: Markup for man page generation. Document missing
8401         options printed by <tool> --help.
8402         Terminate description of gij's -ms option with a dot.
8403         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8404         (java.generated-manpages java.install-man, java.uninstall,
8405         java-maintainer-clean) Updated.
8406
8407 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8408
8409         * class.c (get_dispatch_table): Fix java vtable layout
8410         for TARGET_VTABLE_USES_DESCRIPTORS.
8411         * decl.c (java_init_decl_processing): Initialize
8412         alloc_no_finalizer_node, finalize_identifier_node.
8413         * expr.c (class_has_finalize_method): New function.
8414         (expand_java_NEW): Generate calls for finalizer-free allocation.
8415         (build_invokevirtual): Fix java vtable layout for
8416         TARGET_VTABLE_USES_DESCRIPTORS.
8417         * java-tree.h (enum java_tree_index): New entries:
8418         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8419         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8420         (class_has_finalize_method): declare.
8421         (HAS_FINALIZER_P): New macro.
8422         * parse.y (patch_invoke): Generate calls for finalizer-free
8423         allocation.
8424
8425 2001-12-12  Matthias Klose  <doko@debian.org>
8426
8427         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8428         whitespace at end of line.
8429
8430 2001-12-11  Tom Tromey  <tromey@redhat.com>
8431
8432         * lex.c (java_init_lex): Define wfl_to_string as
8433         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8434
8435 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8436
8437         * class.c (make_method_value): Use null_pointer_node to
8438         represent empty exception table.
8439
8440 2001-12-10  Tom Tromey  <tromey@redhat.com>
8441
8442         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8443
8444 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8445
8446         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8447
8448 2001-12-09  Per Bothner  <per@bothner.com>
8449
8450         * check-init.c (current_switch_has_default):  New static field.
8451         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8452         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8453         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8454
8455 2001-12-09  Tom Tromey  <tromey@redhat.com>
8456
8457         * check-init.c (check_init): Don't allow pre- or post- increment
8458         or decrement of final variable.
8459         (final_assign_error): Minor error message rewording.
8460
8461 2001-12-08  Tom Tromey  <tromey@redhat.com>
8462
8463         * java-tree.h: Fixed typo.
8464
8465         * gjavah.c (decompile_method): Don't decompile to `return this'
8466         for static methods.
8467
8468         * gjavah.c (cxx_keywords): Re-sorted.
8469         * lex.c (cxx_keywords): Re-sorted.
8470
8471         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8472         else.
8473
8474         * gjavah.c (print_namelet): Clear subnamelets.
8475         (HANDLE_METHOD): Set `method_printed' earlier.
8476
8477 2001-12-07  Tom Tromey  <tromey@redhat.com>
8478
8479         * lang.c (lang_f_options): Added
8480         optimize-static-class-initialization.
8481         (java_decode_option): Removed special case.
8482
8483 2001-12-07  Per Bothner  <per@bothner.com>
8484
8485         * check-init.c (check_init):  Fix typo freeing memory twice.
8486
8487 2001-12-05  Per Bothner  <per@bothner.com>
8488
8489         Restore support for static class initialization optimization.
8490         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8491         * check-init.c (check_int):  At end of BLOCK handle initialization
8492         blocks, which used to be done in java_complete_expand_method but did
8493         not handle the case where check_for_initialization might allocate
8494         more than a word of bits.
8495         * decl.c (lang_make_tree):  The smic field is now a tree.
8496         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8497         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8498
8499         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8500
8501         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8502         Change from a hash table to a list.
8503         (struct_lang_decl):  Change field 'smic' to match.
8504         * class.c (add_method_1):  Initialize
8505         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8506         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8507         (java_expand_method_bodies): -here, since 'smic' is now a list.
8508         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8509
8510         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8511
8512         * class.c (java_hash_compare_tree_node):  Fix casts.
8513
8514 2001-12-04  Per Bothner  <per@bothner.com>
8515
8516         * check-init.c:   Handle definite unassignment to finals in addition
8517         to definite assignment.
8518         (loop_current_locals):  New field.
8519         (num_current_locals, int start_current_locals, num_current_words):
8520         Make static.
8521         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8522         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8523         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8524         (get_variable_decl, check_final_reassigned):  New functions.
8525         (check_init, check_bool_init):  Modify as needed for checking finals.
8526         (check_for_initialization):  Take extra parameter and return void.
8527         Do extra start-up logic to check final fields for assignment.
8528         * parse.y (check_static_final_variable_assignment_flag,
8529         reset_static_final_variable_assignment_flag, check_final_assignment,
8530         check_final_variable_local_assignment_flag,
8531         reset_final_variable_indirect_assignment_flag,
8532         reset_final_variable_global_assignment_flag):  Remove functions.
8533         (java_complete_expand_methods, outer_field_access_fix,
8534         patch_assignment): Remove no-longer used logic.
8535         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8536         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8537
8538         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8539         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8540         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8541
8542         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8543
8544         * java-tree.h (DECL FINAL):  New bit-field.
8545         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8546         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8547         (DECL_INIT_CALLS_THIS):  New macro.
8548         (struct lang_decl):  New bit-field init_calls_this.
8549         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8550         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8551         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8552         use it for both local variables and final fields.
8553         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8554         and local_final.
8555         (struct lang_type):  Remove hfv bit-field.
8556         (check_for_initialization):  Change to return void.
8557
8558         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8559         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8560         * check-init.c (final_assign_error):  New helper function.
8561         (check_final_reassigned, check_init):  Use it.
8562         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8563
8564         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8565         bit-fields to unsigned.
8566
8567 2001-12-03  Per Bothner  <per@bothner.com>
8568
8569         * parse.y (patch_binop):  Minor constant folding.
8570
8571         * parse.y (build_current_thisn):  Shorter 'buffer'.
8572
8573 2001-12-03  Per Bothner  <per@bothner.com>
8574
8575         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8576         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8577         * jcf-write.c (generate_bytecode_insns):  Remove support for
8578         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8579         * check-init.c (check_init):  Likewise.
8580
8581 2001-12-03  Per Bothner  <per@bothner.com>
8582
8583         * verify.c (subroutine_nesting):  New function.
8584         (verify_jvm_instructions):  Use it to fix logic for checking that
8585         we're done with the current subroutine.
8586
8587         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8588         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8589
8590 2001-12-03  Per Bothner  <per@bothner.com>
8591
8592         * jcf.h:  Fix obvious typo in comment.
8593         * typeck.c (build_null_signature):  Add comment.
8594
8595 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8596
8597         * expr.c: Remove leading capital from diagnostic messages, as
8598         per GNU coding standards.
8599         * jcf-io.c: Similarly.
8600         * jcf-parse.c: Similarly.
8601         * jv-scan.c: Similarly.
8602         * jvspec.c: Similarly.
8603         * mangle.c: Similarly.
8604
8605 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8606             Alexandre Petit-Bianco  <apbianco@redhat.com>
8607
8608         * expr.c (build_java_arrayaccess): Call save_expr on array for
8609         correct evaluation order, modified comment, fixed indentation.
8610         * parse.y: (patch_assignment): Correctly extract the array base
8611         from the tree generate by build_java_arrayaccess, added comments.
8612         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8613         Fixes PR java/3096, PR java/3803, PR java/3965.
8614
8615 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8616
8617         * expr.c (expand_byte_code): Remove trailing periods from messages.
8618         * jcf-parse.c (load_class, jcf_parse): Similarly.
8619         * jcf-write.c (generate_classfile): Similarly.
8620         * lex.c (java_lex): Similarly.
8621
8622 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8623
8624         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8625
8626 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8627
8628         * Make-lang.in (java.generated-manpages): New dummy target.
8629
8630 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8631
8632         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8633         ASM_FINAL_SPEC.
8634         (lang_specific_pre_link): Use set_input to set input_filename.
8635         Append `main' here.
8636         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8637         (main): Fix definition.
8638         Strip `main' from classname.
8639         Fixes PR java/227.
8640
8641 2001-11-18  Roger Sayle <roger@eyesopen.com>
8642
8643         * parse.h (java_expand_switch): Remove old prototype.
8644
8645 2001-11-18  Tom Tromey  <tromey@redhat.com>
8646
8647         Fix for PR java/1401:
8648         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8649         arg0 is null.
8650         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8651         correctly.
8652
8653 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8654
8655         * lang.c (finish_parse): Rename to java_finish.
8656         (LANG_HOOKS_FINISH, java_finish): New.
8657
8658 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8659
8660         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8661         * java-tree.h: New prototype.
8662         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8663
8664 2001-11-13  Tom Tromey  <tromey@redhat.com>
8665
8666         * gjavah.c (method_signature): New global.
8667         (HANDLE_METHOD): Set it.
8668         (decompile_return_statement): New function.
8669         (decompile_method): Use it.
8670         (print_method_info): Removed `synth' argument.
8671
8672 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8673
8674         * java-tree.h (java_set_yydebug): New.
8675         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
8676         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
8677         (print_lang_decl, print_lang_type, print_lang_identifier,
8678         print_lang_statistics, lang_print_xnode): Remove.
8679
8680 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8681
8682         * jcf-parse.c (init_lex): Remove.
8683         * lang.c (language_string, lang_identify): Remove.
8684         (struct lang_hooks): Constify.
8685         (LANG_HOOKS_NAME): Override.
8686         (init_parse): Update.
8687
8688 2001-11-08  Andreas Franck  <afranck@gmx.de>
8689
8690         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
8691         program_transform_name the way suggested by autoconf.
8692         (java.install-common): Also transform auxiliary program names with
8693         program_transform_name.
8694
8695 2001-11-08  Tom Tromey  <tromey@cygnus.com>
8696
8697         * parse.y (trap_overflow_corner_case): New rule.
8698         (unary_expression): Use it.
8699         * lex.c (java_init_lex): Don't set minus_seen.
8700         (yylex): Don't use minus_seen.  Communicate overflow to parser for
8701         it to handle.
8702         (error_if_numeric_overflow): New function.
8703         * parse.h (minus_seen): Removed field.
8704         (JAVA_RADIX10_FLAG): New define.
8705
8706 2001-11-07  Tom Tromey  <tromey@redhat.com>
8707
8708         Patch for PR java/1414:
8709         * parse.y (case_label_list): New global.
8710         (goal): Register case_label_list with GC.
8711         (java_complete_lhs): Save new case on case_label_list.
8712         (patch_switch_statement): Check for duplicate case labels.
8713
8714 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
8715
8716         * parse.y (patch_assignment): Removed unused third argument.
8717         (java_complete_lhs): Removed unused third argument to patch_assignment.
8718
8719 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8720
8721         * lang.c: Include langhooks-def.h.
8722         * Make-lang.in: Update.
8723
8724 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
8725
8726         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
8727
8728 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8729
8730         * mangle.c (find_compression_record_match): Don't match compression
8731         records for package name elements unless they occur at the start of
8732         the name. Fix for PR java/4717.
8733
8734 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8735
8736         * expr.c (expand_java_field_op): Don't special-case references to
8737         java.lang.PRIMTYPE.TYPE.
8738         (build_primtype_type_ref): Removed.
8739         * java-tree.h (build_primtype_type_ref): Remove prototype.
8740         * parse.y (maybe_build_primttype_type_ref): Removed.
8741         (complete_function_arguments): Don't special-case references to
8742         java.lang.PRIMTYPE.TYPE.
8743         (patch_assignment): Likewise.
8744         (array_constructor_check_entry): Likewise.
8745
8746 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
8747
8748         * mangle.c (static tree compression_table): Fixed leading comment.
8749         * parse.h (struct parser_ctxt): Fixed field comment.
8750         * parse.y (check_pkg_class_access): New prototype, fixed leading
8751         comment, new parameter used to emit error only if passed as true.
8752         (parse_check_super): Pass extra argument to check_pkg_class_access.
8753         (do_resolve_class): Likewise.
8754         (process_imports): Likewise.
8755         (read_import_dir): Fixed indentation.
8756         (find_in_imports_on_demand): New local class_type_name. Local
8757         node_to_use deleted. while loop changed into for loop. Report
8758         multiple definition only for accessible classes. Improved error
8759         message.
8760         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
8761         assigned to parameter list, fixed indentation. while loop changed
8762         into for loop, restore TREE_CHAIN on local `tem' before the next
8763         iteration.
8764
8765 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8766
8767         * lang.c (lang_get_alias_set): Deleted.
8768
8769 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8770
8771         * gjavah.c (jni_print_char): Fix thinko in last change.
8772
8773         * gjavah.c (jni_print_char, decode_signature_piece): Use
8774         safe-ctype macros and/or fold extra calls into fewer ones.
8775         * lex.c (java_read_unicode, java_lex): Likewise.
8776         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
8777         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
8778         * mangle_name.c (append_unicode_mangled_name,
8779         unicode_mangling_length): Likewise.
8780
8781 2001-10-17  Richard Henderson  <rth@redhat.com>
8782
8783         * Make-lang.in (java/lang.o): Depend on langhooks.h.
8784
8785 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
8786
8787         * lang.c (langhooks.h): Included.
8788         (LANG_HOOKS_INIT): Redefined.
8789         (LANG_HOOKS_INIT_OPTIONS): Likewise.
8790         (LANG_HOOKS_DECODE_OPTION): Likewise.
8791         (struct lang_hooks lang_hooks): New initialization.
8792
8793 2001-10-11  Per Bothner  <per@bothner.com>
8794
8795         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
8796         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
8797         The former is simpler, and jcf-write.c handles it better.
8798         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
8799         or WITH_CLEANUP_EXPR.
8800         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
8801         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
8802
8803         * parse.y (patch_if_else_statement):  If the condition is constant,
8804         optimize away the test.
8805
8806 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
8807
8808         * parse.y (patch_cast): Call patch_string on the first operand of
8809         the incoming node, update it if necessary. Fixes PR java/4510.
8810
8811 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8812
8813         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
8814         when name qualifier matches a package name.
8815
8816 2001-10-08  Tom Tromey  <tromey@redhat.com>
8817
8818         Fix for PR java/4489:
8819         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
8820         force a new label when computing `body_block'.
8821
8822 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8823
8824         * jcf-io.c (format_uint): Const-ify.
8825         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
8826         * lex.c (java_get_line_col): Likewise.
8827         * parse.y (build_incdec): Likewise.
8828
8829 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
8830
8831         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
8832         a NULL enclosing context if appropriate. Fixes PR java/4466.
8833
8834 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
8835
8836         * parse.y (patch_assignment): Use lvalue's original TYPE when
8837         building the final COMPOUND_EXPR.
8838         (try_reference_assignconv): Fixed leading comment.
8839
8840 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
8841
8842         * parse.y (check_final_variable_indirect_assignment): For
8843         COMPOUND_EXPR, return only if finals were found initialized
8844         properly, if not, keep on checking.
8845         (check_final_variable_global_assignment_flag): New local
8846         error_found, set when appropriate and used to decide whether to
8847         report uninitialized finals. Fixed typo in comment.
8848
8849 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8850
8851         * decl.c (init_decl_processing): Fixed typo in predef_filenames
8852         last three initializations. Fixes PR java/4360.
8853
8854 2001-09-21  Richard Henderson  <rth@redhat.com>
8855
8856         * class.c (get_dispatch_table): Handle function descriptors.
8857         (build_dtable_decl): Likewise.
8858         * expr.c (build_invokevirtual): Likewise.
8859
8860 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
8861
8862         * parse.y (patch_method_invocation): Build class initialization
8863         when static finals are used to qualify method invocation.
8864         Fixes PR java/4366.
8865
8866 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
8867
8868         * parse.h: (WFL_STRIP_BRACKET): Re-written using
8869         build_type_name_from_array_name.
8870         (STRING_STRIP_BRACKETS): New macro.
8871         * parse.y (build_type_name_from_array_name): New function.
8872         (array_creation_expression:): Accumulate []s instead of [s.
8873         (cast_expression:): Accumulate []s instead of [s after cast type
8874         name.
8875         (build_array_from_name): Local string deleted, use
8876         build_type_name_from_array_name.
8877         (build_unresolved_array_type): Accumulate []s instead of [s after
8878         type name.
8879         (register_fields): Fixed comment.
8880         (resolve_class): Local name, base deleted, new locals tname and
8881         array_dims. Use build_type_name_from_array_name. Use array_dims to
8882         build array type.
8883         (purify_type_name): Use STRING_STRIP_BRACKETS.
8884
8885 2001-09-18  Andreas Jaeger  <aj@suse.de>
8886
8887         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
8888         * jv-scan.c: Likewise.
8889
8890 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
8891
8892         * parse.y (patch_method_invocation): Inner class creation context
8893         check not enforced within constructors. Fixes PR java/1873.
8894
8895 2001-09-16  Tom Tromey  <tromey@redhat.com>
8896
8897         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
8898         NOTE_PUSH for single-case push.  Fixes PR java/4189.
8899
8900 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
8901
8902         * java-tree.h (TYPE_IMPORT_LIST): New macro.
8903         (TYPE_IMPORT_DEMAND_LIST): Likewise.
8904         (struct lang_type): New fields import_list and import_demand_list.
8905         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
8906         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
8907         (do_resolve_class): New local saved_enclosing_type, initialized,
8908         passed as parameter to find_in_imports and find_in_imports_on_demand.
8909         (find_in_imports): Added paramater enclosing_type, use its
8910         TYPE_IMPORT_LIST when applicable.
8911         (find_in_imports_on_demand): Added parameter enclosing_type, use
8912         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
8913         declaration and initialization.
8914         (fold_constant_for_init): Switch/restore current_class to the
8915         appropriate context.
8916
8917 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
8918
8919         * verify.c (verify_jvm_instructions): Fix typo.
8920
8921 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8922
8923         * expr.c (expand_invoke): Const-ification.
8924         * parse.y (patch_method_invocation): Likewise.
8925
8926 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8927
8928         * gjavah.c (cxx_keywords): Const-ification.
8929         * keyword.gperf (java_keyword): Likewise.
8930         * lang.c (java_tree_code_name): Likewise.
8931         * lex.c (cxx_keywords): Likewise.
8932         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
8933
8934 2001-09-11  Richard Henderson  <rth@redhat.com>
8935
8936         * parse.h (ctxp_for_generation): Mark extern.
8937
8938 2001-09-10  Richard Henderson  <rth@redhat.com>
8939
8940         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
8941
8942 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
8943
8944         * typeck.c (java_array_type_length, build_prim_array_type):
8945         Represent empty arrays by NULL index.
8946
8947 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
8948
8949         * java-tree.h (compile_resource_file): Grouped with other prototypes.
8950         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
8951
8952 2001-09-06  Anthony Green  <green@redhat.com>
8953
8954         * class.c (O_BINARY): Define if necessary.
8955         (registerResource_libfunc): Declare.
8956         (init_class_processing): Initilize registerResource_libfunc.
8957         (compile_resource_file): New function.
8958         * java-tree.h (resource_name): Declare.
8959         (compile_resource_file): Declare.
8960         * jcf-parse.c (yyparse): Handle compiling java resource files.
8961         * lang.c (java_decode_option): Handle -fcompile-resource option.
8962         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
8963         resource files.
8964         * gcj.texi (Code Generation): Add documentation for -R flag.
8965
8966 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
8967
8968         * jcf-write.c (generate_classfile): Issue an error in case of
8969         field/initial value mismatch.
8970         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
8971         being initialized and we're generating bytecode.
8972         (java_complete_lhs): In MODIFY_EXPR section: added comments,
8973         set DECL_INITIAL properly when appropriate.
8974         Fixes PR java/4230
8975         Fixes PR java/4204
8976
8977 2001-09-01  Per Bothner  <per@bothner.com>
8978
8979         * parse.y (maybe_yank_clinit):  A field without an initializer is not
8980         relevant.  All initializers except static final and constant require
8981         <clinit>, regardless of flag_emit_class_files.
8982
8983 2001-08-31  Per Bothner  <per@bothner.com>
8984
8985         * class.c (set_constant_value):  When not emitting class files, then a
8986         String ConstantValue is a utf8const_ptr_type.
8987
8988 2001-08-30  Per Bothner  <per@bothner.com>
8989
8990         * jcf-write.c (generate_classfile):  Check that field is primitive
8991         or string before emitting ConstantValue attribute.
8992
8993 2001-08-30  Per Bothner  <per@bothner.com>
8994
8995         * parse.y (resolve_qualified_expression_name):  If creating a
8996         COMPOUND_EXPR, set it's type correctly.
8997
8998 2001-08-30  Per Bothner  <per@bothner.com>
8999
9000         * jcf-io.c (open_class):  Set filename field.
9001
9002         * jcf-parse,c (parse_class_file):  Set current_function_decl
9003         for better error message when Code attribute is missing.
9004
9005         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9006         better diagnostics, especially for constructors.
9007
9008 2001-08-30  Per Bothner  <per@bothner.com>
9009
9010         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9011         attribute if field is not final, for compatibility with jdk.
9012
9013         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9014         to correct type.  Work-around for front-end bug.
9015         * class.c (set_constant_value):  Error if constant has wrong type.
9016
9017 2001-08-30  Per Bothner  <per@bothner.com>
9018
9019         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9020         "Double" are printed at verbosity 1.
9021
9022         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9023
9024         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9025
9026 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9027
9028         * parse.y (patch_assignment): Don't verify final re-assignment here.
9029         (java_complete_lhs): Verify assignments to finals calling
9030         patch_assignment. Verify re-assignments to finals before calling
9031         patch_assignment.
9032
9033 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9034
9035         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9036         Fixes PR java/1413
9037
9038 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9039
9040         * lex.c (java_lex): new local found_hex_digits. Set and then used
9041         in test to reject invalid hexadecimal numbers.
9042         * parse.y (java_complete_tree): Prevent unwanted cast with
9043         initialized floating point finals.
9044         (patch_binop): Emit a warning when detecting a division by zero,
9045         mark result not constant, don't simplify non integer division.
9046
9047 2001-08-28  Per Bothner  <per@bothner.com>
9048
9049         * jcf-write.c  (generate_bytecode_insns):  For increments and
9050         decrements just recurse to push constant.  Improvement on Mark's patch.
9051
9052 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9053
9054         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9055         real conversion for increments and decrements of reals.
9056
9057 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9058
9059         * parse.y (resolve_qualified_expression_name): Handle unresolved
9060         qualified expressions, prevent numerical qualifiers, fixed typo.
9061         Fixes PR java/4141
9062
9063 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9064
9065         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9066         don't report anything but deprecated class when marked so. Handle
9067         VAR_DECL.
9068         (patch_method_invocation): Check deprecation on methods and types.
9069         (patch_binop): code becomes an enum tree_code, added default: to
9070         switch to handle that. Detect division by zero, try to fold and
9071         return before using a subroutine.
9072
9073 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9074
9075         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9076         file smaller than 4 bytes.
9077         * parse.y (check_inner_circular_reference): New function.
9078         (check_circular_reference): Likewise.
9079         (array_initializer:): Accept {,}.
9080         (java_check_circular_reference): Rewritten using
9081         check_circular_reference and check_inner_circular_reference.
9082         (java_complete_expand_method): Unconditionally save and restore
9083         the unpurged exception list.
9084         (build_dot_class_method_invocation): Unmangle signature parameter.
9085
9086 2001-08-21  Tom Tromey  <tromey@redhat.com>
9087
9088         * decl.c (init_decl_processing): Add `throws' field to method
9089         descriptor.
9090         * class.c (make_method_value): Compute `throws' field for method.
9091
9092 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9093
9094         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9095         circularity is detected.
9096         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9097
9098 2001-08-17  Richard Henderson  <rth@redhat.com>
9099
9100         * class.c (emit_register_classes): Add align parameter to
9101         call to assemble_integer.
9102
9103 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9104
9105         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9106         loading a class_or_name fails, try considering an innerclass name
9107         and load the enclosing context.
9108         * parse.y (resolve_inner_class): New function.
9109         (find_as_inner_class): Added leading comment.
9110         (register_incomplete_type): Keep the current context as enclosing
9111         context for JDEP_FIELD dependencies.
9112         (do_resolve_class): Locals new_class_decl and super initialized to
9113         NULL. Call resolve_inner_class, explore the enclosing context
9114         superclass if necessary.
9115         Fixes PR java/4007
9116
9117 2001-08-16  Tom Tromey  <tromey@redhat.com>
9118
9119         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9120         * gjavah.c (main): Updated for change to jcf_path_seal.
9121         * lang.c (version_flag): New global.
9122         (java_decode_option): Recognize `-version'.
9123         (java_init): Update for change to jcf_path_seal.
9124         * jcf.h (jcf_path_seal): Added `print' argument.
9125         * jcf-path.c (jcf_path_seal): Added `print' argument.
9126
9127 2001-08-13  Zack Weinberg  <zackw@panix.com>
9128
9129         * Make-lang.in (java/decl.o): Update dependencies.
9130         * decl.c: Include libfuncs.h, don't include toplev.h.
9131
9132 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9133
9134         * decl.c (init_decl_processing): exception_type_node,
9135         class_not_found_type_node, and no_class_def_found_type_node
9136         initialized. predef_filenames augmented accordingly.
9137         instinit_identifier_node initialized.
9138         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9139         * java-tree.h (enum java_tree_index): New entries
9140         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9141         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9142         (exception_type_node): New macro.
9143         (class_not_found_type_node): Likewise.
9144         (no_class_def_found_type_node): Likewise.
9145         (instinit_identifier_node): Likewise.
9146         (PREDEF_FILENAMES_SIZE): Adjusted.
9147         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9148         (struct lang_type): Fixed typo in bitfield name.
9149         (DECL_INSTINIT_P): New macro.
9150         (ID_INSTINIT_P): Likewise.
9151         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9152         attribute.
9153         * parse.y (encapsulate_with_try_catch): New function.
9154         (generate_instinit): Likewise.
9155         (build_instinit_invocation): Likewise.
9156         (ctors_unchecked_throws_clause_p): Likewise.
9157         (add_instance_initializer): Deleted.
9158         (build_instance_initializer): Likewise.
9159         (in_instance_initializer): Likewise.
9160         (check_method_redefinition): instinit$ not to be verified.
9161         (java_complete_expand_methods): Generate instinit$, simplified code.
9162         (build_dot_class_method): Eliminated unnecessary locals. Use
9163         encapsulate_with_try_catch, removed unnecessary code.
9164         (fix_constructors): New local iii. Use build_instinit_invocation.
9165         (patch_method_invocation): Added comment.
9166         (maybe_use_access_method): Don't consider instinit$.
9167         (find_applicable_accessible_methods_list): Shorten the search for
9168         instinit$ too.
9169         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9170         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9171         (patch_throw_statement): Likewise. Fixed typo.
9172
9173 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9174
9175         Revert:
9176         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9177         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9178         ASM_FINAL_SPEC.
9179         (lang_specific_pre_link): Use set_input to set input_filename.
9180         Append `main' here.
9181         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9182         (main): Fix definition.
9183         Strip `main' from classname.
9184         Fixes PR java/227.
9185
9186 2001-08-11  Zack Weinberg  <zackw@panix.com>
9187
9188         * lex.h: Don't include setjmp.h.  Don't define
9189         SET_FLOAT_HANDLER or prototype set_float_handler.
9190
9191 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9192
9193         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9194         `poplevel' in the right order.
9195
9196 2001-08-09  Richard Henderson  <rth@redhat.com>
9197
9198         * Make-lang.in (class.o): Depend on TARGET_H.
9199         * class.c (emit_register_classes): Use target hooks instead of
9200         assemble_constructor and assemble_destructor.
9201
9202 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9203
9204         * check-init.c (flags.h): Include
9205         (check_init): Don't report uninitialized static class
9206         initialization flags, don't free bit index when doing static class
9207         initialization optimization.
9208         (check_for_initialization): Return type changed to `unsigned int.'
9209         (attach_initialized_static_class): New function.
9210         * class.c (add_method_1): Create the initialized static class
9211         table if necessary.
9212         (finish_class): Always emit deferred inline methods.
9213         * decl.c (emit_init_test_initialization): Moved to expr.c
9214         (complete_start_java_method): Don't traverse
9215         DECL_FUNCTION_INIT_TEST_TABLE.
9216         (lang_mark_tree): Mark hash tables in function decls.
9217         * expr.c (emit_init_test_initialization): Moved from decl.c.
9218         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9219         initialization flag, set DECL_CONTEXT and
9220         LOCAL_CLASS_INITIALIZATION_FLAG.
9221         (java_lang_expand_expr): Emit initialization code for static class
9222         initialized flags when entering block, if necessary.
9223         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9224         * java-tree.h (flag_optimize_sci): New global variable declaration.
9225         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9226         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9227         (LOCAL_FINAL_P): Fixed typo in comment.
9228         (FINAL_VARIABLE_P): Likewise.
9229         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9230         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9231         (struct lang_decl): New fields `ict', `smic' and `cif.'
9232         (check_for_initialization): New returned value for global.
9233         (attach_initialized_static_class): New global function.
9234         (STATIC_CLASS_INIT_OPT_P): New macro.
9235         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9236         * lang.c (java_decode_option): Handle
9237         `-fno-optimize-static-class-initialization'
9238         * parse.y (start_complete_expand_method): New function.
9239         (java_expand_method_bodies): Likewise.
9240         (attach_init_test_initialization_flags): Likewise.
9241         (adjust_init_test_initialization): Likewise.
9242         (emit_test_initialization): Likewise.
9243         (java_complete_expand_methods): Nullify abstract and native method
9244         bodies.
9245         (java_complete_expand_method): New locals `fbody', `block_body'
9246         and `exception_copy.' Reorganized: directly return on empty method
9247         bodies, call `start_complete_expand_method', remember definitely
9248         initialized static class in function, don't expand method bodies.
9249         (java_expand_classes): Call `java_expand_method_bodies' before
9250         `finish_class' when compiling to native.
9251         (resolve_expression_name): Use `orig' after building outer class
9252         field access.
9253         (patch_invoke): Remember static method invocations.
9254
9255 2001-08-06  Richard Henderson  <rth@redhat.com>
9256
9257         * class.c (emit_register_classes): Pass a symbol_ref and priority
9258         to assemble_constructor.
9259
9260 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9261
9262         * java-tree.h (all_class_filename): New macro.
9263         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9264         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9265         newly created IDENTIFIER_NODE to `all_class_filename.'
9266
9267 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9268
9269         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9270         Use ggc_add_tree_root to register roots.
9271
9272 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9273
9274         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9275         second operand calling check_init.
9276         * decl.c (complete_start_java_method): Swaped second and third
9277         arguments while creating WITH_CLEANUP_EXPR node.
9278         * jcf-write.c (generate_bytecode_insns): Use second operand
9279         instead of third when handling WITH_CLEANUP_EXPR.
9280         * parse.y (java_complete_lhs): Expand second operand of
9281         WITH_CLEANUP_EXPR nodes.
9282         (patch_synchronized_statement): Swaped second and third arguments
9283         while creating WITH_CLEANUP_EXPR node.
9284
9285 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9286
9287         * parse.y (create_interface): Avoid cyclic inheritance report when
9288         syntax error encountered during class definition.
9289         Fixes PR java/2956
9290
9291 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9292
9293         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9294         ASM_FINAL_SPEC.
9295         (lang_specific_pre_link): Use set_input to set input_filename.
9296         Append `main' here.
9297         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9298         (main): Fix definition.
9299         Strip `main' from classname.
9300         Fixes PR java/227.
9301
9302 2001-07-18  Tom Tromey  <tromey@redhat.com>
9303
9304         For PR java/2812:
9305         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9306         * lex.c (java_new_lexer): Use ICONV_CONST.
9307         (java_read_char): Likewise.
9308         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9309         (jv-scan$(exeext)): Likewise.
9310
9311 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9312
9313         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9314         * parse.y (check_class_interface_creation): Allow `private' if the
9315         enclosing is not an interface.
9316         (create_interface): Interface tagged public if the enclosing
9317         context is an interface.
9318         (create_class): Class tagged public if the enclosing context
9319         is an interface.
9320         Fixes PR java/2959
9321
9322 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9323
9324         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9325         Fixes PR java/2665
9326
9327 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9328
9329         * check-init.c (check_init): Remove references to EXPON_EXPR.
9330
9331 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9332
9333         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9334         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9335         Fixes PR java/3602
9336
9337 2001-07-13  Tom Tromey  <tromey@redhat.com>
9338
9339         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9340         invocation.
9341
9342 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9343
9344         * parse.y (patch_method_invocation): Don't override primary if one
9345         is already provided, but let this$<n> be built. Fixed comment.
9346
9347 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9348
9349         * parse.y (empty_statement:): Report empty statement error only
9350         when found at class declaration level.
9351         Fixes PR java/3635
9352
9353 2001-07-12  Tom Tromey  <tromey@redhat.com>
9354
9355         * expr.c (expand_load_internal): New function.
9356         (LOAD_INTERNAL): Use it.
9357
9358 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9359
9360         * parse.y (verify_constructor_super): Compare anonymous class ctor
9361         args with `valid_method_invocation_conversion_p.'
9362         Fixes PR java/3285
9363
9364 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9365
9366         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9367         `-fsyntax-only.' Fixes PR java/3248
9368
9369 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9370
9371         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9372
9373 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9374
9375         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9376         current function is static. Fixes PR java/1970
9377
9378 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9379
9380         * parse.y (patch_method_invocation): Add enclosing context to ctor
9381         calls if necessary. Fixes PR java/2953
9382
9383 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9384
9385         * parse.y (resolve_package): Abort if qualified expression member
9386         isn't right.
9387         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9388         Fixes PR java/1391
9389
9390 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9391
9392         * verify.c: Don't use // comments.
9393
9394 2001-07-05  Tom Tromey  <tromey@redhat.com>
9395
9396         * lang.c (flag_assume_compiled): Removed.
9397         * java-tree.h (flag_assume_compiled): Removed.
9398         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9399         -fhash-synchronization, -fuse-divide-subroutine,
9400         -fcheck-references, -femit-class-file, -femit-class-files,
9401         -fassume-compiled.  Updated --encoding information.  Changed
9402         -foutput-class-dir to `-d'.
9403
9404 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9405
9406         * jcf-parse.c (parse_class_file): Add lineno parameter to
9407         debug_start_source_file call.
9408
9409 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9410
9411         * gcj.texi: Use gpl.texi.
9412         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9413         dependencies and use doc/include in search path.
9414
9415 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9416
9417         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9418         `this'.  If so, don't build instance initializers.
9419
9420 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9421
9422         * parse.y (resolve_expression_name): Improved error message for
9423         inner class cases. Fixes PR java/1958
9424
9425 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9426
9427         * lang.c: #include diagnostic.h
9428         (lang_print_error): Add a `diagnostic_context *' parameter.
9429         (java_dummy_print): Likewise.
9430         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9431
9432 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9433
9434         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9435         * jcf.h (typedef struct JCF): New bitfield `finished.'
9436         (JCF_FINISH): Set `finished.'
9437         (JCF_ZERO): Reset `finished.'
9438         Fixes PR java/2633
9439
9440 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9441
9442         * parse.y (class_body_declaration:): Don't install empty instance
9443         initializers.
9444         Fixes PR java/1314
9445
9446 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9447
9448         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9449         (set_class_decl_access_flags): New function.
9450         * java-tree.h (set_class_decl_access_flags): New prototype.
9451         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9452         (parse_class_file): New local `decl_max_locals.' Take wide types
9453         into account to compute DECL_MAX_LOCALS.
9454         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9455         imports on demand.
9456
9457 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9458
9459         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9460
9461 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9462
9463         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9464         * parse.y (do_resolve_class): Moved comments out to leading comment
9465         section. Removed local `start', New local `_ht' and
9466         `circularity_hash.'  Record `enclosing' in hash table and search
9467         it to detect circularity.  Use `enclosing' as an argument to
9468         `lookup_cl.' Free the hash table when done.
9469
9470 2001-06-19  Tom Tromey  <tromey@redhat.com>
9471
9472         * lex.c (java_read_char): Disallow invalid and overlong
9473         sequences.  Fixes PR java/2319.
9474
9475 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9476
9477         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9478
9479 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9480
9481         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9482         arguments accordingly.
9483
9484 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9485
9486         * gcj.texi: Move contents to just after title page.
9487
9488 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9489
9490         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9491         builtin type.
9492         (patch_incomplete_class_ref): Build the class ref, build the class
9493         init if necessary, complete the tree.
9494         Fixes PR java/2605
9495
9496 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9497
9498         * parse.y (lookup_field_wrapper): Test `name' code.
9499         (resolve_qualified_expression_name): Test `qual_wfl' code.
9500         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9501         handle `qual_wfl' by code.
9502         (maybe_build_primttype_type_ref): Test `wfl' code.
9503
9504 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9505
9506         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9507         fdl.texi.
9508         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9509         the dvi file in the java directory.
9510
9511 2001-05-25  Sam TH  <sam@uchicago.edu>
9512
9513         * gen-table.pl javaop.h jcf.h lex.h,
9514         parse.h: Fix header include guards.
9515
9516 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9517
9518         * jv-scan.c (version): Update copyright year.
9519
9520 2001-05-21  Per Bothner  <per@bothner.com>
9521
9522         * jcf-parse.c (read_class):  If class is from .class or .zip file
9523         and it's already been read, don't push/pop parser context.
9524
9525 2001-05-18  Per Bothner  <per@bothner.com>
9526
9527         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9528         command line so the jvgenmain-generated main program comes first.
9529
9530 2001-05-15  Tom Tromey  <tromey@redhat.com>
9531
9532         * class.c (build_utf8_ref): Don't generate identifier based on
9533         utf8const contents.
9534
9535 2001-05-12  Richard Henderson  <rth@redhat.com>
9536
9537         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9538         * expr.c (java_lang_expand_expr): Expand it.
9539         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9540         calling build_exception_object_ref.
9541         * parse.y (catch_clause_parameter): Likewise.
9542         (build_dot_class_method): Likewise.
9543         (try_reference_assignconv): Likewise.
9544         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9545         * jcf-write.c (generate_bytecode_insns): Likewise.
9546
9547 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9548
9549         * parse.y (build_unresolved_array_type): Set
9550         EXPR_WFL_QUALIFICATION on the newly created wfl.
9551         Fixes PR java/2538. Fixes PR java/2535.
9552
9553 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9554
9555         * parse.y (fix_constructors): Removed unnecessary assignment to
9556         local. Moved assignment to `this$<n>', fixed comments and
9557         indentation.
9558         (build_wfl_wrap): Fixed indentation.
9559         Fixes PR java/2598, java/2579 and java/2658.
9560
9561 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9562
9563         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9564         check for byte swap.
9565
9566 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9567
9568         * expr.c (build_class_init): Move MODIFY_EXPR
9569         outside of COND_EXPR.  Remove variable `call'.
9570
9571 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9572
9573         * decl.c: NULL_PTR -> NULL.
9574         * jcf-write.c: Likewise.
9575
9576 2001-05-01  Tom Tromey  <tromey@redhat.com>
9577
9578         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9579         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9580         * gcj.texi: Updated copyright text.  Include fdl.texi.
9581         (Top): Link to new node.
9582
9583 2001-05-01  Per Bothner  <per@bothner.com>
9584
9585         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9586
9587 2001-05-01  Per Bothner  <per@bothner.com>
9588
9589         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9590         import_list contains the name, not the TREE_PURPOSE.
9591
9592 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9593
9594         * jcf-io.c (read_zip_member): Cast to long in comparison with
9595         signed value.
9596
9597         * jvspec.c (lang_specific_driver): Initialize variables.
9598
9599         * mangle.c (find_compression_record_match): Likewise.
9600
9601         * typeck.c (build_null_signature): Provide static prototype.  Mark
9602         parameter with ATTRIBUTE_UNUSED.
9603
9604         * verify.c (verify_jvm_instructions): Initialize variable.
9605
9606 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9607
9608         * parse.y (do_resolve_class): Check for cyclic inheritance during
9609         inner class resolution.
9610
9611 2001-04-27  Per Bothner  <per@bothner.com>
9612
9613         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9614         while iterating, since that could cause gc to lose stuff.
9615
9616 2001-04-26  Per Bothner  <per@bothner.com>
9617
9618         Fix method search wrt scope of inner classes to match JLS2.
9619         * typeck.c (build_null_signature):  New static function.
9620         (has_method):  New function.  Uses build_null_signature and lookup_do.
9621         * java-tree.h (has_method):  New declaration.
9622         * parse.y (find_applicable_accessible_methods_list):  Do not search
9623         context of inner classes here.
9624         (patch_method_invocation):  Search scope, ie. current and outer clases,
9625         for method matching simple name, to find class.
9626
9627 2001-04-26  Per Bothner  <per@bothner.com>
9628
9629         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9630         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9631
9632         * constants.c (find_methodref_with_class_index):  New function.
9633         (find_methodref_index):  Use find_methodref_with_class_index.
9634         * java-tree.h (find_methodref_with_class_index):  New declaration.
9635         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9636         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9637         If context changed from interface to class, don't use invokeinterface.
9638
9639 2001-04-25  Per Bothner  <per@bothner.com>
9640
9641         * verify.c (verify_jvm_instructions):  For field instructions,
9642         check that field index is valid.  For invoke instructions, check that
9643         method index is valid.
9644
9645 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9646
9647         * config-lang.in (target_libs): Copy from $libgcj_saved.
9648
9649 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9650
9651         * decl.c (init_decl_processing): Add new class "protectionDomain"
9652         field.
9653         * class.c (make_class_data): Set initial value for "protectionDomain".
9654
9655 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9656
9657         * jvspec.c (lang_specific_driver): Fix memory allocation
9658         deficit, by using concat in lieu of xmalloc/sprintf.
9659
9660 2001-04-20  Per Bothner  <per@bothner.com>
9661
9662         Fixes to compile multiple .class files at once.
9663         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9664         * java-tree.h (CLASS_PARSED_P):  New macro.
9665         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9666         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9667         (read_class):  Avoid some code duplication.
9668         Don't call JCF_FINISH for a .class file - might be needed later.
9669         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9670         rather than CLASS_LOADED_P, since latter implies class laid out.
9671         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9672         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9673
9674 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9675
9676         * Make-lang.in (java/boehm.o): Depend on toplev.h.
9677
9678         * boehm.c: Include toplev.h.
9679
9680 2001-04-06  Tom Tromey  <tromey@redhat.com>
9681             Alexandre Petit-Bianco  <apbianco@redhat.com>
9682
9683         Fix for PR gcj/1404 and PR gcj/2332:
9684         * parse.y (build_array_from_name): If we use the type_wfl then
9685         accumulate dimensions from the original type as well.
9686         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
9687
9688 2001-04-06  Tom Tromey  <tromey@redhat.com>
9689
9690         * parse.y (analyze_clinit_body): Return true if the second operand
9691         of a METHOD_EXPR is nonzero.
9692
9693 2001-04-06  Tom Tromey  <tromey@redhat.com>
9694
9695         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
9696         directory.
9697         ($(srcdir)/java/parse.c): Likewise.
9698
9699 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9700
9701         * gcj.texi: Use `which-gcj' instead of `which-g77.'
9702         (version-gcc): Initialized.
9703         (which-gcj): Likewise.
9704
9705 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9706
9707         * java-tree.h (struct lang_decl): New macro
9708         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
9709         * parse.y (build_instance_initializer): New function.
9710         (add_instance_initializer): Use it.
9711         (java_fix_constructors): Set `current_class' before fix pass.
9712         (fix_constructors): Just return if already fixed. Move `super()'
9713         invocation ahead. Use `build_instance_initializer.'
9714         Fixes PR java/1315.
9715
9716 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9717
9718         * parse.y (resolve_qualified_expression_name): Pass field's
9719         DECL_CONTEXT to `not_accessible_p.'
9720         (not_accessible_p): Changed parameters order in `inherits_from_p'
9721         invocation.
9722
9723 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
9724
9725         * lang-options.h: Add flag_check_references.
9726
9727 2001-04-04  Per Bothner  <per@bothner.com>
9728
9729         * java-tree.h (CONSTANT_VALUE_P):  New macro.
9730         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
9731         * parse.y (maybe_build_class_init_for_field):  New static function.
9732         (resolve_expression_name, resolve_field_access):  Use
9733         maybe_build_class_init_for_field instead of build_class_init
9734         This does not do the init if the field is compile-time-constant.
9735         (resolve_field_access):  Simplify.
9736
9737         * parse.y (fold_constant_for_init):  Merge test into switch.
9738
9739 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
9740
9741         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
9742         on gansidecl.h.
9743         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
9744
9745 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
9746
9747         * expr.c (pop_type_0): Save the result of the first
9748         lang_printable_name call in a scratch buffer, so it
9749         won't be clobbered by the second call.
9750
9751 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9752
9753         * parse-scan.y (array_type:): Rewritten.
9754         (type_declaration:): `empty_statement' replaces `SC_TK.'
9755         (class_member_declaration:): `empty statement' added.
9756         (method_body:): Simplified.
9757         (static_initializer:): Likewise.
9758         (primary_no_new_array:): Use `type_literals.'
9759         (type_literals:): New rule.
9760         (dims:): Set and update `bracket_count.'
9761         Fixes PR java/1074. Fixes PR java/2412.
9762
9763 2001-03-28  Hans Boehm  <boehm@acm.org>
9764
9765         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
9766         (get_boehm_type_descriptor): Set type on returned value to be a
9767         pointer length integer.
9768
9769 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9770
9771         * expr.c (pop_type_0): Call `concat' rather than building the
9772         string manually.
9773         (pop_type): Add format specifier in call to `error'.
9774
9775         * parse.y (patch_method_invocation): Avoid casting away
9776         const-ness.
9777
9778 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
9779
9780         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
9781
9782 2001-03-28  Richard Henderson  <rth@redhat.com>
9783
9784         IA-64 ABI Exception Handling:
9785         * Make-lang.in (except.o): Don't depend on eh-common.h.
9786         * check-init.c (check_init): Handle EXC_PTR_EXPR.
9787         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
9788         [soft_exceptioninfo_call_node]: Remove.
9789         [eh_personality_libfunc, lang_eh_runtime_type]: New.
9790         (end_java_method): No emit_handlers.
9791         * except.c (java_set_exception_lang_code): Remove.
9792         (method_init_exceptions): Don't call it.
9793         (prepare_eh_table_type): No CATCH_ALL_TYPE.
9794         (build_exception_object_ref): New.
9795         (expand_end_java_handler): Update for except.h name changes.
9796         (emit_handlers, expand_resume_after_catch): Remove.
9797         * expr.c (java_lang_expand_expr): Update for except.h name changes.
9798         (process_jvm_instruction): Use build_exception_object_ref.
9799         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
9800         (soft_exceptioninfo_call_node): Remove.
9801         (build_exception_object_ref): Declare.
9802         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
9803         soft_exceptioninfo_call_node.  Move processing ...
9804         [EXC_PTR_EXPR]: ... here.
9805         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
9806         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
9807         (source_end_java_method): No java_set_exception_lang_code or
9808         emit_handlers.
9809         (build_dot_class_method): Use build_exception_object_ref.
9810         (try_reference_assignconv): Check EXC_PTR_EXPR not
9811         soft_exceptioninfo_call_node.
9812
9813 2001-03-28  Richard Henderson  <rth@redhat.com>
9814
9815         * java-tree.h (throw_node): Define as a single member of
9816         java_global_trees instead of a separate array.
9817         (JTI_THROW_NODE): New.
9818         * decl.c (throw_node): Don't declare.
9819         (init_decl_processing): Init a scalar throw_node.
9820         Don't register it for gc.
9821         * check-init.c (check_init): Reference scalar throw_node.
9822         * expr.c (build_java_athrow): Likewise.
9823         * jcf-write.c (generate_bytecode_insns): Likewise.
9824         * parse.h (BUILD_THROW): Likewise.
9825
9826 2001-03-28  Richard Henderson  <rth@redhat.com>
9827
9828         * decl.c (end_java_method): Do not save and restore
9829         flag_non_call_exceptions.
9830         * parse.y (source_end_java_method): Likewise.
9831         * lang.c (flag_exceptions): Don't declare.
9832         (java_init_options): Set flag_non_call_exceptions.  Set
9833         flag_exceptions here ...
9834         (java_init): ... not here.
9835
9836 2001-03-27  Richard Henderson  <rth@redhat.com>
9837
9838         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
9839         exceptions_via_longjmp.
9840
9841         * lang.c (flag_new_exceptions): Don't declare it.
9842         (java_init_options): Or set it.
9843
9844 2001-03-27  Richard Henderson  <rth@redhat.com>
9845
9846         * decl.c (end_java_method): Rename asynchronous_exceptions to
9847         flag_non_call_exceptions.
9848         * parse.y (source_end_java_method): Likewise.
9849
9850 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9851
9852         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9853
9854 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9855
9856         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
9857
9858 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9859
9860         * parse.y (find_as_inner_class): Follow current package
9861         indications not to mistakingly load an unrelated class.
9862
9863 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9864
9865         * constants.c (PUTN): Use memcpy, not bcopy.
9866
9867         * lex.c (java_read_char): Use memmove, not bcopy.
9868
9869         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
9870
9871 2001-03-23  Per Bothner  <per@bothner.com>
9872
9873         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
9874         macro for better error pin-pointing.
9875         * java-tree.h:  Fix typo in comment.
9876
9877         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
9878         Don't include jsr/goto in exception range.
9879         Check if start and end of exception range are the same (also TRY_EXPR).
9880         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
9881         However, do emit the following goto even if try_block is empty.
9882         Defer freeing exception_decl until after the finalizer, to make
9883         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
9884
9885         * parse.y (java_complete_lhs):  If the try-clause is empty, just
9886         return the finally-clause and vice versa.
9887
9888 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9889
9890         * gcj.texi (Input Options): documented the check for attribute
9891         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
9892         * java-tree.h (flag_force_classes_archive_check): Declared extern.
9893         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
9894         (jcf_parse): Check for the right classes archive if necessary.
9895         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
9896         (jcf_parse_fields): Fixed indentation.
9897         * jcf-write.c (append_gcj_attribute): New function.
9898         (generate_classfile): Compute the attribute count, invoke
9899         `append_gcj_attribute'.
9900         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
9901         turned into bit-fields. New bit-field `right_zip.'
9902         (JCF_ZERO): Set `right_zip' to zero.
9903         * lang-options.h (-fforce-classes-archive-check): Added flag.
9904         * lang.c (flag_force_classes_archive_check): New flag.
9905         (lang_f_options): New entry `force-classes-archive-check.'
9906         Fixes PR java/1213.
9907
9908 2001-02-07  Andrew Haley  <aph@redhat.com>
9909
9910         * gcj.texi (Configure-time Options): Add -fcheck-references.
9911         * expr.c (build_java_indirect_ref): New function.
9912         (java_check_reference): New function.
9913         (build_java_array_length_access): Use build_java_indirect_ref to
9914         check for null references.
9915         (build_java_arrayaccess): Likewise.
9916         (build_get_class): Likewise.
9917         (build_field_ref): Likewise.
9918         (invoke_build_dtable): Likewise.
9919         (build_invokeinterface): Likewise.
9920         * lang.c (lang_f_options): Add flag_check_references.
9921         * jvspec.c (jvgenmain_spec): Add flag_check_references.
9922         * java-tree.h (flag_check_references): New variable.
9923         * lang.c (flag_check_references): Likewise.
9924         * parse.y (patch_invoke): Use java_check_reference.
9925         (patch_assignment): Allow for extra nesting in
9926         _Jv_CheckArrayStore.
9927
9928 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
9929
9930         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
9931         * lex.c (cxx_keywords): Likewise.
9932
9933 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9934
9935         * parse.y (qualify_ambiguous_name): Broaden `length'
9936         recognition. Help MODIFY_EXPR be resolved as expression names.
9937         Fixes PR java/2066. Fixes PR java/2400.
9938
9939 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
9940
9941         * gjavah.c (process_file): Mark interface definitions with
9942         "__attribute__ ((java_interface))".
9943
9944 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
9945
9946         * class.c (layout_class): Fixed push_super_field's second
9947         argument. Fixes PR java/2333.
9948         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
9949         too early to lay innerclasses out.
9950
9951 2001-03-20  Tom Tromey  <tromey@redhat.com>
9952             Alexandre Petit-Bianco <apbianco@redhat.com>
9953
9954         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
9955         inside an array reference. Insertion of the array store check
9956         rewritten. Fixes PR java/2299.
9957
9958 2001-03-20  Tom Tromey  <tromey@redhat.com>
9959
9960         * lex.c (java_read_unicode): Only accept leading `u's.
9961
9962 2001-03-20  Tom Tromey  <tromey@redhat.com>
9963
9964         * jcf-parse.c (read_class): Initialize `class'.
9965
9966 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9967
9968         * jcf_parse.c (jcf_parse): Eliminate unused variable.
9969
9970 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9971
9972         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
9973         (layout_class): Likewise.
9974         (layout_class_method): Likewise.
9975         (emit_register_classes): Likewise.
9976         * decl.c (builtin_function): Likewise.
9977         (give_name_to_locals): Likewise.
9978
9979 2001-03-19  Per Bothner  <per@bothner.com>
9980
9981         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
9982         before trying to load an inner class.
9983
9984         Fixes to process to command-line .class files in two passes.
9985         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
9986         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
9987         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
9988         * class.c (is_compiled_class):  Fix for renamed flag.
9989         * parse.y (maybe_create_class_interface_decl):  Likewise.
9990         * jcf-parse.c (yyparse):  Also set if compiling .class files.
9991         * jcf-parse.c (read_class);  Read current_class.
9992         (jcf_parse):  Make static.
9993         (load_inner_classes):  New function, with code moved from jcf_parse,
9994         because we need to inner classes after the command-line files are read.
9995         (yyparse):  Set finput to NULL when it doesn't need to be closed.
9996         Reduce use of main_jcf (basically only for archive) and
9997         use finput instead of main_jcf->read_state.
9998         Inline jcf_figure_file_type into yyparse.
9999         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10000         Defer load_inner_classes and parse_class_file to a second pass,
10001         after we've correctly mapped command-line .clas fiels to classes.
10002         (jcf_figure_file_type):  Removed.
10003         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10004         (JCF_ZERO):  Also clear zipd field.
10005         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10006
10007 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10008
10009         * jcf-parse.c (yyparse): Change ch from char * to char.
10010
10011 2001-03-19  Per Bothner  <per@bothner.com>
10012
10013         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10014         Add constructed filelist-file at end, following -xjava.  Thus any .o
10015         and library files are not affected by the -xjava.  Also wrap
10016         explicit @FILE with -xjava and -xnone.
10017
10018 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10019
10020         * class.c (build_static_field_ref): Call make_decl_rtl() after
10021         setting the DECL_EXTERNAL flag.
10022
10023 2001-03-17  Per Bothner  <per@bothner.com>
10024
10025         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10026
10027         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10028         when result is is needed (target is STACK_TARGET).
10029
10030         * parse.h (JDEP_SOLV):  Removed.
10031         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10032
10033         * parse.y (incomplete_class_list): Removed.
10034         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10035         It doesn't work if resolve_class changes the name of an array type
10036         that is on the list and then someone else looks for the modified name.
10037         Also, seems liable to break when compiling multiple source files at
10038         once.  So the simplest is to just remove incomplete_class_list -
10039         it is only a minor space win and it is not even clear it saves time.
10040
10041         * parse.y (resolve_class):  Remove unneeded promote_type.
10042
10043 2001-03-15  Per Bothner  <per@bothner.com>
10044
10045         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10046         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10047         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10048         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10049
10050         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10051         * parse.y (java_expand_classes):  Likewise.
10052
10053         * parse.y (expand_start_java_method):  Was only called once and had a
10054         misleading name, so inline in caller java_complete_expand_method.
10055         (enter_a_block):  Likewise inline in enter_block and remove.
10056
10057         Remove junk from when gcc/java was created (by copying from C/C++).
10058         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10059         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10060         more_cleanups_ok, have_cleanups (which have never been used).
10061         (pushlevel, poplevel):  Remove related useless code.
10062
10063         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10064         vtable for Class) should be external, except when compiling Class.
10065
10066         * jvspec.c (lang_specific_driver):  Fix -C handling.
10067         Check -save-temps to see if temp @FILE should be deleted.
10068         Follow-up to/fix for February 16 patch.
10069
10070         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10071         (type_stack_dup):  Remove no-longer neded error check.
10072
10073 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10074
10075         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10076         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10077         don't surround the element with 'N..E' if the type name is
10078         unqualified.
10079
10080 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10081
10082         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10083         DECL_RTL_SET_P, etc.
10084         (make_method_value): Likewise.
10085         (get_dispatch_table): Likewise.
10086
10087         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10088
10089 2001-03-07  Tom Tromey  <tromey@redhat.com>
10090
10091         * config-lang.in (lang_requires): Define.
10092
10093 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10094
10095         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10096         not flag_fast_math.
10097
10098 2001-03-05  Per Bothner  <per@bothner.com>
10099
10100         Fix a problem where rest_of_decl_compilation applied to
10101         class_dtable_decl causes problems because it was done too early,
10102         before output file was opened.
10103         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10104         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10105         (make_class_data):  Define class_dtable_decl.
10106         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10107
10108 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10109
10110         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10111         uses of 'boolean' with 'bool'.
10112
10113 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10114
10115         * lang-specs.h: Add zero initializer for cpp_spec field to all
10116         array elements.
10117
10118 2001-02-16  Per Bothner  <per@bothner.com>
10119
10120         Handle compiling multiple input files at once, and @FILE syntax.
10121         * gcj.texi:  Updated documentation to match.
10122         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10123         * jcf-parse.c (parse_source_file):  Split into ...
10124         (parse_source_file_1):  New function - and:
10125         (parse_source_file_2):  New function.
10126         (yyparse):  On -ffilelist-file, open and scan named file.
10127         On first pass over files, only do parse_source_file_1.
10128         A new second pass calls parse_source_file_2 for each file to compile.
10129         (init_jcf_parse):  Call init_src_parse.
10130         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10131         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10132         as multiple input file combined in one compilation.
10133         * lang-options.h:  Add -ffilelist-file
10134         * lang.c (flag_filelist_file):  New flag variable.
10135         (lang_f_options):  Handle -ffilelist-file.
10136         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10137         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10138         gclass_list - use global fields of src_parse_roots instead.
10139         * parse.y (src_parse_roots):  New array.
10140         (incomplete_class_list, gclass_list):  New macros.
10141         (push_parser_context, java_pop_parser_context,
10142         java_parser_context_resume):  Don't fiddle with deleted fields.
10143         (various):  Use incomplete_class gclass_list and global macros
10144         instead of parse_ctxt fields - the lists are global.
10145         (init_src_parse):  New function.
10146
10147 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10148
10149         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10150
10151 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10152
10153         * parse.y (check_inner_class_access): Moved declaration of local
10154         `enclosing_decl_type' to the right location.
10155
10156 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10157
10158         * parse.y (parser_check_super_interface): Don't call
10159         check_pkg_class_access for an inner interface.
10160         (parser_check_super): Don't call check_pkg_class_access for inner
10161         class.
10162         (do_resolve_class): Simplify enclosing type loop. Don't call
10163         check_pkg_class_access if CL and DECL are not set.
10164         (find_in_imports_on_demand): Set DECL if class_type needed to be
10165         loaded. Don't call check_pkg_class_access for an inner class.
10166         (check_inner_class_access): Rewritten to implement member access
10167         rules as per spec 6.6.1.
10168         (check_pkg_class_access): Handle the empty package correctly.
10169         (in_same_package): New function. Determine if two classes are in the
10170         same package.
10171
10172 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10173
10174         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10175         method into array types.
10176         * parse.y (patch_method_invocation): Bypass access check on clone call
10177         to array instance.
10178
10179 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10180
10181         * expr.c (build_instanceof): Check for arrays when trying fold to
10182         false.
10183
10184 2001-02-15  Jim Meyering  <meyering@lucent.com>
10185
10186         * Make-lang.in (java.install-common): Depend on `installdirs'.
10187         (java.install-info): Likewise.
10188
10189 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10190
10191         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10192
10193 2001-02-14  Tom Tromey  <tromey@redhat.com>
10194             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10195
10196         Fix for PR java/1261.
10197         * typeck.c (build_java_array_type): Add public `clone' method to
10198         arrays.
10199         * parse.y (resolve_qualified_expression_name): Use current_class
10200         when checking for inaccessibility.
10201         (patch_method_invocation): Fixed error message when accessibility
10202         denied.  Added `from_super' argument.
10203
10204 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10205
10206         * parse.y (resolve_class): Don't build a fake decl. Use the one
10207         already built.
10208         * typeck.c (build_java_array_type): Build and assign decl to array
10209         type.
10210
10211 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10212
10213         * parse.y (not_accessible_p): Changed leading comment. Added extra
10214         `where' argument. Use it to enforce protected access rules.
10215         (resolve_qualified_expression_name): Added extra argument to
10216         not_accessible_p.
10217         (patch_method_invocation): Use argument `primary' to provide
10218         not_accessible_p with an extra argument.
10219         (lookup_method_invoke): Added extra argument to not_accessible_p.
10220         (search_applicable_method_list): Likewise.
10221
10222 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10223
10224         * parse.y (resolve_qualified_expression_name): Try to resolve as
10225         an inner class access only if `decl' is a TYPE_DECL.
10226
10227 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10228
10229         * decl.c (classdollar_identifier_node): Initialize.
10230         * java-tree.h (enum java_tree_index): New entry
10231         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10232         (classdollar_identifier_node): New macro.
10233         (ID_CLASSDOLLAR_P): Likewise.
10234         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10235         (build_dot_class_method_invocation): Likewise.
10236         (find_applicable_accessible_methods_list): `class$' can't be
10237         inherited.
10238
10239 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10240
10241         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10242
10243 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10244
10245         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10246         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10247         gone.
10248
10249 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10250
10251         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10252         outside of the `__U' sequence too.
10253         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10254         sequence too.
10255
10256 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10257
10258         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10259
10260 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10261
10262         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10263         (JVGENMAIN_OBJS): Likewise.
10264         * java-tree.h (append_gpp_mangled_name): New prototype.
10265         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10266         Removed cast calling `gcc_add_root.'
10267         * jvgenmain.c (mangle_obstack): New global, initialized.
10268         (main): Use it.
10269         (do_mangle_class): Constify local `ptr.'
10270         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10271         append_gpp_mangle_name and update `count' if necessary.
10272         Use `mangle_obstack.'
10273         * mangle.c (append_unicode_mangled_name): Removed.
10274         (append_gpp_mangled_name): Likewise.
10275         (unicode_mangling_length): Likewise.
10276         (mangle_member_name): Return type set to `void.'
10277         (mangle_field_decl): Don't append `U' in escaped names.
10278         (mangle_method_decl): Likewise.
10279         (mangle_member_name): Just use `append_gpp_mangled_name.'
10280         * mangle_name.c: New file.
10281
10282 2001-02-07  Per Bothner  <per@bothner.com>
10283
10284         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10285
10286         * check-init.c (check_init):  Don't call done_alternative after
10287         processing loop code, as a LOOP_EXPR never terminates normally.
10288
10289 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10290
10291         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10292
10293 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10294
10295         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10296         DECLs.
10297
10298 2001-02-06  Tom Tromey  <tromey@redhat.com>
10299
10300         * lex.c (java_new_lexer): Longer error message.
10301
10302 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10303             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10304
10305         * typeck.c (build_prim_array_type): Added leading comment.
10306         (build_java_array_type): Moved locals out of
10307         block. Always create the `data' field, fixed alignment to match
10308         C++.
10309
10310 2001-02-04  Tom Tromey  <tromey@redhat.com>
10311
10312         * expr.c (java_lang_expand_expr): Don't bother recomputing
10313         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10314         Fixes PR java/1866.
10315
10316 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10317
10318         * parse.y (process_imports): Save the original name of the import
10319         for better error report.
10320
10321 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10322
10323         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10324         of macros used when compiling jvspec.c.
10325         * jvspec.c (lang_specific_driver): Link with the shared
10326         libgcc by default.
10327
10328 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10329
10330         * check-init.c (check_init): Call internal_error instead of fatal.
10331         * expr.c (java_lang_expand_expr): Likewise.
10332         * jcf-parse.c (get_constant): Likewise.
10333         * mangle.c (java_mangle_decl): Likewise.
10334         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10335         (operator_string): Likewise.
10336         * check-init.c (check_init): Call abort instead of fatal.
10337         * class.c (build_class_ref): Likewise.
10338         * constants.c (write_constant_pool): Likewise.
10339         * decl.c (start_java_method): Likewise.
10340         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10341         (java_stack_dup, encode_newarray_type): Likewise.
10342         (build_java_array_length_access): Likewise.
10343         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10344         (build_java_soft_divmod, build_invokeinterface): Likewise.
10345         * java-tree.h (INNER_CLASS_P): Likewise.
10346         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10347         (give_name_to_class, get_class_constant): Likewise.
10348         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10349         (find_constant_index, generate_bytecode_conditional): Likewise.
10350         (generate_bytecode_insns, perform_relocations): Likewise.
10351         * lex.c (java_unget_unicode, java_lex): Likewise.
10352         * mangle.c (mangle_type, mangle_record_type): Likewise.
10353         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10354         (finish_mangling): Likewise.
10355         * parse.h (MARK_FINAL_PARMS): Likewise.
10356         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10357         (obtain_incomplete_type, java_complete_class): Likewise.
10358         (java_check_regular_methods, java_complete_expand_method): Likewise.
10359         (cut_identifier_in_qualified, check_deprecation): Likewise.
10360         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10361         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10362         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10363         * typeck.c (set_local_type, parse_signature_type): Likewise.
10364         (parse_signature_string, build_java_signature): Likewise;
10365         (set_java_signature): Likewise.
10366         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10367         * class.c (add_method): Call fatal_error instead of fatal.
10368         (build_static_field_ref): Likewise.
10369         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10370         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10371         * lex.c (java_new_new_lexer): Likewise.
10372         * jv-scan.c (main): Likewise.
10373         (fatal_error): Renamed from fatal.
10374         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10375         pfatal_with_name.
10376         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10377         (yyparse): Likewise.
10378         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10379         * lex.c (java_get_line_col): Likewise.
10380         * jcf-parse.c (load_class): Make errors non-fatal.
10381         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10382
10383 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10384
10385         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10386         (error): Remove unused function.
10387         (main): Don't use "__attribute__ alias" on generated class symbol.
10388
10389 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10390
10391         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10392         argument.
10393         * parse.y (finish_method_declaration): Code accounting for WFLed
10394         method DECL_NAMEs deleted.
10395         (check_abstract_method_definitions): Likewise.
10396         (resolve_type_during_patch): Layout resolved type.
10397         * typeck.c (lookup_do): Removed unused local.
10398
10399 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10400
10401         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10402         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10403         integer_negative_one_node.
10404         * expr.c (build_java_binop): Likewise.
10405
10406 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10407
10408         * zextract.c (read_zip_archive): Read file_offset before writing
10409         zipd and consequently clobbering the header contents.
10410
10411 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10412
10413         * Make-lang.in: Remove all dependencies on defaults.h.
10414         * decl.c: Don't include defaults.h.
10415         * expr.c: Likewise.
10416         * parse.y: Likewise.
10417
10418 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10419
10420         * ChangeLog (2001-01-21): Fixed typo.
10421         * class.c (layout_class_method): Code accounting for WFLed
10422         method DECL_NAMEs deleted.
10423         * constant.c (find_methodref_index): Likewise.
10424         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10425         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10426         (struct lang_decl): New field `wfl'.
10427         (java_get_real_method_name): Prototype deleted.
10428         * mangle.c (mangle_method_decl): Code accounting for WFLed
10429         method DECL_NAMEs deleted.
10430         * parse.h (GET_METHOD_NAME): Macro deleted.
10431         * parse.y (reset_method_name): Deleted.
10432         (method_header): Set DECL_FUNCTION_WFL.
10433         (check_abstract_method_header): Code accounting for WFLed method
10434         DECL_NAMEs deleted.
10435         (java_get_real_method_name): Deleted.
10436         (check_method_redefinition): Code accounting for WFLed method
10437         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10438         (java_check_regular_methods): Likewise.
10439         (java_check_abstract_methods): Likewise.
10440         (java_expand_classes): Don't call `reset_method_name.'
10441         (search_applicable_method_list): Use DECL_NAMEs instead of
10442         GET_METHOD_NAME.
10443         * typeck.c (lookup_do): Code accounting for WFLed method
10444         DECL_NAMEs deleted.
10445
10446 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10447
10448         * lex.c (java_read_char): Check for EOF from getc first.
10449
10450 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10451
10452         * class.c (layout_class): Don't lay the superclass out if it's
10453         already being laid out.
10454         * jcf-parse.c (handle_innerclass_attribute): New function.
10455         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10456         handle_innerclasses_attribute.
10457         (jcf_parse): Don't load an innerclasses if it's already being
10458         laid out.
10459         * jcf-write.c (append_innerclass_attribute_entry): Static
10460         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10461         to be zero for anonymous classes.
10462
10463 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10464
10465         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10466         necessary.
10467         * jcf-parse.c (set_source_filename): Use
10468         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10469
10470 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10471
10472         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10473         gets a unique asm name.
10474
10475 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10476
10477         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10478         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10479         if necessary.
10480         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10481         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10482         * parse.y (lookup_package_type_and_set_next): Deleted.
10483         (resolve_package): Removed unnecessary code.
10484         (find_applicable_accessible_methods_list): `finit$' can't be
10485         inherited.
10486         * verify.c (pop_argument_types): Added missing prototype.
10487
10488 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10489
10490         * config-lang.in: Disable java by default.
10491
10492 2001-01-23  Tom Tromey  <tromey@redhat.com>
10493
10494         * gcj.texi (Copying): New node.
10495         Added copyright information.
10496
10497 2001-01-21  Per Bothner  <per@bothner.com>
10498
10499         Various fixes to allow compiling a compressed .jar/.zip archive.
10500         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10501         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10502         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10503         * jcf.h (struct ZipDirectory):  Add forward declaration.
10504         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10505         Remove seen_in_zip and zip_offset fields.
10506         (JCF_SEEN_IN_ZIP):  New macro.
10507         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10508         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10509         (read_zip_member):  New function.
10510         (open_in_zip):  Call read_zip_member.
10511         * jcf-parse.c (find_in_current_zip):  Remove function.
10512         (read_class):  Merge in find_in_current_zip functionality.
10513         Call read_zip_member if needed.
10514         (parse_zip_file_entries):  Use read_zip_member.
10515         (process_zip_dir):  Update for removed and added JCF fields.
10516         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10517
10518 2001-01-21  Per Bothner  <per@bothner.com>
10519
10520         Minor optimization of static ggc roots.
10521         * jcf-parse.c (parse_roots):  New static field.
10522         (current_field, current_method, current_file_list):  Replace by macros
10523         naming fields of parse_roots.
10524         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10525         * class.c (class_roots):  New static field.
10526         (registered_class, fields_ident, info_ident, class_list):
10527         New macros naming fields of parse_roots.
10528         (build_static_field_ref):  Don't register roots here.
10529         (layout_class):  Static field list replaced by macro class_list.
10530         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10531         Initialize fields_ident and info_ident here.
10532
10533 2001-01-21  Per Bothner  <per@bothner.com>
10534
10535         * jcf-parse.c (ggc_mark_jcf):  New function.
10536         (init_jcf_parse):  Register current_jcf as ggc root.
10537
10538 2001-01-21  Per Bothner  <per@bothner.com>
10539
10540         * lang.c (put_decl_node):  Print method's name.
10541
10542 2001-01-21  Per Bothner  <per@bothner.com>
10543
10544         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10545         (verify_jvm_instructions):  Use it, for better error messages on loads.
10546
10547 2001-01-21  Per Bothner  <per@bothner.com>
10548
10549         * verify.c (merge_type_state):  Still may have to merge even if
10550         LABEL_VERIFIED (label).
10551
10552 2001-01-21  Per Bothner  <per@bothner.com>
10553
10554         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10555         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10556
10557 2001-01-19  Per Bothner  <per@bothner.com>
10558
10559         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10560         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10561
10562 2001-01-18  Per Bothner  <per@bothner.com>
10563
10564         * gcj.texi (Input Options): Mention .java files.
10565
10566 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10567
10568         * lang-options.h (-Wunsupported-jdk11): Removed.
10569         * lang.c (flag_not_overriding): Deleted.
10570         (flag_static_local_jdk1_1): Likewise.
10571         (lang_W_options): Removed "unsupported-jdk11" entry.
10572         * parse.y (java_check_methods): Removed dead code.
10573
10574 2001-01-17  Tom Tromey  <tromey@redhat.com>
10575
10576         Changes suggested by Per Bothner:
10577         * gcj.texi (Input Options): Don't mention input files.
10578         (Code Generation): Updated --main information.
10579         (Invoking jcf-dump): Mention that --javap is incomplete.
10580         From Alexandre Petit-Bianco:
10581         (Warnings): Don't mention -Wunsupported-jdk11.
10582         My stuff:
10583         (Compatibility): Mention JDK 1.2-ness of libraries.
10584         (Resources): Mention resources used when writing gcj.
10585
10586 2001-01-17  Tom Tromey  <tromey@redhat.com>
10587
10588         * gcj.texi: New file.
10589         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10590         (java.info): Depend on gcj.info.
10591         (java/gcj.dvi): New target.
10592         (java.dvi): Depend on gcj.dvi.
10593         (java.install-info): Wrote.
10594
10595 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10596
10597         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10598         having called make_decl_rtl.
10599
10600 2001-01-14  Per Bothner  <per@bothner.com>
10601
10602         Various patches to emit better messages on verification errors.
10603         * expr.c (push_type_0):  Return error indication on stack overflow,
10604         instead of callinfg fatal.
10605         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10606         (pop_type_0):  Return detailed error message (in a char** argument).
10607         (pop_type):  If pop_type_0 fails, print error message.
10608         (pop_argument_types):  Moved to verify.c.
10609         * verify.c (pop_argument_types):  Moved from expr.c.
10610         Return a (possible) error message, rather than void.
10611         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10612         (verify_jvm_instruction):  Use new macros, improving error messages.
10613         For case OPCODE_astore use object_ptr_type_node.
10614         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10615         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10616
10617         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10618         constant, return body without wrapper.  (Improves constant folding.)
10619         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10620
10621 2001-01-13  Per Bothner  <per@bothner.com>
10622
10623         * expr.c (expand_java_field_op):  Assigning to a final field outside
10624         an initializer does not violate JVM spec, so should be warning, not
10625         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10626
10627 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10628
10629         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10630         to 2001.
10631
10632 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10633
10634         * parse.y (resolve_expression_name): Permit instance variables from
10635         enclosing context in super constructor call.
10636         (resolve_qualified_expression_name): Permit enclosing class's qualified
10637         "this" in super constructor call.
10638
10639 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10640
10641         * class.c (build_utf8_ref): Remove last argument in call to
10642         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10643         (build_class_ref): Likewise.
10644         (build_static_field_ref): Likewise.
10645         (get_dispatch_table): Likewise.
10646         (layout_class_method): Likewise.
10647         (emit_register_classes): Likewise.
10648         * constants.c (build_constant_data_ref): Likewise.
10649         * decl.c (builtin_function): Likewise.
10650         (create_primitive_vtable): Likewise.
10651         * expr.c (build_known_method_def): Likewise.
10652         (build_jni_stub): Likewise.
10653         (java_lang_expand_expr): Likewise.
10654
10655 2001-01-10  Tom Tromey  <tromey@redhat.com>
10656
10657         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10658
10659 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10660
10661         * java-tree.h (lang_printable_name_wls): New prototype.
10662         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10663         rather than `current_class' to print type name. Don't prepend type
10664         names when printing constructor names.
10665         (lang_printable_name_wls): New function.
10666         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10667         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10668         * parse.y (patch_method_invocation): Message tuned for constructors.
10669         (not_accessible_p): Grant `private' access from within
10670         enclosing contexts.
10671
10672 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10673
10674         All files with updated copyright when applicable.
10675         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
10676         * class.c (mangle_class_field): Function removed.
10677         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
10678         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
10679         (build_class_ref): Call `java_mangle_class_field' instead of
10680         `mangle_class_field.'
10681         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
10682         (layout_class): Call `java_mangle_decl' instead of
10683         `mangle_static_field.'
10684         (cxx_keywords): Initialized static array moved to `lex.c.'
10685         (layout_class_method): Changed leading comment. Simplified to
10686         call `java_mangle_decl.' Local `ptr' moved in for loop body.
10687         * decl.c (lang_mark_tree): Mark field `package_list.'
10688         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
10689         (struct lang_type): New field `package_list.'
10690         (unicode_mangling_length): Prototype removed.
10691         (append_gpp_mangled_name, append_gpp_mangled_classtype,
10692         emit_unicode_mangled_name): Likewise.
10693         (cxx_keyword_p): New prototype.
10694         (java_mangle_decl, java_mangle_class_field,
10695         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
10696         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
10697         `build_expr_wfl.'
10698         * jvgenmain.c (main_method_prefix): Global variable removed.
10699         (main_method_suffix): Likewise.
10700         (do_mangle_classname): New function.
10701         (main): Call it. Format changed to accommodate new mangling scheme.
10702         * lex.c: (utf8_cmp): Conditionally prototyped.
10703         (cxx_keywords): Moved from class.c, conditionally defined.
10704         (utf8_cmp, cxx_keyword_p): Likewise.
10705         * mangle.c (obstack.h, ggc.h): Included.
10706         (mangle_field_decl): New function.
10707         (mangle_method_decl, mangle_type, mangle_pointer_type,
10708         mangle_array_type, mangle_record_type,
10709         find_compression_pointer_match, find_compression_array_match,
10710         find_compression_record_match,
10711         find_compression_array_template_match, set_type_package_list,
10712         entry_match_pointer_p, emit_compression_string, init_mangling,
10713         finish_mangling, compression_table_add, mangle_member_name): Likewise.
10714         (mangle_obstack): New global.
10715         (MANGLE_RAW_STRING): New macro.
10716         (unicode_mangling_length): Turned static.
10717         (append_unicode_mangled_name): Renamed from
10718         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
10719         replaces `obstack', removed from the parameter list.
10720         (append_gpp_mangled_name): Turned static. `mangle_obstack'
10721         replaces parameter `obstack', removed from the parameter list. Call
10722         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
10723         (append_gpp_mangled_classtype): Removed.
10724         (compression_table, compression_next): New static variables.
10725         * parse.y (temporary_obstack): Extern declaration removed.
10726
10727 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10728
10729         * parse.y (patch_binop): Compute missing type in error situations.
10730
10731 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10732
10733         * class.c (make_class_data): Push initial value for "arrayclass".
10734         * decl.c (init_decl_processing): Add new class field "arrayclass".
10735
10736 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
10737
10738         From patha@softlab.ericsson.se:
10739         * parse.y (switch_label): Use build, not build1, to construct
10740         DEFAULT_EXPR.
10741
10742 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
10743
10744         * lang.c (lang_decode_option): Change -MA to -MP.
10745         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
10746         Update to new prototype; do quote targets.
10747         (jcf_dependency_write): Update.
10748
10749 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
10750
10751         Shorten primitive array allocation path:
10752         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
10753         to create new primitive arrays.
10754         * expr.c (build_newarray): If generating native code, call
10755         soft_newarray_node with a reference to the primitive TYPE identifier
10756         instead of type_value.
10757
10758 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
10759
10760         Fix for PRs gcj/312 and gcj/253:
10761         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
10762         dest if they arn't already.
10763         * class.c (layout_class): Call maybe_layout_super_class on
10764         superinterfaces also, but only if compiling from bytecode.
10765
10766         Fix for PR gcj/373:
10767         * parse.y (create_class): Set ACC_STATIC if class is declared in an
10768         interface.
10769
10770 2000-12-15  Tom Tromey  <tromey@redhat.com>
10771
10772         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
10773         set.
10774
10775 2000-12-14  Andrew Haley  <aph@redhat.com>
10776
10777         * boehm.c (mark_reference_fields): Change test to correctly detect
10778         bitmap overflow.
10779
10780 2000-12-15  Andreas Jaeger  <aj@suse.de>
10781
10782         * config-lang.in (lang_dirs): Added.
10783
10784 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10785
10786         * parse.y (end_artificial_method_body): Fixed undefined behavior.
10787         Credits go to rth for finding it.
10788
10789 2000-12-13  Mike Stump  <mrs@wrs.com>
10790
10791         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
10792
10793 2000-11-07  Tom Tromey  <tromey@cygnus.com>
10794
10795         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
10796         * lex.c (java_ignorable_control_p): Removed.
10797         (java_letter_or_digit_p): Removed.
10798         (java_start_char_p): New function.
10799         (java_read_char): Return `int', not `unicode_t'.  Changed
10800         callers.
10801         (java_read_unicode): Likewise.
10802         (java_read_unicode_collapsing_terminators): Likewise.
10803         (java_get_unicode): Likewise.
10804         (java_new_lexer): Initialize hit_eof.
10805         (java_parse_end_comment): Take `int' argument.
10806         (java_parse_doc_section): Likewise.
10807         (java_parse_escape_sequence): Don't allow backlash-newline.
10808         Return `int'.
10809         * lex.h (JAVA_DIGIT_P): Removed.
10810         (_JAVA_LETTER_OR_DIGIT_P): Removed.
10811         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
10812         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
10813         (JAVA_PART_CHAR_P): New macro.
10814         (UEOF): Now -1.
10815         (JAVA_CHAR_ERROR): Now -2.
10816         (java_lexer): New field `hit_eof'.
10817         * chartables.h: New file.
10818         * gen-table.pl: new file.
10819
10820 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10821             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10822
10823         * parse.y (java_complete_lhs): Only allow compound assignment of
10824         reference type if type is String.
10825
10826 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10827
10828         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
10829         jcf-path.c: Likewise.
10830
10831 2000-12-09  Anthony Green  <green@redhat.com>
10832
10833         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
10834         filestart and filename_length as int values.
10835
10836 2000-12-07  Mo DeJong  <mdejong@redhat.com>
10837
10838         * jcf-io.c (find_class): Correct the logic that tests to see if a
10839         .java file is newer than its .class file. The compiler was
10840         incorrectly printing a warning when file mod times were equal.
10841
10842 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
10843
10844         * jvgenmain.c: Use ISPRINT not isascii.
10845
10846 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10847
10848         * parse.y (end_artificial_method_body): Fixed typo.
10849
10850 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10851
10852         * parse.y (patch_method_invocation): Pick the correct enclosing
10853         context when creating inner class instances.
10854         Fixes gcj/332.
10855
10856 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
10857
10858         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
10859         Update copyright year to 2000.
10860
10861 2000-11-23  Anthony Green  <green@redhat.com>
10862
10863         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
10864         Move current_file_list out of yyparse and make it static.
10865
10866         * expr.c: Declare quick_stack and tree_list_free_list as static
10867         (init_expr_processing): Register quick_stack and
10868         tree_list_free_list roots.
10869
10870 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10871
10872         * parse.y (build_outer_field_access): New local `decl_ctx', use
10873         it. Check for field's context and current class immediate outer
10874         context inheritance.
10875         (outer_field_access_p): Consider fields inherited from the last
10876         enclosing context.
10877         (build_access_to_thisn): Stop at the last enclosing context if
10878         necessary.
10879         Fixes gcj/367.
10880
10881 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
10882
10883         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
10884
10885 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
10886
10887         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
10888         scratch buffer.
10889
10890 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10891
10892         * jv-scan.c (help): Document --complexity.
10893         (options): Added --complexity.
10894         (flag_complexity): New global.
10895         (main): Call `report'.
10896         * parse-scan.y (complexity): New global.
10897         (if_then_statement, if_then_else_statement,
10898         if_then_else_statement_nsi, switch_block_statement_group,
10899         while_expression, do_statement, for_begin, continue_statement,
10900         throw_statement, catch_clause, finally, method_invocation,
10901         conditional_and_expression, conditional_or_expression,
10902         conditional_expression): Update complexity.
10903         (reset_report): Reset complexity.
10904         (report): New function.
10905
10906 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10907
10908         * lex.c (yylex): Added STRICT_TK case.
10909         * parse.y (STRICT_TK): Added.
10910         * parse-scan.y (STRICT_TK): Added.
10911         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
10912         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
10913         file.
10914         * keyword.h: Rebuilt.
10915         * keyword.gperf (strictfp): Added.
10916
10917 2000-11-20  Tom Tromey  <tromey@cygnus.com>
10918
10919         * lex.c (yylex): Recognize floating point constants with leading
10920         0.
10921
10922 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10923
10924         * java-tree.h (cyclic_inheritance_report): Constify.
10925         * parse.y (cyclic_inheritance_report): Likewise.
10926
10927 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10928
10929         * parse.y (goal): Remove call to ggc_add_string_root.
10930
10931 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10932
10933         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
10934         Create string in scratch buffer, then pass to build_string.
10935
10936 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10937
10938         * parse.y (issue_warning_error_from_context): Add
10939         ATTRIBUTE_PRINTF.
10940
10941 2000-11-11  Anthony Green  <green@redhat.com>
10942
10943         * jcf-parse.c (process_zip_dir): Add finput parameter.
10944         (jcf_figure_file_type): Call process_zip_dir with appropriate
10945         argument.
10946
10947 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10948
10949         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
10950         * jcf-parse.c (jcf_figure_file_type): Likewise.
10951
10952 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10953
10954         * parse.y (create_new_parser_context): Use memset () instead of
10955         bzero ().
10956
10957 2000-11-08  Tom Tromey  <tromey@cygnus.com>
10958
10959         * gjavah.c (process_file): Only include gcj/cni.h when generating
10960         CNI stubs.
10961
10962 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10963
10964         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
10965         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
10966         instead of bzero ().
10967
10968 2000-11-05  Tom Tromey  <tromey@cygnus.com>
10969
10970         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
10971         * lex.c (IS_ZERO): New define.
10972         (java_perform_atof): Error on floating point underflow.
10973
10974 2000-11-04  Tom Tromey  <tromey@cygnus.com>
10975
10976         * lex.c (java_parse_escape_sequence): Only read two octal
10977         characters if the first one is greater than 3.  Don't allow
10978         "octal" numbers to include the digits 8 or 9.
10979
10980 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10981
10982         * Make-lang.in (java.distdir): Remove.
10983
10984 2000-11-03  Tom Tromey  <tromey@cygnus.com>
10985
10986         * Make-lang.in (java.dvi): New target.
10987         Partial fix for PR other/567.
10988
10989         * lang-options.h: Mention -Wout-of-date.
10990         * jcf-dump.c (flag_newer): New global.
10991         * gjavah.c (flag_newer): New global.
10992         * jcf-io.c (find_class): Only warn when flag_newer set.
10993         * lang.c (flag_newer): New global.
10994         (struct string_option): New declaration.
10995         (lang_W_options): New global.
10996         (process_option_with_no): New function.
10997         (lang_decode_option): Use it.
10998
10999         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11000         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11001         `$'.
11002
11003         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11004         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11005         * lex.c (java_read_unicode): Removed `term_context' argument.
11006         Recognize any number of `u' in `\u'.
11007         (java_read_unicode_collapsing_terminators): New function.
11008         (java_get_unicode): Use it.
11009         (java_lineterminator): Removed.
11010         (yylex): Produce error if character literal is newline or single
11011         quote.  Return if eof found in middle of `//' comment.  EOF in
11012         `//' comment is only an error if pedantic.
11013         (java_ignorable_control_p): New function.
11014         (java_parse_end_comment): Return if eof found in middle of
11015         comment.
11016         Include flags.h.
11017         * jv-scan.c (pedantic): New global.
11018
11019 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11020
11021         * parse.y (outer_field_access_p): Inherited fields aren't
11022         consider outer fields.
11023         (maybe_build_thisn_access_method): Use
11024         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11025         (resolve_expression_name): Trigger an error if a static field
11026         is being accessed as an outer field.
11027
11028 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11029
11030         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11031         Fixes gcj/365.
11032
11033 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11034
11035         * Make-lang.in: Move all build rules here from Makefile.in,
11036         adapt to new context.  Wrap all rules that change the current
11037         directory in parentheses.  Expunge all references to $(P).
11038         When one command depends on another and they're run all at
11039         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11040         all object-file generation rules.  Delete obsolete variables.
11041
11042         * Makefile.in: Delete.
11043         * config-lang.in: Delete outputs= line.
11044
11045 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11046
11047         * parse.y (patch_method_invocation): NULLify this_arg when already
11048         inserted.
11049         (maybe_use_access_method): Handle call to methods unrelated to the
11050         current class. Fixed comment.
11051         Fixes gcj/361.
11052
11053 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11054
11055         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11056         scope.
11057
11058 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11059
11060         * lex.c (java_new_lexer): Initialize new fields.  Work around
11061         broken iconv() implementations.
11062         (java_read_char): Swap bytes if required.  Use fallback decoder if
11063         required.
11064         (byteswap_init, need_byteswap): New globals.
11065         (java_destroy_lexer): Only close iconv handle if it is in use.
11066         * lex.h (java_lexer): New fields read_anything, byte_swap,
11067         use_fallback.
11068         Made out_buffer unsigned.
11069
11070 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11071
11072         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11073         where an enclosing context can be set on the jdep.
11074         (do_resolve_class): Fixed identation.
11075
11076 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11077
11078         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11079
11080         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11081         when requested.
11082
11083         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11084
11085         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11086
11087 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11088
11089         * jcf-write.c (OP1): Update `last_bc'.
11090         (struct jcf_block): Fixed indentation and typo in comments.  New
11091         field `last_bc'.
11092         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11093         follows `monitorenter'.
11094         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11095         `patch_string'.
11096         Fixes gcj/232.
11097
11098 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11099
11100         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11101         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11102         * lang-options.h: Added -MA, -MT, -MF..
11103         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11104         (DEPEND_TARGET_SET): New macro.
11105         (DEPEND_FILE_ALREADY_SET): Likewise.
11106         (init_parse): Handle new flags.
11107         * jcf.h (jcf_dependency_print_dummies): Declare.
11108         * Make-lang.in (s-java): Added mkdeps.o.
11109         * Makefile.in (BACKEND): Added mkdeps.o.
11110         (../gcjh$(exeext)): Added mkdeps.o.
11111         (../jcf-dump$(exeext)): Added mkdeps.o.
11112         * jcf-depend.c: Include mkdeps.h.
11113         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11114         add_entry): Removed.
11115         (jcf_dependency_reset): Rewrote.
11116         (dependencies): New global.
11117         (jcf_dependency_set_target): Rewrote.
11118         (jcf_dependency_add_target): Likewise.
11119         (jcf_dependency_add_file): Likewise.
11120         (munge): Removed.
11121         (print_ents): Removed.
11122         (jcf_dependency_write): Rewrote.
11123         (print_dummies): New global.
11124         (jcf_dependency_print_dummies): New function
11125         (jcf_dependency_write): Call deps_dummy_targets if required.
11126
11127 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11128
11129         * gjavah.c (add_class_decl): Removed unused variables `tname',
11130         `tlen' and `name_index'.
11131         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11132         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11133         in `wfl_operator' with value.
11134         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11135         (jcf_figure_file_type): Fixed identation.
11136         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11137         * parse.y (analyze_clinit_body): New function.
11138         (static_initializer:): Reset `current_static_block'.
11139         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11140         `wfl_operator' with new value.
11141         (lookup_cl): Use EXPR_WFL_FILENAME.
11142         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11143         analyze_clinit_body.
11144         (build_outer_field_access): Access to this$<n> built from
11145         current_class, not its outer context.
11146         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11147         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11148         (patch_method_invocation): Use `is_static_flag' when already
11149         initialized.
11150         (patch_newarray): Removed assignment in ternary operator.
11151
11152 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11153
11154         * except.c (free_eh_ranges): Don't free `whole_range'.
11155
11156 2000-10-15  Anthony Green  <green@redhat.com>
11157
11158         * decl.c (init_decl_processing): Call init_class_processing before
11159         anything else.
11160
11161 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11162
11163         * check-init.c (check_init): Fixed leading comment. Use
11164         LOCAL_FINAL_P.
11165         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11166         (give_name_to_locals): Likewise.
11167         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11168         fields in lang_decl_var.
11169         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11170         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11171         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11172         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11173         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11174         (LOCAL_FINAL): Rewritten.
11175         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11176         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11177         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11178         `init_final' fields.
11179         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11180         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11181         (TYPE_HAS_FINAL_VARIABLE): New macro.
11182         (struct lang_type): Added `afv' field.
11183         * parse.y (check_static_final_variable_assignment_flag): New function.
11184         (reset_static_final_variable_assignment_flag): Likewise.
11185         (check_final_variable_local_assignment_flag): Likewise.
11186         (reset_final_variable_local_assignment_flag): Likewise.
11187         (check_final_variable_indirect_assignment): Likewise.
11188         (check_final_variable_global_assignment_flag): Likewise.
11189         (add_inner_class_fields): Use LOCAL_FINAL_P.
11190         (register_fields): Handle local finals and final variables.
11191         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11192         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11193         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11194         on local finals.
11195         (java_complete_expand_methods): Loop to set
11196         TYPE_HAS_FINAL_VARIABLE. Call
11197         `reset_final_variable_local_assignment_flag' and
11198         `check_final_variable_local_assignment_flag' accordingly before
11199         and after constructor expansion. Call
11200         `reset_static_final_variable_assignment_flag'
11201         before expanding <clinit> and after call
11202         `check_static_final_variable_assignment_flag' if the
11203         current_class isn't an interface. After all methods have been
11204         expanded, call `check_final_variable_global_assignment_flag' and
11205         `check_static_final_variable_assignment_flag' if the current class
11206         is an interface.
11207         (maybe_yank_clinit): Fixed typo in comment.
11208         (build_outer_field_access_methods): Removed old sanity check. Use
11209         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11210         Don't create access methods for finals.
11211         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11212         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11213         existing DECL_INIT has been processed.
11214         (java_complete_lhs): Likewise.
11215         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11216         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11217         logic.
11218         (patch_assignment): Use LOCAL_FINAL_P.
11219         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11220         DECL_INITIAL is nullified.
11221         Fixes gcj/163.
11222
11223 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11224
11225         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11226
11227         * Makefile.in (parse.c, parse-scan.c): Likewise.
11228
11229 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11230
11231         * class.c (temporary_obstack): Remove.
11232         (make_class): Don't mess with obstascks.
11233         (push_class): Likewise.
11234         (set_super_info): Likewise.
11235         (add_method_1): Likewise.
11236         (add_method): Likewise.
11237         (add_field): Likewise.
11238         (build_utf8_ref): Likewise.
11239         (build_class_ref): Likewise.
11240         (build_static_field_ref): Likewise.
11241         (finish_class): Likewise.
11242         (push_super_field): Likewise.
11243         (layout_class): Likewise.
11244         (layout_class_methods): Likewise.
11245         (init_class_processing): Likewise.
11246         * constants.c (get_tag_node): Likewise.
11247         (build_constant_data_ref): Likewise.
11248         * decl.c (ggc_p): Remove.
11249         (copy_lang_decl): Use ggc_alloc.
11250         (complete_start_java_method): Don't mess with obstacks.
11251         (start_java_method): Likewise.
11252         (end_java_method): Likewise.
11253         * except.c (link_handler): Use xmalloc.
11254         (free_eh_ranges): New function.
11255         (method_init_exceptions): Use it.
11256         (add_handler): Use xmalloc.
11257         (expand_start_java_handler): Don't mess with obstacks.
11258         (prepare_eh_table_type): Likewise.
11259         (expand_end_java_handler): Likewise.
11260         * expr.c (push_value): Likewise.
11261         (create_label_decl): Likewise.
11262         (build_jni_stub): Likewise.
11263         (java_lang_expand_expr): Likewise.
11264         (note_instructions): Use xrealloc.
11265         (java_push_constant_from_pool): Don't mess with obstacks.
11266         (process_jvm_instruction): Likewise.
11267         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11268         declaration.
11269         * jcf-parse.c (get_constant): Don't mess with obstacks.
11270         (read_class): Likewise.
11271         (jcf_parse): Likewise.
11272         * lex.c (expression_obstack): Remove.
11273         (java_lex): Don't use obstack_free.
11274         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11275         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11276         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11277         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11278         * parse.y (gaol): Add more GC roots.
11279         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11280         (lookup_field_wrapper): Likewise.
11281         (obtain_incomplete_type): Don't mess with obstacks.
11282         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11283         macros.
11284         (craft_constructor): Don't mess with obstacks.
11285         (safe_layout_class): Likewise.
11286         (java_complete_class): Likewise.
11287         (source_end_java_method): Likewise.
11288         (build_outer_field_access_methods): Likewise.
11289         (build_outer_method_access_method): Likewise.
11290         (maybe_build_thisn_access_method): Likewise.
11291         (build_dot_class_method_invocation): Likewise.
11292         (java_complete_tree): Likewise.
11293         (java_complete_lhs): Likewise.
11294         (do_merge_string_cste): Likewise.
11295         (patch_string_cst): Likewise.
11296         (array_constructor_check_entry): Likewise.
11297         * typeck.c (build_java_array_type): Likewise.
11298         (parse_signature_string): Likewise.
11299         (build_java_signature): Likewise.
11300
11301 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11302
11303         Fix for PR gcj/356:
11304         * gjavah.c (add_class_decl): Don't special-case inner classes.
11305         (add_namelet): Likewise.
11306
11307 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11308
11309         * java-tree.h: Constify current_encoding.
11310         * lang.c: Constify current_encoding.
11311
11312 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11313
11314         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11315         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11316
11317 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11318
11319         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11320         patch. Fixes gcj/340.
11321
11322 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11323
11324         * lex.c (java_new_lexer): Initialize out_first and out_last
11325         fields.
11326         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11327
11328 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11329
11330         * parse.y (pop_current_osb): New function.
11331         (array_type:): Use `dims:', changed actions
11332         accordingly. Suggested by Anthony Green.
11333         (array_creation_expression:): Used pop_current_osb.
11334         (cast_expression:): Likewise.
11335         (search_applicable_method_list): Fixed indentation.
11336
11337 2000-10-08  Anthony Green  <green@redhat.com>
11338
11339         * parse.y (array_type_literal): Remove production.
11340         (type_literals): Refer to array_type, not array_type_literal.
11341
11342 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11343
11344         Patch contributed by Corey Minyard.
11345         * decl.c (check_local_named_variable): New function.
11346         (tree check_local_unnamed_variable): Likewise.
11347         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11348
11349 2000-10-07  Anthony Green  <green@redhat.com>
11350
11351         * class.c (layout_class): Handle case where superclass can't be
11352         layed out yet.
11353
11354 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11355
11356         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11357         gperf.
11358
11359 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11360
11361         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11362         * jvgenmain.c (class_mangling_prefix): Removed.
11363         (class_mangling_suffix): New global.
11364         (main): Use it.
11365         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11366         `$'.
11367         (print_method_info): Handle overrides for static and final
11368         methods.
11369         (process_file): Generate declaration for class object field.
11370         * class.c (cxx_keywords): New array.
11371         (utf8_cmp): New function.
11372         (cxx_keyword_p): New function.
11373         (layout_class_method): Mangle C++ keywords by appending `$'.
11374         (mangle_field): New function.
11375         (mangle_class_field): Use mangle_field.  Mangle class name as
11376         `class$'.
11377         (mangle_static_field): Use mangle_field.
11378
11379 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11380
11381         * decl.c (find_local_variable): Removed uncessary type check and
11382         fixed range check typo. From Corey Minyard.
11383
11384 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11385
11386         * decl.c (give_name_to_locals): New local `code_offset'. Call
11387         `maybe_adjust_start_pc'.
11388         * expr.c (note_instructions): New function.
11389         (expand_byte_code): Don't collect insn starts here.
11390         (peek_opcode_at_pc): New function.
11391         (maybe_adjust_start_pc): Likewise.
11392         * java-tree.h (maybe_adjust_start_pc): Declare.
11393         (note_instructions): Likewise.
11394         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11395
11396 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11397
11398         * parse.y (field_access:): Fixed indentation.
11399         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11400
11401 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11402
11403         Fix for PR gcj/307:
11404         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11405         JPRIMITIVE_TYPE_P, for arithmetic operators.
11406         (patch_method_invocation): Indentation fix.
11407         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11408         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11409         (do_unary_numeric_promotion): Cleaned up code.
11410         (valid_cast_to_p): Handle boolean correctly.
11411
11412 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11413
11414         * lex.c (java_read_unicode): Reset bs_count when finished with
11415         `\u' sequence.
11416
11417 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11418
11419         Convert to GC.
11420         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11421         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11422         (typeck.o): Depend on ggc.h.
11423         * class.c (add_method_1): Use GC functions for allocation.
11424         (init_class_processing): Register roots.
11425         * decl.c (ggc_p): Set to 1.
11426         (pending_local_decls): Make it static.
11427         (push_jvm_slot): Use GC functions for allocation.
11428         (init_decl_processing): Register roots.
11429         (give_name_to_locals): Use GC functions for allocation.
11430         (lang_mark_tree): New function.
11431         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11432         functions for allocation.
11433         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11434         * lex.c (java_lex): Use build_string, rather than replicating it
11435         inline.
11436         * parse.y (goal): Add more roots.
11437         (mark_parser_ctxt): New function.
11438         * typeck.c: Include ggc.h.
11439
11440 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11441
11442         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11443         contains something else than MODIFY_EXPR.
11444
11445 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11446
11447         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11448         * Makefile.in (parse.o): Depend on ggc.h.
11449         (class.o): Likewise.
11450         (constants.o): Likewise.
11451         (decl.o): Likewise.
11452         (expr.o): Likewise.
11453         (jcf-parse.o): Likewise.
11454         (jcf-write.o): Likewise.
11455         (mangle.o): Likewise.
11456         * class.c: Include ggc.h.
11457         (build_static_field_ref): Register GC roots.
11458         (layout_class): Likewise.
11459         (init_class_processing): Likewise.
11460         * constants.c: Include ggc.h.
11461         (current_constant_pool_data_ref): Remove.
11462         (tag_nodes): Move it to ...
11463         (get_tag_node): ... here.  Register GC roots.
11464         * decl.c: Include ggc.h.  Remove many global tree definitions.
11465         (throw_node): Define.
11466         (java_global_trees): Likewise.
11467         (predef_filenames): Make the size a constant.
11468         (init_decl_processing): Adjust accordingly.
11469         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11470         * expr.c: Include ggc.h.
11471         (init_expr_processing): Register GC roots.
11472         (build_invokeinterface): Likewise.
11473         * java-tree.h: Replace extern tree declarations with macros.
11474         (java_global_trees): New variable.
11475         (java_tree_index): New enumeration.
11476         (init_jcf_parse): Declare.
11477         * jcf-parse.c: Include ggc.h.
11478         (current_class): Remove declaration.
11479         (main_class): Likewise.
11480         (all_class_list): Likewise.
11481         (predefined_filename_p): Adjust for constant size of
11482         predef_filenames.
11483         (init_jcf_parse): New function.
11484         * jcf-write.c: Include ggc.h.
11485         (generate_classfile): Register GC roots.
11486         (append_synthetic_attribute): Likewise.
11487         (append_innerclass_attribute_entry): Likewise.
11488         * lang.c: Include ggc.h.
11489         (lang_print_error): Register GC roots.
11490         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11491         with macros.
11492         * parse.y: Include ggc.h.
11493         (wfl_operator): Remove.
11494         (goal): Register GC roots.
11495         (java_pop_parser_context): Adjust for new field names.
11496         (java_parser_context_save_global): Likewse.
11497         (java_parser_context_restore_global): Likewise.
11498         (java_parser_context_suspend): Likewise.
11499         (java_parser_context_resume): Likewise.
11500         (verify_constructor_circularity): Register GC roots.
11501         (lookup_cl): Likewise.
11502         (java_reorder_fields): Likewise.
11503         (build_current_this): Likewise.
11504         (class_in_current_package): Likewise.
11505         (argument_types_convertible): Likewise.
11506         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11507
11508 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11509
11510         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11511
11512 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11513
11514         * jcf-parse.c: Include <locale.h>.
11515         * jv-scan.c: Include <locale.h>.
11516
11517 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11518
11519         * expr.c (pop_type_0): Return `Object' if trying to merge two
11520         interface types.
11521         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11522         interface types; `Object' is always a valid supertype.
11523
11524 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11525
11526         Fix for PR gcj/33:
11527         * jv-scan.c (help): Document --encoding.
11528         (options): Added `encoding' entry.
11529         (OPT_ENCODING): New define.
11530         (main): Handle --encoding.
11531         Include <langinfo.h> if nl_langinfo exists.
11532         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11533         --encoding.
11534         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11535         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11536         argument.  Use nl_langinfo to determine default encoding.
11537         * java-tree.h (current_encoding): Declare.
11538         * parse.y (java_parser_context_restore_global): Don't restore
11539         `finput'.
11540         (java_parser_context_save_global): Don't set `finput' field.
11541         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11542         if required.
11543         * lang.c (current_encoding): New global.
11544         (lang_decode_option): Recognize `-fencoding='.
11545         (finish_parse): Don't close finput.
11546         * parse.h (struct parser_ctxt): Removed `finput' and
11547         `unget_utf8_value' fields.  Added `lexer' field.
11548         (java_init_lex): Fixed declaration.
11549         * lex.c (java_new_lexer): New function.
11550         (java_destroy_lexer): Likewise.
11551         (java_read_char): Added `lex' argument.  Handle iconv case.
11552         (java_read_unicode): Added `lex' argument.  Count backslashes in
11553         lexer structure.
11554         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11555         `lexer' field in ctxp.
11556         (BAD_UTF8_VALUE): Removed.
11557         (java_lex): Handle seeing UEOF in the middle of a string literal.
11558         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11559         (java_lexer): New structure.
11560         (UNGETC): Removed.
11561         (GETC): Removed.
11562         (DEFAULT_ENCODING): New define.
11563         (java_destroy_lexer): Declare.
11564
11565 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11566
11567         Fix for PR gcj/343:
11568         * lex.c (java_init_lex): Initialize java_io_serializable.
11569         * parse.y (java_io_serializable): New global.
11570         (valid_ref_assignconv_cast_p): An array can be cast to
11571         serializable.
11572
11573 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11574
11575         * decl.c, expr.c: Include defaults.h if not already included.
11576         Don't define the *_TYPE_SIZE macros.
11577
11578 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11579
11580         * typeck.c (build_java_array_type): Correct first parameter
11581         in ADJUST_FIELD_ALIGN invocation.
11582
11583 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11584
11585         * lang-specs.h: Also recognize `-femit-class-files'.
11586
11587 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11588
11589         * verify.c (merge_types): Load the types to merge if necessary.
11590
11591 2000-09-02  Anthony Green  <green@redhat.com>
11592
11593         * jcf-io.c: Include zlib.h.
11594         (open_in_zip): Read compressed class file archives.
11595         * zipfile.h (ZipDirectory): Add uncompressed_size and
11596         compression_method fields.
11597         * zextract.c (read_zip_archive): Collect file compression info.
11598
11599 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11600
11601         * parse.y (do_resolve_class): Also explore superclasses of
11602         intermediate enclosing contexts when searching for inner classes.
11603
11604 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11605
11606         * parse.y (variable_declarator_id:): Better error message.
11607         (expression_statement:): Use YYNOT_TWICE.
11608         (cast_expression:): Likewise.
11609         (assignment:): Likewise.
11610
11611 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11612
11613         * parse.y (do_merge_string_cste): New locals. Create new
11614         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11615
11616 2000-08-07  Hans Boehm  <boehm@acm.org>
11617
11618         * boehm.c (mark_reference_fields): Set marking bits for all words in
11619         a multiple-word record.
11620         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11621         java.lang.Class.
11622
11623 2000-08-31  Mike Stump  <mrs@wrs.com>
11624
11625         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11626         jcf-dump$(exeext)): Make parallel safe.
11627
11628 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11629
11630         * jcf-parse.c (set_source_filename): Constify a char *.
11631         * jcf-write.c (append_innerclasses_attribute,
11632         make_class_file_name): Constify a char *.  Don't recycle a
11633         variable for an unrelated purpose.
11634         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11635         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11636
11637 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11638
11639         * expr.c (can_widen_reference_to): Fixed indentation.
11640         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11641         * parse.y: `finit$' replaces `$finit$' in comments.
11642         (try_builtin_assignconv): Fixed leading comment.
11643
11644 2000-08-25  Greg McGary  <greg@mcgary.org>
11645
11646         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11647
11648 2000-08-24  Greg McGary  <greg@mcgary.org>
11649
11650         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11651         * parse.y (BINOP_LOOKUP): Likewise.
11652
11653 2000-08-22  Andrew Haley  <aph@cygnus.com>
11654
11655         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11656         sign extending. Fixes gcj/321.
11657         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11658         combining to make a jlong. Fixes gcj/321.
11659
11660 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11661
11662         * lang-specs.h: Do not process -o or run the assembler if
11663         -fsyntax-only.
11664
11665 2000-08-16  Andrew Haley  <aph@cygnus.com>
11666
11667         * typeck.c (build_java_array_type): Rewrite code to do array
11668         alignment.  Take into account back-end macros when aligning array
11669         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11670         user to set alignment. Fixes gcj/252 and 160.
11671
11672 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11673
11674         * parse.y (check_abstract_method_definitions): Now return `int'.
11675         Check implemented interfaces.  Fixes PR gcj/305.
11676
11677         * parse.y (patch_switch_statement): Disallow `long' in switch
11678         expressions.  Fixes PR gcj/310.
11679
11680 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11681
11682         * decl.c (finit_leg_identifier_node): New global.
11683         (init_decl_processing): Use `finit$' to initialize
11684         finit_identifier_node. Use `$finit$' to initialize
11685         finit_leg_identifier_node.
11686         * expr.c (expand_java_field_op): Use ID_FINIT_P.
11687         * java-tree.h (finit_identifier_node): Changed attached comment.
11688         (finit_leg_identifier_node): New declaration.
11689         (ID_FINIT_P): Take finit_identifier_node and
11690         finit_leg_identifier_node into account. This is a backward
11691         compatibility hack.
11692
11693 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11694
11695         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
11696         Jan 6 2000 patch.
11697         (generate_bytecode_insns): Check `nargs' before emitting it.
11698         * verify.c (merge_type_state): Fixed typo.
11699         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
11700         generate_bytecode_{conditional,insns}.
11701
11702 2000-08-13  Anthony Green  <green@redhat.com>
11703
11704         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
11705         for -pg builds).
11706
11707 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11708
11709         * class.c (maybe_layout_super_class): Fixed indentation.
11710         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
11711         (java_check_methods): New function declaration.
11712         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
11713         instead of `str_ptr'.
11714         * jcf-write.c (generate_bytecode_insns): Emit number the of args
11715         of a `invokeinterface' at the right time.
11716         * parse.h (WFL_STRIP_BRACKET): New macro.
11717         (SET_TYPE_FOR_RESOLUTION): Use it.
11718         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
11719         (check_class_interface_creation): Don't check for cross package
11720         innerclass name clashes.
11721         (method_header): Behave properly if MDECL is `error_mark_node'.
11722         (method_declarator): Return `error_mark_node' if bogus current
11723         class.
11724         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
11725         (resolve_and_layout): New local `decl_type', set and used. Call
11726         java_check_methods.
11727         (java_check_methods): New method.
11728         (java_layout_classes): Use it.
11729         (resolve_qualified_expression_name): No EH check necessary in
11730         access$<n>.
11731         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
11732         `case' statement.
11733         (patch_assignment): Set DECL_INITIAL on integral final local.
11734
11735 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11736
11737         * java-tree.h (flag_extraneous_semicolon): New extern.
11738         * lang-options.h: (-Wextraneous-semicolon): New option.
11739         * lang.c (flag_redundant): Fixed typo in leading comment.
11740         (flag_extraneous_semicolon): New global.
11741         (lang_decode_option): Set `flag_extraneous_semicolon' when
11742         -Wall. Decode `-Wextraneous-semicolon'.
11743         * parse.y (type_declaration:): Removed `SC_TK' hack, added
11744         `empty_statement' rule.
11745         (class_body_declaration): Likewise.
11746         (method_body:): Accept `;' as a method body.
11747         (static_initializer:): Removed `SC_TK' hack.
11748         (constructor_block_end:): Likewise.
11749         (empty_statement:): Report deprecated empty declaration. Fixes
11750         gcj/295
11751
11752 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11753
11754         * parse.y (build_dot_class_method_invocation): Changed parameter
11755         name to `type'. Build signature from `type' and convert it to a
11756         STRING_CST if it's an array.
11757         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
11758         to use `ref_type' directly.
11759
11760 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
11761
11762         * lang-options.h: Added a comma after the last element to avoid
11763         syntax errors when other languages define additional options.
11764
11765 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11766
11767         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
11768         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
11769         (jc1): Link with $(BACKEND).
11770         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
11771
11772 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11773
11774         * jvspec.c: Adjust type of second argument to
11775         lang_specific_driver, and update code as necessary.
11776
11777         * class.c (build_dtable_decl): Initialize dummy.
11778
11779 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11780
11781         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
11782         method bodies not to rule out discarding `<clinit>'; don't use
11783         <clinit> to initialize static fields with constant initializers.
11784
11785 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11786
11787         * gjavah.c (print_method_info): Added `synth' parameter. Skip
11788         synthetic methods.
11789         (method_synthetic): New global.
11790         (HANDLE_METHOD): Recognize synthetic method and tell
11791         `print_method_info' about it.
11792         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
11793         processing a synthetic method.
11794         * jcf-reader.c (skip_attribute): New function.
11795         ( skip_attribute): Likewise.
11796
11797 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11798
11799         * parse.y (build_outer_field_access): Fixed comments.
11800         (fix_constructors): Emit the initialization of this$<n> before
11801         calling $finit$.
11802         (resolve_qualified_expression_name): Build an access to `decl' if
11803         necessary.
11804
11805 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11806
11807         * parse-scan.y (curent_class): Non longer const.
11808         (inner_qualifier, inner_qualifier_length): Deleted.
11809         (current_class_length): New global.
11810         (bracket_count): Fixed typo in leading comment.
11811         (anonymous_count): New global.
11812         (class_instance_creation_expression:): Handle anonymous classes.
11813         (anonymous_class_creation:): New rule.
11814         (push_class_context): Rewritten.
11815         (pop_class_context): Likewise.
11816         (INNER_QUALIFIER): Macro deleted.
11817         (report_class_declaration): call `push_class_context' when
11818         entering the function. `fprintf' format modified not to use
11819         INNER_QUALIFIER.
11820         (report_class_declaration): Assign `package_name' and
11821         `current_class' to NULL separately.
11822
11823 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11824
11825         * expr.c (build_invokeinterface): Call layout_class_methods on
11826         target interface.
11827
11828 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11829             Anthony Green  <green@cygnus.com>
11830             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11831
11832         * class.c (make_class_data): Create vtable for abstract classes.
11833         (get_dispatch_table): Changed to cope with abstract classes.
11834
11835 2000-07-27  Tom Tromey  <tromey@cygnus.com>
11836
11837         * parse.y (patch_method_invocation): Don't reverse the argument
11838         list when dealing with anonymous class constructors. Fixed typo in
11839         comment.
11840
11841 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11842
11843         * parse.y (build_alias_initializer_parameter_list): Reverse
11844         crafted list when building aliases for anonymous class
11845         constructors.
11846
11847 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11848
11849         * parse.y (jdep_resolve_class): Don't bother checking potential
11850         innerclass access if `decl' is NULL.
11851         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
11852         WFL.
11853
11854 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11855
11856         * parse.c: Remove (again.)
11857
11858 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11859
11860         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
11861         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
11862         outside the `if' statement, alias to innerclass removed, `decl'
11863         used to mark the class complete.
11864
11865 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11866
11867         * parse.y (simple_name:): Fixed typo in error message.
11868
11869 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11870
11871         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
11872         or its first operand can be error marks.
11873
11874 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11875
11876         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
11877         * parse.y (method_header): Likewise.
11878
11879 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11880
11881         * parse.y (process_imports): Consider that one might be trying to
11882         import an innerclass. Fixes gcj/254
11883
11884 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11885
11886         * parse.y (find_as_inner_class): Handle the case where the
11887         enclosing context of an innerclass has been loaded as bytecode.
11888
11889 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11890
11891         * parse.y (simple_name:): Reject `$' in type names.
11892         (resolve_type_during_patch): Use `type' as a second
11893         argument to resolve_no_layout. Fixes gcj/257.
11894
11895 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
11896
11897         * parse.y (find_most_specific_methods_list): Select the only
11898         non-abstract method even if max has been set.
11899         Fixes gcj/285, gcj/298.
11900
11901 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
11902
11903         * lang-specs.h: Added %(jc1) to java compiler options.
11904
11905 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11906
11907         * .cvsignore: New file.
11908
11909 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11910
11911         * parse.y (not_accessible_p): Access granted to innerclasses
11912         (indirectly) extending the reference type. Fixes gcj/249.
11913
11914 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11915
11916         * parse.y (patch_method_invocation): Fixed comment.
11917         (maybe_use_access_method): Build this$<n>s to the context of the
11918         target method, or a type that extends it. Fixes gcj/242.
11919
11920 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11921
11922         * parse.c: Remove.
11923
11924 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11925
11926         * parse.y (fold_constant_for_init): Avoid bullish conversion.
11927
11928 2000-07-13  Tom Tromey  <tromey@cygnus.com>
11929
11930         * lang-specs.h: Added %{I*}.
11931
11932 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11933
11934         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11935
11936 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11937
11938         * parse-scan.c: Remove.
11939
11940 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11941
11942         * class.c (set_super_info): Handled protected inner classes.
11943         (common_enclosing_context_p): Bail early if arguments aren't both
11944         inner classes.
11945         (get_access_flags_from_decl): Handle private and protected inner
11946         classes.
11947         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
11948         (CLASS_PROTECTED): Likewise.
11949         (struct lang_type): New bitfield `poic'.
11950         * parse.y (jdep_resolve_class): Call check_inner_class_access on
11951         inner classes only.
11952         (check_inner_class_access): Renamed arguments, added
11953         comments. Handles protected inner classes (fixes gcj/225)
11954         (not_accessible_p): Fixed comments. Avoid handling inner classes.
11955
11956 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11957
11958         * parse.y (resolve_qualified_expression_name): Verify qualified
11959         access to `this'. Fixes gcj/239.
11960
11961 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11962
11963         * jcf-write.c (generate_classfile): Don't install ConstantValue
11964         for null pointers.
11965
11966 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11967
11968         * parse.y (resolve_qualified_expression_name): Handle inner class
11969         access. Fixes gcj/256.
11970
11971 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11972
11973         * jcf-write.c (generate_classfile): Properly install the
11974         ConstantValue attribute and the initial value constant pool index
11975         on string constants.
11976         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
11977         class files.
11978
11979 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11980
11981         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
11982         construct.
11983         * parse.y (find_as_inner_class): Fixed typo.
11984         (do_resolve_class): Explore enclosing contexts when searching for
11985         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
11986         (check_inner_class_access): Check `decl' which can be null in case
11987         of previous errors.
11988
11989 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11990
11991         * java-tree.h (java_debug_context): Declared `extern'.
11992         (safe_layout_class): Likewise.
11993         * parse.y (resolve_field_access): Field must be `static' in order
11994         to be replaced by its initial value. Added comments.
11995         (find_applicable_accessible_methods_list): Fixed typo.
11996         (find_most_specific_methods_list): Methods found in innerclasses
11997         take over methods founds in the enclosing contexts.
11998         (java_complete_tree): Loosen restrictions on the type of DECLs
11999         that can be replaced by their initialization values.
12000         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12001
12002 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12003
12004         * Make-lang.in (PARSE_DIR): New macro.
12005         (PARSE_RELDIR): Likewise.
12006         (PARSE_C): Likewise.
12007         (PARSE_SCAN_C): Likewise.
12008         ($(PARSE_C)): New target.
12009         ($(PARSE_SCAN_C)): Likewise.
12010         (SET_BISON): New macro.
12011         (BISONFLAGS): Likewise.
12012         (JAVABISONFLAGS): Likewise.
12013
12014 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12015
12016         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12017         argument on the first pass for CNI as well as JNI.
12018         (print_method_info): Set up method name on the first pass only.
12019
12020 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12021
12022         * parse.y (parser_qualified_classname): Removed parameter
12023         `is_static'.
12024         (create_interface): Removed first passed parameter to
12025         parser_qualified_classname.
12026         (create_class): Likewise. Don't install alias on static
12027         innerclasses. Fixes gcj/275.
12028
12029 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12030
12031         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12032         debugable statement with empty_stmt_node. Fixes gcj/272
12033
12034 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12035
12036         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12037         gcj/271.
12038
12039 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12040
12041         * jcf-write.c (push_long_const): Appropriately cast short negative
12042         constant to jword.
12043
12044 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12045
12046         * parse.y (verify_constructor_super): Use loop variable
12047         `m_arg_type' initialized with `mdecl_arg_type'.
12048
12049 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12050
12051         * parse.y (resolve_field_access): Handle case where `type_found'
12052         is NULL.
12053
12054 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12055
12056         * expr.c (lookup_field): The same field can be found through two
12057         different interface. Don't declare it ambiguous in that case.
12058
12059 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12060
12061         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12062         follows \r, then unget it at a lower level.
12063
12064 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12065
12066         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12067         java_complete_tree.
12068
12069 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12070
12071         * parse.y (for_statement): Wrap expression in a WFL if it is a
12072         constant.  For PR gcj/268.
12073
12074 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12075
12076         * parse.y (do_resolve_class): Minor optimiztion in the package
12077         list search. Removed unnecessary test and return statement.
12078         (valid_ref_assignconv_cast_p): Order of arguments to
12079         enclosing_context_p fixed.
12080
12081 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12082
12083         * expr.c (lookup_field): Print error and return error_mark_node if
12084         field reference is ambiguous.
12085
12086         * parse.y (check_abstract_method_definitions): Also check if
12087         `other_method' is abstract.
12088
12089 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12090
12091         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12092         classes.
12093         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12094         (struct lang_type): New field `pic'.
12095         (CLASS_PRIVATE): New macro.
12096         * parse.y (check_inner_class_access): New function.
12097         (jdep_resolve_class): Call it.
12098
12099 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12100
12101         * parse.y (patch_incomplete_class_ref): Initialize the returned
12102         class.  For PR gcj/260.
12103
12104 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12105
12106         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12107
12108 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12109
12110         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12111         Java specific checks.
12112         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12113         screened by DECL_P.
12114         * java-tree.def (CASE_EXPR): Marked 'e'.
12115         (DEFAULT_EXPR): Likewise.
12116         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12117         screened by DECL_P.
12118         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12119         Java specific checks.
12120         (generate_bytecode_insns): Test try_block for BLOCK before using
12121         BLOCK_EXPR_BODY.
12122         * parse.y (build_wfl_wrap): Added `location' argument. Set
12123         EXPR_WFL_LINECOL accordingly.
12124         (dim_expr:): Wrap constants with WFLs.
12125         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12126         (resolve_package): Check for `stmt' not being a BLOCK before
12127         building a debuggable statement with it.
12128         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12129         invocation.
12130         (resolve_field_access): Make sure `decl' is a DECL before treating
12131         it as such.
12132         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12133         IDENTIFIER_NODE before treating it as such.
12134         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12135         treating it as such.
12136         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12137         to be applied only on non array types.
12138
12139 2000-06-16  Per Bothner  <per@bothner.com>
12140
12141         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12142         define in terms of DECL_RESULT, as that fails when --enable-checking.
12143
12144 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12145
12146         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12147         types the same in comparison.
12148         (CHECK_OP): Add static prototype.
12149
12150 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12151
12152         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12153         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12154         * parse.c: Rebuilt.
12155
12156 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12157
12158         * decl.c (create_primitive_vtable): Prototype.
12159
12160         * jcf-write.c (generate_bytecode_insns): Initialize variable
12161         `saved_context'.
12162
12163         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12164
12165 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12166
12167         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12168         to track searched classes, and do not search the same class more than
12169         once. Call find_applicable_accessible_methods_list on immediate
12170         superclass, instead of search_applicable_method_list on all ancestors.
12171         Fix for PR gcj/238.
12172
12173 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12174
12175         * parse.y (register_fields): Permit static fields in inner classes
12176         if they are final. Fix for PR gcj/255.
12177
12178 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12179
12180         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12181         * parse.y (find_in_imports): Returned type changed to void,
12182         leading comment fixed.
12183         (register_package): New function.
12184         (qualify_and_find): Likewise.
12185         (package_declaration:): Use `register_package'.
12186         (single_type_import_declaration:): Removed local variable
12187         `node'. Added missing `;' for consistency.
12188         (type_import_on_demand_declaration:): Use `chainon' to link new
12189         entries.
12190         (lookup_field_wrapper): Lookup local variables defined in outer
12191         contexts first.
12192         (java_complete_class): Don't reverse the list of imported on demand.
12193         (do_resolve_class): Reorganized. Removed local variable
12194         `original_name'. Call `qualify_and_find' with the current package
12195         name, invoke `find_in_imports_on_demand' right after. Call
12196         `qualify_and_find' with the packages we've seen so far. Fixed
12197         operations numbering in comments.
12198         (java_expand_class): Don't reverse `package_list'.
12199         (find_most_specific_methods_list): New local variables `abstract'
12200         and `candidates'. Use them to pick the right method.
12201
12202 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12203
12204         * parse.y (check_modifiers_consistency): Don't subtract out
12205         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12206
12207 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12208
12209         * Makefile.in (INTLLIBS): New.
12210         (LIBS): Add above.
12211         (DEPLIBS): Ditto.
12212
12213 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12214
12215         * class.c (get_dispatch_table): Build the vtable dummy entry list
12216         element with a null purpose. Fixed leading comment.
12217         (build_dtable_decl): Build an accurate dtable type when appropriate
12218         and use it.
12219
12220 2000-06-02  Richard Henderson  <rth@cygnus.com>
12221
12222         * lang.c (lang_get_alias_set): New.
12223
12224 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12225
12226         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12227         before using it as the accessed field.
12228
12229 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12230
12231         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12232         char_array_vtable, short_array_vtable, int_array_vtable,
12233         long_array_vtable, float_array_vtable, double_array_vtable):
12234         Declare.
12235         * expr.c (get_primitive_array_vtable): New function.
12236         (create_primitive_vtable): New function.
12237         (java_lang_expand_expr): Enable code to statically generate
12238         arrays.
12239         * decl.c (init_decl_processing): Create primitive vtables.
12240         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12241         short_array_vtable, int_array_vtable, long_array_vtable,
12242         float_array_vtable, double_array_vtable): Define.
12243
12244 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12245
12246         * java/parse.y (find_applicable_accessible_methods_list):
12247         Don't add an uninitialized value to the list.
12248
12249 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12250
12251         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12252         when trying to see if field's class should be initialized.  Always
12253         initialize field's declaring class, not qualified class.
12254         For PR gcj/162.
12255
12256         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12257         `wfl_operator', to maybe_build_primttype_type_ref.
12258         Fixes PR gcj/235.
12259
12260 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12261
12262         * parse.y (patch_method_invocation): Don't try to lookup methods
12263         in primitive types.
12264
12265 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12266
12267         * parse.y (resolve_field_access): Call the appropriate <clinit>
12268         before accessing the length of a static array. Craft a decl for
12269         the field while its time. Fixes PR gcj/129.
12270
12271 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12272
12273         * parse.y (resolve_package): Correctly set `*next' (was off by
12274         one.)
12275         (resolve_qualified_expression_name): Fixed comment.
12276
12277 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12278
12279         * jcf-parse.c (jcf_parse_source): Reset current_class and
12280         current_function_decl to NULL before parsing a new file.
12281
12282 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12283
12284         * parse.y (block_end:): If the collected block doesn't feature a
12285         statement, insert an empty statement.
12286
12287 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12288
12289         * parse.y (maybe_yank_clinit): New function.
12290         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12291         end of the list of methods belonging to a class.
12292         (java_complete_expand_method): Check whether <clinit> is really
12293         necessary and expand it accordingly.
12294
12295 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12296
12297         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12298         processed by the method's switch statement.
12299
12300 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12301
12302         * java-tree.h: Added init state enum.
12303         * decl.c (emit_init_test_initialization): Initialize class
12304         initialization check variable by looking at class' state.
12305
12306 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12307
12308         * java-tree.h (build_instanceof): Declare.
12309         (build_get_class): Declare.
12310         * parse.y (patch_binop): Use build_instanceof.
12311         * expr.c (build_instanceof): New function.  If class is final,
12312         don't make a function call.
12313         (expand_java_INSTANCEOF): Use it.
12314         (build_get_class): New function.
12315
12316 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12317
12318         * jcf-write.c (generate_classfile): Scan the source_file for
12319         slashes with the right pointer variable.
12320
12321 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12322
12323         * lang.c (lang_decode_option): Update -Wunused flags by calling
12324         set_Wunused.
12325         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12326
12327 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12328
12329         * check_init.c (check_init): Constify local char *.
12330         * class.c (push_class): Constify local char *.
12331         * java_tree.h: Update prototypes.
12332         * jcf-io.c (open_class): Constify filename parameter and
12333         return value.
12334         (find_class): Remove redundant string copy.  Cast return from
12335         open_class.
12336         * jcf-parse.c (read_class, parse_class_file, yyparse):
12337         Constify local char *.
12338         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12339         Constify local char *.
12340         * jcf.h (JCF): Constify filename and classname.
12341         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12342         * lang.c (init_parse): Constify parameter and return value.
12343         * lex.c (java_get_line_col): Constify filename parameter.
12344         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12345         * parse.y (java_parser_context_suspend,
12346         issue_warning_error_from_context, safe_layout_class): Constify
12347         local char *.
12348         * parse.c: Regenerate.
12349
12350 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12351
12352         * expr.c (build_jni_stub): Cache the result of
12353         _Jv_LookupJNIMethod.
12354
12355 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12356
12357         * decl.c (predef_filenames_size): Now 7.
12358         (predef_filenames): New seventh entry.
12359
12360 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12361
12362         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12363         Keep track of when we've seen a reference field after a
12364         non-reference field.
12365         (get_boehm_type_descriptor): Handle case where we see
12366         non-reference fields but no trailing reference field.
12367         * decl.c (rawdata_ptr_type_node): Define.
12368         (init_decl_processing): Initialize rawdata_ptr_type_node.
12369         * java-tree.h (rawdata_ptr_type_node): Declare.
12370
12371 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12372
12373         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12374         specifiers in calls to fprintf.
12375
12376 2000-05-03  Andrew Haley  <aph@cygnus.com>
12377
12378         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12379
12380         * javaop.h (WORD_TO_INT): New function.
12381         (IMMEDIATE_s4): Use WORD_TO_INT.
12382         * jcf.h (JPOOL_INT): Ditto.
12383
12384         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12385         separator.
12386
12387 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12388
12389         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12390         on native function.
12391         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12392         JNI methods.
12393         * expr.c (build_jni_stub): New function.
12394         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12395         * parse.c: Rebuilt.
12396         * parse.y (java_complete_expand_methods): Expand a native method
12397         and call build_jni_stub if -fjni given.
12398         * lang-options.h: Document -fjni.
12399         * lang.c (flag_jni): New global.
12400         (lang_f_options): Added `jni' entry.
12401         * java-tree.h (soft_lookupjnimethod_node,
12402         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12403         Declare.
12404         (flag_jni): Declare.
12405         (build_jni_stub): Declare.
12406         (struct lang_decl): Added `native' flag.
12407         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12408         structure.
12409         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12410         soft_jnipopsystemframe_node): New globals.
12411         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12412         argument.
12413
12414         * java-tree.def: Put into `C' mode.
12415
12416 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12417
12418         Fix for PR gcj/2:
12419         * expr.c (expand_invoke): Generate check to see if object pointer
12420         is null in nonvirtual invocation case.
12421         * java-tree.h (soft_nullpointer_node): Declare.
12422         * decl.c (soft_nullpointer_node): New global.
12423         (init_decl_processing): Initialize soft_nullpointer_node.
12424         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12425         or `private' methods.
12426         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12427
12428 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12429
12430         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12431         from <clinit>
12432
12433 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12434
12435         * zextract.c (find_zip_file_start): New function.
12436         (read_zip_archive): Use it.
12437
12438 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12439
12440         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12441
12442 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12443
12444         * class.c (common_enclosing_context_p): New function.
12445         * java-tree.h (common_enclosing_context_p): Added prototype.
12446         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12447         classes sharing an outer context with the current instance.
12448         * parse.y (build_access_to_thisn): Fixed leading comment.
12449         (verify_constructor_super): New local `supper_inner'. Skip
12450         enclosing context argument in the case of inner class constructors.
12451         (patch_method_invocation): Insert proper context as second
12452         parameter to pure inner class constructor super invocations.
12453
12454 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12455
12456         * parse.y (end_class_declaration): Reset the interface number
12457         counter.
12458
12459 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12460
12461         * parse.y (source_start_java_method): Deleted unnecessary code.
12462         (patch_method_invocation): Fixed comment.
12463
12464 2000-04-24  Robert Lipe <robertlipe@usa.net>
12465
12466         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12467
12468 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12469
12470         * boehm.c (mark_reference_fields): Use int_byte_position.
12471
12472 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12473
12474         * boehm.c (mark_reference_fields): Only call byte_position on
12475         non-static fields.
12476
12477 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12478
12479         * boehm.c (mark_reference_fields): Added `last_view_index'
12480         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12481
12482 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12483
12484         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12485         * parse.y (check_class_interface_creation): Fixed comments. Select
12486         permitted modifiers for (inner) interfaces. Changed error message
12487         to report rejected modifiers used with local classes.
12488
12489 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12490
12491         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12492         of directly inherited type considered in scope.
12493         * parse.y (do_resolve_class): Search inherited classes for inner
12494         classes.
12495
12496 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12497
12498         * parse.y (not_accessible_p): Use member's class, not current
12499         class, when doing inheritance check for protected reference.
12500         Fixes PR gcj/124.
12501
12502 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12503
12504         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12505
12506 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12507
12508         * parse.y (lookup_field_wrapper): Search for final local aliases.
12509         (resolve_expression_name): Let lookup_field_wrapper search for
12510         final local aliases. Force the value of `name' if one is found.
12511         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12512         an expression name. Fixed comments.
12513
12514 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12515
12516         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12517
12518 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12519
12520         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12521
12522 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12523
12524         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12525
12526 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12527
12528         PR gcj/211:
12529         * gjavah.c (utf8_cmp): Changed return value.
12530         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12531         result.
12532         (cxx_keywords): New global.
12533         (get_field_name): Handle new result of cxx_keyword_subst.
12534         (print_method_info): Likewise.
12535
12536 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12537
12538         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12539         with a newline, for CNI.
12540         (print_stub_or_jni): Print a space or newline before method name for
12541         CNI as well as JNI.
12542         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12543         (process_file): Include gcj/cni.h if generating CNI stubs.
12544
12545 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12546
12547         * gjavah.c (decompile_method): Use print_field_name.
12548         Fixes PR gcj/205.
12549
12550 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12551
12552         * parse.y (java_expand_classes): Reverse the package list once.
12553         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12554         reduction.
12555         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12556         the `==' and `!=' operators.
12557
12558 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12559
12560         * jcf-write.c (generate_bytecode_insns): At invocation time,
12561         always relate an interface method to the type of its selector.
12562
12563 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12564
12565         Fix for PR gcj/2:
12566         * expr.c (expand_invoke): Generate check to see if object pointer
12567         is null in nonvirtual invocation case.
12568         * java-tree.h (soft_nullpointer_node): Declare.
12569         * decl.c (soft_nullpointer_node): New global.
12570         (init_decl_processing): Initialize soft_nullpointer_node.
12571         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12572         or `private' methods.
12573         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12574
12575 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12576
12577         Fix for PR gcj/140:
12578         * parse.y (check_final_assignment): Recognize assignments to the
12579         `length' field of an array when generating class files.
12580
12581 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12582
12583         * class.c (decl_hash): Prototype removed.
12584         (decl_compare): Likewise.
12585
12586 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12587
12588         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12589         * parse.y (check_modifiers_consistency): Check for final/volatile
12590         clash.  Fixes PR gcj/164.
12591
12592 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12593
12594         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12595         made global.
12596         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12597         global.
12598         (add_method_1): Use `java_hash_hash_tree_node' and
12599         `java_hash_compare_tree_node'.
12600         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12601         (java_hash_compare_tree_node): Likewise.
12602         * parse.y (find_applicable_accessible_methods_list): Create,
12603         delete and use a hash table to remember already searched interfaces.
12604
12605 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12606
12607         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12608         with latest entry.
12609
12610 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12611
12612         * boehm.c (mark_reference_fields, set_bit): Prototype.
12613         (set_bit): Un-ANSI-fy definition.
12614
12615         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12616         Prototype.
12617
12618         * decl.c (emit_init_test_initialization): Likewise.
12619
12620         * gjavah.c (jni_print_char): Likewise.
12621
12622         * parse.y (create_new_parser_context): Likewise.
12623
12624 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12625
12626         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12627         patch missing hunk. Fixed indentation.
12628
12629 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12630
12631         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12632         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12633
12634 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12635
12636         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12637         when negative *before* using it as an array index.
12638         * ChangeLog: Fixed typo.
12639
12640 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12641
12642         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12643         to 0 when it reaches -1.
12644
12645 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12646
12647         * jcf-parse.c (get_constant): Properly cast `num' during the
12648         invocation of `add_double'.
12649         * jcf-write.c (push_long_const): Properly cast `lo' before
12650         comparing it to short bounds.
12651         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12652         `interface_body:' is reduced after the current interface is
12653         pushed.
12654
12655 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12656
12657         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12658         Java-specific `-f' option.
12659
12660 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12661
12662         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12663         Adjust order of making types.
12664         Make bitsize_*_node values.
12665
12666 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12667
12668         * class.c (make_field_value): Use byte_position.
12669         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12670         (java_array_data_offset): Likewise.
12671         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12672         bzero call.
12673
12674 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12675
12676         * parse.y (check_abstract_method_definitions): New local
12677         `end_type_reached'. Make sure we also consider `end_type'.
12678         (java_check_abstract_method_definitions): Make sure we eventually
12679         consider `java.lang.Object'.
12680         (maybe_use_access_method): Don't use access method if not in the
12681         context of a pure inner class or if the method's context is right.
12682         (find_applicable_accessible_methods_list): New static flag
12683         `object_done'. Don't search abstract classes as interfaces. Fixed
12684         indentation. Fixed the `java.lang.Object' only search. Search
12685         class interface(s) first, then fully search enclosing contexts.
12686         (find_most_specific_methods_list): Pick the closest candidate when
12687         they're all abstract.
12688
12689 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12690
12691         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
12692         properly initialize `finished_label'. Don't emit gotos for empty
12693         try statements.
12694
12695 2000-03-19  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
12696
12697         * except.c (emit_handlers): Clear catch_clauses_last.
12698
12699 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12700
12701         * parse.y (check_method_types_complete): New function.
12702         (create_class): Reset anonymous class counter only when seeing an
12703         non inner classe.
12704         (java_complete_class): JDEP_METHOD: Don't recompute signature
12705         if incomplete.
12706
12707 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12708
12709         * class.c (build_static_ref): Fixed indentation in comment.
12710         * java-tree.def (TRY_EXPR): Fixed typo in name.
12711         (CLASS_LITERAL): Likewise.
12712         * java-tree.h: (TYPE_DOT_CLASS): New macro.
12713         (struct lang_type): New field `dot_class'.
12714         * jcf-write.c (generate_bytecode_insns): Fixed error message.
12715         (generate_classfile): Method `class$' is synthetic.
12716         * parse.y (build_do_class_method): New function.
12717         (build_dot_class_method_invocation): Likewise.
12718         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
12719         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
12720         (qualify_ambiguous_name): Likewise.
12721         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
12722         (build_try_statement): Fixed leading comment.
12723
12724 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12725
12726         * class.c (make_field_value): Properly handle sizes.
12727         (get_dispatch_vector): Use tree_low_cst and host_integerp.
12728         (layout_class_method): Count using trees.
12729         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
12730         * expr.c (java_array_data_offset): Use int_bit_position.
12731         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
12732         (build_invokevirtual): Use tree_low_cst and do computations with trees.
12733
12734 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12735
12736         * lang.c (flag_hash_synchronization): New global.
12737         (lang_f_options): Added `hash-synchronization'.
12738         * lang-options.h: Mention -fhash-synchronization.
12739         * java-tree.h (flag_hash_synchronization): Declare.
12740         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
12741         hash table synchronization is disabled.
12742         * decl.c (init_decl_processing): Only push `sync_info' value when
12743         hash table synchronization is disabled.
12744         * class.c (make_class_data): Only push `sync_info' field when hash
12745         table synchronization is disabled.  Removed dead code.
12746
12747 2000-03-16  Tom Tromey  <tromey@cygnus.com>
12748
12749         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
12750
12751 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12752
12753         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
12754         classes.
12755         * parse.y (patch_method_invocation): Handle anonymous classes
12756         creation in static context.
12757
12758 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12759
12760         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
12761         * parse.y (resolve_qualified_expression_name): Use it.
12762         (patch_method_invocation): Likewise.
12763
12764 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12765
12766         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
12767         depending on the type of dependency which dictates what the
12768         current class is.
12769         (unresolved_type_p): Resolved types limited to the current class.
12770
12771 2000-03-15  Tom Tromey  <tromey@cygnus.com>
12772
12773         * decl.c (init_decl_processing): Set type of `sync_info' to be
12774         pointer to Object.
12775
12776         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
12777         Correctly compute bit number for current slot.  Zero `high' and
12778         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
12779         mark_reference_fields.
12780         (mark_reference_fields): New function.
12781
12782 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12783
12784         * parse.y (register_incomplete_type): Fixed initialization of
12785         JDEP_ENCLOSING.
12786
12787 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12788
12789         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
12790         static globals.
12791         (push_class_context, pop_class_context): New function.
12792         (class_body:): Call pop_class_context.
12793         (interface_body:): Likewise.
12794         (INNER_QUALIFIER): New macro.
12795         (report_class_declaration): Changed output format and use
12796         INNER_QUALIFIER. Call push_class_context.
12797
12798 2000-02-14  Andrew Haley  <aph@cygnus.com>
12799
12800         * check-init.c (check_init): Add new cases for unary and binary
12801         tree nodes.
12802
12803 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12804
12805         * parse.y (resolve_package): Set `next' once a type name has been
12806         progressively discovered.
12807         (resolve_qualified_expression_name): Propagate resolution only if
12808         there are remaining qualifiers. Take into account `q' might have
12809         been cleared after re-qualification.
12810         * parse.y (patch_method_invocation): New local `resolved'.
12811         Section dealing with qualified expression rewritten to use
12812         resolve_field_access.
12813
12814 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12815
12816         * parse.h (PUSH_CPC): Fixed indentation.
12817         (DEBUG_CPC): New macro.
12818         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
12819         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
12820         * parse.y (class_body_declaration:): Use
12821         SET_CPC_INSTANCE_INITIALIZER_STMT.
12822         (method_declaration:): Check for null current_function_decl.
12823         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
12824         (java_parser_context_pop_initialized_field): Better handling of
12825         empty lists.
12826         (maybe_make_nested_class_name): Mark nested class name as
12827         qualified when necessary.
12828         (end_class_declaration): Don't call java_parse_context_resume when
12829         one or more error occurred.
12830         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
12831         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
12832         SET_CPC_INITIALIZER_STMT.
12833         (method_header): Check for inner classes declaring static methods.
12834         (resolve_qualified_expression_name): Handle situation where `this'
12835         is implied.
12836
12837 2000-03-13  Hans Boehm <boehm@acm.org>
12838
12839         * typeck.c (build_prim_array_type): Correctly set the high word too.
12840
12841 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12842
12843         * parse.y (java_complete_expand_methods): Leave <clinit> out of
12844         ordinary methods.
12845         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
12846         list of methods for interfaces.
12847
12848 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12849
12850         * parse.y (qualify_ambiguous_name): Properly handle expressions
12851         using `null'.
12852
12853 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12854
12855         * parse.y (check_final_assignment): Extended to process
12856         COMPOUND_EXPR.
12857         (patch_assignment): Have check_final_assignment called only once.
12858
12859 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12860
12861         * java-tree.h (IS_INIT_CHECKED): New flag.
12862         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
12863         * parse.y (patch_string): Call force_evaluation_order on the
12864         completed string concatenation tree.
12865         * expr.c (force_evaluation_order): Call force_evaluation_order on
12866         function's arguments too.
12867
12868 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12869
12870         * decl.c (emit_init_test_initialization): Mark KEY as unused.
12871         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12872         (build_anewarray): Likewise.
12873         * parse.y (patch_newarray): Likewise.
12874         * parse.c: Regenerated.
12875
12876 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
12877
12878         * decl.c (init_decl_processing): Added new class fields `depth',
12879         `ancestors', and `idt' to class_type_node. Use
12880         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
12881         * class.c (make_class_data): Push initial values for new fields.
12882         * java-tree.h: Updated prototype for `build_invokeinterface'.
12883         * expr.c (build_invokeinterface): Changed parameters to accept
12884         `method' tree. Calculate index of `method' in its declaring
12885         interface. Build call to _Jv_LookupInterfaceMethodIdx.
12886         (expand_invoke): Call `build_invokeinterface' with new parameters.
12887         * parse.y (patch_invoke): Call `build_invokeinterface' with new
12888         parameters.
12889
12890 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
12891
12892         * typeck.c (lookup_do): Search superinterfaces first
12893         when looking up an interface method. From Godmar Back
12894         <gback@cs.utah.edu>
12895
12896 2000-03-06  Tom Tromey  <tromey@cygnus.com>
12897
12898         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
12899
12900 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12901
12902         * java-tree.h (lookup_argument_method2): Declared.
12903         (safe_layout_class): Prototype moved from parse.h.
12904         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
12905         * parse.y (java_check_regular_methods): Local `super_class' gone.
12906         Call lookup_argument_method2 instead of lookup_argument_method.
12907         Perform modifier match for methods found declared in implemented
12908         interfaces. Fixed indentation problem. Overriding/hiding error
12909         report to take place only for methods found in classes.
12910         * typeck.c (lookup_argument_method): Changed leading
12911         comment. Re-written by calling lookup_do.
12912         (lookup_argument_method2): New function.
12913         (lookup_java_method): Re-written by calling lookup_do.
12914         (lookup_do): New function.
12915
12916 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12917
12918         * check-init.c (check_init): Removed dead code. Handle (blank)
12919         final variables.
12920         * parse.y (declare_local_variables): New local `final_p', set it
12921         and use it to initialize LOCAL_FINAL.
12922         (check_final_assignment): Only check FIELD_DECLs.
12923
12924 2000-02-17  Tom Tromey  <tromey@cygnus.com>
12925
12926         * Makefile.in (JAVA_OBJS): Added boehm.o.
12927         (boehm.o): New target.
12928         * Make-lang.in (JAVA_SRCS): Added boehm.c.
12929         * java-tree.h (flag_use_boehm_gc): Declare.
12930         (get_boehm_type_descriptor): Declare.
12931         * lang.c (lang_f_options): Added `use-boehm-gc'.
12932         (flag_use_boehm_gc): New global.
12933         * lang-options.h: Added -fuse-boehm-gc.
12934         * boehm.c: New file.
12935         * class.c (get_dispatch_table): If class uses a Boehm type
12936         descriptor, put it in the vtable.
12937         (make_class_data): Removed dead code.
12938
12939 2000-03-03  Per Bothner  <per@bothner.com>
12940
12941         * decl.c (init_decl_processing):  Initialize sizetype properly.
12942
12943 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12944
12945         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
12946         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
12947         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12948         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
12949         (jcf_parse): New local `current'. Load innerclasses seen in outer
12950         context being processed.
12951         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
12952         * jcf-write.c (append_innerclasses_attribute): New function.
12953         (append_innerclasses_attribute_entry): Likewise.
12954         (get_access_flags): Handle static classes. Set anonymous and local
12955         classes to be private.
12956         (generate_classfile): Attribute count adjusted. Call
12957         append_innerclasses_attribute.
12958         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
12959         PURE_INNER_CLASS_TYPE_P.
12960         * parse.y (parser_qualified_classname): New parameter `is_static',
12961         produce non qualified name accordingly.
12962         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
12963         (create_interface): Added argument to parser_qualified_classname.
12964         (create_class): Added argument to parser_qualified_classname. Setup
12965         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
12966         (add_inner_class_fields): Fixed indentation.
12967         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
12968         (method_declarator): Fixed typo in comment.
12969         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
12970         (build_current_thisn): Likewise.
12971         (patch_method_invocation): Likewise.
12972
12973 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12974
12975         * decl.c (current_function_decl): Move to toplev.c.
12976
12977 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12978
12979         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
12980         (DECL_BIT_INDEX): Use underlying representation.
12981         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
12982
12983 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12984
12985         * expr.c (build_java_ret): Pass proper type to size_binop.
12986
12987 2000-02-25  Anthony Green  <green@cygnus.com>
12988
12989         * expr.c (build_class_init): Mark the decl to be ignored by
12990         check_init.
12991         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
12992         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
12993         * class.c (init_test_hash_newfunc): New function.
12994         (decl_hash): New function.
12995         (decl_compare): New function.
12996         * decl.c (emit_init_test_initialization): New function.
12997         (complete_start_java_method): Traverse the init test hashtable,
12998         calling emit_init_test_initialization.
12999         (always_initialize_class_p): Define.
13000         * expr.c (build_class_init): Use initialization tests when
13001         emitting class initialization code.
13002         (always_initialize_class_p): Declare.
13003         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13004         1.
13005         * java-tree.h: Include hash.h.
13006         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13007         (struct lang_decl): Add init_test_table field.
13008         (init_test_hash_entry): Define.
13009
13010 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13011
13012         * gjavah.c (main): Avoid using `argi' to report unimplemented
13013         options.
13014
13015 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13016
13017         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13018         initialize locals to avoid warnings. Local `exception_type' moved
13019         into if statement.
13020
13021 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13022
13023         * parse.y (resolve_expression_name): Use `orig' as a second
13024         argument to resolve_field_access.
13025         (resolve_field_access): Removed unnecessary code when dealing with
13026         static fields.
13027
13028 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13029
13030         * class.c (push_super_field): Don't push the field twice.
13031         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13032         * parse.h (java_reorder_fields): Prototyped.
13033         * parse.y (java_reorder_fields): New function.
13034         (java_layout_class): Simplified not to worry about re-ordering.
13035
13036 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13037
13038         * gjavah.c (print_name): In JNI case, correctly quote string.
13039         (print_method_info): Don't handle overrides in JNI mode.
13040
13041 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13042
13043         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13044         value type set to `boolean_type_node'.
13045
13046 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13047
13048         * jcf-dump.c (main): Test for correct condition after
13049         output file creation.
13050
13051 2000-02-19  Anthony Green  <green@cygnus.com>
13052
13053         * jcf-depend.c (add_entry): Fix test for first list entry.
13054
13055 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13056
13057         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13058         * constants.c (build_constants_constructor): Likewise.
13059
13060 2000-02-19  Anthony Green  <green@cygnus.com>
13061
13062         * jcf-depend.c (add_entry): Add entries to the end of the list.
13063
13064 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13065
13066         * decl.c (INT_TYPE_SIZE): Define if necessary.
13067         (expand_java_return): Handle the case of a native integer smaller
13068         than a JVM integer.
13069
13070 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13071
13072         * gjavah.c (help): Use GCCBUGURL.
13073         * jv-scan.c (help): Likewise.
13074         * jcf-dump.c (help): Likewise.
13075
13076 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13077
13078         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13079         `finally' clauses.
13080
13081 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13082
13083         * jcf-parse.c (load_class): Call `fatal' if no file containing
13084         the target class are found.
13085
13086 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13087
13088         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13089         lex.c, lex.h, and PARSE_H to...
13090         (parse.o, parse-scan.o): ...here, respectively.
13091
13092         * lex.c: Split out code that may trigger SIGFPE from yylex()
13093         to its own function.
13094         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13095
13096 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13097
13098         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13099
13100 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13101
13102         * parse.y (outer_field_access_p): Stop in time when outer contexts
13103         are exhausted.
13104         (resolve_qualified_expression_name): Properly qualify *everything*
13105         after a package.type to be resoled as expression names.
13106         (find_applicable_accessible_methods_list): Save/restore `class' to
13107         isolate it from a possible outer context search.
13108
13109 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13110
13111         * gjavah.c (jni_print_char): New function.
13112         (print_full_cxx_name): Use it.
13113         (decode_signature_piece): Likewise.
13114         (print_cxx_classname): Likewise.
13115
13116 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13117
13118         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13119         version.o.
13120         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13121
13122         * gjavah.c: Include version.h.
13123
13124         * jcf-dump.c: Likewise.
13125
13126         * jv-scan.c: Likewise.
13127
13128 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13129
13130         * parse.y (outer_field_access_fix): First parameter now a tree
13131         node. Check for assignment to final. First argument to
13132         build_outer_field_access_fix modified to accommodate prototype.
13133         (build_outer_field_access): Don't check for assignment to final
13134         here.
13135         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13136         possibly returned by outer_field_access_fix. Changed
13137         outer_field_access_fix's first argument.
13138         (check_final_assignment): $finit$'s context is OK.
13139         (patch_unaryop): Use node instead of its line/column value when
13140         calling outer_field_access_fix.
13141
13142 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13143
13144         * parse.y (interface_declaration:): No longer tagged
13145         <node>. Re-installed default action.
13146         (class_member_declaration:): Handle inner interfaces.
13147         (interface_member_declaration): Handle inner interfaces and
13148         classes.
13149         (create_interface): Push error if one seen. Suspend parsing
13150         context when processing an inner interface.
13151         (register_fields): Inner class static field limitations not to
13152         apply to inner interfaces.
13153
13154 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13155
13156         * jcf-parse.c (load_class): Update `java_error_count' when a
13157         class' file can't be found.
13158         (parse.y): Avoid (byte)code generation when errors seen.
13159
13160 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13161
13162         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13163         decodes a valid node.
13164         (patch_binop): Handle TRUNC_DIV_EXPR.
13165
13166 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13167
13168         * parse.y (resolve_package): New local `acc'. Try to progressively
13169         build and guess a package and type name.
13170
13171 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13172
13173         * parse.y (find_applicable_accessible_methods_list): Load and
13174         layout the search class if necessary.
13175         (java_complete_tree): Keep to original type of the folded initial
13176         value.
13177
13178 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13179
13180         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13181         Generate error message if circularity is detected. New static
13182         local `list'.
13183         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13184         * jcf-write.c (generate_bytecode_insns): Very simply handle
13185         SAVE_EXPR.
13186         * parse.y (java_check_circular_reference): Use
13187         `cyclic_inheritance_report' during report, if necessary.
13188         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13189         walking NEW_ARRAY_INIT twice.
13190
13191 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13192
13193         * parse.y (check_class_interface_creation): Allow inner classes to
13194         be `private' or `protected', check modifiers' consistency. Prevent
13195         block local classes from bearing any modifiers.
13196
13197 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13198
13199         * except.c (check_start_handlers): Re-add prototype lost in last
13200         patch.
13201         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13202
13203 2000-02-09  Andrew Haley  <aph@cygnus.com>
13204
13205         * decl.c (clear_binding_level): Remove excess initializer.
13206         (maybe_poplevels): Remove unused variable.
13207         (force_poplevels): Ditto.
13208         (struct binding_level): Add comment.
13209
13210 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13211
13212         * jcf-write.c (generate_classfile): Don't consider
13213         pre-initialization with reference value (use <clinit> instead.)
13214         * parse.y (java_fix_constructors): No generated constructor for
13215         interfaces.
13216         (build_outer_field_access): Removed debug message.
13217         (outer_field_expanded_access_p): Adapted to bytecode generation.
13218         (build_outer_field_access_method): Use fix_method_argument_names.
13219         (build_outer_method_access_method): Fixed indentation. Added
13220         comment. Handle access method generation for static and also void
13221         methods.
13222         (build_access_to_thisn): Inserted debug message.
13223         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13224         (resolve_qualified_expression_name): Fixed comment.
13225         (not_accessible_p): Adapted to bytecode generation. Added comment.
13226         (patch_method_invocation): Added comment.
13227         (maybe_use_access_method): Fixed leading comment. Handle static
13228         methods.
13229         (java_complete_lhs): Don't shortcut handling of initialized upon
13230         declaration String type static fields when generating bytecode.
13231         (patch_unaryop): Handle outer field access when generating
13232         bytecode.
13233
13234 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13235
13236         * java-tree.h (FIELD_THISN): New macro.
13237         * jcf-write.c (append_synthetic_attribute): New function.
13238         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13239         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13240         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13241         this$<n> fields.
13242         (build_outer_field_access): Turned on access functions usage and
13243         generation when compiling to bytecode.
13244         (maybe_use_access_method): Likewise.
13245
13246 2000-01-25  Andrew Haley  <aph@cygnus.com>
13247
13248         * java-except.h (struct eh_range): Add `expanded' field.
13249         (maybe_start_try): Add end_pc arg.
13250         (maybe_end_try): Ditto.
13251         * java-tree.h (force_poplevels): new function.
13252         * expr.c (expand_byte_code): Don't call maybe_start_try or
13253         maybe_end_try.
13254         * except.c (add_handler): Reset expanded.
13255         (expand_start_java_handler): Set expanded.
13256         (check_start_handlers): Don't expand a start handler that's
13257         already been expanded.
13258         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13259         ends after end_pc.
13260         (expand_end_java_handler): call force_poplevels.
13261         (force_poplevels): new function.
13262         * decl.c (binding_level): Add start_pc of binding level.
13263         (maybe_pushlevels): Call maybe_start_try when pushing binding
13264         levels.
13265         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13266         (LARGEST_PC): Define.
13267         (clear_binding_level): Use LARGEST_PC.
13268
13269         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13270         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13271         (binding_depth, is_class_level, current_pc): new variables.
13272         (struct binding_level): ditto.
13273         (indent): new function.
13274         (push_jvm_slot): add debugging info.
13275         (maybe_pushlevels): ditto.
13276         (maybe_poplevels): ditto.
13277         (pushlevel): ditto.
13278         (poplevel): ditto.
13279         (start_java_method): ditto.
13280         (give_name_to_locals): comment only.
13281         * except.c (binding_depth, is_class_level, current_pc):
13282         new variables.
13283         (expand_start_java_handler): add debugging info.
13284         (expand_end_java_handler): ditto.
13285
13286 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13287
13288         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13289         (print_name_for_stub_or_jni, process_file): Constify a char*.
13290
13291 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13292
13293         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13294
13295 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13296
13297         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13298         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13299         defined to be 1.
13300
13301 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13302
13303         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13304         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13305         (struct lang_type): New field `ii_block'.
13306         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13307         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13308         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13309         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13310         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13311         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13312         macros.
13313         * parse.y (add_instance_initializer): New function.
13314         (in_instance_initializer): New static global.
13315         (class_body_declaration:): Link instance initializer block.
13316         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13317         (array_creation_expression:): Remove unused local.
13318         (java_parser_context_push_initialized_field): Fixed leading
13319         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13320         CPC_INSTANCE_INITIALIZER_LIST.
13321         (java_parser_context_pop_initialized_field): Likewise.
13322         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13323         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13324         CPC_INITIALIZER_STMT.
13325         (fix_constructors): New local `class_type'. Use it. Call
13326         add_instance_initializer.
13327         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13328         (patch_return): Forbid return in instance initializers.
13329         (patch_throw_statement): Enforce exception handling in the context
13330         of instance initializers.
13331
13332 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13333
13334         * Make-lang.in (java.mostlyclean): Remove executables in
13335         `mostlyclean'.
13336
13337 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13338
13339         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13340         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13341         (java_float_finite): Convert to use union Word from javaop.h.
13342         (java_double_finite): Convert to use union DWord from javaop.h.
13343
13344 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13345
13346         * gjavah.c (options): Added `jni' entry.
13347         (help): Document -jni.
13348         (flag_jni): New global.
13349         (process_file): Handle JNI output.  Don't print text from
13350         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13351         suffix if it actually exists.
13352         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13353         correct output file name with `--jni'.
13354         (print_include): Mangle header name differently in JNI case.
13355         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13356         method list.
13357         (print_method_info): Handle JNI case.  Put signature info into
13358         method name.  Handle case when STREAM is NULL.
13359         (print_name_for_stub_or_jni): New function.
13360         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13361         (print_cxx_classname): Handle JNI.
13362         (print_full_cxx_name): Likewise.
13363         (decode_signature_piece): Likewise.
13364         (overloaded_jni_method_exists_p): New function.
13365         (struct method_name): Added `signature' and `sig_length' fields.
13366         (HANDLE_END_FIELD): Do nothing in JNI mode.
13367
13368 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13369
13370         * jv-scan.c: Include version.c, <getopt.h>.
13371         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13372         (options): New array.
13373         (usage): New function.
13374         (version): New function.
13375         (main): Use getopt_long to parse command line.
13376         * jcf-dump.c: Include version.c, <getopt.h>.
13377         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13378         OPT_JAVAP): New macros.
13379         (options): New array.
13380         (usage): Return `void'.  Changed message.
13381         (help): New function.
13382         (version): New function.
13383         (main): Use getopt_long_only to parse command line.
13384         * gjavah.c: Include <getopt.h>.
13385         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13386         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13387         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13388         (options): New array.
13389         (java_no_argument): Removed.
13390         (help): Updated with missing options.
13391         (main): Use getopt_long_only to parse command line.
13392         (usage): Changed message.
13393
13394 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13395
13396         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13397         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13398         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13399         * parse.y (array_creation_expression:): Handle anonymous arrays.
13400         (build_array_from_name): Don't set `ret_name' if null.
13401         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13402         (qualify_ambiguous_name): Likewise.
13403         (java_complete_expand_class): Likewise.
13404
13405 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13406
13407         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13408         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13409         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13410         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13411         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13412         AIPL_FUNCTION_COMPLETED_INVOCATION.
13413         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13414         AIPL_FUNCTION_INVOCATION_READY.
13415         (AIPL_FUNCTION_DECLARATION): New enum entry.
13416         * parse.y (reorder_static_initialized): New function.
13417         (java_parser_context_pop_initialized_field): Use it.
13418         (add_inner_class_fields): Use
13419         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13420         augmented. Install marker after last alias initializer, if any.
13421         (generate_finit): Fixed typo. Don't try to retain only the used
13422         fields.
13423         (method_header): Compute and set DECL_FUNCTION_NAP.
13424         (method_declarator): Fixed comment. Insert alias initializer in
13425         parameter list.
13426         (build_alias_initializer_parameter_list): Fixed leading
13427         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13428         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13429         (java_complete_expand_class): Code to retain only used aliases
13430         removed.
13431         (java_complete_expand_methods): New local `first_decl'. Generate
13432         $finit$ first, then expand the constructors, regular methods and
13433         <clinit>.
13434         (java_complete_expand_method): Don't report error on missing
13435         return statement if previously detected bogus.
13436         (fix_constructors): Don't patch constructor parameters list.
13437         (patch_method_invocation): Use new AIPL enum values. Reverse
13438         alias initializer list for anonymous classes.
13439
13440 2000-01-30  Anthony Green  <green@redhat.com>
13441
13442         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13443         determine how many stack slots to pop.
13444
13445 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13446
13447         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13448         error handling/recovery.
13449         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13450
13451 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13452
13453         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13454         FIELD_LOCAL_ALIAS_USED): New macros.
13455         (DECL_FUNCTION_NAP): New macro.
13456         (struct lang_decl): New field `nap'.
13457         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13458         (struct lang_type): New fields `finit_stmt_list' and
13459         `clinit_stmt_list'.
13460         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13461         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13462         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13463         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13464         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13465         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13466         (BUILD_THROW): Macro line separator re-indented.
13467         * parse.y (end_class_declaration): New function.
13468         (maybe_generate_pre_expand_clinit): New name for
13469         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13470         pre-expand static fields.
13471         (maybe_generate_clinit): Function deleted.
13472         (check_for_static_method_reference): Prototype's parameter list
13473         indented.
13474         (generate_finit): New name for maybe_generate_finit. Changed
13475         leading comment. Function rewritten to use
13476         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13477         (build_alias_initializer_parameter_list): New function.
13478         (java_parser_context_pop_initialized_field): Likewise.
13479         (add_inner_class_fields): Likewise.
13480         (type_declaration:): Call end_class_declaration.
13481         (class_member_declaration:): Likewise.
13482         (formal_parameter_list:): Fixed typos.
13483         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13484         element. Improved error handling.
13485         (block_statement:): Call end_class_declaration.
13486         (anonymous_class_creation:): Likewise.
13487         (create_anonymous_class): Fixed comments.
13488         (create_class): Call add_inner_class_fields.
13489         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13490         (method_header): Use MARK_FINAL_PARMS.
13491         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13492         (method_declarator): Propagate final argument flag.
13493         (craft_constructor): New local `artificial'. Call
13494         build_alias_initializer_parameter_list. Use
13495         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13496         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13497         necessary.
13498         (complete_expand_class): Get rid of unused outer context local
13499         alias fields.
13500         (java_complete_expand_methods): Fixed leading
13501         comment. Generate/pre-expand <clinit> first. Changed method
13502         expansion order to regular, $finit$, constructors, <clinit>.
13503         (java_complete_expand_method): Set current_function_decl.
13504         (fix_constructors): Fix constructor parameter list to account for
13505         outer context local alias initializers.
13506         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13507         (resolve_expression_name): Lookup outer context local aliases. New
13508         local `access', use it.
13509         (patch_method_invocation): Patch inner class ctor invocation with
13510         outer context local aliases initialization values. $finit$
13511         invocation patching now includes things generated with
13512         build_alias_initializer_parameter_list.
13513         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13514         (build_super_invocation): Likewise.
13515         (patch_assignment): Changed comment.
13516
13517 2000-01-27  Andrew Haley  <aph@cygnus.com>
13518
13519         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13520         (emit_if): Ditto.
13521         (emit_jsr): Ditto.
13522
13523 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13524
13525         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13526         concatenation.
13527         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13528
13529         * parse.y (register_fields): Don't pass a format specifier to
13530         OBSOLETE_MODIFIER_WARNING.
13531         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13532         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13533         specifier.
13534         (check_modifiers): Change function into a macro.
13535         (check_class_interface_creation): Pass a literal format string.
13536
13537 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13538
13539         * buffer.h: PROTO -> PARAMS.
13540         * check-init.c: Likewise.
13541         * class.c: Likewise.
13542         * constants.c: Likewise.
13543         * convert.h: Likewise.
13544         * decl.c: Likewise.
13545         * except.c: Likewise.
13546         * expr.c: Likewise.
13547         * gjavah.c: Likewise.
13548         * java-except.h: Likewise.
13549         * java-tree.h: Likewise.
13550         * jcf-depend.c: Likewise.
13551         * jcf-dump.c: Likewise.
13552         * jcf-parse.c: Likewise.
13553         * jcf-path.c: Likewise.
13554         * jcf-reader.c: Likewise.
13555         * jcf-write.c: Likewise.
13556         * jcf.h: Likewise.
13557         * jv-scan.c: Likewise.
13558         * jvgenmain.c: Likewise.
13559         * jvspec.c: Likewise.
13560         * lang.c: Likewise.
13561         * lex.c: Likewise.
13562         * lex.h: Likewise.
13563         * parse-scan.y: Likewise.
13564         * parse.h: Likewise.
13565         * parse.y: Likewise.
13566         * typeck.c: Likewise.
13567         * verify.c: Likewise.
13568         * xref.c: Likewise.
13569         * xref.h: Likewise.
13570         * zextract.c: Likewise.
13571         * zipfile.h: Likewise.
13572
13573 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13574
13575         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13576         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13577         * constants.c (build_constant_data_ref): Check for cached
13578         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13579         in TYPE_CPOOL_DATE_REF.
13580         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13581         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13582         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13583         (LOCAL_FINAL): New macro.
13584         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13585         constant pool -- don't try to reuse.
13586         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13587         TYPE_LANG_SPECIFIC.
13588         (find_in_current_zip): Use TYPE_JCF.
13589         * parse.h (java_check_final): Prototype removed.
13590         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13591         (maybe_create_class_interface_decl,
13592         check_class_interface_creation): Likewise.
13593         (java_expand_finals): Function removed.
13594         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13595         (block_statement:): Fixed comment.
13596         (anonymous_class_creation:): Likewise.
13597         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13598         argument patch.
13599         (check_class_interface_creation): Loosened error report on (inner)
13600         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13601         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13602         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13603         argument patch.
13604         (create_interface): Likewise.
13605         (anonymous_class_counter): New static global.
13606         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13607         patch. Fixed comments.
13608         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13609         anonymous_class_counter when declaring a toplevel class.
13610         (craft_constructor): Fixed constructor name when handling
13611         anonymous classes. Anonymous class constructors to feature hidden
13612         this$<n> parameter.
13613         (java_fix_constructors): Added comment.
13614         (java_check_final): Function removed.
13615         (java_complete_expand_methods): Fixed comment. Don't generate
13616         class data, save its outgoing constant pool instead.
13617         (verify_constructor_super): Skip anonymous class constructor
13618         hidden this$<n> parameter.
13619         (java_expand_classes): New local `saved_ctxp'. Removed call to
13620         java_expand_finals and java_check_final. Expand anonymous class
13621         constructors. Generate class data.
13622         (build_super_invocation): Skip anonymous class hidden this$<n>
13623         parameter.
13624         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13625         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13626         (set_java_signature): Likewise.
13627
13628 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13629
13630         * gjavah.c: Delete ACC_VISIBILITY define.
13631         * jcf.h: Add ACC_VISIBILITY define.
13632         * parse.y: final: rule tagged <value>.
13633         (java_check_regular_methods): Use ACC_VISIBILITY define for
13634         default package access check.
13635         (local_variable_declaration_statement): Use final: rule.
13636
13637 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13638
13639         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13640         (final:): New rule.
13641
13642 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13643
13644         * gjavah.c (print_field_info): Allow non-static final fields.
13645
13646 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13647
13648         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13649         * parse.y (patch_anonymous_class): New function.
13650         (create_anonymous_class): Register incomplete type when the
13651         class/interface to extends/implement isn't known yet.
13652         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13653         (verify_constructor_super): Tuned error message.
13654
13655 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13656
13657         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13658         (ANONYMOUS_CLASS_P): New macro.
13659         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13660         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13661         * parse.y (create_class): Added leading argument.
13662         (maybe_create_class_interface_decl,
13663         check_class_interface_creation): Likewise.
13664         (craft_constructor): New function.
13665         (verify_constructor_super): Added argument in prototype.
13666         (class_declaration:): Inserted leading argument.
13667         (for_begin:): Use FOR_LOOP_P.
13668         (anonymous_class_creation): Create WFL of the anonymous class to
13669         instantiate. Call build_new_invocation. Added comments.
13670         (check_class_interface_creation): Handle parameter `anonymous' in
13671         verbose mode class creation announce.
13672         (link_nested_class_to_enclosing): Exclude anonymous classes.
13673         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13674         anonymous class, even though they appear to have an enclosing
13675         context.
13676         (create_interface): Pass extra argument to
13677         check_class_interface_creation.
13678         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
13679         (create_class): Call check_class_interface_creation and
13680         maybe_create_class_interface_decl with extra new argument. Don't
13681         add private this$<n> to anonymous classes.
13682         (method_declarator): Insert hidden this$<n> to anonymous class
13683         constructors.
13684         (java_fix_constructors): Deleted code creating default
13685         constructor. Call craft_constructor instead.
13686         (java_check_regular_methods): Set `saw_constructor' to 1 for
13687         anonymous classes.
13688         (fix_constructors): Pass extra argument to verify_constructor_super.
13689         (verify_constructor_super): New local `sdecl', use it. Search for
13690         matching constructor (possibly featuring arguments) in super
13691         class.
13692         (lookup_method_invoke): Craft constructor according to arguments
13693         list when dealing with anonymous class constructors.
13694         (build_super_invocation): Pass arguments to anonymous class super
13695         constructors.
13696         (search_loop): Use FOR_LOOP_P.
13697         (labeled_block_contains_loop_p): Likewise.
13698
13699 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13700
13701         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
13702         (enclosing_context_p): New function.
13703         (get_access_flags_from_decl): Handle CLASS_STATIC.
13704         (maybe_layout_super_class): Extra first argument passed to
13705         do_resolve_class.
13706         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
13707         ID_INIT_P.
13708         * decl.c (access0_identifier_node): New global.
13709         (init_decl_processing): access0_identifier_node initialized.
13710         (pushdecl): Set DECL_CONTEXT only on non type decls.
13711         * expr.c (lookup_field): Lookup inner class fields in enclosing
13712         contexts.
13713         (expand_invoke): Use ID_INIT_P.
13714         (expand_java_field_op): Use DECL_CLINIT_P.
13715         * java-tree.def (CLASS_LITERAL): New tree code.
13716         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
13717         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
13718         (struct lang_decl): New field `inner_access'.
13719         (enclosing_context_p): Prototyped.
13720         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
13721         ID_CLINIT_P): New macros.
13722         (CLASS_STATIC): New macro.
13723         (CLASS_ACCESS0_GENERATED_P): New macro.
13724         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
13725         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
13726         INNER_CLASS_P): New macros.
13727         (DECL_INNER_CLASS_LIST): New macro.
13728         * jcf-parse.c (yyparse): Avoid the use of ANSI string
13729         concatenation.
13730         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13731         the shift value to int. Fixed typo in comment.
13732         * lex.c (inst_id, wpv_id): Initialize.
13733         * mangle.c (unicode_mangling_length): Take `$' into account.
13734         * parse.h (DRECOVER, RECOVER): Terminate properly.
13735         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
13736         (typedef struct _jdep): New field `enclosing'.
13737         (JDEP_ENCLOSING): New macro.
13738         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
13739         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
13740         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
13741         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
13742         GET_ENCLOSING_CPC_CONTEXT): New macros.
13743         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
13744         (do_resolve_class): Added extra argument in prototype.
13745         * parse.y (resolve_class): Added extra argument in prototype.
13746         (maybe_create_class_interface_decl): Likewise.
13747         (maybe_use_access_method, build_wfl_wrap): New functions.
13748         (java_complete_expand_classes, java_complete_expand_class):
13749         Likewise.
13750         (java_parser_context_push_initialized_field,
13751         java_parser_context_suspend, java_parser_context_resume):
13752         Likewise.
13753         (maybe_make_nested_class_name, make_nested_class_name,
13754         set_nested_class_simple_name_value,
13755         link_nested_class_to_enclosing, find_as_inner_class,
13756         find_as_inner_class_do, check_inner_class_redefinition,
13757         build_thisn_assign, build_current_thisn, build_access_to_thisn,
13758         maybe_build_thisn_access_method, build_outer_field_access,
13759         build_outer_field_access_methods, build_outer_field_access_expr,
13760         build_outer_method_access_method, build_new_access_id,
13761         build_outer_field_access_method, outer_field_access_p,
13762         outer_field_expanded_access_p, outer_field_access_fix,
13763         build_incomplete_class_ref, patch_incomplete_class_ref,
13764         create_anonymous_class): Likewise.
13765         (inst_id, wpv_id): New static global variables.
13766         (synchronized:): New rule, tagged <node>.
13767         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
13768         rules.
13769         (anonymous_class_creation:): New rule, tagged <node>.
13770         (NEW_TK): Tagged <node>.
13771         (type_literals, array_type_literal): New rules, tagged <node>.
13772         (class_declaration:): Removed action when reducing by class_body:
13773         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
13774         using GET_CPC in sub-rules.
13775         (class_member_declaration): Handle inner classes.
13776         (method_declaration): When reducing method_header:, reset
13777         current_function_decl when appropriate.
13778         (method_declarator:): Set the number of formal parameter to 0 for
13779         method declared without arguments.
13780         (constructor_declarator:): Likewise.
13781         (static_initializer:): List of elements kept in a list.
13782         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
13783         use of the keyword `static' for type declarations.
13784         (block_statement:): Handle inner class declarations.
13785         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
13786         type qualified `this'.
13787         (class_instance_creation_expression): Use anonymous_class_creation:
13788         to handle inner class instances creation. Handle qualified `new'.
13789         (something_dot_new): Added appropriate actions.
13790         (create_new_parser_context): New function.
13791         (java_push_parser_context, java_parser_context_save_global,
13792         java_parser_context_suspend): Use create_new_parser_context.
13793         (check_modifiers): Changed leading comment.
13794         (check_class_interface_creation): Handle interclasses.
13795         (add_superinterfaces): Fixed comment.
13796         (create_interface): Build qualified name from the raw_name instead
13797         of its matching WFL. Push the initialized fields list. raw_name added
13798         as an extra argument to maybe_create_class_interface_decl.
13799         (create_class): Build qualified name from the raw_name instead of
13800         its matching WFL. Removed assignment to current_parsed_class_un.
13801         Call PUSH_ERROR before returning an error. Suspend the current
13802         parser context when processing an inner class. Push the
13803         initialized fields list. raw_name added as an extra argument to
13804         maybe_create_class_interface_decl. Add the private this$<n>
13805         field.
13806         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
13807         (register_fields): Get the class type from GET_CPC and handle
13808         previous errors.  Added code to handle the creation of static
13809         fields in inner classes. Initialized fields initialization
13810         statements kept in a list of lists.
13811         (maybe_generate_finit): Initialized fields initialization
13812         statements kept in a list of lists. Use GET_CPC.
13813         (maybe_generate_clinit): Likewise.
13814         (method_header): Use GET_CPC and GET_CPC_UN.
13815         (parser_qualified_classname): Handle inner classes.
13816         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
13817         (java_fix_constructors): Hide pointer to enclosing context
13818         instance in constructor list when dealing with inner classes.
13819         (jdep_resolve_class): Call resolve_class with extra first argument
13820         JDEP_ENCLOSING.
13821         (resolve_class): Add enclosing context as a first extra argument
13822         to do_resolve_class.
13823         (do_resolve_class): Call find_as_inner_class. Handle WFLs
13824         properly.
13825         (resolve_no_layout): Extra argument added to resolve_class
13826         invocation.
13827         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
13828         (java_get_real_method_name): Use GET_CPC_UN.
13829         (check_abstract_method_definitions): Use DECL_CLINIT_P.
13830         (java_check_abstract_methods): Handle static method declared in
13831         inner classes by an error.
13832         (java_check_regular_methods): Use DECL_CLINIT_P.
13833         (source_start_java_method): Also set DECL_MAX_LOCALS.
13834         (create_artificial_method): Call java_parser_context_save_global
13835         and java_parser_context_restore_global instead of saving/restoring
13836         the context by hand.
13837         (expand_start_java_method): Improved verbose mode message.
13838         (java_complete_expand_methods): Fixed leading comment. Use
13839         DECL_CLINIT_P.
13840         (fix_constructors): Added assignment to this$<n> if necessary.
13841         (java_expand_classes): Call java_complete_expand_classes instead
13842         of java_complete_expand_methods.
13843         (make_qualified_primary): Simplified.
13844         (merge_qualified_name): Optimized for missing left or right parts.
13845         (resolve_expression_name): Handle access to outer class fields from
13846         interclasses.
13847         (resolve_qualified_expression_name): New macro
13848         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
13849         classes. Report error on non appropriate qualification of
13850         `new'. Handle qualified `this'.
13851         (not_accessible_p): Allow access to outer class private fields from
13852         inner classes.
13853         (patch_method_invocation): Handle method invocations through
13854         access methods and inner class constructor invocations.
13855         (find_applicable_accessible_methods_list): Search enclosing
13856         contexts of an inner class.
13857         (search_applicable_methods_list): Fixed typo.
13858         (argument_types_convertible): Handle inner class constructors'
13859         hidden outer context reference argument.
13860         (qualify_ambiguous_name): Handle qualified `this'.
13861         (java_complete_lhs): Handle use of field accessed through
13862         artificial access methods in various cases of assignments. Handle
13863         CLASS_LITERAL node.
13864         (check_final_assignment): Use DECL_CLINIT_P.
13865         (valid_ref_assignconv_cast_p): Handle the destination being an
13866         enclosing context of the source.
13867         (patch_unaryop): Handle use of field accessed through artificial
13868         access methods.
13869         (patch_return): Use DECL_CLINIT_P.
13870         (patch_throw_statement): Use DECL_CLINIT_P.
13871         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
13872         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
13873         ID_INIT_P.
13874
13875 2000-01-16  Anthony Green  <green@cygnus.com>
13876
13877         * parse.y (build_string_concatenation): Only use
13878         StringBuffer(String) shortcut if String arg is constant.
13879
13880 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13881
13882         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
13883         the shift value to int. Fixed typo in comment.
13884
13885 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13886
13887         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
13888         * jcf-write.c: Likewise.
13889         * parse.y: Likewise.
13890         * parse.c: Regenerate.
13891
13892 2000-01-09  Anthony Green  <green@cygnus.com>
13893
13894         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
13895         bytecodes in the correct order.
13896
13897 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13898
13899         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
13900
13901 2000-01-06  Anthony Green  <green@cygnus.com>
13902
13903         * expr.c (java_lang_expand_expr): Switch to permanent obstack
13904         before building constant array decl.
13905
13906 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13907
13908         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
13909         method invocation and typo in conditional expression.
13910         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
13911         the appropriate NOTE_POP.
13912         * parse.y (patch_binop): Shift value mask to feature the right
13913         type.
13914
13915 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13916
13917         * class.c (assume_compiled, assume_compiled_node): Add static
13918         prototype.
13919         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
13920
13921         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
13922
13923         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
13924
13925         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
13926         to `__modifier' to avoid stringifying it.
13927
13928         * parse.y (verify_constructor_circularity): Don't call a variadic
13929         function with a non-literal format string.
13930         (java_check_abstract_methods): Move unreachable code inside
13931         `continue' statement.
13932         (lookup_method_invoke): Call xstrdup, not strdup.
13933
13934         * expr.c (expand_java_field_op): Avoid the use of ANSI string
13935         concatenation.
13936
13937         * jcf-parse.c (yyparse): Likewise.
13938
13939         * jv-scan.c (main): Likewise.
13940
13941 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13942
13943         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
13944         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
13945         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
13946         concatenation.
13947
13948         * parse.y (synchronized, variable_redefinition_error,
13949         check_class_interface_creation, create_interface, create_class,
13950         method_header, finish_method_declaration,
13951         check_modifiers_consistency, method_declarator,
13952         complete_class_report_errors, check_abstract_method_definitions,
13953         java_check_regular_methods, check_throws_clauses,
13954         java_check_abstract_methods, read_import_dir,
13955         check_pkg_class_access, declare_local_variables, fix_constructors,
13956         cut_identifier_in_qualified, resolve_expression_name,
13957         resolve_qualified_expression_name, patch_method_invocation,
13958         java_complete_lhs, patch_assignment, try_builtin_assignconv,
13959         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
13960         patch_exit_expr, patch_exit_expr, patch_switch_statement,
13961         patch_try_statement, patch_synchronized_statement,
13962         patch_throw_statement, check_thrown_exceptions,
13963         patch_conditional_expr): Likewise.
13964
13965 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13966
13967         * Makefile.in (LIBDEPS): Added gcc's errors.o
13968         (../jcf-dump$(exeext):): Link with gcc's errors.o
13969         (../gcjh$(exeext):): Likewise.
13970         * expr.c (expand_java_NEW): Layout the entire target type instead of
13971         laying out its methods only.
13972         (lookup_field): Layout the class after having loaded it.
13973         * java-tree.h (java_debug_context): Declared.
13974         * jcf-io.c (toplev.h): Included.
13975         (find_class): Removed assignment to jcf's outofsynch
13976         field. Force source file to be read if newer than its matching
13977         class file. Tweaked debug messages.
13978         * jcf-parse.c (jcf_out_of_synch): Deleted.
13979         (read_class): Call to jcf_out_of_synch removed.
13980         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
13981         (jcf_out_of_synch): Prototype deleted.
13982         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
13983         `deprecated' and `class_err': integer turned into bit-fields.
13984         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
13985         * parse.y (package_list): New global.
13986         (package_declaration:): Record newly parsed package name.
13987         (extra_ctxp_pushed_p): Static global deleted.
13988         (java_parser_context_save_global): Create buffer context for the
13989         purpose of saving globals, if necessary.
13990         (java_parser_context_restore_global): Pop context pushed for the
13991         purpose of saving globals, if necessary.
13992         (java_debug_context_do): New prototype and function.
13993         (java_debug_context): Likewise.
13994         (do_resolve_class): Use already parsed package names to qualify
13995         and lookup class candidate.
13996         (java_pre_expand_clinit): Removed unnecessary local variable.
13997
13998 1999-12-17  Tom Tromey  <tromey@cygnus.com>
13999
14000         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14001         fixes PR gcj/119.
14002         (process_file): Use `\n\' at end of each line in string.
14003
14004 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14005
14006         * expr.c (expand_invoke): Layout the loaded class before
14007         attempting to use it.
14008         (expand_java_field_op): Allow final field assignments to take
14009         place in $finit$.
14010         * typeck.c (convert): Return error_mark_node if expr is null.
14011
14012 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14013
14014         * class.c (class_depth): Return -1 if the class doesn't load
14015         properly.
14016         * expr.c (can_widen_reference_to): Check for errors during depth
14017         computation and return 0 accordingly.
14018         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14019         create default constructors and add an other error check.
14020         * parse.h (java_fix_constructors): Prototyped.
14021         * parse.y (java_pre_expand_clinit): Likewise.
14022         (build_super_invocation): Re-prototyped to feature one argument.
14023         (java_check_circular_reference): Directly use `current'.
14024         (java_fix_constructors): New function.
14025         (java_check_regular_methods): Don't create default constructors
14026         here, but abort if none were found.
14027         (java_complete_expand_methods): Pre-process <clinit> calling
14028         java_pre_expand_clinit.
14029         (java_pre_expand_clinit): New function.
14030         (fix_constructors): build_super_invocation invoked with the
14031         current method declaration as an argument.
14032         (build_super_invocation): Use the context of the processed method
14033         decl argument instead of current_class.
14034         * typeck.c (lookup_java_method): Take WFLs in method names into
14035         account.
14036
14037 1999-12-14  Per Bothner  <per@bothner.com>
14038
14039         * class.c (make_class_data): flag_keep_inline_functions to keep
14040         private methods in the method array.
14041
14042 1999-12-15  Anthony Green  <green@cygnus.com>
14043
14044         * check-init.c (check_init): Take into account both types of
14045         `throw's when checking for uninitialized variables.
14046
14047 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14048
14049         * parse.y (java_complete_lhs): Force conversion of array
14050         dimensions to int_type_node, that's what runtime's ABI expects.
14051
14052 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14053
14054         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14055         operand of a WFL, until the Java front-end gets fixed with regard
14056         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14057
14058 1999-12-10  Andrew Haley  <aph@cygnus.com>
14059
14060         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14061         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14062         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14063         java-tree.h: Ditto.
14064         jcf-write.c: Ditto.
14065
14066 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14067
14068         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14069         before calling expand_eh_region_start and expand_start_all_catch.
14070         * except.c (expand_start_java_handler): Switch to permanent
14071         obstack before calling expand_eh_region_start.
14072         (expand_end_java_handler): Switch to permanent obstack before
14073         calling expand_start_all_catch.
14074
14075 1999-12-5  Anthony Green  <green@cygnus.com>
14076
14077         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14078         function with side effects.
14079         (init_decl_processing): Mark all memory allocating DECLs with
14080         DECL_IS_MALLOC.
14081
14082 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14083
14084         * except.c (expand_end_java_handler): Call
14085         expand_resume_after_catch and end_catch_handler.
14086
14087 1999-11-30  Anthony Green  <green@cygnus.com>
14088
14089         * verify.c (verify_jvm_instructions): Create new return label
14090         chain if non existent (don't rely on the verified state of the jsr
14091         target.)
14092
14093 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14094
14095         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14096         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14097
14098         * parse.y (patch_assignment): Removed bogus final class test on
14099         lhs when checking on whether to emit an ArrayStoreException runtime
14100         check.
14101         * expr.c (expand_java_arraystore): Likewise.
14102
14103 1999-11-28 Anthony Green <green@cygnus.com>
14104
14105         * decl.c (find_local_variable): Reuse single slot decls when
14106           appropriate.
14107
14108 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14109
14110         * jcf-parse.c (saw_java_source): Global variable removed.
14111         (read_class): Don't use `saw_java_source'. Added extra braces.
14112         (yyparse): Code setting `saw_java_source' removed.
14113
14114 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14115
14116         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14117
14118 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14119
14120         * verify.c (merge_type_state): Non verified subroutines being
14121         considered more than once to trigger passive type merge.
14122
14123 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14124
14125         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14126         in case of error. Error message tuned.
14127
14128 1999-11-21  Anthony Green  <green@cygnus.com>
14129
14130         * constants.c (find_methodref_index): Unwrap method names before
14131         inserting them in the constant pool.
14132
14133         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14134
14135         * class.c (assume_compiled_node): New typedef.
14136         (assume_compiled_tree): New static data.
14137         (find_assume_compiled_node): New function.
14138         (add_assume_compiled): New function.
14139         (assume_compiled): New function.
14140         * class.c (make_class_data): Use assume_compiled.
14141         (is_compiled_class): Use assume_compiled.
14142
14143         * java-tree.h (add_assume_compiled): Declare.
14144
14145         * lang.c (lang_decode_option): Parse new options.
14146
14147 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14148
14149         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14150         int_type_node: that's what `_Jv_AllocObject' expects.
14151
14152 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14153
14154         * parse.y (lookup_method_invoke): Use lang_printable_name to
14155         reliably build the type name during error report. Fixes PR gcj/97.
14156
14157 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14158
14159         * jcf-path.c: Include <sys/stat.h>.
14160         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14161         (DIR_UP): New macro.
14162
14163 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14164
14165         * parse.y (source_end_java_method): Resume permanent allocation,
14166         reversing Apr 27 1998 patch.
14167         (patch_string_cst): Pop obstacks after having pushed the permanent
14168         ones.
14169
14170 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14171
14172         * class.c (finish_class): Emit inlined methods if any native
14173         methods exist in the class.  Fixes PR gcj/85.
14174
14175 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14176
14177         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14178         (qualify_ambiguous_name): Likewise.
14179
14180 1999-11-03  Godmar Back <gback@cs.utah.edu>
14181
14182         * typeck.c: (lookup_java_method):  search all inherited
14183         interfaces when looking up interface method.
14184
14185 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14186
14187         * parse.y (method_header:): Issue error message for rule `type
14188         error'.
14189         (synchronized:): Error report when not using synchronized.
14190
14191 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14192
14193         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14194         being used before the superclass constructor has been called.
14195         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14196         instead of `CALL_THIS_CONSTRUCTOR_P'.
14197
14198 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14199
14200         * check-init.c: Fix typo in comment.
14201
14202 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14203
14204         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14205         and final method.
14206
14207 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14208
14209         * parse.y (expression_statement:): Call function to report
14210         improper invocation of a constructor.
14211         (parse_ctor_invocation_error): New function.
14212
14213 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14214
14215         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14216         remember_end_note.
14217
14218 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14219
14220         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14221         in generated `main'.
14222
14223 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14224
14225         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14226         (qualify_ambiguous_name): Likewise.
14227
14228 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14229
14230         * parse.y (java_complete_tree): fold_constant_for_init to work on
14231         permanent_obstack.
14232         (java_complete_lhs): Likewise.
14233         (array_constructor_check_entry): Complete an initializer element
14234         on permanent_obstack.
14235
14236 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14237
14238         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14239         From Mike Moreton <mike@pillim.demon.co.uk>.
14240
14241 1999-10-15  Greg McGary  <gkm@gnu.org>
14242
14243         * java-tree.h (flag_bounds_check): Remove extern decl.
14244         * lang.c (flag_bounds_check): Remove global variable.
14245         (lang_f_options): Remove "bounds-check" entry.
14246         (lang_init_options): Default flag_bounds_check to "on".
14247
14248 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14249
14250         * jvgenmain.c (usage): New function.
14251         (main): Use it.  Also, handle `-D' options.
14252         * jvspec.c (lang_specific_driver): Recognize -D.
14253         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14254
14255         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14256
14257 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14258
14259         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14260         variadic function with a non-literal format string.
14261
14262         * parse-scan.y (report_main_declaration): Likewise.
14263
14264         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14265
14266         * parse.y (read_import_dir, patch_assignment, patch_binop,
14267         patch_array_ref): Likewise.
14268
14269         * typeck.c (build_java_array_type): Likewise.
14270
14271         * verify.c (verify_jvm_instructions): Likewise.
14272
14273 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14274
14275         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14276
14277 1999-10-07  Anthony Green  <green@cygnus.com>
14278
14279         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14280         where CHECK_PUT may fail for valid reasons.
14281
14282         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14283         UNSAFE_PUTN): New macros.
14284
14285 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14286
14287         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14288         well.  Fixes Java PR gcj/59.
14289         * parse-scan.y (yyerror): Report errors.
14290
14291 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14292
14293         * decl.c (insert_block): Remove unconditional `abort'.
14294
14295 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14296
14297         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14298         FUNCTION_CODE now of type int.  All callers changed.
14299         Set the builtin's DECL_BUILT_IN_CLASS.
14300
14301 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14302
14303         * jvspec.c (lang_specific_driver): Don't read spec file if
14304         -fsyntax-only given.
14305
14306 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14307
14308         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14309
14310         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14311         (WORDS_TO_LONG): Likewise.
14312         (WORDS_TO_DOUBLE): Likewise.
14313
14314 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14315
14316         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14317         (RELOCATION_VALUE_1): Likewise.
14318         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14319         push_in_const, push_long_const): Prototyped.
14320         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14321         (push_constant2): Likewise.
14322         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14323         (find_constant_wide): Cast find_constant2's integer arguments to
14324         `jword'.
14325         (find_constant_index): Cast find_constant2's and find_constant2's
14326         integer arguments to `jword'.
14327         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14328         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14329         (emit_if): Use RELOCATION_VALUE_1.
14330         (emit_goto): Likewise.
14331         (emit_jsr): Likewise.
14332         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14333         argument to push_long_const to HOST_WIDE_INT.
14334
14335 1999-09-15  Andreas Schwab  <schwab@suse.de>
14336
14337         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14338
14339 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14340
14341         * lang.c (lang_decode_option): Extend comment.
14342
14343 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14344
14345         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14346         instead of fndecl.
14347
14348 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14349
14350         * gjavah.c (get_field_name, print_method_info, print_include,
14351         add_namelet): Use xmalloc, not malloc.
14352
14353         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14354         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14355         NULL pointer.
14356
14357         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14358
14359         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14360
14361         * jcf-path.c (add_entry): Likewise.
14362
14363         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14364
14365         * jv-scan.c (xmalloc): Remove definition.
14366
14367         * jvgenmain.c (xmalloc): Likewise.
14368
14369         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14370
14371         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14372
14373         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14374         concat, not xmalloc/sprintf.
14375         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14376         (xstrdup): Remove definition.
14377
14378         * parse.y (duplicate_declaration_error_p,
14379         constructor_circularity_msg, verify_constructor_circularity,
14380         check_abstract_method_definitions, java_check_regular_methods,
14381         java_check_abstract_methods, patch_method_invocation,
14382         check_for_static_method_reference, patch_assignment, patch_binop,
14383         patch_cast, array_constructor_check_entry, patch_return,
14384         patch_conditional_expr): Use xstrdup, not strdup.
14385
14386         * zextract.c (ALLOC): Use xmalloc, not malloc.
14387
14388 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14389
14390         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14391
14392         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14393         (do_spec, lang_specific_pre_link, lang_specific_driver,
14394         input_filename, input_filename_length): Don't declare.
14395         (main_class_name, jvgenmain_spec, lang_specific_driver):
14396         Constify a char*.
14397         (lang_specific_driver): All calls to the function pointer
14398         parameter now explicitly call `fatal'.
14399
14400 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14401
14402         * parse.y (find_applicable_accessible_methods_list): Search
14403         abstract classes as interfaces.
14404
14405 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14406
14407         * class.c (finish_class): We're now outside a valid method
14408         declaration. Tell the rest of gcc so.
14409
14410 1999-09-08  Bruce Korb  autogen@linuxbox.com
14411
14412         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14413
14414 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14415
14416         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14417         java-array.h.
14418         (decode_signature_piece): Don't emit "::" in JArray<>.
14419         (print_namelet): Only print trailing `;' when printing a class.
14420
14421 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14422
14423         * java-tree.h: Delete declarations for all tree nodes now moved to
14424         global_trees.
14425         * decl.c: Delete their definitions.
14426
14427 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14428
14429         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14430         * Makefile.in (OBJS): Add ggc-callbacks.o.
14431         (OBJDEPS): Likewise.
14432
14433 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14434
14435         * parse.y (strip_out_static_field_access_decl): Return operand if
14436         it satisfies JDECL_P.
14437
14438 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14439
14440         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14441         Handle nested arrays, like `[[I'.
14442
14443 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14444
14445         * class.c (finish_class): Remove unused parameter, all callers
14446         changed.
14447
14448         * expr.c (build_java_athrow): Change return type to void.
14449         (java_lang_expand_expr): Make sure each case in switch returns a
14450         value.
14451
14452         * java-tree.h (finish_class): Fix prototype to take void args.
14453
14454         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14455         (main): Issue return from main, not exit.
14456
14457         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14458
14459         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14460
14461         * jv-scan.c (main): Issue return from main, not exit.
14462
14463         * parse.y (check_abstract_method_definitions,
14464         java_check_abstract_method_definitions): Add static prototypes.
14465         (java_complete_expand_methods): Fix call to `finish_class'.
14466
14467         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14468         and `prevpc'.
14469
14470 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14471
14472         * lang.c (language_string): Constify.
14473
14474 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14475
14476         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14477         Remove hacks for stuff which comes from libiberty.
14478
14479         * Make-lang.in: Likewise.
14480
14481 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14482
14483         * Makefile.in (xref.o): Depend on xref.c explicitly.
14484
14485 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14486
14487         * java-tree.h (lang_printable_name): Constify a char*.
14488
14489         * lang.c (lang_printable_name): Likewise.
14490
14491 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14492
14493         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14494         comments in C code.
14495
14496 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14497
14498         * gjavah.c (print_cxx_classname): Print "::" before qualified
14499         name.
14500
14501 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14502
14503         * parse.y (lookup_cl): Changed leading comment. Now does its best
14504         to set the column number.
14505         (qualify_ambiguous_name): Take WFL wrappers into account.
14506
14507 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14508
14509         * verify.c (verify_jvm_instructions): Don't check instruction
14510         validity beyond end of method.
14511
14512 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14513
14514         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14515
14516 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14517
14518         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14519         cxx_keyword_subst, generate_access, name_is_method_p,
14520         get_field_name, print_field_name, super_class_name, print_include,
14521         decode_signature_piece, print_class_decls, usage, help,
14522         java_no_argument, version, add_namelet, print_namelet): Add static
14523         prototype.
14524         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14525         name_is_method_p): Constify a char*.
14526         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14527         Provide a final else clause in an if-else-if.
14528         (print_field_info): Add missing final arg in function call to
14529         `print_field_name'.
14530         (print_method_info, decompile_method, decode_signature_piece,
14531         print_c_decl, print_full_cxx_name, print_stub,
14532         print_mangled_classname, super_class_name, print_include,
14533         add_namelet, add_class_decl, print_class_decls, process_file,
14534         help): Constify a char*.
14535
14536         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14537         push_int_const, find_constant_wide, find_constant_index,
14538         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14539         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14540         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14541         emit_if, emit_goto, emit_jsr, call_cleanups,
14542         make_class_file_name): Add static prototypes.
14543         (generate_bytecode_return, generate_bytecode_insns): Pass a
14544         NULL_PTR, not a NULL_TREE.
14545
14546         * jv-scan.c: Include "jcf.h".
14547         (main): Declare using DEFUN macro.
14548
14549         * jvspec.c (find_spec_file, lang_specific_pre_link,
14550         lang_specific_driver): Add prototypes.
14551         (find_spec_file): Constify a char*.
14552
14553         * keyword.gperf (hash, java_keyword): Add prototypes.
14554
14555         * lang.c (lang_print_error): Add static prototype.
14556         (lang_init): Prefer memcpy over bcopy to avoid casts.
14557
14558         * lex.c (yylex): Add static prototype.
14559
14560         * parse-scan.y: Include "lex.c" earlier.
14561
14562         * parse.h: Remove redundant declaration for `yylex'.
14563
14564         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14565         labeled_block_contains_loop_p): Add static prototypes.
14566         (not_accessible_p): Make static to match prototype.
14567
14568         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14569
14570 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14571
14572         * parse.y (check_method_redefinition): Changed leading comment.
14573         (check_abstract_method_definitions): New function.
14574         (java_check_abstract_method_definitions): New function.
14575         (java_check_regular_methods): Call it.
14576         (verify_constructor_super): Fixed indentation.
14577         (lookup_method_invoke): Likewise.
14578
14579 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14580
14581         * parse.y (method_header): Return a null pointer if the current
14582         class node is null.
14583         (finish_method_declaration): Return if the current function decl
14584         is null.
14585         (source_start_java_method): Likewise.
14586         (java_method_add_stmt): Likewise.
14587
14588 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14589
14590         * class.c (emit_register_class): Removed unnecessary call to
14591         start_sequence.
14592         * parse.y (labeled_block_contains_loop_p): Removed unused local
14593         variable.
14594
14595 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14596
14597         * parse.y (java_refold): Added prototype.
14598
14599 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14600
14601         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14602         (java_stabilize_reference): Removed unnecessary `else'.
14603         (java_complete_lhs): Set flag to remember boolean. Call
14604         java_refold. Added comments.
14605         (java_decl_equiv): New function.
14606         (binop_compound_p): Likewise.
14607         (java_refold): Likewise.
14608         (patch_unaryop): Striped static field access assigned to decl and
14609         op. Changed promotion scheme for ++/-- operators.
14610         (search_loop): New function.
14611         (labeled_block_contains_loop_p): Likewise.
14612         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14613         comment.
14614         (patch_bc_statement): Call search_loop. Fixed comment.
14615
14616 1999-08-14  Anthony Green  <green@cygnus.com>
14617
14618         * expr.c (java_lang_expand_expr): Mark static array data as
14619         referenced.
14620
14621 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14622
14623         * jvgenmain.c (main): NUL-terminate name_obstack.
14624
14625 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14626
14627         * check-init.c (check_bool2_init, done_alternative): Add static
14628         prototypes.
14629
14630         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14631         (add_method, build_utf8_ref, build_class_ref,
14632         append_gpp_mangled_type, layout_class_method): Constify a char*.
14633
14634         * decl.c (push_promoted_type, make_binding_level): Add static
14635         prototypes.
14636         (push_promoted_type, pushdecl): Constify a char*.
14637
14638         * except.c (find_handler_in_range, link_handler,
14639         check_start_handlers): Add static prototypes.
14640
14641         * expr.c (process_jvm_instruction): Constify a char*.
14642
14643         * gjavah.c (main): Constify a char*.
14644
14645         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14646         Constify a char*.
14647
14648         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14649         static prototypes.
14650         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14651         munge, print_ents): Constify a char*.
14652
14653         * jcf-dump.c (disassemble_method): Constify a char*.
14654         (print_constant_pool, print_exception_table): Add static prototypes.
14655         (print_constant, print_exception_table, main, disassemble_method):
14656         Constify a char*.
14657
14658         * jcf-io.c (find_classfile, find_class): Likewise.
14659
14660         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14661         (set_source_filename, predefined_filename_p): Add static prototypes.
14662         (set_source_filename, get_constant, get_class_constant,
14663         find_in_current_zip): Constify a char*.
14664
14665         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14666         static prototypes.
14667         (add_entry, add_path, jcf_path_classpath_arg,
14668         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14669
14670         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14671         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14672         jcf_parse_one_method, jcf_parse_methods,
14673         jcf_parse_final_attributes): Add static prototypes.
14674         (get_attribute): Constify a char*.
14675
14676         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
14677         jcf_dependency_add_target, jcf_path_classpath_arg,
14678         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14679
14680         * jv-scan.c (main): Constify a char*.
14681         (gcc_obstack_init): Add prototype arguments.
14682
14683         * jvgenmain.c (gcc_obstack_init): Likewise.
14684         (main): Constify a char*.
14685
14686         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
14687         static prototypes.
14688         (put_decl_string, lang_print_error): Constify a char*.
14689         (lang_init): Remove redundant extern prototype.
14690
14691         * mangle.c (emit_unicode_mangled_name): Constify a char*.
14692
14693         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
14694         Add static prototypes.
14695         (get_type_from_signature): Constify a char*.
14696
14697         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
14698         Add static prototypes.
14699         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
14700         (verify_jvm_instructions): Constify a char*.
14701
14702         * xref.c (xref_flag_value): Likewise.
14703
14704         * xref.h (xref_flag_value): Likewise.
14705
14706         * zextract.c (makeword, makelong): Add static prototypes.
14707         (makeword, makelong): Constify a uch*.
14708
14709 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14710
14711         * lang.c (java_dummy_print): Constify a char*.
14712         (lang_print_error): Likewise.
14713         (lang_init): Remove redundant prototype for `print_error_function'.
14714         (lang_init_source): Likewise.
14715         (lang_identify): Constify a char*.
14716
14717 1999-08-09  Tom Tromey  <tromey@cygnus.com>
14718
14719         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
14720         (WORDS_TO_LONG): Likewise.
14721         (WORDS_TO_DOUBLE): Likewise.
14722
14723 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14724
14725         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
14726
14727         * expr.c (java_stack_pop, java_array_data_offset,
14728         build_java_throw_out_of_bounds_exception, case_identity,
14729         build_java_check_indexed_type): Add static prototypes.
14730         (linenumber_table, expand_invoke, expand_java_field_op,
14731         build_primtype_type_ref, expand_byte_code): Constify a char*.
14732
14733         * java-tree.h (build_primtype_type_ref, linenumber_table):
14734         Constify a char*.
14735         (java_lang_expand_expr): Add prototype.
14736
14737         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
14738         `java_lang_expand_expr'.
14739
14740         * lex.c (java_lex_error): Constify a char*.
14741         (java_get_unicode, java_read_char, java_allocate_new_line,
14742         java_unget_unicode, java_sneak_unicode): Prototype.
14743
14744         * parse-scan.y (current_class, package_name, method_declarator,
14745         report_class_declaration, yyerror): Constify a char*.
14746
14747         * parse.h (java_report_errors): Prototype.
14748         (yyerror): Constify a char*.
14749
14750         * parse.y (classitf_redefinition_error, check_modifiers,
14751         parse_jdk1_1_error, lookup_package_type,
14752         lookup_package_type_and_set_next, get_printable_method_name,
14753         purify_type_name): Constify a char*.
14754         (build_super_invocation, maybe_generate_finit,
14755         verify_constructor_super, parser_add_interface,
14756         add_superinterfaces, jdep_resolve_class, note_possible_classname,
14757         java_complete_expand_methods, java_expand_finals,
14758         cut_identifier_in_qualified, java_stabilize_reference,
14759         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
14760         merge_string_cste): Prototype.
14761         (single_type_import_declaration, yyerror,
14762         variable_redefinition_error, build_array_from_name,
14763         build_unresolved_array_type, check_class_interface_creation,
14764         resolve_class, complete_class_report_errors,
14765         note_possible_classname, read_import_dir,
14766         find_in_imports_on_demand, resolve_package, fix_constructors,
14767         check_deprecation, lookup_method_invoke,
14768         maybe_build_primttype_type_ref, array_constructor_check_entry):
14769         Constify a char*.
14770         (java_complete_expand_methods, java_expand_finals): Make static.
14771         (convert_narrow): Remove static prototype.
14772
14773 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
14774
14775         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
14776
14777 1999-08-02  Richard Henderson  <rth@cygnus.com>
14778
14779         * decl.c: Include defaults.h instead of expr.h.
14780         * parse.y: Likewise.
14781
14782 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
14783
14784         * java/decl.c (start_java_method): Change all uses of
14785         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
14786         Ensure expr.h is included.
14787         * java/expr.c (pop_arguments): Ditto.
14788         * java/parse.y (expand_start_java_method): Ditto.
14789
14790 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14791
14792         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
14793
14794 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
14795
14796         * decl.c: Include "function.h".
14797         * except.c: Likewise.
14798         * parse.y: Likewise.
14799         * Makefile.in: Update dependencies.
14800
14801 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14802
14803         * expr.c (build_java_soft_divmod): Provide a default case in switch.
14804         (java_lang_expand_expr): Mark parameters `target', `tmode' and
14805         `modifier' with ATTRIBUTE_UNUSED.
14806
14807         * gjavah.c (process_file): Add braces around ambiguous `else'.
14808
14809         * jcf-dump.c (print_access_flags, localvar_free): Change return
14810         type to void.
14811
14812         * parse.y (java_complete_expand_method): Initialize variable
14813         `exception_copy'.
14814         (resolve_qualified_expression_name): Likewise for `field_decl'.
14815         (patch_method_invocation): Likewise for `class_to_search'.
14816         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
14817         (patch_assignment): Likewise for `lhs_type'.
14818
14819         * verify.c (verify_jvm_instructions): Remove unused variable
14820         `caller'.
14821
14822 1999-07-25  Richard Henderson  <rth@cygnus.com>
14823
14824         * decl.c (va_list_type_node): New.
14825
14826 1999-07-25  Anthony Green  <green@cygnus.com>
14827
14828         * gjavah.c (print_stub): New function.
14829         (METHOD_IS_NATIVE): New macro.
14830         (print_mangled_classname): Make static.
14831         (HANDLE_END_FIELD): Don't emit fields during stub generation.
14832         (process_file): Perform stub generation.
14833         (HANDLE_METHOD): Don't emit class decls during stub
14834         generation.
14835         (HANDLE_END_METHOD): Take into account stub generation.
14836         (print_method_info): Handle stub generation.
14837         (print_stub): New function.
14838         (print_cxx_classname): Make signature consistant with others.
14839         (help): Describe -stubs option.
14840         (main): Create stub file.
14841         (version): Use version.c.
14842         (print_full_cxx_name): New function.
14843         (print_c_decl): Use print_full_cxx_name.
14844
14845 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14846
14847         * check-init.c (check_init): Handle MAX_EXPR.
14848
14849 1999-07-15  Andrew Haley  <aph@cygnus.com>
14850
14851         * lang.c (flag_use_divide_subroutine): New variable.
14852         * typeck.c: (convert_ieee_real_to_integer): Bounds check
14853         fp-to-integer conversion.
14854         (convert): Call convert_ieee_real_to_integer when flag_fast_math
14855         is not set.
14856
14857         * expr.c (build_java_soft_divmod): New function.
14858         (build_java_binop): Call build_java_soft_divmod if
14859         flag_use_divide_subroutine is set.
14860         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14861         soft_lrem_node: new builtin functions.
14862         (init_decl_processing) Initialize the new builtins.
14863         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
14864         soft_lrem_node: new builtin functions.
14865         (build_java_soft_divmod): New function.
14866         * parse.y: Call build_java_soft_divmod if
14867         flag_use_divide_subroutine is set.
14868         * parse.c: Rebuilt.
14869
14870         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
14871         a --specs= arg) even if not linking.
14872         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
14873         -fuse-divide-subroutine
14874
14875 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14876
14877         * parse.y (resolve_and_layout): Check methods only once.
14878         (resolve_qualified_expression_name): Verify thrown exceptions
14879         compatibility.
14880         (check_thrown_exceptions): Reject exceptions thrown in
14881         initializer. Error message tuned.
14882
14883 1999-07-14  Andrew Haley  <aph@cygnus.com>
14884
14885         * expr.c (expand_expr): Do not return the last statement in a
14886         block as the block's value.
14887
14888 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14889
14890         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
14891         CALL_EXPR, to avoid order of evaluation changes.
14892
14893 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14894
14895         * parse.y (qualify_ambiguous_name): Do not use
14896         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
14897
14898 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14899
14900         * check-init.c (check_init): Handle MAX_EXPR.
14901         * expr.c (force_evaluation_order): Force method call arguments to
14902         be evaluated in left-to-right order.
14903         * parse.y (qualify_ambiguous_name): Loop again to qualify
14904         NEW_ARRAY_EXPR properly.
14905
14906 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14907
14908         * parse.y (patch_invoke): Resolve unresolved invoked method
14909         returned type.
14910         (qualify_ambiguous_name): STRING_CST to qualify expression for
14911         type name resolution.
14912
14913 1999-06-24  Andrew Haley  <aph@cygnus.com>
14914
14915         * class.c (finish_class): Whenever a deferred method is
14916         output, rescan the list of methods to see if a new candidate for
14917         output can be found.
14918
14919 1999-06-28  Tom Tromey  <tromey@cygnus.com>
14920
14921         * jvspec.c (lang_specific_driver): Recognize --help.
14922
14923 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14924
14925         * parse.y (resolve_package): Fixed bogus return statement.
14926         (patch_method_invocation): Resolve method invocation beginning with
14927         a package name qualifier.
14928
14929 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14930
14931         * Make-lang.in (java.stage1): Depend on stage1-start.
14932         (java.stage2): Likewise for stage2-start.
14933         (java.stage3): Likewise for stage3-start.
14934         (java.stage4): Likewise for stage4-start.
14935
14936 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14937
14938         * parse.y (java_complete_lhs): When doing cross referencing, don't
14939         try to keep file location on a WFL expanded as a CALL_EXPR.
14940
14941 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14942
14943         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
14944         compiling to class file a void method with an empty method body.
14945         As a side effect, the bytecode backend will generate the
14946         appropriate `return' instruction.
14947
14948 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14949
14950         * parse.y (lookup_package_type_and_set_next): New function prototype.
14951         (resolve_package): Search current and imported packages.
14952         (lookup_package_type_and_set_next): New function.
14953
14954 1999-06-22  Andrew Haley  <aph@cygnus.com>
14955
14956         * verify.c (verify_jvm_instructions): Check for pending blocks
14957         before invalid PC test and opcode switch, not after.
14958
14959 1999-06-21  Andrew Haley  <aph@cygnus.com>
14960
14961         * except.c (find_handler_in_range): The upper limit for exception
14962         ranges is exclusive, not inclusive: (start <= pc < end).
14963         (link_handler): find child pointer which points to outer by
14964         searching sibling list: previous code incorrectly assumed that
14965         outer->outer->first_child must point to outer.
14966         * verify.c (verify_jvm_instructions): FIXME added to code for
14967         `athrow'.
14968         (verify_jvm_instructions): Do not assume that the last block
14969         processed in a subroutine is a block which ends with a `ret'
14970         instruction.  With some control flows it is possible that the last
14971         block ends with an `athrow'.
14972
14973 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14974
14975         * parse.y (qualify_ambiguous_name): Reorganized the post
14976         evaluation of non WFL leading expression nodes.
14977
14978 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14979
14980         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
14981         CONVERT_EXPR.
14982
14983 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14984
14985         * parse.y (qualify_ambiguous_name): Handle qualified expression
14986         beginning with a STRING_CST.
14987
14988 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14989
14990         * parse.y (register_fields): Set DECL_INITIAL on both
14991         pre-initialized static and public fields.
14992         (resolve_field_access): Static field access expressions to always
14993         use pointer types.
14994         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
14995         qualification. CONVERT_EXPR to be resolved as an expression name.
14996         (java_complete_lhs): Identify and access qualified final
14997         initialized field in switch statement case expression.
14998         (fold_constant_for_init): Pre-initialized field decl constant to
14999         be folded.
15000
15001 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15002
15003         * parse.y (note_possible_classname): Mark returned node with
15004         QUALIFIED_P only if the original class name contained a '/'.
15005
15006 1999-06-05  Anthony Green  <green@cygnus.com>
15007
15008         * Make-lang.in (gcjh): More parallel build fixes.
15009
15010 1999-06-03  Mike Stump  <mrs@wrs.com>
15011
15012         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15013
15014 1999-06-02  Anthony Green  <green@cygnus.com>
15015
15016         * except.c (link_handler): Chain exception handlers in order.
15017
15018 1999-06-02  Anthony Green  <green@cygnus.com>
15019
15020         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15021         with nops and process as usual in order to always set correct EH
15022         ranges.  Emit detailed warnings about unreachable bytecodes.
15023
15024 1999-06-02  Anthony Green  <green@cygnus.com>
15025
15026         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15027         constant.
15028
15029 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15030
15031         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15032           or the searched field decl.
15033
15034 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15035
15036         * parse.y (fold_constant_for_init): Convert numerical constant
15037         values to the type of the assigned field.
15038
15039 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15040
15041         * expr.c (lookup_field): Relaxed the test on class loading error
15042         detection.
15043         * parse.y (fold_constant_for_init): Enabeled old code.
15044
15045 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15046
15047         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15048         decide the validity of the cast of a java.lang.Cloneable reference
15049         to an array.
15050         (patch_conditional_expr): Fixed first argument passed to
15051         binary_numeric_promotion.
15052
15053 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15054
15055         * parse.y (qualify_ambiguous_name): Take into account that a
15056         CONVERT_EXPR might specify a type as a WFL.
15057
15058 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15059
15060         * parse.y (patch_assignment): Save the rhs before using it as an
15061         argument to _Jv_CheckArrayStore.
15062
15063 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15064
15065         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15066
15067 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15068
15069         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15070         floating point literal only when the exponent indicator has been
15071         parsed.
15072
15073 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15074
15075         * parse.y (formal_parameter:): Construct argument tree list
15076         element even if a yet unsupported final parameter was encountered.
15077
15078 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15079
15080         * parse.y (finish_method_declaration): Issue errors for native or
15081         abstract methods declared with a method body, as well as for non
15082         native or non abstract methods with no method body.
15083
15084 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15085
15086         * class.c (build_utf8_ref): Initialize variable `field'.
15087
15088         * decl.c (init_decl_processing): Initialize variable `field'.
15089
15090         * expr.c (build_known_method_ref): Mark parameters `method_type',
15091         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15092         (process_jvm_instruction): Likewise for parameter `length'.
15093
15094         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15095         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15096         ATTRIBUTE_UNUSED.
15097
15098         * parse.y (maybe_generate_clinit): Remove unused variable
15099         `has_non_primitive_fields'.
15100         (find_in_imports_on_demand): Initialize variables `node_to_use'
15101         and `cl'.
15102         (patch_binop): Likewise for variable `prom_type'.
15103         (patch_unaryop): Likewise for variable `prom_type'.
15104
15105         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15106
15107         * xref.c (xref_table): Add missing initializer.
15108
15109 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15110
15111         * java-except.h (struct eh_range): Removed unused `next' member.
15112         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15113         after adding all exception handlers.  Sort exception ranges in
15114         order of start PC.
15115         (struct pc_index): New structure.
15116         (start_pc_cmp): New function.
15117         * except.c (add_handler): Return `void'.  Don't call link_handler;
15118         instead construct an ordinary linked list and do range
15119         coalescing.
15120         (check_nested_ranges): New function.
15121         (link_handler): Changed interface to allow merging of eh_ranges.
15122         Split overlapping ranges.  Return `void'.
15123
15124 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15125
15126         * parse.y (constructor_block_end:): New rule, tagged <node>.
15127         (constructor_body:): Use `constructor_block_end' instead of
15128         `block_end'.
15129
15130 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15131
15132         * parse.y (statement_nsi:): Pop `for' statement block.
15133         (java_complete_lhs): Labeled blocks containing no statement are
15134         marked as completing normally.
15135
15136 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15137
15138         * xref.c (xref_set_current_fp): New function, defined.
15139         * xref.h (xref_set_current_fp): New function, prototyped.
15140
15141 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15142
15143         * check-init.c (check_init): Take into account that
15144         LABELED_BLOCK_STMT can be empty.
15145
15146 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15147
15148         * parse.y (java_check_regular_methods): Warning check on not
15149         overriding methods with default access in other packages does not
15150         apply to `<clinit>'.
15151         (java_complete_lhs): If block body is an empty_stmt_node, replace
15152         it by NULL_TREE. This prevents gcc from generating an irrelevant
15153         warning.
15154
15155 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15156
15157         * check-init.c (check_init): Removed code accepting to see things
15158         falling through default:, when doing xrefs.
15159         * java-tree.h (do_not_fold): New global variable, declared.
15160         * parse.y (do_not_fold): New global variable, defined.
15161         (java_complete_expand_method): Set `do_not_fold' to the value of
15162         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15163         and reinstall them after them have been purged; do not check for
15164         initializations; do not issue missing return errors.
15165         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15166         when doing xrefs.
15167         (patch_binop): Skip the fold part when doing xrefs.
15168         (build_string_concatenation): Skip the concatenation part when
15169         doing xrefs.
15170         (patch_synchronized_statement): Do not generate a try-finally when
15171         doing xrefs.
15172         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15173         and keep the location where the throw was seen.
15174         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15175         any treatment on the converted node an simply return a NOP_EXPR of
15176         the targeted type.
15177         * xref.c (xref_get_data): New function, defined.
15178         * xref.h (xref_get_data): New function, declared.
15179         (XREF_GET_DATA): Use xref_get_data.
15180
15181 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15182
15183         * gjavah.c (print_include): Cast the result of `strlen' to int
15184         when comparing against a signed value.
15185         (add_namelet): Likewise.
15186
15187 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15188
15189         * expr.c (expand_invoke): Mark parameter `nargs' with
15190         ATTRIBUTE_UNUSED.
15191         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15192
15193         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15194         ATTRIBUTE_UNUSED.
15195
15196         * jcf-reader.c (get_attribute): Cast a value to long
15197         when comparing against a signed expression.  Likewise.
15198
15199         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15200         HOST_BITS_PER_CHAR.
15201
15202 1999-05-11  Andrew Haley  <aph@cygnus.com>
15203
15204         * parse.y (source_end_java_method): If the current method contains
15205         any exception handlers, force asynchronous_exceptions: this is
15206         necessary because signal handlers in libjava may throw exceptions.
15207         * decl.c (end_java_method): Ditto.
15208
15209 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15210
15211         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15212         flags.
15213         * jvspec.c (THREAD_NAME): Removed.
15214         (GC_NAME): Likewise.
15215         (MATHLIB): Likewise.
15216         (WITHLIBC): Likewise.
15217         (GCLIB): Likewise.
15218         (THREADLIB): Likewise.
15219         (MATH_LIBRARY): Likewise.
15220         (lang_specific_driver): Don't add `-l' options to command line.
15221         Instead, add a single --specs option.  Recognize `-L' options and
15222         use them to search for spec file.
15223         (find_spec_file): New function.
15224         (SPEC_FILE): New define.
15225
15226 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15227
15228         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15229         cpplib-enabled build.
15230
15231 1999-05-05  Per Bothner  <bothner@cygnus.com>
15232
15233         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15234         temporarily zero it while calling rest_of_decl_compilation.
15235
15236         * java-tree.h (string_ptr_type_node):  Add declaration.
15237         * decl.c:  Define and initialize string_ptr_type_node.
15238         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15239
15240         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15241         * parse.y (for_statement):  Now unconditionally exit_block.
15242         (finish_labeled_statement):  No longer exit_block if for-loop.
15243         (patch_loop_statement):  Check harder if the loop is already labeled.
15244
15245         * parse.y (patch_initialized_static_field):  Removed function.
15246         (maybe_generate_clinit):  Removed special handling for interfaces.
15247         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15248         on <clinit> to determine if it can be removed.
15249         (java_complete_expand_method):  Remove special handling for <clinit>.
15250         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15251         optimize if we get back empty_stmt_node.
15252         For MODIFY_EXPR, re-do checking of static initializers.
15253         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15254         For VAR_DECL, pass correct context.
15255
15256         * verify.c (verify_jvm_instructions):  Better error messages.
15257
15258 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15259
15260         * parse-scan.y (interface_declaration): Call
15261         report_class_declaration for interfaces.
15262
15263 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15264
15265         * Makefile.in: Remove -v from bison command lines.
15266
15267 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15268
15269         * check-init.c (check_init): Exclude a case of error when doing
15270         xrefs.
15271         * class.c (layout_class_method): Don't generate the error message
15272         twice when compiling from source.
15273         * lang-options.h: Added `-Wredundant-modifers' and
15274         `-Wunusupported-jdk11' flags and help text.
15275         * lang.c (lang_decode_option): Added support for
15276         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15277         flag_static_local_jdk11 and flag_redundant set accordingly.
15278         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15279         * parse.h (EXPR_WFL_ADD_COL): New macro.
15280         (DECL_END_SOURCE_LINE): Likewise.
15281         (DECL_INHERITED_SOURCE_LINE): Likewise.
15282         * parse.y (static_ref_err): New function, prototyped.
15283         (CCB_TK): Now tagged <operator>.
15284         (class_body:): Remember the location of the closing '}' of a class
15285         definition when doing xrefs.
15286         (block:): Likewise.
15287         (block_end:): Likewise.
15288         (create_class): Remember the location of the inherited class
15289         identifier when doing xrefs.
15290         (register_fields): Added test on first operand of `init' before
15291         testing it TREE_CODE.
15292         (method_header): Store the location of the class identifier in the
15293         class decl when doing xrefs.
15294         (finish_method_declaration): Don't combine first/last method line
15295         when doing xref.
15296         (java_check_regular_methods): Warning check on not overriding
15297         methods with default access on other packages move before check on
15298         static methods. Initialization of `aflags' also moved up.
15299         (resolve_expression_name): Call static_ref_err to report the error.
15300         (static_ref_err): New function, implemented.
15301         (resolve_field_access): Returned simplified static field access
15302         when doing xrefs.
15303         (resolve_qualified_expression_name): Check for illegal use of
15304         static fields in a non static context. Call static_ref_err to
15305         report error in various places.
15306         (java_complete_tree): Do not fold initialized static fields when
15307         doing xrefs.
15308         (java_complete_lhs): Likewise.
15309
15310 1999-04-29  Anthony Green  <green@cygnus.com>
15311
15312         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15313         create internal labels.
15314         (lookup_label): Ditto.
15315
15316 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15317
15318         * class.c (layout_class_method): Generate <clinit>'s rtl for
15319         interfaces.
15320         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15321         for interfaces' <clinit>.
15322         * expr.c (lookup_field): Search for fields in interfaces.
15323         (expand_invoke): Fixed indentation.
15324         (expand_java_field_op): Likewise. Use IS_CLINIT.
15325         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15326         (IS_CLINIT): New macro.
15327         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15328         interface was parsed.
15329         (maybe_generate_clinit): Don't generate if the current class is an
15330         interface with only fields of primitive types.
15331         (reset_method_name): Use IS_CLINIT.
15332         (java_complete_expand_method): Expand <clinit> when it exists for
15333         interfaces. Use IS_CLINIT.
15334         (resolve_expression_name): Use DECL_CONTEXT instead of
15335         current_class to build static field references.
15336         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15337         ARRAY_REF when doing xreferencing.
15338         (check_final_assignment): Fixed typo in leading comment. Use
15339         IS_CLINIT.
15340         (patch_array_ref): Don't fully expand array references when
15341         xreferencing.
15342         (patch_return): Use IS_CLINIT.
15343         (patch_throw_statement): Likewise.
15344
15345 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15346
15347         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15348
15349 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15350
15351         * decl.c (predef_filenames, predef_filenames_size): New globals
15352         (init_decl_processing): predef_filenames and predef_filenames_size
15353         initialized.
15354         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15355         extern.
15356         * jcf-parse.c (predefined_filename_p): New function.
15357         (yyparse): Check that files on the command line are specified only
15358         once and issue a warning otherwise.
15359         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15360         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15361         avoid a gcc warning with -W -Wall turned on.
15362         (java_expand_classes): Abort if errors were encountered.
15363         (java_complete_lhs): If the cross reference flag is set, wrap
15364         field DECL node around a WFL when resolving expression name.
15365
15366 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15367
15368         * lang.c (lang_decode_option): Fixed returned value when parsing
15369         `-fxref=...' and `-Wall'.
15370         * parse.y (source_end_java_method): Do not generate code when
15371         flag_emit_xref is set.
15372         (resolve_expression_name): Do not build static field access when
15373         flag_emit_xref is set.
15374         (resolve_field_access): No special treatment on `length' when
15375         flag_emit_xref is set. Do not build qualified static field access
15376         when flag_emit_xref is set.
15377         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15378         when flag_emit_xref is set.
15379         (patch_assignment): Do not generate array store runtime check when
15380         flag_emit_xref is set.
15381         * xref.c (xref_flag_value): Fixed function declaration
15382         indentation.
15383         (xset_set_data): New function.
15384         * xref.h (xref_set_data): Added prototype for new function.
15385         (typedef struct xref_flag_table): New field data.
15386         (XREF_GET_DATA): New macro.
15387
15388 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15389
15390         * xref.h (enum): Removed trailing comma.
15391
15392         * parse.y (resolve_qualified_expression_name): Added missing
15393         `break'.
15394
15395 1999-04-15  Anthony Green  <green@cygnus.com>
15396
15397         * gjavah.c: New prototypes for java_float_finite and
15398         java_double_finite.
15399
15400 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15401
15402         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15403         references.
15404
15405 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15406
15407         * Makefile.in (TREE_H): Add tree-check.h.
15408         (RTL_H): Add genrtl.h.
15409
15410 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15411
15412         * parse.y (patch_assignment): Added ArrayStoreException runtime
15413         check.
15414
15415 1999-04-06  Per Bothner  <bothner@cygnus.com>
15416
15417         * expr.c (pop_type_0):  New function.
15418         (pop_type):  Use pop_type_0.
15419         * java-tree.h (pop_type_0):  New declaration.
15420         * verify.c (verify_jvm_instructions):  Check return instructions.
15421
15422         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15423         class files.
15424
15425 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15426
15427         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15428
15429         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15430         (main_jcf): Don't define.
15431         (process_file): Don't set `main_jcf'.
15432
15433         * java-tree.h (main_jcf): Don't declare.
15434
15435         * jcf-parse.c (main_jcf): Add static definition.
15436
15437         * lang.c (main_jcf): Don't define.
15438
15439 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15440
15441         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15442
15443         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15444
15445         * jcf-depend.c: Include "config.h", not <config.h>.
15446
15447         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15448         `bcopy' to PTR.
15449
15450         * jcf-path.c: Include "config.h", not <config.h>.
15451
15452         * lex.c: Don't include various system header files.
15453         (java_init_lex): Cast the argument of `bzero' to PTR
15454
15455         * parse-scan.y (java_push_parser_context): Likewise.
15456
15457         * parse.y (java_push_parser_context): Likewise.
15458         (patch_bc_statement): Match format specifier to variable argument.
15459
15460         * xref.c: Don't include <stdio.h>.
15461
15462 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15463
15464         * parse.y (struct parser_ctxt *ctxp): Now global.
15465         (declare_local_variables): Use WFL compound value for the
15466         declaration source line value, when doing cross-referencing.
15467
15468 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15469
15470         * gjavah.c (print_field_info): Allow constants of other types.
15471         (print_include): Generate include when new name is proper prefix
15472         of already printed name.
15473         (add_namelet): Likewise.
15474         (cxx_keyword_subst): New function.
15475         (print_method_info): Use it.
15476         (print_field_name): New function.
15477         (get_field_name): New function.
15478         (print_field_info): Use get_field_name and print_field_name.
15479
15480 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15481
15482         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15483         'KR-C', so gperf uses the `const' keyword on strings.
15484
15485         * keyword.gperf (java_keyword): Const-ify a char*.
15486
15487 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15488
15489         * parse.y (patch_bc_statement): Fixed identation and a bogus
15490         `printf' format.
15491
15492 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15493
15494         * parse.y (patch_assignment): Allow static variables in other
15495         classes to be assigned.
15496
15497 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15498
15499         * class.c (maybe_add_interface): Remove unused variable
15500         `interface_binfo'.
15501         (make_class_data): Use = for assignment, not ==.  Likewise.
15502         (emit_register_classes): Remove unused variable `decl'.
15503
15504         * lex.c: Fix comment so as not to contain an embedded `/*'.
15505
15506         * verify.c (verify_jvm_instructions): Remove unused variable
15507         `self_type'.
15508
15509 1999-03-27  Per Bothner  <bothner@cygnus.com>
15510
15511         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15512         (complete_labeled_statement):  Rename to finish_labeled_statement.
15513         (complete_for_loop):  Rename to finish_for_loop.
15514         (complete_method_declaration):  Rename to finish_method_declaration.
15515
15516         * java-tree.h (continue_identifier_node):  New global node.
15517         * decl.c:  Define and initialize continue_identifier_node.
15518         * parse.y (generate_labeled_block):  Remove - no longer needed.
15519         (build_loop_body):  Use continue_identifier_node for continue block.
15520         (finish_labeled_statement):  Also do pop_labeled_block actions.
15521         (java_complete_lhs):  POP_LOOP even if error.
15522         (build_labeled_block):  Special handling for continue_identifier_node.
15523         (patch_loop_statement):  Re-organize.
15524         (patch_bc_statement):  Re-write.
15525
15526 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15527
15528         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15529         using a WFL compound value.
15530         * parse.y (xref.h): Include.
15531         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15532         WFL compound value.
15533         (register_fields): Set WFL compound value to lineno if doing
15534         xrefs.
15535         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15536         is set.
15537         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15538         * xref.h (expand_xref): Prototype renamed from xref_generate.
15539
15540 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15541
15542         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15543         (GET_CURRENT_BLOCK): New macro.
15544         * parse.y (current_static_block): New global variable.
15545         (method_body:): Define action.
15546         (complete_method_declaration): Set current_function_decl to NULL
15547         when work on the current method is done.
15548         (declare_local_variables): Use GET_CURRENT_BLOCK.
15549         (java_method_add_stmt): Likewise.
15550         (java_complete_expand_method): Disable the use of `this' when
15551         expanding <clinit>.
15552         (enter_a_block): If no current method exist, use
15553         current_static_block to link static initializer blocks.
15554         (exit_block): Rewritten to use current_static_block when no current
15555         method decl exists.
15556         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15557         (patch_return): Forbid the use of `return' in static initializers.
15558         (patch_throw_statement): Fixed indentation. Issue specific error
15559         for uncaught thrown checked exception in static initializer
15560         blocks. Removed FIXME.
15561
15562 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15563
15564         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15565         Link gcj from gcc.o.
15566
15567 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15568
15569         * parse.y (find_applicable_accessible_methods_list): When dealing
15570         with interface: ensure that a given interface or java.lang.Object
15571         are searched only once.
15572
15573 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15574
15575         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15576
15577         * jcf-dump.c (print_access_flags): Add braces around if-else.
15578
15579         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15580         COMBINE_INPUTS.
15581
15582         * lex.c (build_wfl_node): Add static prototype.
15583
15584         * lex.h (build_wfl_node): Remove static prototype.
15585
15586         * parse.y: Include lex.c early enough to declare everything needed.
15587         Ensure calls to `build_wfl_node' pass the proper arguments.
15588         (create_class): Remove unused variable `super_decl'.
15589         (get_printable_method_name): Initialize variable `name'.
15590
15591 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15592
15593         * Changelog: Fixed 1999-03-22 typos.
15594         * lang.c (lang_decode_option): Fixed typo in error string in the
15595         XARG section.
15596
15597 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15598
15599         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15600         (xref.o): New rule.
15601         * java-tree.h (flag_emit_xref): Declared extern.
15602         * lang.c (xref.h): Included.
15603         (flag_emit_xref): New global variable.
15604         (lang_decode_option): Added support for -fxref.
15605         * xref.c: Created.
15606         * xref.h: Likewise.
15607
15608 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15609
15610         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15611         linked with.
15612
15613 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15614
15615         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15616         $(srcdir)/../system.h and $(JAVA_TREE_H).
15617         (jcf-io.o): Depend on $(JAVA_TREE_H).
15618         (mangle.o): Likewise.
15619
15620         * check-init.c (check_cond_init): Add static prototype.
15621
15622         * class.c (build_java_method_type, hashUtf8String,
15623         make_field_value, get_dispatch_vector, get_dispatch_table,
15624         append_gpp_mangled_type, mangle_static_field): Likewise.
15625         (strLengthUtf8): Hide unused definition.
15626         (hashUtf8String): Const-ify.
15627         (make_field_value): Un-ANSI-fy.
15628
15629         * constants.c: Move inclusion of jcf.h above java-tree.h.
15630         (set_constant_entry, find_class_or_string_constant,
15631         find_name_and_type_constant, get_tag_node,
15632         build_constant_data_ref): Add static prototype.
15633
15634         * decl.c (push_jvm_slot, builtin_function,
15635         lookup_name_current_level): Likewise.
15636         (builtin_function): Const-ify.
15637
15638         * except.c (expand_start_java_handler, expand_end_java_handler):
15639         Add static prototype.
15640
15641         * expr.c (flush_quick_stack, push_value, pop_value,
15642         java_stack_swap, java_stack_dup, build_java_athrow,
15643         build_java_jsr, build_java_ret, expand_java_multianewarray,
15644         expand_java_arraystore, expand_java_arrayload,
15645         expand_java_array_length, build_java_monitor, expand_java_pushc,
15646         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15647         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15648         expand_compare, expand_test, expand_cond, expand_java_goto,
15649         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15650         expand_java_field_op, java_push_constant_from_pool): Likewise.
15651
15652         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15653         (build_java_arraynull_check): Mark parameters `node' and `type'
15654         with ATTRIBUTE_UNUSED.
15655         (note_label): Likewise for parameter `current_pc'.
15656         (expand_java_call, expand_java_ret): Hide unused definition.
15657
15658         * java-tree.h (make_class, build_constants_constructor,
15659         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15660         init_outgoing_cpool, register_class, emit_register_classes,
15661         java_layout_seen_class_methods): Prototype.
15662         (unicode_mangling_length): Const-ify.
15663         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15664         emit_unicode_mangled_name, format_int, format_uint,
15665         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15666         jcf_print_utf8_replace, open_class): Prototype.
15667
15668         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15669         <stdio.h>.  Include tree.h/java-tree.h.
15670         (utf8_equal_string usage, process_class): Add static prototype.
15671         (open_class): Don't prototype this here.
15672         (utf8_equal_string): Match arguments to format specifiers.
15673         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15674         TABLE_SWITCH, disassemble_method): Likewise.
15675
15676         * jcf-io.c: Include tree.h/java-tree.h.
15677         (open_class, find_classfile, jcf_print_utf8,
15678         jcf_print_utf8_replace): Const-ify.
15679
15680         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
15681         parse_class_file): Add static prototype.
15682         (find_in_current_zip): Match definition to existing static
15683         prototype.
15684
15685         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
15686         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
15687         finish_jcf_block, define_jcf_label, get_jcf_label_here,
15688         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
15689         write_chunks, adjust_typed_op, generate_bytecode_conditional,
15690         generate_bytecode_return, perform_relocations, init_jcf_state,
15691         init_jcf_method, release_jcf_state, generate_classfile):
15692         Add static prototype.
15693         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
15694         (make_class_file_name): Const-ify.
15695
15696         * jcf.h (find_classfile): Const-ify.
15697
15698         * jv-scan.c (reset_report): Remove prototype.
15699
15700         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
15701         (error): Rewrite to allow varargs.
15702
15703         * lang.c (lang_f_options): Const-ify.
15704
15705         * lex.c (java_parse_escape_sequence): Add static prototype.
15706         (java_allocate_new_line): Match definition to existing static
15707         prototype.
15708
15709         * mangle.c Include tree.h/java-tree.h.
15710         (unicode_mangling_length, emit_unicode_mangled_name,
15711         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
15712
15713         * parse.h (jdep_code): Remove trailing comma in enumeration.
15714         (java_get_line_col): Move prototype outside of !JC1_LITE test.
15715         (reset_report): Add prototype.
15716
15717         * verify.c (push_pending_label, merge_types): Add static
15718         prototypes.
15719
15720         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
15721
15722 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15723
15724         * parse.y (find_applicable_accessible_methods_list): Extend the
15725         search to superinterfaces when relevant.
15726         (search_applicable_methods_list): New function.
15727
15728 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15729
15730         * class.c (unmangle_classname): Implemented stricter testing
15731         before setting the QUALIFIED_P flag on an identifier.
15732
15733 1999-03-16  Per Bothner  <bothner@cygnus.com>
15734
15735         * parse.y (java_complete_lhs):  Call force_evaluation_order
15736         after patch_newarray.
15737         (patch_binop):  Don't call fold if there are side effects.
15738
15739 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15740
15741         * parse.y (java_stabilize_reference): Use save_expr instead of
15742         building a SAVE_EXPR node.
15743         (java_complete_lhs): Patch the resulting string of the `+='
15744         operator (if necessary) and complete the RHS after having built
15745         the cast.
15746
15747 1999-03-15  Per Bothner  <bothner@cygnus.com>
15748
15749         * class.c (make_class):  Don't set CLASS_P here (because
15750         this function is also called by build_java_array_type).
15751         (push_class):  Set CLASS_P here instead.
15752         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
15753
15754         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
15755         context.  If the context is class, perfer "super" over "synchronized".
15756         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
15757
15758         * parse.y (create_class):  Don't call parser_check_super here;
15759         it is not robust.  Always wait until later.
15760
15761         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
15762         match what JDK 1.2 does), but don't set ACC_PUBLIC.
15763
15764 1999-03-13  Per Bothner  <bothner@cygnus.com>
15765
15766         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
15767         * lex.h (UNGETC):  Change misleading macro.
15768
15769 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15770
15771         * parse.y (java_stabilize_reference): Return NODE when patching a
15772         COMPOUND_EXPR.
15773         (java_complete_lhs): Put parenthesis around truth values.
15774
15775 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15776
15777         * class.c (layout_class_method): Don't make rtl for interface
15778         methods.
15779         * parse.h (GET_TYPE_NAME): New macro.
15780         * parse.y (if_then_statement:): Fixed indentation.
15781         (if_then_else_statement:): Likewise.
15782         (for_statement:): Fixed spacing.
15783         (try_statement:): Fixed indentation.
15784         (create_interface): Don't force interfaces to be abstract.
15785         (method_header): Abstract methods are OK in interfaces.
15786         (declare_local_variables): Fixed typo in comment.
15787         (java_complete_expand_method): Fixed indentation.
15788         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
15789         non accessible fields.
15790         (java_stabilize_reference): New function.
15791         (java_complete_lhs): Fixed indentation. Use
15792         java_stabilize_reference in compound assignment. Insert the
15793         cast. If not processing `+' fix string constants before processing
15794         binop.
15795
15796 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15797
15798         * constants.c (find_class_or_string_constant): Cast variable `j'
15799         to a `jword' when comparing against one.
15800
15801         * expr.c (java_lang_expand_expr): Remove unused variables
15802         `has_finally_p' and `op0'.
15803
15804         * gjavah.c (print_field_info): Cast a value to jint when comparing
15805         against one.  Likewise for a jlong.
15806         (add_namelet): Likewise cast a `sizeof' to an int when comparing
15807         against a signed quantity.
15808
15809         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
15810         (print_signature): Don't needlessly dereference variable `str'
15811
15812         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
15813         `max_locals' with ATTRIBUTE_UNUSED.
15814         (jcf_parse_class): Likewise for variable `index'.
15815
15816         * parse.h (reverse_jdep_list): Remove static prototype.
15817
15818         * parse.y (build_jump_to_finally): Remove prototype and definition.
15819         (reverse_jdep_list): Add static prototype.
15820
15821         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
15822         `assignment' and `expr_decl'.
15823
15824         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
15825
15826 1999-03-12  Andrew Haley  <aph@cygnus.com>
15827
15828         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
15829         we'll need a directory separator and a null character.
15830
15831 1999-03-10  Per Bothner  <bothner@cygnus.com>
15832
15833         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
15834
15835 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15836
15837         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
15838         interfaces.
15839
15840 1999-03-05  Per Bothner  <bothner@cygnus.com>
15841
15842         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
15843
15844         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
15845
15846         * class.c (layout_class_method):  A static method in a base class
15847         is never overridden, so treat it like it doesn't exist.
15848         However, do complain about private non-static method overriding
15849         public static method.
15850
15851         * parse.y:  Don't set unused INITIALIZED_P flag.
15852         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
15853
15854         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
15855         (build_array_from_name):  Re-order &index[string] to &string[index].
15856
15857         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
15858         error_mark (it might catch more errors, but it is more likely to lose).
15859
15860 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15861
15862         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
15863         (parse-scan.o): Depend on toplev.h.
15864
15865         * class.c (make_method_value): Add prototype.  Make it static.
15866         Remove unused second argument, caller changed.
15867
15868         * expr.c (java_lang_expand_expr): Remove unused variable
15869         `return_label'.
15870
15871         * java-tree.h: Don't prototype find_in_current_zip.
15872         Add prototypes for verify_constant_pool, start_java_method,
15873         end_java_method, give_name_to_locals, expand_byte_code,
15874         open_in_zip, set_constant_value, find_constant1, find_constant2,
15875         find_utf8_constant, find_string_constant, find_class_constant,
15876         find_fieldref_index, find_methodref_index, write_constant_pool,
15877         count_constant_pool_bytes and encode_newarray_type.
15878
15879         * jcf-dump.c: Remove unused variable `LONG_temp'.
15880
15881         * jcf-parse.c: Include parse.h.
15882         (jcf_parse_source): Remove unused parameter, all callers changed.
15883         (jcf_figure_file_type): Add static prototype.
15884         (find_in_current_zip): Likewise.  Also remove unused parameter,
15885         all callers changed.
15886         (read_class): Initialize variable `saved_pos'.
15887
15888         * jcf-reader.c (jcf_parse_preamble): Mark variables
15889         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
15890
15891         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
15892         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
15893         (java_parse_doc_section): Initialize variable `seen_star'.
15894         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
15895         (java_lex_error): Mark parameters `msg' and `forward' with
15896         ATTRIBUTE_UNUSED.
15897         (java_get_line_col): Mark parameters `filename' and `line' with
15898         ATTRIBUTE_UNUSED.
15899
15900         * parse-scan.y: Include toplev.h.
15901         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
15902
15903         * parse.h: use `struct JCF', not plain `JCF'.
15904         (java_parser_context_save_global, java_expand_classes
15905         java_parser_context_restore_global, java_parse): Add prototypes.
15906
15907         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
15908         `node'.
15909
15910 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
15911
15912         *  check-init.c (check_init):  COPYN takes word count, not bit count.
15913
15914 1999-02-26  Per Bothner  <bothner@cygnus.com>
15915
15916         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
15917         explicit build_decl.  (Avoids crash in reload when optimizing.)
15918
15919 1999-02-25  Per Bothner  <bothner@cygnus.com>
15920
15921         * decl.c (complete_start_java_method):  Handle synchronized method
15922         even when compiling from bytecode.
15923
15924 1999-02-26  Tom Tromey  <tromey@cygnus.com>
15925
15926         * gjavah.c (add_class_decl): Only generate `#include' if outer
15927         class is not the name of the class we are processing.  Correctly
15928         append `.h' in #include.
15929         (process_file): Clean up newlines around generated `#include's.
15930         (decode_signature_piece): Correctly handle inner classes.
15931         (struct include): New structure.
15932         (all_includes): New global.
15933         (print_include): New function.
15934         (add_class_decl): Use it.
15935         (process_file): Likewise.
15936         (add_class_decl): Generate include for java-array.h if array
15937         seen.
15938         (process_file): Don't generate java-array.h include.
15939
15940         * gjavah.c (add_namelet): Check for standard package names here.
15941         (add_class_decl): Don't check for standard package names here.
15942
15943 1999-02-25  Tom Tromey  <tromey@cygnus.com>
15944
15945         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
15946         When reading a zip file, only use strncmp if both strings are
15947         bigger than the buffer length.  Initialize `k' when looping
15948         through zip file.
15949
15950 1999-02-24  Tom Tromey  <tromey@cygnus.com>
15951
15952         * gjavah.c (struct namelet): New structure.
15953         (add_namelet): New function.
15954         (print_namelet): New function.
15955         (print_class_decls): Use add_namelet and print_namelet to generate
15956         namespaces and not classes.
15957         (method_printed): New global.
15958         (HANDLE_END_METHOD): Examine method_printed.
15959         (print_method_info): Set method_printed when required.  Print
15960         error if function to be ignored is marked virtual.  Handle $finit$
15961         method.
15962         (METHOD_IS_FINAL): New macro.
15963         (print_field_info): Use it.
15964         (HANDLE_METHOD): Clear method_printed.
15965         (method_pass): New global.
15966         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
15967         (process_file): Do two passes over both fields and methods.
15968         (HANDLE_METHOD): Examine method_pass.
15969         (root): New global.
15970         (add_class_decl): New function.
15971         (print_class_decls): Don't scan over entire constant pool.
15972
15973 1999-02-23  Tom Tromey  <tromey@cygnus.com>
15974
15975         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
15976         disable linking in that case.
15977
15978 1999-02-20  Tom Tromey  <tromey@cygnus.com>
15979
15980         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
15981         not 0x1f.
15982
15983 1999-02-21  Per Bothner  <bothner@cygnus.com>
15984
15985         * decl.c (build_result_decl), java-tree.h:  New method.
15986         (complete_start_java_method):  Handle synchronized methods.
15987         Don't build DECL_RESULT here.  (Ordering dependency problem.)
15988         (start_java_method):  Call build_result_decl here instead  ...
15989         * parse.y (java_complete_expand_method):  ... and here.
15990         (expand_start_java_method): Don't call complete_start_java_method here.
15991         (java_complete_expand_method):  Call it here instead.
15992         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
15993         * java-tree.h:  ... here.
15994
15995         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
15996         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
15997         for ARRAY_REF - it doesn't work when array bounds are checked.
15998         (patch_array_ref):  Handle it here instead.
15999
16000         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16001
16002 1999-02-19  Per Bothner  <bothner@cygnus.com>
16003
16004         Force left-to-right evaluation of binary operations etc.
16005         * expr.c (force_evaluation_order), java-tree.h:  New function.
16006         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16007         calls, and ARRAY_REFs to force_evaluation_order.
16008         (various):  Set TREE_SIDE_EFFECTS more carefully.
16009
16010         Tolerate random (non-UTF8) encoding in comments without complaining.
16011         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16012         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16013
16014         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16015         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16016
16017         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16018         COMPOUND_EXPR.  Don't complain about empty statement after return.
16019
16020 1999-02-19  Per Bothner  <bothner@cygnus.com>
16021
16022         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16023         in TREE_LIST - just chain the POINTER_TYPEs together.
16024         (resolve_class):  If type already resolved, return decl.
16025         After resolving, update TREE_TYPE(class_type), and name (if array).
16026         * parse.h (do_resolve_class), parse.y:  Make non-static.
16027         * class.c (maybe_layout_super_class):  Take this_class argument.
16028         Do do_resolve_class if necessary.
16029         (layout_class, layout_class_methods): Adjust calls appropriately.
16030         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16031         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16032         * typeck.c (build_java_array_type):  Don't call layout_class.
16033
16034 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16035
16036         * parse.y (check_pkg_class_access): Allow private class access
16037         within the same package.
16038         (strip_out_static_field_access_decl): New function.
16039         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16040         operator argument before testing its nature.
16041
16042 1999-02-03  Per Bothner  <bothner@cygnus.com>
16043
16044         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16045         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16046         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16047         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16048         * expr.c (java_lang_expand_expr):  Likewise.
16049         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16050         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16051         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16052         (build_try_statement):  Remove finally parameter and handling.
16053         (build_try_finally_statement):  New function.
16054         (patch_try_statement):   No longer need to support finally clause.
16055         (try_statement):  Update grammar action rules.
16056         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16057         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16058
16059 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16060
16061         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16062         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16063
16064 1999-02-17  Andrew Haley  <aph@cygnus.com>
16065
16066         * class.c (build_utf8_ref): Back out broken patch which was
16067         intended to to output signatures using '.' as a separator.
16068
16069         * class.c (make_class_data): Output signatures using '.' as a
16070         separator, rather than '/'.
16071         (mangled_classname): Likewise.
16072         (make_field_value): Likewise.
16073         (make_method_value): Likewise.
16074         * constants.c (alloc_class_constant): Likewise.
16075         * expr.c (build_invokeinterface): Likewise.
16076
16077 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16078
16079         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16080         of an ancient workaround.
16081
16082 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16083
16084         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16085         here anymore.
16086
16087 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16088
16089         * lex.c (yylex): Encode \0 as UTF8.
16090
16091 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16092
16093         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16094         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16095         (libgcj_zip): Renamed.
16096         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16097         LIBJAVA_ZIP_FILE.
16098         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16099
16100         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16101         (GC_NAME): Renamed -lgc to -lgcjgc.
16102
16103 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16104
16105         * lex.c (java_lang_cloneable): Initialize.
16106         * parse.y (java_lang_cloneable): New static variable.
16107         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16108         doing one more qualification round.
16109         (valid_ref_assignconv_cast_p): Reject null source or
16110         destination. Allow an array to be cast into java.lang.Cloneable.
16111         (patch_cast): Swapped two first arguments to first call to
16112         valid_ref_assignconv_cast_p.
16113
16114 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16115
16116         * parse.h: DECL_P renamed JDECL_P.
16117         * parse.y: DECL_P replaced by JDECL_P.
16118         (build_array_from_name): Always use pointer's type.
16119         (patch_bc_statement): Extra code to search continue target in a
16120         for loop. Fixed comments. Continue target is current loop when
16121         unlabeled.
16122
16123 1999-02-05  Andrew Haley  <aph@cygnus.com>
16124
16125         * class.c (make_class_data): The superclass of an interface should
16126         be null, not class Object.
16127
16128         * lex.c (java_lex): Sign extend hex literals.
16129
16130 1999-02-04  Andrew Haley  <aph@cygnus.com>
16131
16132         * class.c (build_utf8_ref): Output signatures using '.' as a
16133         separator, rather than '/'.
16134         (make_class_data): Likewise.
16135
16136 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16137
16138         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16139         mkstemp.o.  Get them from libiberty now.
16140
16141 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16142
16143         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16144
16145 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16146
16147         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16148         from libiberty.h
16149
16150 1999-02-02  Per Bothner  <bothner@cygnus.com>
16151
16152         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16153         * jcf-write.c (generate_bytecode_return):  New function.
16154         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16155
16156         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16157         generate special [fd]const_[01] instructions.
16158
16159         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16160
16161         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16162         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16163
16164 1999-02-01  Per Bothner  <bothner@cygnus.com>
16165
16166         * parse.y (patch_method_invocation):  Handle calling static methods,
16167         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16168
16169         * parse.y (java_complete_lhs):  Don't complain about unreachable
16170         exit condition in a do-while statement.
16171
16172 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16173
16174         * lex.c (java_read_char): Fixed utf8 decoding.
16175         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16176         range.
16177         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16178         comments. Local variable `all_primitive' is gone. Broadened
16179         acceptance of `0' to floating point targets. `long' can now be
16180         widened to `double' or `float'.
16181         (valid_method_invocation_conversion_p): Added leading
16182         comment. Fixed tabulation.
16183         (build_string_concatenation): Optimize out left or right empty
16184         string constants.
16185
16186 1999-01-28  Per Bothner  <bothner@cygnus.com>
16187
16188         * jcf-write.c (localvar_alloc):  Only emit entry for
16189         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16190         (generate_bytecode_insns):  Only call put_linenumber if
16191         debug_info_level > DINFO_LEVEL_NONE.
16192         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16193         is specified, add -g1 (for compatibility wih javac).
16194
16195 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16196
16197         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16198         gjavah.o, check-init.o, jv-scan.o
16199
16200 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16201
16202         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16203
16204         * gjavah.c: Include config.h and system.h.
16205
16206         * javaop.h (inline): Don't define, its handled by system.h.
16207         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16208         from `inline' to `static inline'.
16209
16210         * jcf.h (inline): Don't define, its handled by system.h.
16211
16212         * lex.c (inline): Likewise.
16213
16214 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16215
16216         * lang-specs.h: Map -Qn to -fno-ident.
16217
16218 1999-01-29  Richard Henderson  <rth@cygnus.com>
16219
16220         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16221
16222 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16223
16224         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16225         then cast it to Object before calling `append' method.
16226
16227 1999-01-28  Per Bothner  <bothner@cygnus.com>
16228
16229         * check-init.c (check_bool2_init, check_bool_init, check_init):
16230         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16231         * jcf-write.c (generate_bytecode_insns):  Likewise.
16232
16233 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16234
16235         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16236         * parse.y (patch_cast): Allow a boolean to be cast into a
16237         boolean.
16238
16239 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16240
16241         * parse.y: (class_declaration:): Fixed indentation.
16242         (class_member_declaration:): Extra `;' after field declaration now
16243         accepted.
16244         (interface_declaration:): Removed debug messages in error reports.
16245         (patch_binop): Nodes created and returned inherit the orignal
16246         node's COMPOUND_ASSIGN_P flag value.
16247         (patch_cast): Fix cast from char to floating point.
16248
16249 1999-01-25  Andrew Haley  <aph@cygnus.com>
16250
16251         * except.c, java-except.h (expand_resume_after_catch): new
16252         function.
16253         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16254         to branch back to main flow of control after a catch block.
16255
16256 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16257
16258         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16259         $(srcdir)/../system.h.
16260         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16261         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16262         (jcf-write.o): Likewise.
16263         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16264         (mangle.o): Depend on $(srcdir)/../toplev.h.
16265         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16266         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16267
16268         * class.c: Include output.h and parse.h.
16269         (mangled_classname): Add the `const' keyword to a char*.
16270         (find_named_method): Hide unused function definition.
16271         (build_utf8_ref): Change type of variable `c' to unsigned char.
16272         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16273         (build_class_ref): Add the `const' keyword to a char*.
16274         (layout_class_method): Remove unused variable `buf'.
16275
16276         * decl.c (find_local_variable): Remove unused variable `rtl'.
16277         (pushdecl): Likewise for variables `different_binding_level' and
16278         `oldglobal'.
16279         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16280         (maybe_build_cleanup): Likewise for parameter `decl'.
16281
16282         * except.c (expand_start_java_handler): Mark parameter `range'
16283         with ATTRIBUTE_UNUSED.
16284
16285         * expr.c: Include except.h.
16286         (pop_type): Remove unused variable `i'.
16287         (pop_value): Likewise for variables `n_words' and `i'.
16288         (expand_java_arrayload): Likewise for variable `convert'.
16289         (java_lang_expand_expr): Likewise for variables `op0', `type',
16290         `mode', `unsignedp', `node' and `elements'.
16291         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16292         `eh_ranges'.
16293         (process_jvm_instruction): Add a `const' qualifier to a char*.
16294
16295         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16296         (temp_directory): Likewise.
16297         (print_c_decl): Likewise.
16298         (print_method_info): Likewise.
16299         (decode_signature_piece): Likewise.
16300         (print_mangled_classname): Likewise.
16301
16302         * java-except.h: Provide prototypes for maybe_start_try,
16303         maybe_end_try and add_handler.
16304
16305         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16306         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16307         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16308         init_expr_processing, push_super_field, init_class_processing,
16309         can_widen_reference_to, class_depth, verify_jvm_instructions,
16310         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16311         set_local_type, merge_type_state, push_type, load_type_state,
16312         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16313         emit_unicode_mangled_name): Add prototypes.
16314
16315         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16316         (print_signature_type): Use ISDIGIT, not isdigit.
16317         (print_signature): Remove unused variable `j'.
16318
16319         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16320         int when comparing against one.
16321
16322         * jcf-parse.c: Include toplev.h.
16323
16324         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16325         (localvar_free): Remove unused variable `i'.
16326         (generate_bytecode_conditional): Likewise for variable `kind'.
16327
16328         * jv-scan.c: Include config.h and system.h.  Remove redundant
16329         OS header and gansidecl.h includes.
16330         (warning): Add the `const' keyword to a char*.  Also add
16331         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16332         __STDC__, when determining whether to use ANSI-isms.
16333         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16334         (xmalloc): Don't redundantly prototype here.
16335         (main): Remove unused parameter `envp'.  Also fix the arguments
16336         passed to function `fatal' to match the format specifier.
16337
16338         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16339
16340         * mangle.c: Include toplev.h.
16341         (emit_unicode_mangled_name): Declare parameter `len'.
16342
16343         * parse.y (parse_warning_context): Add the `const' keyword to a
16344         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16345         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16346         (issue_warning_error_from_context): Add the `const' keyword to
16347         a char*.
16348         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16349         not `__STDC__' for whether to use ANSI-isms.
16350
16351         * typeck.c (incomplete_type_error): Mark parameters `value' and
16352         `type' with ATTRIBUTE_UNUSED.
16353         (parse_signature_type): Use ISDIGIT, not isdigit.
16354
16355         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16356         (verify_jvm_instructions): Likewise.  Remove unused variables
16357         `field_name' and `default_val'.
16358
16359         * zextract.c: Include config.h and system.h.  Remove redundant
16360         OS header includes.
16361
16362         * zipfile.h: Prototype `read_zip_archive'.
16363
16364 1999-01-21  Andrew Haley  <aph@cygnus.com>
16365
16366         * typeck.c (convert): Allow conversions to void type: some
16367         optimizations in gcc do this.
16368
16369 1999-01-21  Andrew Haley  <aph@cygnus.com>
16370
16371         * typeck.c (convert_ieee_real_to_integer): New function.
16372         (convert): When not using fast-math and using hardware fp, convert
16373         an IEEE NaN to zero.
16374
16375 1999-01-18  Andrew Haley  <aph@cygnus.com>
16376
16377         * parse.y (patch_binop): Do a type conversion from signed to
16378         unsigned and then back to signed when a ">>>" is found.
16379
16380 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16381
16382         * java-tree.h: (check_for_initialization): Added prototype.
16383         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16384         * parse.y (do_resolve_class): Removed unused locals.
16385         (read_import_dir): Likewise.
16386         (resolve_qualified_expression_name): Array creation
16387         expressions are valid primary expressions.
16388         (qualify_ambiguous_name): Likewise.
16389         (patch_synchronized_statement): Removed unused local.
16390
16391 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16392
16393         * Makefile.in (zextract.o): Add dependencies.
16394
16395         * Makefile.in: Do not put ^Ls at the start of a line.
16396
16397 1999-01-15  Per Bothner  <bothner@cygnus.com>
16398
16399         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16400         sub-type the result of the call that gets the exception value.
16401
16402         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16403         don't call finish_class.
16404
16405         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16406         clear found before continuing.
16407
16408         * verify.c (verify_jvm_instructions):  On an array load, allow
16409         and handle top of stack to be TYPE_NULL.
16410
16411         * gjavah.c (generate_access):  Translate Java package private or
16412         protected access to C++ public, but with a comment.
16413
16414 1999-01-13  Andrew Haley  <aph@cygnus.com>
16415
16416         * expr.c (generate_name): Name prefix changed to avoid clashes
16417         with assembler temp labels.
16418
16419         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16420         MODIFY_EXPR.  Without this, code for the assignment may not be
16421         generated at all and the synchronized statement will read an
16422         uninitialized variable.
16423
16424 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16425
16426         * class.c (maybe_layout_super_class): Fixed returned value.
16427         * lex.c: Added 1999 to the copyright.
16428         (java_init_lex): Initialize java_lang_imported.
16429         * lex.h: Added 1999 to the copyright.
16430         * parse.h: Added 1999 to the copyright.
16431         (REGISTER_IMPORT): Fixed typo in trailing macro.
16432         (CURRENT_OSB): New macro.
16433         (struct parser_ctxt): New fields osb_depth, osb_limit.
16434         * parse.y (java_lang_id): New global variable.
16435         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16436         (array_creation_expression:): Use CURRENT_OSB.
16437         (dims:): Uses a stack to keep track of array dimensions.
16438         (cast_expression:): Use CURRENT_OSB.
16439         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16440         conditions.
16441         (register_fields): Fixed typos in comment.
16442         (check_method_redefinition): Fixed comment indentation.
16443         (java_check_regular_methods): Set saved found wfl to NULL after
16444         having reinstalled it in the previously found DECL_NAME.
16445
16446 1999-01-10  Richard Henderson  <rth@cygnus.com>
16447
16448         * gjavah.c (java_float_finite): Use a union to do type punning.
16449         (java_double_finite): Likewise.
16450
16451 1999-01-09  Per Bothner  <bothner@cygnus.com>
16452
16453         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16454         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16455         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16456         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16457         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16458         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16459
16460 1999-01-08  Per Bothner  <bothner@cygnus.com>
16461
16462         * check-init.c (check_init):  If compiling to native, we don't
16463         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16464
16465 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16466
16467         * parse-scan.y (variable_declarator_id): Set or increment
16468         bracket_count.
16469         (bracket_count): New global.
16470         (formal_parameter): Handle case where bracket pairs trail variable
16471         declarator id.
16472
16473 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16474
16475         * jcf-parse.c (yyparse): variable len changed from a char to an
16476         int to prevent overflow.
16477
16478 1999-01-06  Per Bothner  <bothner@cygnus.com>
16479
16480         * java-tree.h:  Declare read_class.
16481         * jcf-parse.c (read_class):  New function.
16482         (load_class):  Now just call read_class.
16483
16484         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16485         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16486         which is needed by java_parse_abort_on_error macro,
16487         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16488
16489         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16490         constructor, if initializing a static field.
16491         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16492         * expr.c (java_lang_expand_expr):  For a static array constructor
16493         of primitive elements, allocate the array itself statically.
16494         Disabled until we can set the vtable field statically.
16495
16496         * check-init.c:  New file.  Checks for definite assignment.
16497         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16498         * parse.y (java_complete_expand_method): Call check_for_initialization.
16499         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16500
16501 1999-01-06  Graham <grahams@rcp.co.uk>
16502
16503         * parse.y : include system.h instead of including
16504         standard headers directly with the exception of <dirent.h>.
16505
16506 1999-01-06  Per Bothner  <bothner@cygnus.com>
16507
16508         * lex.h:  Moved static function declarations to lex.c,
16509         to shut up some -Wall warnings.
16510         * lex.c:  Static function declarations moved here.
16511         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16512
16513 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16514
16515         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16516
16517 1998-12-22  Per Bothner  <bothner@cygnus.com>
16518
16519         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16520         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16521
16522         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16523         (localvar_alloc):  Change return type to void,
16524         (emit_unop):  Remove unused variable size.
16525
16526         * jcf-write.c (struct jcf_block):  Add new union.
16527         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16528         (call_cleanups):  New functions.
16529         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16530         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16531         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16532         * lang.c (lang_init):  Call using_eh_for_cleanups.
16533         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16534         completing operands to patch_synchronized_statement.
16535         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16536         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16537         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16538
16539 1998-12-20  John F. Carr  <jfc@mit.edu>
16540
16541         * Make-lang.in: Comment out control-Ls; they upset some makes.
16542
16543 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16544
16545         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16546         consistently.
16547
16548 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16549
16550         * parse.y (DIR_SEPARATOR): New define.
16551         (check_class_interface_creation): Use it.
16552
16553         * parse-scan.y (report_main_declaration): Recognize
16554         `java.lang.String' in argument to main.
16555
16556 1998-12-16  Per Bothner  <bothner@cygnus.com>
16557
16558         * parse.y (create_interface):  Remove bogus test.
16559
16560 1998-12-16  Per Bothner  <bothner@cygnus.com>
16561
16562         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16563         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16564
16565 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16566
16567         * parse-scan.y (qualified_name): Use correct sprintf format.
16568
16569 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16570
16571         * gjavah.c (print_field_info): Changed how most negative number is
16572         printed.
16573
16574 1998-12-14  Per Bothner  <bothner@cygnus.com>
16575
16576         * parse.y (fold_constant_for_init):  New function.
16577         (resolve_expression_name):  Don't replace static final
16578         constant-initialized fields by its value.
16579         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16580         not replace static final constant-initialized fields by their values.
16581         (register_fields):  If there is an initializer, set DECL_INITIAL and
16582         MODIFY_EXPR_FROM_INITIALIZATION_P.
16583         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16584         Only call patch_initialized_static_field if
16585         MODIFY_EXPR_FROM_INITIALIZATION_P.
16586         (patch_initialized_static_field):  If not valid constant, clear
16587         DECL_INITIAL.
16588
16589         * parse.y (lookup_field_wrapper):  Fix thinko.
16590
16591         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16592         set and restore global lineno.
16593
16594 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16595
16596         * gjavah.c (print_field_info): If value to print is the smallest
16597         value of its size, then print as hex to avoid later warnings from
16598         C++ compiler.
16599
16600 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16601
16602         * gjavah.c (decompile_method): Decompile `return null'.
16603         (process_file): Generate `#pragma interface'.
16604         (method_declared): New global.
16605         (print_method_info): Set it.
16606         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16607         (print_method_info): Handle abstract methods.
16608
16609 1998-12-13  Per Bothner  <bothner@cygnus.com>
16610
16611         * parse.y (patch_method_invocation):  If class_decl is null
16612         (e.g. an array type), use original type.
16613
16614         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16615         errors about uncaught exception from clone (of array, specifically).
16616
16617 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16618
16619         * gjavah.c (decompile_method): Handle all types of `return'
16620         opcode.  Decompile `return this' and `return'.
16621         (method_access): New global.
16622         (print_method_info): Set it.
16623         (decompile_method): Don't decompile a synchronized method.
16624
16625 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16626
16627         * jcf-reader.c (jcf_parse_one_method): Recognize
16628         HANDLE_END_METHOD.
16629         * gjavah.c (HANDLE_END_METHOD): New macro.
16630         (HANDLE_CODE_ATTRIBUTE): New macro.
16631         (decompile_method): New function.
16632         (print_method_info): Don't print `;\n' at end of function decl.
16633         Include java-opcodes.h.
16634         (decompiled): New global.
16635
16636 1998-12-12  Per Bothner  <bothner@cygnus.com>
16637
16638         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16639         flag_emit_class_files.
16640         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16641         if flag_emit_class_files.
16642         * parse.y (java_complete_tree):  Pre-liminary support for
16643         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16644
16645         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16646         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16647
16648         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16649
16650         * zipfile.h (opendir_in_zip):  New declaration.
16651         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16652         (opendir_in_zip):  New function, using code from open_in_zip.
16653         (open_in_zip):  Call opendir_in_zip.
16654         (find_class):  Remove no-longer-used do_class_file parameter,
16655         but add source_ok parameter.  Change logic so if we find a .java file,
16656         we don't look for .class in later classpath emtries.
16657         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16658         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16659         * gjavah.c: Update call to find_class.
16660         * jcf-dump.c:  Likewise.
16661
16662         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16663         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16664         nothing if body is empty_stmt_node.
16665         Various little fixes so SP gets correctly adjusted.
16666         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16667         For CALL_EXPR, test if static first.
16668         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16669         such as the ones we create for Object and Class.
16670         Set and restore current_function_decl.
16671         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16672         (note_possible_classname):  New function.
16673         (read_import_entry):  Removed.  Merged with read_import_dir.
16674         (read_import_dir):  Don't call find_class - that only gives us
16675         the first classpath entry having the needed package.
16676         Use the struct buffer data structure from buffer.h.
16677         (read_import_dir, find_in_imports_on_demand):  The remembered
16678         class names now use '.' (not '/') as package separator.
16679
16680         * parse.y (java_complete_expand_methods):  Call write_classfile
16681         here, and not in java_expand_classes (which only gets first class).
16682
16683 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16684
16685         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
16686         (register_fields):  If a static fields has an initializer, just
16687         chain it on ctxp->static_initialized, and handle later.
16688         (java_complete_expand_methods):  Force <clinit> first.
16689         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
16690         - it's already been completed.
16691         (patch_initialized_static_field):  New function.
16692         (java_complete_field):  Call it.
16693
16694 1998-12-12  Per Bothner  <bothner@cygnus.com>
16695
16696         * expr.c (encode_newarray_type, build_new_array):  New functions.
16697         * java-tree.h:  Declare build_new_array.
16698         * jcf-write.c (patch_newarray):  Use build_new_array.
16699
16700         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
16701         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
16702
16703         * parse.y (patch_new_array_init):  Re-organize.
16704         Now is passed the actual array (pointer) type of the value.
16705         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
16706         (patch_array_constructor):  Removed - merged into patch_new_array_init.
16707         (java_complete_tree):  Update patch_new_array_init.
16708
16709         * jcf-write.c (find_constant_index):  New function.
16710         (generate_bytecode_insns):  Use find_constant_index.
16711         (generate_classfile):  Use find_constant_index for ConstantValue.
16712
16713 1998-12-11  Tom Tromey  <tromey@cygnus.com>
16714
16715         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
16716         * decl.c (init_decl_processing): Renamed dtable -> vtable.
16717         * class.c (make_class_data): Renamed dtable -> vtable, and
16718         dtable_method_count -> vtable_method_count.
16719
16720 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16721
16722         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
16723         global variables, initialized.
16724         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
16725         Declared new global variables.
16726         * lex.c (java_lex): Return long_zero_node, float_zero_node,
16727         double_zero_node, integer_zero_node upon direct matching.
16728         * parse.y (purify_type_name): Added function prototype.
16729         (duplicate_declaration_error_p): Consider new_type as potentially
16730         being a incomplete type. Use purify_type_name on type string.
16731         (method_header): saved_type: unused variable removed. Don't figure
16732         return type if method name is invalid.
16733         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
16734         processed by patch_unaryop.
16735         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
16736         increment/decrement node into its original type after binary
16737         numeric promotion on its operands.
16738
16739 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16740
16741         * parse.y (array_initializer:): Array init operand is NULL_TREE
16742         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
16743         now an error. Fixed indentation problems.
16744         (patch_string): Handle error_mark_node as an argument.
16745         (patch_new_array_init): Fixed indentation problems.
16746         (array_constructor_check_entry): Removed check on null wfl_value.
16747         Return an error if wfl_value's walk returns an error.
16748
16749 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16750
16751         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
16752         * lex.c (java_lex): Remember column position before advancing one
16753         token. Retain location information on OCB_TK.
16754         * lex.h (typedef struct java_lc): Added new field.
16755         * parse.h (GET_SKIP_TYPE): New macro.
16756         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
16757         * parse.y (build_new_array_init, patch_new_array_init,
16758         patch_array_constructor, maybe_build_array_element_wfl,
16759         array_constructor_check_entry): New function prototypes.
16760         (switch_block:): Tagged <node>.
16761         (OCB_TK): Tagged <operator>.
16762         (array_initializer:): Installed actions.
16763         (variable_initializer): Build location information on element if
16764         necessary.
16765         (switch_statement:): Fixed indentation typo.
16766         (switch_block:): Redefined default action.
16767         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
16768         (patch_assignment): Removed duplicate code.
16769         (maybe_build_array_element_wfl, build_new_array_init,
16770         patch_new_array_init, patch_array_constructor,
16771         array_constructor_check_entry): New functions.
16772
16773 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16774
16775         * parse.y (array_initializer): Tagged <node>.
16776         (variable_initializer:): Use default rule.
16777         (array_initializer:): Defined actions.
16778         (variable_initializers:): Likewise.
16779         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
16780         non-static field accesses.
16781         (patch_invoke): Fixed indentation typo.
16782         (java_complete_tree): Likewise.
16783         (build_labeled_block): Changed leading comment. Generate an error
16784         in case of duplicate loop labels.
16785         (patch_conditional_expr): Patch results of string concatenation
16786         operations.
16787
16788 1998-12-06  Per Bothner  <bothner@cygnus.com>
16789
16790         * constants.c (find_methodref_index):  When the class is an interface,
16791         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
16792
16793         * decl.c (finit_identifier_node):  Use "$finit$", rather than
16794         "<finit>" (which Sun's verifier rejects).
16795         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
16796         (generate_field_initialization_code):  Removed.
16797         (fix_constructors)  Don't add call to $finit$ here (wrong order).
16798         (patch_method_invocation):  Add $finit$ call here.
16799
16800         * java-tree.h (CALL_USING_SUPER):  New macro.
16801         * parse.y (patch_invoke):  Remove im local variable.
16802         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
16803         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
16804         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
16805
16806         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
16807
16808         * parse.y (java_complete_tree):  Don't complain about unreachable
16809         statement if it is empty_stmt_node.
16810
16811         * jcf-write.c (find_constant_wide):  New function.
16812         (push_long_const):  Use find_constant_wide.
16813
16814         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
16815         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
16816         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
16817         Emit invokeinterface when calling an interface method.
16818         Emit invokespecial also when calling super or private methods.
16819
16820         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
16821
16822 1998-12-06  Per Bothner  <bothner@cygnus.com>
16823
16824         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
16825
16826 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16827
16828         * java-tree.h (java_layout_seen_class_methods): New function
16829         prototype.
16830         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
16831         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
16832         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
16833         * parse.y (method_declarator:): Defined action.
16834         (issue_warning_error_from_context): input_filename saved, set to
16835         the appropriate value and restored after java_error is called.
16836         (build_unresolved_array_type): Fixed comment.
16837         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
16838         (method_header): Deal with return type the same way type are
16839         handled for fields and method's parameters and local variables
16840         types are handled.
16841         (check_method_redefinition): Removed extra CR.
16842         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
16843         (java_layout_seen_class_methods): New function.
16844         (java_layout_classes): Call java_layout_seen_class_methods.
16845
16846 1998-12-03  Per Bothner  <bothner@cygnus.com>
16847
16848         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
16849
16850 1998-12-03  Per Bothner  <bothner@cygnus.com>
16851
16852         * jcf-dump.c (main):  Fix error message.
16853         * jcf-path.c (add_entry):  Style fix.
16854
16855 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16856
16857         * class.c (layout_class_method): Call build_java_argument_signature
16858         on constructors too.
16859         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
16860         (patch_method_invocation): Define a primary when resolving an
16861         expression name. Augmented comment on code checking illegal `this'
16862         usage. Loosened it test by accepting NEW_CLASS_EXPR.
16863
16864 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16865
16866         * class.c (layout_class_method): Don't report error on non-static
16867         overriding static if the method is private.
16868         * java-tree.h (finish_class): Prototype added.
16869         * lex.c (java_get_line_col): Handle col argument -2 value.
16870         * parse.h: All static method declarations moved to parse.y.
16871         * parse.y: Now contains all static method declarations previously
16872         found in parse.h.
16873         (find_expr_with_wfl, missing_return_error,
16874         unreachable_stmt_error): New functions.
16875         (java_get_real_method_name): Identify constructors bearing class
16876         names in source code compiled classes only.
16877         (java_complete_expand_methods): Call missing_return_error.
16878         (invocation_mode): Private methods invoked as static methods.
16879         (java_complete_tree): Call unreachable_stmt_error.
16880
16881 1998-12-01  Tom Tromey  <tromey@cygnus.com>
16882
16883         * Makefile.in (+target): Removed.
16884         (+xmake_file): Likewise.
16885         (+tmake_file): Likewise.
16886         (.NOEXPORT): Removed duplicate.
16887
16888 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16889
16890         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
16891
16892         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
16893
16894         * jvgenmain.c: Remove the xmalloc prototype, we get it from
16895         libiberty.h.  Provide an xmalloc definition.
16896
16897         * jvspec.c: Remove the xmalloc prototype.
16898
16899         * parse-scan.y: Include config.h and system.h.  Don't include
16900         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
16901         Provide an xstrdup definition.
16902
16903 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
16904
16905         * jcf-path.c (add_entry): Recognize ".jar" too.
16906         * lang-specs.h: Likewise.
16907
16908 1998-11-26  Per Bothner  <bothner@cygnus.com>
16909
16910         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
16911         soft_monitorenter_node, soft_monitorexit_node, throw_node.
16912
16913         * jcf-write.c (generate_bytecode_insns):
16914         Handle pre/post-increment/decrement of long.
16915
16916         * jcf-write.c (generate_bytecode_insns):
16917         Handle missing exception handler (finally for synchronized).
16918
16919 1998-11-25  Per Bothner  <bothner@cygnus.com>
16920
16921         * java-tree.h (end_params_node):  Declare global.
16922         * decl.c (end_params_node):  New global.
16923         (init_decl_processing, start_java_method):  Use end_params_node for
16924         end of list of parameter types.  Follows correct gcc conventions.
16925         * expr.c (pop_argument_types, pop_arguments):  Likewise.
16926         * lang.c (put_decl_node):  Likewise.
16927         * typeck.c (various places):  Likewise.
16928         * class.y (various places):  Likewise.
16929         * parse.y (various places):  Likewise.
16930
16931         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
16932         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
16933
16934         * class.c:  Add #include flags.h, remove no-longer needed declaration.
16935
16936         * class.c (layout_class_method):  Remove commented-out code, re-format.
16937         Don't add vtable entry (or index) for private methods.
16938         * expr.c (expand_invoke):  A private method is implicitly final.
16939         * class.c (make_class_data):  If inlining or optimizing,
16940         skip private methods.
16941
16942         * class.c (finish_class):  New function.  Calls existing methods,
16943         but alls emits deferred inline functions.
16944         * jcf-parse.c (parse_class_file):  Call finish_class.
16945         * parse.y (java_complete_expand_methods):  Likewise.
16946
16947         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
16948
16949         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
16950
16951 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
16952
16953         * jcf-write.c (generate_bytecode_conditional): Fix typo.
16954
16955 1998-11-24  Per Bothner  <bothner@cygnus.com>
16956
16957         * (generate_classfile): Always write class access flag with
16958         ACC_SUPER set.
16959
16960 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16961
16962         * class.c (maybe_layout_super_class): New function.
16963         (layout_class): Reorganized. Loop on class methods dispatched into
16964         a new function. Call maybe_layout_super_class.
16965         (layout_class_methods, layout_class_method): New functions.
16966         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
16967         class.
16968         (expand_invoke): Likewise.
16969         * java-tree.h (all_class_list): New global variable declared.
16970         (layout_class_methods, layout_class_method): New function
16971         prototypes.
16972         (LAYOUT_SEEN_CLASS_METHODS): New macro.
16973         * jcf-parse.c (all_class_list): New global variable.
16974         (load_class): Extended what class_or_name can be. Use parser
16975         context mechanism to save globals before calling jcf_parse.
16976         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
16977         is set on the file name.
16978         (jcf_parse): Layout class methods when Object is loaded, otherwise
16979         record class in all_class_list for delayed method layout.
16980         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
16981         * lang.c (put_decl_node): Decode <init> into the decl context
16982         class name.
16983         * lex.c (java_allocate_new_line): Use xmalloc.
16984         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
16985         pointers, not TREE_LIST elements.
16986         (struct parser_ctxt): Fixed comment indentations, added comments
16987         and reordered some fields.
16988         (java_check_methods): Function prototype removed.
16989         * parse.y (java_push_parser_context): Use xmalloc.
16990         (java_parser_context_restore_global): Pop extra pushed ctxp only
16991         when there's nothing next.
16992         (maybe_create_class_interface_decl): Fixed comment, add new
16993         created class decl to all_class_list.
16994         (method_header): Use GET_REAL_TYPE on argument's types.
16995         (method_declarator): Use GET_REAL_TYPE, change type to the real
16996         type in TREE_LIST dependency node. Build argument list with the
16997         real type.
16998         (create_jdep_list): Use xmalloc. Removed allocation error message.
16999         (obtain_incomplete_type): Fixed leading comment. Broadened
17000         incoming argument meaning.
17001         (register_incomplete_type): Use xmalloc. Removed allocation error
17002         message.
17003         (safe_layout_class): Fixed leading comment.
17004         (jdep_resolve_class): Reversed if statement condition and switch
17005         if and else bodies.
17006         (resolve_and_layout): Fixed leading comment. Broadened incoming
17007         argument meaning.
17008         (complete_class_report_errors): New local variable name, for
17009         clarity. purify_type_name used for all error cases.
17010         (java_get_real_method_name): Stricter check on constructors.
17011         (java_check_regular_methods): Reverse methods list only if not
17012         already laid out. Layout artificial constructor.
17013         (java_check_methods): Deleted.
17014         (source_start_java_method): Obtain incomplete type for patchable
17015         method arguments.
17016         (java_layout_classes): Fixed leading comment. Use
17017         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17018         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17019         before returning. Fixed comments.
17020         (java_expand_classes): Check for errors up front.
17021         (patch_method_invocation): Class to search is resolved and laid
17022         out.
17023
17024 1998-11-24  Per Bothner  <bothner@cygnus.com>
17025
17026         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17027
17028         * javaop.h (int8):  Removed - not used.
17029         (jbyte):  Redefine portably with correct signedness.
17030
17031         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17032
17033         * jcf-write.c (generate_bytecode_insns):  Fix typo
17034         OPCODE_getstatic to OPCODE_getfield.
17035
17036         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17037         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17038         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17039
17040 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17041
17042         * jcf-parse.c (jcf_parse_source): Function returned type is
17043         void. Added prototype.
17044         (jcf_parse): Function returned type is void.
17045         (yyparse): Remove call to fclose on the last parsed file.
17046
17047         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17048
17049 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17050
17051         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17052         (layout_class): Cope with methods featuring WFL in decl names.
17053         * decl.c (unqualified_object_id_node): New global variable,
17054         initialized.
17055         (build_decl_no_layout): Removed.
17056         * expr.c (build_primtype_type_ref): Handle Double.
17057         (java_lang_expand_expr): Fixed indentations.
17058         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17059         (flag_wall, flag_redundant, flag_not_overriding,
17060         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17061         variable declarations.
17062         (build_decl_no_layout): Removed prototype.
17063         (java_get_real_method_name): Added prototype.
17064         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17065         (java_parse_abort_on_error): Macro now just returns.
17066         * jcf-parse.c (jcf_parse_source): Check fclose returned
17067         value. Call emit_register_classes if java_report_errors returns
17068         zero.
17069         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17070         flag_static_local_jdk1_1): New integer flags.
17071         (lang_decode_option): New flags set here.
17072         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17073         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17074         the flag_redundant variable.
17075         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17076         when parsing java.lang.Object class.
17077         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17078         NULL_TREE to build.
17079         (resolve_qualified_expression_name): Fixed indentation.
17080         (patch_array_ref): Changed prototype.
17081         (not_initialized_as_it_should_p): Prototype removed.
17082         (java_report_errors): Added function prototype.
17083         * parse.y (formal_parameter:): Changed error message for not yet
17084         supported final parameters.
17085         (class_type_list:): Set both PURPOSE and VALUE of created
17086         TREE_LIST to be class_type.
17087         (primary_no_new_array:): Handle class literals on primitive types.
17088         (parse_warning_context): Reinstalled correct force_error and
17089         do_warning flags setups.
17090         (java_report_errors): Changed prototype. Return java_error_count
17091         value.
17092         (variable_redefinition_error): Consider treating variable type as
17093         a fake pointer.
17094         (create_interface): Warn about redundant abstract modifier if
17095         flag_redundant is set. Changed error message.
17096         (lookup_field_wrapper): Save/restore globals before/after looking
17097         up field.
17098         (duplicate_declaration_error_p): Consider treating declaration
17099         type as a fake pointer.
17100         (register_fields): Extract real type from dependency node. Check
17101         for duplicate field declaration after type adjustment. Use
17102         DECL_INITIAL to store static final initialized values.
17103         (method_header): Extract real function type from dependency node.
17104         (check_abstract_method_header): Use GET_METHOD_NAME.
17105         (obtain_incomplete_type): Layout fake pointer type.
17106         (safe_layout_class): Don't try to check for methods before layout.
17107         (java_complete_class): Don't check for correct throws clause
17108         elements inheritance here.
17109         (resolve_and_layout): Broadened name parameter meaning.
17110         (reset_method_name): Use GET_METHOD_NAME.
17111         (java_get_real_method_name): New function.
17112         (java_check_regular_methods): Don't check methods in
17113         java.lang.Object.  Verify lineage of throws clause elements. Use
17114         flag_no_overriding in warning report.
17115         (check_throws_clauses): Don't check if class was from
17116         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17117         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17118         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17119         warning on unsupported final local variables. Use build_decl
17120         instead of build_decl_no_layout. Get real local variable type from
17121         dependency node.
17122         (source_start_java_method): Get real parameter type from
17123         dependency node. Call build_decl instead of build_decl_no_layout.
17124         (java_layout_classes): Reverse tree and layout type and class as
17125         required. Mark class as loaded when done.
17126         (resolve_field_access): Fixed indentation. Restricted condition
17127         leading to static field access code generation. Set field_type
17128         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17129         (resolve_qualified_expression_name): Initialize type_found to
17130         null. Handle static field resolved during qualification. Fixed
17131         layout on non primitive field decl types.
17132         (not_accessible_p): Fixed typo in comment.
17133         (patch_method_invocation): Resolve and layout class to search from
17134         type.
17135         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17136         layout non primitive type, if necessary. Make method node only to
17137         report errors.
17138         (find_applicable_accessible_methods_list): Consider WFL'ed method
17139         decl names. Fixed indentation.
17140         (argument_types_convertible): Resolve and layout target type if
17141         necessary.
17142         (java_complete_tree): Fixed indentation problems. Rewrote
17143         CALL_EXPR thrown exceptions check. Re-installed further processing
17144         of the assignment in certain cases.
17145         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17146         inlining on class literals.
17147         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17148         0 literal.
17149         (valid_method_invocation_conversion_p): Likewise.
17150         (patch_string): Temporary disable forbidden use of `this' in
17151         explicit constructor invocations when doing string concatenation
17152         within their scope.
17153         (patch_unaryop): Added comment. Reinstalled code to disable
17154         further check on assignment operation with cast expression RHS.
17155         (patch_switch_statement): Fixed indentation.
17156         (build_try_statement): Call build_decl instead of
17157         build_decl_no_layout.
17158         (patch_synchronized_statement): Likewise.
17159         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17160         IS_UNCHECKED_EXPRESSION_P.
17161         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17162         layout argument exception type.
17163         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17164         of IS_UNCHECKED_EXPRESSION_P.
17165
17166 1998-11-18  Anthony Green  <green@cygnus.com>
17167
17168         * jcf-parse.c (yyparse): Open class file in binary mode.
17169
17170 1998-11-15  Per Bothner  <bothner@cygnus.com>
17171
17172         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17173
17174         * jcf-write.c (perform_relocations):  Move check out one loop.
17175
17176 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17177
17178         * Make-lang.in: Fix reference to srcdir.
17179         * jv-scan.c: Add missing xmalloc prototype.
17180         * jvgenmain.c: Ditto.
17181
17182 1998-11-15  Per Bothner  <bothner@cygnus.com>
17183
17184         * decl.c (error_mark_node), java-tree.h:  New global.
17185         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17186         (build_if_else_statement):  If missing else, use empty_stmt_node.
17187
17188         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17189         (java_complete_expand_method):  Complain if return is missing.
17190         (java_check_regular_methods):  Comment out incorrect error check.
17191         (not_accessible_p):  Fix incorrect handling of protected methods.
17192         (patch_method_invocation):  Pass correct context to not_accessible_p.
17193         (find_applicable_accessible_methods_list):  Likewise.
17194         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17195         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17196         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17197         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17198
17199         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17200         (push_int_const):  Remove reundant NOTE_PUSH.
17201         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17202         (- case SWITCH_EXPR):  Fix code generation bug.
17203         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17204         (generate_classfile):  More robust for abstract methods.
17205
17206 1998-11-15  Anthony Green  <green@cygnus.com>
17207
17208         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17209         * Make-lang.in: Ditto.
17210
17211         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17212         * jvgenmain: Ditto.
17213
17214 1998-11-15  Per Bothner  <bothner@cygnus.com>
17215
17216         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17217
17218         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17219
17220 1998-11-14  Per Bothner  <bothner@cygnus.com>
17221
17222         Allow uses of interface types to verify.  This is not really
17223         type-safe, but it matches what Sun does, and is OK as long as
17224         there are appropriate run-time checks.
17225         * verify.c (merge_types):  If merging two interface types,
17226         just set the result to java.lang.Object.
17227         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17228
17229 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17230
17231         * gjavah.c (main): Handle --output-class-directory argument.
17232         * jvspec.c (lang_specific_driver): Translate `-d' into
17233         -foutput-class-dir.
17234         * jcf.h (jcf_write_base_directory): Declare.
17235         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17236         * lang-options.h: Mention -foutput-class-dir.
17237         * jcf-write.c (jcf_write_base_directory): New global.
17238         (make_class_file_name): Put generated .class file into `-d'
17239         directory, or into source directory if -d not given.  Function now
17240         static.
17241         (write_classfile): Free class file name.  Handle case where class
17242         file name is NULL.
17243         (DIR_SEPARATOR): New macro.
17244         Include <sys/stat.h>
17245
17246         * Makefile.in (prefix): New macro.
17247
17248 1998-11-12  Per Bothner  <bothner@cygnus.com>
17249
17250         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17251         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17252         here (done in patch_invoke instead).
17253         (case_identity):  Moved here from parse.y.
17254
17255         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17256         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17257         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17258         so they can be efficiently scanned without recursion.
17259         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17260         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17261         in BLOCK iteratively, rather than recursively.
17262
17263         * parse.y (do_unary_numeric_promotion):  New function.
17264         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17265
17266         * parse.y (patch_newarray):  Various fixes.
17267
17268         Re-do handling of switch statements (for proper block scoping).
17269         * parse.y:  Add just a single block for the enture switch block,
17270         but don't create any "case blocks".
17271         (group_of_labels):  Rmeoved unneeded non-terminal.
17272         CASE_EXPR and DEFAULT_EXPR are added to current block.
17273         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17274         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17275         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17276         * parse.y (wfl_operator, print_int_node): Make non-static.
17277         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17278         as part of recursive scan of block.
17279         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17280         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17281
17282         * parse.y:  Make various production be non-typed (void).
17283         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17284         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17285         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17286
17287         * jcf-write.c (struct jcf_handler):  New type.
17288         (struct jcf_switch_state):  New type.
17289         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17290         (alloc_handler, emit_unop, emit_reloc):  New functions.
17291         (adjust_typed_op):  Add extra parameter ("max type" offset).
17292         (emit_switch_reloc, emit_case-reloc):  New function.
17293         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17294         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17295         exception handling, method calls, object/array creation, and more.
17296
17297         * class.c:  Remove some unused variables.
17298         * constants.c (find_string_constant):  New function.
17299         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17300         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17301         if flag_emit_class_files.
17302
17303 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17304
17305         * jcf-io.c (find_class): Added explanatory comment.
17306
17307         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17308         trailing slash to `.zip' entries.
17309
17310         * jvspec.c (lang_specific_driver): Correctly handle case where
17311         GC_NAME not defined.
17312
17313 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17314
17315         * jvspec.c (GC_NAME): New define.
17316         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17317         if required.
17318         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17319
17320 1998-11-11  Per Bothner  <bothner@cygnus.com>
17321
17322         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17323
17324 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17325
17326         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17327
17328 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17329
17330         * class.c (is_compiled_class): Call safe_layout_class for class
17331         compiled from source.
17332         * conver.h (convert_to_integer, convert_to_real,
17333         convert_to_pointer): Added prototypes.
17334         * decl.c (init_decl_processing): Non longer push the decls of
17335         `methodtable', `constants', `Class', `Field', `dispatchTable'
17336         `jexception' and `Method'.
17337         * expr.c (build_invokeinterface): New function.
17338         (expand_invoke): static variable CLASS_IDENT now in
17339         build_invokeinterface. Use build_invokeinterface.
17340         (expand_java_field_op): Moved code to inline
17341         java.lang.PRIMTYPE.TYPE into a function.
17342         (build_primtype_type_ref): New function.
17343         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17344         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17345         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17346         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17347         (DECL_LOCAL_STATIC_VALUE): New macro.
17348         (build_invokeinterface, build_primtype_type_ref): New function
17349         prototypes.
17350         (java_parse_abort_on_error): Macro rewritten.
17351         * jcf-parse.c (current_method): Add comment to declaration.
17352         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17353         Function prototypes fixed.
17354         (jcf_parse_source): push/pop parser context. save/restore global.
17355         (parse_source_file): Fixed leading comment. Now take a
17356         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17357         classes and pop the parser context anymore.
17358         (yyparse): Push parser context, save globals, parse the source
17359         file, restore globals and pop the parser context when processing a
17360         source file.
17361         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17362         * lex.c (java_parse_doc_section): New function.
17363         (java_lex): Call java_parse_doc_section when appropriate. Build an
17364         operator around INSTANCEOF_TK.
17365         * lex.h (java_lineterminator, java_sprint_unicode,
17366         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17367         Prototypes rewritten.
17368         (java_parse_escape_sequence, java_letter_or_digit_p,
17369         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17370         java_read_unicode, java_store_unicode, java_read_char,
17371         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17372         Added function prototypes.
17373         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17374         define.
17375         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17376         New macros
17377         (struct parser_ctxt): New fields: deprecated,
17378         current_parsed_class_un, gclass_list.
17379         (fix_method_argument_names, issue_warning_error_from_context,
17380         resolve_package, lookup_package_type): New function prototypes.
17381         (resolve_expression_name): Fixed function prototype.
17382         (find_applicable_accessible_methods_list): Fixed indentation, added
17383         extra argument in prototype.
17384         (check_final_assignment, build_null_of_type, check_deprecation,
17385         check_method_redefinition, reset_method_name,
17386         java_check_regular_methods, java_check_abstract_methods,
17387         maybe_build_primttype_type_ref): New function prototype.
17388         * parse.y (conver.h): Include.
17389         (INSTANCEOF_TK): Tagged <operator>.
17390         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17391         (relational_expression:): Build binop for instanceof.
17392         (java_push_parser_context): Remember ctxp->gclass_list across
17393         contexts.
17394         (java_pop_parser_context): Simply return if no context
17395         exists. Remember gclass_list across contexts.
17396         (issue_warning_error_from_context): New function.
17397         (parse_error_context): Don't setup ctxp->elc here. Call
17398         issue_warning_error_from_context instead.
17399         (parse_warning_context): Likewise.
17400         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17401         setup. Link new class/interface to ctxp->gclass_list.
17402         (add_superinterfaces): Register interface as incomplete if not
17403         loaded.
17404         (create_class): Remember class unqualified name in
17405         ctxp->current_parsed_class_un. Check class deprecation.
17406         (register_fields): Check field deprecation. Remember static final
17407         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17408         processing INIT.
17409         (method_header): New local variable ORIG_ARG. Use unqualified
17410         current class name for check on constructor errors. Promote return
17411         type if of record type. Argument list fix moved in
17412         fix_method_argument_names, called here. Check method deprecation.
17413         (fix_method_argument_names): New function.
17414         (method_declarator): Promote record typed arguments.
17415         (safe_layout_class): Check class methods before layout.
17416         (java_complete_class): Compute field layout when patched.
17417         (do_resolve_class): Try to load class after having it renamed
17418         after the package name.
17419         (get_printable_method_name): Use DECL_CONTEXT.
17420         (reset_method_name): New function.
17421         (check_method_redefinition): Use reset_method_name.
17422         (java_check_regular_methods): New local variable
17423         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17424         names for error report. Check for compile-time error when method
17425         found has default (package) access.
17426         (java_check_abstract_methods): Now takes an interface DECL node as
17427         an argument. Also reinstall real name on unchecked
17428         overriding/hiding methods for error report.
17429         (java_check_methods): Fixed leading comment. Get classes to verify
17430         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17431         CLASS_METHOD_CHECKED_P on class verification.
17432         (lookup_java_method2): Get real method name if necessary.
17433         (find_in_imports): Don't check package class access here.
17434         (resolve_package, lookup_package_type): New functions.
17435         (java_layout_classes): Fixed leading comment. Take classes to be
17436         laid out from ctxp->gclass_list.
17437         (java_complete_expand_methods): Don't expand native and abstract
17438         methods.
17439         (java_expand_classes): New function.
17440         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17441         values of static final field of primitive types.
17442         (resolve_field_access): Handles static final field of promotive
17443         type.
17444         (resolve_qualified_expression_name): Handle STRING_CST as
17445         primaries and package name resolution. Check deprecation on found
17446         decls. Set where_found and type_found on non static field resolved
17447         during qualification. Layout non primitive field decl types.
17448         (check_deprecation): New function.
17449         (maybe_access_field): Simplified.
17450         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17451         removed. Reverse method's argument when primary is a type. Don't
17452         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17453         instead. Include abstract class in the list of class searchable
17454         for constructors. Use DECL_CONTEXT of found method for access
17455         checks. Check method deprecation.
17456         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17457         converting arguments. Handle INVOKE_INTERFACE.
17458         (lookup_method_invoke): Search constructor using existing
17459         infrastructure (don't rely on lookup_java_constructor anymore).
17460         (find_applicable_accessible_methods_list): Extra argument flag
17461         LC. Now include constructor in the search.
17462         (qualify_ambiguous_name): Conditional expression are primaries.
17463         (not_initialized_as_it_should_p): static final are always
17464         initialized.
17465         (java_complete_tree): Pass extra NULL argument to
17466         resolve_expression_name. Stricter test to carry on patching
17467         assignments. New case for INSTANCEOF_EXPR.
17468         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17469         (check_final_assignment, maybe_build_primttype_type_ref): New
17470         functions.
17471         (patch_assignment): Detect resolved static finals and carry normal
17472         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17473         (try_builtin_assignconv): Access constant 0 on all primitive
17474         types.
17475         (valid_builtin_assignconv_identity_widening_p): Accept identical
17476         types. Accept all promoted type on int type.
17477         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17478         assigned to a reference.
17479         (valid_method_invocation_conversion_p): Accept to check null
17480         pointers.
17481         (build_binop): Merge declaration and initialization of local
17482         variable BINOP.
17483         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17484         numeric types. Improved validity test for qualify operators on
17485         references.
17486         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17487         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17488         primitive type and issue the appropriate error message.
17489         (resolve_type_during_patch): Mark class loaded when resolved.
17490         (patch_cast): Allow null to be cased to reference types.
17491         (build_null_of_type): New function.
17492         (patch_array_ref): Handle array on references correctly.
17493         (patch_return): Removed unused local variable MODIFY. Force
17494         boolean to be returned as integers. Allows null to be returned by
17495         a function returning a reference.
17496         * typeck.c (convert_to_integer, convert_to_real,
17497         convert_to_pointer): Prototypes moved to convert.h
17498         (lookup_argument_method): Use method real name, if necessary.
17499
17500 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17501
17502         * class.c (build_class_ref): Changed name of primitive classes to
17503         start with `_Jv_'.
17504
17505         * class.c (make_class_data): Renamed fields: nmethods to
17506         method_count, method_count to dtable_method_count.  Always set
17507         `state' field to 0.
17508         * decl.c (init_decl_processing): Likewise.
17509
17510 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17511
17512         * class.c (layout_class): Don't mangle <finit>, produce
17513         __finit<class> instead. Don't verify artificial methods.
17514         * decl.c (finit_identifier_node): New declared global.
17515         (init_decl_processing): finit_identifier_node initialized.
17516         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17517         * java-tree.h (finit_identifier_node): Declared as extern.
17518         (struct lang_decl): New field called_constructor.
17519         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17520         (CLASS_HAS_FINIT_P): New macro.
17521         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17522         explicit constructor invocation.
17523         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17524         CALL_SUPER_CONSTRUCTOR_P): New macros.
17525         (write_classfile): Added prototype.
17526         * jcf-parse.c (jcf_parse_source): Parse and remember for
17527         generation if the file was seen on the command line.
17528         (parse_source_file): Don't write the class file here.
17529         (yyparse): Loop on files rewritten. Set current_jcf.
17530         (parse_zip_file_entries): Parse class file only if it was found.
17531         * lang.c (init_parse): Don't open command line provided filename
17532         here.
17533         (lang_parse): Don't set main_jcf anymore.
17534         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17535         (JCONSTRUCTOR_CHECK): New macro.
17536         (JBSC_TYPE_P): New macro.
17537         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17538         (COMPLETE_CHECK_OP_2): New macro.
17539         (struct parse_ctxt): New field explicit_constructor_p.
17540         (check_class_interface_creation): Fixed prototype indentation.
17541         (patch_method_invocation_stmt): Prototype reflects added argument.
17542         (patch_invoke): Likewise.
17543         (complete_method_declaration, build_super_invocation,
17544         verify_constructor_circularity,
17545         build_this_super_qualified_invocation, get_printable_method_name,
17546         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17547         verify_constructor_super, create_artificial_method,
17548         start_artificial_method_body, end_artificial_method_body,
17549         generate_field_initialization_code): New function prototypes.
17550         * parse.y: Fixed leading comment
17551         (constructor_header:, constructor_body:, block_end:): Rules tagged
17552         <node>.
17553         (type_declaration:): Call maybe_generate_finit.
17554         (method_declaration:): Action for method_body: placed in new
17555         function complete_method_declaration, called here.
17556         (constructor_declaration:): Defined actions. Removed leading
17557         FIXME.
17558         (constructor_header:): New rule with action.
17559         (constructor_body:): Rule rewritten using block_begin: and
17560         block_end:. Defined actions.
17561         (constructor_declarator:, explicit_constructor_invocation:):
17562         Defined actions.
17563         (block:): Use new rules block_begin: block_end:.
17564         (block_begin:, block_end:): New rules and actions.
17565         (block_statements:): Fixed error message for explicit
17566         constructors.
17567         (method_invocation:): Call build_this_super_qualified_invocation
17568         if primary is `this' or `super' was seen.
17569         (conditional_expression:): Action defined.
17570         (extra_ctxp_pushed_p): New static global flag.
17571         (java_parser_context_save_global): Create parser context if
17572         necessary. Use extra_ctxp_pushed_p to remember it.
17573         (java_parser_context_restore_global): Pop extra parser context if
17574         one exists.
17575         (build_array_from_name): Array on primitive types are marked
17576         loaded.
17577         (register_fields): Restore new name in field initializer
17578         expression if type was altered. Non static fields initialized upon
17579         declaration marked initialized.
17580         (maybe_generate_finit): New function.
17581         (maybe_generate_clinit): Use create_artificial_method,
17582         start_artificial_method_body, end_artificial_method_body. Generate
17583         debug info for enclosed initialization statements.
17584         (method_header): Fixed leading comment. Check constructor
17585         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17586         accordingly.
17587         (complete_method_declaration, constructor_circularity_msg,
17588         verify_constructor_circularity): New functions.
17589         (get_printable_method_name): New function.
17590         (check_method_redefinition): Don't rename <finit> methods. Fix
17591         declared constructor names. Error message for
17592         constructors modified.
17593         (java_check_regular_methods): Local variable seen_constructor
17594         renamed saw_constructor. Skip verification on constructors. Create
17595         default constructor with create_artificial_method.
17596         (java_check_methods): Removed unnecessary empty line.
17597         (create_artificial_method, start_artificial_method_body,
17598         end_artificial_method_body): New functions.
17599         (java_layout_classes): Changed leading comment. Reverse fields
17600         list if necessary. Always layout java.lang.Object if being
17601         defined.
17602         (java_complete_expand_methods): Verify constructor circularity.
17603         (java_complete_expand_method): Call fix_constructor on
17604         constructors.  Local variable no_ac_found removed. Restore
17605         bindings if method body expansion failed.
17606         (fix_constructors, verify_constructor_super,
17607         generate_field_initialization_code): New function.
17608         (java_expand_classes): Fixed leading comment. Write class file
17609         here.
17610         (resolve_expression_name): Check for illegal instance variable
17611         usage within the argument scope of an explicit constructor
17612         invocation.
17613         (resolve_qualified_expression_name): Pass extra from_super flag
17614         when invoking patch_method_invocation_stmt. New case for
17615         conditional expression when used as a primary. Check for error
17616         when acquiring super.
17617         (patch_method_invocation_stmt): Added extra argument super. New
17618         local variable is_static_flag. Set class_to_search according to
17619         the nature of the constructor invocation. Don't add `this'
17620         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17621         invocation within the argument scope of explicit constructor
17622         invocation. Set is_static according to is_static_flag. Provide
17623         extra `super' argument to patch_invoke invocation.
17624         (patch_invoke): New argument from_super. Loop on arguments
17625         indentation fixed. Pass from_super to invocation_mode. New switch
17626         case INVOKE_SUPER. Fixed error message in switch default case.
17627         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17628         value.
17629         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17630         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17631         message takes constructors into account.
17632         (find_applicable_accessible_methods_list): Fixed indentation.
17633         (qualify_ambiguous_name): Take explicit constructor invocation
17634         into account. Deal with a conditional expression as a primary to
17635         a method call.
17636         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17637         case. Added extra argument to patch_method_invocation_stmt.
17638         Register calls made to explicit constructor `this'. Don't call
17639         save_expr in ARRAY_REF case when emitting class files. Check for
17640         illegal use of this when expanding explicit constructor invocation
17641         arguments.
17642         (complete_function_arguments): Set and reset parser context
17643         explicit_constructor_p field value when appropriate.
17644         (build_super_invocation, build_this_super_qualified_invocation):
17645         New functions.
17646         (patch_assignment): Fixed typo.
17647         (patch_unaryop): Check on final fields occurs only when a decl
17648         exits.
17649         (patch_return): Take constructors into account.
17650         (patch_conditional_expr): New function.
17651         * typeck.c (build_java_signature): Removed unnecessary empty line.
17652
17653 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17654
17655         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17656
17657 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17658
17659         * decl.c (init_decl_processing): Renamed fields.
17660         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17661         interface_len, msize fields.
17662
17663         * class.c (make_class_data): Removed subclass_head and
17664         subclass_next fields.
17665         * decl.c (init_decl_processing): Removed subclass_head and
17666         subclass_next fields.
17667
17668 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17669
17670         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17671         * mangle.c (emit_unicode_mangled_name): Similarly.
17672
17673 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17674
17675         * jcf-parse.c (get_constant): Place braces around code to compute
17676         'd' when REAL_ARITHMETIC is not defined.
17677
17678 1998-10-25  H.J. Lu  (hjl@gnu.org)
17679
17680         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
17681         dependency.
17682
17683 1998-10-23  Tom Tromey  <tromey@cygnus.com>
17684
17685         * lang-specs.h: `.zip' files are input to jc1.
17686
17687 1998-10-22  Per Bothner  <bothner@cygnus.com>
17688
17689         * jvspecs.c:  Add (but don't enable) support for combining multiple
17690         .class and .java input filenames to a single jc1 invocation.
17691         Add support for -C flag (copile to .class files).
17692         Translate -classpath and -CLASSPATH arguments.
17693         * lang-specs.h:  Don't set %2 spec.
17694
17695 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17696
17697         * jcf-path.c (add_entry): Don't add trailing separator if entry is
17698         a .zip file.
17699         (add_path): Don't add trailing separator to non-empty path
17700         elements.
17701
17702         * lang.c (lang_decode_option): Check for -fclasspath and
17703         -fCLASSPATH before examining other `-f' options.
17704
17705         * java-tree.h (finalize_identifier_node): Don't declare.
17706         * class.c (make_class_data): Don't push "final" field.
17707         * decl.c (init_decl_processing): Don't push "final" field.
17708         (finalize_identifier_node): Removed.
17709         (init_decl_processing): Don't set finalize_identifier_node.
17710
17711         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
17712
17713 1998-10-11  Anthony Green  <green@cygnus.com>
17714
17715         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
17716         (JV_SCAN_SOURCES): New macro.
17717         (JCF_DUMP_SOURCES): Likewise.
17718         (jcf-dump$(exeext)): New target.
17719         (jv-scan$(exeext)): New target.
17720
17721 1998-10-22  Tom Tromey  <tromey@cygnus.com>
17722
17723         * Makefile.in (LEX): Removed.
17724         (LEXFLAGS): Likewise.
17725         (SET_BISON): New macro.
17726         (BISON): Removed.
17727         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
17728         spurious diffs in parse.c.
17729         ($(PARSE_SCAN_C)): Likewise.
17730         (PARSE_DIR): New macro.
17731         (PARSE_C): Use it.
17732         (PARSE_SCAN_C): Likewise.
17733         (PARSE_RELDIR): New macro.
17734
17735         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
17736
17737         * jcf-io.c (find_class): Use saw_java_source to determine when to
17738         look for `.java' file.
17739         * jcf-parse.c (saw_java_source): New global.
17740         (yyparse): Set it if `.java' file seen.
17741
17742         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
17743         (GCJH_SOURCES): Likewise.
17744         * Makefile.in (datadir): New macro.
17745         (libjava_zip): Likewise.
17746         (JAVA_OBJS): Added jcf-path.o.
17747         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17748         (../gcjh$(exeext)): Likewise.
17749         (jcf-path.o): New target.
17750         * java-tree.h (fix_classpath): Removed decl.
17751         * jcf-parse.c (fix_classpath): Removed.
17752         (load_class): Don't call fix_classpath.
17753         * parse.y (read_import_dir): Don't call fix_classpath.
17754         * lex.h: Don't mention classpath.
17755         * lex.c (java_init_lex): Don't initialize classpath.
17756         * jcf-io.c (classpath): Removed global.
17757         (find_class): Use jcf_path iteration functions.  Correctly search
17758         class path for .java file.
17759         (open_in_zip): New argument `is_system'.
17760         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
17761         classpath-related options.
17762         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
17763         and -I.
17764         (lang_init): Call jcf_path_init.
17765         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
17766         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
17767         Correctly put braces around second string in each entry.
17768         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
17769         classpath-related options.
17770         (help): Updated for new options.
17771         * jcf.h: Declare functions from jcf-path.c.  Don't mention
17772         `classpath' global.
17773         * jcf-path.c: New file.
17774
17775         * jcf-depend.c: Include jcf.h.
17776
17777         * jcf-write.c (localvar_alloc): Returns `void'.
17778         (localvar_free): Removed unused variable.
17779
17780         * lang.c (OBJECT_SUFFIX): Define if not already defined.
17781         (init_parse): Use OBJECT_SUFFIX, not ".o".
17782
17783 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17784
17785         * class.c (emit_register_classes): Renamed from
17786         emit_register_class.
17787         * java-tree.h (emit_register_classes): Prototype renamed from
17788         emit_register_class.
17789         * jcf-parse.c (yyparse): Call emit_register_classes once before
17790         returning.
17791         * parse.y (java_expand_classes): No longer register classes.
17792
17793 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17794
17795         * class.c (is_compiled_class): New local variable
17796         seen_in_zip. Identify classes found in currently compiled source
17797         file(s).
17798         * decl.c (complete_start_java_method): Fixed typo.
17799         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
17800         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
17801         (CLASS_P): Moved around.
17802         (java_parse_abort_on_error): Macro moved from jcf-parse.c
17803         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
17804         java-tree.h
17805         (jcf_parse_source): Changed leading comment. Removed unnecessary
17806         fclose and CLASS_FROM_SOURCE_P marking.
17807         (parse_source_file): New local variables remember_for_generation
17808         and filename. Mark parsed file name identifier node. Removed block
17809         executed when parse_only was null. Set remember_for_generation.
17810         Use it as an argument to java_pop_parser_context.
17811         (yyparse): New local variables several_files, list, next node and
17812         current_file_list. Split ampersand separated file names into
17813         current_file_list. Iterate through the list and parse accordingly.
17814         * parse.h (java_pop_parser_context): New function prototype.
17815         * parse.y (ctxp_for_generation): New static global variable.
17816         (java_pop_parser_context): New argument generate. Link popped ctxp
17817         to ctxp_for_generation list accordingly.
17818         (java_complete_expand_methods): Fixed indentation.
17819         (java_expand_classes): New function.
17820
17821 1998-10-17  Per Bothner  <bothner@cygnus.com>
17822
17823         * Makefile.in:  Link with libiberty.a instead of memmove.o.
17824
17825 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17826
17827         * lex.c (setjmp.h): No longer included.
17828         * lex.h (setjmp.h): Included.
17829         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
17830         (duplicate_declaration_error_p): Renamed from
17831         duplicate_declaration_error.
17832         (build_array_from_name): New function prototype.
17833         * parse.y (setjmp.h): No longer included.
17834         (variable_declarator_id): Define action.
17835         (build_array_from_name): New function.
17836         (duplicate_declaration_error_p): Renamed from
17837         duplicate_declaration_error.  Fixed leading comment.
17838         (register_fields): Main `for' loop reorganized. Uses
17839         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
17840         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
17841         build_array_from_name.
17842         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
17843         types.
17844         (read_import_dir): Don't try to skip `.' and `..'.
17845         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
17846         build_array_from_name. Main `for' loop reorganized.
17847         (resolve_qualified_expression_name): When building access to a
17848         field, use the type where the field was found, not its own type.
17849         (maybe_access_field): Use field DECL_CONTEXT if the type where the
17850         field was found is null.
17851         (qualify_ambiguous_name): Sweep through all successive array
17852         dimensions.
17853
17854 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17855
17856         * java-tree.h (pop_labeled_block, lang_printable_name,
17857         maybe_add_interface, set_super_info, get_access_flags_from_decl,
17858         interface_of_p, inherits_from_p, fix_classpath,
17859         complete_start_java_method, emit_handlers, init_outgoing_cpool,
17860         make_class_data, register_class, alloc_name_constant): New
17861         function prototypes.
17862         * lang.c (lang_decode_option): Set argc argument unused. Fixed
17863         indentation. Added cast to remove warning.
17864         (lang_printable_name): Set v argument unused.
17865         (lang_print_error): Added argument to lang_printable_name call.
17866         (java_dummy_print, print_lang_decl, print_lang_type,
17867         print_lang_identifier, lang_print_xnode): All argument marked
17868         unused.
17869         * lex.c (java_unget_unicode): Removed unnecessary argument.
17870         (java_allocate_new_line): Unused local variable is gone.
17871         (java_read_char): Added parenthesis in expressions to remove
17872         warnings.  Added final return statement.
17873         (java_read_unicode): Added parenthesis in expression to remove
17874         warning.
17875         (java_parse_end_comment): Fixed java_unget_unicode invocation.
17876         (java_parse_escape_sequence): Likewise.
17877         (java_lex): Unused local variables are gone. Fixed
17878         java_unget_unicode invocation.
17879         * lex.h (set_float_handler): Prototype added when JC1_LITE not
17880         defined.
17881         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
17882         lang_printable_name invocation in macro.
17883         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
17884         Likewise.
17885         (duplicate_declaration_error): Suppressed unused argument in
17886         prototype.
17887         (identical_subpath_p): Function declaration is gone.
17888         (patch_invoke): Suppressed unused argument in prototype.
17889         (patch_cast, build_labeled_block, check_thrown_exceptions):
17890         Likewise.
17891         * parse.y (setjmp.h): Included
17892         (toplev.h): Likewise.
17893         (field_declaration:): Suppressed unused local
17894         (label_decl:): Fixed build_labeled_block invocation.
17895         (java_pop_parser_context): Put extra parenthesis around assignment
17896         in if.
17897         (yyerror): Suppressed unused local variables.
17898         (variable_redefinition_error): Fixed lang_printable_name
17899         invocation.
17900         (create_interface): Suppressed unused local variables.
17901         (create_class): Likewise.
17902         (duplicate_declaration_error): Suppressed unused argument. Fixed
17903         lang_printable_name invocation.
17904         (register_fields): Suppressed unused local variable. Fixed
17905         duplicate_declaration_error invocation.
17906         (method_header): Suppressed unused local variable.
17907         (method_declarator, parser_check_super): Likewise.
17908         (java_complete_class): Suppressed unused local variable. Fixed
17909         fatal error message.
17910         (complete_class_report_errors): Added default: in switch.
17911         (java_check_regular_methods): Fixed lang_printable_name
17912         invocations.
17913         (check_throws_clauses): Likewise.
17914         (java_check_abstract_methods): Suppressed unused local
17915         variable. Fixed lang_printable_name invocation.
17916         (read_import_entry): Added supplemental return statement.
17917         (read_import_dir): Suppressed unused local variables.
17918         (check_pkg_class_access, declare_local_variables): Likewise.
17919         (source_start_java_method): Suppressed unused extern variable
17920         declarations
17921         (expand_start_java_method): Suppressed unused extern and local
17922         variable declarations.
17923         (java_complete_expand_methods): Likewise.
17924         (java_complete_expand_method): Suppressed unused local variables.
17925         (make_qualified_name): Likewise.
17926         (resolve_qualified_expression_name): Added default: in
17927         switch. Fixed lang_printable_name invocation.
17928         (class_instance_creation_expression): Added parenthesis around
17929         expressions.
17930         (patch_method_invocation_stmt): Fixed lang_printable_name and
17931         patch_invoke invocations.
17932         (check_for_static_method_reference): Fixed lang_printable_name
17933         invocation.
17934         (patch_invoke): Suppressed unused arguments and local variables.
17935         (lookup_method_invoke): Suppressed unused local variables.
17936         (qualify_ambiguous_name): Added default: in switch.
17937         (identical_subpath_p): Function removed.
17938         (patch_assignment): Suppressed unused local variables. Suppressed
17939         unnecessary if statement. Fixed lang_printable_name invocations.
17940         (try_builtin_assignconv): Fixed lang_printable_name invocations.
17941         (valid_ref_assignconv_cast_p): Parenthesis around
17942         expression. Suppressed unused local variables.
17943         (build_binop): Suppressed unused local variables. fixed
17944         lang_printable_name invocations.
17945         (string_constant_concatenation): Suppressed unused local
17946         variables.
17947         (patch_unaryop): Fixed lang_printable_name invocation.
17948         (patch_cast): Suppressed unnecessary argument. Fixed
17949         lang_printable_name invocation.
17950         (patch_array_ref): Fixed lang_printable_name invocation.
17951         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
17952         (build_labeled_block): Suppressed unused argument.
17953         (generate_labeled_block): Fixed build_labeled_block invocation.
17954         (build_loop_body): Suppressed unused local variables.
17955         (patch_loop_statement): Likewise.
17956         (patch_exit): Fixed lang_printable_name invocation.
17957         (patch_switch_statement): Likewise.
17958         (case_identity): First argument marked unused.
17959         (patch_try_statement): Fixed lang_printable_name invocations.
17960         (patch_synchronized_statement, patch_throw_statement): Likewise.
17961         (check_thrown_exceptions): Fixed check_thrown_exceptions and
17962         lang_printable_name invocations.
17963         (check_thrown_exceptions_do): Suppressed unused argument.
17964
17965 1998-10-14  Tom Tromey  <tromey@cygnus.com>
17966
17967         * jcf-write.c (write_classfile): Add output class file as target.
17968         * lang-options.h: Added -MD, -MMD, -M, and -MM.
17969         * jcf.h: Added declarations for dependency-tracking functions.
17970         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
17971         * lang.c (lang_decode_option): Recognize -MD and -MMD.
17972         (finish_parse): Call jcf_dependency_write.
17973         (dependency_tracking): New global.
17974         (DEPEND_SET_FILE): New define.
17975         (DEPEND_ENABLE): New define.
17976         (init_parse): Enable dependency tracking if required.
17977         Include "flags.h".
17978         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
17979         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
17980         (../gcjh$(exeext)): Likewise.
17981         (jcf-depend.o): New target.
17982         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
17983         (GCJH_SOURCES): Likewise.
17984         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
17985         dep_name argument.
17986         (find_classfile): Added dep_name argument.
17987         (find_class): Compute name of dependency.
17988         (open_in_zip): Call jcf_dependency_add_file.
17989         * gjavah.c (output_file): No longer global.
17990         (usage): Don't mention "gjavah".
17991         (help): Likewise.
17992         (java_no_argument): Likewise.
17993         (version): Likewise.
17994         (main): Recognize and handle -M family of options.
17995         (print_mangled_classname): Return is void.
17996         (process_file): Handle case where output is suppressed.
17997         (HANDLE_END_FIELD): Likewise.
17998         (HANDLE_METHOD): Likewise.
17999         * jcf-depend.c: New file.
18000
18001 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18002
18003         * java-tree.def: Add missing newline at EOF.
18004
18005 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18006
18007         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18008         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18009         function.
18010         Include <config.h> and "system.h".
18011         (disassemble_method): Undefine RET to avoid clash with
18012         config/i386/i386.h.
18013
18014 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18015
18016         * decl.c (runtime_exception_type_node, error_exception_type_node):
18017         New global variables.
18018         (init_decl_processing): Initialized.
18019         * expr.c (java_lang_expand_expr): Set caught exception type to
18020         null if catch handler argument doesn't exit.
18021         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18022         tree codes.
18023         * java-tree.h (runtime_exception_type_node,
18024         error_exception_type_node): Global variables declared.
18025         (DECL_FUNCTION_THROWS): New macro.
18026         (DECL_FUNCTION_BODY): Modified comment.
18027         (DECL_SPECIFIC_COUNT): Likewise.
18028         (struct lang_decl): New field throws_list.
18029         (IS_UNCHECKED_EXPRESSION_P): New macro.
18030         * lex.c (java_lex): Generate location information for THROW_TK.
18031         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18032         EXCEPTIONS_P): New macros.
18033         (enum jdep_code): New value JDEP_EXCEPTION.
18034         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18035         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18036         PATCH_METHOD_RETURN_ERROR): New macros.
18037         (patch_method_invocation_stmt): Added new argument to prototype.
18038         (patch_synchronized_statement, patch_throw_statement,
18039         check_thrown_exceptions, check_thrown_exceptions_do,
18040         purge_unchecked_exceptions, check_throws_clauses): New function
18041         prototypes.
18042         * parse.y Fixed typo in keyword section.
18043         (throw:): Rule tagged <node>.
18044         (THROW_TK): Keyword tagged <operator>.
18045         (method_header:): Last argument to call to method_header passed
18046         from throws: rule.
18047         (throws:, class_type_list:, throw_statement:,
18048         synchronized_statement:, synchronized:): Defined actions.
18049         (method_header): New local variable current. Register exceptions
18050         from throws clause.
18051         (java_complete_tree): Complete and verify exceptions from throws
18052         clause.
18053         (complete_class_report_errors): Error message on exceptions not
18054         found
18055         (java_check_regular_methods): Fixed typo. Shortcut on private
18056         overriding methods. Changed error message on method
18057         redefinition. Check for throws clause compatibility.
18058         (check_throws_clauses): New function.
18059         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18060         method. Changed error message on method redefinition.
18061         (currently_caught_type_list): New static variable.
18062         (java_complete_expand_methods): Purge unchecked exceptions from
18063         throws clause list. Call PUSH_EXCEPTIONS before walk and
18064         POP_EXCEPTIONS after.
18065         (resolve_qualified_expression_name): Pass new argument as NULL to
18066         patch_method_invocation_stmt.
18067         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18068         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18069         argument list when appropriate. Use new argument if non null to
18070         store selected method decl.
18071         (patch_invoke): Convert if necessary args of builtin types before
18072         forming CALL_EXPR. Argument list no longer reversed here.
18073         (invocation_mode): Treat final methods as static methods.
18074         (java_complete_tree): New cases for THROW_EXPR: and
18075         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18076         function call.
18077         (complete_function_arguments): No more RECORD_TYPE
18078         conversion. Function parameter nodes no longer saved.
18079         (valid_ref_assignconv_cast_p): Avoid handling null type.
18080         (patch_binop): Fixed null constant reference handling.
18081         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18082         BUILD_THROW macros.
18083         (patch_try_statement): Fixed comments. Record caught types in
18084         list, push the list, expand try block and pop the list.
18085         (patch_synchronized_statement, patch_throw_statement,
18086         check_thrown_exceptions, check_thrown_exceptions_do,
18087         purge_unchecked_exceptions): New functions.
18088         * typeck.c (lookup_argument_method): Allow WFL in place of method
18089         DECL_NAME during method definition check
18090
18091 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18092
18093         * gjavah.c (decode_signature_piece): New function.
18094         (print_c_decl): Use it.  Added `name_override' argument.
18095         (print_method_info): Use name_override argument to print_c_decl.
18096         (seen_fields): Removed.
18097         (print_field_info): Don't update seen_fields.
18098         (struct method_name): New structure.
18099         (method_name_list): New global.
18100         (print_method_info): Add new method to list of methods.
18101         (name_is_method_p): New function.
18102         (print_field_info): If field name has same name as method, then
18103         change field name.
18104         (process_file): Parse methods before fields.
18105         (field_pass): New global.
18106         (HANDLE_END_FIELD): Take field_pass into account.
18107
18108 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18109
18110         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18111         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18112
18113 1998-10-03  Anthony Green  <green@cygnus.com>
18114
18115         * jvspec.c: Fix bug in jvgenmain_spec patch.
18116
18117 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18118
18119         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18120         * decl.c (soft_exceptioninfo_call_node): New global variable.
18121         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18122         takes extra integer argument. soft_exceptioninfo_call_node
18123         initialized.
18124         * except.c (java_set_exception_lang_code): New function
18125         (method_init_exceptions): Called here.
18126         (prepare_eh_table_type): New function.
18127         (expand_end_java_handler): Called here.
18128         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18129         one argument. Modified generation of call to
18130         soft_badarrayindex_node to use new argument.
18131         (build_java_arrayaccess): Pass faulty index value to
18132         build_java_throw_out_of_bounds_exception.
18133         (generate_name): New function.
18134         (java_lang_expand_expr): New local variables node, current,
18135         has_finally_p. Expand TRY_EXPR node.
18136         (process_jvm_instruction): Replace top of the stack with thrown
18137         object reference when entering exception handler.
18138         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18139         specific tree codes.
18140         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18141         global.
18142         (DECL_SPECIFIC_COUNT): New macro.
18143         (prepare_eh_table_type, java_set_exception_lang_code,
18144         generate_name): New function declarations.
18145         (match_java_method): Declaration deleted.
18146         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18147         macros.
18148         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18149         * parse.h (redefinition_error, refine_accessible_methods_list,
18150         can_cast_to_p): Function declaration removed.
18151         (classitf_redefinition_error, variable_redefinition_error,
18152         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18153         find_most_specific_methods_list, argument_types_convertible,
18154         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18155         valid_cast_to_p, valid_method_invocation_conversion_p,
18156         try_reference_assignconv, add_stmt_to_compound,
18157         build_jump_to_finally, build_tree_list, patch_try_statement,
18158         java_get_catch_block): New function declarations.
18159         * parse.y (string_buffer_type): Global variable deleted.
18160         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18161         finally): Rules tagged <node>.
18162         (TRY_TK, CATCH_TK): Token tagged <operator>.
18163         (class_body_declaration:, class_member_declaration:,
18164         formal_parameter:, explicit_constructor_invocation:,
18165         interface_member_declaration:, constant_declaration:,
18166         primary_no_new_array:, class_instance_creation_expression:,
18167         array_creation_expression:): Issue error on unsuported JDK1.1
18168         features.
18169         (try_statement:, catches:, finally:): Define actions.
18170         (catch_clause_parameter): New rule.
18171         (catch_clause:): Use new rule catch_clause_parameter.
18172         (parse_jdk1_1_error): New function.
18173         (redefinition_error): Renamed classitf_redefinition_error.
18174         (variable_redefinition_error): New function.
18175         (check_class_interface_creation): Call
18176         classitf_redefinition_error.
18177         (java_complete_tree): Added error message on JDEP_TYPE: case.
18178         (complete_class_report_errors): Fixed indentation.
18179         (declare_local_variables): Call variable_redefinition_error.
18180         (source_end_java_method): Call java_set_exception_lang_code and
18181         emit_handlers where appropriate.
18182         (java_method_add_stmt): Call add_stmt_to_block.
18183         (add_stmt_to_block): New function.
18184         (lookup_method_invoke): Fixed outside comment. new local variable
18185         candicates.  Call find_applicable_accessible_methods_list and
18186         find_most_specific_methods_list when searching for a
18187         method. Modified error report to list possible candidates when
18188         applicable.
18189         (find_applicable_accessible_methods_list,
18190         find_most_specific_methods_list, argument_types_convertible): New
18191         function.
18192         (refine_accessible_methods_list): Function deleted.
18193         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18194         expr (if applicable) before calling patch_array_ref.
18195         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18196         (enter_block): Fixed comment.
18197         (enter_a_block): New function.
18198         (patch_assignment): Reorganized. Call try_reference_assignconv for
18199         references. Call valid_cast_to_p instead of can_cast_to_p.
18200         (try_reference_assignconv,
18201         valid_builtin_assignconv_identity_widening_p): New functions.
18202         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18203         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18204         functions.
18205         (build_string_concatenation): Don't resolve StringBuffer.
18206         (patch_cast): Fixed inverted arguments.
18207         (patch_array_ref): Code to save array expr deleted. Call
18208         valid_cast_to_p instead of can_cast_to_p.
18209         (generate_labeled_block): Call generate_name.
18210         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18211         patch_try_statement): New functions.
18212         * typeck.c (match_java_method): Function deleted.
18213
18214 1998-10-02  Anthony Green  <green@cygnus.com>
18215
18216         * jvspec.c: jvgenmain_spec uses different temporary file names.
18217
18218 1998-10-02  Anthony Green  <green@cygnus.com>
18219
18220         * jvspec.c (lang_specific_driver): Fail if user specifies
18221         --main= when not linking.
18222
18223 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18224
18225         * class.c (make_class_data): Push value for `thread' field.
18226         * decl.c (init_decl_processing): Added `thread' field to class.
18227
18228         * class.c (add_field): Always make static fields externally
18229         visible.
18230
18231 1998-09-26  Anthony Green  <green@cygnus.com>
18232
18233         * expr.c (build_java_athrow,
18234         build_java_throw_out_of_bounds_exception, expand_invoke,
18235         build_newarray, expand_java_multianewarray, build_java_monitor):
18236         Update comments to reflect _Jv_* function names.
18237
18238 1998-09-25  Per Bothner  <bothner@cygnus.com>
18239
18240         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18241         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18242         * parse.y (expand_start_java_method):  Likewise.
18243
18244 1998-09-24  Per Bothner  <bothner@cygnus.com>
18245
18246         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18247
18248         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18249         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18250         * expr.c:  Remove no-longer-needed calls to promote_type.
18251         * decl.c (give_name_to_locals):  Liekwise.
18252         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18253         * parse.y:  Add/remove promote_type calls as appropriate.
18254         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18255         (parse_signature_string):  Likewise.
18256         (build_java_array_type):  Fix for now signature convenions.
18257
18258         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18259
18260 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18261
18262         * class.c (init_class_processing): libjava function renamed to
18263         _Jv_RegisterClass.
18264
18265 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18266
18267         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18268         * java-tree.def: Fixed DEFTREECODE third argument.
18269         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18270         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18271         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18272         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18273         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18274         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18275         * lang.c (java_tree_code_type, java_tree_code_length,
18276         java_tree_code_name): New arrays.
18277         (lang_init): Append Java tree node definitions to Gcc ones.
18278         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18279         defined.
18280         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18281         wfl_to_string.
18282         (java_lex): Allow declaration of empty string constants. Retain
18283         location information on CASE_TK and DEFAULT_TK.
18284         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18285         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18286         Modified to be more robust.
18287         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18288         (build_new_invocation, try_builtin_assignconv,
18289         patch_switch_statement, string_constant_concatenation,
18290         build_string_concatenation, patch_string_cst, patch_string,
18291         java_expand_switch): New function declarations.
18292         * parse.y: Rules related to switch and EH tagged <node>.
18293         (label_id): Set to NULL_TREE
18294         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18295         tree nodes.
18296         (this_or_super:): Fixed indentation.
18297         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18298         statement_expression:): Removed call to RULE on all sub-rules.
18299         (switch_expression:, switch_labels:): New rules.
18300         (switch_statement:, switch_block:, switch_block_statement_groups:,
18301         switch_block_statement_group:, switch_labels:, switch_label:):
18302         Defined actions.
18303         (throw_statement:, synchronized_statement:, try_statement:):
18304         Defined temporary actions.
18305         (class_instance_creation_expression:): Call
18306         build_new_invocation. Fixed indentation.
18307         (field_access): Fixed indentation.
18308         (method_invocation): Likewise.
18309         (make_qualified_primary): Use THIS_EXPR.
18310         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18311         resolving from SUPER, set *type_found.
18312         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18313         (java_complete_tree): Removed unused local variable `location'. Case
18314         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18315         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18316         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18317         STRING_CST: case. default: checks for patchable strings.
18318         (complete_function_arguments): Transform string constant or
18319         crafted StringBuffer if necessary.
18320         (build_method_invocation): Fixed comments.
18321         (build_new_invocation): New function.
18322         (patch_assignment): Call try_builtin_assignconv to figure a valid
18323         assignment conversion between builtin types.
18324         (try_builtin_assignconv): New function.
18325         (build_binop): Use URSHIFT_EXPR directly to call build.
18326         (operator_string): Use UNARY_PLUS_EXPR.
18327         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18328         operator.
18329         (do_merge_string_cste, merge_string_cste,
18330         string_constant_concatenation, build_string_concatenation,
18331         patch_string, patch_string_cst): New function.
18332         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18333         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18334         (build_newarray_node): Use NEW_ARRAY_EXPR.
18335         (build_this): Use THIS_EXPR.
18336         (build_return): Enable debug information on return statement.
18337         (build_if_else_statement): Likewise.
18338         (complete_labeled_statement): Fixed related comment.
18339         (build_loop_body): Fixed comment.
18340         (build_bc_statement): Enable debug information on break/continue
18341         statements.
18342         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18343         context.
18344         (patch_switch_statement, case_identity, java_expand_switch): New
18345         functions.
18346
18347 1998-09-21  Per Bothner  <bothner@cygnus.com>
18348
18349         * buffer.h (BUFFER_INIT):  New macro.
18350         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18351         Pass (struct jcf_partial *state) to most functions.
18352         (jcf_block, jcf_relocation):  New types.
18353         Support labels, branches, conditionals, loops.
18354
18355 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18356
18357         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18358
18359 1998-09-21  Per Bothner  <bothner@cygnus.com>
18360
18361         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18362         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18363         not integer_type_node (INT_TYPE_SIZ bits).
18364
18365         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18366
18367         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18368         * jcf-dump.c (print_exception_table):  New function.
18369         (disassemble_method):  Better handling of wide instructions.
18370         Make more robust for bad input.
18371
18372 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18373
18374         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18375         FreeBSD.
18376
18377 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18378
18379         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18380
18381 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18382
18383         * Makefile.in ($(PARSE_H)): Removed target.
18384
18385 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18386
18387         * Makefile.in (JAVA_OBJS): Add memmove.o
18388         (memmove.o): New target & rules.
18389
18390 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18391
18392         * expr.c (expand_invoke): Don't generate a call to the class init
18393         code.
18394
18395 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18396
18397         * Makefile.in: Add many missing dependencies.
18398         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18399         as appropriate.
18400         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18401         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18402
18403 1998-09-11  Per Bothner  <bothner@cygnus.com>
18404
18405         * decl.c (complete_start_java_method):  If method is static (and
18406         not private) call _Jv_InitClass.
18407         * expr.c (expand_invoke):  Don't call build_class_init.
18408
18409         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18410
18411 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18412
18413         * Make-lang.in (GCJ): Define before using.
18414
18415 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18416
18417         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18418         losing due to namespace pollution in GNU getopt.h
18419
18420 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18421
18422         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18423         (java.all.cross): Likewise.
18424         (java.rest.encap): Likewise.
18425
18426 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18427
18428         * gjavah.c (print_class_decls): Fix thinko in arglist
18429         * jcv-io.c (find_classfile): Similarly.
18430
18431 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18432
18433         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18434
18435 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18436
18437         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18438         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18439         * Makefile.in (PARSE_C): New macro.
18440         (PARSE_H): Likewise.
18441         (PARSE_SCAN_C): Likewise.
18442         ($(PARSE_C)): Target renamed from parse.c.
18443         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18444         (clean): Remove parse-scan.c as well.
18445         (parse.o): Depend on $(PARSE_C).
18446
18447 1998-09-05  Anthony Green  <green@cygnus.com>
18448
18449         * README, license.terms: Removed.
18450
18451         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18452         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18453         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18454         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18455         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18456         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18457         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18458         and Java trademark attribution.
18459
18460 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18461
18462         * Makefile.in: Use gcjh, not gjavah.
18463         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18464         * Make-lang.in: Changed gjavah to gcjh everywhere.
18465
18466 1998-09-03  Per Bothner  <bothner@cygnus.com>
18467
18468         * gjavah.c:  Support new -prepend -add -append flags.
18469         (print_method_info):  Method is not virtual if class is final.
18470
18471 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18472
18473         * jv-scan.c: Fixed copyright assignment.
18474         * keyword.gperf: Likewise.
18475         * keyword.h: Likewise.
18476         * lex.c: Fixed copyright assignment.
18477         (java_lex): Push unicode back when parsing '<'.
18478         * lex.h: Fixed copyright assignment.
18479         * parse-scan.y: Likewise.
18480         * parse.h: Fixed copyright assignment.
18481         (build_debugable_stmt, complete_for_loop): New function prototypes.
18482         * parse.y: Fixed copyright assignment.
18483         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18484         size_zero_node when completing a loop with no exit condition.
18485         (for_statement_nsi:): Define action.
18486         (for_init:, for_update:): Return size_zero_node when empty.
18487         (declare_local_variables): Call build_debugable_stmt.
18488         (build_debugable_stmt): New function.
18489         (build_loop_body): Build debugable statement around loop
18490         condition part.
18491         (complete_loop_body): Take into account the debugable statement
18492         around the EXIT_EXPR.
18493         (complete_loop_body): New function.
18494         (patch_exit_expr): Fixed condition inversion.
18495
18496 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18497
18498         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18499         name of thread define.
18500         * jvspec.c (THREAD_NAME): New macro.
18501         (GCLIB): Likewise.
18502         (THREADLIB): Likewise.
18503         (lang_specific_driver): Recognize attempt to link with thread
18504         library or gc library.  Recognize -ljava on command line so it
18505         isn't linked against more than once.
18506
18507 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18508
18509         * parse-scan.y (report_main_declaration): Name of the class
18510         containing `main' can be a qualified name.
18511
18512 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18513
18514         * config-lang.in: Changed gjavac to gjc everywhere.
18515         * Make-lang.in: Changed gjavac to gjc everywhere.
18516
18517 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18518
18519         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18520         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18521         and install the files.
18522         * Makefile.in (JAVA_OBJS_LITE): New variable.
18523         (compiler:): Now include jv-scan as a dependency.
18524         (../jv-scan$(exeext), parse-scan.c): New targets.
18525         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18526         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18527         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18528         check for errors even if parse_only.
18529         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18530         defined.
18531         (yylex): New function. Uses java_lex body.
18532         (java_lex): Removed commented out statement. Remove local variable
18533         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18534         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18535         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18536         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18537         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18538         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18539         where appropriate.
18540         (java_lex_error): Empty if JC1_LITE is defined.
18541         (java_get_line_col): Return 0 if JC1_LITE is defined.
18542         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18543         SET_MODIFIER_CTX): Moved into the section containing the macros
18544         conditionally defined by JC1_LITE.
18545         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18546         argument if JC1_LITE is defined.
18547         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18548         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18549         is defined.
18550         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18551         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18552         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18553         to different values according to JC1_LITE.
18554         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18555         declared if JC1_LITE set.
18556         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18557         defined if JC1_LITE not set.
18558         (struct parser_ctx): Reorganized and skip the jc1 front end part
18559         if JC1_LITE set.
18560         (java_layout_classes): New function definition.
18561         (java_push_parser_context, java_init_lex, yyparse, yylex,
18562         yyerror): Prototype always declared. All other static function
18563         prototypes declared only if JC1_LITE is not set.
18564         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18565         declared in parse.h.
18566         (java_layout_classes): New function.
18567         (java_complete_expand_methods): No longer layout the class here.
18568         * parse-scan.y: New file.
18569         * jv-scan.c: New file.
18570
18571 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18572
18573         * gjavah.c (main): Handle -friend option.
18574         (friend_specs): New global.
18575         (generate_access): Handle friend_specs.
18576         (process_file): Likewise.
18577         (MAX_FRIENDS): New macro.
18578         (friend_count): New global.
18579         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18580         Changed all callers.
18581
18582 1998-08-24  Per Bothner  <bothner@cygnus.com>
18583
18584         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18585         (main):  Handle processing all the entries of a named .zip archive.
18586         * jcf-io.c (jcf_trim_old_input):  New function.
18587         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18588
18589 1998-08-24  Per Bothner  <bothner@cygnus.com>
18590
18591         * lang.c (flag_assume_compiled):  Make default be on.
18592
18593 1998-08-21  Per Bothner  <bothner@cygnus.com>
18594
18595         * jcf-dump.c:  Add bunches of flags to control output more.
18596         (process_class):  New function;  support printing more than one class.
18597         (main): Support new --print-main and --javap flags.
18598         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18599         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18600
18601 1998-08-20  Per Bothner  <bothner@cygnus.com>
18602
18603         Change mangling of dispatch table to match C++ vtable (w/thunks).
18604         * class.c (build_dtable_decl), java-tree.h:  New function.
18605         (make_class_data):  Call it.
18606         * decl.c (init_decl_processing):  Likewise.
18607
18608 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18609
18610         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18611         soft_anewarray; adjust args passed.
18612         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18613         match _Jv_NewObjectArray.
18614
18615 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18616
18617         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18618         * expr.c (loopup_label): Call create_label_decl.
18619         (create_label_decl): New function.
18620         (java_lang_expand_expr): Call expand_start_bindings with argument
18621         set to zero.
18622         * java-tree.h Added space after PROTO in function declarations
18623         when necessary.
18624         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18625         (create_label_decl, push_labeled_block): New function
18626         declarations.
18627         * lex.c (label_id): Initialize.
18628         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18629         switch.
18630         * parse.h Added space after PROTO in function declarations when
18631         necessary.
18632         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18633         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18634         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18635         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18636         macros.
18637         (struct parser_ctxt): New fields current_loop,
18638         current_labeled_block.
18639         (build_if_else_statement, patch_if_else_statement,
18640         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18641         generate_labeled_block, complete_labeled_statement,
18642         build_bc_statement, patch_bc_statement, patch_loop_statement,
18643         build_new_loop, build_loop_body, complete_loop_body): New function
18644         declarations.
18645         * parse.y (java_warning_count): New global variable.
18646         (label_id): New static variable.
18647         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18648         (block:): Return size_zero_node when block is empty.
18649         (empty_statement:): Return size_zero_node.
18650         (statement:): Implement supplemental action when for_statement: is
18651         reduced.
18652         (label_decl:): New rule.
18653         (labeled_statement:): Rewritten using label_decl. Actions
18654         implemented.
18655         (labeled_statement_nsi:): Likewise.
18656         (if_then_statement): Actions implemented.
18657         (while_expression): New rule.
18658         (while_statement:): Rewritten using while_expression. Actions
18659         implemented.
18660         (while_statement_nsi:): Likewise.
18661         (do_statement_begin:): New rule.
18662         (do_statement:): Rewritten using do_statement_begin. Actions
18663         implemented.
18664         (for_statement:): Rewritten using for_begin. Actions implemented.
18665         (for_statement_nsi:): Likewise.
18666         (for_header:, for_begin:): New rules.
18667         (for_init:): Actions implemented.
18668         (statement_expression_list:, break_statement:,
18669         continue_statement:): Likewise.
18670         (yyerror): Count number of issued warning(s).
18671         (java_report_errors): Report error(s) and/or warning(s).
18672         (java_complete_class): Use build_java_argument_signature to
18673         recompute completed method signature.
18674         (java_check_regular_methods): New locals method_wfl and aflags.
18675         Use method_wfl instead of lookup_cl during error reports. Fixed
18676         indentation and modified some error messages. Use
18677         lang_printable_name in method instead of the DECL_NAME. New code
18678         to issue warnings on methods not overriding corresponding methods
18679         private to a different package.
18680         (java_method_add_stmt): Call add_stmt_to_compound.
18681         (add_stmt_to_compound): New function.
18682         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
18683         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
18684         (build_if_else_statement, patch_if_else_statement,
18685         build_labeled_block, generate_labeled_block,
18686         complete_labeled_statement, build_new_loop, build_loop_body,
18687         complete_loop_body, patch_loop_statement, build_bc_statement,
18688         patch_bc_statement, patch_exit_expr): New functions.
18689         * typeck.c (build_java_signature): Build argument signature before
18690         enclosing it in between parenthesis.
18691
18692 1998-08-17  Warren Levy  <warrenl@cygnus.com>
18693
18694         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
18695         (JAVA_OBJS): Added reminder comment
18696
18697 1998-08-13  Nick Clifton  <nickc@cygnus.com>
18698
18699         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
18700         be interpreted as a long long.
18701
18702 1998-08-13  Warren Levy  <warrenl@cygnus.com>
18703
18704         * decl.c (init_decl_processing): Use _Jv_InitClass, not
18705         soft_initialise_class.  Use _Jv_NewMultiArray, not
18706         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
18707         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
18708         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
18709         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
18710
18711 1998-08-12  Per Bothner  <bothner@cygnus.com>
18712
18713         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
18714         length_identifier_node):  New global tree node constants.
18715         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
18716         Replace uses by super_identifier_node etc.
18717         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
18718
18719         * parse.y (resolve_field_access):  Don't special-case ".length" if
18720         flag_emit_class_files.
18721         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
18722         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
18723         and ARRAY.length.
18724
18725 1998-08-11  Per Bothner  <bothner@cygnus.com>
18726
18727         * decl.c (init_decl_processing): Remove unused method_type_node fields.
18728         * class.c (make_method_value):  Remove init for removed fields.
18729
18730         * class.c (layout_class):  Use build_java_argument_signature.
18731         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
18732
18733         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
18734         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
18735         (build_java_signature):  Don't use push_java_argument_signature.
18736
18737         * typeck.c (lookup_argument_method):  New function.
18738         * parse.y (java_check_regular_methods):  Use lookup_argument_method
18739         instead of lookup_java_method2 followed by lookup_java_method.
18740
18741         * parse.y (check_method_redefinition):  Minor optimization.
18742
18743         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
18744         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
18745
18746 1998-08-10  Tom Tromey  <tromey@cygnus.com>
18747
18748         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
18749         c-pragma.o.
18750
18751         * gjavah.c (java_float_finite): Use K&R-style definition.
18752         (java_double_finite): Likewise.
18753         (generate_access): Now returns void.  Changed all callers.
18754         (last_access_generated): Removed.
18755         (process_file): Only make a single pass over the .class file.
18756
18757 1998-07-29  Per Bothner  <bothner@cygnus.com>
18758
18759         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
18760         for compatibility for G++ (with -fvtable-thunks).
18761         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
18762
18763         * gjavah.c (process_file):  Use public inheritance for super-class.
18764
18765 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18766
18767         * lex.c (java_init_lex): Initialize ctxp->package.
18768         * parse.h (struct parser_ctxt): package and package_len replaced
18769         by tree package, an identifier node. Field method_decl_list is
18770         gone. Fixed comments.
18771         (lookup_field_wrapper, merge_qualified_name, not_accessible,
18772         class_in_current_package): New function prototypes.
18773         * parse.y (array_type:): Set class loaded flag on primitive type
18774         arrays.
18775         (package_declaration:): Assign ctxp->package to the
18776         identifier node.
18777         (method_invocation:): Handle invocation of method qualified by
18778         `super'.
18779         (single_type_import_declaration:): Removed ambiguity check.
18780         (java_pop_parser_context): New local variable `next'. Reset and
18781         set IMPORT_CLASSFILE_NAME flags on current and previous import
18782         list.
18783         (java_accstring_lookup): Use new local macro COPY_RETURN.
18784         (lookup_field_wrapper): New function.
18785         (parser_qualified_classname): Use merge_qualified_name.
18786         (parser_check_super_interface): Broaden error message.
18787         (do_resolve_class): Check for qualified class name in the current
18788         compilation unit if appropriate.
18789         (process_imports): Check for already defined classes.
18790         (check_pkg_class_access): Got rid of call to
18791         get_access_flags_from_decl.
18792         (java_complete_expand_methods): Call safe_layout_class based on
18793         the current class size.
18794         (make_qualified_primary): Build a WFL qualification on primary if
18795         none exists.
18796         (merge_qualified_name): New function.
18797         (make_qualified_name): Use merge_qualified_name.
18798         (resolve_expression_name): Use safe_lookup_field.
18799         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
18800         (resolve_qualified_expression_name): Likewise. Check on resolved
18801         element accessibility.
18802         (not_accessible_p, class_in_current_package): New functions.
18803         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
18804         (patch_method_invocation_stmt): Merged common pieces. Check
18805         accessibility of invoked method.
18806         (check_for_static_method_reference): Add returned type in error
18807         message.
18808         (invocation_mode): Get rid of bogus check on PRIVATE methods.
18809         (refine_accessible_methods_list): Merged two conditions in test.
18810         (java_complete_class): Sanity check on stabilize_ref gone.
18811         * zextract.c (read_zip_archive): Cast lseek second argument to long.
18812
18813 1998-07-28  Per Bothner  <bothner@cygnus.com>
18814
18815         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
18816
18817 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18818
18819         * gjavah.c (F_NAN): Removed.
18820         (F_NAN_MASK): New macro.
18821         (F_POSITIVE_INFINITY): Removed.
18822         (F_NEGATIVE_INFINITY): Likewise.
18823         (java_float_finite): Rewrote.
18824         (D_NAN_MASK): Renamed.
18825         (java_double_finite): Rewrote.
18826         (D_POSITIVE_INFINITY): Removed.
18827         (D_NEGATIVE_INFINITY): Likewise.
18828
18829         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
18830         If verbose, print underlying representation of value in hex.
18831
18832 1998-07-24  Per Bothner  <bothner@cygnus.com>
18833
18834         * buffer.h, buffer.c:  New files.
18835         * Makefile.in (JAVA_OBJS):  Add buffer.o.
18836
18837         Support locals variables and writing their debug entries to .class.
18838         * jcf-write.c:  Simplify some by user new buffer type.
18839         (vode_buffer_grow):  Removed.
18840         (struct localvar_info):  New type.
18841         (localsvars, localvartable):  New buffers.
18842         (localvar_alloc, localvar_free):  New functions.
18843         (generate_bytecode_insns):  Handle local variables.
18844         (generate_classfile):  Write LocalVariableTable attribute.
18845
18846 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18847
18848         * jcf-io.c (open_in_zip): Check the zipfile magic number.
18849         * zipfile.h (ZIPMAGIC): New macro.
18850
18851 1998-07-24  Tom Tromey  <tromey@cygnus.com>
18852
18853         * Makefile.in (gjavah.o): Updated dependencies.
18854         (jcf-dump.o): Likewise.
18855         (all.indirect): Use ../gjavah.
18856         (../gjavah$(exeext)): Likewise.
18857         (clean): Don't remove gjavah.
18858         (clean): Remove parse.c, not java/parse.c.
18859         * Make-lang.in (java): Added gjavah.
18860         (gjavah$(exeext)): New target.
18861         (GJAVAH_SOURCES): New macro.
18862         (java.all.build): Added gjavah.
18863         (java.all.cross): Likewise.
18864         (java.rest.encap): Likewise.
18865         * config-lang.in (compilers, stagestuff): Added gjavah.
18866
18867 1998-07-23  Tom Tromey  <tromey@cygnus.com>
18868
18869         * gjavah.c (java_float_finite): New function.
18870         (java_double_finite): Likewise.
18871         (F_POSITIVE_INFINITY): New macro.
18872         (F_NEGATIVE_INFINITY): Likewise.
18873         (F_NAN): Likewise.
18874         (D_POSITIVE_INFINITY): Likewise.
18875         (D_NEGATIVE_INFINITY): Likewise.
18876         (D_NAN): Likewise.
18877         (print_field_info): Use java_float_finite and java_double_finite.
18878
18879 1998-07-23  Per Bothner  <bothner@cygnus.com>
18880
18881         * parse.y (method_header):  Name "this" implicit argument.
18882
18883 1998-07-22  Per Bothner  <bothner@cygnus.com>
18884
18885         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
18886         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
18887         (put_linenumber):  New function.
18888         (generate_bytecode_insns, generate_classfile):  Write line numbers.
18889
18890 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18891
18892         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
18893         (lookup_name, build_known_method_ref, build_class_init,
18894         build_invokevirtual, invoke_build_dtable, match_java_method,
18895         build_field_ref, pushdecl_force_head, build_java_binop,
18896         binary_numeric_promotion, build_decl_no_layout,
18897         build_java_arrayaccess, build_newarray, build_anewarray,
18898         build_java_array_length_access, build_java_arraynull_check): New
18899         extern function prototypes.
18900         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18901         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
18902         java-tree.h.
18903         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
18904         to NULL
18905         * jcf.h (jcf_out_of_synch): New extern function prototype.
18906         * parse.h: Static/global function implemented in parse.y
18907         prototyped and declarations moved at the end of the file.
18908         (DECL_P): Check that the argument isn't null.
18909         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18910         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
18911         (QUAL_DECL_TYPE): New macro.
18912         (PARAMS): Macro definition removed.
18913         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
18914         (return_statement:): Call build_return.
18915         (field_access:): Call make_qualified_primary in sub rule.
18916         (method_invocation:): Build method invocation and call
18917         make_qualified_primary when processing primaries.
18918         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
18919         get_type_from_signature.
18920         (java_check_regular_method): Extra integer 0 argument when calling
18921         lookup_java_method2.
18922         (lookup_java_interface_method2): Extra method DECL argument when
18923         calling lookup_java_interface_method2.
18924         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
18925         COMPOUND_EXPR node.
18926         (java_complete_expand_method): Layout current class iff not
18927         already done. Don't process interface's methods.
18928         (java_complete_expand_method): Use super class only if it
18929         exists. Use current class otherwise.
18930         (make_qualified_primary): New function.
18931         (resolve_expression_name): Process qualified expression or
18932         expression from primary the same way.
18933         (resolve_expression_name): Two last arguments to
18934         resolve_field_access are now NULL_TREEs.
18935         (resolve_field_access): New variable is_static. Local field must
18936         be DECLs. is_static computed on field DECLs only. Append code in
18937         where_found to the field access if necessary. Use QUAL_DECL_TYPE
18938         to initialize field_type.
18939         (resolve_qualified_expression_name): New local variable,
18940         previous_call_static and is_static. Handle primaries with function
18941         calls, casts, array references and `this'. `super' now handled as
18942         `(super_class)this'. Use is_static to clarify boolean expressions.
18943         Added code to handle case where a proper handle is required to
18944         access a field. Use QUAL_DECL_TYPE where applicable.
18945         (maybe_access_field): New function.
18946         (patch_method_invocation_stmt): New arguments primary, where,
18947         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
18948         deleted. Use `where' as a type to search from if specified. Check
18949         for static method reference where forbidden. Append primary or
18950         current_this to the argument list if not calling constructor nor
18951         static methods.
18952         (check_for_static_method_reference): New function.
18953         (patch_invoke): Layout the class on which new is done if
18954         necessary.
18955         (lookup_method_invoke): Changed format to report errors on
18956         methods.
18957         (qualify_ambiguous_name): New local variable this_found. Now
18958         handle things from primaries. Method call are considered
18959         expression names.
18960         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
18961         changed into NULLs.
18962         (not_initialized_as_it_should_p): Comply with the new DECL_P.
18963         (java_complete_tree): New case fo RETURN_EXPR. Process function
18964         call arguments in separate function.
18965         (complete_function_arguments): New function.
18966         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
18967         anymore.
18968         (patch_assignment): Take the return function slot into account as
18969         a RHS. Distinguish assignment from a return.
18970         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
18971         when checking methods in interfaces.
18972         (resolve_type_during_patch): NULL argument to unresolve_type_p
18973         instead of NULL_TREE.
18974         (patch_newarray): Fixed typo in comment.
18975         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
18976         (build_return, patch_return): New functions.
18977         * typeck.c (lookup_java_constructor): Fixed typo in comment.
18978
18979 1998-07-21  Per Bothner  <bothner@cygnus.com>
18980
18981         * constants.c (find_name_and_type_constant, find_fieldref_index,
18982         find_methodref_index):  New methods.
18983         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
18984         just return given method.  Also, rename to build_known_method_ref.
18985         (expand_invoke):  Rename call to build_invoke_non_interface.
18986         * java-tree.h, parse.h:  Update prototype.
18987         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
18988         (such as expand_expr_stmt) if flag_emit_class_files.
18989         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
18990         STACK_TARGET, IGNORE_TARGET):  New macros.
18991         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
18992         (generate_bytecode_insn):  New function to generate method's bytecode.
18993         (generate_classfile):  Node generate Code attribute for a method.
18994         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
18995         push_long_const, field_op, adjust_typed_op, maybe_wide):
18996         New functions used by generate_bytecode_insn.
18997
18998         * typeck.c (signature_include_return):  Remove variable.
18999         (push_java_argument_signature, build_java_argument_signature):  New.
19000         (build_java_signature):  Use push_java_argument_signature.
19001         * parse.y:  Use build_java_argument_signature instead of fiddling
19002         with signature_include_return.
19003
19004 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19005
19006         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19007         types.
19008
19009         * Makefile.in (all.indirect): Added gjavah$(exeext).
19010         (gjavah$(exeext)): Added $(exeext).
19011         (clean): Likewise.
19012
19013 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19014
19015         * class.c (layout_class): Call to java_layout_parsed_class replace
19016         by safe_layout_class.
19017         * expr.c (build_java_array_length_access): Removed static storage
19018         class in the function definition.
19019         (build_java_arraynull_check): Likewise.
19020         Also fixed typos in two comments.
19021         * lex.c (java_init_lex): Initialize static global kw_length.
19022         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19023         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19024         java_lex_error.
19025         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19026         * parse.h (resolve_no_layout): New static function declaration.
19027         (get_identifier_in_static): Declaration removed.
19028         (java_layout_parsed_class): Function name declaration changed to
19029         safe_layout_class.
19030         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19031         not_initialized_as_it_should_p, build_this): New static function
19032         declarations.
19033         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19034         binary_numeric_promotion, stabilize_reference,
19035         build_decl_no_layout, build_java_arrayaccess): Extern function
19036         declarations moved into their own section.
19037         (build_newarray, build_anewarray, build_java_array_length_access,
19038         build_java_arraynull_check): New extern function declarations.
19039         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19040         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19041         fake tree codes.
19042         (CALL_CONSTRUCTOR_P): New macro.
19043         * parse.y (kw_length): New static global tree node.
19044         (return_statement): Tagged <node>.
19045         (RETURN_TK): Tagged <operator>.
19046         (variable_declarator_id:): Build variable declaration with an
19047         empty initialization value if a syntax error was found in the
19048         initialization part of the variable declaration.
19049         (statement_without_trailing_substatement:): return_statement: now
19050         uses the default rule.
19051         (return_statement:): Temporarily fixed to return NULL_TREE.
19052         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19053         (class_instance_creation_expression:): Class creation rules now
19054         call build_method_invocation upon reduction.
19055         (array_creation_expression:): Rules call build_newarray_node upon
19056         reduction.
19057         (dim_exprs:): Build a list of dimension expressions.
19058         (dim_expr:): Store location of the OSB_TK in the dimension
19059         expression node.
19060         (method_invocation:): Added a new error rule.
19061         (build_unresolved_array_type): WFL argument may also be an array
19062         on a primitive type. Name of the argument changed to reflect this.
19063         (method_declarator): Insert argument type at the beginning of the
19064         argument type list and later reverse the list.
19065         (unresolved_type_p): Argument 'returned' may be optionally
19066         NULL_TREE.
19067         (java_layout_class_from_source): Function renamed
19068         safe_layout_class.
19069         (resolve_and_layout): Now call resolve_no_layout and
19070         safe_layout_class.
19071         (resolve_no_layout): New function.
19072         (purify_type_name): New function.
19073         (complete_class_report_errors): Call purify_type_name during error
19074         report on a type not found.
19075         (process_imports): error_found local variable doesn't need to be
19076         initialized to zero.
19077         (declare_local_variables): New local type_wfl. Fixed typo in error
19078         message. type_wfl assigned to unresolved type and used to register
19079         incomplete type. Build a WFL around the variable initialization
19080         statement so that debug info can be generated on it.
19081         (source_start_java_method): Reverse argument list after they've
19082         been processed.
19083         (current_this): New static global variable.
19084         (java_complete_expand_methods): Set current_this when appropriate.
19085         (resolve_expression_name): Build correct static and non static
19086         field access bearing a simple name.
19087         (resolve_field_access): Resolve the length field of arrays. Handle
19088         f.m() cases.
19089         (patch_method_invocation_stmt): Set the type of the method
19090         invocation to error_mark_node. This value is later overridden by a
19091         valid type, if any. Don't handle qualified constructor invocation
19092         as qualified method invocation. Call lookup_method_invoke with its
19093         new flag. It's no longer necessary to access the selected method
19094         as the value of a tree list. Handle constructor invocation.
19095         (patch_invoke): Reverse argument list when invoking non interface
19096         methods. Insert call to new as the first argument of the
19097         constructor.
19098         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19099         defined within a final class. Return INVOKE_STATIC if the invoked
19100         method is a constructor.
19101         (lookup_method_invoke): New lc argument is a flag to indicate a
19102         constructor lookup. Now handle constructor lookup. Choose the most
19103         specific method in case several were matching the invocation
19104         requirements. Return a method decl instead of a tree list featuring
19105         one single method decl element.
19106         (refine_accessible_methods_list): New lc flag argument to
19107         indicate that a constructor is being looked up.
19108         (not_initialized_as_it_should_p): New function.
19109         (java_complete_tree): Now process fake tree codes
19110         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19111         save_expr on resolved function call arguments. Case on
19112         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19113         (patch_assignment): LHS can be a field access expression. When
19114         dealing with reference, lhs_type is the promoted type of the
19115         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19116         applicable.
19117         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19118         (patch_binop): Use not_initialized_as_it_should_p where
19119         applicable.
19120         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19121         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19122         where applicable.
19123         (resolve_type_during_patch): New function.
19124         (patch_cast): Call resolve_type_during_patch to resolve type and
19125         report error accordingly.
19126         (patch_array_ref): Use not_initialized_as_it_should_p where
19127         applicable. Array base expression is saved before being
19128         used. Promote the type of an array elements if it contains non
19129         builtin types.
19130         (build_newarray_node, patch_newarray, build_this): New functions.
19131
19132 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19133
19134         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19135         increment it in `for' statement.
19136         (print_field_info): If number is inf or nan, don't print it.
19137         (print_method_info): If method name is `delete', just ignore it.
19138         (print_c_decl): Special-case jstringArray.
19139
19140         * gjavah.c (help): New function.
19141         (no_argument): New function.
19142         (usage): Changed text.
19143         (main): Rewrote argument handling.  Now handles -v, --help,
19144         --version.
19145         (version): New function.
19146         (found_error): New global.
19147         (main): Return found_error.
19148         (generate_access): Set found_error.
19149         (print_c_decl): Likewise.
19150
19151 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19152
19153         * gjavah.c (print_c_decl): Don't print "," when examining field.
19154         Skip type name when looking at "[L" types.
19155         (process_file): Now static.
19156         (generate_access): Now returns int.
19157         (last_access_generated): New global.
19158         (process_file): Clear last_access_generated; make multiple passes
19159         over the class.
19160         (print_field_info): Just return if generate_access returns true.
19161         (print_method_info): Likewise.  Also, allow <init> functions to
19162         pass through.
19163         (print_c_decl): Added is_init argument.  Print constructors
19164         properly.
19165         (print_cxx_classname): Use UTF8_GET to extract characters from
19166         string.
19167         (print_base_classname): New function.
19168         (print_class_decls): New function.
19169         (process_file): Use it.
19170         (utf8_cmp): New function.
19171
19172 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19173
19174         * lang-options.h: Format changed to match changes in gcc/toplev.c
19175         to implement a --help option.
19176
19177 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19178
19179         * decl.c (init_decl_processing): Revert change to dtable_type.
19180
19181 1998-07-09  Per Bothner  <bothner@cygnus.com>
19182
19183         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19184
19185 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19186
19187         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19188
19189         * lang.c (lang_init): Default flag_exceptions to 1, without
19190         checking to see if it's 2 first.
19191
19192 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19193
19194         * constants.c: Include "system.h".
19195         * decl.c: Likewise.
19196         * lang.c (flag_new_exceptions): Get via extern now.
19197         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19198
19199 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19200
19201         * lex.c (java_lex): Return 0 when we see an invalid character in
19202         the input.
19203
19204         * lex.c (java_read_char): Specify extra argument when calling
19205         java_lex_error.
19206         (java_read_unicode, java_parse_end_comment,
19207         java_parse_escape_sequence): Likewise,
19208         (java_lex): Specify extra argument when calling
19209         java_lex_error. Test that IDs are beginning with a legal character
19210         for IDs. Handle invalid characters with an error message and a
19211         call to java_lex_error.
19212         (java_lex_error): Adjust column position by new argument
19213         `forward'. Issue an error even if in the middle of reporting an
19214         other error.
19215
19216 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19217
19218         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19219         we don't explicitly put a null pointer when we're copying it.
19220
19221 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19222
19223         * gjavah.c (print_cxx_classname): New function.
19224         (super_class_name): Likewise.
19225         (print_super_fields): Removed.
19226         (in_super): Removed.
19227         (print_field_info): Never generate #defines.
19228         (print_c_decl): Changed generated types to match JNI.  No longer
19229         print class name before method name.
19230         (print_method_info): Print "static" before static methods.
19231         Print "virtual" before non-final methods.
19232         (usage): Use exit(1), not exit(-1).
19233         (main): Likewise.
19234         (print_field_info): Use %.17g to print a double.
19235         (last_access): New globals.
19236         (process_file): Initialize last_access.
19237         (usage): Now static.
19238         (ACC_VISIBILITY): New define.
19239         (generate_access): New function.
19240         (print_field_info): Call it.
19241         (print_method_info): Likewise.  Also, generate information for all
19242         methods, not just native methods.  Return void.
19243         (print_c_decl): Return void.
19244         (print_field_info): Return void.
19245
19246 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19247
19248         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19249         processing the jc1 grammar file. Prefix bison functions and
19250         variables with java_.
19251         (parse.c): Dependencies on parse.h and lex.h
19252         * expr.c (build_java_arrayaccess): Function now global.
19253         * java-tree.h: Comment reorganized to carry on previous
19254         classification effort.
19255         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19256         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19257         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19258         java_parse (new prefix java_ generated by bison).
19259         (java_layout_parsed_class, java_register_parsed_class): Function
19260         call removed.
19261         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19262         * lex.c (static tree wfl_op): Variable deleted.
19263         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19264         ctxp fields to NULL_TREE.
19265         (java_lex): No longer create WFL for operators. Filename caching
19266         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19267         created as STRING_CST and later expanded. Removed extra argument
19268         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19269         and SUPER.
19270         (build_wfl_node): Removed code in comments.
19271         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19272         store token and location data in the current bison token.
19273         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19274         static/extern function declaration at the beginning of the file.
19275         (struct qualification): Data structure definition deleted.
19276         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19277         (qualify_ambiguous_name): Function declaration modified. Function
19278         now returns nothing.
19279         (build_array_ref, patch_array_ref, make_qualified_name,
19280         resolve_qualified_expression_name, maybe_generate_clinit,
19281         resolve_field_access): New static function declarations.
19282         (build_java_arrayaccess): New extern function declaration.
19283         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19284         (CALL_EXPR_PRIMARY): Macro deleted.
19285         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19286         (struct parser_ctxt): Field initialized_final
19287         removed. non_static_initialized, static_initialized: New fields.
19288         * parse.y (static tree kw_super, static tree kw_this): New global
19289         static.
19290         (%union): tree wfl field of operator member replaced by int
19291         location. WFLs are non longer created for operators.
19292         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19293         (qualified_name:): Now calls make_qualified_name to build the
19294         identifier.
19295         (type_declaration:): Consider generating <clinit> when class
19296         parsing completed.
19297         (variable_declarator:): Directly build an assignment node when the
19298         variable is initialized when declared.
19299         (this_or_super:): Build a WFL and set current location when THIS
19300         or SUPER are parsed.
19301         (expression_statement:): Wrap statement around a WFL.
19302         (primary_no_new_array:): Fixed typo. Changed value returned by
19303         THIS_TK because of its new type (temporary).
19304         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19305         (field_access:): Build qualified name with SUPER.
19306         (method_invocation:): Fixed returned value because of SUPER's new
19307         type.
19308         (array_access:): Use OSB_TK location information.
19309         (post_increment_expression:, post_decrement_expression:,
19310         unary_expression:, pre_increment_expression:,
19311         pre_decrement_expression:, unary_expression_not_plus_minus:,
19312         cast_expression:, multiplicative_expression:,
19313         additive_expression:, shift_expression:, relational_expression:,
19314         equality_expression:, and_expression:, exclusive_or_expression:,
19315         inclusive_or_expression:, conditional_and_expression:,
19316         conditional_or_expression:, assignment:): Use new location/token
19317         information available on operators.
19318         (create_class): Set super_decl_type to NULL_TREE when processing
19319         java.lang.Object.
19320         (register_fields): Field initialization is now a MODIFY_EXPR
19321         node. Chain initialization code to the matching lists (according
19322         to the field declaration modifiers).
19323         (maybe_generate_clinit): New function.
19324         (method_header): Don't set method's DECL_NAME to a WFL when adding
19325         methods to java.lang.Object.
19326         (resolve_and_layout): Now can return NULL_TREE if the type
19327         resolution fails. Otherwise, return the class DECL instead of its
19328         TYPE.
19329         (check_method_redefinition): Don't patch method DECL_NAME if it
19330         belongs to java.lang.Object.
19331         (process_imports): Simply assign error_found to the value returned
19332         by check_pkg_class_access.
19333         (declare_local_variables): Don't use their init statements (if
19334         any) when parsing error were previously found. Reuse MODIFY_EXPR
19335         build during parsing as an init statement.
19336         (java_method_add_stmt): Now return the current method body.
19337         (java_layout_parsed_class, java_register_parsed_class): Functions
19338         removed.
19339         (java_complete_expand_methods): Initialize the constant pool on a
19340         per class basis. Layout the classes before expanding their method
19341         bodies. Don't try expand artificial constructor code if error were
19342         found. Make the classes data and register them if no error were
19343         found.
19344         (java_complete_expand_method): Retrieve an artificial constructor
19345         argument list before entering its body. Assign the top block to
19346         the artificial constructor function body and set types of declared
19347         blocks and compound statements to void. Walk method body if not an
19348         artificial constructor.
19349         (make_qualified_name, cut_identifier_in_qualified): New functions.
19350         (resolve_expression_name): Fixed comments. Save/restore the
19351         current class CLASS_LOADED_P flag value. Build non qualified
19352         static field access and handle qualified expression names.
19353         (resolve_field_access, resolve_qualified_expression_name): New
19354         functions.
19355         (patch_method_invocation_stmt): Use the new expression resolution
19356         scheme, calling resolve_field_access when the function call is
19357         resolved as an expression.
19358         (qualify_ambiguous_name): Function rewritten to work on qualified
19359         expression produced by make_qualified_name.
19360         (java_complete_tree): Promote type when function's argument are
19361         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19362         the assignment to discover further errors if RHS is a expression
19363         name that fails to evaluate. Declare LHS initialized even though
19364         the assignment failed. Don't use the location variable and removed
19365         extra argument in patch function calls. Now handle the ARRAY_REF
19366         case and build internal string representation when STRING_CSTs are
19367         walked.
19368         (build_method_invocation): Don't wrap function call around a WFL.
19369         (build_assignment): Likewise. Use the operator location
19370         information.
19371         (patch_assignment): Handle array access LHSs. Handle error
19372         provenance, resulting in a better error report.
19373         (build_binop): Use op_location from operator as binop location
19374         information.
19375         (build_unaryop, build_incdec, build_cast): Likewise.
19376         (patch_binop): Extract location information from the node. Fixed
19377         typo in error message.
19378         (patch_unary_op): Extract location information from the node.
19379         (build_array_ref, patch_array_ref): New functions.
19380
19381 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19382
19383         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19384         match _Jv_IsInstanceOf.
19385         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19386         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19387
19388 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19389
19390         * decl.c (init_decl_processing): Functions are now named
19391         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19392
19393 1998-06-29  Per Bothner  <bothner@cygnus.com>
19394
19395         * java-tree.h (load_class):  Add prototype.
19396         * class.c (is_compiled_class):  Add missing arg to load_class.
19397         * expr.c (expand_java_NEW):  Call load_class.
19398         * parse.y (process_import):  Removed bogus use of void return value.
19399
19400 1998-06-25  Per Bothner  <bothner@cygnus.com>
19401
19402         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19403         Function name is "_Jv_Throw" instead of "soft_athrow".
19404         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19405         Function name is "_Jv_AllocObject" instead of "soft_new".
19406         Takes an extra parameter (object size).
19407         * expr.c:  Update calls.
19408
19409 1998-06-24  Per Bothner  <bothner@cygnus.com>
19410
19411         * lex.c (java_get_line_col):  Handle end-of-file.
19412         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19413
19414 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19415
19416         * lang.c (lang_init): Make -fexceptions the default.
19417         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19418         exception handling is not turned on.
19419
19420 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19421
19422         * lang.c (flag_new_exceptions): Make this this default.
19423         * decl.c (end_java_method): Call emit_handlers.
19424         * except.c (method_init_exceptions): Set language code and version.
19425         (expand_start_java_handler): Enable exception, and call
19426         expand_eh_region_start.
19427         (expand_end_java_handler): Enable exception, and set up catch blocks.
19428         (emit_handlers): New routine to generate the saved handlers.
19429         * java-except.h (emit_handlers): Add prototype.
19430
19431 1998-06-12  Per Bothner  <bothner@cygnus.com>
19432
19433         We used to have three different representations of the constant pool:
19434         the CPool structure, the tree_constant_pool, and the constructures
19435         used to build the Class object (which may need class and string
19436         constants) in compiled code.  None were appropriate for compiling
19437         to .class files, so I did a major overhaul.
19438
19439         First, the tree_constant_pool array was removed.  Things were
19440         modified to the CPool structure in the JCF could be used.
19441         Second, a "capacity" field was added to the CPool, and functions
19442         written to search for a matching constant, adding one if not found.
19443         The code that generated the Class object was changed to use a CPool.
19444         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19445         the static Class object are now only in build_constants_constructor.
19446         Finally, I wrote code which can generate a .class file (including its
19447         constant pool) from the RECORD_TYPE of a class.  This is a big step
19448         on the way to compiling Java source into .class files.
19449
19450         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19451         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19452
19453         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19454         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19455         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19456         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19457         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19458         (lang_type):  Removed constant_pool field.
19459         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19460         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19461         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19462         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19463
19464         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19465         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19466         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19467         (set_constant_entry, find_constant1, find_constant2,
19468         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19469         find_utf8_constant, find_class_or_string_constant):  New functions.
19470
19471         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19472         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19473         (give_name_to_class, get_class_constant):  Likewise.
19474         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19475         (get_name_and_type_constant, get_ref_constant):  Removed.
19476         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19477         * parse.y:  Don't save/restore tree_constant_pool.
19478         * verify.c (verify_jvm_instructions):  Update for new approach.
19479         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19480
19481         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19482         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19483         (lang_f_options):  Added "emit-class-file(s)".
19484
19485         * expr.c (build_java_arrayaccess):  Generate more efficient array
19486         bounds checking, by using unsigned compare.
19487
19488         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19489
19490 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19491
19492         * parse.h: New comment on the handling of unresolved type
19493         identifiers. JDEPs are now part of the jdep_code enum.
19494         (typedef struct jdep): Now use enum jdep_code or int, depending on
19495         availability. Both are narrowed down to an 8 bits bitfield.
19496         (CALL_EXPR_PRIMARY): Fixed comment.
19497
19498 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19499
19500         * Make-lang.in (java): Added gjavac and jvgenmain.
19501         (java.start.encap): Depend on gjavac.
19502         (java.rest.encap): Depend on jvgenmain.
19503
19504         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19505         (JAVA_CROSS_NAME): Likewise.
19506         (java.all.build): Depend on jvgenmain and gjavac.
19507         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19508         (jvgenmain$(exeext)): New target.
19509         (java.install-common): Wrote.
19510         * config-lang.in (compilers, stagestuff): Added gjavac and
19511         jvgenmain.
19512
19513 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19514
19515         * lang.c (lang_decode_option): New argc/argv interface.
19516
19517 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19518
19519         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19520         * decl.c (build_decl_no_layout): New function.
19521         * expr.c (java_lang_expand_expr): Layout declarations found in
19522         blocks before they're pushed.
19523         * jcf-parse.c (load_class): Save current line when parsing class
19524         file.
19525         (parse_source_file): Register class before expanding their
19526         methods.
19527         * lang.c (put_decl_node): Produce `null' when `void *' is
19528         processed.
19529         * lex.c (static tree wfl_op): New static global, for error report
19530         on casts.
19531         (java_init_lex): wfl_operator and wfl_op initialized
19532         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19533         parsed.
19534         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19535         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19536         build_unresolved_array_type): New static function definitions.
19537         (build_decl_no_layout): New extern function declared.
19538         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19539         faulty modifier exists.
19540         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19541         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19542         (UNARY_PLUS_EXPR): New fake operator.
19543         (struct parser_ctxt): New field osb_number.
19544         * parse.y (static tree wfl_operator): New static WFL for operator
19545         bound error messages.
19546         (DECR_TK, INCR_TK): Moved.
19547         (OP_TK): Tagged <operator>.
19548         (array_type:): Now call build_unresolved_array_type.
19549         (dim_expr:): Count the number of '[' seen.
19550         (post_increment_expression, post_decrement_expression,
19551         pre_increment_expression, pre_decrement_expression,
19552         unary_expression_not_plus_minus, unary_expression:): Actions are
19553         now building the corresponding unary expressions.
19554         (cast_expression:): Actions are now building cast expressions.
19555         (build_unresolved_array_type): New function.
19556         (create_interface): Reset the number of declared interfaces.
19557         (create_class): Likewise.
19558         (method_header): Methods declared within the scope of an interface
19559         are now implicitly set public and abstract.
19560         (java_complete_class): Variable's and parameter's type are patched
19561         with a promoted type.
19562         (declare_local_variables): Resolved non builtin types are promoted
19563         before being used to build a variable decl. Removed type patch
19564         posted on variable initialization statement.
19565         (source_start_java_method): Use build_decl_no_layout to build the
19566         decl of a parameter of incomplete type.
19567         (java_register_parsed_class): Process interfaces too. Call
19568         rest_of_decl_compilation on each processed class declarations.
19569         (java_complete_expand_methods): Don't attempt to expand things in
19570         interfaces.
19571         (java_complete_tree): Process CONVERT_EXPR, even though it always
19572         has a type. Propagate error_mark_node to node's type too. Promote
19573         method's call argument type and return error_mark_node if
19574         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19575         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19576         handle unary operator nodes.
19577         (build_assignment): Added comment.
19578         (print_int_node): New function.
19579         (patch_assignment): New second argument. New error handling. Use
19580         print_int_node. Handle references. Use can_cast_to_p to issue
19581         different error message according to the context and check upon
19582         the initialization of the RHS.
19583         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19584         (operator_string): Handle more operators.
19585         (patch_binop): No longer use a function static
19586         wfl_operator. Improved error message on shift distance.
19587         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19588         patch_cast): New functions.
19589
19590 1998-06-05  Per Bothner  <bothner@cygnus.com>
19591
19592         * jvspec.c:  New file.
19593         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19594
19595         * java-tree.h (identifier_subst):  Add declaration.
19596
19597 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19598
19599         * jvgenmain.c (main): Generate call to JvRunMain.
19600
19601         * class.c (make_class_data): Push value for "sync_info" field.
19602         * decl.c (init_decl_processing): Push "sync_info" field.
19603
19604 1998-06-03  Per Bothner  <bothner@cygnus.com>
19605
19606         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19607         Java (source) name, not signature.
19608         Set TYPE_ALIGN to (at least) that of element_type.
19609
19610 1998-06-02  Per Bothner  <bothner@cygnus.com>
19611
19612         * class.c:  Moved classname-mangling-rekated code to ...
19613         * mangle.c:  ... this new file.
19614         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19615         * Makefile.in:  Update for above changes.
19616
19617 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19618
19619         * expr.c (truthvalue_conversion): Convert integer and floating
19620         point value to their truth value.
19621         * lex.c (java_lex): Handle the `null' literal.
19622         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19623         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19624         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19625         New macros.
19626
19627         * parse.y: Reorganization/documentation on token declaration.
19628         (binop_lookup[]): New added new tree codes.
19629         (relational_expression): Build corresponding binary operators.
19630         (equality_expression, conditional_and_expression,
19631         conditional_or_expression): Likewise.
19632         (java_complete_class): Fix crash in debug message.
19633         (java_complete_tree): Check initialization of method call
19634         arguments. Further bogus node evaluation to detect more error
19635         during assignments. Handles more binary operators.
19636         (patch_assignment): Use DECL_P.
19637         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19638         code.
19639         (operator_string): Handle more case. Compacted source.
19640         (patch_binop): Changed function comment. Checking for
19641         uninitialized first operand takes the compound assignment into
19642         account and uses DECL_P. Checking for uninitialized second operand
19643         delayed to routine's end. Use macros to issue type bound error
19644         messages and issue messages on both operands if their types are
19645         different. Force fixed type into node. Handle all binary
19646         operators.
19647
19648 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19649
19650         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19651         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19652         build operator node and return tokens.
19653         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19654         * parse.h (java_complete_tree): Changed returned type in prototype.
19655         (build_method_invocation, build_assignment, patch_assignment,
19656         patch_binop): New static function declarations.
19657         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19658         BUILD_EXPR_WFL): New macros.
19659         * parse.y (enum tree_code binop_lookup[]): New static for token to
19660         TREE_CODE lookup.
19661         (%union): Parser union has new sub-structure `operator'.
19662         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19663         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19664         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19665         ASSIGN_ANY_TK): Tokens tagged `operator'.
19666         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19667         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19668         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19669         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19670         (assignment_operator:): Rule tagged `operator'.
19671         (expression_statement:): Re-installed default rule.
19672         (method_invocation:): Sub rules call build_method_invocation.
19673         (postfix_expression:): Don't attempt to resolve name here. Just
19674         return an ID.
19675         (multiplicative_expression:): Sub-rules build corresponding binop
19676         expression node.
19677         (additive_expression:, shift_expression:, and_expression:,
19678         exclusive_or_expression:, inclusive_or_expression:): Likewise.
19679         (assignment:): Sub rule invoke build_assignment.
19680         (assignment_operator:): Default rules on sub rules.
19681         (force_error): Added documentation on this variable.
19682         (declare_local_variables): Build initialization calling
19683         build_assignment.
19684         (expand_start_java_method): Removed unused rtx declaration. Mark
19685         arguments as already initialized.
19686         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
19687         (java_complete_expand_methods): Don't process next method if
19688         completion of the previous one triggered errors.
19689         (java_complete_expand_method): Call source_end_java_method if no
19690         error were found during completion.
19691         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
19692         locals declaratilon. Handle names found within a class. Return
19693         error_mark_node when things aren't found.
19694         (patch_method_invocation_stmt): Return error_mark_node on failures.
19695         (patch_invoke): Removed unused local. Return the correct node.
19696         (java_complete_tree): Now returns a value. The BLOCK section binds
19697         local identifiers and the type of a BLOCK is now void. Assign the
19698         result of operand completion on COMPOUND_EXPR. Assign the
19699         encapsulated node of a WFL to the result of its completion, except
19700         when the node is an identifier. Now handle MODIFY_EXPR and several
19701         binary operators. Return error_mark_node on errors.
19702         (build_method_invocation, build_assignment, patch_assignment,
19703         build_binop, operator_string, patch_binop): New functions.
19704         * typeck.c (binary_numeric_promotion): New function.
19705
19706 1998-05-21  Per Bothner  <bothner@cygnus.com>
19707
19708         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
19709         Replace most uses of ident_subst by identifier_subst.
19710
19711         * class.c (push_class_static_dummy_field):  Removed function.
19712         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
19713         instead of looking got "class" static field.  Create that decl here.
19714         (class_identifier_node):  Removed;  no longer needed.
19715         (init_class_processing):  Don't init class_identifier_node.
19716         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
19717         Do nreverse 0 times (instead of twice) for Object and Class.
19718         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
19719
19720 1998-05-20  Per Bothner  <bothner@cygnus.com>
19721
19722         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
19723         while initializing linenumber_count and linenumber_table.
19724         Do it before init_function_start (which calls emit_line_note).
19725         * expr.c (expand_byte_code):  Don't need to clear lineno here.
19726
19727 1998-05-18  Tom Tromey  <tromey@cygnus.com>
19728
19729         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
19730         then mangle number as _N_.
19731
19732         * class.c (mangle_class_field): New function.
19733         (build_class_ref): Set assembler name of class reference using
19734         mangle_class_field.
19735         (push_class_static_dummy_field): Likewise.
19736
19737 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
19738
19739         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
19740         of assigning to TREE_CODE.  The latter method exploits a feature
19741         of GCC that is not ANSI compliant.
19742
19743 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19744
19745         * decl.c (pushdecl_force_head): New function.
19746         (pushlevel): Removed conditional printf.
19747         (complete_start_java_method): Don't enter local variable scope if
19748         function is compiled from source code.
19749         * expr.c: parse.h now included
19750         (java_lang_expand_expr): New function.
19751         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
19752         printf. Terminate buffer when doing directories.
19753         * jcf-parse.c (parse_source_file): Call lang_init_source before
19754         parsing and before code generation.
19755         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
19756         use printf if the macro is defined.
19757         * lang.c (lang_init): Install lang_expand_expr hook on
19758         java_lang_expand_expr.
19759         (java_dummy_print): New function.
19760         (lang_init_source): New function.
19761         * lex.c (java_lex): Remember location of an opening brace at the
19762         second nesting level.
19763         (java_is_eol): Unget character seen after a CR if it is EOF.
19764         * parse.h: Now includes lex.h
19765         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
19766         printf if the macro is defined.
19767         (expand_start_java_method, build_expr_block, enter_block,
19768         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
19769         New static function declarations.
19770         (pushdecl_force_head): New extern function declaration.
19771         (INCOMPLETE_TYPE_P): New macro.
19772         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
19773         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
19774         BLOCK_EXPR_ORIGIN): New macros.
19775         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
19776         DECL_SOURCE_LINE_LAST): New macros.
19777         (struct parser_ctxt): Removed field current_method_decl, redundant
19778         with the field current_function_decl. Added fields
19779         first_ccb_indent1 and pending_block.
19780         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
19781         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
19782         tagged <node>
19783         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
19784         (compilation_unit:): Cosmetic on sub rule.
19785         (type_declaration:): Cosmetic on sub rules. Added an error rule.
19786         (variable_initializer:): Installed default rule on expression:.
19787         (method_declaration:): method_header: starts a new
19788         method. method_body: installs the function body, absorbs blocks
19789         emitted for temporary variable scopings, pops function's body block
19790         and merges function's last statement lineno in DECL_SOURCE_LINE.
19791         (method_body:): Installed default rules.
19792         (block:): Call enter_block when an opening brace is seen.  Absorb
19793         scoping blocks and call exit_block when a closing brace is seen.
19794         (block_statement:): Cosmetic changes.
19795         (method_invocation:): Create WFL around CALL_EXPR node.
19796         (patch_stage): Added comment around definition.
19797         (method_header): Try to use first_ccb_indent1 as the first line of
19798         the method, so BP debug info are emitted at the first opening
19799         brace of the function. If the function has no body, use the
19800         location of the function's name. Override currently defined method
19801         name with the matching WFL so we can point redefinition errors
19802         using the location where the function's name was declared.
19803         (check_abstract_method_header): Interprets DECL_NAME as an
19804         identifier or as a WFL, accordingly.
19805         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
19806         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
19807         location and name information out of it and reinstall DECL_NAME to
19808         its original identifier node value.
19809         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
19810         function's source code).
19811         (read_import_dir): Test the value returned by find_class and issue
19812         a fatal accordingly.
19813         (declare_local_variables): Push a new block for the scope of the
19814         new variable(s) if code has been already generated at that nesting
19815         level. Pinpoint redefinition errors using the variable id
19816         WFLs. Generate initialization code if necessary. If the variable
19817         type is incomplete, register a patch on its decl.
19818         (source_start_java_method): Rewritten. Define a new block for the
19819         function's parameters. Build parameter decl out of function's
19820         arguments and register them for a patch if their types are
19821         incomplete.
19822         (expand_start_java_method): Includes the part of
19823         source_start_java_method that was pushing the parameter decls and
19824         completing the method start code.
19825         (source_end_java_method): Removed call the expand_end_bindings and
19826         poplevel (already taken care of). Reinstall function's arguments
19827         and get function's last line of code before calling
19828         expand_function_end.
19829         (java_method_add_stmt): New comment before the function's
19830         code. Complement the second operand of the current COMPOUND_EXPR
19831         if necessary.
19832         (java_complete_expand_methods): Don't generate debug info on line
19833         zero when expanding a generated constructor.
19834         (java_complete_expand_method): Set start and end line numbers for
19835         a artificially generated constructor to one and manually call
19836         enter_block and exit_block when defining it. For all methods:
19837         expand function's start calling the new expand_start_java_method
19838         and invoke java_complete_tree on the effective method's body, if
19839         any.
19840         (resolve_expression_name): Now use lookup_name_in_blocks to search
19841         local variable decls and print out an error when variables are
19842         undefined.
19843         (patch_method_invocation_stmt): Inserted comment before the
19844         function's code.
19845         (lookup_method_invoke): Chain method's arguments using chainon
19846         with the current arg list as a second argument. Inserted missing
19847         IDENTIFIER_POINTER when reporting an error on methods not found.
19848         (refine_accessible_methods_list): Don't retain constructors.
19849         (patch_arguments): Function removed.
19850         (java_complete_tree): Inserted comment before the function's
19851         code. New case for BLOCKs. Moved the WFL case a bit
19852         further. Complete function's arguments.
19853         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
19854         maybe_absorb_scoping_blocks): New functions.
19855
19856 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19857
19858         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
19859         previously set.
19860         * jcf-parse.c (parse_source_file, java_error_count): New forward
19861         and extern declarations.
19862         (java_parse_abort_on_error): Macro moved.
19863         (jcf_parse_source): fatal called if fopen fails. Now calls
19864         parse_source_file.
19865         (parse_source_file): New parse_only parameter. Reflects the
19866         elimination of the second pass.
19867         (yyparse): parse_source_file called with argument set to 0.
19868         * jcf.h (JCF_ZERO): Sets java_source to zero.
19869         * lex.c (java_init_lex): pass argument is gone. Function modified
19870         to be called once during the analysis of a file.
19871         (java_unget_unicode): Fixed typo in fatal message.
19872         (java_get_line_col): Likewise.
19873         (java_lval): Likewise. String literals no longer built during
19874         second pass.
19875         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
19876         account.
19877         * parse.h (MODIFIER_WFL): New macro.
19878         (parse_check_super, parser_check_super_interface): Now return int.
19879         (parser_chain_incomplete_item, not_builtin_p,
19880         complete_method_decl): Declarations removed.
19881         (build_method_invocation_stmt, build_invoke): Renamed using the
19882         `patch' instead of `build'
19883         (register-incomplete_type, obtain_incomplete_type,
19884         java_complete_tree, java_complete_expand_method,
19885         unresolved_type_p, create_jdep_list): New function declarations.
19886         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
19887         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
19888         (jdep): New typedef on new struct _jdep.
19889         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
19890         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
19891         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
19892         JDEP_RESOLVED_P): New macros.
19893         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
19894         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
19895         JDEP_VARIABLE): New enum values and jdep kinds.
19896         (jdeplist): New typedef on struct _jdeplist.
19897         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
19898         macros.
19899         (CALL_EXPR_PRIMARY): New macro.
19900         (struct parser_ctxt): Fields java_pass, current_method_decl,
19901         method_decl_list deleted. New field jdeplist.
19902         (INCOMPLETE_P): Macro deleted.
19903         * parse.y (single_type_import_declaration:): Removed pass switch.
19904         (type_import_on_demand_declaration): Likewise.
19905         (field_declaration:): Removed pass switch on all sub rules.
19906         (class_declaration:): Call the complete_class_decl removed on
19907         class_body rules.
19908         (method_declaration:): Removed second pass switch. No longer chain
19909         methods decl when method_header reduced.
19910         (method_header:): Sub rules no longer depend on pass switch.
19911         (method_declarator:): Likewise.
19912         (method_body:): Likewise.
19913         (abstract_method_declaration:): Likewise.
19914         (block_statement:): Likewise.
19915         (local_variable_declaration:): Likewise.
19916         (argument_list:): Likewise.
19917         (method_invocation:): Likewise. Call to build_method_invocation_stmt
19918         removed. Partial CLASS_EXPR tree node built instead.
19919         (postfix_expression:): Removed pass switch on all sub rules.
19920         (java_pop_parser_context): Free classd_list content.
19921         (yyerror): Call obstrack_grow0 to finalize error message.
19922         (check_class_interface_creation): Comment modified to reflect new
19923         returned value meaning. Removed second pass switch. Return 1 if an
19924         error was found, 0 otherwise. Adjust pointer on filename if a
19925         leading path separator was found.
19926         (maybe_create_class_interface_decl): Removed first pass switch
19927         when linking the class decl to the class_list. Install a new
19928         jdep_list for the class.
19929         (add_superinterfaces): List of unresolved interfaces is
19930         gone. Unresolved interfaces are directly added to the current
19931         dependencies list.
19932         (create_interface): Second pass shortcut removed.
19933         ctpx->modifier_ctx access through MODIFIER_WFL.
19934         (create_class): Second pass shortcut removed. Call to
19935         register_incomplete_type replaces the call to
19936         parser_chain_incomplete_item.
19937         (complete_class_decl): Function removed.
19938         (duplicate_declaration_error): New way of retrieving redeclared
19939         item type.
19940         (register_fields): Call to lookup_modifier_cl replaced by
19941         MODIFIER_WFL. New way of handling unresolved type, using
19942         unresolved_type_p and obtain_incomplete_type.
19943         register_incomplete_type replaces call to parser_chain_incomplete_item.
19944         (patch_stage): New static global variable.
19945         (method_header): New way of handling unresolved type, using
19946         unresolved_type_p and obtain_incomplete_type. patch_stage used to
19947         indicates that the method decl needs to be patched.
19948         (check_abstract_method_header): Call to lookup_modifier_cl
19949         replaced by MODIFIER_WFL.
19950         (method_declarator): Incomplete argument type are registered
19951         calling register_incomplete_type. Patch on the declared method is
19952         issued in that case.
19953         (unresolved_type_p): New function.
19954         (parser_check_super_interface): New comment to reflect function's
19955         modified returned type (int). Function and has a new argument
19956         this_wfl. Call to parse_error_context uses this_wfl instead of
19957         relying on lookup_cl.
19958         (parser_check_super): Comment reflects function's new returned
19959         type (int). Function returns nonzero value on error.
19960         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
19961         register_incomplete_type, jdep_resolve_class): New functions to
19962         handle incomplete types in declarations.
19963         (java_complete_class): Rewritten to work with the new incomplete
19964         type handling scheme.
19965         (complete_class_report_errors): Likewise.
19966         (complete_method_decl): Removed: it jobs is now handled by
19967         java_complete_class.
19968         (do_resolve_class): Class loaded in not already loaded and not
19969         found in Java source code.
19970         (java_check_regular_methods, java_check_abstract_methods): Don't
19971         call complete_method_decl anymore.
19972         (lookup_modifier_cl, not_builtin_p): Functions deleted.
19973         (read_import_dir): Got rid of the pass number dependency.
19974         (declare_local_variables): New handling of unresolved types (patch
19975         issued).
19976         (source_start_java_method): New parameter level. Function called
19977         with level set to 1 when argument types are potentially
19978         unresolved.  Called to complete the job with level set to 2 once
19979         types are complete.
19980         (source_end_java_method): Call to permanent_allocation
19981         removed. Waiting to be replaced by a more suitable obstack
19982         management.
19983         (java_complete_expand_methods, java_complete_expand_method,
19984         java_expand_finals): New functions.
19985         (build_method_invocation_stmt): Renamed
19986         patch_method_invocation_stmt. Extracts function call expression
19987         (wfl) and arguments (args) from CALL_EXPR tree operands.
19988         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
19989         call. Patch the function and argument operand of the CALL_EXPR
19990         tree argument.
19991         (patch_argument, java_complete_tree): New functions.
19992
19993 1998-04-20  Per Bothner  <bothner@cygnus.com>
19994
19995         Recover from missing fields and methods (i.e. error instead of fatal).
19996         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
19997         * expr.c (expand_invoke):  Recover from missing method.
19998         (expand_java_field_op):  Recover from missing field.
19999         Inline references to java.lang.{Integer,Char,...}.TYPE.
20000         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20001         * class.c (add_method):  Use get_type_from_signature.
20002         (build_class_ref):  Handle a class that was not found.
20003         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20004         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20005         instead of lookup_field to handle missing fields.
20006
20007         * jcf-parse.c (process_zip_dir):  Set java_source.
20008
20009 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20010
20011         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20012
20013 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20014
20015         * jcf-parse.c (load_class): Don't change input_filename before
20016         calling jcf_parse_source (but still do it before calling
20017         jcf_parse).
20018         (jcf_parse_source): Assign input_filename after having saved the
20019         parser context.
20020         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20021         list. ctxp->modifier_ctx zeroed according to its new
20022         definition. ctxp->filename initialized. Removed
20023         JAVA_MODIFIER_CTX_UNMARK.
20024         (java_unget_unicode): Update the character based column position.
20025         (java_allocate_new_line): ref_count not used anymore. Always free
20026         ctxp->p_line. Initialize c_line->char_col to 0.
20027         (java_get_unicode): Update the character based column position.
20028         (java_lex): Use ctxp->elc to store current position in source
20029         file, at the beginning of the parsed token. Set modifier_ctx entry
20030         corresponding to the parse modifier to a WFL node. Return a WFL
20031         node when an identifier is parsed.
20032         (java_lex_error): Now uses ctxp->elc to store current position in
20033         source.
20034         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20035         * lex.h (build_wfl_node): New function definitions.
20036         (struct java_line): ref_count and next fields are gone. New field
20037         char_col.
20038         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20039         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20040         (JAVA_COLUMN_DELTA): New macro.
20041         (java_lc): New typedef on new struct _java_lc.
20042         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20043         (parse_error_context, parse_warning_context): Changed prototypes.
20044         (java_get_line_col): Added as an available global function.
20045         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20046         (IC_DECL): Replaced by macro IC_TYPE
20047         (DEPEND_WFL): New macro.
20048         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20049         wrong modifier.
20050         (exit_java_complete_class): Removed a commented out statement.
20051         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20052         now an array of tree nodes. Deleted fields line_list and
20053         e_line. New field elc, to replace e_line.
20054         * parse.y (array_type:): Build WFL node.
20055         (qualified_name:): Build a single WFL node out of two. Retain
20056         the location information of the first node in the resulting node.
20057         (package_declaration:): Use package name as a WFL node
20058         (single_type_import_declaration:): Use imported name as a WFL node.
20059         (type_import_on_demand_declaration:): Use root of the imported
20060         packages as a WFL node.
20061         (field_declaration:): Removed unused local variable cl.
20062         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20063         (yyerror): New static elc. Removed static error_line, error_pos.
20064         New local code_from_source. Save ctxp->elc into elc at the first
20065         pass. Call java_get_line_col to get a string of the line where
20066         the error occurred.
20067         (debug_line): Removed static function.
20068         (parse_error_context, parse_warning_context): Parameter cl is now
20069         a WFL node. Use its value to initialize ctxp->elc.
20070         (redefinition_error): Parameter cl is now a WFL node.
20071         (parse_add_interface): New parameter wfl. No longer call
20072         lookup_cl, use wfl instead.
20073         (check_class_interface_creation): Parameter cl is now a WFL node.
20074         (maybe_create_class_interface_decl): Likewise.
20075         (add_superinterfaces): New function.
20076         (create_interface): Removed local cl, node, super_decl,
20077         super_decl_type.  Function now uses id as a WFL node. Better
20078         warning/error report on obsolete or forbidden mix of
20079         modifiers. Now calls add_superinterfaces to register interfaces.
20080         (create_class): Removed local cl, node. Local variable id is used
20081         as a WFL node. Better error report on forbidden modifier
20082         mix. Uses add_superinterfaces to register interfaces.
20083         (find_field): Argument cl is now a WFL node. Now store the WFL
20084         node of a fields that needs to be checked for their
20085         initialization.
20086         (method_header): Local variable node non longer used. Local
20087         variable id replaces cl.
20088         (check_modifiers_consistency): Local variable cl is now a WFL
20089         node.
20090         (method_declarator): Local variable cl replaced by parameter id.
20091         (parser_qualified_name): Now uses parameter name as a WFL node.
20092         (parser_check_super_interface): New parameter wfl, for achieve
20093         greater accuracy during error reports.
20094         (parser_chain_incomplete_item): New parameter named location. Used,
20095         along the decl, to construct the incomplete item node.
20096         (java_complete_class): resolve_class now uses WFL node extracted
20097         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20098         where appropriate.
20099         (complete_method_decl): Unresolved function's argument types are WFL.
20100         (resolve_class): Parameter cl is now a WFL node.
20101         (resolve_and_layout): Likewise.
20102         (do_resolve_class): Likewise. Try first to use cl and then do the
20103         lookup on the decl when calling check_pkg_class_access.
20104         (complete_class_report_errors): Use IC_TYPE in place of
20105         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20106         instead of doing a lookup over the decl.
20107         (java_check_final): Use WFL info from field tree list.
20108         (lookup_cl): Rewritten and returns a statically defined WFL node.
20109         (lookup_modifier_cl): Now uses information from WFL nodes.
20110         (process_imports): Likewise.
20111         (read_import_dir): name and cl arguments replaced by a single WFL
20112         node. Function modified accordingly.
20113         (find_in_imports_on_demand): Now uses WFL node.
20114         (check_pkg_class_access): cl argument is now a WFL node.
20115         (declare_local_variables): Fixed to use WFL nodes.
20116         (resolve_expression_name): Likewise.
20117         (build_method_invocation_stmt): name_combo argument renamed
20118         wfl. Function modified to use WFL nodes.
20119         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20120         (lookup_method_invoke): cl is now a WFL node. Added missing
20121         IDENTIFIER_POINTER to class type decl name.
20122
20123 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20124
20125         * lang.c (init_parse): Now returns char* containing the filename.
20126
20127 1998-04-10  Per Bothner  <bothner@cygnus.com>
20128
20129         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20130
20131         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20132         * class.c (make_class_data):  If flag_assume_compiled, initial class
20133         state is CSTATE_PREPARED; make superclass and interfaces direct
20134         references, rather than constant pool indexes.
20135
20136 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20137
20138         * parser.y: Include flags.h. Removed debug variable pl.
20139         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20140         (block:): Likewise.
20141         (labeled_statement_nsi:): Generate debug info when reducing
20142         expression_statement:.
20143         (check_pkg_class_access): get_access_flags_from_decl invocation
20144         fixed for new CLASS_* flags location.
20145         (source_end_java_method): Save/restore parser context when
20146         entering/leaving this routine. Restore lineno to its right value
20147         before calling expand_end_bindings.
20148         (build_method_invocation_stmt): build_invoke called with the
20149         current line information.
20150         (build_invoke): New argument cl. Wrap the function call around a
20151         wfl node.
20152         (refine_accessible_methods_list): Changed comment, removed
20153         unnecessary code.
20154         * parse.h: Fixed typo in comments.
20155         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20156         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20157         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20158         parser_ccb_indent.
20159         * lex.c (java_lex): Record the last closing curly bracket of a
20160         function.
20161         * jcf-parse.c (jcf_parse_source): Now calls
20162         java_check_methods. Clarified comment, fixed typo.
20163
20164 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20165
20166         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20167         (finish_parse): Expose for non USE_CPPLIB builds.
20168
20169 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20170
20171         * lang.c (lang_print_xnode): New function.
20172
20173 1998-04-03  Per Bothner  <bothner@cygnus.com>
20174
20175         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20176         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20177         used to build a class's dispatch table.
20178         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20179         Set dtable of class object to address of class_dtable_decl.
20180
20181         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20182         be volatile and have side effects - generates better code.
20183
20184         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20185         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20186
20187         * expr.c (expand_invoke):  If class is final, method is
20188         effectively final, so can call it directly.
20189
20190         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20191
20192         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20193
20194 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20195
20196         * parse.y (build_method_invocation_stmt): Removed extra argument
20197         to build_invoke.
20198
20199 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20200
20201         * expr.c (dtable_indent): Now static global.
20202         (expand_invoke): Now call invoke_build_dtable and
20203         build_invokevirtual.
20204         (invoke_build_dtable, build_invokevirtual): New functions.
20205         * jcf-io.c (find_class): Defer issuing a warning by setting
20206         jcf->outofsynch to 1.
20207         * jcf-parse.c (jcf_out_of_synch): New function.
20208         (load_class): Test this_jcf.outofsynch flag and call
20209         jcf_out_of_synch accordingly.
20210         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20211         comment indentation.
20212         * lex.c (java_get_unicode): Fixed code indentation.
20213         (java_lex): Create string literal. Fixed typo. Removed several
20214         premature obstack_free.
20215         * parse.h: New enums for name resolution and invocation mode.
20216         (struct qualification): New data structure.
20217         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20218         (do_resolve_class, build_method_invocation_stmt,
20219         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20220         debug_line, identical_subpath_p, invocation_mode,
20221         refine_accessible_methods_list, build_invoke,
20222         lookup_method_invoke): New functions declared.
20223         (build_invokevirtual, invoke_build_dtable, match_java_method,
20224         build_field_ref, jcf_out_of_synch): New references to external
20225         functions.
20226         (struct parse_ctxt): Removed artificial_constructor field.
20227         * parse.y: (array_type:): Type defined for this rule.
20228         (class_type:): Installed default rule for interface_type:.
20229         (array_type:): Now build Java array type.
20230         (qualified_name:): Now use obstack_grow0.
20231         (method_declaration:): Skip the artificial constructor added to
20232         the list, if any.
20233         (abstract_method_declaration:): Execute the code only during pass 1.
20234         (block:): Installed default rule in block_statements:.
20235         (block_statement:): Add the statement to the method during pass 2.
20236         (statement_expression): Installed default rule for
20237         method_invocation:.
20238         (argument_list:): Added code to build the argument list.
20239         (method_invocation:): Added call to create the method invocation
20240         node.
20241         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20242         (debug_line): New function for debug.
20243         (complete_class_decl): No longer do something during pass 1.
20244         (method_header): Use BUILD_PTR_FROM_NAME.
20245         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20246         obstack_free.
20247         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20248         function's main comment.
20249         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20250         classes.
20251         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20252         (resolve_class): Now works with arrays.
20253         (do_resolve_class, resolve_and_layout): New functions.
20254         (java_check_regular_methods): Reverse method list before and after
20255         having processed it. No longer set ctxp->artificial_constructor.
20256         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20257         accordingly. Fixed typo in issued error message. Now use
20258         obstack_grow0.
20259         (find_in_imports_on_demand): Now use obstack_grow0.
20260         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20261         (source_end_java_method): Call expand_expr_stmt instead of
20262         expand_expr. Calls it before calling expand_function_end.
20263         (java_method_add_stmt): Do nothing if errors were found during
20264         parsing.
20265         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20266         (build_method_invocation_stmt, build_invoke, invocation_mode,
20267         lookup_method_invoke, refine_accessible_methods_list,
20268         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20269         New functions.
20270         * typeck.c (build_java_signature): Properly end method signature
20271         if return type skipped.
20272         (match_java_method): New function.
20273
20274 1998-03-16  Per Bothner  <bothner@cygnus.com>
20275
20276         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20277
20278 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20279
20280         * expr.c (build_invoke_non_interface): New function.
20281         (methods_ident, ncode_ident): Now static globals.
20282         (expand_invoke): Use build_invoke_non_interface.
20283         * java-tree.h (struct lang_decl): New field function_decl_body.
20284         (DECL_FUNCTION_BODY): New macro.
20285         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20286         CLASS_FROM_SOURCE_P.
20287         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20288         before starting pass 2. Call to java_generate_parsed_class replaced
20289         by java_register_parsed_class.
20290         * lex.c: Fixed typo in header. Some line width related formating.
20291         * lex.h: Some line width related formating.
20292         * parse.h (source_end_java_method, resolve_expression_name,
20293         complete_class_decl, maybe_create_class_interface_decl,
20294         check_class_interface_creation): New static function declarations.
20295         (java_layout_parsed_class, java_method_add_stmt): New function
20296         declarations.
20297         (struct parser_ctxt): Field mark_class_generate removed. New
20298         fields class_list and artificial_constructor.
20299         * parse.y: Fixed typo in header.
20300         (class_declaration:): Call complete_class_decl when class body
20301         parsed.
20302         (method_declaration:): Call source_end_java_method in pass 2 when
20303         the method body is defined.
20304         (postfix_expression:): Do expression name resolution on sub-rule
20305         name during pass 2.
20306         (create_class, create_interface): Merged common pieces.
20307         (check_class_interface_creation, maybe_create_class_interface_decl):
20308         New functions.
20309         (complete_class_decl): New function.
20310         (register_fields): Fixed line width related typo.
20311         (method_header): Correctly skip first argument when fixing
20312         argument line. Changed the loop.
20313         (java_check_circular_reference): Now use ctxp->class_list.
20314         (java_complete_class): Removed start/stop marking.
20315         (java_check_regular_methods): Now takes a class decl as an
20316         argument.  Add default constructor if none were encountered.
20317         (java_check_methods): Now use ctxp->class_list. Changed call to
20318         java_check_regular_methods.
20319         (source_start_java_method): Set DECL_ARG_TYPE for each function
20320         arguments.
20321         (source_end_java_method, java_method_add_stmt): New functions.
20322         (java_generate_parsed_class): No longer exists.
20323         (java_layout_parsed_class, java_register_parsed_class): New functions.
20324         (resolve_expression_name): New function.
20325
20326 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20327
20328         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20329         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20330         until pass initializations are done. Call read_import_dir with
20331         pass set to 0.
20332         * parse.h: (lookup_modifier_cl): New function declared.
20333         (INTERFACE_FIELD_MODIFIERS): New macro.
20334         (OBSOLETE_MODIFIER_WARNING): New macro.
20335         * parse.y: (register_fields): Class type and current field name in
20336         local variables. Check modifier(s) if adding field(s) to an interface.
20337         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20338         and report errors using the faulty modifier line context.
20339         (lookup_modifier_cl): New function.
20340         (read_import_dir): Detect and report default import processing
20341         failure.
20342
20343 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20344
20345         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20346         * class.c (is_compiled_class): Return 1 after making sure it
20347         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20348         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20349         * java-tree.h (flag_assume_compiled): Add decl.
20350         * lang.c (lang_f_options): Add the flag.
20351         (flag_assume_compiled): Add decl, default to 0.
20352
20353 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20354
20355         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20356         (is_compiled_class): Likewise.
20357         (layout_class): Likewise.
20358         (layout_class): Detect and lay out classes defined in source code.
20359         (interface_of_p, add_interface_do, may_add_interface): New
20360         function.
20361         (add_interface): Now use add_interface_do.
20362         (add_method_1): New function.
20363         (add_method): Now use add_method_1.
20364         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20365         (complete_start_java_method): New function.
20366         (start_java_mehod): Now call complete_start_java_method.
20367         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20368         (expand_invoke): Likewise and fixed typo.
20369         *gjava.c: (print_super_field): Use new argument to find_class
20370         DO_CLASS_FILE.
20371         (main): Likewise.
20372         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20373         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20374         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20375         IDENTIFIER_NODE.
20376         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20377         (add_method_1, push_class): New prototypes.
20378         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20379         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20380         directory where the class was found.
20381         (find_class): New argument DO_CLASS_FILE. Function find_class
20382         modified accordingly.
20383         *jcf-parse.c: (fix_class_path): New function.
20384         (load_class): Use new VERBOSE argument. load_class now finds and
20385         loads/parses .class/.java files. Save read_state of current_jcf
20386         if necessary.
20387         (java_parser_abort_on_error): New macro.
20388         (jcf_parse_source, parse_source_file): New function.
20389         (jcf_parse): Fixed typo.
20390         (yyparse): Call parse_source_file () only.
20391         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20392         writing the real class name back in the zip directory entry.
20393         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20394         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20395         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20396         (find_class): Prototype fixed.
20397         *lex.c: Added 1998 time stamp.
20398         Removed all static global variables, moved into the parser
20399         context data structure.. Now include unistd.h if SEEK_SET not
20400         defined.
20401         (java_init_lex): Rewritten.
20402         (java_sneak_unicode): Modified current unicode access in current line.
20403         (java_unget_unicode): Likewise.
20404         (java_allocate_new_line): New allocation management.
20405         (java_read_char): Modified access and storage of unget_utf8_value.
20406         New way of processing current unicode.
20407         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20408         (java_get_unicode): Now use the parser context.
20409         (java_lineterminator): Likewise.
20410         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20411         of the reentrant parser implementation. Function now use the
20412         parser context data structure and java_lval. Fixed production of
20413         the float and double constant "out of range" error message. Fixed
20414         obstack use. Return integer value when hitting a modifier. Now
20415         return type for TRUE, FALSE and other predefined types. Return
20416         identifier as a TREE_LIST list containing the current line context
20417         as the TREE_VALUE sub-node.
20418         (java_unicode_2_utf8): Fixed typo in declaration.
20419         (java_lex_error): Now use the parser context data structure.
20420         *lex.h: Added 1998 time stamp.
20421         (struct java_line): New fields ref_count and next.
20422         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20423         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20424         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20425         *parse.h: Added 1998 time stamp.
20426         (java_parse_source_file): Renamed from parse_source_file.
20427         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20428         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20429         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20430         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20431         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20432         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20433         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20434         (struct parser_ctxt): New data structure to keep the parser context.
20435         *parse.y: Added 1998 time stamp, got rid of static global variables.
20436         (java_error_count, ctxp): New global variables.
20437         (%union): New value field.
20438         (numeric_type, integral_type): Rules removed.
20439         (primitive_type): Rule defined to handle integral, float, double and
20440         boolean types.
20441         (qualified_name, package_declaration,
20442         single_type_import_declaration, type_import_on_demand_declaration,
20443         modifiers, class_declaration, super, interfaces,
20444         interface_type_list, class_body, field_declaration,
20445         field_declaration, variable_declarators, variable_declarator,
20446         variable_declarator_id, method_declaration, method_header,
20447         formal_parameter_list, formal_parameter, method_body, block,
20448         static, interface_declaration, extends_interfaces,
20449         abstract_method_declaration, local_variable_declarators): Rules now
20450         define actions.
20451         (force_error, do_warning): New global statics.
20452         (push_parser_context, parser_context_save_global,
20453         parser_context_restore_global, pop_parser_context): New functions.
20454         (yyerror): Now uses the global parser context. Fixed use of obstack.
20455         (parse_error, parse_error_context, parse_warning_context,
20456         java_accstring_lookup, redefinition_error, check_modifiers,
20457         parser_add_interface, create_interface, create_class, find_field,
20458         duplicate_declaration_error, register_fields, method_header,
20459         check_modifiers_consistency, check_abstract_method_header,
20460         method_declarator, parser_qualified_classname,
20461         parser_check_super_interface, parser_check_super,
20462         parser_chain_incomplete_item, java_check_circular_reference,
20463         layout_class_from_source, java_complete_class,
20464         complete_method_decl, resolve_class, complete_class_report_errors,
20465         java_check_final, check_method_redefinition,
20466         java_check_regular_methods, java_check_abstract_methods,
20467         java_check_methods, lookup_java_interface_method2,
20468         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20469         process_imports, find_in_imports, read_import_entry,
20470         read_import_dir, find_in_imports_on_demand,
20471         check_pkg_class_access, not_builtin_p, declare_local_variables,
20472         source_start_java_method, java_generate_parsed_class): New
20473         functions.
20474         *typeck.c: (signature_include_return): New global variable.
20475         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20476         to add the function returned type in the signature.
20477
20478 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20479
20480         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20481
20482 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20483
20484         * Make-lang.in (java.info): Added.
20485         (java.install-info): Added
20486
20487 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20488
20489         * Makefile.in (clean): Also remove java/parse.c.
20490
20491 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20492
20493         Add a pair of -fbounds-check/-fno-bounds-check options.
20494         * lang.c (lang_decode_option): Add code to grok arguments.
20495         (flag_bounds_check): Add decl.
20496         (lang_f_options): New array w/ the option in it.
20497         * java-tree.h (flag_bounds_check): Add decl.
20498         * lang-options.h: New file.
20499         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20500         of a static macro value.
20501         (JAVA_ARRAY_EXCEPTION): Delete macro.
20502
20503 1998-01-23  Per Bothner  <bothner@cygnus.com>
20504
20505         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20506         * expr.c (build_anewarray):  Add missing promote_type.
20507
20508 1998-01-22  Per Bothner  <bothner@cygnus.com>
20509
20510         Add array types with known length to optimize bounds checking.
20511         * typeck.c (build_java_array_type):  Take length parameter.
20512         (java_array_type_length, build_prim_array_type):  New functions.
20513         * java-tree.h:  Update for new functions.
20514         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20515         * class.c:  Use build_prim_array_type.
20516         * expr.c (can_widen_reference_to):  Handle known-length array types.
20517         (verify_jvm_instructions):  Keep track of integer push instructions
20518         followed by newarray/anewarray, so we can build known-length arrays.
20519         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20520         (java_array_data_offset):  New function.
20521         (build_java_array_length_access):  New function.  Optimize if constant.
20522         (build_java_arrayaccess):  Constant fold bounds check.
20523         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20524         (build_newarray, build_anewarray):  New functions.
20525         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20526         * verify.c (merge_types):  Handle known-lengh array types.
20527
20528 1998-01-19  Per Bothner  <bothner@cygnus.com>
20529
20530         * expr.c (expand_byte_code):  Fix performace bug, which caused
20531         searching linenumber_table to be linear rather than constant.
20532
20533 1997-12-12  Per Bothner  <bothner@cygnus.com>
20534
20535         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20536
20537         * decl.c, java-tree.h (soft_fmod_node):  New global.
20538         * decl.c (init_decl_processing):  Define __builtin_fmod.
20539         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20540         using __builtin_fmod.
20541
20542 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20543
20544         * keyword.h: New file, output of keyword.gperf as processed by
20545         gperf.
20546         * lex.c (java_lex_init): Initialize java_error_flag.
20547         * parse.c (YYERROR_NOW): Uses java_error_flag.
20548         * parse.y: New static java_error_flag. Useless definition of
20549         buffer_error gone.
20550         * parse.y (java_error): Portable error recovery using
20551         java_error_flag (not yet completely tuned).
20552
20553 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20554
20555         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20556
20557 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20558
20559         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20560         (parse.c, lex.c, keyword.h): New rules for Java source code
20561         front-end.
20562         * parse.c: Renamed into jcf-parse.c.
20563         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20564         * keyword.gperf: New file, Java keywords.
20565         * parse.y: New file, Java language grammar.
20566         * parse.h: New file, Java language grammar definitions.
20567         * lex.c: New file, Java language lexer.
20568         * lex.h: New file, Java language lexer definitions.
20569
20570 1997-12-03  Per Bothner  <bothner@cygnus.com>
20571
20572         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20573         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20574         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20575         * expr.c (expand_java_field_op):  Check for invalid assignment
20576         to final field.
20577
20578         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20579
20580 1997-10-27  Per Bothner  <bothner@cygnus.com>
20581
20582         * verify.c (verify_jvm_instructions):  When processing a handler,
20583         attempt to set the current_subr to the right value.
20584         (More complicated code combines Sep 17 and Oct 22 versions.)
20585
20586 1997-10-24  Per Bothner  <bothner@cygnus.com>
20587
20588         * class.c (push_class):  Figure out (guess) name of source file.
20589         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20590         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20591         (parse_class_file):  Change return type from int to void.
20592         Call debug_start_source_file/debug_end_source_file.
20593
20594         * expr.c (build_java_binop):  Fix masking 2nd operand.
20595         * decl.c (init_decl_processing):  Set sizetype first.
20596
20597 1997-10-22  Per Bothner  <bothner@cygnus.com>
20598
20599         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20600         (Revert Sep 17 change.)
20601
20602 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20603
20604         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20605         .class extension in their name and fix thing so we don't process
20606         them parse_zip_file_entries().
20607         (parse_zip_file_entries): Cleaned unused local variables.
20608
20609 1997-10-20  Per Bothner  <bothner@cygnus.com>
20610
20611         * expr.c (can_widen_reference_to):  Allows equal array element types.
20612         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20613         * jcf-dump.c (RET):  Get (and print) index.
20614
20615         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20616         Promote element type to POINTER_TYPE.
20617
20618 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20619
20620         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20621         find_in_current_zip, jcf_figure_file_type): Moved from
20622         jcf-reader.c to parse.c.
20623         * zextract.c: (read_zip_archive): takes file_comment_length possible
20624         field into account.
20625
20626 1997-10-20  Per Bothner  <bothner@cygnus.com>
20627
20628         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20629
20630         * verify.c (merge_types):  Handle array types even better ...
20631
20632 1997-10-17  Per Bothner  <bothner@cygnus.com>
20633
20634         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20635
20636         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20637         * class.c (make_class_data):  Don't build fields_decl if no fields.
20638         When building fields_decl, skip if DECL_ARTIFICIAL.
20639
20640         * expr.c (java_stack_swap):  Update stack_type_map.
20641         * verify.c (merge_types):  Handle array types better.
20642
20643 1997-10-15  Per Bothner  <bothner@cygnus.com>
20644
20645         * class.c (add_field):  Don't promote short integral fields to
20646         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20647         * expr.c (push_value):  Promote and convert short integral values.
20648
20649         * decl.c, java-tree.h (integer_two_node):  New constant node.
20650         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20651
20652 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20653
20654         * class.c (append_gpp_mangled_type): Use function argument
20655         unpromoted type to generate mangled name.
20656
20657 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20658
20659         * constants.c (build_constant_data_ref): Now uses current_class
20660         instead of main_class.
20661         (build_constants_constructor): Now uses current_class instead of
20662         main_class.
20663         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20664         of the global variable SeepZipFiles done here.
20665         * zextract.c (read_zip_archive): extra_field optional field taken
20666         into account while computing the position of the class file in the
20667         archive.
20668         * verify.c (verify_jvm_instructions): Use current_jcf to search
20669         the constant pool.
20670         * parse.c (load_class): First search for the class to load in the
20671         current zip file. Saves current_jcf (restored before returning
20672         from that function). Don't call JCF_FINISH in the class was found
20673         in the current ZIP file.
20674         (jcf_parse): If the class was found in the current ZIP file, save
20675         its tree_constant_pool (for later reuse).
20676         (parse_class_file): New function. Process each method defined in
20677         the current class and record the class as to be later registered.
20678         (yyparse): Rewritten. Figure the type of the current file and switch
20679         accordingly.
20680         * lang.c: New global variable current_jcf.
20681         (lang_init): Removed compiling_from_source test (done later, in
20682         yyparse). Removed call the jcf_parse ().
20683         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
20684         (typedef struct JCF): New fields seen_in_zip (to mark a class found
20685         in the current ZIP file) and zip_offset (offset to the class data in
20686         the current zip file).
20687         * jcf-reader.c: zipfile.h included.
20688         localToFile: New ZipFileCache static global variable
20689         (parse_zip_file_entries): New function. Browse the current ZIP
20690         file directory and process each class found.
20691         (process_zip_dir): New function. Register each class found in the
20692         ZIP file directory. The class aren't parsed but a valid JCF is
20693         link to each of them.
20694         (find_in_current_zip): New function. Search for a class in the
20695         current ZIP file directory. If found, prepare the class so that it
20696         can be loaded.
20697         (jcf_figure_file_type): New function. Examine the file structure
20698         to figure a class file, a ZIP file. If none of these categories are
20699         matched, a source file is assumed.
20700         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
20701         SeenZipFile: New global variable.
20702         (open_in_zip): Use zipmember's length to accelerate the search for
20703         a member. If zipmember was NULL and zip file successfully read,
20704         return 0.
20705         * java-tree.h: New global variable current_jcf declared.  Added
20706         declaration for current_constant_pool_tags, current_constant_pool_data,
20707         current_constant_pool_length, current_constant_pool_data_ref.
20708         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
20709         store the JCF of classes seen in a zip file) and tree *constant_pool
20710         (to save a loaded class constant pool). current_class declared here.
20711         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
20712         retrieve method_ref_constant.
20713         (PUSHC): java_push_constant_from_pool now uses current_jcf.
20714         (OBJECT): get_class_constant now uses current_jcf.
20715         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
20716         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
20717         (expand_invoke): Now uses current_class instead of main_class
20718         (build_class_init): Now uses current_class instead of main_class
20719         * class.c: New static global variable registered_class.
20720         (register_class): New function.
20721         (emit_register_class): Modified to use registered_class instead of
20722         main_class
20723         (is_compiled_class): Now take into account class seen in the archive.
20724
20725 1997-10-06  Per Bothner  <bothner@cygnus.com>
20726
20727         * except.h:  Renamed to: java-except.h.
20728         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
20729         * except.c:  Add semi-working (commented out) implementation.
20730
20731         * expr.c (expand_iinc):  Add needed flush_quick_stack.
20732         * parse.c (set_source_filename):  New function.
20733         (give_name_to_class):  Set input_filename from package.classname.java.
20734
20735         * jcf-io.c (find_class):  Don't look first in ".".
20736
20737 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20738
20739         * zextract.c (read_zip_archive): Now takes into account the
20740         extra_field field.
20741         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
20742
20743 1997-09-20  Per Bothner  <bothner@cygnus.com>
20744
20745         * constants.c, java-tree.h (build_internal_class_name):  New function.
20746         (alloc_class_constant):  Re-implement using build_internal_class_name.
20747         * class.c (make_class_data):  Likewise.
20748         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
20749
20750 1997-09-17  Per Bothner  <bothner@cygnus.com>
20751
20752         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
20753         to NULL before pushing an exception handler target.
20754
20755         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
20756         (java_stack_swap, java_stack_dup):  Re-write to be safe from
20757         clobbering registers.
20758         (build_class_init):  New function.
20759
20760 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20761
20762         * typeck.c (build_java_array_type): Temporary use
20763         permanent_obstack to create the array 'length' field.
20764         * expr.c (lookup_label): Temporay use permanent_obstack to create
20765         label if not found.
20766         * class.c (push_super_field): Tempory use permanent_obstack.
20767
20768 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20769
20770         * typeck.c (type_for_mode): Now handles double_type_node and
20771         float_type_node.
20772         * verify.c (verify_jvm_instructions): The instruction following
20773         the wide bytecode is checked. OPCODE_ret added to the list of
20774         wide.
20775
20776 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20777
20778         * class.c (make_class): Temporary use permanent_obstack. Set the
20779         class CLASS_P field to 1.
20780         (push_class): Temporary use permanent_obstack.
20781         (set_super_info): Temporary use permanent_obstack.
20782         (add_method): Temporary use permanent_obstack, set
20783         METHOD_TRANSIENT().
20784         (add_field): Temporary use permanent_obstack. Sets
20785         FIELD_VOLATILE() and FIELD_TRANSIENT().
20786         (build_class_ref): Temporary use permanent_obstack if the class
20787         isn't compiled.
20788         (build_static_field_ref): Temporary use permanent_obstack when
20789         creating field's rtl.
20790         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
20791         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
20792         and fields. Function finalized, as far as flag handling.
20793         (push_class_static_dummy_field): Temporary use permanent_obstack.
20794         (emit_register_class): Force generation of class registration at
20795         -O3 or deeper.
20796         * decl.c (end_java_method): Call permanent_allocation() before
20797         returning.
20798         * expr.c (can_widen_reference_to): Added comment to interface
20799         handling, fixed typo.
20800         (lookup_field): Now uses CLASS_P() to correct FIXME
20801         (expand_invoke): Verification on public && !static &&
20802         !abstract moved into soft_lookupinterfacemethod (kaffe).
20803         Use Object class dtable if objectref is an array when expanding
20804         invokeinterface.
20805         (java_push_constant_from_pool): Temporary use permanent_obstack
20806         for CONSTANT_string
20807         * parse.c (get_ref_constant): Temporary use permanent_obstack to
20808         create constant references.
20809         (get_constant): Temporary use permanent_obstack to create constant.
20810         (load_class): Temporary use permanent_obstack to load class.
20811         (jcf_parse): Temporary use permanent_obstack to perform class
20812         layout.
20813         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
20814         (build_java_signature): Temporary use permanent_obstack.
20815         * verify.c: (verify_jvm_instruction): removed unnecessary verification
20816         on ACC_SUPER flag.
20817         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
20818         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
20819         (CLASS_P): Defined
20820
20821 1997-09-11  Per Bothner  <bothner@cygnus.com>
20822
20823         * class.c (append_gpp_mangled_type):  Fix typo.
20824         (emit_register_class):  Use main_class to get class object, rather
20825         than looking for no-longer-existing static decl starting with _CL.
20826         * typeck.c (parse_signature_type):  Promote array element type
20827         if it is a RECORD_TYPE.
20828
20829 1997-09-10  Per Bothner  <bothner@cygnus.com>
20830
20831         * class.c (push_class_static_dummy_field):  New function.
20832         (mangle_static_field):  New. Do G++-style mangling of static fields.
20833         (layout_class):  Mandle static fields here, not in add_field.
20834         (build_class_ref):  The class object is now a dummy static field.
20835         * decl.c (find_local_variable):  Look for best, instead of first match.
20836         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
20837         (build_java_athrow):  Don't check here if exception is Throwable.
20838         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
20839         (TYPE_USED):  Removed.  No longer used ...
20840         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
20841         * verify.c (push_pending_label):  New function.
20842         (push_pending_block):  Renamed to check_pending_block.
20843         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
20844         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
20845         re-checking possible handlers) after a store (less wasted work).
20846         Check for null handler (finally) before calling add_handler.
20847         Various changes to (finally?) correctly handle try/finally.
20848
20849 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
20850
20851         * class.c: Include stdio.h.
20852
20853 1997-09-04  Per Bothner  <bothner@cygnus.com>
20854
20855         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
20856         to make sure class is initialized before static/special invoke.
20857
20858         * verify.c (verify_jvm_instructions):  On a store instruction,
20859         call find_local_variable to force pre-allocation of decl and rtx.
20860         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
20861
20862 1997-09-03  Per Bothner  <bothner@cygnus.com>
20863
20864         * class.c (build_class_ref):   Strip off "promoted_" if need be.
20865         (make_field_value): Call build_java_signature when needed.
20866         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
20867         * expr.c (build_java_athrow):  Don't push_value of exception.
20868         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
20869         match specification of [fd]cmp[lg] for NaNs.
20870         (expand_byte_code):  Add support for exception handler ranges.
20871         * except.c:  Add skeleton for EH code-generation.
20872         * verify.c (merge_types):  Treat all promoted integral types as equal.
20873         * constants.c (build_constants_constructor):  To force creation of
20874         current_constant_pool_data_ref, call build_constant_data_ref.
20875
20876         * javaop.def (lload):  Fix typo.
20877         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
20878
20879 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
20880
20881         * parse.c: Don't include function.h.
20882
20883 1997-08-27  Per Bothner  <bothner@cygnus.com>
20884
20885         * except.[ch]:  New files.
20886         * Makefile.in (JAVA_OBJS):  Add except.o
20887         * expr.c:  Temporary warning about unimplemented exceptions.
20888         * verify.c:  Verify exception handlers.
20889
20890         * jcf-dump.c (disassemble_method):  Print exception table.
20891
20892 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20893
20894         * expr.c (verify_jvm_instructions): Started a thorough
20895         verification of invoke* bytecodes.
20896         (expand_byte_code): flush quick stack if PC is the target of a
20897         branch.  and undef RET (conflicting with config/i386/i386.h).
20898         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
20899         used.
20900         (expand_invoke): Now handles invokeinterface and do more
20901         verification according to the bytecode.
20902         (lookup_field): Don't try to load the class if processing
20903         dtable_type.
20904         (can_widen_reference_to): Now handles interfaces.
20905         * decl.c (init_decl_processing): New global variable
20906         soft_lookupinterfacemethod_node, declared in java-tree.h.
20907         Call set_super_info on string_type_node.
20908         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
20909         defined.
20910         * class.c (set_super_info): Fills the CLASS_* flags according to
20911         access_flags.
20912         (get_access_flags_from_decl): Handles all class flags.
20913
20914 1997-08-26  Per Bothner  <bothner@cygnus.com>
20915
20916         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
20917         * parse.c (yyparse):  Check for abstract method, and missing code.
20918         * expr.c (expand_byte_code):  Change interface.
20919         * lang.c (put_decl_node):  Print promoted types prettier.
20920         * verify.c (verify_jvm_instruction):  Change interface.
20921         Partial support for scanning exception table.
20922         For load instructions, handle promoted integral types.
20923
20924 1997-08-21  Per Bothner  <bothner@cygnus.com>
20925
20926         * verify.c:  New file, with contents moved from expr.c.
20927         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
20928         * typeck.c (is_array_type_p):  Moved here from expr.c.
20929         * java-tree.h:  Add some now-needed function declarations.
20930         * Makefile.in (JAVA_OBJS): Added verify.o.
20931
20932 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20933
20934         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
20935         METHOD_ABSTRACT flag.
20936
20937         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
20938         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
20939         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
20940
20941         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
20942         variables.
20943         (start_java_method): Hook for SYNCHRONIZED methods.
20944
20945         * expr.c (build_java_jsr, build_java_ret): New functions
20946         (JSR,PRE): New macros
20947         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
20948         (verify_jvm_instructions): tableswitch, lookupswitch,
20949         monitorenter, monitorexit, goto_w: verified.
20950         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
20951         (build_java_monitor): New function.
20952         (MONITOR_OPERATION): Modified to call build_java_monitor()
20953         (verify_jvm_instructions): Started a thorough verification of
20954         invoke* bytecodes.
20955
20956 1997-08-19  Per Bothner  <bothner@cygnus.com>
20957
20958         Support verification of jsr/ret subroutines (used for try/finally).
20959         * decl.c (return_address_type_node):  New type node.
20960         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
20961         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
20962         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
20963         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
20964         TYPE_USED):  New macros for special types in type_map.
20965
20966         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
20967         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
20968         BCODE_JUMP_TARGET.
20969         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
20970
20971         * expr.c (can_widen_reference_to):  New function.
20972         (pop_type):  Use it.
20973         (merge_type_state):  Support handling start of subroutine.
20974         (push_pending_block):  Return char* error message, instead of calling
20975         fatal on an error.  Also handle subroutines.
20976         (verify_jvm_instructions):  Handle errors from push_poending_block.
20977         Support jsr and ret instructions.
20978
20979 1997-08-19  Per Bothner  <bothner@cygnus.com>
20980
20981         * jcf-io.c (find_classfile):  Fix thinko.
20982         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
20983
20984 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
20985
20986         * Makefile.in (BISON): Remove.
20987
20988 1997-08-07  Per Bothner  <bothner@cygnus.com>
20989
20990         * Makefile.in:  Convert to autoconf.
20991         * config-lang.in (outputs):  Added java/Makefile.
20992
20993         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
20994         Rename cc1java to jc1.
20995
20996         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
20997         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
20998
20999         * class.c (class_depth):  Do load_class if needed.
21000
21001         Mostly better verification.
21002         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21003         (init_decl_processing):  Change return type of soft_checkcast.
21004         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21005         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21006         lang_print_error):  New functions.
21007         (lang_init):  Set global hook print_error_function to lang_print_error.
21008         * expr.c:  In the type_map ptr_type_node is only used for null now.
21009         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21010         (merge_types):  Dererence pointer to record types before comparing.
21011         (decode_newarray_type, merge_types):  On error just return NULL.
21012         (build_java_binop):  Add preliminary implementation (with warning)
21013         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21014         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21015         (expand_compare, expand_java_goto, expand_java_call):  Don't
21016         push_pending_block, since that only makes sense when verifying.
21017         (merge_type_state):  Different return codes.
21018         (push_pending_block):  A block may need to be verified more than once.
21019         (expand_byte_code):  Warn about unused code at code generation time.
21020         (verify_jvm_instruction):  Changed logic, since code may need to be
21021         re-verified if type-state has changed.  Also, better error handling.
21022         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21023         Improve newarray, anewarray, ?aload, athrow,
21024         * java-tree.h (LABEL_CHANGED):  New macro.
21025
21026 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21027
21028         * decl.c (soft_athrow_node): New global variable initialized.
21029         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21030         * typeck.c (convert): Added support for REAL_TYPE.
21031         (convert_to_char): New function.
21032         (convert): Handle CHAR_TYPE.
21033         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21034         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21035         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21036         promoted type.
21037         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21038         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21039         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21040         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21041         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21042         to Use The Right Things.
21043         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21044         compatible with INT. BOOLEAN is made equivalent to BYTE.
21045         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21046         OPCODE_ifnonnull): Now supported.
21047         (build_java_athrow): New function.
21048
21049 1997-08-04  Per Bothner  <bothner@cygnus.com>
21050
21051         Rename method name <init> to match G++ (and fix mangling).
21052         * class.c (layout_class):  Replace method name of <init> by class name.
21053         (make_method_value):  Do inverse renaming of constructor from <init>.
21054         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21055         * typeck.c (lookup_java_constructor):  New function.
21056         * expr.c (expand_invoke):  If method_name is <init>, call
21057         lookup_java_constructor to find constructor.
21058
21059         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21060
21061 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21062
21063         * parse.c (get_class_constant): Modified to handle array "classes"
21064         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21065         wide type.
21066         (convert): Modified to handle real type.
21067         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21068         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21069         variables declared.
21070         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21071         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21072         global variables initialized.
21073         (find_local_variable): Handles the case of a pointer
21074         (end_java_method): Restore the use of one more scope
21075         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21076         build_java_array_length_access, expand_java_arrayload,
21077         expand_java_arraystore, expand_java_array_length,
21078         expand_java_multianewarray, expand_java_anewarray,
21079         build_java_check_indexed_type, is_array_type_p,
21080         build_java_throw_out_of_bound_exception): New functions.
21081         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21082         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21083         OPCODE_<t>aload): Implemented code for verification.
21084         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21085         ARRAY_NEW_MULTI): Macro defined.
21086         (CONVERT): Modified to invoke convert().
21087         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21088
21089 1997-07-31  Per Bothner  <bothner@cygnus.com>
21090
21091         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21092         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21093         (make_class_data):  Field name needs '/' as package prefix.
21094         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21095
21096 1997-07-25  Per Bothner  <bothner@cygnus.com>
21097
21098         Implement debug information for local variables.
21099         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21100         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21101         DECL_LOCAL_SLOT_CHAIN):  New macros.
21102         (struct lang_decl_var):  New type.
21103         * parse.c (give_name_to_locals):  Move to decl.c.
21104         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21105         (start_java_method):  Re-write parameter handling.
21106         (pending_local_decls):  New global variable.
21107         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21108         (find_local_variable):  Accept pc so we can skips decls not in range.
21109         (struct binding_level):  Add end_pc field.
21110         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21111         (various):  Change so current pc gets passed to find_local_variable.
21112
21113         * decl.c (init_decl_processing):  Re-arrange fields in
21114         class_type_node and and method_type_node to match kaffe 0.9.1.
21115         * class.c (make_method_value, make_class_data):  Update
21116         initializations to match.
21117
21118 1997-07-16  Per Bothner  <bothner@cygnus.com>
21119
21120         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21121         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21122         (push_super_field):  New function.
21123         (make_class_data):  Handle inheritance of class static initializer.
21124         (layout_class):  New name mangling.
21125         * constants.c (build_constant_data_ref):  Init type of data array
21126         to a one-element array.
21127         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21128         * decl.c:  Rename class_type, object_type etc to class_type_node,
21129         object_type_node etc.  Make former inherit from latter.
21130         * expr.c (expand_invoke):  Add cast of function address.
21131         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21132         * parse.c (yyparse):  Don't call layout_class here.
21133         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21134
21135 1997-06-14  Per Bothner  <bothner@cygnus.com>
21136
21137         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21138         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21139         (alloc_class_constant):  New.
21140         * expr.c (expand_invoke):  Make sure method's class is initialized.
21141         * class.c (interits_from_p, emit_register_class):  New functions.
21142         * parse.c (yyparse):  Call emit_register_class.
21143
21144 1997-06-09  Per Bothner  <bothner@cygnus.com>
21145
21146         * constants.c:  New file, to handle constant pool.
21147         * Makefile.in (JAVA_OBJS):  Add constants.o.
21148         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21149         (pushdecl_top_level):  New.
21150         * parse.c (layout_class):  Moved to class.c.
21151         * expr.c (java_push_constant_from_pool):  New function.
21152         * class.c (build_class_ref):  Make work fully
21153         (make_class_data):  Emit super-class, constant pool, interface vector.
21154
21155 1997-06-03  Per Bothner  <bothner@cygnus.com>
21156
21157         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21158         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21159         * class.c (class_depth):  New function.
21160         (lookup_named_class):  Replaced by new function lookup_class.
21161         * decl.c (object_type_node, string_type_node):  New.
21162         Remove various types that we no longer need.
21163         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21164         (push_type, pop_type):  New functions for verifier.
21165         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21166         (expand_byte_code):  Simplify, since we assume already verified.
21167         (expand_invoke):  Now mostly works.
21168         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21169         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21170         * parse.c:  Wait to allocate class object until we know its name.
21171         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21172         * typeck.c (get_array_type):  Rename to ...
21173         (build_java_array_type):  ... and provide working implementation.
21174         (build_java_signature):  New function - build Java signature of type.
21175         (set_java_signature):  New function - cache signature with type.
21176         (lookup_java_method):  New function.
21177
21178 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21179
21180         * class.c (ident_subst):  Take extra SUFFIX parameter.
21181         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21182         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21183         (build_class_ref):  Actually implement.
21184         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21185         * decl.c (builtin_function):  New.
21186         (init_decl_processing):  Update for current Kaffe.  Declare some
21187         builtin Kaffe functions.
21188         * expr.c (build_address_of):  New.
21189         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21190         Renamed (from expand_java_new etc), and added working implementations.
21191         (build_field_ref):  Now also handle static fields.
21192         (expand_invoke):  Implement invokestatic, and start implement rest.
21193         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21194         * javaop.def:  Rename invokevirt -> invokevirtual.
21195         * lang.c (use_handles):  Removed.
21196         * parse.c:  Add support for ConstantValue attribute.
21197         Handle nested loading of a class.  (JPOOL_UTF):  New.
21198
21199 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21200
21201         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21202
21203 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21204
21205         * Make-lang.in (java.install-man):  New empty rule.
21206         * typeck.c (set_local_type):  New function.
21207         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21208         not find_stack_slot.  Call set_local_type.
21209
21210 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21211
21212         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21213         and building RECORD_TYPE CONSTRUCTORs.
21214         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21215
21216         * lang.c (use_handles):  Change the default to 0.
21217         * decl.c:  Define and build class_type, field_type, utf8const_type.
21218         * class.c (make_class_data, make_field_value,
21219         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21220         hashUtf8String, strLengthUtf8, mangled_classname:
21221         Functions to build reflective data structures.
21222         * parse.c (yyparse):  Call make_class_data.
21223
21224         * jcf-io.c (open_class, find_classfile):  New functions.
21225         * jcf-dump.c:  Support reading classfile from explicitly-named
21226         class file (without CLASSPATH searching).
21227
21228 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21229
21230         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21231         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21232         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21233         (get_constant):  Now trivial for CONSTANT_Utf8.
21234
21235         * jcf.h:  Make NEW_CPOOL the default.
21236         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21237
21238 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21239
21240         New directory.